From c782bf581aaf31a645fb136ada26905a133b290c Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期四, 19 十二月 2024 15:01:46 +0800 Subject: [PATCH] 完成cnas7.1搬迁 --- static/img/logo2.png | 0 src/components/view/a7-contract-review.vue | 688 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 688 insertions(+), 0 deletions(-) diff --git a/src/components/view/a7-contract-review.vue b/src/components/view/a7-contract-review.vue new file mode 100644 index 0000000..ab51485 --- /dev/null +++ b/src/components/view/a7-contract-review.vue @@ -0,0 +1,688 @@ +<template> + <div class="contract-review"> + <el-row class="title"> + <el-col :span="12" style="padding-left: 20px;text-align: left;">妫�楠屽鎵樺崟</el-col> + </el-row> + <div class="search"> + <div class="search_thing"> + <div class="search_label">璇曟牱鍚嶇О锛�</div> + <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.sample" + @keyup.enter.native="refreshTable()"></el-input></div> + </div> + <div class="search_thing"> + <div class="search_label">濮旀墭鍗曚綅锛�</div> + <div class="search_input"> + <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.company" + @keyup.enter.native="refreshTable()"></el-input> + </div> + </div> + <div class="search_thing"> + <div class="search_label">鐢熶骇鍗曚綅锛�</div> + <div class="search_input"> + <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.production" + @keyup.enter.native="refreshTable()"></el-input> + </div> + </div> + <div class="search_thing"> + <div class="search_label">濮旀墭浜猴細</div> + <div class="search_input"> + <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.prepareUser" + @keyup.enter.native="refreshTable()"></el-input> + </div> + </div> + <div class="search_thing" style="padding-left: 30px;"> + <el-button size="small" @click="refresh()">閲� 缃�</el-button> + <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button> + </div> + </div> + <div class="table"> + <ValueTable ref="ValueTable" :url="$api.processOrder.pageProcessOrder" + :componentData="componentData" :delUrl="$api.processOrder.delProcessOrder" :key="upIndex"/> + </div> + <el-dialog + 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" style="display: flex;align-items: center;"> + <!-- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.rule"></el-input> --> + <el-radio-group v-model="addInfo.rule" size="small" style="width: 60%;"> + <el-radio label="涓嶈�冭檻涓嶇‘瀹氬害">涓嶈�冭檻涓嶇‘瀹氬害</el-radio> + <el-radio label="鑰冭檻涓嶇‘瀹氬害">鑰冭檻涓嶇‘瀹氬害</el-radio> + </el-radio-group> + <el-input v-model="addInfo.num" placeholder="璇疯緭鍏�" v-if="addInfo.rule=='鑰冭檻涓嶇‘瀹氬害'" size="small" style="width: 80px;margin-right: 10px;"></el-input> + <span v-if="addInfo.rule=='鑰冭檻涓嶇‘瀹氬害'"> %</span> + </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.comprehensiveUser" placeholder="璇烽�夋嫨" size="small" style="width: 100%;"> + <el-option + v-for="item in personList" + :key="item.value" + :label="item.label" + :value="item.value"> + </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-date-picker + v-model="addInfo.comprehensiveTime" + 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-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.issueUser" placeholder="璇烽�夋嫨" size="small" style="width: 100%;"> + <el-option + v-for="item in personList" + :key="item.value" + :label="item.label" + :value="item.value"> + </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-date-picker + v-model="addInfo.issueTime" + 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="handleAdd" :loading="addLoading">纭� 瀹�</el-button> + </span> + </el-dialog> + <el-dialog + :title="title" + :visible.sync="detailDialogVisible" width="900px" top="20px" :class="{downPdf:title=='涓嬭浇'}" :modal="title!='涓嬭浇'"> + <div style="max-height: 75vh;overflow-y: auto;"> + <div id="dialogBody"> + <table border="1" class="tables heads" cellpadding="10" style="border: 1px dashed black;"> + <tr> + <td rowspan="2"> + <img src="../../../static/img/logo2.png" alt="" style="width: 80%;"> + </td> + <td> + <p>璁板綍鍚嶇О锛氭楠屽鎵樺崟</p> + <p class="en">Record name: Commission List of Testing</p> + </td> + <td> + <p>淇濆瓨鏈熼檺锛�6骞�</p> + <p class="en">Record retention:6 years</p> + </td> + </tr> + <tr> + <td> + <p>璁板綍缂栧彿锛� ZTT/QR-16-04-a</p> + <p class="en">Record number: ZTT/QR-16-04-a</p> + </td> + <td> + <p>褰掓。閮ㄩ棬锛氱患鍚堝</p> + <p class="en">Archive department: general office</p> + </td> + </tr> + </table> + <h4 style="display: flex;align-items: center;flex-direction: column;justify-content: center;"> + <span style="font-size: 28px;">妫� 楠� 濮� 鎵� 鍗�</span> + <span>Commission List of Testing</span> + </h4> + <p style="margin-top: 16px;margin-left: 600px;">濮旀墭缂栧彿锛歿{ currentInfo.entrustCode }}</p> + <p style="margin-left: 600px;" class="en">Report No:{{ currentInfo.entrustCode }}</p> + <table border="1" class="tables" cellpadding="10"> + <tr> + <td colspan="2"> + <p>璇曟牱鍚嶇О</p> + <p class="en">Sample name</p> + </td> + <td>{{ currentInfo.sample }}</td> + <td> + <p>濮旀墭鏃堕棿</p> + <p class="en">Commission date</p> + </td> + <td>{{ currentInfo.createTime }}</td> + </tr> + <tr> + <td colspan="2"> + <p>鍨� 鍙�</p> + <p class="en">Model NO.</p> + </td> + <td>{{ currentInfo.sampleType }}</td> + <td> + <p>濮旀墭鍗曚綅</p> + <p class="en">Commission unit</p> + </td> + <td>{{ currentInfo.company }}</td> + </tr> + <tr> + <td colspan="2"> + <p>鐢熶骇鍗曚綅</p> + <p class="en">Production unit</p> + </td> + <td>{{ currentInfo.production }}</td> + <td> + <p>濮旀墭浜�</p> + <p class="en">Commission by</p> + </td> + <td>{{ currentInfo.prepareUser }}</td> + </tr> + <tr> + <td colspan="2"> + <p>鏍峰搧鏁伴噺</p> + <p class="en">Quantity</p> + </td> + <td>{{ currentInfo.sampleNum }}</td> + <td> + <p>鏍峰搧鐘舵��</p> + <p class="en">Sample status</p> + </td> + <td>{{ insStateList.find(m=>m.value==currentInfo.insState)?insStateList.find(m=>m.value==currentInfo.insState).label:'/' }}</td> + </tr> + <tr> + <td colspan="2"> + <p>鏄惁鐣欐牱</p> + <p class="en">Reserve sample or not</p> + </td> + <td> + <span v-if="currentInfo.isLeave==1">鏄� <span class="en" >Yes</span></span> + <span v-else>鍚� <span class="en">No</span></span> + </td> + <td> + <p>鏍峰搧澶勭悊鏂瑰紡</p> + <p class="en">Sample treatment</p> + </td> + <td> + <span v-if="currentInfo.processing==0">濮旀墭鍗曚綅鍙栧洖 <span class="en">Taken away by commission unit</span></span> + <span v-else>瀹為獙瀹ゅ鐞� <span class="en">Laboratory treatment</span></span> + </td> + </tr> + <tr> + <td colspan="2"> + <p>绾﹀畾瀹屾垚鏃堕棿(鎶ュ憡鏃ユ湡)</p> + <p class="en">Agreed completion time</p> + </td> + <td>{{ currentInfo.appointed }}</td> + <td> + <p>鎶ュ憡鍙戦�佹柟寮�</p> + <p class="en">Way of report sending</p> + </td> + <td> + <span v-if="currentInfo.send==1">鑷彇 <span class="en">Taken by themselves</span></span> + <span v-else>鍏朵粬 <span class="en">Other:</span></span> + </td> + </tr> + <tr> + <td> + <p>搴忓彿</p> + <p class="en">NO.</p> + </td> + <td> + <p>鏍峰搧缂栧彿</p> + <p class="en">Sample number</p> + </td> + <td> + <p>璇曢獙椤圭洰</p> + <p class="en">Test item</p> + </td> + <td> + <p>妫�楠屼緷鎹�</p> + <p class="en">Test standard</p> + </td> + <td> + <p>澶囨敞</p> + <p class="en">Note</p> + </td> + </tr> + <tr v-for="(item,index) in currentInfo.sampleItems + " :key="index" > + <td>{{ index+1 }}</td> + <td> + <p>{{ item.code }}</p> + <p>{{ item.model }}</p> + </td> + <td>{{ item.product }}</td> + <td>{{ item.standardMethodList }}</td> + <td>{{ item.remark }}</td> + </tr> + <tr> + <td colspan="2"> + <p>鍒ゅ畾瑙勫垯</p> + <p class="en">Criterion rule</p> + </td> + <td colspan="3"> + <span v-if="currentInfo.rule&&!currentInfo.rule.includes('-')">涓嶈�冭檻涓嶇‘瀹氬害 <span class="en">Not considering uncertainty</span></span> + <span v-else-if="currentInfo.rule&¤tInfo.rule.includes('-')">鑰冭檻涓嶇‘瀹氬害 <span class="en">Consider uncertainty ( {{currentInfo.rule.split('-')[1]}}%)</span></span> + <span v-else>/</span> + </td> + </tr> + <tr> + <td colspan="2"> + <p>濮旀墭浜虹鍚�</p> + <p class="en">Signature of consignor</p> + </td> + <td> + <img style="height: 100%;" :src="javaApi+'/img/'+currentInfo.prepareUserUrl" :alt="currentInfo.prepareUser" /> + </td> + <td> + <p>濮旀墭鏃ユ湡</p> + <p class="en">Date of consignation</p> + </td> + <td>{{ currentInfo.createTime }}</td> + </tr> + <tr> + <td colspan="2"> + <p>濮旀墭浜鸿仈绯荤數璇�</p> + <p class="en">Contact number</p> + </td> + <td colspan="3">{{ currentInfo.phone }}</td> + </tr> + <tr> + <td colspan="2"> + <p>缁煎悎瀹ょ鍚�</p> + <p class="en">Signature of general office</p> + </td> + <td><img style="height: 100%;" :src="javaApi+'/img/'+currentInfo.comprehensiveUserUrl" :alt="currentInfo.comprehensiveUser" /></td> + <td> + <p>鎺ユ敹鏃ユ湡</p> + <p class="en">Receipt date</p> + </td> + <td>{{ currentInfo.comprehensiveTime }}</td> + </tr> + <tr> + <td colspan="2"> + <p>棰嗘牱鍛樼鍚�</p> + <p class="en">Signature of sample taker</p> + </td> + <td><img :src="javaApi+'/img/'+currentInfo.issueUserUrl" :alt="currentInfo.issueUser" style="height: 100%;" /></td> + <td> + <p>棰嗘牱鏃ユ湡</p> + <p class="en">Sample date</p> + </td> + <td>{{ currentInfo.issueTime }}</td> + </tr> + <tr> + <td rowspan="3" colspan="2"> + <p>妫�娴嬫満鏋勪俊鎭�</p> + <p class="en">Information about Test center</p> + </td> + <td colspan="3"> + <p>姹熻嫃涓ぉ绉戞妧鑲′唤鏈夐檺鍏徃妫�娴嬩腑蹇�</p> + <p class="en">Test cnter of Jiangsu ZhongtianTechnology CO.,Ltd</p> + </td> + </tr> + <tr> + <td colspan="3"> + <p>鍦板潃锛氭睙鑻忕渷濡備笢鍘挎渤鍙i晣涓ぉ璺�1鍙�</p> + <p class="en">Address:No.1,Zhongtian Village,Hekou Town,Rudong County,Nantong City,JiangsuProvince</p> + </td> + </tr> + <tr> + <td colspan="3"> + <p>鐢佃瘽锛�0513-84885175</p> + <p class="en">Telephone:0513-84885175</p> + </td> + </tr> + </table> + <p style="margin-top: 10px;margin-left: 20px;">娉細鏈楠屽鎵樺崟涓�寮忎簩浠斤紝涓�浠界患鍚堝褰掓。锛屼竴浠藉鎵樺崟浣嶇暀瀛樸��</p> + <p class="en" style="margin-left: 20px;">Note:The commission list of testing is done in duplicate, general office and client shall retain their respective one.</p> + </div> + </div> + </el-dialog> + </div> +</template> + +<script> +import ValueTable from '../tool/value-table.vue' +export default { + components: { + ValueTable + }, + data() { + return { + title:'妫�楠屽鎵樺崟', + detailDialogVisible:false, + addLoading:false, + addDialogVisible:false, + outLoading:false, + componentData: { + entity: { + sample: null, + company: null, + production:null, + prepareUser:null, + orderBy: { + field: 'createTime', + order: 'desc' + } + }, + isIndex: true, + showSelect: false, + select: false, + do: [{ + id: 'handleLook', + font: '鏌ョ湅', + type: 'text', + method: 'handleLook' + }, { + id: 'handleDown', + font: '涓嬭浇', + type: 'text', + method: 'handleDown' + }, { + id: 'delete', + font: '鍒犻櫎', + type: 'text', + method: 'doDiy' + }, { + id: 'handleWork', + font: '琛ュ厖淇℃伅', + type: 'text', + method: 'handleWork' + }], + tagField: { + insState:{ + select: [ + { + label: '寰呭鏍�', + value: 0 + }, { + label: '寰呮楠�', + value: 1 + }, + { + label: '宸叉楠�', + value: 4 + }, + { + label: '閫�鍥�', + value: 2 + }, + { + label: '鎾ら攢', + value: 3 + }, + ] + }, + isLeave:{ + select: [ + { + value:0, + label:'涓嶇暀鏍�' + }, + { + value:1, + label:'鐣欐牱' + }, + ] + }, + processing:{ + select: [ + { + value:0, + label:'濮旀墭鍗曚綅鍙栧洖' + }, + { + value:1, + label:'瀹為獙瀹ゅ鐞�' + }, + ] + }, + }, + selectField: { + sendUser:{ + select: [] + }, + signatory:{ + select: [] + }, + }, + requiredAdd: [], + requiredUp: [], + needSort: [], + inputType:聽'' + }, + entityCopy: {}, + upIndex: 0, + currentInfo:{}, + personList:[], + addInfo:{}, + insStateList:[ + { + label: '寰呭鏍�', + value: 0 + }, { + label: '寰呮楠�', + value: 1 + }, + { + label: '宸叉楠�', + value: 4 + }, + { + label: '閫�鍥�', + value: 2 + }, + { + label: '鎾ら攢', + value: 3 + }, + ] + }; + }, + mounted() { + this.entityCopy = this.HaveJson(this.componentData.entity); + this.getPower() + this.getAuthorizedPerson() + }, + methods: { + getPower(){ + let power = JSON.parse(sessionStorage.getItem('power')) + let del = false + for (var i = 0; i < power.length; i++) { + if (power[i].menuMethod == 'delProcessOrder') { + del = true + } + } + if (!del) { + this.componentData.do.splice(2, 1) + } + }, + refreshTable() { + this.$refs['ValueTable'].selectList() + }, + refresh() { + this.componentData.entity = this.HaveJson(this.entityCopy) + this.upIndex++ + this.refreshTable() + }, + // 瀵煎嚭 + handleDown(row) { + // this.$axios.post(this.$api.processOrder.getProcessOrder,{id:row.id}).then(res => { + // if(res.code==200){ + // this.currentInfo = res.data + // this.title = '涓嬭浇'; + // this.detailDialogVisible = true + // setTimeout(() => { + // this.$nextTick(() => { + // const element = document.getElementById("dialogBody"); + // exportHtmlToPDF(element,row.sample+'-'+row.sampleType+'-'+'妫�楠屽鎵樺崟').then(res=>{ + // this.detailDialogVisible = false + // }) + // }) + // }, 500); + // } + // }).catch(err => { + // }) + this.$axios.post(this.$api.processOrder.exportInspectionOrder,{id:row.id},{responseType: 'blob'}).then(res => { + this.$message.success('瀵煎嚭鎴愬姛') + const blob = new Blob([res], { + type: 'application/force-download' + }) + const filename = decodeURI(row.sample+'-'+row.sampleType+'-'+'妫�楠屽鎵樺崟.docx') + // 鍒涘缓涓�涓秴閾炬帴锛屽皢鏂囦欢娴佽祴杩涘幓锛岀劧鍚庡疄鐜拌繖涓秴閾炬帴鐨勫崟鍑讳簨浠� + const elink = document.createElement('a') + elink.download = filename + elink.style.display = 'none' + elink.href = URL.createObjectURL(blob) + document.body.appendChild(elink) + elink.click(); + URL.revokeObjectURL(elink.href) // 閲婃斁URL 瀵硅薄 + document.body.removeChild(elink) + }).catch(err => { + }) + }, + // 琛ュ厖 + handleWork(row){ + this.addInfo = {...row} + this.currentInfo = row; + this.addDialogVisible = true; + }, + // 浜哄憳鍒楄〃 + getAuthorizedPerson() { + this.$axios.get(this.$api.user.getUserMenu).then(res => { + let data = [] + res.data.forEach(a => { + data.push({ + label: a.name, + value: a.id + }) + }) + this.personList = data + }) + }, + // 琛ュ厖淇濆瓨 + handleAdd(){ + if(this.addInfo.rule=='鑰冭檻涓嶇‘瀹氬害'&&!this.addInfo.num){ + return this.$message({ + type: 'error', + message: '璇疯緭鍏ヨ�冭檻涓嶇‘瀹氬害' + }); + }else if(this.addInfo.rule=='鑰冭檻涓嶇‘瀹氬害'&&this.addInfo.num){ + this.addInfo.rule = '鑰冭檻涓嶇‘瀹氬害-'+this.addInfo.num + } + this.addLoading = true; + this.$axios.post(this.$api.processOrder.doProcessOrder, {id:this.currentInfo.id,...this.addInfo},{headers: { 'Content-Type': 'application/json' },noQs:true}).then(res => { + this.addLoading = false; + if(res.code==201){ + return + } + this.$message({ + type: 'success', + message: '琛ュ厖鎴愬姛' + }); + this.refreshTable() + this.addDialogVisible = false; + }).catch(err => { + }) + }, + // 鏌ョ湅 + handleLook(row){ + this.$axios.post(this.$api.processOrder.getProcessOrder,{id:row.id}).then(res => { + if(res.code==200){ + this.currentInfo = res.data + this.title = '妫�楠屽鎵樺崟'; + this.detailDialogVisible = true + } + }).catch(err => { + }) + }, + }, +} +</script> + +<style scoped> +.title { + height: 60px; + line-height: 60px; + } + .search { + background-color: #fff; + height: 80px; + display: flex; + align-items: center; + } + + .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); + } + + .table { + margin-top: 10px; + background-color: #fff; + width: calc(100% - 40px); + height: calc(100% - 60px - 80px - 10px - 40px); + padding: 20px; + } + .tables { + table-layout: fixed; + width: 100%; + margin-top: 10px; + } + + .tables td { + height: 40px; + width: 100px; + text-align: center; + font-size: 14px; + word-wrap: break-word; + white-space: normal; + } + .en{ + font-size: 12px; + word-break: break-word; /* 鑷姩鏂 */ + overflow-wrap: break-word; /* 闃叉婧㈠嚭 */ + white-space: normal; /* 榛樿鎹㈣ */ + } + + .heads td { + border: 1px dashed black; /* 鍗曞厓鏍肩殑铏氱嚎 */ + padding: 8px; + text-align: left; + } + .downPdf{ + opacity: 0 !important; + } +</style> diff --git a/static/img/logo2.png b/static/img/logo2.png new file mode 100644 index 0000000..d0c5df8 --- /dev/null +++ b/static/img/logo2.png Binary files differ -- Gitblit v1.9.3