Browse Source

检验记录执行和收件检验记录

hella_online_20240829
zhang_li 4 months ago
parent
commit
691e735de2
  1. 2
      src/api/qms/inspectionRecord/inspectionRecordMain/index.ts
  2. 8
      src/views/qms/inspectionJob/addForm.vue
  3. 80
      src/views/qms/inspectionRecord/index.vue
  4. 304
      src/views/qms/inspectionRecord/inspectionRecordMain.data.ts
  5. 3
      src/views/qms/inspectionRecordFirst/addForm.vue
  6. 19
      src/views/qms/inspectionRecordFirst/index.vue
  7. 20
      src/views/qms/inspectionRecordFirst/inspectionRecordFirstMain.data.ts

2
src/api/qms/inspectionRecord/inspectionRecordMain/index.ts

@ -46,7 +46,7 @@ export const createInspectionRecordMain = async (data: InspectionRecordMainVO) =
// 修改检验申请 // 修改检验申请
export const updateInspectionRecordMain = 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 })
} }
// 删除检验申请 // 删除检验申请

8
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)) data.value = JSON.parse(JSON.stringify(row))
// await InspectionJobMainApi.acceptInspectionJobMain(row.id) // await InspectionJobMainApi.acceptInspectionJobMain(row.id)
let list = [] let list = []
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id) const masterId = row.jobId ||row.id
data.value.packageList = await InspectionJobPackageApi.getInspectionJobPackageList(row.id) list = await InspectionJobDetailPageApi.getInspectionJobDetailList(masterId)
data.value.packageList = await InspectionJobPackageApi.getInspectionJobPackageList(masterId)
list.forEach((item, index) => { list.forEach((item, index) => {
editableTabsValue.value = 1 editableTabsValue.value = 1
item.name = index + 1 item.name = index + 1
@ -913,7 +914,6 @@ const submitForm = async () => {
const valid = await elForm.validate() const valid = await elForm.validate()
if (!valid) return if (!valid) return
// //
if (data.value.packageList?.length > 0) { if (data.value.packageList?.length > 0) {
const validateForm1 = await tableFormRef.value.validateForm() const validateForm1 = await tableFormRef.value.validateForm()
if (!validateForm1) return if (!validateForm1) return
@ -924,6 +924,7 @@ const submitForm = async () => {
message.error(`采样数量不能大于数量`) message.error(`采样数量不能大于数量`)
return return
} }
// let number = 0 // let number = 0
// data.value.packageList.forEach(cur=>{ // data.value.packageList.forEach(cur=>{
// number += parseFloat(cur.sampleAmount) // number += parseFloat(cur.sampleAmount)
@ -1024,6 +1025,7 @@ const submitForm = async () => {
message.error('合格数量和不合格数量之和必须等于样品份数') message.error('合格数量和不合格数量之和必须等于样品份数')
return return
} }
data.value.id = data.value.jobId
if (formType.value == 'create') { if (formType.value == 'create') {
// //
emit('submitForm', formType.value, data.value) emit('submitForm', formType.value, data.value)

80
src/views/qms/inspectionRecord/index.vue

@ -32,11 +32,22 @@
basicFormWidth="80" basicFormWidth="80"
:tableAllSchemas="InspectionRecordPackage.allSchemas" :tableAllSchemas="InspectionRecordPackage.allSchemas"
:tableFormRules="InspectionRecordPackageRules" :tableFormRules="InspectionRecordPackageRules"
:rules="InspectionRecordMainRules" :rules="InspectionRecordUserRules"
:formAllSchemas="InspectionRecordMain.allSchemas" :formAllSchemas="InspectionRecordUser.allSchemas"
@submitForm="submitForm" @submitForm="submitForm"
/> />
<!-- 新增 -->
<AddForm
ref="basicFormRef"
basicFormWidth="80"
:formAllSchemas="InspectionRecordMain.allSchemas"
:tableAllSchemas="InspectionJobPackage.allSchemas"
:tableFormRules="InspectionJobPackageRules"
:rules="InspectionTemplateRules"
@submitForm="submitFormExecute"
/>
<Detail <Detail
ref="detailRef" :isBasic="false" :allSchemas="InspectionRecordMain.allSchemas" ref="detailRef" :isBasic="false" :allSchemas="InspectionRecordMain.allSchemas"
@ -47,14 +58,15 @@
:apiDelete="InspectionRecordDetailApi.deleteInspectionRecordDetail" @searchTableSuccessDetail="searchTableSuccessDetail" :apiDelete="InspectionRecordDetailApi.deleteInspectionRecordDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false" :detailButtonIsShow="true" :isShowAddBtn="false" :detailButtonIsShow="true"
/> />
<!-- 包装信息 --> <ListTable ref="listTableRef" titleName="包装信息" :allSchemas="InspectionRecordMain.allSchemas" <!-- 包装信息 -->
<ListTable ref="listTableRef" titleName="包装信息" :allSchemas="InspectionRecordMain.allSchemas"
:detailAllSchemas="InspectionRecordPackage.allSchemas" :detailAllSchemasRules="InspectionRecordPackageRules" :detailAllSchemas="InspectionRecordPackage.allSchemas" :detailAllSchemasRules="InspectionRecordPackageRules"
:list="list"/> :list="list"/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { InspectionRecordMain, InspectionRecordMainRules, InspectionRecordDetail, InspectionRecordDetailRules,InspectionRecordPackage, InspectionRecordPackageRules} from './inspectionRecordMain.data' import { InspectionRecordMain, InspectionRecordMainRules, InspectionRecordDetail, InspectionRecordDetailRules,InspectionRecordPackage, InspectionRecordPackageRules,InspectionRecordUser,InspectionRecordUserRules} from './inspectionRecordMain.data'
// import { InspectionJobPackage,InspectionJobPackageRules} from '../inspectionJob/inspectionJobMain.data' // import { InspectionJobPackage,InspectionJobPackageRules} from '../inspectionJob/inspectionJobMain.data'
import * as InspectionRecordPackageApi from '@/api/qms/inspectionRecord/InspectionRecordPackage/InspectionRecordPackage' import * as InspectionRecordPackageApi from '@/api/qms/inspectionRecord/InspectionRecordPackage/InspectionRecordPackage'
import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain' import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain'
@ -63,10 +75,18 @@
import ListTable from '@/components/ListTable/src/ListTable.vue' import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import UseAddForm from './useAddForm.vue' import UseAddForm from './useAddForm.vue'
import Detail from './detail.vue' import AddForm from '../inspectionJob/addForm.vue'
import Detail from './detail.vue'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data' import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import {
InspectionJobMain,
InspectionJobMainRules,
InspectionJobDetail,
InspectionJobDetailRules,
InspectionJobPackage,
InspectionJobPackageRules
} from '../inspectionJob/inspectionJobMain.data'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
@ -149,6 +169,11 @@ const buttonBaseClick = (val, item) => {
// defaultButtons.mainListDeleteBtn(null), // // defaultButtons.mainListDeleteBtn(null), //
defaultButtons.mainListOrderPubBtn({ hide: isShowMainButton(row, 'publish'), hasPermi:'qms:inspection-recode-main:pub'}), // defaultButtons.mainListOrderPubBtn({ hide: isShowMainButton(row, 'publish'), hasPermi:'qms:inspection-recode-main:pub'}), //
defaultButtons.mainListPackageBtn(null), // defaultButtons.mainListPackageBtn(null), //
// defaultButtons.mainListJobExeBtn({
// hide:row.useDecision,
// hasPermi: 'qms:inspection-recode-main:execute',
// }), //
defaultButtons.mainListEditBtn({ hide:row.useDecision }), //
] ]
} }
@ -188,14 +213,17 @@ const buttonBaseClick = (val, item) => {
handleDelete(row.id) handleDelete(row.id)
}else if (val == 'mainOrderPub') { // }else if (val == 'mainOrderPub') { //
handleOrderPub(row) handleOrderPub(row)
}else if (val == 'edit') { //
//
execute('execute', row)
} }
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = async (type : string, row ?: number) => { // const openForm = async (type : string, row ?: number) => {
tableData.value = [] // // tableData.value = [] //
basicFormRef.value.open(type, row) // basicFormRef.value.open(type, row)
} // }
/** 使用决策操作操作 */ /** 使用决策操作操作 */
const formRef = ref() const formRef = ref()
const openUseForm = async (type : string, row ?: number) => { const openUseForm = async (type : string, row ?: number) => {
@ -235,7 +263,11 @@ const buttonBaseClick = (val, item) => {
} }
//
const execute = async (type: string, row?: number) => {
basicFormRef.value.open(type, row)
}
/** 导出按钮操作 */ /** 导出按钮操作 */
const exportLoading = ref(false) // const exportLoading = ref(false) //
const handleExport = async () => { const handleExport = async () => {
@ -278,6 +310,26 @@ const buttonBaseClick = (val, item) => {
} finally { } finally {
formRef.value.formLoading = false formRef.value.formLoading = false
} }
}
//
const submitFormExecute = async (formType, data) => {
// return
console.log(formType, data)
data.status = '2'
try {
if (formType === 'create') {
await InspectionJobMainApi.createInspectionJobMain(data)
message.success(t('common.createSuccess'))
} else if (formType === 'execute') {
await InspectionJobMainApi.executeInspectionJobMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
//
getList()
} finally {
basicFormRef.value.formLoading = false
}
} }
// //
@ -291,9 +343,9 @@ const buttonBaseClick = (val, item) => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
  tableObject.params = { tableObject.params = {
    available: true available: true
  } }
getList() getList()
}) })
</script> </script>

304
src/views/qms/inspectionRecord/inspectionRecordMain.data.ts

@ -15,10 +15,14 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false,
table: { table: {
width: 200, width: 200,
fixed: 'left' fixed: 'left'
},
form: {
componentProps: {
disabled: true
}
} }
}, },
{ {
@ -26,9 +30,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'requestNumber', field: 'requestNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false,
table: { table: {
width: 200 width: 200
},
form: {
componentProps: {
disabled: true
}
} }
}, },
{ {
@ -36,9 +44,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'jobNumber', field: 'jobNumber',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 200 width: 200
},
form: {
componentProps: {
disabled: true
}
} }
}, },
{ {
@ -46,6 +58,7 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'asnNumber', field: 'asnNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm:false,
form: { form: {
componentProps: { componentProps: {
disabled: true disabled: true
@ -60,9 +73,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'supplierCode', field: 'supplierCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 200 width: 200
},
form: {
componentProps: {
disabled: true
}
} }
}, },
{ {
@ -70,7 +87,6 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'supplierName', field: 'supplierName',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 200 width: 200
}, },
@ -85,7 +101,6 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 150 width: 150
}, },
@ -100,7 +115,6 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'itemName', field: 'itemName',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 200 width: 200
}, },
@ -115,9 +129,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'batch', field: 'batch',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 150 width: 150
},
form: {
componentProps: {
disabled: true
}
} }
}, },
{ {
@ -125,9 +143,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'supplierBatch', field: 'supplierBatch',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 150 width: 150
},
form: {
componentProps: {
disabled: true
}
} }
}, },
{ {
@ -135,9 +157,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'inspectionSchemeCode', field: 'inspectionSchemeCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 200 width: 200
},
form: {
componentProps: {
disabled: true
}
} }
}, },
{ {
@ -145,9 +171,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'inspectionBatch', field: 'inspectionBatch',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 150 width: 150
},
form: {
componentProps: {
disabled: true
}
} }
}, },
{ {
@ -155,9 +185,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'inspectionBatchAmount', field: 'inspectionBatchAmount',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 150 width: 150
},
form: {
componentProps: {
disabled: true
}
} }
}, },
// { // {
@ -176,9 +210,11 @@ export const InspectionRecordMain = useCrudSchemas(
dictType: DICT_TYPE.INSPECTION_TYPE, dictType: DICT_TYPE.INSPECTION_TYPE,
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
form: { form: {
component: 'Select' component: 'Select',
componentProps: {
disabled: true
}
}, },
table: { table: {
width: 150 width: 150
@ -189,9 +225,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'referenceOrderCode', field: 'referenceOrderCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 150 width: 150
},
form: {
componentProps: {
disabled: true
}
} }
}, },
{ {
@ -199,10 +239,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'referenceOrderRow', field: 'referenceOrderRow',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0,
componentProps: {
disabled: true
}
}, },
table: { table: {
width: 150 width: 150
@ -213,9 +256,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'referenceCertificateCode', field: 'referenceCertificateCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 150 width: 150
},
form: {
componentProps: {
disabled: true
}
} }
}, },
{ {
@ -224,10 +271,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'referenceCertificateRow', field: 'referenceCertificateRow',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0,
componentProps: {
disabled: true
}
}, },
table: { table: {
width: 150 width: 150
@ -238,10 +288,13 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'inspectionStage', field: 'inspectionStage',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0,
componentProps: {
disabled: true
}
}, },
table: { table: {
width: 150 width: 150
@ -253,9 +306,13 @@ export const InspectionRecordMain = useCrudSchemas(
dictType: DICT_TYPE.INSPECTION_SEVERITY, dictType: DICT_TYPE.INSPECTION_SEVERITY,
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 150 width: 150
},
form: {
componentProps: {
disabled: true
}
} }
}, },
{ {
@ -264,7 +321,6 @@ export const InspectionRecordMain = useCrudSchemas(
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm: false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -277,7 +333,8 @@ export const InspectionRecordMain = useCrudSchemas(
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
valueFormat: 'x' valueFormat: 'x',
disabled: true
} }
}, },
detail: { detail: {
@ -293,7 +350,6 @@ export const InspectionRecordMain = useCrudSchemas(
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm: false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -306,7 +362,8 @@ export const InspectionRecordMain = useCrudSchemas(
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
valueFormat: 'x' valueFormat: 'x',
disabled: true
} }
}, },
detail: { detail: {
@ -322,7 +379,6 @@ export const InspectionRecordMain = useCrudSchemas(
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm: false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -335,7 +391,8 @@ export const InspectionRecordMain = useCrudSchemas(
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
valueFormat: 'x' valueFormat: 'x',
disabled: true
} }
}, },
detail: { detail: {
@ -351,7 +408,6 @@ export const InspectionRecordMain = useCrudSchemas(
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm: false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -364,7 +420,8 @@ export const InspectionRecordMain = useCrudSchemas(
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
valueFormat: 'x' valueFormat: 'x',
disabled: true
} }
}, },
detail: { detail: {
@ -374,13 +431,13 @@ export const InspectionRecordMain = useCrudSchemas(
width: 175 width: 175
} }
}, },
{ {
label: '收货时间', label: '收货时间',
field: 'deliveryTime', field: 'deliveryTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm: false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -390,6 +447,7 @@ export const InspectionRecordMain = useCrudSchemas(
} }
}, },
form: { form: {
component: 'DatePicker',
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
valueFormat: 'x' valueFormat: 'x'
@ -408,9 +466,13 @@ export const InspectionRecordMain = useCrudSchemas(
dictType: DICT_TYPE.INSPECTION_LEVEL, dictType: DICT_TYPE.INSPECTION_LEVEL,
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 150 width: 150
},
form: {
componentProps: {
disabled: true
}
} }
}, },
{ {
@ -419,9 +481,13 @@ export const InspectionRecordMain = useCrudSchemas(
dictType: DICT_TYPE.BASIC_AQL, dictType: DICT_TYPE.BASIC_AQL,
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 150 width: 150
},
form: {
componentProps: {
disabled: true
}
} }
}, },
{ {
@ -432,7 +498,8 @@ export const InspectionRecordMain = useCrudSchemas(
dictType: DICT_TYPE.USAGE_DECISION, dictType: DICT_TYPE.USAGE_DECISION,
table: { table: {
width: 150 width: 150
} },
isForm:false
}, },
{ {
label: '执行结果', label: '执行结果',
@ -440,31 +507,13 @@ export const InspectionRecordMain = useCrudSchemas(
dictType: DICT_TYPE.EVALUATION_CODE, dictType: DICT_TYPE.EVALUATION_CODE,
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 150 width: 150
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
search: {
value: 'TRUE'
}, },
form: { form: {
component: 'Switch',
value: 'TRUE',
componentProps: { componentProps: {
inactiveValue: 'FALSE', disabled: true
activeValue: 'TRUE'
} }
},
table: {
width: 110
} }
}, },
{ {
@ -537,7 +586,7 @@ export const InspectionRecordMain = useCrudSchemas(
isForm: false, isForm: false,
isDetail: false, isDetail: false,
table: { table: {
width: 200, width: 250,
fixed: 'right' fixed: 'right'
} }
} }
@ -709,12 +758,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:true, disabled: true,
width:200 width: 200
}, },
table:{ table: {
width:150 width: 150
} }
}, },
{ {
@ -722,12 +771,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'packageCode', field: 'packageCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:true, disabled: true,
width:160 width: 160
}, },
table:{ table: {
width:150 width: 150
} }
}, },
{ {
@ -735,12 +784,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'packageSpecificationCode', field: 'packageSpecificationCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:true, disabled: true,
width:150 width: 150
}, },
table:{ table: {
width:150 width: 150
} }
}, },
{ {
@ -752,12 +801,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
}, },
tableForm:{ tableForm: {
disabled:true, disabled: true,
width:120 width: 120
}, },
table:{ table: {
width:150 width: 150
} }
}, },
{ {
@ -765,12 +814,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'measuringUnit', field: 'measuringUnit',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:true, disabled: true,
width:120 width: 120
}, },
table:{ table: {
width:150 width: 150
} }
}, },
{ {
@ -778,12 +827,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'sampleAmount', field: 'sampleAmount',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:true, disabled: true,
width:100 width: 100
}, },
table:{ table: {
width:150 width: 150
} }
}, },
{ {
@ -791,12 +840,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'qualifiedAmount', field: 'qualifiedAmount',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:true, disabled: true,
width:100 width: 100
}, },
table:{ table: {
width:150 width: 150
} }
}, },
{ {
@ -804,12 +853,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'noQualifiedAmount', field: 'noQualifiedAmount',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:true, disabled: true,
width:100 width: 100
}, },
table:{ table: {
width:150 width: 150
} }
}, },
{ {
@ -817,12 +866,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'destroyAmount', field: 'destroyAmount',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:true, disabled: true,
width:100 width: 100
}, },
table:{ table: {
width:150 width: 150
} }
}, },
{ {
@ -830,12 +879,12 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'frozenAmount', field: 'frozenAmount',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:true, disabled: true,
width:100 width: 100
}, },
table:{ table: {
width:150 width: 150
} }
} }
])) ]))
@ -844,18 +893,55 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
export const InspectionRecordPackageRules = reactive({ export const InspectionRecordPackageRules = reactive({
qualifiedAmount: [ qualifiedAmount: [
required, required,
{ validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'} { validator: validateSixNum, message: '小数点后最多6位', trigger: 'blur' }
], ],
frozenAmount: [ frozenAmount: [
required, required,
{ validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'} { validator: validateSixNum, message: '小数点后最多6位', trigger: 'blur' }
], ],
destroyAmount: [ destroyAmount: [
required, required,
{ validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'} { validator: validateSixNum, message: '小数点后最多6位', trigger: 'blur' }
], ],
noQualifiedAmount: [ noQualifiedAmount: [
required, 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<CrudSchema[]>([
{
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
}
},
]))

3
src/views/qms/inspectionRecordFirst/addForm.vue

@ -12,7 +12,7 @@
style="max-height: 80vh; overflow-y: auto; padding: 0px 20px" style="max-height: 80vh; overflow-y: auto; padding: 0px 20px"
ref="mianscroll" ref="mianscroll"
> >
<el-form :model="data" label-width="auto" :rules="rules" ref="formMainRef"> <el-form :model="data" label-width="auto" :rules="rules" ref="formMainRef">
<el-row gutter="20"> <el-row gutter="20">
<el-col :span="12" v-if="data.code"> <el-col :span="12" v-if="data.code">
<el-form-item label="编码" prop="code"> <el-form-item label="编码" prop="code">
@ -945,7 +945,6 @@ await formMainRef.value.validate()
message.error(`模板中有检验工序和检验特性未填写完全`) message.error(`模板中有检验工序和检验特性未填写完全`)
return return
} }
debugger
// //
let arrBol = [] let arrBol = []
let isOutweigh = [] // let isOutweigh = [] //

19
src/views/qms/inspectionRecordFirst/index.vue

@ -60,8 +60,8 @@
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ListTable from '@/components/ListTable/src/ListTable.vue' import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from './addForm.vue' import AddForm from '../inspectionRecordFirst/addForm.vue'
import Detail from './detail.vue' import Detail from './detail.vue'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data' import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data'
@ -129,14 +129,7 @@ const buttonBaseClick = (val, item) => {
} }
const isShowMainButton = (row, val) => { const isShowMainButton = (row, val) => {
if(!row.callbackRequestNumber) {//callbackRequestNumber使 return row.isPublished
return true;
}
if(row.useDecision) {
return row.isPublished
} else {
return val ? true : false
}
} }
// - // -
@ -249,8 +242,8 @@ const buttonBaseClick = (val, item) => {
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
searchData.filters.push({ searchData.filters.push({
action: "==", action: "==",
column: "firstInspectionAdded", column: "inspectionType",
value: "TRUE" value: "11"
}) })
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
@ -263,7 +256,7 @@ const searchFormClick = (searchData) => {
onMounted(async () => { onMounted(async () => {
tableObject.params = { tableObject.params = {
available: true, available: true,
firstInspectionAdded:'TRUE' inspectionType:'11'
} }
getList() getList()
}) })

20
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: '检验批次', label: '检验批次',
field: 'inspectionBatch', field: 'inspectionBatch',
@ -72,16 +62,6 @@ export const InspectionRecordMain = useCrudSchemas(
width: 150 width: 150
} }
}, },
{
label: '检验批数量',
field: 'inspectionBatchAmount',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
{ {
label: '检验方案编码', label: '检验方案编码',
field: 'inspectionSchemeCode', field: 'inspectionSchemeCode',

Loading…
Cancel
Save