新疆——新聚lims
1.每个检验项都要有一个选择检测时间的地方,跟温湿度放在一起,还有检测地点,设备也要单独绑定检验项,最后导出模版再总结到一起
2.产品名称改为检测依据、加一个样品名称手输
3.下单时原始记录模板可以从标准库绑定的模板进行删减
| | |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div style="text-align: left; margin-top: 8px;"> |
| | | <el-form :inline="true" :model="currentOtherForm" class="form-inline" label-width="50px" |
| | | style="text-align: left; display: inline"> |
| | | <el-form-item label="温度:" style="margin-bottom: 0"> |
| | | <div class="template-panel"> |
| | | <el-form :inline="true" :model="currentOtherForm" class="form-inline" size="small" label-width="84px"> |
| | | <el-form-item label="温度:"> |
| | | <el-input v-model="currentOtherForm.temperature" :disabled="state > 1" placeholder="" size="small" |
| | | style="width: 90px" @change="m => subOtherForm(m, 'temperature')"></el-input> |
| | | <span style="margin-left: 4px">℃</span> |
| | | <span class="template-panel__unit">℃</span> |
| | | </el-form-item> |
| | | <el-form-item label="湿度:" style="margin-bottom: 0"> |
| | | <el-form-item label="湿度:"> |
| | | <el-input v-model="currentOtherForm.humidity" :disabled="state > 1" placeholder="" size="small" |
| | | style="width: 90px" @change="m => subOtherForm(m, 'humidity')"></el-input> |
| | | <span style="margin-left: 4px">%RH</span> |
| | | <span class="template-panel__unit">%RH</span> |
| | | </el-form-item> |
| | | <el-form-item label="检测时间:"> |
| | | <el-date-picker v-model="currentOtherForm.detectionTime" :disabled="state > 1" type="date" |
| | | value-format="yyyy-MM-dd" placeholder="请选择日期" size="small" style="width: 160px" |
| | | @change="m => subOtherForm(m, 'detectionTime')"></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="检测地点:"> |
| | | <el-input v-model="currentOtherForm.detectionPlace" :disabled="state > 1" clearable |
| | | placeholder="请输入检测地点" size="small" style="width: 200px" |
| | | @change="m => subOtherForm(m, 'detectionPlace')"></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="isDirectTemplateOrder()" label="设备:"> |
| | | <el-select v-model="currentOtherForm.deviceIds" :disabled="state != 1" multiple filterable clearable |
| | | size="small" placeholder="请选择设备" style="width: 360px" |
| | | @change="m => subOtherForm(m, 'deviceIds')"> |
| | | <el-option v-for="device in deviceOptions" :key="device.id" :label="device.label" |
| | | :value="device.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | numOptions: [], |
| | | temperatureOptions: [], |
| | | wareTableData: [], |
| | | // 温度、湿度按模板 id 分组:{ [templateId]: { temperature, humidity } } |
| | | // 检测条件按模板 id 分组:{ [templateId]: { temperature, humidity, detectionTime, detectionPlace, deviceIds } } |
| | | otherForm: {}, |
| | | deviceOptions: [], |
| | | equipForm: { |
| | | value0: null, |
| | | code0: null, |
| | |
| | | action() { |
| | | return this.javaApi + "/insOrderPlan/uploadFile"; |
| | | }, |
| | | // 当前模板对应的温度、湿度 |
| | | // 当前模板对应的检测条件 |
| | | currentOtherForm() { |
| | | return this.otherForm[this.currentTable] || { |
| | | temperature: null, |
| | | humidity: null |
| | | humidity: null, |
| | | detectionTime: null, |
| | | detectionPlace: null, |
| | | deviceIds: [] |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.sampleProduct = res.data.sampleProduct |
| | | this.currentSample = this.HaveJson(this.sampleProduct[0]) |
| | | let insProduct = this.HaveJson(this.currentSample.insProduct) |
| | | // 温度、湿度赋值:按模板 id 分组回显 |
| | | // 检测条件赋值:按模板 id 分组回显 |
| | | this.otherForm = {} |
| | | const conditionList = this.insOrder.templateConditions || [] |
| | | conditionList.forEach(item => { |
| | | this.$set(this.otherForm, item.templateId, { |
| | | temperature: item.temperature != null ? item.temperature : null, |
| | | humidity: item.humidity != null ? item.humidity : null |
| | | humidity: item.humidity != null ? item.humidity : null, |
| | | detectionTime: item.detectionTime != null ? item.detectionTime : null, |
| | | detectionPlace: item.detectionPlace != null ? item.detectionPlace : null, |
| | | deviceIds: Array.isArray(item.deviceIds) ? [...item.deviceIds] : [] |
| | | }) |
| | | }) |
| | | if (this.typeSource == '1') { |
| | | this.retestTag = '1' |
| | | } |
| | | this.getEquipOptions(1) |
| | | if (this.sonLaboratory === '新聚') { |
| | | this.loadDeviceOptions() |
| | | } |
| | | // 获取当前样品的检验项 |
| | | let list = await this.getCurrentProduct(this.currentSample.id, 0) |
| | | if (list === undefined) { |
| | |
| | | }) |
| | | } |
| | | }, |
| | | // 新聚直接绑定模板的单据,设备按模板选择 |
| | | isDirectTemplateOrder() { |
| | | return this.sonLaboratory === '新聚' && this.currentSample && |
| | | (this.currentSample.insProduct || []).some(product => product.templateRowIndex != null) |
| | | }, |
| | | loadDeviceOptions() { |
| | | search({ status: 0 }).then(res => { |
| | | this.deviceOptions = (res.data || []).map(device => ({ |
| | | id: device.id, |
| | | label: `${device.deviceName}--${device.managementNumber}` |
| | | })) |
| | | }).catch(error => { |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | getUserInfo() { |
| | | getUserNow().then(res => { |
| | | this.userId = res.data.id |
| | |
| | | this.$message.error('未输入不通过原因') |
| | | } |
| | | }, |
| | | // 保证模板的温度、湿度槽位存在 |
| | | // 保证模板的检测条件槽位存在 |
| | | ensureOtherForm(templateId) { |
| | | if (templateId == null) return |
| | | if (!this.otherForm[templateId]) { |
| | | this.$set(this.otherForm, templateId, { |
| | | temperature: null, |
| | | humidity: null |
| | | humidity: null, |
| | | detectionTime: null, |
| | | detectionPlace: null, |
| | | deviceIds: [] |
| | | }) |
| | | } |
| | | }, |
| | | // 保存当前模板的温度、湿度 |
| | | // 保存当前模板的检测条件 |
| | | subOtherForm(m, type) { |
| | | write({ |
| | | const payload = { |
| | | id: this.insOrder.id, |
| | | templateId: this.currentTable, |
| | | [type]: Number(m) |
| | | }).then(res => { |
| | | templateId: this.currentTable |
| | | } |
| | | if (type === 'deviceIds') { |
| | | payload.deviceIds = Array.isArray(m) ? [...m] : [] |
| | | } else if (type === 'detectionTime' || type === 'detectionPlace') { |
| | | payload[type] = m === '' || m == null ? null : m |
| | | } else { |
| | | payload[type] = Number(m) |
| | | } |
| | | write(payload).then(res => { |
| | | this.$message.success("保存成功") |
| | | }) |
| | | }, |
| | |
| | | this.$message.error("请指定复核人员") |
| | | return |
| | | } |
| | | const labels = { temperature: "温度", humidity: "湿度" } |
| | | const keys = ["temperature", "humidity"] |
| | | const missing = [] |
| | | this.tableLists.forEach(m => { |
| | | const form = this.otherForm[m.templateId] || {} |
| | | keys.forEach(key => { |
| | | if (!form[key]) missing.push(`「${m.templateName}」的${labels[key]}`) |
| | | }) |
| | | if (!form.temperature) missing.push(`请填写「${m.templateName}」的温度`) |
| | | if (!form.humidity) missing.push(`请填写「${m.templateName}」的湿度`) |
| | | if (!form.detectionTime) missing.push(`请选择「${m.templateName}」的检测时间`) |
| | | if (!form.detectionPlace) missing.push(`请填写「${m.templateName}」的检测地点`) |
| | | if (this.isDirectTemplateOrder() && (!form.deviceIds || form.deviceIds.length === 0)) { |
| | | missing.push(`请选择「${m.templateName}」的设备`) |
| | | } |
| | | }) |
| | | if (missing.length > 0) { |
| | | this.$message.error(`请填写${missing[0]}`) |
| | | this.$message.error(missing[0]) |
| | | return |
| | | } |
| | | this.submitLoading = true; |
| | |
| | | text-align: left; |
| | | } |
| | | |
| | | /* 当前检验模板的检测条件 */ |
| | | .template-panel { |
| | | background-color: #f8f9fb; |
| | | border: 1px solid #ebeef5; |
| | | border-radius: 3px; |
| | | padding: 16px 16px 4px; |
| | | margin-top: 12px; |
| | | text-align: left; |
| | | } |
| | | |
| | | /* form-item 用 inline-flex 保证 label 与控件同行,不依赖行盒宽度推算 */ |
| | | .template-panel>>>.el-form-item { |
| | | display: inline-flex; |
| | | align-items: center; |
| | | margin-bottom: 12px; |
| | | } |
| | | |
| | | .template-panel>>>.el-form-item__label { |
| | | flex: none; |
| | | } |
| | | |
| | | .template-panel__unit { |
| | | margin-left: 4px; |
| | | color: #606266; |
| | | } |
| | | |
| | | .center { |
| | | width: calc(100% - 40px); |
| | | /* max-height: 580px; */ |
| | |
| | | <template> |
| | | <div v-loading="loading" class="inspection" style="background-color: rgb(245, 247, 251);"> |
| | | <el-row class="title"> |
| | | <el-col v-if="insOrder.ifsOrderType!=='02wg'" :span="8" style="text-align: left"> |
| | | <el-form :inline="true" :model="currentOtherForm" class="form-inline" label-width="50px" |
| | | style="text-align: right; padding-top: 0; display: inline"> |
| | | <el-form-item label="温度:" style="margin-bottom: 0"> |
| | | <el-input v-model="currentOtherForm.temperature" :disabled="state > 1" placeholder="" size="small" |
| | | style="width: 90px; line-height: 60px" @change="(m) => subOtherForm(m, 'temperature')"></el-input> |
| | | <span style="margin-left: 4px">℃</span> |
| | | </el-form-item> |
| | | <el-form-item label="湿度:" style="margin-bottom: 0"> |
| | | <el-input v-model="currentOtherForm.humidity" :disabled="state > 1" placeholder="" size="small" |
| | | style="width: 90px; line-height: 60px" @change="(m) => subOtherForm(m, 'humidity')"></el-input> |
| | | <span style="margin-left: 4px">%RH</span> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | <el-col :span="insOrder.ifsOrderType!=='02wg'?16:24" style="text-align: right"> |
| | | <el-col :span="24" style="text-align: right"> |
| | | <el-button v-if="insOrder.ifsOrderType && insOrder.ifsOrderType==='02wg'" size="small" type="primary" @click="showMaterialPropsDialog">IFS物料属性更新</el-button> |
| | | <el-button size="small" type="primary" @click="refreshView">刷新</el-button> |
| | | <el-button v-if="typeSource == 1" size="small" type="primary" @click="openPurchase">进货验证</el-button> |
| | |
| | | </template> |
| | | <template v-else> |
| | | <el-descriptions-item label="委托编号">{{ insOrder.entrustCode }}</el-descriptions-item> |
| | | <el-descriptions-item label="检测依据">{{ insOrder.sample || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="样品名称">{{ insOrder.sampleView || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="样品编号">{{ currentSample.sampleCode }}</el-descriptions-item> |
| | | <el-descriptions-item label="样品名称">{{ currentSample.sample }}</el-descriptions-item> |
| | | <el-descriptions-item label="样品数量">{{ insOrder.testQuantity }}</el-descriptions-item> |
| | | <el-descriptions-item label="下发时间">{{ insOrder.sendTime }}</el-descriptions-item> |
| | | <el-descriptions-item label="紧急程度">{{ insOrder.typeName }}</el-descriptions-item> |
| | |
| | | <el-descriptions-item label="备注"> |
| | | <el-input v-model="insOrder.remark" :disabled="state != 1" clearable placeholder="请输入" size="small" |
| | | @blur="subOtherForm(insOrder.remark, 'remark')"></el-input> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item v-if="isDirectTemplateOrder()" label="设备" :span="2"> |
| | | <el-select v-model="selectedDeviceIds" multiple filterable clearable size="small" placeholder="请选择设备" |
| | | :disabled="state != 1" @change="saveOverviewDevices"> |
| | | <el-option v-for="device in orderDeviceOptions" :key="device.id" :label="device.label" :value="device.id" /> |
| | | </el-select> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="检验结论"> |
| | | <el-radio-group v-model="reviewInsResult" :disabled="state != 2"> |
| | | <el-radio :label="1">合格</el-radio> |
| | | <el-radio :label="0">不合格</el-radio> |
| | | </el-radio-group> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </div> |
| | |
| | | @click="dataAcquisitionEidtAble = !dataAcquisitionEidtAble">{{ dataAcquisitionEidtAble ? "关闭编辑" : "编辑数采" |
| | | }}</el-button> |
| | | </div> |
| | | </div> |
| | | <!-- 当前检验模板的检测条件与检验结论 --> |
| | | <div class="template-panel"> |
| | | <el-form v-if="showTemplateConditions" :inline="true" :model="currentOtherForm" class="form-inline" |
| | | size="small" label-width="84px"> |
| | | <el-form-item v-if="insOrder.ifsOrderType!=='02wg'" label="温度:"> |
| | | <el-input v-model="currentOtherForm.temperature" :disabled="state > 1" placeholder="" size="small" |
| | | style="width: 90px" @change="(m) => subOtherForm(m, 'temperature')"></el-input> |
| | | <span class="template-panel__unit">℃</span> |
| | | </el-form-item> |
| | | <el-form-item v-if="insOrder.ifsOrderType!=='02wg'" label="湿度:"> |
| | | <el-input v-model="currentOtherForm.humidity" :disabled="state > 1" placeholder="" size="small" |
| | | style="width: 90px" @change="(m) => subOtherForm(m, 'humidity')"></el-input> |
| | | <span class="template-panel__unit">%RH</span> |
| | | </el-form-item> |
| | | <el-form-item v-if="insOrder.ifsOrderType!=='02wg'" label="检测时间:"> |
| | | <el-date-picker v-model="currentOtherForm.detectionTime" :disabled="state > 1" type="date" |
| | | value-format="yyyy-MM-dd" placeholder="请选择日期" size="small" style="width: 160px" |
| | | @change="(m) => subOtherForm(m, 'detectionTime')"></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item v-if="insOrder.ifsOrderType!=='02wg'" label="检测地点:"> |
| | | <el-input v-model="currentOtherForm.detectionPlace" :disabled="state > 1" clearable placeholder="请输入检测地点" |
| | | size="small" style="width: 200px" @change="(m) => subOtherForm(m, 'detectionPlace')"></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="isDirectTemplateOrder()" label="设备:"> |
| | | <el-select v-model="currentOtherForm.deviceIds" :disabled="state != 1" multiple filterable clearable |
| | | size="small" placeholder="请选择设备" style="width: 360px" |
| | | @change="(m) => subOtherForm(m, 'deviceIds')"> |
| | | <el-option v-for="device in orderDeviceOptions" :key="device.id" :label="device.label" :value="device.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- 复核时才能选 --> |
| | | <el-form :inline="true" :model="currentOtherForm" |
| | | :class="['form-inline', { 'template-panel__conclusion--divided': showTemplateConditions }]" |
| | | size="small" label-width="84px"> |
| | | <el-form-item label="检验结论:"> |
| | | <el-radio-group v-model="currentOtherForm.insResult" :disabled="state != 2" |
| | | @change="(m) => subOtherForm(m, 'insResult')"> |
| | | <el-radio :label="1">合格</el-radio> |
| | | <el-radio :label="0">不合格</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <!-- 常规检验原始记录 --> |
| | | <div id="nav" v-loading="tableLoading" class="center-box"> |
| | |
| | | submitPlan, |
| | | saveInsContext, |
| | | saveTemplateContext, |
| | | getOrderDevices, |
| | | saveOrderDevices, |
| | | selectUserCondition, |
| | | downFile, |
| | | getFileList, |
| | |
| | | excelMethodList: [], |
| | | equipOptions: [], |
| | | orderDeviceOptions: [], |
| | | selectedDeviceIds: [], |
| | | reviewLoading: false, |
| | | reviewDia: false, |
| | | noReason: "", |
| | | reviewInsResult: null, |
| | | tableWidth: 1000, |
| | | currentTable: null, |
| | | tableLists: [], |
| | |
| | | inspectionItem: 1, |
| | | inspectionItemSubclass: "20(常温)", |
| | | }, |
| | | // 温度、湿度按模板 id 分组:{ [templateId]: { temperature, humidity } } |
| | | // 检测条件与检验结论按模板 id 分组:{ [templateId]: { temperature, humidity, detectionTime, detectionPlace, deviceIds, insResult } } |
| | | otherForm: {}, |
| | | equipForm: { |
| | | value0: null, |
| | |
| | | action() { |
| | | return this.javaApi + "/insOrderPlan/uploadFile"; |
| | | }, |
| | | // 当前模板对应的温度、湿度 |
| | | // 当前模板对应的检测条件与检验结论 |
| | | currentOtherForm() { |
| | | return ( |
| | | this.otherForm[this.currentTable] || { |
| | | temperature: null, |
| | | humidity: null, |
| | | detectionTime: null, |
| | | detectionPlace: null, |
| | | deviceIds: [], |
| | | insResult: null, |
| | | } |
| | | ); |
| | | }, |
| | | // 02wg 单没有温湿度;新聚直接绑定模板的单只有设备 |
| | | showTemplateConditions() { |
| | | return this.insOrder.ifsOrderType !== "02wg" || this.isDirectTemplateOrder(); |
| | | }, |
| | | }, |
| | | created() { |
| | |
| | | this.tableList = this.tableLists.filter( |
| | | (m) => m.templateId == val1 |
| | | ); |
| | | // 模板集合可能变化,补齐温度、湿度槽位 |
| | | // 模板集合可能变化,补齐检测条件槽位 |
| | | this.tableLists.forEach((m) => this.ensureOtherForm(m.templateId)); |
| | | // 对模板进行处理 |
| | | this.handleTableData(); |
| | |
| | | laboratory: this.sonLaboratory, |
| | | }).then(async (res) => { |
| | | this.insOrder = res.data.insOrder; |
| | | this.reviewInsResult = this.insOrder.insResult; |
| | | if(res.data.insOrder.ifsOrderType==='02wg'){ |
| | | //查询零件属性 |
| | | this.getPartProps(res.data.insOrder.ifsInventoryId) |
| | |
| | | this.sampleProduct = res.data.sampleProduct; |
| | | this.currentSample = this.HaveJson(this.sampleProduct[0]); |
| | | let insProduct = this.HaveJson(this.currentSample.insProduct); |
| | | // 温度、湿度赋值:按模板 id 分组回显 |
| | | // 检测条件与检验结论赋值:按模板 id 分组回显 |
| | | this.otherForm = {}; |
| | | (this.insOrder.templateConditions || []).forEach((item) => { |
| | | this.$set(this.otherForm, item.templateId, { |
| | | temperature: item.temperature != null ? item.temperature : null, |
| | | humidity: item.humidity != null ? item.humidity : null, |
| | | detectionTime: item.detectionTime != null ? item.detectionTime : null, |
| | | detectionPlace: item.detectionPlace != null ? item.detectionPlace : null, |
| | | deviceIds: Array.isArray(item.deviceIds) ? [...item.deviceIds] : [], |
| | | insResult: item.insResult != null ? item.insResult : null, |
| | | }); |
| | | }); |
| | | this.tableLists.forEach((m) => this.ensureOtherForm(m.templateId)); |
| | |
| | | } |
| | | this.getEquipOptions(1); |
| | | if (this.sonLaboratory === "新聚") { |
| | | this.loadOverviewDevices(); |
| | | this.loadDeviceOptions(); |
| | | } |
| | | // 获取当前样品的检验项 |
| | | let list = await this.getCurrentProduct(this.currentSample.id, 0); |
| | |
| | | this.worker0 = null; |
| | | } |
| | | }, |
| | | // 保证模板的温度、湿度槽位存在 |
| | | // 保证模板的检测条件与检验结论槽位存在 |
| | | ensureOtherForm(templateId) { |
| | | if (templateId == null) return; |
| | | if (!this.otherForm[templateId]) { |
| | | this.$set(this.otherForm, templateId, { |
| | | temperature: null, |
| | | humidity: null, |
| | | detectionTime: null, |
| | | detectionPlace: null, |
| | | deviceIds: [], |
| | | insResult: null, |
| | | }); |
| | | } |
| | | }, |
| | | // 保存当前模板的温度、湿度;备注是单据级,不带模板 |
| | | // 保存当前模板的检测条件与检验结论;备注是单据级,不带模板 |
| | | subOtherForm(m, type) { |
| | | const payload = { id: this.insOrder.id }; |
| | | if (type === "remark") { |
| | | payload.remark = m; |
| | | } else { |
| | | payload.templateId = this.currentTable; |
| | | if (type === "deviceIds") { |
| | | payload.deviceIds = Array.isArray(m) ? [...m] : []; |
| | | } else if (type === "detectionTime" || type === "detectionPlace") { |
| | | payload[type] = m === "" || m == null ? null : m; |
| | | } else { |
| | | payload[type] = Number(m); |
| | | } |
| | | } |
| | | write(payload).then((res) => { |
| | | this.$message.success("保存成功"); |
| | |
| | | this.tableList = null; |
| | | this.tableList = [this.tableLists[0]]; |
| | | this.currentTable = this.tableLists[0].templateId; |
| | | // 补齐每个模板的温度、湿度槽位 |
| | | // 补齐每个模板的检测条件槽位 |
| | | this.tableLists.forEach((m) => this.ensureOtherForm(m.templateId)); |
| | | // 处理页面列表数据 |
| | | this.handleTableData(); |
| | |
| | | upInsReview(e) { |
| | | if (e == 1) { |
| | | // 通过 |
| | | if (this.reviewInsResult !== 0 && this.reviewInsResult !== 1) { |
| | | this.$message.error("请选择检验结论"); |
| | | // 每个模板都要有结论;全部合格才算整单合格 |
| | | const insResults = this.tableLists.map( |
| | | (m) => (this.otherForm[m.templateId] || {}).insResult |
| | | ); |
| | | const missingIndex = insResults.findIndex((r) => r !== 0 && r !== 1); |
| | | if (missingIndex > -1) { |
| | | this.$message.error( |
| | | `请选择「${this.tableLists[missingIndex].templateName}」的检验结论` |
| | | ); |
| | | return; |
| | | } |
| | | this.reviewLoading = true; |
| | |
| | | laboratory: this.sonLaboratory, |
| | | tell: null, |
| | | userId: this.checkUser, |
| | | insResult: this.reviewInsResult, |
| | | insResult: insResults.every((r) => r === 1) ? 1 : 0, |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | |
| | | this.$message.error("请指定复核人员"); |
| | | return; |
| | | } |
| | | if (this.isDirectTemplateOrder() && (!this.selectedDeviceIds || this.selectedDeviceIds.length === 0)) { |
| | | this.$message.error("请选择设备"); |
| | | return; |
| | | } |
| | | if (this.insOrder.ifsOrderType !== "02wg") { |
| | | const labels = { temperature: "温度", humidity: "湿度" }; |
| | | const missing = []; |
| | | this.tableLists.forEach((m) => { |
| | | const form = this.otherForm[m.templateId] || {}; |
| | | ["temperature", "humidity"].forEach((key) => { |
| | | if (!form[key]) missing.push(`「${m.templateName}」的${labels[key]}`); |
| | | }); |
| | | if (this.insOrder.ifsOrderType !== "02wg") { |
| | | if (!form.temperature) missing.push(`请填写「${m.templateName}」的温度`); |
| | | if (!form.humidity) missing.push(`请填写「${m.templateName}」的湿度`); |
| | | if (!form.detectionTime) missing.push(`请选择「${m.templateName}」的检测时间`); |
| | | if (!form.detectionPlace) missing.push(`请填写「${m.templateName}」的检测地点`); |
| | | } |
| | | if (this.isDirectTemplateOrder() && (!form.deviceIds || form.deviceIds.length === 0)) { |
| | | missing.push(`请选择「${m.templateName}」的设备`); |
| | | } |
| | | }); |
| | | if (missing.length > 0) { |
| | | this.$message.error(`请填写${missing[0]}`); |
| | | this.$message.error(missing[0]); |
| | | return; |
| | | } |
| | | } |
| | | if (!this.insOrder.lotPartId && this.insOrder.ifsOrderType==='02wg') { |
| | | this.$message.error("请填写IFS库存物料批次属性"); |
| | |
| | | return this.sonLaboratory === "新聚" && this.currentSample && |
| | | (this.currentSample.insProduct || []).some((product) => product.templateRowIndex != null); |
| | | }, |
| | | loadOverviewDevices() { |
| | | Promise.all([search({ status: 0 }), getOrderDevices({ orderId: this.orderId })]).then(([devices, selected]) => { |
| | | loadDeviceOptions() { |
| | | search({ status: 0 }).then((devices) => { |
| | | this.orderDeviceOptions = (devices.data || []).map((device) => ({ |
| | | id: device.id, |
| | | label: `${device.deviceName}--${device.managementNumber}`, |
| | | })); |
| | | this.selectedDeviceIds = selected.data || []; |
| | | }); |
| | | }, |
| | | saveOverviewDevices() { |
| | | return saveOrderDevices({ orderId: this.orderId, deviceIds: this.selectedDeviceIds }) |
| | | .then(() => this.$message.success("设备已保存")); |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition({ type: 1 }).then((res) => { |
| | |
| | | text-align: left; |
| | | } |
| | | |
| | | /* 当前检验模板的检测条件与检验结论 */ |
| | | .template-panel { |
| | | background-color: #f8f9fb; |
| | | border: 1px solid #ebeef5; |
| | | border-radius: 3px; |
| | | padding: 16px 16px 4px; |
| | | margin-bottom: 12px; |
| | | text-align: left; |
| | | } |
| | | |
| | | /* form-item 用 inline-flex 保证 label 与控件同行,不依赖行盒宽度推算 */ |
| | | .template-panel>>>.el-form-item { |
| | | display: inline-flex; |
| | | align-items: center; |
| | | margin-bottom: 12px; |
| | | } |
| | | |
| | | .template-panel>>>.el-form-item__label { |
| | | flex: none; |
| | | } |
| | | |
| | | .template-panel__unit { |
| | | margin-left: 4px; |
| | | color: #606266; |
| | | } |
| | | |
| | | .template-panel__conclusion--divided { |
| | | border-top: 1px dashed #e4e7ed; |
| | | padding-top: 12px; |
| | | } |
| | | |
| | | .center { |
| | | width: 100%; |
| | | /* max-height: 580px; */ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div v-show="!cableConfigShow&&!auxiliaryShow"> |
| | | <div style="display: flex;justify-content: space-between;align-items:center;"> |
| | | <div>委托单信息</div> |
| | | <div> |
| | | <el-cascader |
| | | v-model="addObj.quarterItemId" |
| | | :disabled="active>1" |
| | | :options="quarterItemOptions" |
| | | size="small" |
| | | style="width: 380px" |
| | | @focus="getQuarterOnOrderList"></el-cascader> |
| | | <div v-show="!cableConfigShow&&!auxiliaryShow" class="order-header"> |
| | | <span class="order-header__title">委托单信息</span> |
| | | <div class="order-header__actions"> |
| | | <!-- <el-cascader--> |
| | | <!-- v-model="addObj.quarterItemId"--> |
| | | <!-- :disabled="active>1"--> |
| | | <!-- :options="quarterItemOptions"--> |
| | | <!-- placeholder="请选择季度"--> |
| | | <!-- size="small"--> |
| | | <!-- class="order-header__quarter"--> |
| | | <!-- @focus="getQuarterOnOrderList"></el-cascader>--> |
| | | <el-select v-show="active==1" v-model="template" placeholder="下单模板" size="small" |
| | | class="order-header__template" |
| | | @change="selectInsOrderTemplateById"> |
| | | <el-option v-for="(a, ai) in templates" :key="ai" :label="a.name" :value="a.id"> |
| | | <div style="display: flex; align-items: center; justify-content: space-between;"> |
| | |
| | | </div> |
| | | </el-option> |
| | | </el-select> |
| | | <el-button v-show="active==1" size="small" @click="templateDia=true"> |
| | | <span style="color: #3A7BFA;">保存模板</span> |
| | | </el-button> |
| | | <el-button v-if="active==1&&addObj.sampleType!=undefined&&(addObj.sampleType.indexOf('电缆')>-1 ||addObj.sampleType.indexOf('综合')>-1)" size="small" type="primary" @click="openCableConfig">电缆配置</el-button> |
| | | <el-button v-if="active==1&&addObj.sampleType!=undefined&&addObj.sampleType.indexOf('电缆')>-1" size="small" type="primary" @click="openAuxiliaryCore">辅助线芯配置</el-button> |
| | | <el-button v-show="active==1" size="small" @click="templateDia=true">保存模板</el-button> |
| | | <el-button v-if="active==1&&addObj.sampleType!=undefined&&(addObj.sampleType.indexOf('电缆')>-1 ||addObj.sampleType.indexOf('综合')>-1)" size="small" type="primary" plain @click="openCableConfig">电缆配置</el-button> |
| | | <el-button v-if="active==1&&addObj.sampleType!=undefined&&addObj.sampleType.indexOf('电缆')>-1" size="small" type="primary" plain @click="openAuxiliaryCore">辅助线芯配置</el-button> |
| | | <el-button v-show="active==1||(tabIndex==4&&active==2)" :loading="saveLoad" size="small" type="primary" @click="save">提交</el-button> |
| | | <!-- 审核 --> |
| | | <el-button v-show="active==3" :disabled="saveLoad" :loading="saveLoad" size="small" |
| | | @click="upInsOrderOfState(2)">不通过</el-button> |
| | | <el-button v-show="active==3" :loading="saveLoad" size="small" type="primary" |
| | | @click="upInsOrderOfState(1)">通过</el-button> |
| | | <el-button size="small" @click="goBack"> |
| | | <span style="color: #3A7BFA;">返回</span> |
| | | </el-button> |
| | | <el-button size="small" @click="goBack">返回</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-show="!cableConfigShow&&!auxiliaryShow" style="margin-top: 10px"> |
| | | <div class="search"> |
| | | <el-form ref="newJuOrder" :inline="true" :model="addObj" label-width="108px" label-position="right"> |
| | | <el-row> |
| | | <el-col :span="6"><el-form-item label="产品名称"><el-input v-model="addObj.sample" disabled size="small"><template slot="append"><el-button :disabled="active>1" icon="el-icon-search" @click="selectStandardTree = true" /></template></el-input></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="生产单位"><el-input v-model="addObj.production" :disabled="active>1" size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="委托单位"><el-input v-model="addObj.company" disabled size="small"><template slot="append"><el-button :disabled="active>1" icon="el-icon-search" @click="openCompanyList" /></template></el-input></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="检验类别"><el-select v-model="addObj.orderType" :disabled="active>1" size="small"><el-option v-for="item in dict.type.check_type1" :key="item.value" :label="item.label" :value="item.value" /></el-select></el-form-item></el-col> |
| | | </el-row> |
| | | <el-row v-if="addObj.standardTreeId || boundTemplateList.length"> |
| | | <el-col :span="24"> |
| | | <div v-show="!cableConfigShow&&!auxiliaryShow" class="order-body"> |
| | | <el-card shadow="never" class="order-card"> |
| | | <el-form ref="newJuOrder" :model="addObj" size="small" label-width="108px" label-position="right"> |
| | | <el-row :gutter="16"> |
| | | <el-col :span="6"><el-form-item label="检测依据"><el-input v-model="addObj.sample" disabled size="small"><template slot="append"><el-button :disabled="active>1" icon="el-icon-search" @click="selectStandardTree = true" /></template></el-input></el-form-item></el-col> |
| | | <el-col :span="18"> |
| | | <el-form-item label="原始记录模板"> |
| | | <div v-loading="templateBindingLoading" class="template-tag-list"> |
| | | <el-tag v-for="item in boundTemplateList" :key="item.templateId" size="small" effect="plain">{{ item.name }}</el-tag> |
| | | <el-tag v-for="(item, index) in boundTemplateList" :key="item.templateId" :closable="active==1" size="small" effect="plain" @close="removeBoundTemplate(index)">{{ item.name }}</el-tag> |
| | | <span v-if="!templateBindingLoading && boundTemplateList.length === 0" class="empty-template-text">暂未绑定原始记录模板</span> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-row :gutter="16"> |
| | | <el-col :span="6"><el-form-item label="样品名称"><el-input v-model="addObj.sampleView" :disabled="active>1" size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="生产单位"><el-input v-model="addObj.production" :disabled="active>1" size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="委托单位"><el-input v-model="addObj.company" disabled size="small"><template slot="append"><el-button :disabled="active>1" icon="el-icon-search" @click="openCompanyList" /></template></el-input></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="检验类别"><el-select v-model="addObj.orderType" :disabled="active>1" size="small"><el-option v-for="item in dict.type.check_type1" :key="item.value" :label="item.label" :value="item.value" /></el-select></el-form-item></el-col> |
| | | </el-row> |
| | | <el-row :gutter="16"> |
| | | <el-col :span="6"><el-form-item label="样品数量"><el-input v-model="addObj.testQuantity" :disabled="active>1" placeholder="如:2桶、500mL" size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="样品编号"><el-input v-model="sampleCode" :disabled="active>1" size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="样品外观"><el-input v-model="addObj.sampleStatus" :disabled="active>1" size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="送样人"><el-input v-model="addObj.prepareUser" :disabled="active>1" size="small" /></el-form-item></el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-row :gutter="16"> |
| | | <el-col :span="6"><el-form-item label="生产日期"><el-date-picker v-model="addObj.productionDate" type="date" value-format="yyyy-MM-dd" :disabled="active>1" size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="生产批号"><el-input v-model="addObj.productionBatch" :disabled="active>1" size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="送样日期"><el-date-picker v-model="addObj.sampleDate" type="date" value-format="yyyy-MM-dd" :disabled="active>1" size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="联系方式"><el-input v-model="addObj.phone" :disabled="active>1" size="small" /></el-form-item></el-col> |
| | | </el-row> |
| | | <el-row><el-col :span="12"><el-form-item label="备注"><el-input v-model="addObj.remark" :disabled="active>1" size="small" /></el-form-item></el-col></el-row> |
| | | <el-row :gutter="16"><el-col :span="12"><el-form-item label="备注"><el-input v-model="addObj.remark" :disabled="active>1" size="small" /></el-form-item></el-col></el-row> |
| | | </el-form> |
| | | <el-form v-if="false" ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="108px" label-position="right"> |
| | | <el-row> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | </el-card> |
| | | <div v-if="false"> |
| | | <div style="display: flex;justify-content: space-between;background-color: #F5F7FB;margin-bottom: 6px"> |
| | | <div v-if="active==1"> |
| | |
| | | { required: true, message: '请选择紧急程度', trigger: 'change' } |
| | | ], |
| | | sample: [ |
| | | { required: true, message: '请选择样品名称', trigger: 'change' } |
| | | { required: true, message: '请选择检测依据', trigger: 'change' } |
| | | ], |
| | | sampleNum: [ |
| | | { required: true, message: '请填写样品数量', trigger: 'blur' } |
| | |
| | | save() { |
| | | if (this.addObj.standardTreeId) { |
| | | if (!this.addObj.sample || !this.addObj.company || !this.addObj.orderType || !this.addObj.testQuantity) { |
| | | this.$message.error('请填写产品名称、委托单位、检验类别和样品数量'); |
| | | this.$message.error('请填写检测依据、委托单位、检验类别和样品数量'); |
| | | return; |
| | | } |
| | | this.saveData([]); |
| | |
| | | delete newJuOrder.temperature |
| | | delete newJuOrder.humidity |
| | | const payload = this.addObj.standardTreeId |
| | | ? { insOrder: newJuOrder, standardTreeId: this.addObj.standardTreeId, sampleCode: this.sampleCode } |
| | | ? { |
| | | insOrder: newJuOrder, |
| | | standardTreeId: this.addObj.standardTreeId, |
| | | sampleCode: this.sampleCode, |
| | | templateList: this.boundTemplateList.map((item, index) => ({ templateId: item.templateId, sort: index })) |
| | | } |
| | | : { insOrder: {...this.addObj,typeSource:-1}, sampleList: sampleList } |
| | | addInsOrder(payload).then(res => { |
| | | this.saveLoad = false |
| | |
| | | }, |
| | | sortTemplateList(list) { |
| | | return (list || []).slice().sort((a, b) => (a.sort || 0) - (b.sort || 0)) |
| | | }, |
| | | // 下单时从标准库绑定的模板里删减,提交时随 templateList 一起下发 |
| | | removeBoundTemplate(index) { |
| | | this.boundTemplateList.splice(index, 1) |
| | | }, |
| | | async loadTemplateBindings(standardTreeId) { |
| | | this.boundTemplateList = [] |
| | |
| | | .empty-template-text { |
| | | color: #909399; |
| | | } |
| | | /* 委托单信息:顶部操作栏 */ |
| | | .order-header { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | flex-wrap: wrap; |
| | | gap: 8px; |
| | | padding-bottom: 12px; |
| | | border-bottom: 1px solid #ebeef5; |
| | | } |
| | | .order-header__title { |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | color: #303133; |
| | | } |
| | | .order-header__actions { |
| | | display: flex; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | gap: 8px; |
| | | } |
| | | /* 间距统一交给 gap,去掉相邻按钮自带的 margin-left */ |
| | | .order-header__actions>>>.el-button+.el-button { |
| | | margin-left: 0; |
| | | } |
| | | .order-header__quarter { |
| | | width: 220px; |
| | | } |
| | | .order-header__template { |
| | | width: 160px; |
| | | } |
| | | /* 委托单信息:表单卡片 */ |
| | | .order-body { |
| | | margin-top: 12px; |
| | | } |
| | | .order-card>>>.el-card__body { |
| | | padding: 20px 20px 6px; |
| | | } |
| | | .order-card>>>.el-form-item { |
| | | margin-bottom: 16px; |
| | | } |
| | | /* 控件统一占满标签之外的整列宽度:el-date-editor 默认写死 220px、 |
| | | el-select 宽度收缩成固有宽度,不指定就会和其他输入框左右边缘对不齐 */ |
| | | .order-card>>>.el-input, |
| | | .order-card>>>.el-select { |
| | | width: 100%; |
| | | } |
| | | /* append 单元格的 20px 内边距 + 按钮 -10px 负边距是按默认 40px 按钮标定的, |
| | | small 输入下按钮会比输入框高、上下溢出;改成按钮直接撑满单元格 */ |
| | | .order-card>>>.el-input-group__append { |
| | | padding: 0; |
| | | } |
| | | .order-card>>>.el-input-group__append .el-button { |
| | | margin: 0; |
| | | padding: 9px 15px; |
| | | font-size: 12px; |
| | | } |
| | | </style> |
| | |
| | | <div class="app-container"> |
| | | <div v-show="!cableConfigShow&&!auxiliaryShow"> |
| | | <div style="display: flex;justify-content: space-between;align-items:center;"> |
| | | <div>委托单信息</div> |
| | | <div class="order-detail__title">委托单信息</div> |
| | | <div> |
| | | <el-cascader v-if="false" |
| | | v-model="addObj.quarterItemId" |
| | |
| | | </div> |
| | | <div v-show="!cableConfigShow&&!auxiliaryShow" style="margin-top: 10px"> |
| | | <div class="search"> |
| | | <el-form :inline="true" :model="addObj" label-width="108px" label-position="right"> |
| | | <el-row> |
| | | <el-col :span="6"><el-form-item label="产品名称"><el-input v-model="addObj.sample" disabled size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="生产单位"><el-input v-model="addObj.production" disabled size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="委托单位"><el-input v-model="addObj.company" disabled size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="检验类别"><el-select v-model="addObj.orderType" disabled size="small"><el-option v-for="item in dict.type.check_type1" :key="item.value" :label="item.label" :value="item.value" /></el-select></el-form-item></el-col> |
| | | </el-row> |
| | | <el-row v-if="boundTemplateList.length"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="原始记录模板"> |
| | | <div class="template-tag-list"> |
| | | <el-descriptions class="order-detail" :column="4" border> |
| | | <el-descriptions-item label="检测依据">{{ addObj.sample || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="样品名称">{{ addObj.sampleView || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="生产单位">{{ addObj.production || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="委托单位">{{ addObj.company || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="检验类别">{{ orderTypeLabel }}</el-descriptions-item> |
| | | <el-descriptions-item label="样品数量">{{ addObj.testQuantity || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="样品编号">{{ sampleCode || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="样品外观">{{ addObj.sampleStatus || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="送样人">{{ addObj.prepareUser || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="生产日期">{{ addObj.productionDate || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="生产批号">{{ addObj.productionBatch || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="送样日期">{{ addObj.sampleDate || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="联系方式">{{ addObj.phone || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="原始记录模板" :span="4"> |
| | | <div v-if="boundTemplateList.length" class="template-tag-list"> |
| | | <el-tag v-for="item in boundTemplateList" :key="item.templateId" size="small" effect="plain">{{ item.name }}</el-tag> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"><el-form-item label="样品数量"><el-input v-model="addObj.testQuantity" disabled size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="样品编号"><el-input v-model="sampleCode" disabled size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="样品外观"><el-input v-model="addObj.sampleStatus" disabled size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="送样人"><el-input v-model="addObj.prepareUser" disabled size="small" /></el-form-item></el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"><el-form-item label="生产日期"><el-date-picker v-model="addObj.productionDate" type="date" value-format="yyyy-MM-dd" disabled size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="生产批号"><el-input v-model="addObj.productionBatch" disabled size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="送样日期"><el-date-picker v-model="addObj.sampleDate" type="date" value-format="yyyy-MM-dd" disabled size="small" /></el-form-item></el-col> |
| | | <el-col :span="6"><el-form-item label="联系方式"><el-input v-model="addObj.phone" disabled size="small" /></el-form-item></el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"><el-form-item label="备注"><el-input v-model="addObj.remark" disabled size="small" style="width: 520px" /></el-form-item></el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span v-else class="order-detail__empty">暂未绑定原始记录模板</span> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="备注" :span="4">{{ addObj.remark || '-' }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | <el-form v-show="false" ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="108px" label-position="right"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | |
| | | newJuLaboratoryList() { |
| | | return (this.dict.type.sys_sub_lab || []).filter(item => item.label === '新聚') |
| | | }, |
| | | // 检验类别按字典名称展示 |
| | | orderTypeLabel() { |
| | | const hit = (this.dict.type.check_type1 || []).find( |
| | | item => String(item.value) === String(this.addObj.orderType) |
| | | ) |
| | | return hit ? hit.label : (this.addObj.orderType || '-') |
| | | }, |
| | | }, |
| | | dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list', 'sys_sub_lab'], |
| | | data() { |
| | |
| | | { required: true, message: '请选择紧急程度', trigger: 'change' } |
| | | ], |
| | | sample: [ |
| | | { required: true, message: '请选择样品名称', trigger: 'change' } |
| | | { required: true, message: '请选择检测依据', trigger: 'change' } |
| | | ], |
| | | sampleNum: [ |
| | | { required: true, message: '请填写样品数量', trigger: 'blur' } |
| | |
| | | } else { |
| | | this.addObj.sample = trees[3] |
| | | } |
| | | this.addObj.sampleView = this.addObj.sample |
| | | this.addObj.sampleViewEn = this.sampleViewEn |
| | | this.addObj.model = (trees[4] == undefined ? null : trees[4]) |
| | | this.selectStandardTree = false |
| | |
| | | flex-wrap: wrap; |
| | | gap: 8px; |
| | | } |
| | | /* 委托单信息:只读详情 */ |
| | | .order-detail__title { |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | color: #303133; |
| | | } |
| | | .order-detail>>>.el-descriptions-item__label.is-bordered-label { |
| | | width: 104px; |
| | | white-space: nowrap; |
| | | } |
| | | .order-detail>>>.el-descriptions-item__content { |
| | | color: #303133; |
| | | } |
| | | /* 描述列表内不需要额外的行高占位,标签行与其它行等高 */ |
| | | .order-detail .template-tag-list { |
| | | min-height: 0; |
| | | } |
| | | .order-detail__empty { |
| | | color: #c0c4cc; |
| | | } |
| | | </style> |
| | |
| | | linkMethod: "changeEntrustCode", |
| | | }, |
| | | { label: '委托单位', prop: 'company' }, |
| | | { label: '检测依据', prop: 'sample' }, |
| | | { label: '样品名称', prop: 'sampleView' }, |
| | | // { |
| | | // label: "样品名称", |
| | | // prop: "sampleName", |
| | |
| | | label: '操作', |
| | | operation: [ |
| | | { |
| | | name: '查看详情', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.selectAllByOne(row); |
| | | } |
| | | }, |
| | | { |
| | | name: '数据查看', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true"> |
| | | <el-form-item label="实验室名称" prop="laboratoryName"> |
| | | <el-form-item label="行业名称" prop="laboratoryName"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="queryParams.laboratoryName" |
| | | @keyup.enter.native="refreshTable"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="实验室编码" prop="laboratoryNumber"> |
| | | <el-form-item label="行业编码" prop="laboratoryNumber"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="queryParams.laboratoryNumber" |
| | | @keyup.enter.native="refreshTable"></el-input> |
| | | </el-form-item> |
| | |
| | | <lims-table :tableData="tableData" :column="column" :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <!-- 新增实验室--> |
| | | <!-- 新增行业--> |
| | | <el-dialog :title="formTitle" :visible.sync="addDia" width="450px"> |
| | | <el-form ref="laboratoryForm" :model="laboratoryForm" :rules="userRules" label-position="right" |
| | | label-width="100px"> |
| | | <el-form-item label="实验室名称" prop="laboratoryName"> |
| | | <el-form-item label="行业名称" prop="laboratoryName"> |
| | | <el-input v-model="laboratoryForm.laboratoryName" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="场所编码" prop="laboratoryNumber"> |
| | | <el-input v-model="laboratoryForm.laboratoryNumber" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="实验室代号" prop="laboratoryCode"> |
| | | <el-form-item label="行业代号" prop="laboratoryCode"> |
| | | <el-input v-model="laboratoryForm.laboratoryCode" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="负责人" prop="head"> |
| | |
| | | tableData: [], |
| | | tableLoading: false, |
| | | column: [ |
| | | { label: '实验室名称', prop: 'laboratoryName' }, |
| | | { label: '行业名称', prop: 'laboratoryName' }, |
| | | { label: '场所编码', prop: 'laboratoryNumber' }, |
| | | { label: '实验室代号', prop: 'laboratoryCode' }, |
| | | { label: '行业代号', prop: 'laboratoryCode' }, |
| | | { label: '负责人', prop: 'head' }, |
| | | { label: '负责人电话', prop: 'phoneNumber' }, |
| | | { label: '地址', prop: 'address' }, |
| | |
| | | }, |
| | | operationType: '', |
| | | userRules: { |
| | | laboratoryName: [{ required: true, message: '请输入实验室名称', trigger: 'blur' }], |
| | | laboratoryName: [{ required: true, message: '请输入行业名称', trigger: 'blur' }], |
| | | laboratoryNumber: [{ required: true, message: '请输入场所编码', trigger: 'blur' }], |
| | | head: [{ required: true, message: '请输入负责人', trigger: 'blur' }], |
| | | phoneNumber: [{ required: true, message: '请输入负责人电话', trigger: 'blur' }], |
| | |
| | | fileComponentTableLoading: false, |
| | | fileComponentData: [], |
| | | fileComponentDataColumn: [ |
| | | { label: '实验室名称', prop: 'laboratoryName' }, |
| | | { label: '行业名称', prop: 'laboratoryName' }, |
| | | { label: '印章图片', prop: 'address', dataType: 'image' }, |
| | | { label: '印章类型', prop: 'type' }, |
| | | ], |
| | |
| | | props: { multiple: false, emitPath: false, }, |
| | | options: [ |
| | | { |
| | | value: '实验室资质', |
| | | label: '实验室资质', |
| | | value: '行业资质', |
| | | label: '行业资质', |
| | | children: [] |
| | | }, |
| | | { |
| | |
| | | this.refreshTable() |
| | | }, |
| | | openAdd(type, row) { |
| | | this.formTitle = type === 'add' ? '新增实验室' : '编辑实验室' |
| | | this.formTitle = type === 'add' ? '新增行业' : '编辑行业' |
| | | this.operationType = type |
| | | if (type === 'edit') { |
| | | this.laboratoryForm = this.HaveJson(row) |
| | | } |
| | | this.addDia = true |
| | | }, |
| | | // 提交新增、编辑实验室表单 |
| | | // 提交新增、编辑行业表单 |
| | | customAdd() { |
| | | this.$refs['laboratoryForm'].validate((valid) => { |
| | | if (valid) { |
| | |
| | | this.resetForm('laboratoryForm') |
| | | this.addDia = false |
| | | }, |
| | | // 删除实验室 |
| | | // 删除行业 |
| | | delete(row) { |
| | | this.$confirm('是否删除当前数据?', "警告", { |
| | | confirmButtonText: "确定", |