Ver código fonte

按钮状态

shihang 6 anos atrás
pai
commit
ac90133ecd

+ 17 - 11
src/dashoo.cn/frontend_web/src/components/oilsupplier/businesslist.vue

@@ -4,17 +4,20 @@
       <div slot="header" class="clearfix">
         <span style="font-weight: bold">分类</span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-right: 3px" @click="nextStep()">提交审批</el-button>
-          <el-button type="primary" size="mini" style="margin-right: 3px" @click="showDialog">添加</el-button>
+          <el-button type="primary" size="mini" style="margin-right: 3px" @click="nextStep()" v-if="canadd">提交审批
+          </el-button>
+          <el-button type="primary" size="mini" style="margin-right: 3px" @click="showDialog" v-if="canadd">添加
+          </el-button>
         </span>
         <!-- <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog">添加</el-button> -->
       </div>
       <el-table :data="businessList" 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)">编辑</el-button>
+            <el-button type="primary" plain size="mini" title="编辑" @click="openDialog(scope.row)" :disabled="!canadd">编辑
+            </el-button>
             <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px"
-              @click="deletedata(scope.row)">删除</el-button>
+              @click="deletedata(scope.row)" :disabled="!canadd">删除</el-button>
           </template>
         </el-table-column>
         <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
@@ -30,11 +33,11 @@
     <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="subfiledialog">添加</el-button>
+        <el-button style="float: right; padding: 3px 0" type="text" @click="subfiledialog" v-if="canadd">添加</el-button>
       </div>
-      <subfile-list ref="subfileList" :data="subfileList" :SupplierId="SupplierId" :SupplierCertId="SupplierCertId"
-        :SupplierTypeCode="SupplierTypeCode" :businessList="businessList" :BusinessForm="BusinessForm" height="360px"
-        style="margin-top: 20px">
+      <subfile-list ref="subfileList" :data.sync="subfileList" :SupplierId="SupplierId" :SupplierCertId="SupplierCertId"
+        :SupplierTypeCode="SupplierTypeCode" :businessList="businessList" :BusinessForm="BusinessForm" :canadd="canadd"
+        height="360px" style="margin-top: 20px">
       </subfile-list>
     </el-card>
 
@@ -141,10 +144,14 @@
       SupplierTypeCode: {
         type: String,
         default: '0'
-      }
+      },
+      canadd: {
+        type: Boolean,
+        default: false
+      },
     },
     created() {
-      // this.initData()
+      this.initData()
     },
     computed: {
       ...mapGetters({
@@ -241,7 +248,6 @@
               _this.BusinessForm.Id = res.data.item + ''
               _this.visible = false
               _this.initData()
-              _this.$refs["subfileList"].initData()
             } else {
               _this.$message({
                 type: 'warning',

+ 11 - 5
src/dashoo.cn/frontend_web/src/components/oilsupplier/equipmentlist.vue

@@ -3,9 +3,10 @@
     <el-table :data="equipmentList" 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)">编辑</el-button>
-          <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px" @click="deletedata(scope.row)">
-            删除</el-button>
+          <el-button type="primary" plain size="mini" title="编辑" @click="openDialog(scope.row)" :disabled="!canadd">
+            编辑</el-button>
+          <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px" @click="deletedata(scope.row)"
+            :disabled="!canadd">删除</el-button>
         </template>
       </el-table-column>
       <el-table-column prop="MainEquipment" label="设备名称" show-overflow-tooltip></el-table-column>
@@ -67,13 +68,17 @@
         type: String,
         default: '0'
       },
+      canadd: {
+        type: Boolean,
+        default: false
+      },
       visible: {
         type: Boolean,
         default: false
       },
     },
     created() {
-      //this.initData()
+      this.initData()
     },
     computed: {
       ...mapGetters({
@@ -100,10 +105,11 @@
       }
     },
     methods: {
-      getvalue(serviceId, SupplierTypeCode, certId) {
+      getvalue(serviceId, SupplierTypeCode, certId, status) {
         // this.SupplierId = serviceId
         this.SupplierTypeCode = SupplierTypeCode
         this.SupplierCertId = certId
+        this.Status = status
       },
       initData() {
         let _this = this

+ 9 - 4
src/dashoo.cn/frontend_web/src/components/oilsupplier/patentlist.vue

@@ -3,9 +3,10 @@
     <el-table :data="patentList" border :stripe="true">
       <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)">编辑</el-button>
-          <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px" @click="deletedata(scope.row)">
-            删除</el-button>
+          <el-button type="primary" plain size="mini" title="编辑" @click="openDialog(scope.row)" :disabled="!canadd">编辑
+          </el-button>
+          <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px" @click="deletedata(scope.row)"
+            :disabled="!canadd">删除</el-button>
         </template>
       </el-table-column>
       <el-table-column prop="Name" label="名称" show-overflow-tooltip>
@@ -80,13 +81,17 @@
         type: String,
         default: '0'
       },
+      canadd: {
+        type: Boolean,
+        default: false
+      },
       visible: {
         type: Boolean,
         default: false
       },
     },
     created() {
-      //this.initData()
+      this.initData()
     },
     computed: {
       ...mapGetters({

+ 9 - 4
src/dashoo.cn/frontend_web/src/components/oilsupplier/performancelist.vue

@@ -3,9 +3,10 @@
     <el-table :data="performanceList" 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)">编辑</el-button>
-          <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px" @click="deletedata(scope.row)">
-            删除</el-button>
+          <el-button type="primary" plain size="mini" title="编辑" @click="openDialog(scope.row)" :disabled="!canadd">编辑
+          </el-button>
+          <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px" @click="deletedata(scope.row)"
+            :disabled="!canadd">删除</el-button>
         </template>
       </el-table-column>
       <el-table-column prop="ProjectName" label="设备名称" show-overflow-tooltip></el-table-column>
@@ -104,13 +105,17 @@
         type: String,
         default: '0'
       },
+      canadd: {
+        type: Boolean,
+        default: false
+      },
       visible: {
         type: Boolean,
         default: false
       },
     },
     created() {
-      //this.initData()
+      this.initData()
     },
     computed: {
       ...mapGetters({

+ 8 - 3
src/dashoo.cn/frontend_web/src/components/oilsupplier/subfilelist.vue

@@ -3,9 +3,10 @@
     <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)">编辑</el-button>
+          <el-button type="primary" plain size="mini" title="编辑" @click="openDialog(scope.row)" :disabled="!canadd">编辑
+          </el-button>
           <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px"
-            :disabled="scope.row.FileType == '1'" @click="deletedata(scope.row)">删除</el-button>
+            :disabled="scope.row.FileType == '1' || !canadd" @click="deletedata(scope.row)">删除</el-button>
         </template>
       </el-table-column>
       <el-table-column prop="NeedFileType" label="文件分类" show-overflow-tooltip></el-table-column>
@@ -120,6 +121,10 @@
         type: Array,
         default: []
       },
+      canadd: {
+        type: Boolean,
+        default: false
+      },
       BusinessForm: {}
     },
     created() {},
@@ -166,7 +171,7 @@
       }
     },
     methods: {
-      getvalue(serviceId,SupplierTypeCode,certId){
+      getvalue(serviceId, SupplierTypeCode, certId) {
         this.SupplierId = serviceId
         this.SupplierTypeCode = SupplierTypeCode
         this.initData()

+ 9 - 4
src/dashoo.cn/frontend_web/src/components/oilsupplier/winninglist.vue

@@ -3,9 +3,10 @@
     <el-table :data="winningList" border :stripe="true">
       <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)">编辑</el-button>
-          <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px" @click="deletedata(scope.row)">
-            删除</el-button>
+          <el-button type="primary" plain size="mini" title="编辑" @click="openDialog(scope.row)" :disabled="!canadd">编辑
+          </el-button>
+          <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px" @click="deletedata(scope.row)"
+            :disabled="!canadd">删除</el-button>
         </template>
       </el-table-column>
       <el-table-column prop="AwardName" label="奖项名称" show-overflow-tooltip></el-table-column>
@@ -71,13 +72,17 @@
         type: String,
         default: '0'
       },
+      canadd: {
+        type: Boolean,
+        default: false
+      },
       visible: {
         type: Boolean,
         default: false
       },
     },
     created() {
-      //this.initData()
+      this.initData()
     },
     computed: {
       ...mapGetters({

+ 35 - 24
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -35,7 +35,8 @@
             <div slot="header" class="clearfix">
               <span>供方基本信息表</span>
               <span style="float: right;">
-                <el-button type="primary" size="mini" @click="saveEntity">保存基本信息</el-button>
+                <el-button type="primary" size="mini" @click="saveEntity" v-if="formDataCert.Status == 0">保存基本信息
+                </el-button>
               </span>
             </div>
             <tech-info ref="TechInfo" :formData.sync="formData" :dictData.sync="dictData" :authUser="authUser"
@@ -49,7 +50,8 @@
             <div slot="header" class="clearfix">
               <span>企业人员结构情况</span>
               <span style="float: right;">
-                <el-button type="primary" size="mini" @click="updateNumberEntity">保存人员结构情况</el-button>
+                <el-button type="primary" size="mini" @click="updateNumberEntity" v-if="formDataCert.Status == 0">
+                  保存人员结构情况</el-button>
               </span>
             </div>
 
@@ -131,48 +133,52 @@
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>企业主要装备情况</span>
-              <el-button style="float: right; padding: 3px 0" type="text" @click="equipmentdialog">添加</el-button>
+              <el-button style="float: right; padding: 3px 0" type="text" @click="equipmentdialog"
+                v-if="formDataCert.Status == 0">添加</el-button>
             </div>
-            <equipment-list ref="equipmentList" :data="equipmentList" :SupplierCertId="certId"
-              :SupplierTypeCode="classId" height="360px" style="margin-top: 20px"></equipment-list>
+            <equipment-list ref="equipmentList" :data.sync="equipmentList" :SupplierCertId="certId"
+              :SupplierTypeCode="classId" :canadd="add_flat" height="360px" style="margin-top: 20px"></equipment-list>
           </el-card>
 
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>近三年主要工程业绩</span>
-              <el-button style="float: right; padding: 3px 0" type="text" @click="performancedialog">添加</el-button>
+              <el-button style="float: right; padding: 3px 0" type="text" @click="performancedialog"
+                v-if="formDataCert.Status == 0">添加</el-button>
             </div>
-            <performance-list ref="performanceList" :data="performanceList" :SupplierCertId="certId"
-              :SupplierTypeCode="classId" height="360px" style="margin-top: 20px"></performance-list>
+            <performance-list ref="performanceList" :data.sync="performanceList" :SupplierCertId="certId"
+              :SupplierTypeCode="classId" :canadd="add_flat" height="360px" style="margin-top: 20px"></performance-list>
           </el-card>
 
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>拥有专利、专有技术及工法</span>
-              <el-button style="float: right; padding: 3px 0" type="text" @click="patentdialog">添加</el-button>
+              <el-button style="float: right; padding: 3px 0" type="text" @click="patentdialog"
+                v-if="formDataCert.Status == 0">添加</el-button>
             </div>
-            <patent-list ref="patentList" :data="patentList" :SupplierCertId="certId" :SupplierTypeCode="classId"
-              height="360px" style="margin-top: 20px">
-            </patent-list>
+            <patent-list ref="patentList" :data.sync="patentList" :SupplierCertId="certId" :SupplierTypeCode="classId"
+              :canadd="add_flat" height="360px" style="margin-top: 20px"></patent-list>
           </el-card>
 
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>近三年获得省部级及以上主要技术、管理成果、获奖项目</span>
-              <el-button style="float: right; padding: 3px 0" type="text" @click="winningdialog">添加</el-button>
+              <el-button style="float: right; padding: 3px 0" type="text" @click="winningdialog"
+                v-if="formDataCert.Status == 0">添加</el-button>
             </div>
-            <winning-list ref="winningList" :data="winningList" :SupplierCertId="certId" :SupplierTypeCode="classId"
-              height="360px" style="margin-top: 20px">
+            <winning-list ref="winningList" :data.sync="winningList" :SupplierCertId="certId" :SupplierTypeCode="classId"
+              :canadd="add_flat" height="360px" style="margin-top: 20px">
             </winning-list>
           </el-card>
         </el-tab-pane>
 
         <el-tab-pane label="企业资质" :disabled="!certId">
-          <business-list ref="businessList" :data="businessList" :SupplierCertId="certId" :SupplierId="serviceId"
-            :SupplierTypeCode="classId" @close="AuditEntity" height="360px" style="margin-top: 20px"></business-list>
+          <business-list ref="businessList" :data.sync="businessList" :SupplierCertId="certId" :SupplierId="serviceId"
+            :SupplierTypeCode="classId" :canadd="add_flat" @close="AuditEntity" height="360px" style="margin-top: 20px">
+          </business-list>
         </el-tab-pane>
 
-        <el-tab-pane label="审批流程">
+        <el-tab-pane label="审批流程" v-if="formDataCert.Status > 0">
           <el-card class="box-card" style="height: 800px">
             <div slot="header" class="clearfix">
               <span>审批流程</span>
@@ -185,7 +191,7 @@
             <wf-history ref="WfHistory" :entryinfo="entrydetail"></wf-history>
           </el-card>
         </el-tab-pane>
-        <el-tab-pane label="供方缴费">
+        <el-tab-pane label="供方缴费" v-if="formDataCert.Status == 5">
         </el-tab-pane>
       </el-tabs>
     </el-card>
@@ -338,6 +344,7 @@
           Status: 0,
           WorkflowId: ''
         },
+        add_flat: true,
         entrydetail: {
           process: 'oil_supplier_apply',
           business: '',
@@ -473,6 +480,9 @@
             this.formDataCert.DesignerTotal = this.formData.DesignerTotal
             this.formDataCert.SkillerTotal = this.formData.SkillerTotal
             this.formDataCert.Status = this.formData.Status
+            if (this.formData.Status > 0) {
+              this.add_flat = false
+            }
             this.formDataCert.WorkflowId = this.formData.WorkflowId
             this.$refs["TechInfo"].CityAry = []
             this.$refs["TechInfo"].CityAry.push(this.formData.Province)
@@ -483,6 +493,7 @@
             this.$refs["TechInfo"].LinkCityAry.push(this.formData.LinkCity)
             this.$refs["TechInfo"].LinkCityAry.push(this.formData.LinkStreet)
             this.$refs["TechInfo"].UnitRelationAry = []
+
             if (this.formData.SpecTypeCode.length > 0) {
               this.$refs["TechInfo"].UnitRelationAry = this.formData.SpecTypeCode.split(',')
             }
@@ -492,11 +503,11 @@
             if (this.certId && this.formDataCert.WorkflowId) {
               this.$refs['WfHistory'].getHistoryTask() /*刷新工作流*/
             }
-            this.$refs["equipmentList"].getvalue(this.formData.Id,this.formData.SupplierTypeCode,this.certId)
-            this.$refs["performanceList"].getvalue(this.formData.Id,this.formData.SupplierTypeCode,this.certId)
-            this.$refs["patentList"].getvalue(this.formData.Id,this.formData.SupplierTypeCode,this.certId)
-            this.$refs["winningList"].getvalue(this.formData.Id,this.formData.SupplierTypeCode,this.certId)
-            this.$refs["businessList"].getvalue(this.formData.Id,this.formData.SupplierTypeCode,this.certId)
+            this.$refs["equipmentList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs["performanceList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs["patentList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs["winningList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs["businessList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
           }).catch(err => {
             console.error(err)
           });