From 0b9a9b4aa3051565b213b9efcb5e02ecbda0e791 Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期一, 04 九月 2023 15:22:35 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.73.113:9001/r/lims-before

---
 src/views/experiment/reportAuditing/index.vue                 |   26 +--
 src/views/laboratory/measure/index.vue                        |    5 
 src/views/basicData/index.vue                                 |   14 +
 src/views/experiment/inspectionApplication/index.vue          |   15 +-
 src/views/standardLibrary/index.vue                           |    3 
 src/views/CNAS/nonConformanceManage/index.vue                 |    4 
 src/views/laboratory/role/index.vue                           |    4 
 src/views/inspectionManagement/reportForInspection/index.vue  |  179 ++++++++++++++++-------------
 src/views/experiment/nonConformanceReview/index.vue           |    4 
 src/views/experiment/nonConformingFeedback/index.vue          |    4 
 src/views/laboratory/personnel/index.vue                      |    4 
 src/views/CNAS/reviewAnnualPlan/index.vue                     |    4 
 src/views/laboratory/ledger/index.vue                         |   19 +-
 src/views/message/toDo/index.vue                              |    4 
 src/views/CNAS/satisfactionSurveys/index.vue                  |    4 
 src/views/experiment/checkTheReport/index.vue                 |   28 ++--
 src/views/inspectionManagement/commissionInspection/index.vue |   28 +++-
 17 files changed, 185 insertions(+), 164 deletions(-)

diff --git a/src/views/CNAS/nonConformanceManage/index.vue b/src/views/CNAS/nonConformanceManage/index.vue
index 18c1c72..45b5388 100644
--- a/src/views/CNAS/nonConformanceManage/index.vue
+++ b/src/views/CNAS/nonConformanceManage/index.vue
@@ -56,8 +56,8 @@
         <el-table
                 ref="recordTable"
                 :max-height="800"
-                :cell-style="{textAlign: 'center'}"
-                :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
+                :cell-style="{textAlign: 'left'}"
+                :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'left'}"
                 :data="recordTable"
                 style="width: 100%"
               >
diff --git a/src/views/CNAS/reviewAnnualPlan/index.vue b/src/views/CNAS/reviewAnnualPlan/index.vue
index e99d7f6..8e7a09c 100644
--- a/src/views/CNAS/reviewAnnualPlan/index.vue
+++ b/src/views/CNAS/reviewAnnualPlan/index.vue
@@ -279,13 +279,13 @@
           ref="auditTable"
           border
           :max-height="800"
-          :cell-style="{ textAlign: 'center' }"
+          :cell-style="{ textAlign: 'left' }"
           :header-cell-style="{
             border: '0px',
             background: '#f5f7fa',
             color: '#606266',
             boxShadow: 'inset 0 1px 0 #ebeef5',
-            textAlign: 'center',
+            textAlign: 'left',
           }"
           :data="auditTable"
           style="width: 100%"
diff --git a/src/views/CNAS/satisfactionSurveys/index.vue b/src/views/CNAS/satisfactionSurveys/index.vue
index c89b437..98bf3c6 100644
--- a/src/views/CNAS/satisfactionSurveys/index.vue
+++ b/src/views/CNAS/satisfactionSurveys/index.vue
@@ -33,8 +33,8 @@
     </div>
     <div class="library-table">
       <div class="table-box">
-        <el-table ref="tableData" :max-height="800" :cell-style="{ textAlign: 'center' }"
-          :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center' }"
+        <el-table ref="tableData" :max-height="800" :cell-style="{ textAlign: 'left' }"
+          :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'left' }"
           :data="tableData" style="width: 100%">
           <el-table-column prop="id" type="index" label="搴忓彿" min-width="20%"/>
           <el-table-column prop="surveyDate" label="璋冩煡鏃ユ湡" min-width="10%" />
diff --git a/src/views/basicData/index.vue b/src/views/basicData/index.vue
index 1e29c24..cb8c8f9 100644
--- a/src/views/basicData/index.vue
+++ b/src/views/basicData/index.vue
@@ -2,7 +2,7 @@
 	<div class="main_div">
 		<div class="top_div">
 			<span>鏍峰搧鍚嶇О锛�</span>
-			<el-select v-model="params.material" size="small" placeholder="璇烽�夋嫨鏍峰搧鍚嶇О">
+			<el-select v-model="params.material" size="small" placeholder="璇烽�夋嫨鏍峰搧鍚嶇О" @change="selectProductModelTable()">
 				<el-option v-for="item in productModelSelectmater" :value="item" :key="item.index" :label="item"></el-option>
 			</el-select>
 			<span class="top_div_span">椤圭洰鍒嗙粍锛�</span>
@@ -160,6 +160,7 @@
 									message: res.message,
 									type: "success",
 								});
+								this.selectProductMaster();
 								this.selectProductModelTable();
 							});
 						}
@@ -347,13 +348,16 @@
 					name: null
 				}
 				this.selectProductModelTable()
+			},
+			selectList(){
+				this.selectProductMaster().then((res) => {
+					this.params.material = this.productModelSelectmater[0];
+					this.selectProductModelTable();
+				})
 			}
 		},
 		mounted() {
-			this.selectProductMaster().then((res) => {
-				this.params.material = this.productModelSelectmater[0];
-				this.selectProductModelTable();
-			});
+			this.selectList()
 		},
 		watch: {
 			centerDialogVisible: {
diff --git a/src/views/experiment/checkTheReport/index.vue b/src/views/experiment/checkTheReport/index.vue
index 9552c34..97a2491 100644
--- a/src/views/experiment/checkTheReport/index.vue
+++ b/src/views/experiment/checkTheReport/index.vue
@@ -26,10 +26,9 @@
 				<div class="search-bar">
 					<el-radio-group v-model="checkStatus" @change="handleRadioChange">
 						<el-radio-button>鍏ㄩ儴</el-radio-button>
-						<el-radio-button label="0">寰呮彁浜�</el-radio-button>
-						<el-radio-button label="1">寰呭鏍�</el-radio-button>
-						<el-radio-button label="2">寰呯瀛�</el-radio-button>
-						<el-radio-button label="3">宸插畬鎴�</el-radio-button>
+						<el-radio-button label="0">寰呭鏍�</el-radio-button>
+						<el-radio-button label="1">寰呯瀛�</el-radio-button>
+						<el-radio-button label="2">宸插畬鎴�</el-radio-button>
 					</el-radio-group>
 					<el-checkbox v-model="checked" style="margin-left: 20px">浠呯湅鎴戠殑</el-checkbox>
 				</div>
@@ -44,12 +43,12 @@
 				</div>
 			</el-dialog>
 			<div class="table-box">
-				<el-table ref="reportTable" :max-height="800" :cell-style="{ textAlign: 'center' }" :header-cell-style="{
+				<el-table ref="reportTable" :max-height="800" :cell-style="{ textAlign: 'left' }" :header-cell-style="{
             border: '0px',
             background: '#f5f7fa',
             color: '#606266',
             boxShadow: 'inset 0 1px 0 #ebeef5',
-            textAlign: 'center',
+            textAlign: 'left',
           }" :data="reportTable" @selection-change="handleSelectionChange" style="width: 100%">
 					<el-table-column type="selection" min-width="5%" />
 					<el-table-column prop="type" label="鎶ュ憡绫诲瀷" min-width="5%">
@@ -86,15 +85,14 @@
 					<el-table-column prop="status" label="瀹℃壒鐘舵��" min-width="8%">
 						<template slot-scope="scope">
 							<span>
-								<el-tag type="info">{{
-                  scope.row.status == 0
-                    ? "寰呮彁浜�"
-                    : scope.row.status == 1
-                    ? "寰呭鏍�"
-                    : scope.row.status == 2
-                    ? "浠g瀛�"
-                    : "宸插畬鎴�"
-                }}</el-tag>
+								<el-tag type="info">
+									{{
+									scope.row.status == 0
+									? "寰呭鏍�"
+									: scope.row.status == 1
+									? "浠g瀛�" : "宸插畬鎴�"
+									}}
+								</el-tag>
 							</span>
 						</template></el-table-column>
 					<el-table-column prop="conclusion" label="妫�楠岀粨璁�" min-width="8%">
diff --git a/src/views/experiment/inspectionApplication/index.vue b/src/views/experiment/inspectionApplication/index.vue
index be7fb86..5f63b6c 100644
--- a/src/views/experiment/inspectionApplication/index.vue
+++ b/src/views/experiment/inspectionApplication/index.vue
@@ -41,8 +41,8 @@
 				<div class="library-table">
 					<div class="table-box">
 						<el-table ref="inspectionTable" style="width: 100%;overflow-y: auto;max-height: 600px;" :height="600"
-							:cell-style="{textAlign: 'center'}"
-							:header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
+							:cell-style="{textAlign: 'left'}"
+							:header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'left'}"
 							:data="inspectionTable">
 							<el-table-column type="selection" min-width="30px" />
 							<el-table-column prop="icode" label="鐢宠鍗曞彿" min-width="160px" />
@@ -338,10 +338,8 @@
 						<el-table-column prop="surveyor" label="妫�楠屼汉" min-width="8%" />
 						<el-table-column prop="startTime" label="妫�楠屾棩鏈�" min-width="8%" />
 						<el-table-column prop="type" label="鐘舵��" min-width="8%">
-							<template slot-scope="scope">
-								<span :style="{ color: scope.row.state === type ? 'green' : 'red' }">
-									{{ scope.row.state===1 ? '宸叉娴�':'寰呮娴�' }}
-								</span>
+							<template>
+								<span style="color: red">寰呮楠�</span>
 							</template>
 						</el-table-column>
 					</el-table>
@@ -649,7 +647,10 @@
 								checkdate.push(item['updateTime'])
 								item['checkdate'] = checkdate // 妫�楠屾棩鏈�
 							})
-							this.rawMaterialTable = res.data
+							let arr = res.data.filter((val)=>{
+								return val.type === 0;
+							})
+							this.rawMaterialTable = arr
 						})
 					} else if (this.type === 1) {
 						this.commisionVisible = true
diff --git a/src/views/experiment/nonConformanceReview/index.vue b/src/views/experiment/nonConformanceReview/index.vue
index 5eab166..5a8bf92 100644
--- a/src/views/experiment/nonConformanceReview/index.vue
+++ b/src/views/experiment/nonConformanceReview/index.vue
@@ -41,8 +41,8 @@
     </div>
     <div class="library-table">
       <div class="table-box">
-        <el-table ref="tableData" :max-height="800" :cell-style="{ textAlign: 'center' }"
-          :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center' }"
+        <el-table ref="tableData" :max-height="800" :cell-style="{ textAlign: 'left' }"
+          :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'left' }"
           :data="tableData" style="width: 100%">
           <el-table-column type="selection" label="" min-width="5%" />
           <el-table-column  label="鏍峰搧缂栧彿" min-width="10%">
diff --git a/src/views/experiment/nonConformingFeedback/index.vue b/src/views/experiment/nonConformingFeedback/index.vue
index 2c58565..c59f54c 100644
--- a/src/views/experiment/nonConformingFeedback/index.vue
+++ b/src/views/experiment/nonConformingFeedback/index.vue
@@ -41,8 +41,8 @@
     </div>
     <div class="library-table">
       <div class="table-box">
-        <el-table ref="tableData" :max-height="800" :cell-style="{ textAlign: 'center' }"
-          :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center' }"
+        <el-table ref="tableData" :max-height="800" :cell-style="{ textAlign: 'left' }"
+          :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'left' }"
           :data="tableData" style="width: 100%">
           <el-table-column type="selection" label="" min-width="5%" />
           <el-table-column  label="鏍峰搧缂栧彿" min-width="10%">
diff --git a/src/views/experiment/reportAuditing/index.vue b/src/views/experiment/reportAuditing/index.vue
index cfe3239..fab1979 100644
--- a/src/views/experiment/reportAuditing/index.vue
+++ b/src/views/experiment/reportAuditing/index.vue
@@ -14,14 +14,6 @@
           <el-button type="primary" @click="getData()">鏌ヨ</el-button>
           <el-button type="primary" plain @click="resetData()">閲嶇疆</el-button>
         </el-form-item>
-        <el-dropdown>
-          <span class="el-dropdown-link">
-            楂樼骇鎼滅储<i class="el-icon-arrow-down el-icon--right"></i>
-          </span>
-          <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item>楂樼骇鎼滅储</el-dropdown-item>
-          </el-dropdown-menu>
-        </el-dropdown>
       </el-form>
     </div>
     <div class="library-table">
@@ -41,13 +33,13 @@
         <el-table
           ref="reportTable"
           :max-height="800"
-          :cell-style="{ textAlign: 'center' }"
+          :cell-style="{ textAlign: 'left' }"
           :header-cell-style="{
             border: '0px',
             background: '#f5f7fa',
             color: '#606266',
             boxShadow: 'inset 0 1px 0 #ebeef5',
-            textAlign: 'center',
+            textAlign: 'left',
           }"
           :data="reportTable"
           style="width: 100%"
@@ -79,9 +71,9 @@
           <el-table-column prop="status" label="瀹℃壒鐘舵��" min-width="8%" v-model="Auditconclusion">
             <template slot-scope="scope">
               <span>
-                <el-tag :color="scope.row.status == 0 ? '' : 'rgb(187, 237, 221)'" type="warning">{{
-                  scope.row.status == 0 ? "寰呴�氳繃" : "閫氳繃"
-                }}</el-tag>
+                <el-tag type="warning" v-if="scope.row.status === 0">寰呴�氳繃</el-tag>
+                <el-tag type="success" v-else-if="scope.row.status === 1">閫氳繃</el-tag>
+                <el-tag type="danger" v-else>涓嶉�氳繃</el-tag>
               </span>
             </template></el-table-column
           >
@@ -192,7 +184,7 @@
     async checkskip(row) {
       console.log(this.tableRow);
       this.reportTable[this.tableRow.$index].status=1
-      this.transmitData(this.tableRow.row.id)
+      this.transmitData(this.tableRow.row.id,1)
       this.checkskipvisible= false
       this.$message({
           message: '閫氳繃鎴愬姛',
@@ -204,7 +196,7 @@
     async nocheckskip(row) {
       console.log(this.tableRow);
       this.reportTable[this.tableRow.$index].status=0
-      this.transmitData(this.tableRow.row.id)
+      this.transmitData(this.tableRow.row.id,2)
       this.checkskipvisible= false
       this.$message({
           message: '寰呴�氳繃',
@@ -213,8 +205,8 @@
 
     },
     //瀹℃牳
-    async transmitData(id) {
-      let param={"id":id,"result":2}
+    async transmitData(id, result) {
+      let param={"id":id,"result":result}
      let data = await checkApi(param)
     },
     // 鏌ヨ鍒楄〃
diff --git a/src/views/inspectionManagement/commissionInspection/index.vue b/src/views/inspectionManagement/commissionInspection/index.vue
index 783bb85..b6dec7b 100644
--- a/src/views/inspectionManagement/commissionInspection/index.vue
+++ b/src/views/inspectionManagement/commissionInspection/index.vue
@@ -58,8 +58,8 @@
 						</div>
 					</div>
 					<div class="table-box">
-						<el-table ref="commisionTable" :max-height="800" :cell-style="{textAlign: 'center'}"
-							:header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
+						<el-table ref="commisionTable" :max-height="800" :cell-style="{textAlign: 'left'}"
+							:header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'left'}"
 							:data="commisionTable" @selection-change="handleSelectionChange" style="width: 100%">
 							<el-table-column type="selection" :selectable="checkSelect" min-width="10%" />
 							<el-table-column type="index" label="搴忓彿" min-width="10%" />
@@ -254,11 +254,13 @@
 			},
 			handleSelectionChange(val) {
 				if (val.length > 1) {
+					let data = val.pop();
 					this.$refs.commisionTable.clearSelection();
-					this.$refs.commisionTable.toggleRowSelection(val.pop())
+					this.$refs.commisionTable.toggleRowSelection(data);
+					this.checkData = data;
+				}else{
+					this.checkData = val;
 				}
-				this.checkData = val;
-				console.log(this.checkData);
 			},
 			//鐢熸垚鎶ユ鍗曠‘璁ゆ寜閽�
 			confirmBtn(formName) {
@@ -288,10 +290,13 @@
 			},
 			//鐢熸垚鎶ユ鍗曡姹�
 			async createReport(param) {
-				let res = await addInspect(param);
-				if(res.data==null)return
-				this.$message.success('鎶ユ鎴愬姛')
-				this.$router.push(`/experiment/Viewdetails/${res.data}`)
+				await addInspect(param).then(res =>{
+					this.search();
+					this.$message.success('鎶ユ鎴愬姛')
+					this.$router.push(`/experiment/Viewdetails/${res.data}`)
+				}).catch(()=>{
+					this.$message.error('鎶ユ澶辫触')
+				});
 			},
 			//鐢熸垚鎶ユ鍗曟寜閽�
 			addReportBtn() {
@@ -328,7 +333,10 @@
 					specifications : specifications,
 					version: version
 				}).then((res)=>{
-					console.log(res);
+					var data = res.data;
+					for(var i=0;i<data.length;i++){
+						data[i].id = "0" + i;
+					}
 					vm.standardLibraryData = res.data;
 				})
 			},
diff --git a/src/views/inspectionManagement/reportForInspection/index.vue b/src/views/inspectionManagement/reportForInspection/index.vue
index 5984f31..7931628 100644
--- a/src/views/inspectionManagement/reportForInspection/index.vue
+++ b/src/views/inspectionManagement/reportForInspection/index.vue
@@ -8,7 +8,7 @@
 						</el-input>
 					</el-form-item>
 					<el-form-item label="鏉愭枡鍚嶇О:" class="sermargin">
-						<el-input v-model="searchData.name" class="input-form" placeholder="璇疯緭鍏�">
+						<el-input v-model="searchData.name" class="input-form" placeholder="璇疯緭鍏ユ潗鏂欏悕绉�">
 						</el-input>
 					</el-form-item>
 					<el-form-item label="鐘舵��:" class="sermargin">
@@ -18,8 +18,8 @@
 						</el-select>
 					</el-form-item>
 					<el-form-item label="鏉ユ枡鏃ユ湡:" style="margin-right: 20px;">
-						<el-input v-model="searchData.date" class="input-form" placeholder="璇疯緭鍏�">
-						</el-input>
+						<el-date-picker value-format="yyyy-MM-dd" v-model="searchData.date" class="input-form" placeholder="璇烽�夋嫨鏉ユ枡鏃ユ湡">
+						</el-date-picker>
 					</el-form-item>
 					<el-form-item>
 						<el-button type="primary" @click="search">鏌ヨ</el-button>
@@ -54,7 +54,7 @@
 						<el-input type="text" v-model="insertData.unit" />
 					</el-form-item>
 					<el-form-item label="鏁伴噺:" prop="num">
-						<el-input type="number" v-model="insertData.num"/>
+						<el-input type="number" min="0" v-model="insertData.num"/>
 					</el-form-item>
 				</el-form>
 				<span slot="footer" class="dialog-footer">
@@ -70,8 +70,8 @@
 					</div>
 				</div>
 				<div class="table-box">
-					<el-table ref="inspectionTable" :max-height="600" :cell-style="{textAlign: 'center'}"
-						:header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
+					<el-table ref="inspectionTable" :max-height="450" :cell-style="{textAlign: 'left'}"
+						:header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'left'}"
 						:data="inspectionTable" style="width: 100%" @selection-change="handleSelectionChange">
 						<el-table-column type="selection" :selectable="checkSelect" min-width="5%"></el-table-column>
 						<el-table-column type="index" label="搴忓彿" min-width="8%" />
@@ -276,6 +276,13 @@
 		mounted() {
 			this.getMaterielName();
 		},
+		watch:{
+			addReportDialog(newVal){
+				if(newVal === false){
+					this.resetForm("addInspectionForm");
+				}
+			}
+		},
 		methods: {
 			handleChange() {
 
@@ -312,11 +319,14 @@
 				}
 			},
 			handleSelectionChange(val) {
-        if (val.length > 1) {
+				if (val.length > 1) {
+					let data = val.pop();
 					this.$refs.inspectionTable.clearSelection();
-					this.$refs.inspectionTable.toggleRowSelection(val.pop())
+					this.$refs.inspectionTable.toggleRowSelection(data);
+					this.checkData = new Array(data);
+				}else{
+					this.checkData = val;
 				}
-				this.checkData = val;
 			},
 			//鐢熸垚鎶ユ鍗曟寜閽�
 			addReportBtn() {
@@ -326,86 +336,95 @@
 					if (this.checkData.length > 1) {
 						this.$message.error("鏈�澶氶�夋嫨涓�鏉℃暟鎹�!");
 					} else {
-            let mcode = this.checkData[0].materialCoding;
-            let name = this.checkData[0].materialName;
-            let specifications = this.checkData[0].specificationsModels;
-            this.getChooseVersionFun(mcode,name,specifications);
+            			let mcode = this.checkData[0].materialCoding;
+            			let name = this.checkData[0].materialName;
+            			let speId = this.checkData[0].specificationsId;
+            			this.getChooseVersionFun(mcode,name,speId);
 						this.addReportDialog = true;
 					}
 				}
 			},
-      changeVersionFun(){
-        let mCode = this.checkData[0].materialCoding;
-        let name = this.checkData[0].materialName;
-        let specifications = this.checkData[0].specificationsModels;
-        let version = this.addInspectionForm.version;
-        this.getProByVersion(mCode,name,specifications,version);
-      },
-      //鑾峰彇鐗堟湰涓嬬殑鏍囧噯搴撴暟鎹�
-      async getProByVersion(mCode,name,specifications,version){
-          var vm = this;
-          await lookProByVer({
-              mcode : mCode,
-              name : name,
-              specifications : specifications,
-              version: version
-          }).then((res)=>{
-            vm.standardLibraryData = res.data;
-          })
-          
-      },
-      //鑾峰彇鐗堟湰鍒楄〃
-      async getChooseVersionFun(mCode,name,specifications){
-        var vm = this;
-        this.chooseVersion = [];
-        await getChooseVersion({
-          mcode : mCode,
-          name : name,
-          specifications : specifications
-        }).then((res)=>{
-              vm.getProByVersion(mCode,name,specifications,res.data[0])
-              for(let i=0;i<res.data.length;i++){
-                vm.chooseVersion.push({
-                  value: res.data[i],
-                  label: "V"+res.data[i]
-                });
-              }
-              vm.addInspectionForm.version = res.data[0];
-        });
-      },
+			changeVersionFun(){
+				let mCode = this.checkData[0].materialCoding;
+				let name = this.checkData[0].materialName;
+				let specifications = this.checkData[0].specificationsModels;
+				let version = this.addInspectionForm.version;
+				this.getProByVersion(mCode,name,specifications,version);
+			},
+			//鑾峰彇鐗堟湰涓嬬殑鏍囧噯搴撴暟鎹�
+			async getProByVersion(mCode,name,specifications,version){
+				var vm = this;
+				await lookProByVer({
+					mcode : mCode,
+					name : name,
+					specifications : specifications,
+					version: version
+				}).then((res)=>{
+					var arr = res.data;
+					for(var i=0;i<arr.length;i++){
+						arr[i].id = "0" + i;
+					}
+					vm.standardLibraryData = arr;
+				})
+				
+			},
+			//鑾峰彇鐗堟湰鍒楄〃
+			async getChooseVersionFun(mCode,name,specifications){
+				var vm = this;
+				this.chooseVersion = [];
+				await getChooseVersion({
+				mcode : mCode,
+				name : name,
+				specifications : specifications
+				}).then((res)=>{
+					vm.getProByVersion(mCode,name,specifications,res.data[0])
+					for(let i=0;i<res.data.length;i++){
+						vm.chooseVersion.push({
+						value: res.data[i],
+						label: "V"+res.data[i]
+						});
+					}
+					vm.addInspectionForm.version = res.data[0];
+				});
+			},
 			//鐢熸垚鎶ユ鍗曠‘璁ゆ寜閽�
 			confirmBtn(formName) {
-        this.$refs[formName].validate((valid=>{
-          if(valid){
-            let dateArr = this.addInspectionForm.inspectionDate;
-            //娣诲姞鎶ユ鍗�
-            let val = this.checkData[0];
-            let obj = {
-              "endTime": dateArr[1],
-              "experiment": "",
-              "formTime": val.createTime,
-              "id": val.id,
-              "mcode": val.materialCoding,
-              "name": val.materialName,
-              "num": val.quantity,
-              "specifications": val.specificationsModels,
-              "startTime": dateArr[0],
-              "supplier": val.supplierName,
-              "type": val.type,
-              "unit": val.unit,
-              "version": this.addInspectionForm.version
-            }
-            this.createReport(obj);
-            this.addReportDialog = false;
-          }
-        }));
+				this.$refs[formName].validate((valid=>{
+				if(valid){
+					let dateArr = this.addInspectionForm.inspectionDate;
+					//娣诲姞鎶ユ鍗�
+					let val = this.checkData[0];
+					let obj = {
+					"endTime": dateArr[1],
+					"experiment": "",
+					"formTime": val.createTime,
+					"id": val.id,
+					"mcode": val.materialCoding,
+					"name": val.materialName,
+					"num": val.quantity,
+					"specifications": val.specificationsModels,
+					"specificationsId": val.specificationsId,
+					"startTime": dateArr[0],
+					"supplier": val.supplierName,
+					"type": val.type,
+					"unit": val.unit,
+					"version": this.addInspectionForm.version
+					}
+					// this.createReport(obj);
+					console.log("obj---",obj);
+					this.addReportDialog = false;
+				}
+				}));
 			},
 			//鐢熸垚鎶ユ鍗�
 			async createReport(param) {
-				let res = await addInspect(param);
-				if(res.data==null)return
-				this.$message.success('鎶ユ鎴愬姛')
-				this.$router.push(`/experiment/Viewdetails/${res.data}`)
+				await addInspect(param).then(res =>{
+					this.search();
+					this.$message.success('鎶ユ鎴愬姛')
+					this.$router.push(`/experiment/Viewdetails/${res.data}`)
+				}).catch(error =>{
+					this.$message.error('鎶ユ澶辫触')
+				});
 			},
 			// 鑾峰彇鍒嗛〉鍒楄〃鏁版嵁
 			async getRawMaterialList() {
diff --git a/src/views/laboratory/ledger/index.vue b/src/views/laboratory/ledger/index.vue
index 7cbc78a..9746cd5 100644
--- a/src/views/laboratory/ledger/index.vue
+++ b/src/views/laboratory/ledger/index.vue
@@ -52,8 +52,8 @@
           </div>
         </div>
         <div class="table-box">
-          <el-table ref="equipmentTable" node-key="father_name" :cell-style="{ textAlign: 'center' }"
-            :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center' }"
+          <el-table ref="equipmentTable" node-key="father_name" :cell-style="{ textAlign: 'left' }"
+            :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'left' }"
             :data="equipmentTable" style="width: 100%;">
             <el-table-column type="index" label="搴忓彿" min-width="90" />
             <el-table-column prop="equipment_code" label="浠櫒璁惧缂栧彿" min-width="200" />
@@ -685,7 +685,7 @@
     // 鑺傜偣鐐瑰嚮澶勭悊
     nodeClickHandler(data, node, element) {
       this.nodeclicked = data
-      // console.log(data)
+      console.log(data)
       // 鍙湁鏁版嵁涓惡甯d鎵嶈兘鍙戦�佹煡璇㈣姹�
       if (data.id) {
         this.getEquipmentTable({ classifyId: data.id, pageSize: this.pageSize, pageNo: this.currentPage, whetherWhether: this.isOut })
@@ -950,15 +950,14 @@
       this.deletedialogVisible = true
     },
     async deleteInstrument() {
-      let up = await deleteInstrument({ instrumentId: this.instrumentId })
-      if (up.data) {
-        this.$message({
-          message: '鎿嶄綔鎴愬姛锛�',
-          type: 'success'
-        });
+      await deleteInstrument({ instrumentId: this.instrumentId }).then(res=>{
+        this.$message.error('鍒犻櫎鎴愬姛锛�');
         let d = this.nodeclicked
+        console.log(d);
         this.nodeClickHandler(d);
-      }
+      }).catch(()=>{
+        this.$message.error('鍒犻櫎澶辫触锛�');
+      });
       this.deletedialogVisible = false
     },
     async submitTreeForm(formName) {
diff --git a/src/views/laboratory/measure/index.vue b/src/views/laboratory/measure/index.vue
index b6d76a2..427e4d7 100644
--- a/src/views/laboratory/measure/index.vue
+++ b/src/views/laboratory/measure/index.vue
@@ -42,8 +42,8 @@
           </div>
         </div>
         <div class="table-box">
-          <el-table v-if="this.radioValue == 0" :max-height="500" :cell-style="{ textAlign: 'center' }"
-            :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center' }"
+          <el-table v-if="this.radioValue == 0" :max-height="500" :cell-style="{ textAlign: 'left' }"
+            :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'left' }"
             :data="measureLedgerTable" style="width: 100%">
             <el-table-column type="index" min-width="10%" />
             <el-table-column prop="equipmentCode" label="浠櫒璁惧缂栧彿" min-width="10%" />
@@ -396,7 +396,6 @@
       });
       this.lookVisible = false
       this.addBtn = false
-      this.getPlanPageList()
       this.limitGetPlanMeasureInstrument()
     },
     async handleSizeChangePlan(num) {
diff --git a/src/views/laboratory/personnel/index.vue b/src/views/laboratory/personnel/index.vue
index f469fa9..ac88585 100644
--- a/src/views/laboratory/personnel/index.vue
+++ b/src/views/laboratory/personnel/index.vue
@@ -56,13 +56,13 @@
 		</div>
 		<div class="content-main">
 			<div class="personner-table">
-				<el-table ref="personnerlTable" height="calc(100vh - 240px)" border :cell-style="{ textAlign: 'center' }"
+				<el-table ref="personnerlTable" height="calc(100vh - 240px)" border :cell-style="{ textAlign: 'left' }"
 					:header-cell-style="{
             border: '0px',
             background: '#f5f7fa',
             color: '#606266',
             boxShadow: 'inset 0 1px 0 #ebeef5',
-            textAlign: 'center',
+            textAlign: 'left',
           }" @filter-change="fnFilterChangeInit" :data="personnerlTable" style="width: 100%">
 					<el-table-column prop="username" label="瑙掕壊鍚嶇О" min-width="120" />
 					<el-table-column prop="roleName" label="瑙掕壊鏉冮檺" min-width="120" />
diff --git a/src/views/laboratory/role/index.vue b/src/views/laboratory/role/index.vue
index 56aaaac..c91733a 100644
--- a/src/views/laboratory/role/index.vue
+++ b/src/views/laboratory/role/index.vue
@@ -22,8 +22,8 @@
       </div>
       <div class="library-table">
         <div class="table-box">
-          <el-table :max-height="800" :cell-style="{ textAlign: 'center' }"
-            :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center' }"
+          <el-table :max-height="800" :cell-style="{ textAlign: 'left' }"
+            :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'left' }"
             :data="roleTable" style="width: 100%">
             <el-table-column type="index" min-width="8%" />
             <el-table-column prop="roleName" label="瑙掕壊鍚嶇О" min-width="20%" />
diff --git a/src/views/message/toDo/index.vue b/src/views/message/toDo/index.vue
index ca3ef41..7af1f63 100644
--- a/src/views/message/toDo/index.vue
+++ b/src/views/message/toDo/index.vue
@@ -40,8 +40,8 @@
         <el-table
                 ref="toDoTable"
                 :max-height="800"
-                :cell-style="{textAlign: 'center'}"
-                :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
+                :cell-style="{textAlign: 'left'}"
+                :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'left'}"
                 :data="toDoTable"
                 @selection-change="handleSelectionChange"
                 style="width: 100%"
diff --git a/src/views/standardLibrary/index.vue b/src/views/standardLibrary/index.vue
index 8adee1f..3b65eea 100644
--- a/src/views/standardLibrary/index.vue
+++ b/src/views/standardLibrary/index.vue
@@ -167,7 +167,8 @@
 			},
 			async insertVersion() {
 				const resp = await addVersion({
-					specificationsId: this.selectData.id
+					specificationsId: this.selectData.id,
+					version: this.versionValue
 				});
 				if (resp.code === 200) {
 					this.initSelect();

--
Gitblit v1.9.3