|
|
|
@ -8,24 +8,19 @@
|
|
|
|
|
<view class="right"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<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="order3" :disabled="true" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 已扫数量 -->
|
|
|
|
|
<u-form-item :label="$t('message.SweptQuantity')">
|
|
|
|
|
<u-input v-model="scanAmount" :disabled="true" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 已退数量 -->
|
|
|
|
|
<u-form-item :label="$t('message.QuantityReturned')">
|
|
|
|
|
<u-input v-model="retreatNum" :disabled="true" />
|
|
|
|
|
<!-- 单号查询 -->
|
|
|
|
|
<u-form-item :required="true" :label="$t('message.dn_OddNumbers')" prop="orderNo">
|
|
|
|
|
<u-search :placeholder="$t('message.Commission_tips1')" v-model.trim="form.orderNo" @search="query" :show-action="false"></u-search>
|
|
|
|
|
<view class="single-right">
|
|
|
|
|
<u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 成品条码 -->
|
|
|
|
|
<u-form-item :label="$t('message.sweepBarCode')">
|
|
|
|
|
<u-search :placeholder="$t('message.barcode')" v-model="barCode" @search="BackSweep" :focus="firstFocus" :show-action="false"></u-search>
|
|
|
|
|
<u-search :placeholder="$t('message.barcode')" v-model="barCode" @search="BackSweep" :show-action="false"></u-search>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-form>
|
|
|
|
|
<view class="bottom-bar">
|
|
|
|
|
<!-- <view class="bottom-bar">
|
|
|
|
|
<u-row class="button-bar">
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-button type="warning" @click="uni.navigateBack({ delta: 1 })">{{ $t('message.po_Return') }}</u-button>
|
|
|
|
@ -34,7 +29,7 @@
|
|
|
|
|
<u-button type="primary" @click="BackSweep">{{ $t('message.BackSweep') }}</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-row>
|
|
|
|
|
</view>
|
|
|
|
|
</view> -->
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -51,18 +46,32 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
barCode: any = '';
|
|
|
|
|
scanAmount = 0;
|
|
|
|
|
retreatNum = 0;
|
|
|
|
|
form = {
|
|
|
|
|
dockCode: null, // 月台类型code
|
|
|
|
|
dockName: null, // 月台类型name
|
|
|
|
|
orderNo: null,
|
|
|
|
|
qty: 0,
|
|
|
|
|
orderAmount: '',
|
|
|
|
|
productCode: '', // 物料类型name
|
|
|
|
|
productDescZh: '',
|
|
|
|
|
scanAmount: 0,
|
|
|
|
|
rowItem: '',
|
|
|
|
|
row: '',
|
|
|
|
|
barCode: '',
|
|
|
|
|
};
|
|
|
|
|
rowItemIndex: any = null;
|
|
|
|
|
async onReady() {
|
|
|
|
|
let code = uni.getStorageSync('SweepCode');
|
|
|
|
|
this.order3 = JSON.parse(code);
|
|
|
|
|
this.model.materielList.forEach((item: any) => {
|
|
|
|
|
this.scanAmount += parseFloat(item.outAmount);
|
|
|
|
|
});
|
|
|
|
|
let params = {
|
|
|
|
|
nxOutCode: this.order3,
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
|
factoryCode: session.factoryCode,
|
|
|
|
|
};
|
|
|
|
|
await this.model.queryAmount(params);
|
|
|
|
|
//let code = uni.getStorageSync('SweepCode');
|
|
|
|
|
// this.order3 = JSON.parse(code);
|
|
|
|
|
// this.model.materielList.forEach((item: any) => {
|
|
|
|
|
// this.scanAmount += parseFloat(item.outAmount);
|
|
|
|
|
// });
|
|
|
|
|
// let params = {
|
|
|
|
|
// nxOutCode: this.order3,
|
|
|
|
|
// loginName: session.loginName,
|
|
|
|
|
// factoryCode: session.factoryCode,
|
|
|
|
|
// };
|
|
|
|
|
// await this.model.queryAmount(params);
|
|
|
|
|
}
|
|
|
|
|
async BackSweep() {
|
|
|
|
|
if (!this.barCode) {
|
|
|
|
@ -73,7 +82,7 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
barCode: this.barCode,
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
|
factoryCode: session.factoryCode,
|
|
|
|
|
order3: this.order3,
|
|
|
|
|
order3: this.form.orderNo,
|
|
|
|
|
keepBy: session.loginName,
|
|
|
|
|
};
|
|
|
|
|
await this.model.BackSweep(params);
|
|
|
|
@ -89,6 +98,54 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
this.retreatNum += 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//单号回车查询
|
|
|
|
|
async query() {
|
|
|
|
|
if (!this.form.orderNo) {
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips1') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
await this.model.findProdInfoByDN(this.form.orderNo);
|
|
|
|
|
console.log('model.DNcode', this.model.DNcode);
|
|
|
|
|
if (this.model.DNcode == '1') {
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// title: this.$t('message.successful') as any,
|
|
|
|
|
// duration: 2000,
|
|
|
|
|
// image: '/static/icons/icon-51.png',
|
|
|
|
|
// });
|
|
|
|
|
if (this.rowItemIndex == null) {
|
|
|
|
|
this.form.productCode = this.model.materielList[0].materialCode;
|
|
|
|
|
this.form.productDescZh = this.model.materielList[0].materialDesc;
|
|
|
|
|
this.form.rowItem = this.model.materielList[0].materialCode;
|
|
|
|
|
this.form.row = this.model.materielList[0].rowItem;
|
|
|
|
|
this.form.orderAmount = this.model.materielList[0].orderAmount;
|
|
|
|
|
this.form.scanAmount = parseFloat(this.model.materielList[0].outAmount);
|
|
|
|
|
this.rowItemIndex = this.model.materielList[0].rowItem;
|
|
|
|
|
} else {
|
|
|
|
|
let rowIndex: any = null;
|
|
|
|
|
this.model.materielList.forEach((item: any, index) => {
|
|
|
|
|
if (item.rowItem == this.rowItemIndex) {
|
|
|
|
|
rowIndex = index;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (rowIndex == null) {
|
|
|
|
|
this.form.productCode = this.model.materielList[0].materialCode;
|
|
|
|
|
this.form.productDescZh = this.model.materielList[0].materialDesc;
|
|
|
|
|
this.form.rowItem = this.model.materielList[0].materialCode;
|
|
|
|
|
this.form.row = this.model.materielList[0].rowItem;
|
|
|
|
|
this.form.orderAmount = this.model.materielList[0].orderAmount;
|
|
|
|
|
this.form.scanAmount = parseFloat(this.model.materielList[0].outAmount);
|
|
|
|
|
this.rowItemIndex = this.model.materielList[0].rowItem;
|
|
|
|
|
} else {
|
|
|
|
|
this.form.productCode = this.model.materielList[rowIndex].materialCode;
|
|
|
|
|
this.form.productDescZh = this.model.materielList[rowIndex].materialDesc;
|
|
|
|
|
this.form.rowItem = this.model.materielList[rowIndex].materialCode;
|
|
|
|
|
this.form.row = this.model.materielList[rowIndex].rowItem;
|
|
|
|
|
this.form.orderAmount = this.model.materielList[rowIndex].orderAmount;
|
|
|
|
|
this.form.scanAmount = parseFloat(this.model.materielList[rowIndex].outAmount);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|