diff --git a/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts b/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts
index ef179509a..375e69b2f 100644
--- a/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts
+++ b/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts
@@ -46,7 +46,7 @@ export const createInspectionRecordMain = async (data: InspectionRecordMainVO) =
// 修改检验申请
export const updateInspectionRecordMain = async (data: InspectionRecordMainVO) => {
- return await request.put({ url: `/qms/inspection-record-main/update`, data })
+ return await request.put({ url: `/qms/inspection-record-main/firstInspectionUpdate`, data })
}
// 删除检验申请
diff --git a/src/views/qms/inspectionJob/addForm.vue b/src/views/qms/inspectionJob/addForm.vue
index 55c1b29cd..8a2edf4eb 100644
--- a/src/views/qms/inspectionJob/addForm.vue
+++ b/src/views/qms/inspectionJob/addForm.vue
@@ -681,8 +681,9 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
data.value = JSON.parse(JSON.stringify(row))
// await InspectionJobMainApi.acceptInspectionJobMain(row.id)
let list = []
- list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id)
- data.value.packageList = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
+ const masterId = row.jobId ||row.id
+ list = await InspectionJobDetailPageApi.getInspectionJobDetailList(masterId)
+ data.value.packageList = await InspectionJobPackageApi.getInspectionJobPackageList(masterId)
list.forEach((item, index) => {
editableTabsValue.value = 1
item.name = index + 1
@@ -913,7 +914,6 @@ const submitForm = async () => {
const valid = await elForm.validate()
if (!valid) return
// 校验包装列表
-
if (data.value.packageList?.length > 0) {
const validateForm1 = await tableFormRef.value.validateForm()
if (!validateForm1) return
@@ -924,6 +924,7 @@ const submitForm = async () => {
message.error(`采样数量不能大于数量`)
return
}
+
// let number = 0
// data.value.packageList.forEach(cur=>{
// number += parseFloat(cur.sampleAmount)
@@ -1024,6 +1025,7 @@ const submitForm = async () => {
message.error('合格数量和不合格数量之和必须等于样品份数')
return
}
+ data.value.id = data.value.jobId
if (formType.value == 'create') {
// 主子表——提交请求
emit('submitForm', formType.value, data.value)
diff --git a/src/views/qms/inspectionRecord/index.vue b/src/views/qms/inspectionRecord/index.vue
index 2d9930416..678b64570 100644
--- a/src/views/qms/inspectionRecord/index.vue
+++ b/src/views/qms/inspectionRecord/index.vue
@@ -32,11 +32,22 @@
basicFormWidth="80"
:tableAllSchemas="InspectionRecordPackage.allSchemas"
:tableFormRules="InspectionRecordPackageRules"
- :rules="InspectionRecordMainRules"
- :formAllSchemas="InspectionRecordMain.allSchemas"
+ :rules="InspectionRecordUserRules"
+ :formAllSchemas="InspectionRecordUser.allSchemas"
@submitForm="submitForm"
/>
+
+
-
+
diff --git a/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts b/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts
index 8732b2aa3..8ede0bdc3 100644
--- a/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts
+++ b/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts
@@ -15,10 +15,14 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'number',
sort: 'custom',
isSearch: true,
- isForm: false,
table: {
width: 200,
fixed: 'left'
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
}
},
{
@@ -26,9 +30,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'requestNumber',
sort: 'custom',
isSearch: true,
- isForm: false,
table: {
width: 200
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
}
},
{
@@ -36,9 +44,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'jobNumber',
sort: 'custom',
isSearch: false,
- isForm: false,
table: {
width: 200
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
}
},
{
@@ -46,6 +58,7 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'asnNumber',
sort: 'custom',
isSearch: true,
+ isForm:false,
form: {
componentProps: {
disabled: true
@@ -60,9 +73,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'supplierCode',
sort: 'custom',
isSearch: false,
- isForm: false,
table: {
width: 200
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
}
},
{
@@ -70,7 +87,6 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'supplierName',
sort: 'custom',
isSearch: false,
- isForm: false,
table: {
width: 200
},
@@ -85,7 +101,6 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'itemCode',
sort: 'custom',
isSearch: false,
- isForm: false,
table: {
width: 150
},
@@ -100,7 +115,6 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'itemName',
sort: 'custom',
isSearch: false,
- isForm: false,
table: {
width: 200
},
@@ -115,9 +129,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'batch',
sort: 'custom',
isSearch: false,
- isForm: false,
table: {
width: 150
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
}
},
{
@@ -125,9 +143,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'supplierBatch',
sort: 'custom',
isSearch: false,
- isForm: false,
table: {
width: 150
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
}
},
{
@@ -135,9 +157,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'inspectionSchemeCode',
sort: 'custom',
isSearch: false,
- isForm: false,
table: {
width: 200
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
}
},
{
@@ -145,9 +171,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'inspectionBatch',
sort: 'custom',
isSearch: false,
- isForm: false,
table: {
width: 150
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
}
},
{
@@ -155,9 +185,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'inspectionBatchAmount',
sort: 'custom',
isSearch: false,
- isForm: false,
table: {
width: 150
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
}
},
// {
@@ -176,9 +210,11 @@ export const InspectionRecordMain = useCrudSchemas(
dictType: DICT_TYPE.INSPECTION_TYPE,
sort: 'custom',
isSearch: false,
- isForm: false,
form: {
- component: 'Select'
+ component: 'Select',
+ componentProps: {
+ disabled: true
+ }
},
table: {
width: 150
@@ -189,9 +225,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'referenceOrderCode',
sort: 'custom',
isSearch: false,
- isForm: false,
table: {
width: 150
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
}
},
{
@@ -199,10 +239,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'referenceOrderRow',
sort: 'custom',
isSearch: false,
- isForm: false,
form: {
component: 'InputNumber',
- value: 0
+ value: 0,
+ componentProps: {
+ disabled: true
+ }
+
},
table: {
width: 150
@@ -213,9 +256,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'referenceCertificateCode',
sort: 'custom',
isSearch: false,
- isForm: false,
table: {
width: 150
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
}
},
{
@@ -224,10 +271,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
- isForm: false,
form: {
component: 'InputNumber',
- value: 0
+ value: 0,
+ componentProps: {
+ disabled: true
+ }
+
},
table: {
width: 150
@@ -238,10 +288,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'inspectionStage',
sort: 'custom',
isSearch: false,
- isForm: false,
form: {
component: 'InputNumber',
- value: 0
+ value: 0,
+ componentProps: {
+ disabled: true
+ }
+
},
table: {
width: 150
@@ -253,9 +306,13 @@ export const InspectionRecordMain = useCrudSchemas(
dictType: DICT_TYPE.INSPECTION_SEVERITY,
sort: 'custom',
isSearch: false,
- isForm: false,
table: {
width: 150
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
}
},
{
@@ -264,7 +321,6 @@ export const InspectionRecordMain = useCrudSchemas(
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
- isForm: false,
search: {
component: 'DatePicker',
componentProps: {
@@ -277,7 +333,8 @@ export const InspectionRecordMain = useCrudSchemas(
component: 'DatePicker',
componentProps: {
type: 'datetime',
- valueFormat: 'x'
+ valueFormat: 'x',
+ disabled: true
}
},
detail: {
@@ -293,7 +350,6 @@ export const InspectionRecordMain = useCrudSchemas(
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
- isForm: false,
search: {
component: 'DatePicker',
componentProps: {
@@ -306,7 +362,8 @@ export const InspectionRecordMain = useCrudSchemas(
component: 'DatePicker',
componentProps: {
type: 'datetime',
- valueFormat: 'x'
+ valueFormat: 'x',
+ disabled: true
}
},
detail: {
@@ -322,7 +379,6 @@ export const InspectionRecordMain = useCrudSchemas(
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
- isForm: false,
search: {
component: 'DatePicker',
componentProps: {
@@ -335,7 +391,8 @@ export const InspectionRecordMain = useCrudSchemas(
component: 'DatePicker',
componentProps: {
type: 'datetime',
- valueFormat: 'x'
+ valueFormat: 'x',
+ disabled: true
}
},
detail: {
@@ -351,7 +408,6 @@ export const InspectionRecordMain = useCrudSchemas(
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
- isForm: false,
search: {
component: 'DatePicker',
componentProps: {
@@ -364,7 +420,8 @@ export const InspectionRecordMain = useCrudSchemas(
component: 'DatePicker',
componentProps: {
type: 'datetime',
- valueFormat: 'x'
+ valueFormat: 'x',
+ disabled: true
}
},
detail: {
@@ -374,13 +431,13 @@ export const InspectionRecordMain = useCrudSchemas(
width: 175
}
},
+
{
label: '收货时间',
field: 'deliveryTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
- isForm: false,
search: {
component: 'DatePicker',
componentProps: {
@@ -390,6 +447,7 @@ export const InspectionRecordMain = useCrudSchemas(
}
},
form: {
+ component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
@@ -408,9 +466,13 @@ export const InspectionRecordMain = useCrudSchemas(
dictType: DICT_TYPE.INSPECTION_LEVEL,
sort: 'custom',
isSearch: false,
- isForm: false,
table: {
width: 150
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
}
},
{
@@ -419,9 +481,13 @@ export const InspectionRecordMain = useCrudSchemas(
dictType: DICT_TYPE.BASIC_AQL,
sort: 'custom',
isSearch: false,
- isForm: false,
table: {
width: 150
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
}
},
{
@@ -432,7 +498,8 @@ export const InspectionRecordMain = useCrudSchemas(
dictType: DICT_TYPE.USAGE_DECISION,
table: {
width: 150
- }
+ },
+ isForm:false
},
{
label: '执行结果',
@@ -440,31 +507,13 @@ export const InspectionRecordMain = useCrudSchemas(
dictType: DICT_TYPE.EVALUATION_CODE,
sort: 'custom',
isSearch: false,
- isForm: false,
table: {
width: 150
- }
- },
- {
- label: '是否可用',
- field: 'available',
- sort: 'custom',
- isSearch: true,
- dictType: DICT_TYPE.TRUE_FALSE,
- dictClass: 'string', // 默认都是字符串类型其他暂不考虑
- search: {
- value: 'TRUE'
},
form: {
- component: 'Switch',
- value: 'TRUE',
componentProps: {
- inactiveValue: 'FALSE',
- activeValue: 'TRUE'
+ disabled: true
}
- },
- table: {
- width: 110
}
},
{
@@ -537,7 +586,7 @@ export const InspectionRecordMain = useCrudSchemas(
isForm: false,
isDetail: false,
table: {
- width: 200,
+ width: 250,
fixed: 'right'
}
}
@@ -709,12 +758,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
field: 'number',
sort: 'custom',
isSearch: true,
- tableForm:{
- disabled:true,
- width:200
+ tableForm: {
+ disabled: true,
+ width: 200
},
- table:{
- width:150
+ table: {
+ width: 150
}
},
{
@@ -722,12 +771,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
field: 'packageCode',
sort: 'custom',
isSearch: true,
- tableForm:{
- disabled:true,
- width:160
+ tableForm: {
+ disabled: true,
+ width: 160
},
- table:{
- width:150
+ table: {
+ width: 150
}
},
{
@@ -735,12 +784,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
- tableForm:{
- disabled:true,
- width:150
+ tableForm: {
+ disabled: true,
+ width: 150
},
- table:{
- width:150
+ table: {
+ width: 150
}
},
{
@@ -752,12 +801,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
component: 'InputNumber',
value: 0
},
- tableForm:{
- disabled:true,
- width:120
+ tableForm: {
+ disabled: true,
+ width: 120
},
- table:{
- width:150
+ table: {
+ width: 150
}
},
{
@@ -765,12 +814,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
field: 'measuringUnit',
sort: 'custom',
isSearch: true,
- tableForm:{
- disabled:true,
- width:120
+ tableForm: {
+ disabled: true,
+ width: 120
},
- table:{
- width:150
+ table: {
+ width: 150
}
},
{
@@ -778,12 +827,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
field: 'sampleAmount',
sort: 'custom',
isSearch: true,
- tableForm:{
- disabled:true,
- width:100
+ tableForm: {
+ disabled: true,
+ width: 100
},
- table:{
- width:150
+ table: {
+ width: 150
}
},
{
@@ -791,12 +840,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
field: 'qualifiedAmount',
sort: 'custom',
isSearch: true,
- tableForm:{
- disabled:true,
- width:100
+ tableForm: {
+ disabled: true,
+ width: 100
},
- table:{
- width:150
+ table: {
+ width: 150
}
},
{
@@ -804,12 +853,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
field: 'noQualifiedAmount',
sort: 'custom',
isSearch: true,
- tableForm:{
- disabled:true,
- width:100
+ tableForm: {
+ disabled: true,
+ width: 100
},
- table:{
- width:150
+ table: {
+ width: 150
}
},
{
@@ -817,12 +866,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
field: 'destroyAmount',
sort: 'custom',
isSearch: true,
- tableForm:{
- disabled:true,
- width:100
+ tableForm: {
+ disabled: true,
+ width: 100
},
- table:{
- width:150
+ table: {
+ width: 150
}
},
{
@@ -830,12 +879,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
field: 'frozenAmount',
sort: 'custom',
isSearch: true,
- tableForm:{
- disabled:true,
- width:100
+ tableForm: {
+ disabled: true,
+ width: 100
},
- table:{
- width:150
+ table: {
+ width: 150
}
}
]))
@@ -844,18 +893,55 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([
export const InspectionRecordPackageRules = reactive({
qualifiedAmount: [
required,
- { validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'}
+ { validator: validateSixNum, message: '小数点后最多6位', trigger: 'blur' }
],
frozenAmount: [
required,
- { validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'}
+ { validator: validateSixNum, message: '小数点后最多6位', trigger: 'blur' }
],
destroyAmount: [
required,
- { validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'}
+ { validator: validateSixNum, message: '小数点后最多6位', trigger: 'blur' }
],
noQualifiedAmount: [
required,
- { validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'}
+ { validator: validateSixNum, message: '小数点后最多6位', trigger: 'blur' }
],
})
+
+
+//表单校验
+export const InspectionRecordUserRules = reactive({
+ useDecision: [required],
+
+})
+
+/**
+ * @returns {Array} 检验任务子表
+ */
+export const InspectionRecordUser = useCrudSchemas(reactive([
+ {
+ label: '发货单号',
+ field: 'asnNumber',
+ sort: 'custom',
+ isSearch: true,
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ },
+ table: {
+ width: 180
+ }
+ },
+ {
+ label: '使用决策',
+ field: 'useDecision',
+ sort: 'custom',
+ isSearch: false,
+ dictType: DICT_TYPE.USAGE_DECISION,
+ table: {
+ width: 150
+ }
+ },
+]))
diff --git a/src/views/qms/inspectionRecordFirst/addForm.vue b/src/views/qms/inspectionRecordFirst/addForm.vue
index 394e2036c..b89b7d47e 100644
--- a/src/views/qms/inspectionRecordFirst/addForm.vue
+++ b/src/views/qms/inspectionRecordFirst/addForm.vue
@@ -12,7 +12,7 @@
style="max-height: 80vh; overflow-y: auto; padding: 0px 20px"
ref="mianscroll"
>
-
+
@@ -945,7 +945,6 @@ await formMainRef.value.validate()
message.error(`模板中有检验工序和检验特性未填写完全`)
return
}
- debugger
// 判断数组是否有未填的选项
let arrBol = []
let isOutweigh = [] //结束时间是否大于开始时间
diff --git a/src/views/qms/inspectionRecordFirst/index.vue b/src/views/qms/inspectionRecordFirst/index.vue
index 617cc1aec..de5d008bf 100644
--- a/src/views/qms/inspectionRecordFirst/index.vue
+++ b/src/views/qms/inspectionRecordFirst/index.vue
@@ -60,8 +60,8 @@
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
- import AddForm from './addForm.vue'
-import Detail from './detail.vue'
+ import AddForm from '../inspectionRecordFirst/addForm.vue'
+ import Detail from './detail.vue'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data'
@@ -129,14 +129,7 @@ const buttonBaseClick = (val, item) => {
}
const isShowMainButton = (row, val) => {
- if(!row.callbackRequestNumber) {//callbackRequestNumber为空是手工创建订单,不需要使用决策和发布
- return true;
- }
- if(row.useDecision) {
- return row.isPublished
- } else {
- return val ? true : false
- }
+ return row.isPublished
}
// 列表-操作按钮
@@ -249,8 +242,8 @@ const buttonBaseClick = (val, item) => {
const searchFormClick = (searchData) => {
searchData.filters.push({
action: "==",
- column: "firstInspectionAdded",
- value: "TRUE"
+ column: "inspectionType",
+ value: "11"
})
tableObject.params = {
isSearch: true,
@@ -263,7 +256,7 @@ const searchFormClick = (searchData) => {
onMounted(async () => {
tableObject.params = {
available: true,
- firstInspectionAdded:'TRUE'
+ inspectionType:'11'
}
getList()
})
diff --git a/src/views/qms/inspectionRecordFirst/inspectionRecordFirstMain.data.ts b/src/views/qms/inspectionRecordFirst/inspectionRecordFirstMain.data.ts
index d13d90c05..153178dc4 100644
--- a/src/views/qms/inspectionRecordFirst/inspectionRecordFirstMain.data.ts
+++ b/src/views/qms/inspectionRecordFirst/inspectionRecordFirstMain.data.ts
@@ -52,16 +52,6 @@ export const InspectionRecordMain = useCrudSchemas(
}
}
},
- {
- label: '批次',
- field: 'batch',
- sort: 'custom',
- isSearch: false,
- isForm: false,
- table: {
- width: 150
- }
- },
{
label: '检验批次',
field: 'inspectionBatch',
@@ -72,16 +62,6 @@ export const InspectionRecordMain = useCrudSchemas(
width: 150
}
},
- {
- label: '检验批数量',
- field: 'inspectionBatchAmount',
- sort: 'custom',
- isSearch: false,
- isForm: false,
- table: {
- width: 150
- }
- },
{
label: '检验方案编码',
field: 'inspectionSchemeCode',