|
|
|
@ -8,33 +8,27 @@ |
|
|
|
<div class="content"> |
|
|
|
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" |
|
|
|
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> |
|
|
|
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" /> |
|
|
|
<LineLabel label="template.common.instrumentInfo" /> |
|
|
|
<CustomTable |
|
|
|
:columns="yqInfoColumns" |
|
|
|
:formData = "formData" |
|
|
|
ref = "yqInfoTableRef" |
|
|
|
@onRegentSubmit="(data, col, rowIndex, colIndex, row)=>onYqSubmit(data, col, rowIndex, colIndex, row)" |
|
|
|
:showAddRow = "fillType === 'actFill'" |
|
|
|
:showOperation = "fillType === 'actFill'" |
|
|
|
:prefixKey="`yqTable`" |
|
|
|
> |
|
|
|
<CustomTable :columns="yqInfoColumns" :formData="formData" ref="yqInfoTableRef" |
|
|
|
@onRegentSubmit="(data, col, rowIndex, colIndex, row) => onYqSubmit(data, col, rowIndex, colIndex, row)" |
|
|
|
:showAddRow="fillType === 'actFill'" :showOperation="fillType === 'actFill'" |
|
|
|
:prefixKey="`yqTable`"> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="()=>deleteRow(rowIndex,'yqInfoTableRef')" ></TableOpertaionDelete> |
|
|
|
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" |
|
|
|
@deleteRow="() => deleteRow(rowIndex, 'yqInfoTableRef')"></TableOpertaionDelete> |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
<BaseInfoFormPackage class="mt-20" fieldItemLabel="色谱柱型号" label="色谱柱型号" ref="spzxhRef" |
|
|
|
@remoteMethod="remoteMethod" |
|
|
|
:formConfig="storageFormConfig" :formData="formData" /> |
|
|
|
@remoteMethod="remoteMethod" :formConfig="storageFormConfig" :formData="formData" /> |
|
|
|
<LineLabel label="溶液" /> |
|
|
|
<CustomTable |
|
|
|
:columns="ryColumns" |
|
|
|
ref = "ryTableRef" |
|
|
|
@onRegentSubmit = "(e)=>onRegentSubmit(e)" |
|
|
|
:showOperation = "fillType === 'preFill'" |
|
|
|
:formData="{stepTableFormData:formData.stepTableFormData_1,headerSelectFields:{}}" :prefixKey="`ryTable`" |
|
|
|
> |
|
|
|
<CustomTable :columns="ryColumns" ref="ryTableRef" @onRegentSubmit="(e) => onRegentSubmit(e)" |
|
|
|
:showOperation="fillType === 'preFill'" |
|
|
|
:formData="{ stepTableFormData: formData.stepTableFormData_1, headerSelectFields: {} }" |
|
|
|
:prefixKey="`ryTable`"> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="()=>deleteRow(rowIndex,'ryTableRef')" ></TableOpertaionDelete> |
|
|
|
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" |
|
|
|
@deleteRow="() => deleteRow(rowIndex, 'ryTableRef')"></TableOpertaionDelete> |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
<BaseInfoFormPackage class="mt-20" fieldItemLabel="仪器平衡" label="仪器平衡" ref="storageConditionRef" |
|
|
|
@ -57,12 +51,13 @@ import templateMixin from "../../mixins/templateMixin"; |
|
|
|
import CustomTable from '@/components/Template/CustomTable.vue'; |
|
|
|
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue" |
|
|
|
import { public_sjList } from '@/api/business/public/public'; |
|
|
|
import { uniqeResourceOne,uniqeYqOne } from "@/utils/calUnitTools"; |
|
|
|
|
|
|
|
import { getBaseInfoFormConfig, getStorageFormConfig, getYqColumns,getRyColumns,getYqphFormConfig } from "../../formConfig/sp/SP0019" |
|
|
|
import { getBaseInfoFormConfig, getStorageFormConfig, getYqColumns, getRyColumns, getYqphFormConfig } from "../../formConfig/sp/SP0019" |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "SP0019", |
|
|
|
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete }, |
|
|
|
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaionDelete }, |
|
|
|
mixins: [templateMixin], |
|
|
|
props: { |
|
|
|
fillType: { |
|
|
|
@ -72,11 +67,11 @@ export default { |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
//仪器平衡 |
|
|
|
yqphFormConfig(){ |
|
|
|
yqphFormConfig() { |
|
|
|
return getYqphFormConfig(this); |
|
|
|
}, |
|
|
|
//溶液 |
|
|
|
ryColumns(){ |
|
|
|
ryColumns() { |
|
|
|
return getRyColumns(this); |
|
|
|
}, |
|
|
|
//仪器信息 |
|
|
|
@ -118,7 +113,7 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@ -129,8 +124,8 @@ export default { |
|
|
|
pageSize: 10, |
|
|
|
mc: query |
|
|
|
}); |
|
|
|
if(res.code === 200){ |
|
|
|
const {rows = []} = res; |
|
|
|
if (res.code === 200) { |
|
|
|
const { rows = [] } = res; |
|
|
|
this.spzxhOptions = rows.map(item => ({ |
|
|
|
label: item.bh, |
|
|
|
value: item.bh, |
|
|
|
@ -138,10 +133,10 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
onRegentSubmit(e){ |
|
|
|
const {selectInfo, key, col, rowIndex, colIndex, rowData} = e; |
|
|
|
const {row} = selectInfo; |
|
|
|
if(key === "rymc"){ |
|
|
|
onRegentSubmit(e) { |
|
|
|
const { selectInfo, key, col, rowIndex, colIndex, rowData } = e; |
|
|
|
const { row } = selectInfo; |
|
|
|
if (key === "rymc") { |
|
|
|
const params = { |
|
|
|
pzrq: row.pzrq, |
|
|
|
sxr: row.sxr, |
|
|
|
@ -149,10 +144,10 @@ export default { |
|
|
|
this.$refs.ryTableRef.updateDataSourceByRowIndex(rowIndex, params); |
|
|
|
} |
|
|
|
}, |
|
|
|
onYqSubmit(data){ |
|
|
|
const {selectInfo,rowIndex,key} = data; |
|
|
|
const {row} = selectInfo; |
|
|
|
if(key === "bh"){//一起编号 |
|
|
|
onYqSubmit(data) { |
|
|
|
const { selectInfo, rowIndex, key } = data; |
|
|
|
const { row } = selectInfo; |
|
|
|
if (key === "bh") {//一起编号 |
|
|
|
const params = { |
|
|
|
mc: row.mc, |
|
|
|
xh: row.xh, |
|
|
|
@ -165,9 +160,53 @@ export default { |
|
|
|
getFilledFormData() { |
|
|
|
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "spzxhRef", "yqInfoTableRef", "ryTableRef", "remarkRef"]) |
|
|
|
}, |
|
|
|
getResource() { |
|
|
|
let content = this.getFilledFormData(); |
|
|
|
//生成resource |
|
|
|
let tmpResource = [] |
|
|
|
let tmpYq=[] |
|
|
|
if (this.fillType === "actFill") { |
|
|
|
let _formData = content.stepTableFormData_1 |
|
|
|
for (var i = 0; i < _formData.length; i++) { |
|
|
|
//使用的 实际溶液 |
|
|
|
tmpResource.push({ |
|
|
|
mc: null, |
|
|
|
bh: _formData[i].rymc, |
|
|
|
ph: null, |
|
|
|
ndz: null, |
|
|
|
nd: null, |
|
|
|
nddw: null, |
|
|
|
ly: 'ELN配制', |
|
|
|
sxrq: null, |
|
|
|
kc: null, |
|
|
|
kcdw: null, |
|
|
|
syl: null, |
|
|
|
type: _formData[i].selectInfo_rymc.type, |
|
|
|
elnType: null, |
|
|
|
syldw: _formData[i].selectInfo_rymc.kcdw, |
|
|
|
yxzq: null, |
|
|
|
yxzqdw: null, |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
let _formData2 = content.stepTableFormData |
|
|
|
|
|
|
|
for (var i = 0; i < _formData2.length; i++) { |
|
|
|
tmpYq.push({ |
|
|
|
mc: _formData2[i].selectInfo_bh.mc, |
|
|
|
xh: _formData2[i].selectInfo_bh.xh, |
|
|
|
bh: _formData2[i].selectInfo_bh.bh, |
|
|
|
jzrq: _formData2[i].selectInfo_bh.jzrq, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
this.yqResourceTmp = uniqeYqOne(tmpYq) |
|
|
|
this.resourceTmp = uniqeResourceOne(tmpResource) |
|
|
|
return this.resourceTmp; |
|
|
|
}, |
|
|
|
//获取填写完成的表单数据 |
|
|
|
async getFormData() { |
|
|
|
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "spzxhRef","yqInfoTableRef","ryTableRef", "remarkRef"]); |
|
|
|
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "spzxhRef", "yqInfoTableRef", "ryTableRef", "remarkRef"]); |
|
|
|
console.log(content) |
|
|
|
return content; |
|
|
|
}, |
|
|
|
|