From 9a0e4f1641f41a3dc1df4453ad416fb1522bd2ea Mon Sep 17 00:00:00 2001 From: 王震 <10952869+daywangzhen@user.noreply.gitee.com> Date: 星期四, 18 一月 2024 17:30:49 +0800 Subject: [PATCH] modified: src/page/wel.vue modified: src/views/quality/rawMaterial/rawMaterial-form.vue --- src/views/basic/location/index.vue | 37 +++++++++++++++++++++---------------- 1 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/views/basic/location/index.vue b/src/views/basic/location/index.vue index e102c95..2212e67 100644 --- a/src/views/basic/location/index.vue +++ b/src/views/basic/location/index.vue @@ -11,7 +11,10 @@ :ajaxFun="ajaxFun" ref="locationTable" > - <template #toolbar></template> + <template #toolbar> + <el-button type="primary" @click="addOrUpdateHandle" + v-if="permissions.basic_location_add">鏂板</el-button> + </template> </ttable> <!-- 寮圭獥, 鏂板 / 淇敼 --> <table-form @@ -206,21 +209,8 @@ searchInfoType: 'text' } */ ], - toolbar: [ - { - text: '鏂板', - type: 'primary', - fun: this.addOrUpdateHandle - } - ], - operator: [ - { - text: '鍒犻櫎', - type: 'text', - size: 'small', - fun: this.deleteHandle - } - ], + toolbar: [], + operator: null, operatorConfig: { fixed: 'right', label: '鎿嶄綔', @@ -246,6 +236,16 @@ TableForm }, created() { + if(this.permissions.basic_location_del){ + this.table.operator = [ + { + text: '鍒犻櫎', + type: 'text', + size: 'small', + fun: this.deleteHandle + } + ] + } this.getLocTypeCache('warehouse_type') // 鑾峰彇瀹氭椂浠诲姟杩愯鏃剁姸鎬� this.initWarehouseSelect() // this.getIFSLocationCache() @@ -351,6 +351,10 @@ }, // 鏂板 / 淇敼 addOrUpdateHandle(row) { + if(!this.permissions.basic_location_edit && row.id!=null){ + this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�") + return + } this.addOrUpdateVisible = true this.$nextTick(() => { this.$refs.addOrUpdate.init(row == null ? null : row.id) @@ -358,6 +362,7 @@ }, // 鍒犻櫎 deleteHandle(row) { + this.$confirm('鏄惁纭鍒犻櫎搴撲綅鍙蜂负' + row.locNo, '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', -- Gitblit v1.9.3