From 77fad81725d273ad7d515b1d98fa3e7c2b20be06 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期一, 30 九月 2024 09:47:15 +0800
Subject: [PATCH] 样机编号完成40%

---
 src/components/view/b1-inspection-order.vue |   57 +++++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 45 insertions(+), 12 deletions(-)

diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue
index 1f25b27..42658b2 100644
--- a/src/components/view/b1-inspection-order.vue
+++ b/src/components/view/b1-inspection-order.vue
@@ -530,7 +530,21 @@
 						type: 'text',
 						method: 'handleVerify',
 						disabFun: (row, index) => {
-							return row.state != 0
+              let state0 = false
+              if(this.currentRole=='妫�娴嬩腑蹇冧富浠�'){
+                if(row.checkState1||row.checkState1User){
+                  state0 = true
+                }
+              }else if(this.currentRole=='鐮斿彂閮ㄧ粡鐞�'){
+                if(row.checkState2||row.checkState2User){
+                  state0 = true
+                }
+              }else if(this.currentRole=='鎶�鏈礋璐d汉'){
+                if(row.checkState3||row.checkState3User){
+                  state0 = true
+                }
+              }
+							return row.state != 0 || state0 ||(this.currentRole!='妫�娴嬩腑蹇冧富浠�'&&this.currentRole!='鐮斿彂閮ㄧ粡鐞�'&&this.currentRole!='鎶�鏈礋璐d汉')
 						}
 					}, {
 						id: 'quash',
@@ -549,15 +563,17 @@
 						disabFun: (row, index) => {
 							return (row.state != 1 && row.state != 0)||(this.tabIndex!=1)||row.isRevocation!=1
 						}
-					}, {
-						font: '鍒嗛厤',
-						type: 'text',
-						method: 'handleIssued',
-						disabFun: (row, index) => {
-							// return row.state != 1 || !!row.assign
-              return row.appointed || row.state != 1
-						}
-					}],
+					},
+          // {
+					// 	font: '鍒嗛厤',
+					// 	type: 'text',
+					// 	method: 'handleIssued',
+					// 	disabFun: (row, index) => {
+					// 		// return row.state != 1 || !!row.assign
+          //     return row.appointed || row.state != 1
+					// 	}
+					// }
+        ],
 					linkEvent: {
 						sampleName: {
 							method: 'selectAllByOne'
@@ -745,7 +761,8 @@
         ],
         qrData:[],
         multipleSelection:[],
-        sonLaboratoryList:[]
+        sonLaboratoryList:[],
+        currentRole:''
 			}
 		},
     watch:{
@@ -758,6 +775,9 @@
         }
       }
     },
+    created() {
+      this.getAuthorizedPersonRole()
+    },
 		mounted() {
 			this.entityCopy = this.HaveJson(this.componentData.entity)
 			this.getPower()
@@ -769,6 +789,12 @@
 		methods: {
       selectMethod(val){
         this.multipleSelection = val
+      },
+      async searchPrint(selection){
+        let res = await this.$axios.post(this.$api.insOrder.checkNumber,{
+          ids:selection.map(m=>m.id).join(',')
+        })
+        console.log(1111,res)
       },
       getLabelPrinting(selection){
         this.loadPint = true;
@@ -842,12 +868,13 @@
               font_size: '0.20cm',
         });
       },
-      print(){
+      async print(){
         if(this.multipleSelection.length==0){
             this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
             return
         }
         let selection = this.multipleSelection
+        await this.searchPrint(selection)
         this.getLabelPrinting(selection)
         this.printDialogVisible = true
       },
@@ -861,6 +888,11 @@
 						})
 					})
 					this.personList = data
+				})
+			},
+      getAuthorizedPersonRole() {
+				this.$axios.get(this.$api.role.getRole).then(res => {
+					this.currentRole = res.message
 				})
 			},
 			refreshTable(e) {
@@ -1115,6 +1147,7 @@
 			playOrder(num) {
 				this.active = num
         this.examine = 0
+        this.getAuthorizedPersonRole()
         this.refreshTable('page')
 			},
 			handleTab(m, i) {

--
Gitblit v1.9.3