Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
chenfang 5 months ago
parent
commit
a75c481354
  1. 2
      src/components/TableForm/src/TableForm.vue
  2. 46
      src/views/qms/inspection/inspectionJob/addForm.vue
  3. 2
      src/views/qms/inspection/inspectionRequest/index.vue
  4. 7
      src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts

2
src/components/TableForm/src/TableForm.vue

@ -46,7 +46,7 @@
:label="headerItem.label" :prop="headerItem.field"
:align="headerItem?.tableForm?.align || 'center'"
:sortable="headerItem?.tableForm?.sortable || false"
:width="headerItem?.tableForm?.width || '200'"
:width="headerItem?.tableForm?.width || '200px'"
:min-width="headerItem?.tableForm?.minWidth || 'auto'">
<el-form
ref="TableBaseForm_Ref"

46
src/views/qms/inspection/inspectionJob/addForm.vue

@ -312,7 +312,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1" >
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1" >
<el-form-item label="缺陷级别" required>
<el-select v-model="cur.defectLevel" placeholder="请选择缺陷级别" disabled>
<el-option
@ -718,24 +718,30 @@ const submitForm = async () => {
const valid = await elForm.validate()
if (!valid) return
//
const validateForm1 = await tableFormRef.value.validateForm()
console.log(11,data.value.packageList)
if(data.value.packageList?.length>0){
const validateForm1 = await tableFormRef.value.validateForm()
if (!validateForm1) return
let number = 0
data.value.packageList.forEach(cur=>{
number += parseFloat(cur.sampleAmount)
})
if(number > data.value.sampleTotalAmount){
message.error(`采样数量之和不可以大于总数量`)
return
let number = 0
data.value.packageList.forEach(cur=>{
number += parseFloat(cur.sampleAmount)
})
if(number != data.value.sampleTotalAmount){
message.error(`采样数量之和不等于总数量`)
return
}
}
const bol2 = await validateForm(formFeaturesRef.value)
if (!bol2) {
message.error(`模板中有检验工序和检验特性未填写完全`)
return
}
//
//
let arrBol = []
let isOutweigh = []//
let numberList = []//
data.value.subList.forEach((item, index) => {
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) {
arrBol.push(
@ -750,7 +756,7 @@ const submitForm = async () => {
arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return !cur.estimateCode || !cur.defectLevel
return !cur.estimateCode
}
)
)
@ -777,16 +783,32 @@ const submitForm = async () => {
if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) {
isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime)
}
//
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) {
numberList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != data.value.sampleTotalAmount
}
)
)
}
})
let isEmpty1 = arrBol.some(item=>item == true)
let isEmptyNumberList = numberList.some(item=>item == true)
if(isEmpty1){
message.error('检验工序和检验特性有字段未填写完全')
return;
}
if(isOutweigh.length>0){
if(isOutweigh?.length>0){
message.error('检验特性中有开始时间大于结束时间')
return;
}
console.log(44,numberList)
if(isEmptyNumberList){
message.error('合格数量和不合格数量之和不等于总数量')
return;
}
if (formType.value == 'create') {
//
emit('submitForm', formType.value, data.value)

2
src/views/qms/inspection/inspectionRequest/index.vue

@ -220,7 +220,7 @@ const listTableRef = ref()
await message.confirm(t('common.confirmHandle'))
tableObject.loading = true
await InspectionMainApi.handleInspectRequestMain(id)
message.success(t('common.handleSuccess'))
message.success(t('common.dealwithSuccess'))
await getList()
}catch{}finally{
tableObject.loading = false

7
src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts

@ -365,11 +365,10 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
tableForm:{
width:500,
disabled:true
},
table:{
width:150
width:200
}
},
{
@ -381,7 +380,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
disabled:true
},
table:{
width:150
width:200
}
},
{
@ -393,7 +392,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
disabled:true
},
table:{
width:150
width:180
}
},
{

Loading…
Cancel
Save