|
|
|
@ -10,19 +10,19 @@
|
|
|
|
|
<u-form class="form" ref="form" :error-type="['toast']" label-width="150rpx">
|
|
|
|
|
<!-- DN单号 -->
|
|
|
|
|
<u-form-item :label="$t('message.dn_OddNumbers')">
|
|
|
|
|
<u-input v-model="SweepCode" :disabled="true" />
|
|
|
|
|
<u-input v-model="order3" :disabled="true" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 已扫数量 -->
|
|
|
|
|
<u-form-item :label="$t('message.SweptQuantity')">
|
|
|
|
|
<u-input v-model="model.orderInInfo.stoAmount" :disabled="true" />
|
|
|
|
|
<u-input v-model="scanAmount" :disabled="true" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 已退数量 -->
|
|
|
|
|
<u-form-item :label="$t('message.QuantityReturned')">
|
|
|
|
|
<u-input v-model="model.orderInInfo.stoAmount" :disabled="true" />
|
|
|
|
|
<u-input v-model="retreatNum" :disabled="true" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 成品条码 -->
|
|
|
|
|
<u-form-item :label="$t('message.sweepBarCode')">
|
|
|
|
|
<u-search :placeholder="$t('message.barcode')" v-model="arr" @search="BackSweep" :focus="firstFocus" :show-action="false"></u-search>
|
|
|
|
|
<u-search :placeholder="$t('message.barcode')" v-model="barCode" @search="BackSweep" :focus="firstFocus" :show-action="false"></u-search>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-form>
|
|
|
|
|
<view class="bottom-bar">
|
|
|
|
@ -46,14 +46,44 @@ import { session } from '@/store/modules/session';
|
|
|
|
|
@Component
|
|
|
|
|
export default class stoOutboundDom extends BasePage {
|
|
|
|
|
model = model;
|
|
|
|
|
SweepCode: any = '';
|
|
|
|
|
order3: any = '';
|
|
|
|
|
firstFocus = false;
|
|
|
|
|
arr: any = '';
|
|
|
|
|
barCode: any = '';
|
|
|
|
|
scanAmount: number = 0;
|
|
|
|
|
retreatNum: number = 0;
|
|
|
|
|
onReady() {
|
|
|
|
|
let code = sessionStorage.getItem('SweepCode');
|
|
|
|
|
this.SweepCode = JSON.parse(code);
|
|
|
|
|
this.order3 = JSON.parse(code);
|
|
|
|
|
this.model.materielList.forEach((item: any) => {
|
|
|
|
|
this.scanAmount += parseFloat(item.outAmount);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
async BackSweep() {
|
|
|
|
|
if (!this.barCode) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.barcode') as string,
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let params = {
|
|
|
|
|
barCode: this.barCode,
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
|
factoryCode: session.factoryCode,
|
|
|
|
|
order3: this.order3,
|
|
|
|
|
keepBy: session.loginName,
|
|
|
|
|
};
|
|
|
|
|
await this.model.BackSweep(params);
|
|
|
|
|
if (this.model.code == '1') {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.succeeded') as string,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
this.barCode = '';
|
|
|
|
|
this.scanAmount -= 1;
|
|
|
|
|
this.retreatNum += 1;
|
|
|
|
|
}
|
|
|
|
|
BackSweep() {}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|