From b1dbfd44f6bafaa4d24e0c1c3a0f7ae548e77f60 Mon Sep 17 00:00:00 2001 From: 王震 <10952869+daywangzhen@user.noreply.gitee.com> Date: 星期三, 27 十二月 2023 17:41:06 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before --- src/views/technology/structure/index.vue | 168 ++++++++++++++------------------------------------------ 1 files changed, 42 insertions(+), 126 deletions(-) diff --git a/src/views/technology/structure/index.vue b/src/views/technology/structure/index.vue index d3a6693..3704dd8 100644 --- a/src/views/technology/structure/index.vue +++ b/src/views/technology/structure/index.vue @@ -6,92 +6,18 @@ @handleSelectionChange="handleSelectionChange" @customUploadPage="structureImport" :uploadInfo="uploadInfo" - :customUpload="customUpload" :prelang="prelang" :options="options" :ajaxFun="ajaxFun" ref="structureTable" > <template #toolbar> - <!-- <el-button type="primary" :loading="ifsSynsLoading" @click="syncIfs" - >ERP鍚屾</el-button - > --> + <el-button type="primary" @click="addOrUpdateHandle" + v-if="permissions.technology_structure_add">鏂板</el-button> + <el-button type="primary" @click="copyStructure" + v-if="permissions.technology_structure_copy">澶嶅埗</el-button> </template> </ttable> - <!-- 寮圭獥, 鏂板 / 淇敼 --> - <!--<table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getData"></table-form>--> - <el-dialog - title="瀵煎叆" - :visible.sync="importStructureVisible" - width="50%" - > - <span> - <div style="display:flex;justify-content:space-around;"> - <div> - <el-upload - style="margin-left:8px;display: inline;" - class="upload-demo" - drag - :headers="headers" - :action="zhuangbeiUploadInfo.url" - :beforeUpload="beforeAvatarUpload" - :limit="1" - :show-file-list="false" - :file-list="zhuangbeifileList" - :data="zhuangbeiUploadInfo.uploadData" - :on-success="zhuangbeiFileSuccessUploadScan" - :on-error="handleError" - accept=".xlsx,.xls,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" - :auto-upload="true" - ref="zhuangbeiUploadScan" - multiple - > - <i class="el-icon-upload"></i> - <div class="el-upload__text"><em>瀵煎叆瑁呭鏁版嵁</em></div> - <div class="el-upload__tip" slot="tip"> - 鍙兘涓婁紶xlsx/xls鏂囦欢锛屼笖涓嶈秴杩�10M<el-button - type="text" - style="font-size:12px;" - @click="downZhuangbeiDataTemplate" - >涓嬭浇妯℃澘</el-button - > - </div> - </el-upload> - </div> - <div> - <el-upload - style="margin-left:8px;display: inline;" - class="upload-demo" - drag - :headers="headers" - :action="shepinUploadInfo.url" - :beforeUpload="beforeAvatarUpload" - :limit="1" - :show-file-list="false" - :file-list="shepinfileList" - :data="shepinUploadInfo.uploadData" - :on-success="shepinFileSuccessUploadScan" - :on-error="handleError" - accept=".xlsx,.xls,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" - :auto-upload="true" - ref="shepinUploadScan" - multiple - > - <i class="el-icon-upload"></i> - <div class="el-upload__text"><em>瀵煎叆灏勯鏁版嵁</em></div> - <div class="el-upload__tip" slot="tip"> - 鍙兘涓婁紶xlsx/xls鏂囦欢锛屼笖涓嶈秴杩�10M<el-button - type="text" - style="font-size:12px;" - @click="downShepinDataTemplate" - >涓嬭浇妯℃澘</el-button - > - </div> - </el-upload> - </div> - </div> - </span> - </el-dialog> </basic-container> </div> </template> @@ -130,7 +56,9 @@ uploadInfo: { // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl isShow: true, - url: '/mes/structure/uploadExt' + fileName: '浜у搧缁撴瀯妯℃澘', + download: true, + url: '/mes/structure/uploadExcelPlus' }, prelang: 'structure', options: { @@ -185,19 +113,19 @@ searchInfoType: 'text' }, // 缁撴瀯绫诲瀷 - { - minWidth: '120', - prop: 'bomTypeDb', - label: '缁撴瀯绫诲瀷', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'select', - formatter: this.formatBomTypeDbType, - optList: () => { - return this.bomTypeDbOptions - } - }, + // { + // minWidth: '120', + // prop: 'bomTypeDb', + // label: '缁撴瀯绫诲瀷', + // sort: true, + // isTrue: true, + // isSearch: true, + // searchInfoType: 'select', + // formatter: this.formatBomTypeDbType, + // optList: () => { + // return this.bomTypeDbOptions + // } + // }, // 鏇夸唬 // { // minWidth: '120', @@ -235,7 +163,7 @@ } }, // 鏄惁涓洪粯璁ょ粨鏋� - { + /* { minWidth: '120', prop: 'master', label: '榛樿缁撴瀯', @@ -249,7 +177,7 @@ formatter: (row, column, cellValue) => { return cellValue == true ? '鏄�' : '鍚�' } - }, + }, */ // 鎻忚堪 { minWidth: '120', @@ -262,30 +190,8 @@ noShowTip: false } ], - toolbar: [ - { - text: '鏂板', - // icon: 'el-icon-plus', - type: 'primary', - fun: this.addOrUpdateHandle, - disabled: false, - permitArr: [] - }, - { - text: '澶嶅埗', - fun: this.copyStructure, - disabled: false, - permitArr: [] - } - ], - operator: [ - { - text: '鍒犻櫎', - type: 'text', - size: 'small', - fun: this.deleteHandle - } - ], + toolbar: [], + operator: null, operatorConfig: { fixed: 'right', label: '鎿嶄綔', @@ -323,11 +229,6 @@ isShow: true, url: '/mes/structure/upload' }, - zhuangbeiUploadInfo: { - // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl - isShow: true, - url: '/mes/structure/uploadExt' - }, zhuangbeifileList: [], shepinfileList: [], ifsSynsLoading: false @@ -345,6 +246,17 @@ this.getData() }, created() { + if(this.permissions.technology_structure_del){ + this.table.operator = [ + { + text: '鍒犻櫎', + type: 'text', + size: 'small', + fun: this.deleteHandle + } + ] + } + this.uploadInfo.isShow = this.permissions.technology_structure_upload this.table.column.find((e) => e.label === '宸插悓姝ヨ嚦ERP').isTrue = false this.getBomTypeDbOptions() }, @@ -364,11 +276,14 @@ }, // 鏂板 / 淇敼 addOrUpdateHandle(row) { + if(!this.permissions.technology_structure_edit && row.id!=null){ + this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�") + return + } this.$router.push({ name: 'singleStructureForm', params: { id: row == null ? null : row.id } }) - // this.$router.push({name:"structureForm",query:{id:row==null?null:row.id}}) }, // 鍒犻櫎 deleteHandle(row) { @@ -487,8 +402,9 @@ this.$message.warning(response.msg) } else { this.$message({ - message: '涓婁紶鎴愬姛', - type: 'success' + message: response.data, + type: 'success', + dangerouslyUseHTMLString: true }) this.getData() } -- Gitblit v1.9.3