| | |
| | | import { Button } from 'ant-design-vue'; |
| | | |
| | | import { generateAutoCode } from '#/api/mes/md/autocode/record'; |
| | | import { getTemplateItemOptionList } from '#/api/mes/qc/template/item'; |
| | | import { getSimpleUserList } from '#/api/system/user'; |
| | | import { getRangePickerDefaultProps } from '#/utils'; |
| | | import { MdmItemSelect } from '#/views/basicData/mdm/components'; |
| | | |
| | | /** 表单类型 */ |
| | |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'templateId', |
| | | label: '质检方案', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | | api: getTemplateItemOptionList, |
| | | autoSelect: 'first', |
| | | labelField: 'templateName', |
| | | valueField: 'templateId', |
| | | placeholder: '请选择质检方案', |
| | | }, |
| | | rules: 'selectRequired', |
| | | dependencies: { |
| | | triggerFields: ['itemId'], |
| | | componentProps: (values) => ({ |
| | | api: getTemplateItemOptionList, |
| | | autoSelect: 'first', |
| | | labelField: 'templateName', |
| | | valueField: 'templateId', |
| | | disabled: formType !== 'create' || !values.itemId, |
| | | params: values.itemId |
| | | ? { itemId: values.itemId, qcType: 4 } |
| | | : {}, |
| | | placeholder: values.itemId ? '请选择质检方案' : '请先选择产品物料', |
| | | }), |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'batchCode', |
| | | label: '批次号', |
| | | component: 'Input', |
| | |
| | | precision: 2, |
| | | }, |
| | | rules: 'required', |
| | | help: '不合格品数量大于0时,保存后将自动生成不合格处理单', |
| | | }, |
| | | { |
| | | fieldName: 'inspectDate', |
| | |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | placeholder: '请选择检测日期', |
| | | showTime: true, |
| | | valueFormat: 'x', |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | }, |
| | | rules: 'required', |
| | | }, |
| | |
| | | valueField: 'id', |
| | | }, |
| | | rules: 'selectRequired', |
| | | }, |
| | | { |
| | | fieldName: 'samplingLocation', |
| | | label: '采样地点', |
| | | component: 'Input', |
| | | componentProps: { |
| | | maxlength: 100, |
| | | placeholder: '请输入采样地点', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'certificateNo', |
| | | label: '证书编号', |
| | | component: 'Input', |
| | | componentProps: { |
| | | maxlength: 50, |
| | | placeholder: '请输入证书编号', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'executeStandard', |
| | | label: '执行标准', |
| | | component: 'Input', |
| | | componentProps: { |
| | | maxlength: 50, |
| | | placeholder: '如 GB/T 6027,选择质检方案后自动带入', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'auditUserId', |
| | | label: '复核人', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | | allowClear: true, |
| | | api: getSimpleUserList, |
| | | labelField: 'nickname', |
| | | placeholder: '请选择复核人', |
| | | valueField: 'id', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'approveUserId', |
| | | label: '审核人', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | | allowClear: true, |
| | | api: getSimpleUserList, |
| | | labelField: 'nickname', |
| | | placeholder: '请选择审核人', |
| | | valueField: 'id', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'checkResult', |
| | |
| | | valueField: 'id', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'inspectDate', |
| | | label: '检测日期', |
| | | component: 'RangePicker', |
| | | componentProps: { |
| | | ...getRangePickerDefaultProps(), |
| | | }, |
| | | }, |
| | | ]; |
| | | } |
| | | |
| | |
| | | field: 'name', |
| | | title: '检验单名称', |
| | | minWidth: 180, |
| | | }, |
| | | { |
| | | field: 'sourceDocType', |
| | | title: '来源单据类型', |
| | | width: 120, |
| | | cellRender: { |
| | | name: 'CellDict', |
| | | props: { type: DICT_TYPE.MES_QC_SOURCE_DOC_TYPE }, |
| | | }, |
| | | }, |
| | | { |
| | | field: 'sourceDocCode', |
| | | title: '来源单据编码', |
| | | width: 160, |
| | | }, |
| | | { |
| | | field: 'itemCode', |
| | |
| | | width: 80, |
| | | }, |
| | | { |
| | | field: 'batchCode', |
| | | title: '批次号', |
| | | width: 130, |
| | | }, |
| | | { |
| | | field: 'checkResult', |
| | | title: '检测结果', |
| | | width: 110, |
| | |
| | | name: 'CellDict', |
| | | props: { type: DICT_TYPE.MES_QC_CHECK_RESULT }, |
| | | }, |
| | | }, |
| | | { |
| | | field: 'indicatorResultSummary', |
| | | title: '检测结果(检验项)', |
| | | minWidth: 200, |
| | | showOverflow: 'tooltip', |
| | | }, |
| | | { |
| | | field: 'inspectDate', |
| | |
| | | width: 100, |
| | | }, |
| | | { |
| | | field: 'auditNickname', |
| | | title: '复核人', |
| | | width: 100, |
| | | }, |
| | | { |
| | | field: 'approveNickname', |
| | | title: '审核人', |
| | | width: 100, |
| | | }, |
| | | { |
| | | field: 'status', |
| | | title: '单据状态', |
| | | width: 100, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 180, |
| | | width: 420, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |