Commit 62df7b43 by 王志慧

commit

1 parent 01f320ca
......@@ -37,7 +37,7 @@
<GLTable :tableData="item.goodsWarehousingList" :noDataImg="url" :tableParams="tableParams" :hasPage="false">
<template slot="increaseStockNum" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'goodsWarehousingList.' + scope.index + '.increaseStockNum'" :rules="rules.increaseStockNum">
<el-input v-model="scope.scope.increaseStockNum" placeholder="请输入" @blur="handleCalculate(scope.scope, 'increaseStockNum')"></el-input>
<el-input v-model="scope.scope.increaseStockNum" placeholder="请输入" @blur="handleCalculate(scope.scope, 'increaseStockNum', index)"></el-input>
</el-form-item>
</template>
<!-- 入库仓库 -->
......@@ -150,7 +150,12 @@ export default {
},
created() {},
methods: {
handleCalculate(data, key) {
handleCalculate(data, key, index) {
console.log(data[key], index)
if (data[key] > this.detailInfo.deliveryDetailList[index].stockNum) {
data[key] = this.detailInfo.deliveryDetailList[index].stockNum
return
}
data[key] = data[key] ? new BigNumber(data[key]).dp(2).toNumber() : ''
},
getMerchantList() {
......@@ -168,10 +173,15 @@ export default {
item.goodsWarehousingList[0].yqMerchantName = storeUsageList[0].merchantName
item.goodsWarehousingList[0].yqMerchantId = storeUsageList[0].merchantNo
})
this.getRefByYqShopList(deliveryDetailList[0].goodsWarehousingList[0],storeUsageList[0].merchantNo)
},
getRefByYqShopList(value) {
getRefByYqShopList(data, value) {
this.$apis.purchaseShopping.get4SRefByYqShopList({ scene: 1, merchantId: value }).then(res => {
this.refByYqShopList = res
this.refByYqShopList.unshift({
merchantName: data.yqMerchantName,
merchantId: data.yqMerchantId
})
})
},
handleSelect(data, id) {
......@@ -181,7 +191,7 @@ export default {
data.merchantId = ''
}
})
this.getRefByYqShopList(id)
this.getRefByYqShopList(data, id)
},
handleStoreSelect(data, id) {
this.refByYqShopList.forEach(item => {
......@@ -214,16 +224,16 @@ export default {
})
},
handleDelete(index, line) {
this.detailInfo.deliveryDetailList[index].goodsWarehousingList.splice(line, 1)
if (this.detailInfo.deliveryDetailList[index].goodsWarehousingList.length > 1) {
this.detailInfo.deliveryDetailList[index].goodsWarehousingList.splice(line, 1)
}
},
addLineTable(index) {
let {
storeUsageList
} = this
let { storeUsageList } = this
this.detailInfo.deliveryDetailList[index].goodsWarehousingList.push({
increaseStockNum: '',
yqMerchantId:storeUsageList.length==1?storeUsageList[0].merchantNo: '',
yqMerchantName:storeUsageList.length==1?storeUsageList[0].merchantName: '',
yqMerchantId: storeUsageList.length == 1 ? storeUsageList[0].merchantNo : '',
yqMerchantName: storeUsageList.length == 1 ? storeUsageList[0].merchantName : '',
merchantId: '',
merchantName: ''
})
......
......@@ -63,13 +63,15 @@ export default {
label: '承运单号',
name: 'deliveryNumber',
type: 'input',
isClear: true
isClear: true,
maxlength: 50
},
{
label: '承运公司',
name: 'deliveryCompany',
type: 'input',
isClear: true
isClear: true,
maxlength: 20
},
{
label: '发货时间',
......@@ -82,13 +84,15 @@ export default {
label: '所属订单',
name: 'orderCode',
type: 'input',
isClear: true
isClear: true,
maxlength: 20
},
{
label: '所属商户',
name: 'merchantName',
type: 'input',
isClear: true
isClear: true,
maxlength: 50
},
{
label: '状态',
......@@ -151,7 +155,7 @@ export default {
label: '发货时间',
prop: 'deliveryDate',
formatter: cellValue => {
return dayjs(cellValue.deliveryDate).format('YYYY-MM-DD HH:mm:ss')
return cellValue.deliveryDate?dayjs(cellValue.deliveryDate).format('YYYY-MM-DD HH:mm:ss'):'--'
}
},
{
......@@ -200,8 +204,9 @@ export default {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.placeOrderTimeStr.length) {
params.deliveryDateStart = new Date(this.searchForm.placeOrderTimeStr[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.deliveryDateEnd = new Date(this.searchForm.placeOrderTimeStr[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
params.deliveryDateStart = dayjs(this.searchForm.placeOrderTimeStr[0]).format('YYYY-MM-DD') + ' 00:00:00'
params.deliveryDateEnd = dayjs(this.searchForm.placeOrderTimeStr[1]).format('YYYY-MM-DD')+ ' 23:59:59'
}
delete params.placeOrderTimeStr
......
......@@ -83,7 +83,8 @@ export default {
label: '订单编号',
name: 'orderCode',
type: 'input',
isClear: true
isClear: true,
maxlength:20
},
{
label: '订单状态',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!