|
|
@ -18,6 +18,7 @@ |
|
|
|
:is-col="true" |
|
|
|
@opensearchTable="opensearchTable" |
|
|
|
/> |
|
|
|
<div class="small-title">包装列表</div> |
|
|
|
<div style="border:1px solid #dedede;margin-bottom:20px;display: flex;"> |
|
|
|
<TableForm |
|
|
|
ref="tableFormRef" |
|
|
@ -28,12 +29,7 @@ |
|
|
|
:tableData="data.packageVOList" |
|
|
|
:isShowButton="false" |
|
|
|
:isShowReduceButton="false" |
|
|
|
> |
|
|
|
|
|
|
|
<template v-slot="{row}"> |
|
|
|
<slot :row="row"></slot> |
|
|
|
</template> |
|
|
|
</TableForm> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<el-tabs |
|
|
|
v-model="editableTabsValue" |
|
|
@ -131,11 +127,11 @@ |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="采样过程编码" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethod" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.samplingProcessCode" |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionName" |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplingProcessName" |
|
|
|
disabled |
|
|
|
placeholder="请选择采样过程编码" |
|
|
|
/> |
|
|
@ -715,17 +711,26 @@ const validateForm = (formRef) => { |
|
|
|
return false |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const tableFormRef = ref() |
|
|
|
const submitForm = async () => { |
|
|
|
try { |
|
|
|
console.log(data.value.subList) |
|
|
|
// const validateForm1 = await validateForm(formMainRef.value) |
|
|
|
const elForm = unref(formMainRef)?.getElFormRef() |
|
|
|
// 校验表单 |
|
|
|
if (!elForm) return |
|
|
|
const valid = await elForm.validate() |
|
|
|
if (!valid) return |
|
|
|
// const bol1 = await validateForm(formProcessRef.value) |
|
|
|
// 校验包装列表 |
|
|
|
const validateForm1 = await tableFormRef.value.validateForm() |
|
|
|
if (!validateForm1) return |
|
|
|
let number = 0 |
|
|
|
data.value.packageVOList.forEach(cur=>{ |
|
|
|
number += parseFloat(cur.sampleAmount) |
|
|
|
}) |
|
|
|
if(number > data.value.sampleTotalAmount){ |
|
|
|
message.error(`采样数量之和不可以大于总数量`) |
|
|
|
return |
|
|
|
} |
|
|
|
const bol2 = await validateForm(formFeaturesRef.value) |
|
|
|
if (!bol2) { |
|
|
|
message.error(`模板中有检验工序和检验特性未填写完全`) |
|
|
@ -785,7 +790,6 @@ const submitForm = async () => { |
|
|
|
message.error('检验特性中有开始时间大于结束时间') |
|
|
|
return; |
|
|
|
} |
|
|
|
return; |
|
|
|
if (formType.value == 'create') { |
|
|
|
// 主子表——提交请求 |
|
|
|
emit('submitForm', formType.value, data.value) |
|
|
|