Browse Source

Merge remote-tracking branch 'origin/master_hella' into master_hella

hella_online_20240829
gaojs 4 months ago
parent
commit
69bf628f70
  1. 632
      src/views/qms/inspectionJob/addForm.vue
  2. 28
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  3. 4
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts

632
src/views/qms/inspectionJob/addForm.vue

@ -1,30 +1,93 @@
<template>
<div>
<Dialog :title="dialogTitle" v-model="dialogVisible" :width="dialogWidth" :close-on-click-modal="false"
:vLoading="formLoading">
<div class="box" style="max-height: 80vh; overflow-y: auto; padding: 0px 20px" ref="mianscroll">
<el-backtop :right="40" :bottom="100" target='.box' @click="topScrollClick"/>
<Form ref="formMainRef" :rules="rules" :schema="formSchema" :is-col="true" @opensearchTable="opensearchTable" />
<Dialog
:title="dialogTitle"
v-model="dialogVisible"
:width="dialogWidth"
:close-on-click-modal="false"
:vLoading="formLoading"
>
<div
class="box"
style="max-height: 80vh; overflow-y: auto; padding: 0px 20px"
ref="mianscroll"
>
<el-backtop :right="40" :bottom="100" target=".box" @click="topScrollClick" />
<Form
ref="formMainRef"
:rules="rules"
:schema="formSchema"
:is-col="true"
@opensearchTable="opensearchTable"
/>
<div ref="boxList">
<div class="small-title">包装列表</div>
<div style="border:1px solid #dedede;margin-bottom:20px;display: flex;">
<TableForm ref="tableFormRef" style="width:100%;" :maxHeight="490"
:tableFields="tableAllSchemas.tableFormColumns" :tableFormRules="tableFormRules"
:tableData="data.packageList" :isShowButton="false" :isShowReduceButton="false" />
<div style="border: 1px solid #dedede; margin-bottom: 20px; display: flex">
<TableForm
ref="tableFormRef"
style="width: 100%"
:maxHeight="490"
:tableFields="tableAllSchemas.tableFormColumns"
:tableFormRules="tableFormRules"
:tableData="data.packageList"
:isShowButton="false"
:isShowReduceButton="false"
/>
</div>
<el-tabs v-model="editableTabsValue" class="demo-tabs" @edit="handleTabsEdit" type="border-card"
tab-position="left" :stretch="false">
<el-tab-pane v-for="item in data.subList" :key="item.name" :label="item.processDescribe" :name="item.name" v-next-focus>
</div>
<el-tabs
v-model="editableTabsValue"
class="demo-tabs"
@edit="handleTabsEdit"
type="border-card"
tab-position="left"
:stretch="false"
>
<el-tab-pane
v-for="item in data.subList"
:key="item.name"
:label="item.processDescribe"
:name="item.name"
v-next-focus
>
<template #label>
<span class="custom-tabs-label" style="display: flex; align-items: center">
<Icon
class="mr-5px"
icon="ep:circle-check-filled"
v-if="item.isPass === true"
color="#67C23A"
style="margin-top: 4px"
/>
<Icon
class="mr-5px"
icon="ep:circle-close-filled"
v-if="item.isPass === false"
color="#ff0000"
style="margin-top: 4px"
/>
<span>{{ item.processDescribe }}</span>
</span>
</template>
<div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码" prop="processCode">
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" />
<el-input
v-model="item.processCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验特性编号">
<el-input v-model="item.inspectionFeatureCode" placeholder="根据系统生成" :disabled="true" />
<el-input
v-model="item.inspectionFeatureCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -44,172 +107,349 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.number" placeholder="根据系统生成"
:disabled="true" />
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.number"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="inspectionJobCharacteristicsUpdateReqVO.description">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.description" :disabled="true" />
<el-form-item
label="描述"
prop="inspectionJobCharacteristicsUpdateReqVO.description"
>
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.description"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验方法" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode">
<el-form-item
label="检验方法"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode"
>
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName" disabled
placeholder="请选择检验方法" />
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName"
disabled
placeholder="请选择检验方法"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="采样过程编码" prop="inspectionJobCharacteristicsUpdateReqVO.samplingProcessCode">
<el-form-item
label="采样过程编码"
prop="inspectionJobCharacteristicsUpdateReqVO.samplingProcessCode"
>
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplingProcessName" disabled
placeholder="请选择采样过程编码" />
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplingProcessName"
disabled
placeholder="请选择采样过程编码"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="样品份数" prop="inspectionJobCharacteristicsUpdateReqVO.sampleQty">
<el-form-item
label="样品份数"
prop="inspectionJobCharacteristicsUpdateReqVO.sampleQty"
>
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.sampleQty" disabled
placeholder="请输入样品份数" />
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.sampleQty"
disabled
placeholder="请输入样品份数"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="每份样品量" prop="inspectionJobCharacteristicsUpdateReqVO.samplePieceSize">
<el-form-item
label="每份样品量"
prop="inspectionJobCharacteristicsUpdateReqVO.samplePieceSize"
>
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize" disabled
placeholder="请输入样品份数" />
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize"
disabled
placeholder="请输入样品份数"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否允许修改特征值" prop="inspectionJobCharacteristicsUpdateReqVO.isCanUpdate">
<el-switch v-model="item.inspectionJobCharacteristicsUpdateReqVO.isCanUpdate" disabled />
<el-form-item
label="是否允许修改特征值"
prop="inspectionJobCharacteristicsUpdateReqVO.isCanUpdate"
>
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.isCanUpdate"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结果录入方式" prop="inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod">
<el-select v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
placeholder="请选择结果录入方式" @change="resultEntryMethodChange($event, item)" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY)"
:key="dict.value" :label="dict.label" :value="dict.value" />
<el-form-item
label="结果录入方式"
prop="inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
>
<el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event, item)"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsUpdateReqVO.featureType">
<el-select v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType" placeholder="请选择特征类型"
@change="changeFeatureType" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value" />
<el-form-item
label="特征类型"
prop="inspectionJobCharacteristicsUpdateReqVO.featureType"
>
<el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0">
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"
>
<el-form-item
label="是否设定上限"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping" :disabled="true" />
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 && item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping">
<el-col
:span="12"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping
"
>
<el-form-item
label="上限值"
prop="inspectionCharacteristicsBaseVO.quantifyCapping"
>
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping" :disabled="true" />
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0">
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"
>
<el-form-item
label="是否设定下限"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit" :disabled="true" />
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 && item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit">
<el-col
:span="12"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit
"
>
<el-form-item
label="下限值"
prop="inspectionCharacteristicsBaseVO.quantifyCapping"
>
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit" :disabled="true" />
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0">
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"
>
<el-form-item
label="是否设定目标值"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget" :disabled="true" />
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 && item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget">
<el-col
:span="12"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget
"
>
<el-form-item
label="目标值"
prop="inspectionCharacteristicsBaseVO.quantifyCapping"
>
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget" :disabled="true" />
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开始时间" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime">
<el-date-picker v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
type="datetime" placeholder="请选择开始时间" style="width: 100%" value-format="x" />
<el-form-item
label="开始时间"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
>
<el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
value-format="x"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束时间" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime">
<el-date-picker v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
type="datetime" placeholder="请选择结束时间" style="width: 100%" value-format="x" />
<el-form-item
label="结束时间"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
>
<el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
type="datetime"
placeholder="请选择结束时间"
style="width: 100%"
value-format="x"
/>
</el-form-item>
</el-col>
<!-- 手动评估的时候显示 -->
<el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1">
<el-form-item label="评估代码" required prop="inspectionJobCharacteristicsUpdateReqVO.estimateCode">
<el-select v-model="item.inspectionJobCharacteristicsUpdateReqVO.estimateCode" placeholder="请选择评估代码"
@change="changeFeatureType">
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)" :key="dict.value"
:label="dict.label" :value="dict.value" />
<el-form-item
label="评估代码"
required
prop="inspectionJobCharacteristicsUpdateReqVO.estimateCode"
>
<el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.estimateCode"
placeholder="请选择评估代码"
@change="changeFeatureType"
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24"
v-for="(cur, i) in item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList" :key="i"
style="border: 1px solid #dedede; border-radius: 4px; padding-top: 16px; margin-bottom: 10px;">
<el-col
:span="24"
v-for="(cur, i) in item.inspectionJobCharacteristicsUpdateReqVO
.recordInspectionQuantifyList"
:key="i"
style="
border: 1px solid #dedede;
border-radius: 4px;
padding-top: 16px;
margin-bottom: 10px;
"
>
<el-row>
<!-- 汇总录入的时候显示 -->
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1">
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"
>
<el-form-item label="合格数量" required>
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" type="number" />
<el-input
v-model="cur.qualifiedQuantity"
placeholder="请输入合格数量"
type="number"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1">
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"
>
<el-form-item label="不合格数量" required>
<el-input v-model="cur.unqualifiedQuantity" type="number" placeholder="请输入不合格数量"/>
<el-input
v-model="cur.unqualifiedQuantity"
type="number"
placeholder="请输入不合格数量"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '0'">
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '0'"
>
<el-form-item label="检验值" required>
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值" type="number" />
<el-input
v-model="cur.inspectionValue"
placeholder="请输入检验值"
type="number"
@blur="inspectionValueInput(item, cur)"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '1'">
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '1'"
>
<el-form-item label="选定集" required>
<el-select v-model="cur.qualitativeCode" placeholder="请选择选定集"
@change="changeQualitativeCode($event, item, cur)">
<el-option v-for="dict in item.selectedProjectRespVOList" :key="dict.dictionaryValue"
:label="dict.dictionaryLabel" :value="dict.dictionaryValue" />
<el-select
v-model="cur.qualitativeCode"
placeholder="请选择选定集"
@change="changeQualitativeCode($event, item, cur)"
>
<el-option
v-for="dict in item.selectedProjectRespVOList"
:key="dict.dictionaryValue"
:label="dict.dictionaryLabel"
:value="dict.dictionaryValue"
/>
</el-select>
</el-form-item>
</el-col>
@ -231,10 +471,18 @@
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" />
</template>
</Dialog>
<Dialog title="修改名称" v-model="dialogVisibleName" width="500px" :close-on-click-modal="false">
<Dialog
title="修改名称"
v-model="dialogVisibleName"
width="500px"
:close-on-click-modal="false"
>
<div style="padding: 0px 20px">
<el-form ref="nameRef" :model="nameForm">
<el-form-item :rules="[{ required: true, message: '请输入名称', trigger: 'blur' }]" prop="name">
<el-form-item
:rules="[{ required: true, message: '请输入名称', trigger: 'blur' }]"
prop="name"
>
<el-input v-model="nameForm.name" style="width: 240px" placeholder="请输入名称" />
</el-form-item>
</el-form>
@ -311,7 +559,7 @@
type: Array,
required: true,
default: null
},
}
})
const { t } = useI18n() //
@ -416,19 +664,28 @@
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id)
data.value.packageList = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
list.forEach((item, index) => {
// editableTabsValue.value = index + 1
editableTabsValue.value = 1
item.name = index + 1
item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO
item.isPass = '' //
//
allSamplePieceSize.value += parseFloat((parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) * parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize)).toFixed(6))
allSamplePieceSize.value += parseFloat(
(
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) *
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize)
).toFixed(6)
)
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
if (!item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList) {
//
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 2) {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
for (let i = 0; i < parseInt(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty); i++) {
for (
let i = 0;
i < parseInt(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty);
i++
) {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
inspectionValue: '', //
qualitativeCode: '', //
@ -445,10 +702,14 @@
inspectionValue: '', //
qualitativeCode: '', //
defectLevel: '', //
qualifiedQuantity: parseFloat((parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) * parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize)).toFixed(6)), //
qualifiedQuantity: parseFloat(
(
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) *
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize)
).toFixed(6)
), //
unqualifiedQuantity: '0' //
}
)
})
}
}
@ -474,7 +735,7 @@
rules.value['inspectionJobCharacteristicsUpdateReqVO.estimateCode'][0].required = false
}
})
list.forEach(item => {
list.forEach((item) => {
item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime = new Date()
})
data.value.subList = list
@ -483,11 +744,13 @@
第一个包装采样数量>总数量 则显示总数量
*/
for (let i = 0; i < data.value.packageList.length; i++) {
for (let i = 0; i < data.value?.packageList?.length; i++) {
if (data.value.packageList[i].sampleAmount == null) {
if (allSamplePieceSize.value > data.value.packageList[i].amount) {
data.value.packageList[i].sampleAmount = data.value.packageList[i].amount
allSamplePieceSize.value = parseFloat((allSamplePieceSize.value - data.value.packageList[i].amount).toFixed(6))
allSamplePieceSize.value = parseFloat(
(allSamplePieceSize.value - data.value.packageList[i].amount).toFixed(6)
)
} else {
data.value.packageList[i].sampleAmount = allSamplePieceSize.value
allSamplePieceSize.value = 0
@ -634,7 +897,9 @@
if (data.value.packageList?.length > 0) {
const validateForm1 = await tableFormRef.value.validateForm()
if (!validateForm1) return
let isPass = data.value.packageList.some(cur => parseFloat(cur.sampleAmount) > parseFloat(cur.amount))
let isPass = data.value.packageList.some(
(cur) => parseFloat(cur.sampleAmount) > parseFloat(cur.amount)
)
if (isPass) {
message.error(`采样数量不能大于数量`)
return
@ -689,7 +954,10 @@
)
}
//
if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime > item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) {
if (
item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >
item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime
) {
isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime)
}
//
@ -697,7 +965,10 @@
parseFloatList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return String(cur.qualifiedQuantity).indexOf('.') > -1 || String(cur.unqualifiedQuantity).indexOf('.') > -1
return (
String(cur.qualifiedQuantity).indexOf('.') > -1 ||
String(cur.unqualifiedQuantity).indexOf('.') > -1
)
}
)
)
@ -705,30 +976,33 @@
numberList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
return (
parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) !=
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
)
}
)
)
}
})
let isEmpty1 = arrBol.some(item => item == true)
let isEmptyNumberList = numberList.some(item => item == true)
let isParseFloat = parseFloatList.some(item => item == true)
let isEmpty1 = arrBol.some((item) => item == true)
let isEmptyNumberList = numberList.some((item) => item == true)
let isParseFloat = parseFloatList.some((item) => item == true)
if (isEmpty1) {
message.error('检验工序和检验特性有字段未填写完全')
return;
return
}
if (isOutweigh?.length > 0) {
message.error('检验特性中有开始时间大于结束时间')
return;
return
}
if (isParseFloat) {
message.error('合格数量和不合格数量之和不可以是小数')
return;
return
}
if (isEmptyNumberList) {
message.error('合格数量和不合格数量之和必须等于样品份数')
return;
return
}
if (formType.value == 'create') {
//
@ -737,8 +1011,7 @@
// /
emit('submitForm', formType.value, data.value)
}
} catch {
}
} catch {}
}
const staging = async () => {
@ -753,7 +1026,9 @@
if (data.value.packageList?.length > 0) {
const validateForm1 = await tableFormRef.value.validateForm()
if (!validateForm1) return
let isPass = data.value.packageList.some(cur => parseFloat(cur.sampleAmount) > parseFloat(cur.amount))
let isPass = data.value.packageList.some(
(cur) => parseFloat(cur.sampleAmount) > parseFloat(cur.amount)
)
if (isPass) {
message.error(`采样数量不能大于数量`)
return
@ -808,7 +1083,10 @@
)
}
//
if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime > item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) {
if (
item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >
item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime
) {
isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime)
}
//
@ -816,7 +1094,10 @@
parseFloatList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return String(cur.qualifiedQuantity).indexOf('.') > -1 || String(cur.unqualifiedQuantity).indexOf('.') > -1
return (
String(cur.qualifiedQuantity).indexOf('.') > -1 ||
String(cur.unqualifiedQuantity).indexOf('.') > -1
)
}
)
)
@ -824,35 +1105,37 @@
numberList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
return (
parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) !=
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
)
}
)
)
}
})
let isEmpty1 = arrBol.some(item => item == true)
let isEmptyNumberList = numberList.some(item => item == true)
let isParseFloat = parseFloatList.some(item => item == true)
let isEmpty1 = arrBol.some((item) => item == true)
let isEmptyNumberList = numberList.some((item) => item == true)
let isParseFloat = parseFloatList.some((item) => item == true)
if (isEmpty1) {
message.error('检验工序和检验特性有字段未填写完全')
return;
return
}
if (isOutweigh?.length > 0) {
message.error('检验特性中有开始时间大于结束时间')
return;
return
}
if (isParseFloat) {
message.error('合格数量和不合格数量之和不可以是小数')
return;
return
}
if (isEmptyNumberList) {
message.error('合格数量和不合格数量之和必须等于样品份数')
return;
}
await InspectionJobMainApi.stagingInspectionJobMain(data.value);
message.success("暂存成功")
} catch {
return
}
await InspectionJobMainApi.stagingInspectionJobMain(data.value)
message.success('暂存成功')
} catch {}
}
/** 弹窗按钮 */
@ -1031,13 +1314,115 @@
let obj = item.selectedProjectRespVOList.find((cur) => cur.dictionaryValue == e)
cur.defectLevel = obj.defectLevel
cur.estimateCode = obj.estimateCode
//
for (
let i = 0;
i < item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList?.length;
i++
) {
item.isPass = true
if (
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].estimateCode ==
'2'
) {
item.isPass = false
return
}
}
}
const mianscroll = ref()
const boxList = ref()
const topScrollClick = () => {
nextTick(() => {
mianscroll.value.scrollTo({ top: 550, behavior: 'smooth' });
mianscroll.value.scrollTo({ top: boxList.value.clientHeight + 550, behavior: 'smooth' })
})
}
const inspectionValueInput = (item, cur) => {
for ( let i = 0;i < item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.length;i++) {
item.isPass = true
// ,
if (
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping)
) {
item.isPass = false
return
}
// ,
if (
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit)
) {
item.isPass = false
return
}
// ,
if (
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget)
) {
item.isPass = false
return
}
// ,
if (
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
( parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
) {
item.isPass = false
return
}
// ,
if (
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
(parseFloat(cur.inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping)||
parseFloat(cur.inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget))
) {
item.isPass = false
return
}
// ,
if (
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
(parseFloat(cur.inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget)||
parseFloat(cur.inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
) {
item.isPass = false
return
}
// ,
if (
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
(parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
) {
item.isPass = false
return
}
}
}
</script>
<style scoped>
.small-title {
@ -1060,4 +1445,7 @@
.el-backtop {
position: absolute !important;
}
.red .el-input__inner {
color: red !important;
}
</style>

28
src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts

@ -106,20 +106,20 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
value: 'BY_INEVNEOTY'
}
},
{
label: '限值',
field: 'limitedValue',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps:{
disabled:false
}
}
},
// {
// label: '限值',
// field: 'limitedValue',
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// component: 'InputNumber',
// componentProps:{
// disabled:false
// }
// }
// },
{
label: '物料忽略名单',
field: 'ignoreListOfItem',

4
src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts

@ -566,7 +566,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
},{
key: 'productionLineCode',
value: 'productionLineCode',
message: '请填写生产线代码!',
message: '请选择返修生产线代码!',
isMainValue: true
}]
},
@ -586,7 +586,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
},{
key: 'productionLineCode',
value: 'productionLineCode',
message: '请填写生产线代码!',
message: '请选择返修生产线代码!',
isMainValue: true
}]
}

Loading…
Cancel
Save