From 1dd413a3912901890104b15b7f75a280c16fb2db Mon Sep 17 00:00:00 2001
From: anthonyywj2 <353682448@qq.com>
Date: Fri, 1 Jul 2022 15:39:28 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=AB=E7=A0=81=E5=8D=95?=
=?UTF-8?q?=E6=8D=AE=E6=97=B6=E6=97=A0=E5=BA=8F=E5=88=97=E5=8F=B7=E5=8F=AF?=
=?UTF-8?q?=E4=BB=A5=E7=9B=B4=E6=8E=A5=E8=BE=93=E5=85=A5=E6=95=B0=E9=87=8F?=
=?UTF-8?q?=EF=BC=8C=E4=B8=9A=E5=8A=A1=E5=8D=95=E6=8D=AE=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=88=86=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../business/stockOrderNewDistribution.vue | 83 +++++++++++++++++--
1 file changed, 75 insertions(+), 8 deletions(-)
diff --git a/src/views/business/stockOrderNewDistribution.vue b/src/views/business/stockOrderNewDistribution.vue
index e407919..32e88ad 100644
--- a/src/views/business/stockOrderNewDistribution.vue
+++ b/src/views/business/stockOrderNewDistribution.vue
@@ -136,6 +136,20 @@
}}
+
+
+
+ {{ item.name }}
+ {{ item.code }}
+
+
+
+
@@ -426,7 +440,19 @@ export default {
page: 1,
limit: 10,
},
- formData: {noInvOut: false, locStorageCode: null, invWarehouseCode: null},
+ formData: {
+ noInvOut: false,
+ locStorageCode: null,
+ invWarehouseCode: null,
+ fromSubInvCode: null,
+ billNo: null,
+ billdate: "",
+ customerId: store.getters.customerId,
+ billType: "",
+ type: null,
+ corpName: "",
+ corpId: "",
+ },
formRules: {
corpName: [
{required: true, message: "请输入供应商", trigger: "blur"}
@@ -448,6 +474,7 @@ export default {
codeArray: [],
fromOptions: [],
fromStorageOptions: [],
+ fromSubStorageOptions: [],
total: 0,
loading: false,
index: null,
@@ -587,9 +614,12 @@ export default {
});
},
storageChange(row) {
- console.log(row);
+ if (this.formData.fromSubInvCode != null)
+ this.formData.fromSubInvCode = "";
this.formData.corpId = row.code;
this.formData.corpName = row.name;
+ this.findSubStorageMethod();
+
},
getStorage(event) {
this.storageList = [];
@@ -630,6 +660,37 @@ export default {
.catch(() => {
});
},
+
+ findSubStorageMethod() {
+ let cQuery = {
+ pcode: this.formData.corpId,
+ filter: 2,
+ };
+ filterSubByInv(cQuery)
+ .then((response) => {
+ this.fromSubStorageOptions = response.data || [];
+ })
+ .catch(() => {
+ });
+ },
+
+ findSubInvByInv(invCode) {
+ this.subInvList = [];
+ let query = {
+ pcode: invCode
+ };
+ filterSubByInv(query)
+ .then((response) => {
+ this.subInvList = response.data || [];
+ if (this.subInvList != null && this.subInvList.length == 1) {
+ this.formData.invWarehouseCode = this.subInvList[0].code;
+ }
+ })
+ .catch(() => {
+ });
+ },
+
+
submitFunction(status) {
let tMessage = status === '501' ? '保存' : '提交';
this.loading = true;
@@ -1099,14 +1160,16 @@ export default {
// }
// });
// },
- getBusType(invCode) {
+ getBusType() {
let query = {
enabled: true,
- // code: invCode,
};
getLocalJoinByUser(query)
.then((response) => {
this.busTypes = response.data.list || [];
+ if (this.$isNotBlank(this.formData.billType)) {
+ this.curAction = this.getActionItem(this.formData.billType);
+ }
})
.catch(() => {
});
@@ -1207,10 +1270,6 @@ export default {
};
},
created() {
- this.getBusType("NOCODE");
- this.getStorage();
- this.codeArray = [];
- this.closeConfirmFunction(false);
if (this.$isNotBlank(this.idQuery.id)) {
this.query.limit = 100;
this.query.orderIdFk = this.idQuery.id;
@@ -1218,6 +1277,7 @@ export default {
this.orderEditor = true;
this.sValue = this.formData.corpName;
this.getStockOrderDetailList();
+
} else {
this.formData = {
billNo: null,
@@ -1236,6 +1296,13 @@ export default {
this.formData.billdate = new Date();
// this.generateBillNo();
}
+
+ this.getBusType();
+ this.getStorage();
+ this.findSubInvByInv();
+ this.findSubStorageMethod();
+ this.codeArray = [];
+ this.closeConfirmFunction(false);
},
};