|
@@ -360,6 +360,11 @@
|
|
|
title: '69码-商品条码',
|
|
|
field: 'barCode',
|
|
|
},
|
|
|
+ {
|
|
|
+ width: '120px',
|
|
|
+ title: '可销售库存',
|
|
|
+ field: 'remainAmount',
|
|
|
+ },
|
|
|
{
|
|
|
width: '140px',
|
|
|
title: '财务编号',
|
|
@@ -422,7 +427,7 @@
|
|
|
field: 'volume',
|
|
|
},
|
|
|
{
|
|
|
- width: 70,
|
|
|
+ width: 140,
|
|
|
title: '操作',
|
|
|
action: true,
|
|
|
plugins: [{
|
|
@@ -434,11 +439,23 @@
|
|
|
(this as any).openEdit(item)
|
|
|
}
|
|
|
}
|
|
|
- }]
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,{
|
|
|
+ // icon: 'el-icon-setting',
|
|
|
+ name: '查wms库存',
|
|
|
+ audit: '',
|
|
|
+ event: {
|
|
|
+ click: (item : any) => {
|
|
|
+ (this as any).getWMSStore(item)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
]
|
|
|
},
|
|
|
}
|
|
|
+ tableData:Array<any>=[]
|
|
|
mounted() {
|
|
|
this.timer = setInterval(() => {
|
|
|
this.getDataList();
|
|
@@ -552,6 +569,7 @@
|
|
|
v.volume = parseFloat(v.volume).toFixed(2)
|
|
|
}
|
|
|
});
|
|
|
+ this.tableData = res.data.records;
|
|
|
(this.$refs.moduleView as any).setTableValue(res.data.records);
|
|
|
let page = {
|
|
|
pageNo: res.data.current, //当前页
|
|
@@ -562,6 +580,30 @@
|
|
|
} else this.$message.error(res.msg);
|
|
|
}).catch(() => loading.close());
|
|
|
}
|
|
|
+ //查wms库存
|
|
|
+ getWMSStore(item:any){
|
|
|
+ let index = -1;
|
|
|
+ for(const da of this.tableData){
|
|
|
+ index++;
|
|
|
+ if(da.id === item.id){
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let loading = this.$loading({ target: '.main-container' });
|
|
|
+ api.wmsStore({ids:item.id}).then((res:any) => {
|
|
|
+ loading.close()
|
|
|
+ if(res.code == 200){
|
|
|
+ if(res.data && res.data[item.id]){
|
|
|
+ this.tableData[index].remainAmount = res.data[item.id].remainAmount;
|
|
|
+ (this.$refs.moduleView as any).setTableValue(this.tableData);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).catch((err:any) => {
|
|
|
+ loading.close()
|
|
|
+ this.tableData[index].remainAmount = 'WMS库存查询失败!';
|
|
|
+ (this.$refs.moduleView as any).setTableValue(this.tableData);
|
|
|
+ })
|
|
|
+ }
|
|
|
// 打开编辑
|
|
|
openEdit(e : any) {
|
|
|
let loading = this.$loading({ target: '.main-container' });
|