Browse Source

申购&合单&赛4

Shan9312 2 weeks ago
parent
commit
7eb9c6d477
2 changed files with 61 additions and 37 deletions
  1. 2 2
      .env.development
  2. 59 35
      src/views/custom/subscribe/index.vue

+ 2 - 2
.env.development

@@ -11,8 +11,8 @@ ENV = 'development'
 
 
 
 
 # 线上测试
 # 线上测试
-# VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
-VUE_APP_BASE_API = 'http://192.168.1.233:8082/'
+VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
+# VUE_APP_BASE_API = 'http://192.168.1.233:8082/'
 
 
 # VUE_APP_BASE_API = 'http://36.155.144.182:18090/'
 # VUE_APP_BASE_API = 'http://36.155.144.182:18090/'
 
 

+ 59 - 35
src/views/custom/subscribe/index.vue

@@ -250,7 +250,7 @@
             v-if="
             v-if="
               isSubscribeExamineKG &&
               isSubscribeExamineKG &&
                 row.statue == 2 &&
                 row.statue == 2 &&
-                row.departmentName == '挤奶处'
+               (row.departmentName == '挤奶处' &&  row.isPasturd)
             "
             "
             style="display: inline-block"
             style="display: inline-block"
             type="success"
             type="success"
@@ -260,8 +260,8 @@
           <el-button
           <el-button
             v-if="
             v-if="
               isSubscribeExamineKG &&
               isSubscribeExamineKG &&
-                row.statue == 2 &&
-                row.departmentName !== '挤奶处'
+               row.statue == 2 &&
+              (row.departmentName !== '挤奶处' &&  row.isPasturd)
             "
             "
             style="display: inline-block"
             style="display: inline-block"
             type="success"
             type="success"
@@ -271,8 +271,8 @@
           <el-button
           <el-button
             v-if="
             v-if="
               isSubscribeExamineKG &&
               isSubscribeExamineKG &&
-                row.statue == 2 &&
-                row.departmentName !== '挤奶处'
+              row.statue == 2 &&
+              (row.departmentName !== '挤奶处' &&  row.isPasturd)
             "
             "
             style="display: inline-block"
             style="display: inline-block"
             type="success"
             type="success"
@@ -282,7 +282,7 @@
 
 
           <!-- 设备 -->
           <!-- 设备 -->
           <el-button
           <el-button
-            v-if="isSubscribeExamineSBZG && row.statue == 3"
+            v-if="isSubscribeExamineSBZG && row.statue == 3 && !row.isPasturd"
             style="display: inline-block"
             style="display: inline-block"
             type="success"
             type="success"
             size="mini"
             size="mini"
@@ -291,7 +291,7 @@
 
 
           <!-- 供应商主管 -->
           <!-- 供应商主管 -->
           <el-button
           <el-button
-            v-if="isSubscribeExamineZG && row.statue == 9"
+            v-if="isSubscribeExamineZG && row.statue == 9 && row.isPasturd"
             style="display: inline-block"
             style="display: inline-block"
             type="success"
             type="success"
             size="mini"
             size="mini"
@@ -304,7 +304,7 @@
               sdchangzhangshenhe &&
               sdchangzhangshenhe &&
                 row.statue == 5 &&
                 row.statue == 5 &&
                 row.departmentName == '挤奶处' &&
                 row.departmentName == '挤奶处' &&
-                row.examine == 1
+                row.examine == 1  && !row.isPasturd
             "
             "
             style="display: inline-block"
             style="display: inline-block"
             type="success"
             type="success"
@@ -315,7 +315,7 @@
             v-else-if="
             v-else-if="
               sdchangzhangshenhe &&
               sdchangzhangshenhe &&
                 row.statue == 5 &&
                 row.statue == 5 &&
-                row.departmentName !== '挤奶处'
+                row.departmentName !== '挤奶处'  && !row.isPasturd
             "
             "
             style="display: inline-block"
             style="display: inline-block"
             type="success"
             type="success"
@@ -325,7 +325,7 @@
 
 
           <!-- 采购 -->
           <!-- 采购 -->
           <el-button
           <el-button
-            v-if="isSubscribeExamineCG && (row.statue == 11 || row.statue == 15)"
+            v-if="isSubscribeExamineCG && (row.statue == 11 || row.statue == 15) && row.isPasturd"
             style="display: inline-block"
             style="display: inline-block"
             type="success"
             type="success"
             size="mini"
             size="mini"
@@ -335,7 +335,7 @@
           <!-- 财务 -->
           <!-- 财务 -->
           <el-button
           <el-button
             v-if="
             v-if="
-              isSubscribeExamineCW && row.purchase_type == 1 && row.statue == 7
+              isSubscribeExamineCW && row.purchase_type == 1 && row.statue == 7  && !row.isPasturd
             "
             "
             style="display: inline-block"
             style="display: inline-block"
             type="success"
             type="success"
@@ -347,7 +347,7 @@
             v-if="
             v-if="
               isSubscribeExamineNT &&
               isSubscribeExamineNT &&
                 row.departmentName == '挤奶处' &&
                 row.departmentName == '挤奶处' &&
-                ((row.examine !== 1 && row.statue == 5) || row.statue == 11)
+                ((row.examine !== 1 && row.statue == 5) || row.statue == 11)  && !row.isPasturd
             "
             "
             style="display: inline-block"
             style="display: inline-block"
             type="success"
             type="success"
@@ -1583,8 +1583,8 @@
                 <el-button
                 <el-button
                   v-if="
                   v-if="
                     isSubscribeExamineKG &&
                     isSubscribeExamineKG &&
-                      seeTemp.statue == 2 &&
-                      seeTemp.departmentName == '挤奶处'
+                    seeTemp.statue == 2 &&
+                    (seeTemp.departmentName == '挤奶处' && seeTemp.isPasturd)
                   "
                   "
                   type="success"
                   type="success"
                   style="display: inline-block"
                   style="display: inline-block"
@@ -1592,14 +1592,14 @@
                 >审核</el-button>
                 >审核</el-button>
                 <!-- 设备 -->
                 <!-- 设备 -->
                 <el-button
                 <el-button
-                  v-if="isSubscribeExamineSBZG && seeTemp.statue == 3"
+                  v-if="isSubscribeExamineSBZG && seeTemp.statue == 3 && !seeTemp.isPasturd"
                   type="success"
                   type="success"
                   style="display: inline-block"
                   style="display: inline-block"
                   @click="handleExamine2(row)"
                   @click="handleExamine2(row)"
                 >审核</el-button>
                 >审核</el-button>
                 <!-- 供应商主管 -->
                 <!-- 供应商主管 -->
                 <el-button
                 <el-button
-                  v-if="isSubscribeExamineZG && seeTemp.statue == 9"
+                  v-if="isSubscribeExamineZG && seeTemp.statue == 9 && seeTemp.isPasturd"
                   type="success"
                   type="success"
                   style="display: inline-block"
                   style="display: inline-block"
                   @click="handleExamine3(row)"
                   @click="handleExamine3(row)"
@@ -1611,7 +1611,7 @@
                     sdchangzhangshenhe &&
                     sdchangzhangshenhe &&
                       seeTemp.statue == 5 &&
                       seeTemp.statue == 5 &&
                       seeTemp.departmentName == '挤奶处' &&
                       seeTemp.departmentName == '挤奶处' &&
-                      seeTemp.examine == 1
+                      seeTemp.examine == 1 && seeTemp.isPasturd
                   "
                   "
                   type="success"
                   type="success"
                   style="display: inline-block"
                   style="display: inline-block"
@@ -1621,7 +1621,7 @@
                   v-else-if="
                   v-else-if="
                     sdchangzhangshenhe &&
                     sdchangzhangshenhe &&
                       seeTemp.statue == 5 &&
                       seeTemp.statue == 5 &&
-                      seeTemp.departmentName !== '挤奶处'
+                      seeTemp.departmentName !== '挤奶处' &&  !seeTemp.isPasturd
                   "
                   "
                   type="success"
                   type="success"
                   style="display: inline-block"
                   style="display: inline-block"
@@ -1630,7 +1630,7 @@
 
 
                 <!-- 采购 -->
                 <!-- 采购 -->
                 <el-button
                 <el-button
-                  v-if="isSubscribeExamineCG && (seeTemp.statue == 11 || seeTemp.statue == 15)"
+                  v-if="isSubscribeExamineCG && (seeTemp.statue == 11 || seeTemp.statue == 15) && seeTemp.isPasturd"
                   type="success"
                   type="success"
                   style="display: inline-block"
                   style="display: inline-block"
                   @click="handleExamine5(row)"
                   @click="handleExamine5(row)"
@@ -1641,7 +1641,7 @@
                   v-if="
                   v-if="
                     isSubscribeExamineCW &&
                     isSubscribeExamineCW &&
                       seeTemp.purchase_type == 1 &&
                       seeTemp.purchase_type == 1 &&
-                      seeTemp.statue == 7
+                      seeTemp.statue == 7 &&  !seeTemp.isPasturd
                   "
                   "
                   style="display: inline-block"
                   style="display: inline-block"
                   type="success"
                   type="success"
@@ -1654,7 +1654,7 @@
                     isSubscribeExamineNT &&
                     isSubscribeExamineNT &&
                       seeTemp.departmentName == '挤奶处' &&
                       seeTemp.departmentName == '挤奶处' &&
                       ((seeTemp.examine !== 1 && seeTemp.statue == 5) ||
                       ((seeTemp.examine !== 1 && seeTemp.statue == 5) ||
-                      seeTemp.statue == 11)
+                      seeTemp.statue == 11)  && !seeTemp.isPasturd
                   "
                   "
                   style="display: inline-block"
                   style="display: inline-block"
                   type="success"
                   type="success"
@@ -2424,7 +2424,7 @@
                   v-if="
                   v-if="
                     isSubscribeExamineKG &&
                     isSubscribeExamineKG &&
                       seeTemp.statue == 2 &&
                       seeTemp.statue == 2 &&
-                      seeTemp.departmentName == '挤奶处'
+                      (seeTemp.departmentName == '挤奶处' &&  seeTemp.isPasturd)
                   "
                   "
                   type="success"
                   type="success"
                   style="display: inline-block"
                   style="display: inline-block"
@@ -2432,14 +2432,14 @@
                 >审核</el-button>
                 >审核</el-button>
                 <!-- 设备 -->
                 <!-- 设备 -->
                 <el-button
                 <el-button
-                  v-if="isSubscribeExamineSBZG && seeTemp.statue == 3"
+                  v-if="isSubscribeExamineSBZG && seeTemp.statue == 3 && !seeTemp.isPasturd"
                   type="success"
                   type="success"
                   style="display: inline-block"
                   style="display: inline-block"
                   @click="handleExamine2(row)"
                   @click="handleExamine2(row)"
                 >审核</el-button>
                 >审核</el-button>
                 <!-- 供应商主管 -->
                 <!-- 供应商主管 -->
                 <el-button
                 <el-button
-                  v-if="isSubscribeExamineZG && seeTemp.statue == 9"
+                  v-if="isSubscribeExamineZG && seeTemp.statue == 9 && seeTemp.isPasturd"
                   type="success"
                   type="success"
                   style="display: inline-block"
                   style="display: inline-block"
                   @click="handleExamine3(row)"
                   @click="handleExamine3(row)"
@@ -2451,7 +2451,7 @@
                     sdchangzhangshenhe &&
                     sdchangzhangshenhe &&
                       seeTemp.statue == 5 &&
                       seeTemp.statue == 5 &&
                       seeTemp.departmentName == '挤奶处' &&
                       seeTemp.departmentName == '挤奶处' &&
-                      seeTemp.examine == 1
+                      seeTemp.examine == 1  && !seeTemp.isPasturd
                   "
                   "
                   type="success"
                   type="success"
                   style="display: inline-block"
                   style="display: inline-block"
@@ -2461,7 +2461,7 @@
                   v-else-if="
                   v-else-if="
                     sdchangzhangshenhe &&
                     sdchangzhangshenhe &&
                       seeTemp.statue == 5 &&
                       seeTemp.statue == 5 &&
-                      seeTemp.departmentName !== '挤奶处'
+                      seeTemp.departmentName !== '挤奶处'  && !seeTemp.isPasturd
                   "
                   "
                   type="success"
                   type="success"
                   style="display: inline-block"
                   style="display: inline-block"
@@ -2470,17 +2470,17 @@
 
 
                 <!-- 采购 -->
                 <!-- 采购 -->
                 <el-button
                 <el-button
-                  v-if="isSubscribeExamineCG && (seeTemp.statue == 11 || seeTemp.statue == 15)"
+                  v-if="isSubscribeExamineCG && (seeTemp.statue == 11 || seeTemp.statue == 15) && seeTemp.isPasturd"
                   type="success"
                   type="success"
                   style="display: inline-block"
                   style="display: inline-block"
                   @click="handleExamine5(row)"
                   @click="handleExamine5(row)"
-                >审核</el-button>
+                >审核tt</el-button>
                 <!-- 财务 -->
                 <!-- 财务 -->
                 <el-button
                 <el-button
                   v-if="
                   v-if="
                     isSubscribeExamineCW &&
                     isSubscribeExamineCW &&
                       seeTemp.purchase_type == 1 &&
                       seeTemp.purchase_type == 1 &&
-                      seeTemp.statue == 7
+                      seeTemp.statue == 7  && !seeTemp.isPasturd
                   "
                   "
                   style="display: inline-block"
                   style="display: inline-block"
                   type="success"
                   type="success"
@@ -2492,7 +2492,7 @@
                     isSubscribeExamineNT &&
                     isSubscribeExamineNT &&
                       seeTemp.departmentName == '挤奶处' &&
                       seeTemp.departmentName == '挤奶处' &&
                       ((seeTemp.examine !== 1 && seeTemp.statue == 5) ||
                       ((seeTemp.examine !== 1 && seeTemp.statue == 5) ||
-                      seeTemp.statue == 11)
+                      seeTemp.statue == 11)  && !seeTemp.isPasturd
                   "
                   "
                   style="display: inline-block"
                   style="display: inline-block"
                   type="success"
                   type="success"
@@ -2778,7 +2778,8 @@ export default {
         parammaps: {}
         parammaps: {}
       },
       },
       BrandList: [],
       BrandList: [],
-      isDepartmentId: false // 部门是挤奶处且点击新增按钮
+      isDepartmentId: false ,// 部门是挤奶处且点击新增按钮
+      isPasturd: false,
     }
     }
   },
   },
 
 
@@ -2789,13 +2790,14 @@ export default {
       name: 'getUserPCButtons',
       name: 'getUserPCButtons',
       parammaps: { jwt_username: Cookies.get('name') }
       parammaps: { jwt_username: Cookies.get('name') }
     }).then((response) => {
     }).then((response) => {
-      that.buttons = response.data.list
+      that.buttons = response.data.list;
       that.get_auto_buttons()
       that.get_auto_buttons()
     })
     })
     this.get_select_list()
     this.get_select_list()
     // this.get_table_data()
     // this.get_table_data()
     this.getPendingList()
     this.getPendingList()
     this.getProviderList()
     this.getProviderList()
+    console.log(this.$store.state.user,'user')
   },
   },
 
 
   methods: {
   methods: {
@@ -2874,6 +2876,7 @@ export default {
         SubscribeExamineKG
         SubscribeExamineKG
       )
       )
       this.isSubscribeExamineKG = isSubscribeExamineKG
       this.isSubscribeExamineKG = isSubscribeExamineKG
+     console.log( this.isSubscribeExamineKG,'SubscribeExamineKGSubscribeExamineKG')
       // 设备主管审核
       // 设备主管审核
       const SubscribeExamineSBZG = 'customs:subscribe:examineSBZG'
       const SubscribeExamineSBZG = 'customs:subscribe:examineSBZG'
       const isSubscribeExamineSBZG = checkButtons(
       const isSubscribeExamineSBZG = checkButtons(
@@ -2982,14 +2985,25 @@ export default {
       GetDataByName(this.getdataListParm).then((response) => {
       GetDataByName(this.getdataListParm).then((response) => {
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           console.log('table数据', response.data.list)
           console.log('table数据', response.data.list)
-          this.list = response.data.list
+          this.list = response.data.list.map((item) => {
+              // 如果当前登陆者是订单的负责人,则展示审核按钮,否则不展示
+              // 如果不是赛四 不可库管审核
+              // 如果是设备 可审核
+            if (item.pastureId != Cookies.get('pastureid')) {
+              item.isPasturd = true
+            } else {
+              item.isPasturd = false
+            }
+            return item;
+          })
+
           this.pageNum = response.data.pageNum
           this.pageNum = response.data.pageNum
           this.pageSize = response.data.pageSize
           this.pageSize = response.data.pageSize
         } else {
         } else {
           this.list = []
           this.list = []
         }
         }
         this.total = response.data.total
         this.total = response.data.total
-
+          console.log(this.list,'list-----')
         setTimeout(() => {
         setTimeout(() => {
           this.listLoading = false
           this.listLoading = false
         }, 100)
         }, 100)
@@ -3971,6 +3985,7 @@ export default {
     // 查看
     // 查看
     form_see(row) {
     form_see(row) {
       // 查看/特殊申购
       // 查看/特殊申购
+      console.log(row,'查查看')
       if (row.purchase_type == 1 || row.purchase_type == 3) {
       if (row.purchase_type == 1 || row.purchase_type == 3) {
         this.textMap.see = '特殊申购'
         this.textMap.see = '特殊申购'
       } else {
       } else {
@@ -3979,14 +3994,23 @@ export default {
       this.dialogStatus = 'see'
       this.dialogStatus = 'see'
       // this.dialogFormVisibleSee = true
       // this.dialogFormVisibleSee = true
       this.dialogFormVisibleSee1 = true
       this.dialogFormVisibleSee1 = true
-      this.seeTemp = Object.assign({}, row)
+
       this.seeTemp.purchaseType = String(row.purchase_type)
       this.seeTemp.purchaseType = String(row.purchase_type)
       console.log('查看上方数据(从table读取)', this.seeTemp)
       console.log('查看上方数据(从table读取)', this.seeTemp)
+
       this.listSee = []
       this.listSee = []
       this.getdataListSee.parammaps.id = this.seeTemp.id
       this.getdataListSee.parammaps.id = this.seeTemp.id
       this.getdataListSee.parammaps.empId = ''
       this.getdataListSee.parammaps.empId = ''
       this.isApplyEx4 = false
       this.isApplyEx4 = false
       this.getSeeList()
       this.getSeeList()
+      if (row.pastureId != Cookies.get('pastureid')) {
+        row.isPasturd = true
+      } else {
+        row.isPasturd = false
+      }
+      this.seeTemp = Object.assign({}, row)
+      console.log('查看上方数据(从table读取)123', this.seeTemp)
+
     },
     },
     getFlowPath() {
     getFlowPath() {
       // 流程图
       // 流程图