From 786a139a5855dfec193dc3e7b794127ed3e62fe2 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期五, 12 四月 2024 15:26:45 +0800 Subject: [PATCH] 优化 --- src/views/plan/customerorder/index.vue | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue index a9f5500..a1667e2 100644 --- a/src/views/plan/customerorder/index.vue +++ b/src/views/plan/customerorder/index.vue @@ -414,6 +414,7 @@ selectTime: null, exportTime: null, }, + expandRowKeys: null, dataRule: { exportTime: [ { required: true, message: '瀵煎嚭鏃ユ湡涓嶈兘涓虹┖', trigger: 'change' }, @@ -1011,6 +1012,7 @@ created() { // this.getManufactureAttrs() this.getTitles() + if (this.permissions.plan_customerorder_add) { this.table.toolbar.push({ text: '鏂板閿�鍞鍗�', type: 'primary', @@ -1018,6 +1020,7 @@ disabled: false, permitArr: [], }) + } if (this.permissions.customerorder_from_otc) { this.table.toolbar.push({ text: '鑾峰彇閿�鍞鍗�', @@ -1064,6 +1067,7 @@ fun: this.downloadProductionScheduling, }) } + if(this.permissions.plan_relevance_order){ this.table.toolbar.push({ text: '鍏宠仈璁㈠崟', disabled: false, @@ -1071,6 +1075,7 @@ fun: this.interrelatedOrderFun, permitArr: [], }) + } if (this.permissions.customerorder_create_masterplan) { this.table.toolbar.push({ text: '涓荤敓浜ц鍒�', @@ -1195,8 +1200,12 @@ this.getData() }, - getData() { - this.$refs.customerOrderTable.getDataList() + async getData() { + await this.$refs.customerOrderTable.getDataList() + this.$refs.customerOrderTable.tableData.forEach((ele) => { + this.$refs.customerOrderTable.$refs.lmesTable.toggleRowExpansion(ele,false) + }) + this.expandRowKeys && this.$refs.customerOrderTable.$refs.lmesTable.toggleRowExpansion(this.expandRowKeys,true) }, // 鑾峰彇鏁版嵁鍒楄〃鍘婚櫎宸插畬鎴愮姸鎬佺殑 handleDataList(command) { @@ -1276,6 +1285,11 @@ this.$refs.addSampleForm.init(row ? row.contractNo : null) }) } + this.$refs.customerOrderTable.tableData.forEach((item) => { + if(item.children&&item.children.find(m=>m.id==row.id)){ + this.expandRowKeys = item; + } + }) }, // 鏂板鏍峰搧璁㈠崟 addSampleCustomerOrder() { -- Gitblit v1.9.3