|
|
|
@ -34,9 +34,14 @@ |
|
|
|
:showAddRow="fillType === 'preFill'" @onAddRow="() => addTableRow(index)" |
|
|
|
fieldItemLabel="取样进样信息" :formData="item"> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" |
|
|
|
<TableOpertaion :row="row" :rowIndex="rowIndex" :columns="columns" |
|
|
|
@configComplete="(e)=>onConfigComplete(e,'qy')" |
|
|
|
@printTag="(e)=>onPrintTag(e,index)" |
|
|
|
:fillType="fillType" |
|
|
|
:showFz="false" |
|
|
|
:showKspz="false" |
|
|
|
@deleteRow="() => deleteTableRow(rowIndex, index)"> |
|
|
|
</TableOpertaionDelete> |
|
|
|
</TableOpertaion> |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
<CustomTable :ref="`jyTableRef${index}`" :columns="yjColumns" prefix="jy" |
|
|
|
@ -44,9 +49,14 @@ |
|
|
|
:showOperation="fillType === 'actFill'" :showAddRow="false" |
|
|
|
:formData="{ stepTableFormData: item.jyStepTableFormData || [], headerSelectFields: item.jyHeaderSelectFields || {} }"> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" |
|
|
|
<TableOpertaion :row="row" :rowIndex="rowIndex" :columns="columns" |
|
|
|
@configComplete="(e)=>onConfigComplete(e,'jy')" |
|
|
|
@printTag="(e)=>onPrintTag(e,index)" |
|
|
|
:fillType="fillType" |
|
|
|
:showFz="false" |
|
|
|
:showKspz="false" |
|
|
|
@deleteRow="() => deleteTableRow(rowIndex, index)"> |
|
|
|
</TableOpertaionDelete> |
|
|
|
</TableOpertaion> |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
</div> |
|
|
|
@ -72,9 +82,14 @@ |
|
|
|
:showOperation="fillType === 'preFill' || fillType === 'actFill'" |
|
|
|
@onAddRow="() => addEcTableRow(index, 'ecTableRef')" :formData="item"> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" |
|
|
|
<TableOpertaion :row="row" :rowIndex="rowIndex" :columns="columns" |
|
|
|
@configComplete="(e)=>onConfigComplete(e,'jy')" |
|
|
|
@printTag="(e)=>onPrintTag(e,index)" |
|
|
|
:fillType="fillType" |
|
|
|
:showFz="false" |
|
|
|
:showKspz="false" |
|
|
|
@deleteRow="() => deleteTableRow(rowIndex, index)"> |
|
|
|
</TableOpertaionDelete> |
|
|
|
</TableOpertaion> |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
</div> |
|
|
|
@ -91,7 +106,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import BaseInfoFormPackage from "@/components/Template/BaseInfoFormPackage"; |
|
|
|
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete"; |
|
|
|
import TableOpertaion from "@/components/Template/operation/TableOpertaion"; |
|
|
|
|
|
|
|
import LineLabel from "@/components/Template/LineLabel"; |
|
|
|
import TableList from "@/components/Template/Table"; |
|
|
|
@ -113,7 +128,7 @@ const refConfig = { |
|
|
|
const compRefs = Object.values(refConfig); |
|
|
|
export default { |
|
|
|
name: "SP0021", |
|
|
|
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaionDelete }, |
|
|
|
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaion }, |
|
|
|
mixins: [templateMixin], |
|
|
|
props: { |
|
|
|
fillType: { |
|
|
|
@ -161,8 +176,38 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
onConfigComplete(e,type){ |
|
|
|
const {rowData,headerSelectFields} = e; |
|
|
|
let params = { |
|
|
|
studySubjectId: this.formData.studySubjectId, |
|
|
|
studyId: this.formData.studyId, |
|
|
|
studyFormId: this.formData.id, |
|
|
|
}; |
|
|
|
if(type === 'qy'){ |
|
|
|
params = { |
|
|
|
...params, |
|
|
|
bh:rowData.qybh,//编号 |
|
|
|
nd:rowData.sjzjnd,//浓度 |
|
|
|
nddw:headerSelectFields.sjzjnddw,//浓度单位 |
|
|
|
kc:rowData.sjqyl,//库存 |
|
|
|
kcdw:headerSelectFields.sjqydw,//库存单位 |
|
|
|
} |
|
|
|
}else if(type === 'jy'){ |
|
|
|
params = { |
|
|
|
...params, |
|
|
|
bh:rowData.jybh,//编号 |
|
|
|
nd:rowData.sjjynd,//浓度 |
|
|
|
nddw:headerSelectFields.sjjynddw,//浓度单位 |
|
|
|
kc:rowData.ztj,//库存 |
|
|
|
kcdw:headerSelectFields.ztjdw,//库存单位 |
|
|
|
} |
|
|
|
} |
|
|
|
this.configCompleteRequest(params) |
|
|
|
}, |
|
|
|
onPrintTag(e,index){ |
|
|
|
console.log(e,index,"onPrintTag") |
|
|
|
}, |
|
|
|
handleClickButton(item,signData,key,formFields,index){ |
|
|
|
const {} = item; |
|
|
|
const ref = this.$refs[`ybsmFormPackageRef${index}`][0]; |
|
|
|
if(key === "startButton"){ |
|
|
|
ref.updateFormData("qysj",moment().format("YYYY/MM/DD HH:mm:ss"),{ isUpdateRecord: true, signData }) |
|
|
|
|