| ¶Ô±ÈÐÂÎļþ | 
 |  |  | 
 |  |  | <template> | 
 |  |  |   <div class="capacity-scope"> | 
 |  |  |     <div style="display: flex;justify-content: space-between;align-items: flex-start"> | 
 |  |  |       <el-form :model="queryParams0" ref="queryParams0" size="small" :inline="true"> | 
 |  |  |         <el-form-item label="æ¶æ ·æ¥æ" prop="receiveDate"> | 
 |  |  |           <el-date-picker v-model="queryParams0.receiveDate" type="date" placeholder="éæ©æ¥æ" format="yyyy-MM-dd" | 
 |  |  |                           value-format="yyyy-MM-dd" size="small" @change="refreshTable()"> | 
 |  |  |           </el-date-picker> | 
 |  |  |         </el-form-item> | 
 |  |  |         <el-form-item> | 
 |  |  |           <el-button type="primary" size="mini" @click="refreshTable">æ¥è¯¢</el-button> | 
 |  |  |           <el-button size="mini" @click="refresh">éç½®</el-button> | 
 |  |  |         </el-form-item> | 
 |  |  |       </el-form> | 
 |  |  |       <el-button size="small" @click="handleDown0">导åº</el-button> | 
 |  |  |     </div> | 
 |  |  |  | 
 |  |  |     <div class="table"> | 
 |  |  |       <lims-table :tableData="tableData0" :column="column0" :tableLoading="tableLoading0" | 
 |  |  |                   key="tableData0" | 
 |  |  |                   :height="'calc(100vh - 240px)'" :page="page0" @pagination="pagination0"> | 
 |  |  |         <div slot="action" slot-scope="scope"> | 
 |  |  |           <el-button type="text" @click="handleAdd(scope.row)">ç¼è¾</el-button> | 
 |  |  |           <el-button type="text" @click="delRow(scope.row)"> | 
 |  |  |             <span style="color: #F56C6C">å é¤</span> | 
 |  |  |           </el-button> | 
 |  |  |         </div> | 
 |  |  |       </lims-table> | 
 |  |  |     </div> | 
 |  |  |     <!-- æ°å¢æ ·å --> | 
 |  |  |     <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px"> | 
 |  |  |       <el-row> | 
 |  |  |         <el-col :span="24" style="margin-bottom: 16px;"> | 
 |  |  |           <div class="search_thing"> | 
 |  |  |             <div class="search_label">æ ·ååç§°ï¼</div> | 
 |  |  |             <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable | 
 |  |  |                                                 v-model="addInfo.sampleName"></el-input></div> | 
 |  |  |           </div> | 
 |  |  |         </el-col> | 
 |  |  |         <el-col :span="24" style="margin-bottom: 16px;"> | 
 |  |  |           <div class="search_thing"> | 
 |  |  |             <div class="search_label">æ ·åç¼å·ï¼</div> | 
 |  |  |             <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable | 
 |  |  |                                                 v-model="addInfo.sampleCode"></el-input></div> | 
 |  |  |           </div> | 
 |  |  |         </el-col> | 
 |  |  |         <el-col :span="24" style="margin-bottom: 16px;"> | 
 |  |  |           <div class="search_thing"> | 
 |  |  |             <div class="search_label">便 ·åä½ï¼</div> | 
 |  |  |             <div class="search_input"> | 
 |  |  |               <el-select v-model="addInfo.sampleSupplier" size="small"> | 
 |  |  |                 <el-option :label="item.company" :value="item.company" v-for="(item, index) in customPageList" | 
 |  |  |                            :key="item.id"></el-option> | 
 |  |  |               </el-select> | 
 |  |  |             </div> | 
 |  |  |           </div> | 
 |  |  |         </el-col> | 
 |  |  |         <el-col :span="24" style="margin-bottom: 16px;"> | 
 |  |  |           <div class="search_thing"> | 
 |  |  |             <div class="search_label">æ°éï¼</div> | 
 |  |  |             <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable | 
 |  |  |                                                 v-model="addInfo.num"></el-input> | 
 |  |  |             </div> | 
 |  |  |           </div> | 
 |  |  |         </el-col> | 
 |  |  |         <el-col :span="24" style="margin-bottom: 16px;"> | 
 |  |  |           <div class="search_thing"> | 
 |  |  |             <div class="search_label">å¤çæ¹å¼ï¼</div> | 
 |  |  |             <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable | 
 |  |  |                                                 v-model="addInfo.dealMethod"></el-input></div> | 
 |  |  |           </div> | 
 |  |  |         </el-col> | 
 |  |  |         <el-col :span="24" style="margin-bottom: 16px;"> | 
 |  |  |           <div class="search_thing"> | 
 |  |  |             <div class="search_label">æ¶é´ï¼</div> | 
 |  |  |             <div class="search_input"> | 
 |  |  |               <el-date-picker v-model="addInfo.dealTime" type="date" size="small" placeholder="éæ©æ¥æ" format="yyyy-MM-dd" | 
 |  |  |                               value-format="yyyy-MM-dd" style="width: 100%;"> | 
 |  |  |               </el-date-picker> | 
 |  |  |             </div> | 
 |  |  |           </div> | 
 |  |  |         </el-col> | 
 |  |  |       </el-row> | 
 |  |  |       <span slot="footer" class="dialog-footer"> | 
 |  |  |         <el-button @click="addDialogVisible = false">å æ¶</el-button> | 
 |  |  |         <el-button type="primary" @click="submitAdd" :loading="addLoading">ç¡® å®</el-button> | 
 |  |  |       </span> | 
 |  |  |     </el-dialog> | 
 |  |  |     <!-- è¯¦æ
/ä¸è½½/审核/æ¹å --> | 
 |  |  |     <el-dialog :title="title0" :visible.sync="lookDialogVisible" width="800px" :class="{ downPdf: title0 == 'ä¸è½½' }" | 
 |  |  |                :modal="title0 != 'ä¸è½½'" top="5vh"> | 
 |  |  |       <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.url" :currentFile="{}" | 
 |  |  |                    style="max-height: 70vh;overflow-y: auto;" /> | 
 |  |  |       <span slot="footer" class="dialog-footer" v-if="title0 == '审核' || title0 == 'æ¹å'"> | 
 |  |  |         <el-button @click="submitCheck('ä¸éè¿')" :loading="noCheckLoading">ä¸éè¿</el-button> | 
 |  |  |         <el-button type="primary" @click="submitCheck('éè¿')" :loading="checkLoading">é è¿</el-button> | 
 |  |  |       </span> | 
 |  |  |     </el-dialog> | 
 |  |  |   </div> | 
 |  |  | </template> | 
 |  |  |  | 
 |  |  | <script> | 
 |  |  | import limsTable from "@/components/Table/lims-table.vue"; | 
 |  |  | import filePreview from "@/components/Preview/filePreview.vue"; | 
 |  |  | import { selectCustomPageList } from "@/api/system/customer"; | 
 |  |  | import { | 
 |  |  |   pageProcessSample, | 
 |  |  |   delProcessSample, | 
 |  |  |   addProcessSample, | 
 |  |  |   exportProcessSample | 
 |  |  | } from "@/api/cnas/process/sampleDisposal"; | 
 |  |  | import {exportInconsistentDistribution} from "@/api/cnas/process/nonconformingWork"; | 
 |  |  | export default { | 
 |  |  |   name: 'SampleReceipt', | 
 |  |  |   components: { | 
 |  |  |     limsTable, | 
 |  |  |     filePreview, | 
 |  |  |   }, | 
 |  |  |   data() { | 
 |  |  |     return { | 
 |  |  |       activeName: 'å¡«å', | 
 |  |  |       title: 'æ°å¢', | 
 |  |  |       addDialogVisible: false, | 
 |  |  |       addLoading: false, | 
 |  |  |       outLoading: false, | 
 |  |  |       editDialogVisible: false, | 
 |  |  |       lookDialogVisible: false, | 
 |  |  |       title0: 'æ¥ç', | 
 |  |  |       noCheckLoading: false, | 
 |  |  |       checkLoading: false, | 
 |  |  |       // åå²å表 | 
 |  |  |       addInfo: {},//æ°å¢æ ·å | 
 |  |  |       customPageList: [], | 
 |  |  |       currentInfo: { | 
 |  |  |         arr: [] | 
 |  |  |       },//æ¥çç详æ
 | 
 |  |  |       queryParams0: { | 
 |  |  |         receiveDate: '' | 
 |  |  |       }, | 
 |  |  |       tableLoading0: false, | 
 |  |  |       tableData0: [], | 
 |  |  |       column0: [ | 
 |  |  |         { | 
 |  |  |           label: "æ¶æ ·æ¥æ", | 
 |  |  |           prop: "receiveDate", | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           label: "æ ·åç¼å·", | 
 |  |  |           prop: "sampleCode", | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           label: "æ ·ååç§°", | 
 |  |  |           prop: "sampleName", | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           label: "æ ·åæ°é", | 
 |  |  |           prop: "num", | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           label: "æ¥æ ·åä½", | 
 |  |  |           prop: "sampleSupplier", | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           label: "çæ ·æ¥æ", | 
 |  |  |           prop: "leaveDate", | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           label: "æ ·åç¶æ", | 
 |  |  |           prop: "sampleState", | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           label: "éæ ·ç¾æ¶/å¤çæ¥æ", | 
 |  |  |           prop: "dealTime", | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           dataType: "slot", | 
 |  |  |           slot: "action", | 
 |  |  |           label: "æä½", | 
 |  |  |         } | 
 |  |  |       ], | 
 |  |  |       page0: { | 
 |  |  |         total: 0, | 
 |  |  |         size: 10, | 
 |  |  |         current: 0, | 
 |  |  |       }, | 
 |  |  |     }; | 
 |  |  |   }, | 
 |  |  |   mounted() { | 
 |  |  |     this.getList0() | 
 |  |  |   }, | 
 |  |  |   methods: { | 
 |  |  |     // è·åéæ ·åä½å表 | 
 |  |  |     getCustomPageList() { | 
 |  |  |       selectCustomPageList({ | 
 |  |  |         current: -1, | 
 |  |  |         size: -1 | 
 |  |  |       }).then(res => { | 
 |  |  |         this.customPageList = res.data.records | 
 |  |  |       }).catch(err => { }); | 
 |  |  |     }, | 
 |  |  |     refresh() { | 
 |  |  |       this.queryParams0 = {}; | 
 |  |  |       this.page0.current = 1; | 
 |  |  |       this.getList0(); | 
 |  |  |     }, | 
 |  |  |     refreshTable() { | 
 |  |  |       this.page0.current = 1; | 
 |  |  |       this.getList0(); | 
 |  |  |     }, | 
 |  |  |     // æ¥è¯¢è¡¨æ ¼æ°æ® | 
 |  |  |     getList0() { | 
 |  |  |       this.tableLoading0 = true; | 
 |  |  |       let param = { ...this.queryParams0, ...this.page0 }; | 
 |  |  |       delete param.total; | 
 |  |  |       pageProcessSample({ ...param }) | 
 |  |  |         .then((res) => { | 
 |  |  |           this.tableLoading0 = false; | 
 |  |  |           if (res.code === 200) { | 
 |  |  |             this.tableData0 = res.data.records; | 
 |  |  |             this.page0.total = res.data.total; | 
 |  |  |           } | 
 |  |  |         }) | 
 |  |  |         .catch((err) => { | 
 |  |  |           this.tableLoading0 = false; | 
 |  |  |         }); | 
 |  |  |     }, | 
 |  |  |     pagination0({ page, limit }) { | 
 |  |  |       this.page0.current = page; | 
 |  |  |       this.page0.size = limit; | 
 |  |  |       this.getList0(); | 
 |  |  |     }, | 
 |  |  |     // æå¼ç¼è¾å¼¹æ¡ | 
 |  |  |     handleAdd(row) { | 
 |  |  |       this.addInfo = this.HaveJson(row) | 
 |  |  |       this.title = 'ç¼è¾' | 
 |  |  |       this.addDialogVisible = true | 
 |  |  |       this.getCustomPageList() | 
 |  |  |     }, | 
 |  |  |     delRow(row) { | 
 |  |  |       this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { | 
 |  |  |         confirmButtonText: "ç¡®å®", | 
 |  |  |         cancelButtonText: "åæ¶", | 
 |  |  |         type: "warning", | 
 |  |  |       }) | 
 |  |  |         .then(() => { | 
 |  |  |           delProcessSample({ id: row.id }).then(res => { | 
 |  |  |             if (res.code == 200) { | 
 |  |  |               this.$message.success("å é¤æå"); | 
 |  |  |               this.refreshTable(); | 
 |  |  |             } | 
 |  |  |           }).catch(err => { }); | 
 |  |  |         }) | 
 |  |  |         .catch(() => { }); | 
 |  |  |     }, | 
 |  |  |     // æäº¤æ°å¢ | 
 |  |  |     submitAdd() { | 
 |  |  |       // ç¼è¾ | 
 |  |  |       this.addLoading = true | 
 |  |  |       addProcessSample({ | 
 |  |  |         ...this.addInfo | 
 |  |  |       }).then(res => { | 
 |  |  |         this.addLoading = false | 
 |  |  |         this.addDialogVisible = false | 
 |  |  |         this.$message({ | 
 |  |  |           type: 'success', | 
 |  |  |           message: 'ç¼è¾æå!' | 
 |  |  |         }); | 
 |  |  |         this.page0.current = 1; | 
 |  |  |         this.refreshTable(); | 
 |  |  |       }).catch(err => { }); | 
 |  |  |     }, | 
 |  |  |     // å¯¼åºè¯¦æ
 | 
 |  |  |     handleDown0() { | 
 |  |  |       exportProcessSample({ receiveDate: this.queryParams0.receiveDate }).then(res => { | 
 |  |  |         this.outLoading = false | 
 |  |  |         const blob = new Blob([res], { type: 'application/msword' }); | 
 |  |  |         this.$download.saveAs(blob, 'æ ·åæ¥æ¶' + '.docx'); | 
 |  |  |       }) | 
 |  |  |     }, | 
 |  |  |   }, | 
 |  |  | } | 
 |  |  | </script> | 
 |  |  |  | 
 |  |  | <style scoped> | 
 |  |  | .search_thing { | 
 |  |  |   width: 350px; | 
 |  |  |   display: flex; | 
 |  |  |   align-items: center; | 
 |  |  | } | 
 |  |  |  | 
 |  |  | .search_label { | 
 |  |  |   width: 110px; | 
 |  |  |   font-size: 14px; | 
 |  |  |   text-align: right; | 
 |  |  | } | 
 |  |  |  | 
 |  |  | .search_input { | 
 |  |  |   width: calc(100% - 110px); | 
 |  |  | } | 
 |  |  |  | 
 |  |  | .downPdf { | 
 |  |  |   opacity: 0 !important; | 
 |  |  | } | 
 |  |  |  | 
 |  |  | .tables td { | 
 |  |  |   height: 40px; | 
 |  |  |   width: 100px; | 
 |  |  |   text-align: center; | 
 |  |  |   font-size: 14px; | 
 |  |  |   word-wrap: break-word; | 
 |  |  |   white-space: normal; | 
 |  |  | } | 
 |  |  |  | 
 |  |  | .user-info .el-button { | 
 |  |  |   margin: 0; | 
 |  |  | } | 
 |  |  |  | 
 |  |  | >>>.el-tabs__content { | 
 |  |  |   height: 100%; | 
 |  |  | } | 
 |  |  | </style> |