Commit b520ea86 by 王志慧

fixed

1 parent 9a2c9080
...@@ -71,7 +71,11 @@ export const defaultPutStatusOptions = [ ...@@ -71,7 +71,11 @@ export const defaultPutStatusOptions = [
{ {
id: 2, id: 2,
label: "已入库" label: "已入库"
} },
{
id: 3,
label: "部分入库"
},
] ]
//采购类型 //采购类型
export const purchaseTypeList = [ export const purchaseTypeList = [
......
...@@ -24,16 +24,17 @@ ...@@ -24,16 +24,17 @@
<div> <div>
发货数量: 发货数量:
<span>{{ membraneTypeList.includes(item.goodsType) ? `${item.purchaseNumber}卷` : `${item.purchaseNumber}件` }}</span> <span>{{ membraneTypeList.includes(item.goodsType) ? `${item.purchaseNumber}卷` : `${item.purchaseNumber}件` }}</span>
<span class="lookNumber" @click="lookNumber(item.deliveryCardList)" v-if="item.deliveryCardList && item.deliveryCardList.length > 0">查看卡号</span>
</div> </div>
<div> <div>
可用库存数量: 可用库存数量:
<span>{{ item.stockNum }}{{ membraneTypeList.includes(item.goodsType) ? `米` : `件` }}</span> <span>{{ item.stockNum }}{{ membraneTypeList.includes(item.goodsType) ? `米` : `件` }}</span>
</div> </div>
<div class="add-btn" @click="addLineTable(index)"> <div class="add-btn" @click="addLineTable(index)" v-if="item.deliveryCardList === null || item.deliveryCardList.length == 0">
添加入库记录 添加入库记录
</div> </div>
</div> </div>
<el-form ref="addForm" :model="item" size="small" :rules="rules"> <el-form ref="addForm" :model="item" size="small" :rules="rules" v-if="item.deliveryCardList === null || item.deliveryCardList.length == 0">
<GLTable :tableData="item.goodsWarehousingList" :noDataImg="url" :tableParams="tableParams" :hasPage="false"> <GLTable :tableData="item.goodsWarehousingList" :noDataImg="url" :tableParams="tableParams" :hasPage="false">
<template slot="increaseStockNum" slot-scope="scope"> <template slot="increaseStockNum" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'goodsWarehousingList.' + scope.index + '.increaseStockNum'" :rules="rules.increaseStockNum"> <el-form-item style="margin-bottom: 0px" :prop="'goodsWarehousingList.' + scope.index + '.increaseStockNum'" :rules="rules.increaseStockNum">
...@@ -61,8 +62,14 @@ ...@@ -61,8 +62,14 @@
</div> </div>
</GLTable> </GLTable>
</el-form> </el-form>
<div v-else class="message">
已自动入库至商户的权益卡管理中,可前往“库存管理-权益卡管理”中查询
</div>
</div> </div>
</template> </template>
<el-dialog width="750px" title="查看发货卡号" :visible.sync="innerVisible" append-to-body>
<GLTable class="look-card-wrap" :tableData="tableData" :noDataImg="url" :tableParams="innerParams" :hasPage="false"></GLTable>
</el-dialog>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogShow = false">关闭</el-button> <el-button size="small" @click="dialogShow = false">关闭</el-button>
<el-button type="primary" size="small" @click="handleSave">保存入库</el-button> <el-button type="primary" size="small" @click="handleSave">保存入库</el-button>
...@@ -144,11 +151,29 @@ export default { ...@@ -144,11 +151,29 @@ export default {
{ validator: checkPrice, trigger: 'blur' } { validator: checkPrice, trigger: 'blur' }
] ]
}, },
detailInfo: {} detailInfo: {},
innerVisible: false,
innerParams: {
tableOption: false,
tableColumns: [
{
label: '卡号',
prop: 'cardNum',
width: 630
}
]
},
tableData: []
} }
}, },
created() {}, created() {},
methods: { methods: {
lookNumber(data) {
this.innerVisible = true
this.tableData = data.map(item => {
return { cardNum: item }
})
},
handleCalculate(data, key, index) { handleCalculate(data, key, index) {
if (data[key] > this.detailInfo.deliveryDetailList[index].stockNum) { if (data[key] > this.detailInfo.deliveryDetailList[index].stockNum) {
data[key] = this.detailInfo.deliveryDetailList[index].stockNum data[key] = this.detailInfo.deliveryDetailList[index].stockNum
...@@ -248,7 +273,7 @@ export default { ...@@ -248,7 +273,7 @@ export default {
}) })
}) })
}, },
handleSave() { handleSave() {
let num = 0 let num = 0
this.$refs['addForm'].forEach(async item => { this.$refs['addForm'].forEach(async item => {
try { try {
...@@ -257,15 +282,15 @@ export default { ...@@ -257,15 +282,15 @@ export default {
} catch (err) { } catch (err) {
console.log(err) console.log(err)
} }
if (num == this.$refs['addForm'].length) { if (num == this.$refs['addForm'].length) {
let deliveryDetailList = this.detailInfo.deliveryDetailList.map(item=>{ let deliveryDetailList = this.detailInfo.deliveryDetailList.map(item => {
if(item.deliveryCardList.length==0){ if (item.deliveryCardList.length == 0) {
return item return item
} }
}) })
let params = { let params = {
deliveryDetailList:deliveryDetailList deliveryDetailList: deliveryDetailList
} }
params.id = this.id params.id = this.id
this.$apis.delivery.addPurchaseOrder(params).then(res => { this.$apis.delivery.addPurchaseOrder(params).then(res => {
...@@ -320,4 +345,19 @@ export default { ...@@ -320,4 +345,19 @@ export default {
height: 64px; height: 64px;
} }
} }
.lookNumber {
font-size: 14px;
color: #5850ff !important;
cursor: pointer;
margin-left: 8px;
}
.look-card-wrap{
/deep/.el-table th.el-table__cell>.cell {
padding: 0 16px;
text-align: center;
}
/deep/.el-table__body td.el-table__cell {
text-align: center;
}
}
</style> </style>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<GLTable ref="orderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="orderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="putStatus" slot-scope="scope"> <template slot="putStatus" slot-scope="scope">
<div> <div>
<span :class="[scope.scope.putStatus == 1 ? 'yellowSpot' : 'greenSpot']"></span> <span :class="[scope.scope.putStatus == 1 ? 'ashSpot' :scope.scope.putStatus == 2? 'greenSpot':'yellowSpot']"></span>
<span>{{ scope.scope.putStatus | puStatus }}</span> <span>{{ scope.scope.putStatus | puStatus }}</span>
</div> </div>
</template> </template>
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
fn: '入库' fn: '入库'
}, },
condition: row => { condition: row => {
return row.putStatus == 1&&row.operatorStatus == 1 return row.putStatus == 1&&row.operatorStatus == 1||row.putStatus == 3&&row.operatorStatus == 1
}, },
listeners: { listeners: {
click: this.handleWarehousing click: this.handleWarehousing
......
...@@ -160,7 +160,7 @@ export default { ...@@ -160,7 +160,7 @@ export default {
}, },
// 获取类目列表 // 获取类目列表
getGoodsCategoryConfiguration() { getGoodsCategoryConfiguration() {
this.$apis.sysBase.getGoodsCategoryConfiguration({ sceneType: 1, shoppingMallFlag: true }).then(result => { this.$apis.sysBase.getGoodsCategoryConfiguration({shoppingMallFlag: true }).then(result => {
const { list } = result const { list } = result
if (list.length) { if (list.length) {
const navList = list.map(({ categoryType, categoryName }) => { const navList = list.map(({ categoryType, categoryName }) => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!