<template>
|
<el-dialog title="新增检验委托单" :visible.sync="visible" width="1200px">
|
<div id="dialogBody">
|
<div style="max-height: 75vh;overflow-y: auto;">
|
<div id="dialogBody">
|
<table border="1" cellpadding="10" class="tables heads">
|
<tr>
|
<td rowspan="2">
|
<img alt="" :src="ZTTLogo" style="width: 80%;">
|
</td>
|
<td>
|
<p>记录名称:检验委托单</p>
|
</td>
|
<td>
|
<p>保存期限:6年</p>
|
</td>
|
</tr>
|
<tr>
|
<td>
|
<p>记录编号: ZTT/QR-16-04-a</p>
|
</td>
|
<td>
|
<p>归档部门:综合室</p>
|
</td>
|
</tr>
|
</table>
|
<h4 class="table_h4">
|
检 验 委 托 单
|
</h4>
|
<p
|
v-if="operationType !== 'view'"
|
style="margin-left: 560px;display: flex;align-items: center">
|
<span style="width: 100px">委托编号:</span>
|
<el-input clearable size="small"></el-input>
|
</p>
|
<p v-else style="margin-top: 16px;margin-left: 600px;">
|
委托编号:{{ currentInfo.entrustCode }}
|
</p>
|
<table border="1" cellpadding="10" class="tables">
|
<tr>
|
<td colspan="2">
|
<p>试样名称</p>
|
</td>
|
<td >
|
<el-input v-if="operationType !== 'view'" v-model="currentInfo.sampleName" clearable size="small"></el-input>
|
<span v-else>{{ currentInfo.sampleName }}</span>
|
</td>
|
<td>
|
<p>委托时间</p>
|
</td>
|
<td>
|
<el-date-picker
|
v-if="operationType !== 'view'"
|
v-model="currentInfo.commissionDate"
|
clearable
|
format="yyyy-MM-dd"
|
placeholder="选择日期"
|
size="small"
|
style="width: 100%"
|
type="date"
|
value-format="yyyy-MM-dd">
|
</el-date-picker>
|
<span v-else>{{ currentInfo.commissionDate }}</span>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="2">
|
<p>型 号</p>
|
</td>
|
<td>
|
<el-input v-if="operationType !== 'view'" v-model="currentInfo.modelNo" clearable size="small"></el-input>
|
<span v-else>{{ currentInfo.modelNo }}</span>
|
</td>
|
<td>
|
<p>委托单位</p>
|
</td>
|
<td>
|
<el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionUnit" clearable size="small"></el-input>
|
<span v-else>{{ currentInfo.commissionUnit }}</span>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="2">
|
<p>生产单位</p>
|
</td>
|
<td>
|
<el-input v-if="operationType !== 'view'" v-model="currentInfo.production" clearable size="small"></el-input>
|
<span v-else>{{ currentInfo.production }}</span>
|
</td>
|
<td>
|
<p>委托人</p>
|
</td>
|
<td>
|
<el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionUser" clearable size="small"></el-input>
|
<span v-else>{{ currentInfo.commissionUser }}</span>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="2">
|
<p>样品数量</p>
|
</td>
|
<td>
|
<el-input v-if="operationType !== 'view'" v-model="currentInfo.quantity" clearable size="small"></el-input>
|
<span v-else>{{ currentInfo.quantity }}</span>
|
</td>
|
<td>
|
<p>样品状态</p>
|
</td>
|
<td>
|
<el-input v-if="operationType !== 'view'" v-model="currentInfo.sampleStatus" clearable size="small"></el-input>
|
<span v-else>{{ insStateList.find(m=>m.value==currentInfo.sampleStatus)?insStateList.find(m=>m.value==currentInfo.sampleStatus).label:'/' }}</span>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="2">
|
<p>是否留样</p>
|
</td>
|
<td>
|
<el-radio-group
|
v-if="operationType !== 'view'"
|
v-model="currentInfo.isLeave"
|
v-removeAriaHidden
|
>
|
<el-radio :label="1">是</el-radio>
|
<el-radio :label="0">否</el-radio>
|
</el-radio-group>
|
<div v-else>
|
<span v-if="currentInfo.isLeave==1">是</span>
|
<span v-else>否</span>
|
</div>
|
</td>
|
<td>
|
<p>样品处理方式</p>
|
</td>
|
<td v-if="operationType !== 'view'">
|
<el-radio-group v-model="currentInfo.processing" v-removeAriaHidden>
|
<el-radio :label="0">委托单位取回</el-radio>
|
<el-radio :label="1">实验室处理</el-radio>
|
</el-radio-group>
|
</td>
|
<td v-else>
|
<span v-if="currentInfo.processing==0">委托单位取回</span>
|
<span v-else>实验室处理</span>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="2">
|
<p>约定完成时间(报告日期)</p>
|
</td>
|
<td>
|
<el-date-picker
|
v-if="operationType !== 'view'"
|
v-model="currentInfo.appointed"
|
clearable
|
format="yyyy-MM-dd"
|
placeholder="选择日期"
|
size="small"
|
style="width: 100%"
|
type="date"
|
value-format="yyyy-MM-dd">
|
</el-date-picker>
|
<span v-else>
|
{{ currentInfo.appointed }}
|
</span>
|
</td>
|
<td>
|
<p>报告发送方式</p>
|
</td>
|
<td >
|
<el-radio-group
|
v-if="operationType !== 'view'"
|
v-model="currentInfo.send" v-removeAriaHidden
|
>
|
<el-radio :label="1">自取</el-radio>
|
<el-radio :label="0">其他</el-radio>
|
</el-radio-group>
|
<div v-else>
|
<span v-if="currentInfo.send==1">自取</span>
|
<span v-else>其他</span>
|
</div>
|
</td>
|
</tr>
|
<el-button class="add_btn" size="small" type="primary" @click="addOrderDetailList">添加</el-button>
|
<tr>
|
<td>
|
<p>序号</p>
|
</td>
|
<td>
|
<p>样品编号</p>
|
</td>
|
<td>
|
<p>试验项目</p>
|
</td>
|
<td>
|
<p>检验依据</p>
|
</td>
|
<td>
|
<p>备注</p>
|
</td>
|
</tr>
|
<tr v-for="(item,index) in currentInfo.orderDetailList" :key="index" >
|
<td>{{ index+1 }}</td>
|
<td>
|
<el-input v-if="operationType !== 'view'" v-model="item.sampleNumber" clearable size="small"></el-input>
|
<span v-else>{{ item.sampleNumber }}</span>
|
</td>
|
<td>
|
<el-input v-if="operationType !== 'view'"v-model="item.testItem" clearable size="small"></el-input>
|
<span v-else>{{ item.testItem }}</span>
|
</td>
|
<td>
|
<el-input v-if="operationType !== 'view'" v-model="item.testStandard" clearable size="small"></el-input>
|
<span v-else>{{ item.testStandard }}</span>
|
</td>
|
<td>
|
<el-input v-if="operationType !== 'view'" v-model="item.remark" clearable size="small"></el-input>
|
<span v-else>{{ item.remark }}</span>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="2">
|
<p>判定规则</p>
|
</td>
|
<td v-if="operationType !== 'view'" colspan="3">
|
<el-radio-group v-model="currentInfo.criterionRule" v-removeAriaHidden>
|
<el-radio :label="0">不考虑不确定度</el-radio>
|
<el-radio :label="1">考虑不确定度</el-radio>
|
</el-radio-group>
|
<span v-if="currentInfo.criterionRule === 1">
|
<el-input v-model="currentInfo.criterionRuleRemark" clearable size="small" style="width: 60px"></el-input>
|
%
|
</span>
|
</td>
|
<td v-else colspan="3">
|
<span v-if="currentInfo.criterionRule===0">不考虑不确定度</span>
|
<span v-if="currentInfo.criterionRule===1">考虑不确定度</span>
|
<span v-if="currentInfo.criterionRule===1">{{ currentInfo.criterionRuleRemark + '%' }}</span>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="2">
|
<p>委托人签名</p>
|
</td>
|
<td>
|
<el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionUser" clearable size="small"></el-input>
|
<span v-else>{{currentInfo.commissionUser}}</span>
|
</td>
|
<td>
|
<p>委托日期</p>
|
</td>
|
<td>
|
<el-date-picker
|
v-if="operationType !== 'view'"
|
v-model="currentInfo.commissionDate"
|
clearable
|
format="yyyy-MM-dd"
|
placeholder="选择日期"
|
size="small"
|
style="width: 100%"
|
type="date"
|
value-format="yyyy-MM-dd">
|
</el-date-picker>
|
<span v-else>{{ currentInfo.commissionDate }}</span>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="2">
|
<p>委托人联系电话</p>
|
</td>
|
<td colspan="3">
|
<el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionPhone" clearable size="small"></el-input>
|
<span v-else>{{ currentInfo.commissionPhone }}</span>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="2">
|
<p>综合室签名</p>
|
</td>
|
<td>
|
<el-input v-if="operationType !== 'view'" v-model="currentInfo.generalOfficeUser" clearable size="small"></el-input>
|
<span v-else>{{currentInfo.generalOfficeUser}}</span>
|
</td>
|
<td>
|
<p>接收日期</p>
|
</td>
|
<td>
|
<el-date-picker
|
v-if="operationType !== 'view'"
|
v-model="currentInfo.receiptData"
|
clearable
|
format="yyyy-MM-dd"
|
placeholder="选择日期"
|
size="small"
|
style="width: 100%"
|
type="date"
|
value-format="yyyy-MM-dd">
|
</el-date-picker>
|
<span v-else>{{ currentInfo.receiptData }}</span>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="2">
|
<p>领样员签名</p>
|
</td>
|
<td>
|
<el-input v-if="operationType !== 'view'" v-model="currentInfo.sampleTakerUser" clearable size="small"></el-input>
|
<span v-else>{{ currentInfo.sampleTakerUser }}</span>
|
</td>
|
<td>
|
<p>领样日期</p>
|
</td>
|
<td v-if="operationType !== 'view'">
|
<el-date-picker
|
v-model="currentInfo.sampleData"
|
clearable
|
format="yyyy-MM-dd"
|
placeholder="选择日期"
|
size="small"
|
style="width: 100%"
|
type="date"
|
value-format="yyyy-MM-dd">
|
</el-date-picker>
|
</td>
|
<td v-else>{{ currentInfo.sampleData }}</td>
|
</tr>
|
<tr>
|
<td colspan="2" rowspan="3">
|
<p>检测机构信息</p>
|
</td>
|
<td colspan="3">
|
<p>江苏中天科技股份有限公司检测中心</p>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="3">
|
<p>地址:江苏省南通市经济技术开发区新开南路 19 号</p>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="3">
|
<p>电话:0513-89059043</p>
|
</td>
|
</tr>
|
</table>
|
<p style="margin-top: 10px;margin-left: 20px;">注:本检验委托单一式二份,一份综合室归档,一份委托单位留存。</p>
|
</div>
|
</div>
|
</div>
|
<span v-if="operationType !== 'view'" slot="footer" class="dialog-footer">
|
<el-button @click="detailDialogVisible = false">取 消</el-button>
|
<el-button v-if="operationType === 'add'" :loading="buttonLoading" type="primary" @click="handleAdd">
|
确 定
|
</el-button>
|
<el-button v-if="operationType === 'edit'" :loading="buttonLoading" type="primary" @click="handleEdit">
|
确 定
|
</el-button>
|
</span>
|
</el-dialog>
|
</template>
|
<script>
|
import ZTTLogo from "@/assets/logo/ZTTlogo.png"
|
export default {
|
name: 'AddContracts',
|
data() {
|
return {
|
ZTTLogo,
|
visible: false,
|
operationType: '',
|
currentInfo:{
|
orderDetailList: []
|
},
|
}
|
},
|
methods: {
|
open() {
|
this.visible = true
|
}
|
}
|
}
|
</script>
|
<style lang="scss" scoped>
|
.tables {
|
table-layout: fixed;
|
width: 100%;
|
margin-top: 10px;
|
border-collapse: collapse; /* 关键属性:合并边框 */
|
td {
|
height: 40px;
|
width: 100px;
|
text-align: center;
|
font-size: 14px;
|
word-wrap: break-word;
|
white-space: normal;
|
p {
|
margin: unset
|
}
|
}
|
}
|
.heads {
|
td {
|
border: 1px dashed black; /* 单元格的虚线 */
|
padding: 8px;
|
text-align: left;
|
}
|
}
|
.table_h4 {
|
display: flex;
|
align-items: center;
|
flex-direction: column;
|
justify-content: center;
|
font-size: 28px;
|
font-weight: bold;
|
margin: 10px 0 10px 0;
|
}
|
.add_btn {
|
margin: 10px 0 10px 10px;
|
}
|
</style>
|