From c807040fe243a4e36aa73dd8962791d6ee4ff7f0 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 19 十二月 2023 16:41:08 +0800
Subject: [PATCH] 	modified:   src/views/technology/operation/index.vue 	modified:   src/views/technology/routing/routing-form.vue 	modified:   src/views/technology/structure/index.vue 	modified:   vue.config.js

---
 src/views/technology/structure/index.vue |  146 ++++++++++++++++++------------------------------
 1 files changed, 54 insertions(+), 92 deletions(-)

diff --git a/src/views/technology/structure/index.vue b/src/views/technology/structure/index.vue
index 0538871..17fed50 100644
--- a/src/views/technology/structure/index.vue
+++ b/src/views/technology/structure/index.vue
@@ -13,13 +13,13 @@
         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"
@@ -47,44 +47,12 @@
                 multiple
               >
                 <i class="el-icon-upload"></i>
-                <div class="el-upload__text"><em>瀵煎叆瑁呭鏁版嵁</em></div>
+                <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
+                    ></el-button
                   >
                 </div>
               </el-upload>
@@ -130,7 +98,7 @@
       uploadInfo: {
         // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl
         isShow: true,
-        url: '/mes/structure/uploadExt'
+        url: '/mes/structure/uploadExcelPlus'
       },
       prelang: 'structure',
       options: {
@@ -185,39 +153,39 @@
             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',
-            prop: 'alternativeNo',
-            label: '鏇夸唬',
-            sort: true,
-            isTrue: true,
-            isSearch: true,
-            searchInfoType: 'text'
-          },
+          // {
+          //   minWidth: '120',
+          //   prop: 'alternativeNo',
+          //   label: '鏇夸唬',
+          //   sort: true,
+          //   isTrue: true,
+          //   isSearch: true,
+          //   searchInfoType: 'text'
+          // },
           // 鏇夸唬鎻忚堪
-          {
-            minWidth: '120',
-            prop: 'alternativeDesc',
-            label: '鏇夸唬鎻忚堪',
-            sort: true,
-            isTrue: true,
-            isSearch: true,
-            searchInfoType: 'text'
-          },
+          // {
+          //   minWidth: '120',
+          //   prop: 'alternativeDesc',
+          //   label: '鏇夸唬鎻忚堪',
+          //   sort: true,
+          //   isTrue: true,
+          //   isSearch: true,
+          //   searchInfoType: 'text'
+          // },
           // 鏄惁宸插悓姝ヨ嚦ERP
           {
             minWidth: '120',
@@ -235,7 +203,7 @@
             }
           },
           // 鏄惁涓洪粯璁ょ粨鏋�
-          {
+          /* {
             minWidth: '120',
             prop: 'master',
             label: '榛樿缁撴瀯',
@@ -249,7 +217,7 @@
             formatter: (row, column, cellValue) => {
               return cellValue == true ? '鏄�' : '鍚�'
             }
-          },
+          }, */
           // 鎻忚堪
           {
             minWidth: '120',
@@ -262,22 +230,7 @@
             noShowTip: false
           }
         ],
-        toolbar: [
-          {
-            text: '鏂板',
-            // icon: 'el-icon-plus',
-            type: 'primary',
-            fun: this.addOrUpdateHandle,
-            disabled: false,
-            permitArr: []
-          },
-          {
-            text: '澶嶅埗',
-            fun: this.copyStructure,
-            disabled: false,
-            permitArr: []
-          }
-        ],
+        toolbar: [],
         operator: [
           {
             text: '鍒犻櫎',
@@ -326,7 +279,7 @@
       zhuangbeiUploadInfo: {
         // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl
         isShow: true,
-        url: '/mes/structure/uploadExt'
+        url: '/mes/structure/uploadExcelPlus'
       },
       zhuangbeifileList: [],
       shepinfileList: [],
@@ -345,6 +298,7 @@
     this.getData()
   },
   created() {
+    this.uploadInfo.isShow = this.permissions.technology_structure_upload
     this.table.column.find((e) => e.label === '宸插悓姝ヨ嚦ERP').isTrue = false
     this.getBomTypeDbOptions()
   },
@@ -364,14 +318,21 @@
     },
     // 鏂板 / 淇敼
     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) {
+      if(!this.permissions.technology_structure_del){
+        this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
+        return
+      }
       this.$confirm('鏄惁纭鍒犻櫎ID涓�' + row.id, '鎻愮ず', {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',
@@ -487,8 +448,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