|
|
|
@ -235,24 +235,27 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
}
|
|
|
|
|
Add() {
|
|
|
|
|
if (this.qty == '' || this.wlCode == '') {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.AppendMateriel1') as string,
|
|
|
|
|
});
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: this.$t('message.AppendMateriel1') as string,
|
|
|
|
|
// });
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel1') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(this.qty) <= 0) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.AppendMateriel2') as string,
|
|
|
|
|
});
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: this.$t('message.AppendMateriel2') as string,
|
|
|
|
|
// });
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel2') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(this.qty) > model.blDetailList[this.someIndex].amount) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.AppendMateriel3') as string,
|
|
|
|
|
});
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: this.$t('message.AppendMateriel3') as string,
|
|
|
|
|
// });
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel3') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let num = parseFloat(this.qty);
|
|
|
|
@ -260,29 +263,32 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
num += parseFloat(item.qty);
|
|
|
|
|
});
|
|
|
|
|
if (num > this.model.blDetailList[this.someIndex].amount) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.AppendMateriel3') as string,
|
|
|
|
|
});
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: this.$t('message.AppendMateriel3') as string,
|
|
|
|
|
// });
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel3') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let isTrue: boolean = true;
|
|
|
|
|
if (this.LocationList.length != 0) {
|
|
|
|
|
this.model.blDetailList[this.someIndex].wlList.forEach((item: any) => {
|
|
|
|
|
if (this.wlCode.sendSpot != item.Code) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.AppendMateriel4') as string,
|
|
|
|
|
});
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: this.$t('message.AppendMateriel4') as string,
|
|
|
|
|
// });
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel4') as string);
|
|
|
|
|
return (isTrue = false);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (this.some == {}) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.AppendMateriel5') as string,
|
|
|
|
|
});
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: this.$t('message.AppendMateriel5') as string,
|
|
|
|
|
// });
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel5') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (isTrue == true) {
|
|
|
|
@ -366,10 +372,11 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
}
|
|
|
|
|
async bill() {
|
|
|
|
|
if (this.some == {} || this.some.prdOrder == null) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.Commission_tips6') as string,
|
|
|
|
|
});
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: this.$t('message.Commission_tips6') as string,
|
|
|
|
|
// });
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips6') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
|
|
|
|
@ -472,11 +479,11 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
view {
|
|
|
|
|
width: 100rpx;
|
|
|
|
|
width: 140rpx;
|
|
|
|
|
line-height: 100rpx;
|
|
|
|
|
}
|
|
|
|
|
.search{
|
|
|
|
|
padding-left: 19px;
|
|
|
|
|
padding-left: 12px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -489,7 +496,7 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
.material-right-title {
|
|
|
|
|
width: 120rpx;
|
|
|
|
|
width: 140rpx;
|
|
|
|
|
height: 100%;
|
|
|
|
|
line-height: 100rpx;
|
|
|
|
|
}
|
|
|
|
|