diff --git a/src/components/TableForm/src/TableForm.vue b/src/components/TableForm/src/TableForm.vue
index 131269e58..07d517be8 100644
--- a/src/components/TableForm/src/TableForm.vue
+++ b/src/components/TableForm/src/TableForm.vue
@@ -65,7 +65,7 @@
:placeholder="headerItem?.tableForm?.placeholder || '请输入' + headerItem.label"
:disabled="headerItem?.tableForm?.disabled ? true: headerItem?.tableForm?.isInpuFocusShow ? true : false"
style="flex:1"
- @blur="inputStringBlur(headerItem.field, $event, row)"
+ @blur="inputStringBlur(headerItem.field, row[headerItem.field], row)"
/>
diff --git a/src/views/qms/basicDataManage/inspectionScheme/addForm.vue b/src/views/qms/basicDataManage/inspectionScheme/addForm.vue
index 135df48f1..7d4e8c830 100644
--- a/src/views/qms/basicDataManage/inspectionScheme/addForm.vue
+++ b/src/views/qms/basicDataManage/inspectionScheme/addForm.vue
@@ -18,7 +18,7 @@
-
+
{
data.value.programmeTemplateName = val[0].description
data.value['dynamicUpdateCode'] = val[0].dynamicUpdateCode
data.value.dynamicUpdateName = val[0].dynamicUpdateName
+ console.log(val[0])
}
if (formField == 'programmeTemplateCode') {
diff --git a/src/views/qms/inspection/inspectionJob/addForm.vue b/src/views/qms/inspection/inspectionJob/addForm.vue
index a93dc3535..983e249ad 100644
--- a/src/views/qms/inspection/inspectionJob/addForm.vue
+++ b/src/views/qms/inspection/inspectionJob/addForm.vue
@@ -62,9 +62,9 @@
-
+
-
+
@@ -318,7 +318,7 @@ const rules = ref({
{ required: true, message: '请选择评估代码', trigger: 'blur' }
],
'inspectionJobCharacteristicsUpdateReqVO.inspectionQty': [
- { required: true, message: '请输入检验次数', trigger: 'blur' }
+ { required: true, message: '请输入样品份数', trigger: 'blur' }
],
qualifiedQuantity: [{ required: true, message: '请输入选择结束时间', trigger: 'blur' }]
})
@@ -620,7 +620,7 @@ const submitForm = async () => {
return;
}
if(isEmptyNumberList){
- message.error('合格数量和不合格数量之和必须等于检验次数')
+ message.error('合格数量和不合格数量之和必须等于样品份数')
return;
}
if (formType.value == 'create') {
diff --git a/src/views/qms/inspection/inspectionRecord/addForm.vue b/src/views/qms/inspection/inspectionRecord/addForm.vue
index f5bc407e4..2cf053675 100644
--- a/src/views/qms/inspection/inspectionRecord/addForm.vue
+++ b/src/views/qms/inspection/inspectionRecord/addForm.vue
@@ -26,6 +26,7 @@
:tableData="data.packageList"
:isShowButton="false"
:isShowReduceButton="false"
+ @inputStringBlur="tableFormBlur"
/>
@@ -126,10 +127,10 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
data.value = JSON.parse(JSON.stringify(row))
data.value.packageList = await InspectionRecordPackageApi.getInspectionRecordPackageList(row.id)
data.value.packageList.forEach(item=>{
- item.qualifiedAmount =0
- item.noQualifiedAmount =0
- item.destroyAmount =0
- item.frozenAmount =0
+ item.qualifiedAmount = item.qualifiedAmount?item.qualifiedAmount:0
+ item.noQualifiedAmount = item.noQualifiedAmount?item.noQualifiedAmount:0
+ item.destroyAmount = item.destroyAmount?item.destroyAmount:0
+ item.frozenAmount = item.frozenAmount?item.frozenAmount:0
})
dialogVisible.value = true
tableSchemas.value.tableFormColumns.map(item=>{
@@ -141,10 +142,10 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
item.qualifiedAmount = item.amount
})
}
- // 全不合格只能输入不合格数量
+ // 让步接收和部分合格
else if(row.useDecision == 2 || row.useDecision == 6){
tableSchemas.value.tableFormColumns.map(item=>{
- if(item.field == 'qualifiedAmount' ||item.field == 'noQualifiedAmount'){
+ if(item.field == 'noQualifiedAmount'){
item.tableForm.disabled = false
}else{
item.tableForm.disabled = true
@@ -162,8 +163,12 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
item.frozenAmount = item.amount
})
}
+ // 评估代码值是1,接收时候,使用决策下拉列表是全部合格
+ if(row.estimateCode == 1){
+ data.value.useDecision = '1'
+ }
nextTick(() => {
- formMainRef.value.setValues(row)
+ formMainRef.value.setValues( data.value)
})
}
dialogVisible.value = true
@@ -205,8 +210,11 @@ const onChange = (field, cur)=>{
}
// 全不合格只能输入不合格数量
else if(cur == 2 || cur == 6){
+ data.value.packageList.forEach(item=>{
+ item.qualifiedAmount = item.amount
+ })
tableSchemas.value.tableFormColumns.map(item=>{
- if(item.field == 'qualifiedAmount' ||item.field == 'noQualifiedAmount'){
+ if(item.field == 'noQualifiedAmount'){
item.tableForm.disabled = false
}else{
item.tableForm.disabled = true
@@ -226,6 +234,16 @@ const onChange = (field, cur)=>{
}
}
}
+// 失去焦点
+const tableFormBlur = (field, val,row)=>{
+ if( row.amount < val){
+ row.noQualifiedAmount = row.amount
+ row.qualifiedAmount = 0
+ }else{
+ row.qualifiedAmount = row.amount - val
+ }
+
+}
const buttonBaseClick = (val) => {
// 保存
if (val == 'save') {
diff --git a/src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts b/src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts
index 9d3752b78..1d5eb9a1c 100644
--- a/src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts
+++ b/src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts
@@ -582,7 +582,8 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
sort: 'custom',
isSearch: true,
tableForm:{
- disabled:true
+ disabled:true,
+ width:200
},
table:{
width:150
@@ -594,7 +595,8 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
sort: 'custom',
isSearch: true,
tableForm:{
- disabled:true
+ disabled:true,
+ width:160
},
table:{
width:150
@@ -606,7 +608,8 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
sort: 'custom',
isSearch: true,
tableForm:{
- disabled:true
+ disabled:true,
+ width:150
},
table:{
width:150
@@ -622,7 +625,8 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
value: 0
},
tableForm:{
- disabled:true
+ disabled:true,
+ width:120
},
table:{
width:150
@@ -634,7 +638,8 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
sort: 'custom',
isSearch: true,
tableForm:{
- disabled:true
+ disabled:true,
+ width:120
},
table:{
width:150
@@ -646,7 +651,8 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
sort: 'custom',
isSearch: true,
tableForm:{
- disabled:true
+ disabled:true,
+ width:100
},
table:{
width:150
@@ -658,7 +664,8 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
sort: 'custom',
isSearch: true,
tableForm:{
- disabled:true
+ disabled:true,
+ width:100
},
table:{
width:150
@@ -670,7 +677,8 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
sort: 'custom',
isSearch: true,
tableForm:{
- disabled:true
+ disabled:true,
+ width:100
},
table:{
width:150
@@ -682,7 +690,8 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
sort: 'custom',
isSearch: true,
tableForm:{
- disabled:true
+ disabled:true,
+ width:100
},
table:{
width:150
@@ -694,7 +703,8 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
sort: 'custom',
isSearch: true,
tableForm:{
- disabled:true
+ disabled:true,
+ width:100
},
table:{
width:150
diff --git a/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts b/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts
index 6a17ef32a..a127aa011 100644
--- a/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts
+++ b/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts
@@ -190,6 +190,11 @@ export const InspectionMain = useCrudSchemas(reactive([
searchField: 'code', // 查询弹窗赋值字段
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
multiple:false,
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
}
}
},
@@ -223,6 +228,11 @@ export const InspectionMain = useCrudSchemas(reactive([
searchField: 'code', // 查询弹窗赋值字段
searchPage: ItemApi.getItembasicPage, // 查询弹窗所需分页方法
multiple:false,
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
}
}
},