diff --git a/src/pages/product/outbound/stoOutbound/Back.vue b/src/pages/product/outbound/stoOutbound/Back.vue
index 3978c0c..6edd9bd 100644
--- a/src/pages/product/outbound/stoOutbound/Back.vue
+++ b/src/pages/product/outbound/stoOutbound/Back.vue
@@ -8,24 +8,19 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ $t('message.Query') }}
+
-
+
-
+
@@ -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);
+ }
+ }
+ }
+ }
}