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

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,12 +437,19 @@ export default class SaleOutWH extends BasePage {
}); });
return; return;
} }
if (this.orderNoItemList.planQuantity < this.orderNoItemList.outQuantity) {
(this.$refs.uToast as any).show({
title: '出库数量大于计划数量,不能出库',
// url: '/pages/user/index'
});
return;
} else {
//this.list[0].outnumber = this.outnumber; //this.list[0].outnumber = this.outnumber;
let wmsFpStorageNewsSns = []; let wmsFpStorageNewsSns = [];
this.list.map((item) => { this.list.map((item) => {
wmsFpStorageNewsSns.push({ wmsFpStorageNewsSns.push({
storageId: item.storageId, storageId: item.storageId,
amount: item.amount, amount: parseInt(item.amount),
}); });
}); });
let item = { let item = {
@ -467,6 +475,7 @@ export default class SaleOutWH extends BasePage {
}); });
} }
} }
}
async tidan() { async tidan() {
// //
// if (this.orderNo == '' || this.orderNo.length == 0) { // if (this.orderNo == '' || this.orderNo.length == 0) {
@ -498,8 +507,16 @@ export default class SaleOutWH extends BasePage {
} }
} }
confirmNumber(item) { confirmNumber(item, index) {
console.log(item); console.log(item);
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; let addnumber = 0;
this.list.forEach((item) => { this.list.forEach((item) => {
addnumber += parseFloat(item.amount ? item.amount : '0'); addnumber += parseFloat(item.amount ? item.amount : '0');
@ -507,6 +524,7 @@ export default class SaleOutWH extends BasePage {
this.orderNoItemList.outQuantity = this.orderNoItemList.outnumber + addnumber; this.orderNoItemList.outQuantity = this.orderNoItemList.outnumber + addnumber;
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page-product-receipt { .page-product-receipt {

Loading…
Cancel
Save