...
|
...
|
@@ -35,7 +35,7 @@ |
|
|
</LayoutFilter>
|
|
|
|
|
|
<LayoutAction>
|
|
|
<Button type="primary" @click="sendOut">发货</Button>
|
|
|
<Button type="primary" @click="deliver">发货</Button>
|
|
|
</LayoutAction>
|
|
|
|
|
|
<LayoutList>
|
...
|
...
|
@@ -139,16 +139,20 @@ |
|
|
pageSize: 20
|
|
|
}))
|
|
|
.then(res => {
|
|
|
const fmt = 'YYYY-MM-DD HH:mm:ss';
|
|
|
const list = res.data.records;
|
|
|
this.processData(res.data);
|
|
|
});
|
|
|
},
|
|
|
processData(data) {
|
|
|
const fmt = 'YYYY-MM-DD HH:mm:ss';
|
|
|
const list = data.records;
|
|
|
|
|
|
_.each(list, i => {
|
|
|
i.createTime = moment(i.createTime).format(fmt);
|
|
|
});
|
|
|
_.each(list, i => {
|
|
|
i.createTime = moment(i.createTime).format(fmt);
|
|
|
i._disabled = i.isOvertime === 'Y';
|
|
|
});
|
|
|
|
|
|
this.table.list = list;
|
|
|
this.page.total = res.data.totalCount;
|
|
|
});
|
|
|
this.table.list = list;
|
|
|
this.page.total = data.totalCount;
|
|
|
},
|
|
|
filterSearch(){
|
|
|
const params = this.params();
|
...
|
...
|
@@ -185,10 +189,10 @@ |
|
|
const v = data.value;
|
|
|
this.table.list[i].inputDeliverNum = +v;
|
|
|
},
|
|
|
sendOut(){
|
|
|
deliver(){
|
|
|
const len = this.deliverRows.length;
|
|
|
if(!len) {
|
|
|
this.$Message.error('请先勾选要发货的订单');
|
|
|
this.$Message.error('请勾选要发货的订单');
|
|
|
return;
|
|
|
}
|
|
|
this.$refs.deliverModal.show();
|
...
|
...
|
@@ -212,10 +216,14 @@ |
|
|
},
|
|
|
showUploadModal(index) {
|
|
|
const row = this.table.list[index];
|
|
|
const lackNum = row.inputLackNum;
|
|
|
|
|
|
if(!lackNum) {
|
|
|
this.$Message.error('请输入缺货数量');
|
|
|
const inputLackNum = row.inputLackNum;
|
|
|
const buyNum = row.buyingNums;
|
|
|
const shipNum = row.shipmentsNums;
|
|
|
const lackNum = row.lackNum;
|
|
|
const needDeliver = buyNum - lackNum - shipNum;
|
|
|
|
|
|
if(!inputLackNum || inputLackNum > needDeliver) {
|
|
|
this.$Message.error('请输入缺货数量,且缺货数量不能大于当前需发数', 3);
|
|
|
return;
|
|
|
}
|
|
|
this.$refs.stockOutModal.show(row);
|
...
|
...
|
@@ -235,7 +243,6 @@ |
|
|
|
|
|
<style lang="scss">
|
|
|
.ivu-table .over-time td{
|
|
|
background-color: #2db7f5;
|
|
|
color: #fff;
|
|
|
background-color: #fcecec;
|
|
|
}
|
|
|
</style> |
...
|
...
|
|