Selaa lähdekoodia

权限问题

Signed-off-by: lijunqing <lijunqing@dashoo.cn>
lijunqing 6 vuotta sitten
vanhempi
commit
96a2491305

+ 15 - 11
src/dashoo.cn/frontend_web/src/components/oilsupplier/subfilelist.vue

@@ -23,15 +23,15 @@
     <el-card class="box-card" style="margin-top: 10px;">
       <div slot="header" class="clearfix">
         <span style="font-weight: bold"> 企业资质</span>
-        <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog" v-if="canadd">添加</el-button>
+        <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog" v-if="canadd || newcanadd">添加</el-button>
       </div>
       <el-table :data="subfileList" border>
         <el-table-column label="操作" width="150" align="center" fixed>
           <template slot-scope="scope">
-            <el-button type="primary" plain size="mini" title="上传" @click="openDialog(scope.row)" :disabled="!canadd">上传
+            <el-button type="primary" plain size="mini" title="上传" @click="openDialog(scope.row)" :disabled="!canadd && !newcanadd">上传
             </el-button>
             <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px"
-              :disabled="scope.row.FileType == '1' || !canadd" @click="deletedata(scope.row)">删除</el-button>
+              :disabled="(scope.row.FileType == '1' || !canadd) && !newcanadd" @click="deletedata(scope.row)">删除</el-button>
           </template>
         </el-table-column>
         <el-table-column prop="NeedFileType" label="资质名称" show-overflow-tooltip></el-table-column>
@@ -142,6 +142,10 @@
         type: Boolean,
         default: false
       },
+      newcanadd: {
+        type: Boolean,
+        default: false
+      },
       flag: {
         type: String
       }
@@ -363,7 +367,7 @@
       },
       deletedata (val) {
         let _this = this
-      _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+        _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
@@ -376,20 +380,20 @@
                     type: 'success',
                     message: response.data.message
                   })
-                _this.initData()
-              } else {
+                  _this.initData()
+                } else {
                   _this.$message({
                     type: 'warning',
                     message: response.data.message
                   })
-              }
+                }
               })
               .catch(function (error) {
                 console.log(error)
-            })
-        })
+              })
+          })
           .catch(() => {})
-    },
+      },
       nextStep () {
         if (this.businessList && this.businessList.length > 0) {
           if (this.subfileList && this.subfileList.length > 0) {
@@ -481,7 +485,7 @@
         if (isLt512K) {
           this.$message.error('上传文件大小不能小于 512KB!')
           return false
-        }*/
+        } */
         if (this.SubfileForm.NeedFileType != this.yasuoname) {
           let isLt50m = file.size / 1024 / 1024 / 5 < 1
           if (!isLt50m) {

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/basisedit.vue

@@ -180,7 +180,7 @@
             height="360px" style="margin-top: 20px" :candelete="delete_flat" :newcanadd="newadd_flat"></business-list>
         </el-tab-pane>
         <el-tab-pane label="企业资质" :disabled="!certId">
-          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="add_flat" @close="selectAuditOrg"
+          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="add_flat" @close="selectAuditOrg" :newcanadd="newadd_flat"
             height="360px" style="margin-top: 20px"></subfile-list>
         </el-tab-pane>
 

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/goodsedit.vue

@@ -181,7 +181,7 @@
             style="margin-top: 20px" :candelete="delete_flat"></goods-list>
         </el-tab-pane>
         <el-tab-pane label="企业资质" :disabled="!certId">
-          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="add_flat" @close="selectAuditOrg"
+          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="add_flat" @close="selectAuditOrg" :newcanadd="newadd_flat"
             height="360px" style="margin-top: 20px"></subfile-list>
         </el-tab-pane>
 

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/techedit.vue

@@ -188,7 +188,7 @@
             style="margin-top: 20px" :candelete="delete_flat"></tech-list>
         </el-tab-pane>
         <el-tab-pane name="4" label="企业资质" :disabled="!certId">
-          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="add_flat" @close="selectAuditOrg"
+          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="add_flat" @close="selectAuditOrg" :newcanadd="newadd_flat"
             height="360px" style="margin-top: 20px"></subfile-list>
         </el-tab-pane>