From 275d9a3c158173842449782201b9be2c243dd58b Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 07 九月 2023 18:00:43 +0800
Subject: [PATCH] 	modified:   .env.development 	modified:   src/main.js 	new file:   src/styles/fonts/element-icons.ttf 	new file:   src/styles/fonts/element-icons.woff 	new file:   src/styles/icon.css 	modified:   src/views/inspectionManagement/commissionInspection/addCommision.vue 	modified:   src/views/laboratory/organizational/index.vue

---
 src/views/inspectionManagement/commissionInspection/addCommision.vue | 1192 +++++++++++++++++++++++++++++++++-------------------------
 1 files changed, 676 insertions(+), 516 deletions(-)

diff --git a/src/views/inspectionManagement/commissionInspection/addCommision.vue b/src/views/inspectionManagement/commissionInspection/addCommision.vue
index cd441b4..10a9d5c 100644
--- a/src/views/inspectionManagement/commissionInspection/addCommision.vue
+++ b/src/views/inspectionManagement/commissionInspection/addCommision.vue
@@ -1,529 +1,689 @@
 <template>
-  <div v-if="!showDetail">
-  <div class="content-main">
-    <div class="firstBox">
-      <div class="title">妫�娴嬩俊鎭�</div>
-      <div class="tableBox">
-        <div class="tableBox-header">
-        <el-button class="split" @click="dialogueFormVisible = true" type="primary" size="small" style="background-color: rgb(1, 102, 226);">娣诲姞鏍峰搧</el-button>
-        <el-input
+	<div class="add_commision">
+		<div class="content-main">
+			<div class="firstBox">
+				<div class="printCommision" >
+				<table height="30px" id="printCommision">
+					<tr>
+						<td colspan="8">
+							<img :src="imgSrc" style="position: absolute;left: 50px;top:26px">
+							<h1 style="display: inline;">濮旀墭妫�楠岀敵璇峰崟</h1>
+						</td>
+					</tr>
+					<tr>
+						<td colspan="2">濮旀墭缂栧彿</td>
+						<td colspan="2">{{infoForm.commisioncode}}</td>
+						<td colspan="2">濮旀墭鍗曚綅</td>
+						<td colspan="2">{{infoForm.department}}</td>
+					</tr>
+					<tr>
+						<td colspan="2">鑱旂郴浜�</td>
+						<td colspan="2">{{infoForm.contacter}}</td>
+						<td colspan="2">鑱旂郴鐢佃瘽</td>
+						<td colspan="2">{{infoForm.tel}}</td>
+					</tr>
+					<tr>
+						<td colspan="2">鑱旂郴鍦板潃</td>
+						<td colspan="2">{{infoForm.address}}</td>
+						<td colspan="2">瀹屾垚鏈熼檺</td>
+						<td colspan="2">{{infoForm.deadline}}</td>
+					</tr>
+					<tr>
+						<td colspan="2">閫佹牱鏃堕棿</td>
+						<td colspan="2">{{infoForm.time}}</td>
+						<td colspan="2">閫佹牱浜�</td>
+						<td colspan="2">{{infoForm.sender}}</td>
+					</tr>
+					<tr>
+						<td colspan="2">閫佹牱浜虹數璇�</td>
+						<td colspan="2">{{infoForm.sendertel}}</td>
+						<td colspan="2">鎶ュ憡鏁伴噺</td>
+						<td colspan="2">{{infoForm.num}}</td>
+					</tr>
+					<tr>
+						<td colspan="2">閫佹牱鏂瑰紡</td>
+						<td colspan="6">
+							<ul>
+								<li>
+									<i :class="`${infoForm.way == 1 ? 'el-icon-success' : 'el-icon-circle-check'}`"></i> 閫佹牱
+								</li>
+								<li>
+									<i :class="`${infoForm.way == 2 ? 'el-icon-success' : 'el-icon-circle-check'}`"></i> 涓婇棬
+								</li>
+							</ul>
+						</td>
+					</tr>
+					<tbody colspan="8"  v-for="(item,index) in sampleNameList" :key="index">
+						<tr>
+							<td colspan="2">鏍峰搧</td>
+							<td colspan="2">{{item}}</td>
+							<td colspan="2">璇勫畾鏍囧噯</td>
+							<td colspan="2">{{standardList[index]}}</td>
+						</tr>
+						<tr>
+							<td colspan="2">璇曢獙椤圭洰</td>
+							<td colspan="6">
+								<p style="text-align:left;margin-left:20px" v-for="(data,index) in testProjectList[index]" :key="index">
+								{{index+1 + "銆�" + data}}
+								</p>
+							</td>
+						</tr>
+					</tbody>
+					<tr>
+						<td colspan="2">澶囨敞</td>
+						<td colspan="6">{{infoForm.other}}</td>
+					</tr>
+				</table>
+			</div>
+				<div class="title">濮旀墭淇℃伅</div>
+				<div class="tableBox">
+					<div class="tableBox-header">
+						<el-button class="split" @click="dialogueFormVisible = true" type="primary" size="small"
+							style="background-color: rgb(1, 102, 226);">娣诲姞鏍峰搧</el-button>
+						<!--        <el-input
           v-model="searchData"
           class="input-form split"
           placeholder="鎵弿浜岀淮鐮佸綍鍏ユ牱鍝�..."
           prefix-icon="el-icon-search"
           style="width: 200px;"
         >
-        </el-input>
-        <el-button type="primary" size="small" style="background-color: rgb(1, 102, 226);">閲嶇疆</el-button>
-      </div>
-        <el-table
-                ref="detectionInfo"
-                :max-height="800"
-                :cell-style="{textAlign: 'center'}"
-                :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
-                :data="detectionInfo"
-                style="width: 100%"
-              >
-                <el-table-column
-                  type="index"
-                  label="搴忓彿"
-                  min-width="10%"
-                />
-                <el-table-column
-                  prop="sampleNumber"
-                  label="鏍峰搧缂栧彿"
-                  min-width="8%"
-                />
-                <el-table-column
-                  prop="sampleName"
-                  label="鏍峰搧鍚嶇О"
-                  min-width="10%"
-                />
-                <el-table-column
-                  prop="specificationsModels"
-                  label="瑙勬牸鍨嬪彿"
-                  min-width="10%"
-                />
-                <el-table-column
-                  prop="unit"
-                  label="鍗曚綅"
-                  min-width="8%"
-                />
-                <el-table-column
-                  prop="samplesNumber"
-                  label="鏁伴噺"
-                  min-width="8%"
-                />
-                <el-table-column
-                  prop="addway"
-                  label="娣诲姞鏂瑰紡"
-                  min-width="8%">
-                  <template slot-scope="scope">
-                    <div v-if="scope.row.addway === 0">
-                      <el-tag :type= 'success' disable-transitions>鎵弿</el-tag>
-                    </div>
-                    <div v-if="scope.row.addway === 1">
-                      <el-tag :type= 'primary' disable-transitions>褰曞叆</el-tag>
-                    </div>
-                    <div v-else></div>
-                </template>
-                </el-table-column>
-                <el-table-column
-                  prop="experiment"
-                  label="璇曢獙"
-                  min-width="8%"
-                />
-                <el-table-column
-                  prop="remarks"
-                  label="澶囨敞"
-                  min-width="8%"
-                />
-                <el-table-column
-                  label="鎿嶄綔"
-                  min-width="8%"
-                >
-                  <template slot-scope="scope">
-                    <el-button type="text" size="small">淇敼</el-button>
-                    <el-button type="text" size="small" @click="deleteRow(scope.row)">鍒犻櫎</el-button>
-                  </template>
-                </el-table-column>
-              </el-table>
-              <!-- 鍒嗛〉鍣� -->
-              <div>
-                <el-pagination
-                  class="pagination"
-                  @size-change="handleSizeChange"
-                  @current-change="handleCurrentChange"
-                  :current-page="currentPage"
-                  :page-sizes="[100, 200, 300, 400]"
-                  :page-size="100"
-                  layout="total, sizes, prev, pager, next, jumper"
-                  :total="400">
-                </el-pagination>
-              </div>
-      </div>
-      <div class="secondBox">
-        <el-row class="header">
-            <el-col :span="12">鍩烘湰淇℃伅</el-col>
-            <el-col :span="12" style="text-align: right;">
-            <!-- 鐐瑰嚮杩斿洖锛屽綋鍓嶉〉闈㈠�间负false -->
-            <el-button type="primary" size="mini" style="background-color: rgb(1, 102, 226); ">鎵撳嵃濮旀墭鍗�</el-button>
-            </el-col>
-        </el-row>
-            <el-form :model="infoForm" ref="infoForm" class="infoForm" label-position="right" label-width="100px" size="mini" >
-              <div class="formwrapper">
-                  <el-row :gutter="200">
-                        <el-col :span="5">
-                        <el-form-item label="濮旀墭缂栧彿锛�">
-                            <el-input style="width: 160px" type="text" :value="infoForm.commisioncode" readonly disabled="true" autocomplete="off" />  
-                        </el-form-item>
-                        </el-col>
-                        <el-col :span="5">
-                        <el-form-item label="濮旀墭鍗曚綅锛�">
-                          <el-input style="width: 160px" v-model="infoForm.department" placeholder="璇疯緭鍏ュ鎵樺崟浣�"  />
-                        </el-form-item>
-                        </el-col>
-                        <el-col :span="5">
-                        <el-form-item label="鑱旂郴浜猴細">
-                          <el-input style="width: 160px" v-model="infoForm.contacter" placeholder="璇疯緭鍏ュ鎵樺崟浣�"  />
-                        </el-form-item>
-                        </el-col>
-                        <el-col :span="5">
-                        <el-form-item label="鑱旂郴鐢佃瘽锛�">
-                          <el-input style="width: 160px" v-model="infoForm.tel" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" />
-                        </el-form-item>
-                        </el-col>
-                    </el-row>
-                    <el-row :gutter="200">
-                        <el-col :span="5">
-                        <el-form-item label="鑱旂郴鍦板潃锛�" >
-                          <el-input style="width: 160px;" v-model="infoForm.address" placeholder="璇疯緭鍏ヨ仈绯诲湴鍧�" autocomplete="off" />
-                        </el-form-item>
-                        </el-col>
-                        <el-col :span="5">
-                        <el-form-item label="瀹屾垚鏈熼檺锛�">
-                            <el-date-picker
-                              v-model="infoForm.deadline"
-                              type="date"
-                              placeholder="閫夋嫨鏃ユ湡"
-                              style="width: 160px;">
-                            </el-date-picker>
-                          </el-form-item>
-                        </el-col>
-                        <el-col :span="5">
-                        <el-form-item label="閫佹牱鏃堕棿锛�">
-                            <el-date-picker
-                              v-model="infoForm.time"
-                              type="date"
-                              placeholder="閫夋嫨鏃ユ湡"
-                              style="width: 160px;">
-                            </el-date-picker>
-                        </el-form-item>
-                        </el-col>
-                        <el-col :span="5">
-                        <el-form-item label="閫佹牱鏂瑰紡锛�">
-                          <el-select style="width: 160px;" v-model="infoForm.way" size="small" placeholder="閫佹牱">
-                                <el-option v-for="options in sampleDeliveryMode" :key="options.key" :value="options.value">{{ options.value }}</el-option>
-                            </el-select>
-                        </el-form-item>
-                        </el-col>
-                    </el-row>
-                    <el-row :gutter="200">
-                        <el-col :span="5">
-                        <el-form-item label="閫佹牱浜猴細" >
-                          <el-input style="width: 160px;" v-model="infoForm.sender" placeholder="璇疯緭鍏ラ�佹牱浜�" autocomplete="off" />
-                        </el-form-item>
-                        </el-col>
-                        <el-col :span="5">
-                        <el-form-item label="閫佹牱浜虹數璇濓細" >
-                          <el-input style="width: 160px;" v-model="infoForm.sendertel" placeholder="璇疯緭鍏ラ�佹牱浜虹數璇�" autocomplete="off" />
-                        </el-form-item>
-                        </el-col>
-                        <el-col :span="5">
-                        <el-form-item label="鎶ュ憡鏁帮細">
-                            <el-input style="width: 160px;" v-model="infoForm.num" placeholder="璇疯緭鍏ユ姤鍛婃暟" autocomplete="off" />
-                        </el-form-item>
-                        </el-col>
-                        <el-col :span="5">
-                        <el-form-item label="濮旀墭澶囨敞锛�">
-                            <el-input style="width: 160px;" v-model="infoForm.other" placeholder="澶囨敞" autocomplete="off" />
-                        </el-form-item>
-                        </el-col>
-                    </el-row>
-                    </div>
-                    <div class="submitBtn">
-                      <el-button type="primary" size="small" @click="submitInspection" style="background-color: rgb(1, 102, 226);">鎻愪氦</el-button>
-                    </div>
-                </el-form>
-      </div>
-    </div>
-    <div class="checkType">
-      <el-dialog
-        title="娣诲姞鎸囨爣"
-        :visible.sync="dialogueFormVisible"
-        width="40%"
-      >
-        <el-form :model="addPointerForm" ref="addPointerForm" class="addPointerForm" label-position="right" label-width="100px" size="mini">
-          <el-row :gutter="50">
-            <el-col :span="10">
-              <el-form-item label="鏍峰搧缂栧彿锛�">
-                <el-select style="width: 160px;" v-model="addPointerForm.sampleNumber" size="small" placeholder="璇烽�夋嫨鏍峰搧缂栧彿">
-                  <el-option v-for="options in samplecodeoptions" :value="options.value" :key="options.key" >{{ options.value }}</el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="10">
-              <el-form-item label="鏍峰搧鍚嶇О锛�">
-                <el-select style="width: 160px;" v-model="addPointerForm.sampleName" size="small" placeholder="璇烽�夋嫨鏍峰搧鍚嶇О">
-                  <el-option v-for="options in sampleoptions" :value="options.value" :key="options.key">{{ options.value }}</el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row :gutter="50">
-            <el-col :span="10">
-              <el-form-item label="瑙勬牸鍨嬪彿锛�">
-                <el-select style="width: 160px;" v-model="addPointerForm.specificationsModels" size="small" placeholder="璇烽�夋嫨鏍峰搧鍚嶇О">
-                  <el-option v-for="options in model_spe_options" :value="options.value" :key="options.key">{{ options.value }}</el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="10">
-              <el-form-item label="鏍峰搧鍗曚綅锛�">
-                <el-input style="width: 160px" type="text" v-model="addPointerForm.unit" placeholder="璇疯緭鍏ュ崟浣�" autocomplete="off" />  
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row :gutter="50">
-            <el-col :span="10">
-              <el-form-item label="鏍峰搧鏁伴噺锛�">
-                <el-input style="width: 160px" type="text" v-model="addPointerForm.samplesNumber" placeholder="璇疯緭鍏ユ暟閲�" autocomplete="off" />  
-              </el-form-item>
-            </el-col>
-            <el-col :span="10">
-              <el-form-item label="澶囨敞锛�">
-                <el-input style="width: 160px" type="text" v-model="addPointerForm.remarks" placeholder="璇疯緭鍏ュ娉�" autocomplete="off" />  
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row :gutter="50">
-            <el-col :span="10">
-              <el-form-item label="娣诲姞瀹為獙锛�">
-                <el-checkbox-group v-model="addPointerForm.experiment" style="display: flex; flex-direction: column;">
-                  <el-checkbox v-for="expers in experList" :label="expers.label" :key="expers.key">{{ expers.label }}</el-checkbox>
-                </el-checkbox-group>
-              </el-form-item>
-            </el-col>
-          </el-row>
-              </el-form>
-              <span slot="footer" class="dialog-footer">
-                <el-button type="primary" @click="addInspection">娣诲姞</el-button>
-                <el-button @click="dialogueFormVisible = false">鍙� 娑�</el-button>
-              </span>
-      </el-dialog>
-          </div>
-  </div>
-</div>
-<div v-else>
-  <router-view></router-view>
-</div>
+        </el-input>-->
+					</div>
+					<el-table ref="detectionInfo" :max-height="800" :cell-style="{textAlign: 'center'}"
+						:header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
+						:data="detectionInfo" style="width: 100%;margin-bottom: 20px;">
+						<el-table-column type="index" label="搴忓彿" min-width="10%" />
+						<el-table-column prop="sampleNumber" label="鏍峰搧缂栧彿" min-width="8%" />
+						<el-table-column prop="sampleName" label="鏍峰搧鍚嶇О" min-width="10%" />
+						<el-table-column prop="speName" label="瑙勬牸鍨嬪彿" min-width="10%">
+						</el-table-column>
+						<el-table-column prop="unit" label="鍗曚綅" min-width="8%" />
+						<el-table-column prop="samplesNumber" label="鏁伴噺" min-width="8%" />
+						<!-- <el-table-column prop="addway" label="娣诲姞鏂瑰紡" min-width="8%">
+							<template slot-scope="scope">
+								<div v-if="scope.row.addway === 0">
+									<el-tag type="success" disable-transitions>鎵弿</el-tag>
+								</div>
+								<div v-if="scope.row.addway === 1">
+									<el-tag type="primary" disable-transitions>褰曞叆</el-tag>
+								</div>
+								<div v-else></div>
+							</template>
+						</el-table-column> -->
+						<el-table-column prop="remarks" label="澶囨敞" min-width="8%" />
+						<el-table-column label="鎿嶄綔" min-width="8%">
+							<template slot-scope="scope">
+								<el-button type="text" size="small"
+									@click.native.prevent="deleteRow(scope.$index, detectionInfo)">鍒犻櫎</el-button>
+							</template>
+						</el-table-column>
+					</el-table>
+				</div>
+				<div class="secondBox">
+					<el-row class="header">
+						<el-col :span="12" style="font-size: 16px;margin-bottom: 5px;">鍩烘湰淇℃伅</el-col>
+						<el-col :span="12" style="text-align: right;">
+						</el-col>
+					</el-row>
+					<el-form :model="infoForm" ref="infoForm" class="infoForm" label-position="right" label-width="100px"
+						size="mini">
+						<div class="formwrapper">
+							<el-row :gutter="200">
+								<el-col :span="5">
+									<el-form-item label="濮旀墭缂栧彿锛�">
+										<el-input style="width: 200px" type="text" :value="infoForm.commisioncode" readonly disabled
+											autocomplete="off" size="small" />
+									</el-form-item>
+								</el-col>
+								<el-col :span="5">
+									<el-form-item label="濮旀墭鍗曚綅锛�">
+										<el-input style="width: 200px" v-model="infoForm.department" placeholder="璇疯緭鍏ュ鎵樺崟浣�" size="small" />
+									</el-form-item>
+								</el-col>
+								<el-col :span="5">
+									<el-form-item label="鑱旂郴浜猴細">
+										<el-input style="width: 200px" v-model="infoForm.contacter" placeholder="璇疯緭鍏ュ鎵樺崟浣�" size="small" />
+									</el-form-item>
+								</el-col>
+								<el-col :span="5">
+									<el-form-item label="鑱旂郴鐢佃瘽锛�">
+										<el-input style="width: 200px" v-model="infoForm.tel" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" size="small" />
+									</el-form-item>
+								</el-col>
+							</el-row>
+							<el-row :gutter="200">
+								<el-col :span="5">
+									<el-form-item label="鑱旂郴鍦板潃锛�">
+										<el-input style="width: 200px;" v-model="infoForm.address" placeholder="璇疯緭鍏ヨ仈绯诲湴鍧�" autocomplete="off"
+											size="small" />
+									</el-form-item>
+								</el-col>
+								<el-col :span="5">
+									<el-form-item label="瀹屾垚鏈熼檺锛�">
+										<el-date-picker value-format="yyyy-MM-dd" v-model="infoForm.deadline" type="date" placeholder="閫夋嫨鏃ユ湡" style="width: 200px;"
+											size="small">
+										</el-date-picker>
+									</el-form-item>
+								</el-col>
+								<el-col :span="5">
+									<el-form-item label="閫佹牱鏃堕棿锛�">
+										<el-date-picker value-format="yyyy-MM-dd" v-model="infoForm.time" type="date" placeholder="閫夋嫨鏃ユ湡" style="width: 200px;">
+										</el-date-picker>
+									</el-form-item>
+								</el-col>
+								<el-col :span="5">
+									<el-form-item label="閫佹牱鏂瑰紡锛�">
+										<el-select style="width: 200px;" v-model="infoForm.way" size="small" placeholder="閫佹牱">
+											<el-option v-for="options in sampleDeliveryMode" :key="options.key" :value="options.key"
+												:label="options.value">{{ options.value }}</el-option>
+										</el-select>
+									</el-form-item>
+								</el-col>
+							</el-row>
+							<el-row :gutter="200">
+								<el-col :span="5">
+									<el-form-item label="閫佹牱浜猴細">
+										<el-input style="width: 200px;" v-model="infoForm.sender" placeholder="璇疯緭鍏ラ�佹牱浜�" autocomplete="off"
+											size="small" />
+									</el-form-item>
+								</el-col>
+								<el-col :span="5">
+									<el-form-item label="閫佹牱浜虹數璇濓細">
+										<el-input style="width: 200px;" v-model="infoForm.sendertel" placeholder="璇疯緭鍏ラ�佹牱浜虹數璇�"
+											autocomplete="off" size="small" />
+									</el-form-item>
+								</el-col>
+								<el-col :span="5">
+									<el-form-item label="鎶ュ憡鏁帮細">
+										<el-input type="number" min="0" style="width: 200px;" v-model="infoForm.num" placeholder="璇疯緭鍏ユ姤鍛婃暟" autocomplete="off"
+											size="small" />
+									</el-form-item>
+								</el-col>
+								<el-col :span="5">
+									<el-form-item label="濮旀墭澶囨敞锛�">
+										<el-input style="width: 200px;" v-model="infoForm.other" placeholder="澶囨敞" autocomplete="off"
+											size="small" />
+									</el-form-item>
+								</el-col>
+							</el-row>
+						</div>
+						<div class="submitBtn">
+							<el-button type="primary" size="small" @click="submitInspection"
+								style="background-color: rgb(1, 102, 226);">鎻愪氦</el-button>
+							<!-- 鐐瑰嚮杩斿洖锛屽綋鍓嶉〉闈㈠�间负false -->
+							<el-button type="primary" size="mini" style="background-color: rgb(1, 102, 226); " @click="printCommision">鎵撳嵃濮旀墭鍗�</el-button>
+						</div>
+					</el-form>
+				</div>
+			</div>
+			<div class="checkType">
+				<el-dialog title="娣诲姞鏍峰搧" :visible.sync="dialogueFormVisible" width="40%" top="30vh">
+					<el-form :model="addPointerForm" ref="addPointerForm" class="addPointerForm" label-position="right"
+						label-width="100px" size="mini">
+						<el-row :gutter="50">
+							<el-col :span="11">
+								<el-form-item label="鏍峰搧缂栧彿锛�">
+									<el-input v-model="addPointerForm.sampleNumber" size="small" disabled>
+									</el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="11">
+								<el-form-item label="鏍峰搧鍚嶇О锛�">
+									<el-select v-model="addPointerForm.sampleName" size="small" placeholder="璇烽�夋嫨鏍峰搧鍚嶇О"
+										@change="upMaterialName">
+										<el-option v-for="(options,index) in sampleoptions" :key="index" :value="options.key" :label="options.value"></el-option>
+									</el-select>
+								</el-form-item>
+							</el-col>
+						</el-row>
+						<el-row :gutter="50">
+							<el-col :span="11">
+								<el-form-item label="璇勫畾鏍囧噯锛�">
+									<el-select v-model="addPointerForm.addway" size="small" placeholder="璇烽�夋嫨璇勫畾鏍囧噯">
+										<el-option v-for="options in model_spe_options" :value="options.value"
+											:key="options.key">{{ options.value }}</el-option>
+									</el-select>
+								</el-form-item>
+							</el-col>
+							<el-col :span="11">
+								<el-form-item label="瑙勬牸鍨嬪彿锛�">
+									<el-select v-model="addPointerForm.specificationsModels" size="small" placeholder="璇峰厛閫夋嫨鏍峰搧鍚嶇О"
+										@change="getProductList">
+										<el-option v-for="options in model_sta_options" :value="options.key" :label="options.value"
+											:key="options.key">{{ options.value }}</el-option>
+									</el-select>
+								</el-form-item>
+							</el-col>
+						</el-row>
+						<el-row :gutter="50">
+							<el-col :span="11">
+								<el-form-item label="鏍峰搧鍗曚綅锛�">
+									<el-input type="text" v-model="addPointerForm.unit" placeholder="璇疯緭鍏ュ崟浣�" autocomplete="off" />
+								</el-form-item>
+							</el-col>
+							<el-col :span="11">
+								<el-form-item label="鏍峰搧鏁伴噺锛�">
+									<el-input type="text" v-model="addPointerForm.samplesNumber" placeholder="璇疯緭鍏ユ暟閲�" autocomplete="off" />
+								</el-form-item>
+							</el-col>
+						</el-row>
+						<el-row :gutter="50">
+							<el-col :span="11">
+								<el-form-item label="娣诲姞椤圭洰锛�">
+									<el-checkbox-group v-model="addPointerForm.experiment" style="display: flex; flex-direction: column;">
+										<el-checkbox v-for="(expers, ai) in productList" :label="expers"
+											:key="ai">{{ expers }}</el-checkbox>
+									</el-checkbox-group>
+								</el-form-item>
+							</el-col>
+							<el-col :span="11">
+								<el-form-item label="澶囨敞锛�">
+									<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 20}" style="width: 200px;"
+										v-model="addPointerForm.remarks" placeholder="璇疯緭鍏ュ娉�" autocomplete="off" />
+								</el-form-item>
+							</el-col>
+						</el-row>
+					</el-form>
+					<span slot="footer" class="dialog-footer">
+						<el-button type="primary" @click="addInspection">娣诲姞</el-button>
+						<el-button @click="dialogueFormVisible = false">鍙� 娑�</el-button>
+					</span>
+				</el-dialog>
+			</div>
+		</div>
+	</div>
 </template>
 
 <script>
-import {getSampleName, getModelSpecification, getlink, addInspection} from '@/api/inspection/commisioninspection'
-export default {
-  data() {
-    return {
-      currentPage: 0,
-      searchData: '',
-      infoForm: {
-        commisioncode: '',
-        department: '',
-        contacter: '',
-        tel: '',
-        address: '',
-        deadline: '',
-        time: '',
-        way: '',
-        sender: '',
-        sendertel: '',
-        num: '',
-        other: ''
-      },
-      detectionInfo: [],
-      addPointerForm:{
-        sampleNumber: '',
-        sampleName: '',
-        specificationsModels: '',
-        unit: '',
-        samplesNumber: '',
-        remarks: '',
-        experiment: [],
-        addway: ''
-      },
-      experList:[{
-        key: '1',
-        label: '澶栬妫�鏌�'
-      },{
-        key: '2',
-        label: '鍔ㄤ綔鐢靛帇璇曢獙'
-      },{
-        key: '3',
-        label: '鐢甸樆绠℃硠婕忕數娴佽瘯楠�'
-      },{
-        key: '4',
-        label: '缁濈紭閮ㄥ垎浜ゆ祦鑰愬帇璇曢獙'
-      }],
-      sampleoptions:[{
-        key:'1',
-        value: '閫夐」1'
-      },{
-        key:'2',
-        value: '閫夐」2'
-      }],
-      samplecodeoptions:[{
-        key:'1',
-        value: ''
-      }],
-      model_spe_options:[{
-        key:'1',
-        value: '閫夐」1'
-      },{
-        key: '2',
-        value: '閫夐」2'
-      }],
-      sampleDeliveryMode:[{
-        key: '1',
-        value: '閫佹牱'
-      },{
-        key: '2',
-        value: '涓婇棬'
-      }],
-      dialogueFormVisible: false,
-      showDetail: false
-    }
-  },
-  created(){
-    this.getlink()
-  },
-  mounted(){
-    this.getSampleName()
-    this.getModelSpecification()
-  },
-  methods: {
-    // 鑾峰彇閾炬帴link
-    getlink(){
-      getlink().then((result)=>{
-        this.$store.commit('settings/SAVE_LINK',result.data)
-        console.log(this.$store.state.settings.link)
-      })
-    },
-    async getSampleName(){
-      const res = await getSampleName()
-      // console.log('res',res.data)
-      this.sampleoptions = res.data.map((item)=>{
-        return{
-          key:item.id.toString(),
-          value:item.name
-        }
-      })
-      this.samplecodeoptions = res.data.map((item)=>{
-        return{
-          key:item.id.toString(),
-          value:item.code
-        }
-      })
-    },
-    async getModelSpecification(){
-      const res = await getModelSpecification({materialId: '1'})
-      // console.log(res)
-      this.model_spe_options = res.data.map((item)=>{
-        return{
-          key:item.specificationsId,
-          value:item.specificationsName
-        }
-      })
-    },
-    addInspection(){
-      let exper = this.addPointerForm.experiment[0]
-      this.addPointerForm.addway = 1
-      for(let i=1;i<this.addPointerForm.experiment.length;i++){
-        exper += ',' + this.addPointerForm.experiment[i]
-      }
-      // console.log(exper)
-      this.addPointerForm.experiment = exper
-      let tmp = this.addPointerForm
-      this.detectionInfo.push(tmp)
-      this.dialogueFormVisible = false
-      this.addPointerForm ={
-        sampleNumber: '',
-        sampleName: '',
-        specificationsModels: '',
-        unit: '',
-        samplesNumber: '',
-        remarks: '',
-        experiment: [],
-        addway: ''
-      }
-    },
-    async submitInspection(){
-      let sampledeliveryway
-      if(this.infoForm.way === '閫佹牱'){
-        sampledeliveryway = 1
-      }else{
-        sampledeliveryway = 2
-      }
-      const res = await addInspection({completionDeadline: this.infoForm.deadline,
-        contactAddress: this.infoForm.address,
-        contactNumber: this.infoForm.tel,
-        contacts: this.infoForm.contacter,
-        entrustRemarks: this.infoForm.other,
-        entrusted: this.infoForm.department,
-        inspectionTime: this.infoForm.time,
-        linkDetectionList: this.detectionInfo,
-        reportNumber: parseInt(this.infoForm.num),
-        sampleDeliveryMode: sampledeliveryway,
-        sampleDeliveryPhone: this.infoForm.sendertel,
-        sampleSender: this.infoForm.sender})
-//       const res = await addInspection({
-//   completionDeadline: "2023-08-03",
-//   contactAddress: "姹熻嫃鍗楅��",
-//   contactNumber: "12321423432",
-//   contacts: "灏忛粦",
-//   entrustRemarks: "濮旀墭澶囨敞YPBH123456789YPBH123456789YPBH123456789",
-//   entrusted: "闃块噷宸村反",
-//   inspectionTime: "2023-08-03",
-//   linkDetectionList: [
-//     {
-//       "experiment": "鍋氭ⅵ",
-//       "remarks": "閫氳繃浜�",
-//       "sampleName": "鍙戝姩鏈�",
-//       "sampleNumber": "YPBH123456789",
-//       "samplesNumber": 20,
-//       "specificationsModels": "GGXH-AAAAA",
-//       "unit": "鐧惧害"
-//     }
-//   ],
-//   reportNumber: 23,
-//   sampleDeliveryMode: 1,
-//   sampleDeliveryPhone: "123456789676",
-//   sampleSender: "灏忕櫧"
-// })
-      // console.log(res)
-      this.infoForm.commisioncode = res.data
-      if(res.data){
-        this.$message({
-          message: '鎭枩浣�!',
-          type: 'success'
-        })
-        // 璺宠浆椤甸潰
-        this.$router.push('/inspectionManagement/commissionInspection')
-        this.showDetail = true
-      }else{
-        this.$message.error(res.message)
-      }
-    },
-    handleSizeChange(pageSize) {
-      this.pageParams.pageSize = pageSize
-    },
-    handleCurrentChange(pageNo) {
-      this.pageParams.pageNo = pageNo
-    },
-    deleteRow(row){
-      console.log(row)
-      row = null
-    }
-  }
-}
+	import PrintJS from 'print-js'
+	import {
+		getSampleName,
+		getModelSpecification,
+		getlink,
+		addInspection,
+		isIfViewUUID,
+		getProductList,
+		getContractsSampleInfo,
+		getSpecificationsName
+	} from '@/api/inspection/commisioninspection'
+	export default {
+		data() {
+			return {
+				sampleNameList:[],
+				standardList:[],
+				testProjectList:[],
+				imgSrc: require("@/assets/404_images/logo.png"),
+				currentPage: 0,
+				searchData: '',
+				infoForm: {
+					commisioncode: '',
+					department: '',
+					contacter: '',
+					tel: '',
+					address: '',
+					deadline: '',
+					time: '',
+					way: '',
+					sender: '',
+					sendertel: '',
+					num: '',
+					other: ''
+				},
+				detectionInfo: [],
+				addPointerForm: {
+					sampleNumber: '',
+					sampleName: '',
+					specificationsModels: '',
+					unit: '',
+					samplesNumber: '',
+					remarks: '',
+					experiment: [],
+					addway: ''
+				},
+				experList: [],
+				sampleoptions: [],
+				samplecodeoptions: [],
+				model_spe_options: [],
+				model_sta_options: [],
+				model_options: [],
+				sampleDeliveryMode: [{
+					key: '1',
+					value: '閫佹牱'
+				}, {
+					key: '2',
+					value: '涓婇棬'
+				}],
+				dialogueFormVisible: false,
+				showDetail: false,
+				viewId: null,
+				productList: []
+			}
+		},
+		watch: {
+			addPointerForm: {
+				handler: function(val) {
+					if (val.addway != "") {
+						this.model_sta_options = []
+						this.model_options.forEach(a => {
+							if (a.specificationsName == val.addway) {
+								this.model_sta_options = a.children.map(item => {
+									return {
+										key: item.modelId,
+										value: item.modelName
+									}
+								})
+							}
+						})
+					}
+				},
+				deep: true
+			}
+		},
+		created() {
+			this.viewId = this.$route.params.viewId
+			this.$store.commit('settings/SAVE_LINK', this.viewId)
+			this.getlink(this.$route.params.viewId)
+			this.getContractsSampleInfo(this.$route.params.viewId)
+		},
+		mounted() {
+			this.getSampleName()
+		},
+		methods: {
+			printCommision(){
+				console.log(this.infoForm);
+				PrintJS({
+					printable: "printCommision",
+					type: "html",
+					css: [
+						"https://unpkg.com/element-ui/lib/theme-chalk/fonts/element-icons.ttf",
+						"https://unpkg.com/element-ui/lib/theme-chalk/fonts/element-icons.woff",
+						"https://unpkg.com/element-ui/lib/theme-chalk/icon.css"
+					],
+					targetStyles: ["*"],
+					ignoreElements: ["no-ignore"],
+				});
+			},
+			getlink(viewId) {
+				if (viewId == null) {
+					this.$message.error('褰撳墠閾炬帴涓嶅湪鏈夋晥鏈熷唴,绯荤粺鑷姩鍏抽棴')
+					this.$router.push('/404')
+					return
+				}
+				isIfViewUUID({
+					viewId
+				}).then(res => {
+					if (!res.data) {
+						this.$message.error('褰撳墠閾炬帴涓嶅湪鏈夋晥鏈熷唴,绯荤粺鑷姩鍏抽棴')
+						this.$router.push('/404')
+					} else {
+						this.getContractsSampleInfo()
+					}
+				})
+			},
+			async getContractsSampleInfo(viewId) {
+				let res = await getContractsSampleInfo({
+					viewId
+				})
+			},
+			async getSampleName() {
+				const res = await getSampleName()
+				this.sampleoptions = res.data.map((item) => {
+					return {
+						key: item.id.toString(),
+						value: item.name,
+						code: item.code
+					}
+				})
+			},
+			async getModelSpecification(val) {
+				const res = await getModelSpecification({
+					materialId: val
+				})
+				this.model_options = res.data
+				this.model_spe_options = res.data.map((item) => {
+					return {
+						key: item.specificationsId,
+						value: item.specificationsName
+					}
+				})
+			},
+			addInspection() {
+				let sName = this.addPointerForm.sampleName;
+				this.sampleoptions.forEach(a=>{
+					if(a.key == sName) this.sampleNameList.push(a.value);
+				})
+				this.standardList.push(this.addPointerForm.addway);
+				this.testProjectList.push(this.addPointerForm.experiment);
+				let exper = this.addPointerForm.experiment[0]
+				for (let i = 1; i < this.addPointerForm.experiment.length; i++) {
+					exper += ',' + this.addPointerForm.experiment[i]
+				}
+				this.addPointerForm.experiment = exper
+				let tmp = this.addPointerForm
+				this.sampleoptions.forEach(a => {
+					if (a.key == tmp.sampleName) tmp.sampleName = a.value
+				})
+				tmp.speName = tmp.addway + '-' + tmp.speName
+				tmp.addway = 1
+				this.detectionInfo.push(tmp)
+				this.dialogueFormVisible = false
+				this.addPointerForm = {
+					sampleNumber: '',
+					sampleName: '',
+					specificationsModels: '',
+					unit: '',
+					samplesNumber: '',
+					remarks: '',
+					experiment: [],
+					addway: '',
+					speName: ''
+				}
+				console.log(this.sampleNameList);
+			},
+			async submitInspection() {
+				let sampledeliveryway
+				if (this.infoForm.way === '閫佹牱') {
+					sampledeliveryway = 1
+				} else {
+					sampledeliveryway = 2
+				}
+				const res = await addInspection({
+					completionDeadline: this.infoForm.deadline,
+					contactAddress: this.infoForm.address,
+					contactNumber: this.infoForm.tel,
+					contacts: this.infoForm.contacter,
+					entrustRemarks: this.infoForm.other,
+					entrusted: this.infoForm.department,
+					inspectionTime: this.infoForm.time,
+					linkDetectionList: this.detectionInfo,
+					reportNumber: parseInt(this.infoForm.num),
+					sampleDeliveryMode: sampledeliveryway,
+					sampleDeliveryPhone: this.infoForm.sendertel,
+					sampleSender: this.infoForm.sender,
+					speName: this.infoForm.speName
+				})
+				this.infoForm.commisioncode = res.data
+				if (res.data) {
+					this.$message({
+						message: '娣诲姞鎴愬姛!',
+						type: 'success'
+					})
+					this.showDetail = true
+				} else {
+					this.$message.error(res.message)
+				}
+			},
+			handleSizeChange(pageSize) {
+				this.pageParams.pageSize = pageSize
+			},
+			handleCurrentChange(pageNo) {
+				this.pageParams.pageNo = pageNo
+			},
+			deleteRow(index, rows) {
+				rows.splice(index, 1);
+			},
+			upMaterialName(val) {
+				this.sampleoptions.forEach(a => {
+					if (a.key == val) {
+						this.addPointerForm.sampleNumber = a.code
+					}
+				})
+				this.getModelSpecification(val)
+			},
+			getProductList(val) {
+				getProductList({
+					modelId: val
+				}).then(res => {
+					this.productList = res.data.map(item => {
+						return item.name
+					})
+				})
+				this.model_sta_options.forEach(a => {
+					if (a.key == val) {
+						this.addPointerForm.speName = a.value
+					}
+				})
+			},
+			getContractsSampleInfo() {
+				getContractsSampleInfo({
+					viewId: this.viewId
+				}).then(res => {
+					if (res.data == null) return
+					this.infoForm = {
+						commisioncode: res.data.entrustCoding,
+						deadline: res.data.completionDeadline,
+						address: res.data.contactAddress,
+						tel: res.data.contactNumber,
+						contacter: res.data.contacts,
+						other: res.data.entrustRemarks,
+						department: res.data.entrusted,
+						time: res.data.inspectionTime,
+						detectionInfo: res.data.linkDetectionList,
+						num: res.data.reportNumber,
+						way: '' + res.data.sampleDeliveryMode,
+						sendertel: res.data.sampleDeliveryPhone,
+						sender: res.data.sampleSender
+					}
+					this.detectionInfo = res.data.linkDetectionList
+				})
+			},
+		}
+	}
 </script>
 
 <style lang="scss" scoped>
-.firstBox{
-  .title{
-    padding:0px 10px 10px 10px;
-  }
-  .tableBox{
-    background-color: #fff;
-    padding: 0px 20px;
-    margin: 0px -15px;
-    flex: 1;
-    background: #fff;
-    /* padding: 20px 20px 10px 20px; */
-    display: flex;
-    flex-direction: column;
-    .tableBox-header{
-      padding: 20px 0px;
-      .split{
-        margin-right: 15px;
-      }
-    }
-          .el-table {
-            flex: 1;
-          }
-          >div:nth-child(3){
-            display: flex;
-            justify-content: end;
-            margin: 10px 0;
-          }
-  }
-}
-.secondBox{
-  margin: 0px -15px;
-  .header{
-    display: flex;
-    justify-content: space-between;
-    padding: 10px 20px;
-    margin-top: 10px;
-  }
-  .submitBtn{
-    display: flex;
-    justify-content: end;
-    margin-right: 156px;
-    margin-top: 20px;
-  }
-}
-.infoForm{
-  background-color: #fff;
-  padding: 20px 50px;
-}
-</style>
+	.printCommision{
+		display: none;
+		width: 90%;
+		height:100px;
+		table {
+			width: 100%;
+			border-collapse: collapse;
+			font-size: 18px;
+		}
+
+		table,
+		tr,
+		th,
+		td {
+			border: 2px solid black;
+			text-align: center;
+			font-family: '寰蒋闆呴粦';
+			ul{
+				list-style: none;
+				width: 500px;
+			}
+			ul li{
+				display: inline;
+				width:100px;
+				margin: 0 25px;
+			}
+		}
+
+		tr,
+		td,
+		th {
+			padding: 20px 10px;
+		}
+	}
+	.content-main {
+		padding: 20px 40px;
+		background-color: #f0f2f5;
+		width: 100%;
+		height: 100vh;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		// align-items: center;
+
+		.firstBox {
+			.title {
+				padding: 15px 10px;
+				font-size: 18px;
+				background-color: #0166e2;
+				color: #fff;
+				border-radius: 4px;
+				margin-bottom: 20px;
+			}
+
+			.tableBox {
+				background-color: #fff;
+				padding: 0px 20px;
+				flex: 1;
+				background: #fff;
+				/* padding: 20px 20px 10px 20px; */
+				display: flex;
+				flex-direction: column;
+
+				.tableBox-header {
+					padding: 20px 0px;
+
+					.split {
+						margin-right: 15px;
+					}
+				}
+
+				.el-table {
+					flex: 1;
+				}
+
+				>div:nth-child(3) {
+					display: flex;
+					justify-content: end;
+					margin: 10px 0;
+				}
+			}
+		}
+
+		.secondBox {
+
+			.header {
+				display: flex;
+				justify-content: space-between;
+				padding: 10px 20px;
+				margin-top: 10px;
+			}
+
+			.submitBtn {
+				display: flex;
+				justify-content: end;
+				margin-right: 40px;
+				margin-top: 20px;
+			}
+		}
+
+		.infoForm {
+			background-color: #fff;
+			padding: 20px 50px;
+
+			.formwrapper {
+				margin: 20px 0px;
+				padding-left: 30px;
+
+				.el-row {
+					margin: 10px 0px;
+				}
+			}
+		}
+	}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3