From 741bd55bedb8b901356d924030fad8977b780092 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Mon, 9 Dec 2024 16:05:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/materialfile/component/addMater.vue | 12 +++++++++++- src/views/materialfile/index.vue | 18 ++++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/views/materialfile/component/addMater.vue b/src/views/materialfile/component/addMater.vue index 02ea244..fadf4b2 100644 --- a/src/views/materialfile/component/addMater.vue +++ b/src/views/materialfile/component/addMater.vue @@ -85,7 +85,7 @@ 所在仓库:
- + { + if(e===item.id){ + this.form.suozaicangku = item.cangkumingcheng + this.form.suozaicangku_id = item.id + } + }) + } }, submit() { // return diff --git a/src/views/materialfile/index.vue b/src/views/materialfile/index.vue index 8c8bb2c..1da030f 100644 --- a/src/views/materialfile/index.vue +++ b/src/views/materialfile/index.vue @@ -334,11 +334,21 @@ table_name: this.customForm.tableName })) if (res.data) { - let headers = this.importForm.map(i => { - return { - key: i.field, - title: i.name + let headers = this.table.map(i => { + if(i.type==='index'){ + + }else if(i.prop==='materialstorages_details.cangkumingcheng'){ + return { + key: 'suozaicangku', + title: i.label + } + }else{ + return { + key: i.prop, + title: i.label + } } + }) const data = res.data.map(row => headers.map(header => row[header.key])); data.unshift(headers.map(header => header.title));