Browse Source

对审核弹窗样式修改

Shan9312 2 months ago
parent
commit
07890302eb

+ 18 - 6
src/views/maintenance/subcontractingMainten/tabPage/tab1.vue

@@ -93,21 +93,21 @@
         <template slot-scope="{row}">
           <el-button   type="primary" size="mini" @click="form_see(row)">查看</el-button>
           <el-button v-if="istab1Edit && (row.status !== 0) && (row.status !== 1) "  type="success" size="mini" @click="form_edit(row)">编辑</el-button>
-          <el-button v-if="istab1Del && (row.status !== 1) "  type="danger" size="mini" @click="form_delete(row)">删除</el-button>
+          <el-button v-if="istab1Del && (row.status !== 1) && row.isPasturd "  type="danger" size="mini" @click="form_delete(row)">删除</el-button>
           <el-button  v-if="row.status !== 0  && row.status !== 1"  style="display:inline-block" type="success" size="mini" @click="form_submit(row)">提交</el-button>
           <!-- <el-button  v-if="row.isAcceptance == 0"  style="display:inline-block" type="warning" size="mini" @click="form_closeSubmit(row)">关单</el-button> -->
 
-          <el-button  v-if="istab1Shenhe1 && (row.status== 0) && (row.flowCompeleted == 1) "  style="display:inline-block" type="success" size="mini" @click="form_examine(row)">审核1</el-button>
+          <el-button  v-if="istab1Shenhe1 && (row.status== 0) && (row.flowCompeleted == 1) && row.isPasturd "  style="display:inline-block" type="success" size="mini" @click="form_examine(row)">审核1</el-button>
 
           <el-button v-else style="display:none" type="success" size="mini" @click="form_examine(row)">审核1</el-button>
 
-          <el-button   v-if="istab1Shenhe2 && (row.status== 0) && (row.flowCompeleted == 2 )" style="display:inline-block" type="success" size="mini" @click="form_examine2(row)">审核2</el-button>
+          <el-button   v-if="istab1Shenhe2 && (row.status== 0) && (row.flowCompeleted == 2 ) && row.isPasturd" style="display:inline-block" type="success" size="mini" @click="form_examine2(row)">审核2</el-button>
           <el-button v-else style="display:none" type="success" size="mini" @click="form_examine2(row)">审核2</el-button>
 
-          <el-button   v-if="istab1Shenhe3 && (row.status== 0) && (row.flowCompeleted == 4)" style="display:inline-block" type="success" size="mini" @click="form_examine3(row)">审核3</el-button>
+          <el-button   v-if="istab1Shenhe3 && (row.status== 0) && (row.flowCompeleted == 4) && row.isPasturd" style="display:inline-block" type="success" size="mini" @click="form_examine3(row)">审核3</el-button>
           <el-button v-else style="display:none" type="success" size="mini" @click="form_examine3(row)">审核3</el-button>
 
-          <el-button   v-if="istab1Shenhe4 && (row.status== 0) && (row.flowCompeleted == 6)  && (row.isAudit == 1)" style="display:inline-block" type="success" size="mini" @click="form_examine4(row)">审核4</el-button>
+          <el-button   v-if="istab1Shenhe4 && (row.status== 0) && (row.flowCompeleted == 6)  && (row.isAudit == 1) && row.isPasturd" style="display:inline-block" type="success" size="mini" @click="form_examine4(row)">审核4</el-button>
           <el-button v-else style="display:none" type="success" size="mini" @click="form_examine4(row)">审核4</el-button>
         </template>
       </el-table-column>
@@ -789,7 +789,19 @@ export default {
 
       GetDataByName(this.tableObj1.getdataListParm).then(response => {
         if (response.data.list !== null) {
-          this.tableObj1.list = response.data.list
+          this.tableObj1.list = response.data.list.map((item)=>{
+            // 如果当前牧场塞四, 且是塞二和塞三的牧场,则 可展示审核1 按钮,其他状态不变
+            // 1. 如果是自身牧场 按照之前的走,都是true
+            // 2. 如果是塞四:false
+
+             if(item.pastureId != Cookies.get('mainpasture') &&  item.pastureId != Cookies.get('pastureid') ) {
+                item.isPasturd = false
+             } else {
+                item.isPasturd = true;
+             }
+              return item
+
+          })
           this.tableObj1.pageNum = response.data.pageNum
           this.tableObj1.pageSize = response.data.pageSize
           this.tableObj1.total = response.data.total

+ 23 - 8
src/views/maintenance/subcontractingMainten/tabPage/tab2.vue

@@ -94,17 +94,17 @@
         <template slot-scope="{row}">
          <div v-if="row.reject != 1">
           <el-button type="primary" size="mini" @click="form_see(row)">查看</el-button>
-          <el-button  v-if="istab2Edit && row.isAcceptance == 0"  type="success" size="mini" @click="form_edit(row)">编辑</el-button>
-          <el-button v-if="istab2Del && row.isAcceptance == 0" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
-          <el-button  v-if="row.isAcceptance == 0"  style="display:inline-block" type="success" size="mini" @click="form_submit(row)">提交</el-button>
-          <el-button  v-if="istab2Close &&  row.isAcceptance == 0"  style="display:inline-block" type="warning" size="mini" @click="form_closeSubmit(row)">关单</el-button>
+          <el-button  v-if="istab2Edit && row.isAcceptance == 0 && row.isPasturdBtn"  type="success" size="mini" @click="form_edit(row)">编辑</el-button>
+          <el-button v-if="istab2Del && row.isAcceptance == 0 && row.isPasturdBtn" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
+          <el-button  v-if="row.isAcceptance == 0 && row.isPasturdBtn"  style="display:inline-block" type="success" size="mini" @click="form_submit(row)">提交</el-button>
+          <el-button  v-if="istab2Close &&  row.isAcceptance == 0 && row.isPasturdBtn"  style="display:inline-block" type="warning" size="mini" @click="form_closeSubmit(row)">关单</el-button>
           <el-button  v-if="istab2Shenhe1  && row.isAcceptance == 1 && (row.flowCompeleted == 1) && row.isPasturd "  style="display:inline-block" type="success" size="mini" @click="form_examine(row)">审核1</el-button>
           <el-button  v-if="istab2Shenhe2 && row.isAcceptance == 1 && (row.flowCompeleted == 2) && row.isPasturd "  style="display:inline-block" type="success" size="mini" @click="form_examine2(row)">审核2</el-button>
           <el-button  v-if="istab2Shenhe3 && row.isAcceptance == 1 && (row.flowCompeleted == 4) && row.isPasturd "  style="display:inline-block" type="success" size="mini" @click="form_examine3(row)">审核3</el-button>
          </div>
          <div v-else>
           <el-button type="primary" size="mini" @click="form_see(row)">查看</el-button>
-          <el-button v-if="istab2Del" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
+          <el-button v-if="istab2Del && row.isPasturdBtn" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
          </div>
           </template>
       </el-table-column>
@@ -961,6 +961,9 @@ export default {
         collectionSparePartsSee: '查看领用',
         collectionSparePartsSee1:'查看领用',
         collectionSparePartsCreate: '添加领用',
+        check1: "供应处长审核",
+        check2: "部门负责人审核",
+        check3: "场长审核"
       },
 
       istab2Add:[],
@@ -1118,6 +1121,16 @@ export default {
       GetDataByName(this.tableObj1.getdataListParm).then(response => {
         if (response.data.list !== null) {
           this.tableObj1.list = response.data.list.map((item) => {
+
+            // 1. 如果是自身牧场 按照之前的走,都是true
+            // 2. 如果是塞四:false
+
+             if(item.pastureId != Cookies.get('mainpasture') &&  item.pastureId != Cookies.get('pastureid') ) {
+                item.isPasturdBtn = false
+             } else {
+                item.isPasturdBtn = true;
+             }
+
             // 如果当前牧场塞四, 且是塞二和塞三的牧场,则 可展示审核1 按钮,其他状态不变
             // 1. 如果是自身牧场 按照之前的走,都是true
             // 2. 如果是塞四 且是审核1状态 也为true
@@ -2205,7 +2218,8 @@ export default {
         this.$set(this.examineTemp, 'status', 1)
         this.$set(this.examineTemp, 'workflowNote', '')
       }
-      this.dialogStatus = 'examine'
+      // this.dialogStatus = 'examine'
+      this.dialogStatus = 'check1'
       this.dialogFormVisible_Examine = true
       this.statueReason = false
     },
@@ -2269,7 +2283,8 @@ export default {
         this.$set(this.examineTemp, 'status', 1)
         this.$set(this.examineTemp, 'workflowNote', '')
       }
-      this.dialogStatus = 'examine'
+      // this.dialogStatus = 'examine'
+      this.dialogStatus = 'check2'
       this.dialogFormVisible_Examine = true
       this.statueReason = false
     },
@@ -2333,7 +2348,7 @@ export default {
         this.$set(this.examineTemp, 'status', 1)
         this.$set(this.examineTemp, 'workflowNote', '')
       }
-      this.dialogStatus = 'examine'
+      this.dialogStatus = 'check3'
       this.dialogFormVisible_Examine = true
       this.statueReason = false
     },