From 5104054c6c7a28c3d97a66c1e614897a6db28ba0 Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期六, 08 六月 2024 17:39:36 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/components/do/b1-ins-order/add.vue                             |   44 +++++++++++++-
 src/main.js                                                        |    5 -
 src/components/do/b1-inspect-order-plan/Inspection.vue             |   39 ++++++++++--
 src/components/do/b3-work-time-management/work-time-management.vue |   55 +++++++++++++++++-
 src/components/do/b3-work-time-management/work-time-statistics.vue |   22 ++++++
 src/components/view/a6-device-management.vue                       |    7 ++
 6 files changed, 152 insertions(+), 20 deletions(-)

diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 5598379..210ac64 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -451,7 +451,7 @@
           <el-col class="search_thing" :span="22">
             <div class="search_label"><span class="required-span" v-if="addObj.type == 2">* </span>鎸囨淳浜哄憳锛�</div>
             <div class="search_input">
-              <el-select v-model="distributeData.userId" placeholder="璇烽�夋嫨" size="small" style="width: 100%;">
+              <el-select v-model="distributeData.userId" placeholder="璇烽�夋嫨" size="small" filterable  style="width: 100%;">
                 <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
                 </el-option>
               </el-select>
@@ -530,9 +530,29 @@
           </el-col>
           <el-col style="margin-top: 6px;">
             <el-col v-for="(a,ai) in bsm2Val2" :key="ai">
-              <el-col :span="10" class="pairing">{{a[0]}}</el-col>
+              <el-col :span="10">
+                <el-select v-model="a[0]" placeholder="璇烽�夋嫨" size="small" style="width: 100%;">
+                  <el-option
+                    v-for="(item,index) in sampleList"
+                    :key="index"
+                    :label="index+1"
+                    :value="index+1">
+                  </el-option>
+                </el-select>
+              </el-col>
+              <!-- <el-col :span="10" class="pairing">{{a[0]}}</el-col> -->
               <el-col :span="4" class="pairing" style="border: 0;color: rgba(0, 0, 0, 0.2);">鈥斺��</el-col>
-              <el-col :span="10" class="pairing">{{a[1]}}</el-col>
+              <el-col :span="10">
+                <el-select v-model="a[1]" placeholder="璇烽�夋嫨" size="small" style="width: 100%;">
+                  <el-option
+                    v-for="(item,index) in sampleList"
+                    :key="index"
+                    :label="index+1"
+                    :value="index+1">
+                  </el-option>
+                </el-select>
+              </el-col>
+              <!-- <el-col :span="10" class="pairing">{{a[1]}}</el-col> -->
             </el-col>
           </el-col>
         </el-row>
@@ -1112,6 +1132,8 @@
           this.sampleList.push(this.HaveJson(this.sample))
           this.count++
         }
+        this.computationalPairing(this.sampleList.length)
+        this.bsm2Val2 = this.HaveJson(this.bsm2Val3)
       },
       selectSample(val) {
         this.sampleIds = []
@@ -1583,6 +1605,22 @@
             this.$message.error('鐗规畩椤圭洰蹇呴』澶勭悊')
             return
           }
+          let set = new Set()
+          for (let i=0;i<this.bsm2Val2.length;i++){
+            let num0 = set.size
+            set.add(JSON.stringify(this.bsm2Val2[i]))
+            let num1 = set.size
+            if(num1==num0){
+              this.$message.error('鍏宠仈椤圭洰涓嶈兘閲嶅')
+              return
+            }
+            set.add(JSON.stringify(this.bsm2Val2[i].reverse()))
+            let num2 = set.size
+            if(num1==num2){
+              this.$message.error('鍏宠仈椤圭洰涓嶈兘閲嶅')
+              return
+            }
+          }
         }
         done()
       },
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index f58373c..d97b387 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -356,9 +356,10 @@
       :data="{
         orderId:id
       }"
-      v-show="state==1"
+      v-show="state==1&&fileAdd"
       :on-success="handleSuccessUp" :show-file-list="false"
         accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' :headers="headers" :on-change="beforeUpload"
+        style="width: 80px !important;"
         :on-error="onError" ref='upload'>
         <el-button size="small" type="primary">闄勪欢涓婁紶</el-button></el-upload>
       <ValueTable class="value-table" ref="fileList" :url="$api.insOrderPlan.getFileList"
@@ -475,6 +476,7 @@
     },
     data() {
       return {
+        fileAdd:false,
         sampleVisible: false,
         taskVisible: false,
         submitLoading: false,
@@ -520,6 +522,11 @@
           init:false,
           do: [
           {
+						id: 'handleDown',
+						font: '涓嬭浇',
+						type: 'text',
+						method: 'handleDown'
+					},{
 						id: 'delete',
 						font: '鍒犻櫎',
 						type: 'text',
@@ -527,12 +534,7 @@
             disabFun: (row, index) => {
 								return this.state!=1
 							}
-					}, {
-						id: 'handleDown',
-						font: '涓嬭浇',
-						type: 'text',
-						method: 'handleDown'
-					},
+					}
           ],
           isPage: false,
           linkEvent: {},
@@ -618,6 +620,7 @@
       this.getComparisonList()
       this.getAuthorizedPerson()
       this.scrollInit()
+      this.getPower()
     },
     watch: {
       id(val) {
@@ -634,6 +637,10 @@
               this.insOrder.typeName = m.label
             }
           })
+          this.loading = false
+          if(!res.data.sampleProduct||res.data.sampleProduct.length==0){
+            return this.$message.error('璇ヤ换鍔℃病鏈夋牱鍝佷俊鎭�')
+          }
           this.sampleProduct = res.data.sampleProduct
           this.currentSample = this.HaveJson(this.sampleProduct[0])
           let list = await this.getCurrentProduct(this.currentSample.id,0)
@@ -650,7 +657,6 @@
           })
           if (this.currentSample.index == undefined) this.currentSample['index'] = 1
           let bushing = this.currentSample.bushing
-          this.loading = false
           // this.handleTableData()
           this.getTableLists();
           this.componentData.currentId = val;
@@ -681,6 +687,23 @@
       }
     },
     methods: {
+      getPower(){
+        let power = JSON.parse(sessionStorage.getItem('power'))
+        let fileDel = false
+        let fileAdd = false
+        for (var i = 0; i < power.length; i++) {
+					if (power[i].menuMethod == 'uploadFile') {
+						fileAdd = true
+					}
+					if (power[i].menuMethod == 'delfile') {
+						fileDel = true
+					}
+				}
+        if (!fileDel) {
+					this.componentData0.do.splice(1, 1)
+				}
+        this.fileAdd = fileAdd
+      },
       async getCurrentProduct(id,type){
         this.tableLoading = true;
         let res = await this.$axios.post(this.$api.insOrderPlan.getInsProduct+'?id='+id+'&type='+type+'&laboratory='+this.sonLaboratory)
diff --git a/src/components/do/b3-work-time-management/work-time-management.vue b/src/components/do/b3-work-time-management/work-time-management.vue
index 86d3e07..1ebdf62 100644
--- a/src/components/do/b3-work-time-management/work-time-management.vue
+++ b/src/components/do/b3-work-time-management/work-time-management.vue
@@ -63,10 +63,12 @@
       </el-radio-group>
       <div style="display: flex;align-items: center;">
         <p style="font-size: 14px;margin-right: 30px;">
-          鎬诲伐鏃舵眹鎬伙細<span style="font-size: 16px;color: #3A7BFA;">{{ (totalInfo['浜ч噺宸ユ椂姹囨��']+totalInfo['杈呭姪宸ユ椂姹囨��'])? (totalInfo['浜ч噺宸ユ椂姹囨��']+totalInfo['杈呭姪宸ユ椂姹囨��']):0 }}</span>&nbsp;&nbsp;&nbsp;&nbsp;浜ч噺宸ユ椂姹囨�伙細<span style="font-size: 16px;color: #3A7BFA;">{{totalInfo['浜ч噺宸ユ椂姹囨��']?totalInfo['浜ч噺宸ユ椂姹囨��']:0}}</span>&nbsp;&nbsp;&nbsp;&nbsp;杈呭姪宸ユ椂姹囨�伙細<span style="font-size: 16px;color: #3A7BFA;">{{totalInfo['杈呭姪宸ユ椂姹囨��']?totalInfo['杈呭姪宸ユ椂姹囨��']:0}}</span>
+          鎬诲伐鏃舵眹鎬伙細<span style="font-size: 16px;color: #3A7BFA;" v-if="totalInfo">{{ (totalInfo['浜ч噺宸ユ椂姹囨��']+totalInfo['杈呭姪宸ユ椂姹囨��'])? (totalInfo['浜ч噺宸ユ椂姹囨��']+totalInfo['杈呭姪宸ユ椂姹囨��']):0 }}</span>&nbsp;&nbsp;&nbsp;&nbsp;浜ч噺宸ユ椂姹囨�伙細<span style="font-size: 16px;color: #3A7BFA;" v-if="totalInfo">{{totalInfo['浜ч噺宸ユ椂姹囨��']?totalInfo['浜ч噺宸ユ椂姹囨��']:0}}</span>&nbsp;&nbsp;&nbsp;&nbsp;杈呭姪宸ユ椂姹囨�伙細<span style="font-size: 16px;color: #3A7BFA;" v-if="totalInfo">{{totalInfo['杈呭姪宸ユ椂姹囨��']?totalInfo['杈呭姪宸ユ椂姹囨��']:0}}</span>
         </p>
-        <el-button size="small" type="primary" style="margin-right: 16px;" @click="openAdd" v-show="currentTable == 'ValueTable0'">褰曞叆鏁版嵁</el-button>
-        <el-button size="small" type="primary" @click="handleOut" :loading="outLoading">瀵� 鍑�</el-button>
+        <el-button size="small" type="primary" style="margin-right: 16px;" @click="openAdd" v-show="currentTable == 'ValueTable0'&&add">褰曞叆鏁版嵁</el-button>
+        <el-button size="small" type="primary"
+        v-if="down"
+        @click="handleOut" :loading="outLoading">瀵� 鍑�</el-button>
       </div>
     </div>
     <div class="table">
@@ -216,6 +218,8 @@
   data () {
     return{
       entity:{},
+      down:false,
+      add:false,
       componentData: {
 					entity: {
 						week: null,
@@ -394,7 +398,7 @@
           label:'宸叉壒鍑�'
         },
       ],
-      totalInfo:{},
+      totalInfo:null,
       auxiliaryWorking:null,
       outLoading:false
     }
@@ -461,6 +465,49 @@
     this.componentData.selectField.weekDay.select = this.weekList
   },
   methods:{
+    getPower(){
+      let power = JSON.parse(sessionStorage.getItem('power'))
+        let del = false
+        let down = false
+        let add = false
+        let up = false
+        let check = false
+        let ratify = false
+        for (var i = 0; i < power.length; i++) {
+					if (power[i].menuMethod == 'exportWorkingHours') {
+						down = true
+					}
+					if (power[i].menuMethod == 'deleteAuxiliaryWorkingHoursDay') {
+						del = true
+					}
+          if (power[i].menuMethod == 'insertAuxiliaryWorkingHoursDay') {
+						add = true
+					}
+          if (power[i].menuMethod == 'updateAuxiliaryWorkingHoursDay') {
+						up = true
+					}
+          if (power[i].menuMethod == 'check') {
+						check = true
+					}
+          if (power[i].menuMethod == 'approve') {
+						ratify = true
+					}
+				}
+        if (!approve) {
+					this.componentData.do.splice(3, 1)
+				}
+        if (!check) {
+					this.componentData.do.splice(2, 1)
+				}
+        if (!up) {
+					this.componentData.do.splice(1, 1)
+				}
+        if (!del) {
+					this.componentData.do.splice(0, 1)
+				}
+        this.down = down
+        this.add = add
+    },
     getYearAndMonthAndDays(date){
       return getYearAndMonthAndDays(date)
     },
diff --git a/src/components/do/b3-work-time-management/work-time-statistics.vue b/src/components/do/b3-work-time-management/work-time-statistics.vue
index 380987a..710d6f7 100644
--- a/src/components/do/b3-work-time-management/work-time-statistics.vue
+++ b/src/components/do/b3-work-time-management/work-time-statistics.vue
@@ -40,8 +40,8 @@
 				<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
 			</div>
       <div class="search_thing">
-        <el-button size="small" type="primary"  @click="handleDown" v-show="currentTable == 'value0'" :loading="outLoading">瀵� 鍑�</el-button>
-        <el-button size="small" type="primary"  @click="handleUp" v-show="currentTable == 'value1'">瀵� 鍏�</el-button>
+        <el-button size="small" type="primary"  @click="handleDown" v-show="currentTable == 'value0'&&down" :loading="outLoading">瀵� 鍑�</el-button>
+        <el-button size="small" type="primary"  @click="handleUp" v-show="currentTable == 'value1'&&up">瀵� 鍏�</el-button>
       </div>
 		</div>
     <el-radio-group v-model="currentTable" size="small" :key="'111'" style="margin-top: 10px;">
@@ -78,6 +78,8 @@
   },
   data () {
     return{
+      down:false,
+      up:false,
       componentData: {
 					entity: {
 						month: getYearAndMonthAndDays().split('-')[0]+'-'+getYearAndMonthAndDays().split('-')[1],
@@ -139,6 +141,7 @@
     this.getUsers()
     this.entityCopy = this.HaveJson(this.componentData.entity);
     this.entityCopy0 = this.HaveJson(this.componentData0.entity);
+    this.getPower()
   },
   methods: {
     refresh(){
@@ -207,6 +210,21 @@
     },
     handleUp(){
       this.$refs.ValueTable1.openUpload()
+    },
+    getPower(){
+      let power = JSON.parse(sessionStorage.getItem('power'))
+        let up = false
+        let down = false
+        for (var i = 0; i < power.length; i++) {
+					if (power[i].menuMethod == 'exportOriginalHours') {
+						down = true
+					}
+					if (power[i].menuMethod == 'upload') {
+						up = true
+					}
+				}
+        this.down = down
+        this.up = up
     }
   }
 }
diff --git a/src/components/view/a6-device-management.vue b/src/components/view/a6-device-management.vue
index dfe4981..00e1073 100644
--- a/src/components/view/a6-device-management.vue
+++ b/src/components/view/a6-device-management.vue
@@ -578,6 +578,7 @@
 				let up = false
 				let del = false
 				let add = false
+        let config = false
 				for (var i = 0; i < power.length; i++) {
 					if (power[i].menuMethod == 'upDeviceParameter') {
 						up = true
@@ -588,6 +589,12 @@
 					if (power[i].menuMethod == 'addDeviceParameter') {
 						add = true
 					}
+          if (power[i].menuMethod == 'numberCollect') {
+						config = true
+					}
+				}
+        if (!config) {
+					this.componentData.do.splice(2, 1)
 				}
 				if (!up) {
 					this.componentData.do.splice(1, 1)
diff --git a/src/main.js b/src/main.js
index 518112d..799f9b5 100644
--- a/src/main.js
+++ b/src/main.js
@@ -15,9 +15,8 @@
 Vue.prototype.PROJECT = '妫�娴嬩腑蹇�' //椤圭洰鍚嶇О锛氭娴嬩腑蹇冦�佽澶囩數缂�
 //鏈湴
 Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
-const javaApi = 'http://192.168.11.200:8001';//鏉�
-// const javaApi = 'http://192.168.144.249:8001';//寮�
-// const javaApi = 'http://172.20.10.3:8001';//濮�
+const javaApi = 'http://192.168.144.200:8001';//鏉�
+// const javaApi = 'http://192.168.11.249:8001';//寮�
 // const javaApi = 'http://192.168.11.2:8001';//鏌�
 //  const javaApi = 'http://127.0.0.1:8001';//鏅�
 // const javaApi = 'http://114.132.189.42:1234';//娴嬭瘯鏈�

--
Gitblit v1.9.3