From a48ded866d223f581944ea9043df1b296b3425e3 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 21 十二月 2023 13:17:46 +0800
Subject: [PATCH] 	modified:   src/views/basic/company/index.vue 	modified:   src/views/basic/customizeparamtemplatetype/index.vue 	modified:   src/views/basic/division/index.vue 	modified:   src/views/basic/factory/index.vue 	modified:   src/views/basic/location/index.vue 	modified:   src/views/basic/param/index.vue 	modified:   src/views/basic/part/index.vue 	modified:   src/views/basic/post/index.vue 	modified:   src/views/basic/shift/index.vue 	modified:   src/views/basic/staff/index.vue 	modified:   src/views/basic/template/index.vue 	modified:   src/views/basic/warehouse/index.vue 	modified:   src/views/basic/workstation/index.vue 	modified:   src/views/plan/manufacturingorder/index.vue 	modified:   src/views/plan/masterproductionschedule/index.vue 	modified:   src/views/plan/operationtask/index.vue 	modified:   src/views/plan/productionschedul/index.vue 	modified:   src/views/quality/finishedProductInspection/index.vue 	modified:   src/views/quality/rawMaterial/index.vue 	modified:   src/views/technology/completeproductstructure/index.vue 	modified:   src/views/technology/document/index.vue 	modified:   src/views/technology/operation/index.vue 	modified:   src/views/technology/routing/index.vue 	modified:   src/views/technology/structure/index.vue 	modified:   src/views/warehouse/FinishedWarehousing/index.vue 	modified:   src/views/warehouse/changestock/index.vue 	modified:   src/views/warehouse/pallettransports/index.vue

---
 src/views/technology/structure/index.vue |   97 ++++++++++++++----------------------------------
 1 files changed, 29 insertions(+), 68 deletions(-)

diff --git a/src/views/technology/structure/index.vue b/src/views/technology/structure/index.vue
index 8ceba97..256c93c 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>
@@ -129,8 +97,8 @@
       customUpload: true,
       uploadInfo: {
         // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl
-        isShow: false,
-        url: '/mes/structure/uploadExt'
+        isShow: true,
+        url: '/mes/structure/uploadExcelPlus'
       },
       prelang: 'structure',
       options: {
@@ -262,30 +230,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: '鎿嶄綔',
@@ -326,7 +272,7 @@
       zhuangbeiUploadInfo: {
         // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl
         isShow: true,
-        url: '/mes/structure/uploadExt'
+        url: '/mes/structure/uploadExcelPlus'
       },
       zhuangbeifileList: [],
       shepinfileList: [],
@@ -345,6 +291,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 +321,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 +447,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