From 9e540346a9ce40537ba8ad7c55f7a27ee690e82f Mon Sep 17 00:00:00 2001 From: xuxiaoming Date: Mon, 27 Dec 2021 10:12:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BB=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E4=BF=9D=E5=AD=98=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demandPlanning/articleDemand/index.vue | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/index.vue b/src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/index.vue index f9662d1..cd8a1b6 100644 --- a/src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/index.vue +++ b/src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/index.vue @@ -195,6 +195,7 @@ export default { selectKey: "", tableWidth: "calc(100% - 15px)", promptMessage:"", + editKeyList:[], }; }, created() { @@ -347,6 +348,9 @@ export default { }, // 编辑航 editRow(data) { + + if( !this.editKeyList.includes(this.selectKey) ) this.editKeyList.push(this.selectKey) + console.log('%cindex.vue line:353 this.editKeyList', 'color: #007acc;', this.editKeyList); this.editKey = this.selectKey; this.editField = data; }, @@ -418,6 +422,19 @@ export default { // this.$message({ type: "error", message: "访问失败" }); }); }, + getEditTableDataJson(){ + + let editMapList = JSON.parse(JSON.stringify(this.TableData)).filter(item => this.editKeyList.includes(item.key)) + editMapList.forEach(item => { + item["AP_ArticleDemand-ArtId"] = item.key; + delete item.index; + delete item.show; + delete item.key; + delete item.Label; + }); + console.log('%cindex.vue line:435 editMapList', 'color: #007acc;', editMapList); + return JSON.stringify(editMapList); + }, // 保存数据 saveDemandData() { // if (!this.editField) { @@ -428,7 +445,7 @@ export default { let param = {}; param.customerid = this.customerId; param.artid = this.artId; - param.maplist = this.getTableDataJson(); + param.maplist = this.getEditTableDataJson(); this.INIT_evaluationSecondResourceListData(); this.INIT_evaluationMainResourceData(); this.SET_evaluationMainResourceLoading(true); @@ -438,6 +455,8 @@ export default { this.SET_evaluationSecondResourceListData(data["ArticleSecondResourceMpsGroupLst"] || []); this.SET_evaluationSecondResourceLoading(false); this.SET_evaluationMainResourceLoading(false); + this.handleQuery() + this.editKeyList = [] this.$message({ type: "success", message: "保存成功" }); }).catch(() => { this.SET_evaluationSecondResourceLoading(false);