|
|
@ -35,7 +35,7 @@
|
|
|
|
<view class="single">
|
|
|
|
<view class="single">
|
|
|
|
<view class="single-left">
|
|
|
|
<view class="single-left">
|
|
|
|
<view>{{ $t('message.source') }}:</view>
|
|
|
|
<view>{{ $t('message.source') }}:</view>
|
|
|
|
<u-search :placeholder="$t('message.barcodeSource')" style="z-index: 10000" v-model="NextCode" @search="searchSource" :show-action="false"></u-search>
|
|
|
|
<u-search :placeholder="$t('message.barcodeSource')" :focus="isfocus" style="z-index: 10000" v-model="NextCode" @search="searchSource" :show-action="false"></u-search>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="single-right">
|
|
|
|
<view class="single-right">
|
|
|
|
<u-button type="primary" @click="searchSource">{{ $t('message.Query') }}</u-button>
|
|
|
|
<u-button type="primary" @click="searchSource">{{ $t('message.Query') }}</u-button>
|
|
|
@ -67,7 +67,7 @@
|
|
|
|
</u-col>
|
|
|
|
</u-col>
|
|
|
|
<!-- 返回 -->
|
|
|
|
<!-- 返回 -->
|
|
|
|
<u-col :span="6">
|
|
|
|
<u-col :span="6">
|
|
|
|
<u-button type="error" @click="uni.navigateBack()">{{ $t('message.po_Return') }}</u-button>
|
|
|
|
<u-button type="error" @click="uni.navigateBack({})">{{ $t('message.po_Return') }}</u-button>
|
|
|
|
</u-col>
|
|
|
|
</u-col>
|
|
|
|
</u-row>
|
|
|
|
</u-row>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
@ -90,6 +90,7 @@ export default class KanDanHandOver extends BasePage {
|
|
|
|
model = model;
|
|
|
|
model = model;
|
|
|
|
barcode = '';
|
|
|
|
barcode = '';
|
|
|
|
every: any = {};
|
|
|
|
every: any = {};
|
|
|
|
|
|
|
|
isfocus = false;
|
|
|
|
async query() {
|
|
|
|
async query() {
|
|
|
|
if (this.barcode == '' || this.barcode.length == 0) {
|
|
|
|
if (this.barcode == '' || this.barcode.length == 0) {
|
|
|
|
this.customToast(this.$t('message.Commission_tips1') as string);
|
|
|
|
this.customToast(this.$t('message.Commission_tips1') as string);
|
|
|
@ -131,6 +132,12 @@ export default class KanDanHandOver extends BasePage {
|
|
|
|
NewQty: any = '';
|
|
|
|
NewQty: any = '';
|
|
|
|
Submitlist: any = [];
|
|
|
|
Submitlist: any = [];
|
|
|
|
Add() {
|
|
|
|
Add() {
|
|
|
|
|
|
|
|
let sum = 0;
|
|
|
|
|
|
|
|
this.Submitlist.forEach((item) => {
|
|
|
|
|
|
|
|
sum += parseFloat(item.qty);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
// this.allnumber = sum;
|
|
|
|
|
|
|
|
console.log('/////////', this.model.SourceDetail.qty);
|
|
|
|
if (this.NewQty == '') {
|
|
|
|
if (this.NewQty == '') {
|
|
|
|
this.customToast(this.$t('message.Summary_PleaseInputNumber') as string);
|
|
|
|
this.customToast(this.$t('message.Summary_PleaseInputNumber') as string);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -139,11 +146,11 @@ export default class KanDanHandOver extends BasePage {
|
|
|
|
this.customToast(this.$t('message.Commission_tips3') as string);
|
|
|
|
this.customToast(this.$t('message.Commission_tips3') as string);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (parseFloat(this.NewQty) > parseFloat(this.every.qty)) {
|
|
|
|
// if (parseFloat(this.NewQty) > parseFloat(this.every.qty)) {
|
|
|
|
this.customToast(this.$t('message.Commission_tips4') as string);
|
|
|
|
// this.customToast(this.$t('message.Commission_tips4') as string);
|
|
|
|
return;
|
|
|
|
// return;
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
if (parseFloat(this.NewQty) > parseFloat(this.model.SourceDetail.qty)) {
|
|
|
|
if (parseFloat(this.NewQty) + sum > parseFloat(this.model.SourceDetail.qty)) {
|
|
|
|
this.customToast(this.$t('message.Commission_tips4') as string);
|
|
|
|
this.customToast(this.$t('message.Commission_tips4') as string);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -156,7 +163,13 @@ export default class KanDanHandOver extends BasePage {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.Submitlist.push(arr);
|
|
|
|
this.Submitlist.push(arr);
|
|
|
|
this.every.qty += parseFloat(this.NewQty);
|
|
|
|
this.every.qty += parseFloat(this.NewQty);
|
|
|
|
this.model.SourceDetail.qty -= parseFloat(this.NewQty);
|
|
|
|
|
|
|
|
|
|
|
|
// this.model.SourceDetail.qty -= parseFloat(this.NewQty);
|
|
|
|
|
|
|
|
this.NextCode = '';
|
|
|
|
|
|
|
|
this.isfocus = false;
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
|
|
this.isfocus = true;
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
deleteItem(e: any) {
|
|
|
|
deleteItem(e: any) {
|
|
|
|
uni.showModal({
|
|
|
|
uni.showModal({
|
|
|
@ -167,7 +180,7 @@ export default class KanDanHandOver extends BasePage {
|
|
|
|
if (res.confirm) {
|
|
|
|
if (res.confirm) {
|
|
|
|
this.Submitlist.splice(e.contentIndex, 1);
|
|
|
|
this.Submitlist.splice(e.contentIndex, 1);
|
|
|
|
this.every.qty -= parseFloat(e.lineData.qty);
|
|
|
|
this.every.qty -= parseFloat(e.lineData.qty);
|
|
|
|
this.model.SourceDetail.qty += parseFloat(e.lineData.qty);
|
|
|
|
//this.model.SourceDetail.qty += parseFloat(e.lineData.qty);
|
|
|
|
} else if (res.cancel) {
|
|
|
|
} else if (res.cancel) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|