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));