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