diff --git a/src/pages/login/login/index.vue b/src/pages/login/login/index.vue index 707bd26..3222063 100644 --- a/src/pages/login/login/index.vue +++ b/src/pages/login/login/index.vue @@ -142,7 +142,7 @@ export default class LoginPage extends BasePage { // console.log('Version////', this.Version); } ///********版本号修改区域********** - version = '0.0.166'; //正式版本号 + version = '0.0.167'; //正式版本号 //version = '0.0.14'; //测试版本号 //***************标志修改区域:是否是测试标志: false 正式版本; true 测试版本**************** //isTest = true; diff --git a/src/pages/wms/product/SaleOutWH/index.vue b/src/pages/wms/product/SaleOutWH/index.vue index 6538b9e..e54f333 100644 --- a/src/pages/wms/product/SaleOutWH/index.vue +++ b/src/pages/wms/product/SaleOutWH/index.vue @@ -136,7 +136,7 @@ 数量: - + @@ -385,6 +385,7 @@ export default class SaleOutWH extends BasePage { }); model.scandatalist.map((item) => { item.productCode = item.productCode.slice(item.productCode.search(/[1-9]/)); + item.oldamount = item.amount; if (item.productCode == this.orderNoItemList.productCode) { this.list.push(item); this.orderNoItemList.outQuantity += item.amount; @@ -436,35 +437,43 @@ export default class SaleOutWH extends BasePage { }); return; } - //this.list[0].outnumber = this.outnumber; - let wmsFpStorageNewsSns = []; - this.list.map((item) => { - wmsFpStorageNewsSns.push({ - storageId: item.storageId, - amount: item.amount, - }); - }); - let item = { - factoryCode: session.FactoryCode, - createBy: session.loginName, - id: this.orderNoItemList.id, - wmsFpStorageNewsSns: wmsFpStorageNewsSns, - }; - //console.log('000------',item); - await this.model.out(item); - if (this.model.SubmitCode == '200') { + if (this.orderNoItemList.planQuantity < this.orderNoItemList.outQuantity) { (this.$refs.uToast as any).show({ - title: '成功', - type: 'success', + title: '出库数量大于计划数量,不能出库', + // url: '/pages/user/index' }); - this.list = []; - this.query(); - //this.productCodebiaozhiwei = ''; + return; } else { - (this.$refs.uToast as any).show({ - title: '失败', - type: 'error', + //this.list[0].outnumber = this.outnumber; + let wmsFpStorageNewsSns = []; + this.list.map((item) => { + wmsFpStorageNewsSns.push({ + storageId: item.storageId, + amount: parseInt(item.amount), + }); }); + let item = { + factoryCode: session.FactoryCode, + createBy: session.loginName, + id: this.orderNoItemList.id, + wmsFpStorageNewsSns: wmsFpStorageNewsSns, + }; + //console.log('000------',item); + await this.model.out(item); + if (this.model.SubmitCode == '200') { + (this.$refs.uToast as any).show({ + title: '成功', + type: 'success', + }); + this.list = []; + this.query(); + //this.productCodebiaozhiwei = ''; + } else { + (this.$refs.uToast as any).show({ + title: '失败', + type: 'error', + }); + } } } async tidan() { @@ -498,13 +507,22 @@ export default class SaleOutWH extends BasePage { } } - confirmNumber(item) { + confirmNumber(item, index) { console.log(item); - let addnumber = 0; - this.list.forEach((item) => { - addnumber += parseFloat(item.amount ? item.amount : '0'); - }); - this.orderNoItemList.outQuantity = this.orderNoItemList.outnumber + addnumber; + if (item.oldamount < item.amount) { + (this.$refs.uToast as any).show({ + title: '输入数量不允许超过' + item.oldamount, + type: 'error', + }); + this.list[index].amount = item.oldamount; + return; + } else { + let addnumber = 0; + this.list.forEach((item) => { + addnumber += parseFloat(item.amount ? item.amount : '0'); + }); + this.orderNoItemList.outQuantity = this.orderNoItemList.outnumber + addnumber; + } } }