diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts
index 3ec707e..9830668 100644
--- a/src/i18n/lang/cn.ts
+++ b/src/i18n/lang/cn.ts
@@ -393,6 +393,7 @@ export default {
Warehouse_Tip8: '请输入成本中心',
Warehouse_Tip9: '操作成功',
DocumentNumber: '文件号',
+ Posting: '过账',
fileNumber: '请输入文件号',
Warehouse_Tip10: '请选择sap库存地点',
Warehouse_Tip11: '该单号不存在或已经操作完成',
@@ -410,5 +411,6 @@ export default {
AppendMateriel3: '不能大于需求数量,请重新输入',
AppendMateriel4: '请选择正确的库位',
AppendMateriel5: '请先选择一个物料',
+ demandQuantity: '总数量大于需求数量',
},
};
diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts
index 84ecaa9..0b95391 100644
--- a/src/i18n/lang/en.ts
+++ b/src/i18n/lang/en.ts
@@ -332,6 +332,7 @@ export default {
product_item4: 'SFG Door Body Online',
product_item5: 'SFG Box Body Online',
fileNumber: 'Please enter the file number',
+ Posting: 'Posting',
//成品下线
product_Location: 'Loc',
@@ -413,5 +414,6 @@ export default {
AppendMateriel3: 'Cannot be greater than the required quantity, please re-enter',
AppendMateriel4: 'Please select the correct location',
AppendMateriel5: 'Please select a material first',
+ demandQuantity: 'The total quantity is greater than the demand quantity',
},
};
diff --git a/src/pages/product/outbound/stoOutbound/DN-delivergoods.vue b/src/pages/product/outbound/stoOutbound/DN-delivergoods.vue
index a85a222..fcaf892 100644
--- a/src/pages/product/outbound/stoOutbound/DN-delivergoods.vue
+++ b/src/pages/product/outbound/stoOutbound/DN-delivergoods.vue
@@ -23,7 +23,7 @@
-
+
@@ -66,7 +66,7 @@
-->
- {{ $t('message.po_Deliver') }}
+ {{ $t('message.Posting') }}
@@ -146,16 +146,14 @@ export default class stoOutboundDom extends BasePage {
async onReady() {
this.$form.setRules(this.rules);
model.queryReturningTypeList();
+ this.form.orderNo = JSON.parse(sessionStorage.getItem('SweepCode'));
+ sessionStorage.removeItem('SweepCode');
+ if (!this.form.orderNo) {
+ return;
+ } else {
+ this.query();
+ }
}
- //去掉页面表格,没有了onCheck方法
- // onCheck(e: any) {
- // console.log('e.data', e.data);
- // this.selectMaterielList = [];
- // e.data.forEach((line: any) => {
- // const { lineData: item } = line;
- // this.selectMaterielList.push(item);
- // });
- // }
back() {
this.form.barCode = '';
this.model.orderInInfo.stoAmount = 0;
@@ -251,88 +249,89 @@ export default class stoOutboundDom extends BasePage {
* 条码回车
*/
//扫码也要改,扫码
- onSubmit() {
- this.$form.validate(async (valid: boolean) => {
- // if (this.form.productCode.slice(0, 9) != this.form.barCode.slice(0, 9)) {
- // uni.showToast({
- // icon: "none",
- // title: this.$t("message.product_Tip5") as string,
- // });
- // return;
- // }
- if (parseInt(this.form.orderAmount) <= this.form.scanAmount) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_Tip6') as string,
- });
- return;
- }
- // let list = [
- // {
- // order3: this.form.orderNo,
- // productCode: this.form.productCode,
- // productDescZh: this.form.productDescZh,
- // barCode: this.form.barCode,
- // dockCode: this.form.dockCode,
- // dockName: this.form.dockName,
- // // orderType: 3,
- // orderType: 4,
- // type: 0,
- // keepBy: session.loginName as string,
- // loginName: session.loginName as string,
- // },
- // ];
- if (valid) {
- let list: any = {
- productCode: this.form.productCode,
- barcode: this.form.barCode,
- loginName: session.loginName,
- factoryCode: session.factoryCode,
- };
- const res = await this.model.getMaterialByCode(list);
- console.log('fanhui', res);
- // if (res.barcode) {
- // // this.materialList.push(res);
- // this.form.scanAmount = res.scanAmount;
- // }
- //guoshuang 注掉
- if (this.materialList.length == 0) {
- await this.materialList.push(res);
- this.form.scanAmount += 1;
- this.$table.onCheckAllTap();
- } else {
- let flag = 0;
- for (let i = 0; i < this.materialList.length; i++) {
- console.log('11111', this.materialList[i]);
- if (this.form.barCode == this.materialList[i].barcode) {
- flag = 1;
- break;
- }
- }
- if (flag == 0) {
- await this.$table.onCheckAllTap();
- await this.materialList.push(res);
- this.form.scanAmount += 1;
- this.$table.onCheckAllTap();
- } else {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.product_Tip7') as string,
- });
- }
- }
- }
- });
- const item = {
- ...this.form,
- barCode: String(''),
- };
- this.firstFocus = false;
- setTimeout(() => {
- this.form = item;
- this.firstFocus = true;
- }, 0);
- }
+ // onSubmit() {
+ // this.$form.validate(async (valid: boolean) => {
+ // // if (this.form.productCode.slice(0, 9) != this.form.barCode.slice(0, 9)) {
+ // // uni.showToast({
+ // // icon: "none",
+ // // title: this.$t("message.product_Tip5") as string,
+ // // });
+ // // return;
+ // // }
+ // if (parseInt(this.form.orderAmount) <= this.form.scanAmount) {
+ // uni.showToast({
+ // icon: 'none',
+ // title: this.$t('message.product_Tip6') as string,
+ // });
+ // return;
+ // }
+ // // let list = [
+ // // {
+ // // order3: this.form.orderNo,
+ // // productCode: this.form.productCode,
+ // // productDescZh: this.form.productDescZh,
+ // // barCode: this.form.barCode,
+ // // dockCode: this.form.dockCode,
+ // // dockName: this.form.dockName,
+ // // // orderType: 3,
+ // // orderType: 4,
+ // // type: 0,
+ // // keepBy: session.loginName as string,
+ // // loginName: session.loginName as string,
+ // // },
+ // // ];
+ // if (valid) {
+ // let list: any = {
+ // productCode: this.form.productCode,
+ // barcode: this.form.barCode,
+ // loginName: session.loginName,
+ // factoryCode: session.factoryCode,
+ // };
+ // const res = await this.model.getMaterialByCode(list);
+ // console.log('fanhui', res);
+ // // if (res.barcode) {
+ // // // this.materialList.push(res);
+ // // this.form.scanAmount = res.scanAmount;
+ // // }
+ // //guoshuang 注掉
+ // if (this.materialList.length == 0) {
+ // await this.materialList.push(res);
+ // this.form.scanAmount += 1;
+ // this.$table.onCheckAllTap();
+ // } else {
+ // let flag = 0;
+ // for (let i = 0; i < this.materialList.length; i++) {
+ // console.log('11111', this.materialList[i]);
+ // if (this.form.barCode == this.materialList[i].barcode) {
+ // flag = 1;
+ // break;
+ // }
+ // }
+ // if (flag == 0) {
+ // await this.$table.onCheckAllTap();
+ // await this.materialList.push(res);
+ // this.form.scanAmount += 1;
+ // this.$table.onCheckAllTap();
+ // } else {
+ // uni.showToast({
+ // icon: 'none',
+ // title: this.$t('message.product_Tip7') as string,
+ // });
+ // }
+ // }
+ // }
+ // });
+ // const item = {
+ // ...this.form,
+ // barCode: String(''),
+ // };
+ // this.firstFocus = false;
+ // setTimeout(() => {
+ // this.form = item;
+ // this.firstFocus = true;
+ // }, 0);
+ // }
+ Posting() {}
onOk() {
// if (this.selectMaterielList.length == 0) {
// uni.showToast({ icon: 'none', title: this.$t('message.product_Tip2') as string });
@@ -391,7 +390,7 @@ export default class stoOutboundDom extends BasePage {
uni.showToast({ icon: 'success', title: 'success' });
}
});
- this.form.orderNo = '';
+ // this.form.orderNo = '';
this.form.barCode = '';
this.form.productCode = '';
model.orderInInfo.stoAmount = 0;
diff --git a/src/pages/raw/commission/goOut/index.vue b/src/pages/raw/commission/goOut/index.vue
index be7c83a..5b1c134 100644
--- a/src/pages/raw/commission/goOut/index.vue
+++ b/src/pages/raw/commission/goOut/index.vue
@@ -192,19 +192,37 @@ export default class dnReceiptDom extends BasePage {
});
return;
}
- if (parseFloat(this.nowAmount) > this.every.orderAmount) {
- uni.showToast({
- icon: 'none',
- title: this.$t('message.Commission_tips4') as any,
+ let num: number = parseFloat(this.nowAmount);
+ this.list.forEach((item: any) => {
+ num += parseFloat(item.nowAmount);
+ });
+ if (num > parseFloat(this.every.orderAmount)) {
+ uni.showModal({
+ title: this.$t('message.Pi_tip') as any,
+ content: this.$t('message.demandQuantity') as any,
+ cancelText: this.$t('message.Cancel') as any,
+ confirmText: this.$t('message.workArea_Confirm') as any,
+ success: (res) => {
+ if (res.confirm) {
+ let arr = {
+ wlCode: this.wlCode.label,
+ nowAmount: this.nowAmount,
+ };
+ this.list.push(arr);
+ this.business();
+ } else if (res.cancel) {
+ return;
+ }
+ },
});
- return;
+ } else {
+ let arr = {
+ wlCode: this.wlCode.label,
+ nowAmount: this.nowAmount,
+ };
+ this.list.push(arr);
+ this.business();
}
- let arr = {
- wlCode: this.wlCode.label,
- nowAmount: this.nowAmount,
- };
- this.list.push(arr);
- this.business();
}
deleteItem(index: any) {
this.list.splice(index, 1);