销售出库标志卡数量等部分调整

master
guoshuang 5 months ago
parent df89d52250
commit f9465203cc

@ -142,7 +142,7 @@ export default class LoginPage extends BasePage {
// console.log('Version////', this.Version); // console.log('Version////', this.Version);
} }
///****************** ///******************
version = '0.0.166'; // version = '0.0.167'; //
//version = '0.0.14'; // //version = '0.0.14'; //
//*************** false true **************** //*************** false true ****************
//isTest = true; //isTest = true;

@ -136,7 +136,7 @@
</view> </view>
<view class="row-list-item"> <view class="row-list-item">
<view class="list-item"> 数量: </view> <view class="list-item"> 数量: </view>
<u-input v-model="item.amount" type="number " border @blur="confirmNumber(item)" /> <u-input v-model="item.amount" type="number " border @blur="confirmNumber(item, index)" />
<!-- <view>{{item.amount}} </view> --> <!-- <view>{{item.amount}} </view> -->
</view> </view>
</view> </view>
@ -385,6 +385,7 @@ export default class SaleOutWH extends BasePage {
}); });
model.scandatalist.map((item) => { model.scandatalist.map((item) => {
item.productCode = item.productCode.slice(item.productCode.search(/[1-9]/)); item.productCode = item.productCode.slice(item.productCode.search(/[1-9]/));
item.oldamount = item.amount;
if (item.productCode == this.orderNoItemList.productCode) { if (item.productCode == this.orderNoItemList.productCode) {
this.list.push(item); this.list.push(item);
this.orderNoItemList.outQuantity += item.amount; this.orderNoItemList.outQuantity += item.amount;
@ -436,35 +437,43 @@ export default class SaleOutWH extends BasePage {
}); });
return; return;
} }
//this.list[0].outnumber = this.outnumber; if (this.orderNoItemList.planQuantity < this.orderNoItemList.outQuantity) {
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') {
(this.$refs.uToast as any).show({ (this.$refs.uToast as any).show({
title: '成功', title: '出库数量大于计划数量,不能出库',
type: 'success', // url: '/pages/user/index'
}); });
this.list = []; return;
this.query();
//this.productCodebiaozhiwei = '';
} else { } else {
(this.$refs.uToast as any).show({ //this.list[0].outnumber = this.outnumber;
title: '失败', let wmsFpStorageNewsSns = [];
type: 'error', 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() { async tidan() {
@ -498,13 +507,22 @@ export default class SaleOutWH extends BasePage {
} }
} }
confirmNumber(item) { confirmNumber(item, index) {
console.log(item); console.log(item);
let addnumber = 0; if (item.oldamount < item.amount) {
this.list.forEach((item) => { (this.$refs.uToast as any).show({
addnumber += parseFloat(item.amount ? item.amount : '0'); title: '输入数量不允许超过' + item.oldamount,
}); type: 'error',
this.orderNoItemList.outQuantity = this.orderNoItemList.outnumber + addnumber; });
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;
}
} }
} }
</script> </script>

Loading…
Cancel
Save