diff --git a/.env.development b/.env.development index 78976cddd..c47a3135c 100644 --- a/.env.development +++ b/.env.development @@ -7,7 +7,7 @@ VITE_DEV=false VITE_BASE_URL='http://localhost:12080' # 上传路径 -VITE_UPLOAD_URL='http://localhost:12080/admin-api/infra/file/upload' +VITE_UPLOAD_URL='http://192.168.0.113:12080/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH=/dev-api @@ -34,4 +34,4 @@ VITE_OUT_DIR=dist VITE_INTERFACE_URL='http://localhost:12080/magic/web/index.html' # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://localhost:12080' \ No newline at end of file +VITE_JMREPORT_BASE_URL='http://localhost:12080' diff --git a/src/api/mes/workstation/index.ts b/src/api/mes/workstation/index.ts index a3dfde12d..08794d283 100644 --- a/src/api/mes/workstation/index.ts +++ b/src/api/mes/workstation/index.ts @@ -72,7 +72,6 @@ export const createEquipmentRelation = async (equipmentCodes:string[]) => { // 删除设备关联 export const deleteEquipmentRelation = async (equipmentCodes:string[]) => { - debugger const data = { workstationCode : goalParams.workstationCode, equipmentCodes : equipmentCodes @@ -139,19 +138,19 @@ export const checkOperstepsPageList = async (params) => { } } // 添加操作步骤关联 -export const createOperstepsRelation = async (processCodes:string[]) => { +export const createOperstepsRelation = async (codes:string[]) => { const data = { workstationCode : goalParams.workstationCode, - processCodes : processCodes + operstepsCodes : codes } return await request.post({ url: `/strategy/workstation-opersteps/createRelation`, data }) } // 删除操作步骤关联 -export const deleteOperstepsRelation = async (processCodes:string[]) => { +export const deleteOperstepsRelation = async (codes:string[]) => { const data = { workstationCode : goalParams.workstationCode, - processCodes : processCodes + operstepsCodes : codes } return await request.post({ url: `/strategy/workstation-opersteps/deleteRelation`, data }) } diff --git a/src/api/wms/interfaceInfo/index.ts b/src/api/wms/interfaceInfo/index.ts new file mode 100644 index 000000000..370b7f1c2 --- /dev/null +++ b/src/api/wms/interfaceInfo/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface InterfaceInfoVO { + id: number + interfaceType: string + interfaceName: string + interfaceStatus: string + url: string + reqBody: string + respBody: string + errorMsg: string + remark: string + extraProperties: string + concurrencyStamp: number +} + +// 查询接口调用信息列表 +export const getInterfaceInfoPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/interface-info/senior', data }) + } else { + return await request.get({ url: `/wms/interface-info/page`, params }) + } +} + +// 查询接口调用信息详情 +export const getInterfaceInfo = async (id: number) => { + return await request.get({ url: `/wms/interface-info/get?id=` + id }) +} + +// 新增接口调用信息 +export const createInterfaceInfo = async (data: InterfaceInfoVO) => { + return await request.post({ url: `/wms/interface-info/create`, data }) +} + +// 修改接口调用信息 +export const updateInterfaceInfo = async (data: InterfaceInfoVO) => { + return await request.put({ url: `/wms/interface-info/update`, data }) +} + +// 删除接口调用信息 +export const deleteInterfaceInfo = async (id: number) => { + return await request.delete({ url: `/wms/interface-info/delete?id=` + id }) +} + +// 导出接口调用信息 Excel +export const exportInterfaceInfo = async (params) => { + return await request.download({ url: `/wms/interface-info/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/interface-info/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/issueRequestMain/index.ts b/src/api/wms/issueRequestMain/index.ts index efaf03d24..40d37e803 100644 --- a/src/api/wms/issueRequestMain/index.ts +++ b/src/api/wms/issueRequestMain/index.ts @@ -47,6 +47,11 @@ export const createIssueRequestMain = async (data: IssueRequestMainVO) => { return await request.post({ url: `/wms/issue-request-main/create`, data }) } +// 新增PDA发料申请主 +export const createIssueRequestMainSetInterval = async (data: IssueRequestMainVO) => { + return await request.post({ url: `/wms/issue-request-main/createPDA`, data }) +} + // 修改发料申请主 export const updateIssueRequestMain = async (data: IssueRequestMainVO) => { return await request.put({ url: `/wms/issue-request-main/update`, data }) diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 0f0132a20..83fcf090a 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -96,16 +96,36 @@ + +
+ + + + + + + + + + - + - { const annexData = reactive({ annexList: [] }) -// 其他附件默认数据数组 +// // 其他附件默认数据数组 const annexTableData = ref>([]) // 备注数据 @@ -416,7 +436,8 @@ const getFileList = async () => { } } // 获取其他附件列表篇 -const getAnnexFileList = async () => { +const getAnnexFileList = async (row:id) => { + console.log('getAnnexFileList') props.annexTable?.forEach(async (item) => { let requstData = {...remarksData.data,tableName: item?.tableName} const annexList = await FileApi.getFileList(requstData) @@ -425,10 +446,27 @@ const getAnnexFileList = async () => { annexData.annexList = annexList }else{ annexTableData.value.push({ + align:item.align, label: item.label, tableName: item?.tableName || '', - annexList + annexList, + hasSubDetail:item.hasSubDetail||false, + subDetailTableData:item.subDetailTableData||{} }) + if(item?.subDetailTableData){ + const { tableObject:subTableObject, tableMethods:subTableMethods } = useTable({ + getListApi: item.subDetailTableData.getSubList // 分页接口 + }) + const {getList:getSubList} = subTableMethods + subTableObject.params= {} + item.subDetailTableData.queryParams.forEach(queryItem => { + subTableObject.params[queryItem.queryField] = row[queryItem.rowField] + }); + await getSubList() + item.subDetailTableData.tableList = subTableObject.tableList + annexItem.subDetailTableData.tableList + console.log('subTableObject',annexTableData.value) + } } }) } @@ -444,7 +482,7 @@ const deleteAnnexSuccess = async () => { } /** 追加的附件 */ const updateAnnexTableHandle = () => { - getAnnexFileList() + getAnnexFileList(detailData.value) getChangeRecordList() } @@ -526,7 +564,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: detailData.value = row getRemarkList() getFileList() - getAnnexFileList() + getAnnexFileList(row) getChangeRecordList() // 判断详情按钮是否显示 let detailButtonFilter: any = [] diff --git a/src/views/mes/ordermonthplan/index.vue b/src/views/mes/ordermonthplan/index.vue index 32805630a..fc5c30e21 100644 --- a/src/views/mes/ordermonthplan/index.vue +++ b/src/views/mes/ordermonthplan/index.vue @@ -44,8 +44,6 @@ @success="formsSuccess" :rules="MesOrderMonthMainRules" :formAllSchemas="MesOrderMonthMain.allSchemas" - :apiUpdate="updateMesOrderMonthMain" - :apiCreate="createMesOrderMonthMain" :apiDelete="MesOrderMonthApi.deleteMesOrderMonthMain" @searchTableSuccess="searchTableSuccess" :isBusiness="false" diff --git a/src/views/mes/workstation/index.vue b/src/views/mes/workstation/index.vue index 092a7e41b..bfcf17225 100644 --- a/src/views/mes/workstation/index.vue +++ b/src/views/mes/workstation/index.vue @@ -52,21 +52,22 @@ import { Equipment, + equipmentPopList, Opersteps, + stepPopList, TabsList, Workstation, - WorkstationRules,equipmentPopList,stepPopList + WorkstationRules } from './workstation.data' import * as WorkstationApi from '@/api/mes/workstation' +import {goalParams} from '@/api/mes/workstation' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' -import ImportForm from '@/components/ImportForm/src/ImportForm.vue' -import { - goalParams, -} from "@/api/mes/workstation"; import Detail from './components/Detail.vue' + defineOptions({ name: 'Workstation' }) let tabsDeleteApi = WorkstationApi.deleteEquipmentRelation let tabsCreateApi = WorkstationApi.createEquipmentRelation @@ -103,10 +104,18 @@ const tableColumns = ref(Workstation.allSchemas.tableColumns) // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef) => { - nextTick(() => { - const setV = {} - setV[formField] = val[0][searchField] - formRef.setValues(setV) + console.log(formField) + console.log(searchField) + console.log(val) + console.log(formRef) + nextTick(async () => { + debugger + if (formRef) { + const setV = {} + setV[formField] = val[0][searchField] + formRef.setValues(setV) + } else { + } }) } diff --git a/src/views/qms/inspection/inspectionJob/addForm.vue b/src/views/qms/inspection/inspectionJob/addForm.vue index 3e29b8ae4..fce2ca3d9 100644 --- a/src/views/qms/inspection/inspectionJob/addForm.vue +++ b/src/views/qms/inspection/inspectionJob/addForm.vue @@ -334,8 +334,8 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any formType.value = type if (row) { data.value = JSON.parse(JSON.stringify(row)) - console.log(data.value)// 发起承接 - await InspectionJobMainApi.acceptInspectionJobMain(row.id) + // console.log(data.value)// 发起承接 + // await InspectionJobMainApi.acceptInspectionJobMain(row.id) let list = [] list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id) data.value.packageList = await InspectionJobMainApi.getInspectionJobPackageList(row.id) @@ -497,7 +497,7 @@ const buttonBaseClick =async(val) => { } // 关闭 else if (val == 'close') { - await InspectionJobMainApi.abandonInspectionJobMain(data.value.id) + // await InspectionJobMainApi.abandonInspectionJobMain(data.value.id) dialogVisible.value = false } } @@ -548,6 +548,7 @@ const submitForm = async () => { let arrBol = [] let isOutweigh = []//结束时间是否大于开始时间 let numberList = []//判断合格数量和不合格数量之和是否等于主表数量 + let parseFloatList = []//判断合格数量和不合格数量是否是整数 data.value.subList.forEach((item, index) => { if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { arrBol.push( @@ -558,15 +559,6 @@ const submitForm = async () => { ) ) } - // if (item.samplingProcessRespVO.evaluationMode == 1) { - // arrBol.push( - // item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( - // (cur, key) => { - // return !cur.estimateCode - // } - // ) - // ) - // } if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0) { arrBol.push( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( @@ -589,12 +581,20 @@ const submitForm = async () => { if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) { isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime) } - // 合格数量和不合格数量之和不等于总数量 + // 合格数量和不合格数量之和不能是小数 if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { + parseFloatList.push( + item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( + (cur, key) => { + return String(cur.qualifiedQuantity).indexOf('.')>-1 || String(cur.unqualifiedQuantity).indexOf('.')>-1 + } + ) + ) + // 合格数量和不合格数量之和不等于总数量 numberList.push( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( (cur, key) => { - return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != data.value.sampleTotalAmount + return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.inspectionQty) } ) ) @@ -602,6 +602,7 @@ const submitForm = async () => { }) let isEmpty1 = arrBol.some(item=>item == true) let isEmptyNumberList = numberList.some(item=>item == true) + let isParseFloat = parseFloatList.some(item=>item == true) if(isEmpty1){ message.error('检验工序和检验特性有字段未填写完全') return; @@ -610,9 +611,12 @@ const submitForm = async () => { message.error('检验特性中有开始时间大于结束时间') return; } - console.log(44,numberList) + if(isParseFloat){ + message.error('合格数量和不合格数量之和不可以是小数') + return; + } if(isEmptyNumberList){ - message.error('合格数量和不合格数量之和不等于总数量') + message.error('合格数量和不合格数量之和不等于检验数') return; } if (formType.value == 'create') { diff --git a/src/views/qms/inspection/inspectionJob/index.vue b/src/views/qms/inspection/inspectionJob/index.vue index 680aa7eb7..0413a48aa 100644 --- a/src/views/qms/inspection/inspectionJob/index.vue +++ b/src/views/qms/inspection/inspectionJob/index.vue @@ -161,10 +161,10 @@ // 列表-操作按钮 const butttondata = (row) => { return [ - // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:accept'}), // 承接 + defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:accept'}), // 承接 defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:close'}), // 关闭 - // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), // 放弃 - defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['1','2']),hasPermi:'qms:inspection-job-main:execute'}), // 执行 + defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), // 放弃 + defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:execute'}), // 执行 defaultButtons.mainListPackageBtn(null), // 包装 ] } diff --git a/src/views/qms/samplingProcess/index.vue b/src/views/qms/samplingProcess/index.vue index 52cddcc2f..b8918ceb8 100644 --- a/src/views/qms/samplingProcess/index.vue +++ b/src/views/qms/samplingProcess/index.vue @@ -66,6 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' +import {validatePercent } from '@/utils/validator' defineOptions({ name: 'SamplingProcess' }) @@ -235,20 +236,34 @@ const updateFormFields = (sampleType, formRef) => { case '1': sampleSizeLabel = '样品量'; sampleSizeDisabled = true; + if( SamplingProcessRules.sampleSize.length==3){ + SamplingProcessRules.sampleSize.pop() + } break; case '2': sampleSizeLabel = '样品量(%)'; sampleSizeRequired = true; + if( SamplingProcessRules.sampleSize.length==2){ + SamplingProcessRules.sampleSize.push({ + validator:validatePercent, message: '百分比范围 0 ~ 100', trigger: 'blur' + }) + } break; case '3': sampleSizeLabel = '样品量'; sampleSizeRequired = true; + if( SamplingProcessRules.sampleSize.length==3){ + SamplingProcessRules.sampleSize.pop() + } break; case '4': sampleSizeLabel = '样品量'; sampleSizeDisabled = true; sampleProgCodeDisabled = false; sampleProgCodeRequired = true; + if( SamplingProcessRules.sampleSize.length==3){ + SamplingProcessRules.sampleSize.pop() + } break; default: break; diff --git a/src/views/qms/samplingProcess/samplingProcess.data.ts b/src/views/qms/samplingProcess/samplingProcess.data.ts index d9c69e379..05f285cf9 100644 --- a/src/views/qms/samplingProcess/samplingProcess.data.ts +++ b/src/views/qms/samplingProcess/samplingProcess.data.ts @@ -1,14 +1,14 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' import {getSamplingScheme} from "@/api/qms/samplingProcess"; -import { validateInteger } from '@/utils/validator' +import { validateInteger ,validateTwoNum} from '@/utils/validator' // 表单校验 export const SamplingProcessRules = reactive({ sampleType: [required], evaluationMode: [required], description: [required], - sampleSize:ref([{ required: true, message: '该项为必填项', trigger: 'blur' }]), + sampleSize:ref([{ required: true, message: '该项为必填项', trigger: 'blur' },{validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}]), sampleProgCode:ref([{ required: true, message: '该项为必填项', trigger: 'blur' }]), inspectionQty: [required, {validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}] }) diff --git a/src/views/wms/agvManage/interfaceInfo/index.vue b/src/views/wms/agvManage/interfaceInfo/index.vue new file mode 100644 index 000000000..ec8913d10 --- /dev/null +++ b/src/views/wms/agvManage/interfaceInfo/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/wms/agvManage/interfaceInfo/interfaceInfo.data.ts b/src/views/wms/agvManage/interfaceInfo/interfaceInfo.data.ts new file mode 100644 index 000000000..6c9898302 --- /dev/null +++ b/src/views/wms/agvManage/interfaceInfo/interfaceInfo.data.ts @@ -0,0 +1,106 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const InterfaceInfoRules = reactive({ + concurrencyStamp: [required], +}) + +export const InterfaceInfo = useCrudSchemas(reactive([ + { + label: '序号', + field: 'number', + sort: 'custom', + isSearch: true, + }, + { + label: '接口类型', + field: 'interfaceType', + sort: 'custom', + isSearch: true, + form: { + component: 'SelectV2' + }, + }, + { + label: '接口名称', + field: 'interfaceName', + sort: 'custom', + isSearch: true, + }, + { + label: '状态', + field: 'interfaceStatus', + sort: 'custom', + form: { + component: 'Radio' + }, + }, + { + label: '请求地址', + field: 'url', + sort: 'custom', + isSearch: true, + }, + { + label: '请求参数', + field: 'reqBody', + sort: 'custom', + }, + { + label: '返回结果', + field: 'respBody', + sort: 'custom', + }, + { + label: '错误信息', + field: 'errorMsg', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '扩展属性', + field: 'extraProperties', + sort: 'custom', + isTable:false, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + isTable:false, + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts index 0f5cf23aa..0f55e8f0c 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts @@ -9,34 +9,66 @@ export const SupplierdeliverInspectionDetailRules = reactive({ }) export const SupplierdeliverInspectionDetail = useCrudSchemas(reactive([ + { + label: '上传质检报告', + field: 'uploadFile', + sort: 'custom', + isTable:false, + isTableForm:false, + form: { + component: 'UploadFile', + componentProps: { + upData:{ + tableId: '', + tableName: 'SupplierdeliverInspectionDetail' + }, + limit:1, + } + }, + }, { label: '代码', field: 'itemCode', sort: 'custom', + isForm:false, isSearch: true, }, { label: '计量单位', field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + isForm:false, sort: 'custom', - isSearch: true, + table: { + width: 150 + }, + tableForm: { + type: 'Select' + } }, { label: '批次', field: 'batch', sort: 'custom', + isForm:false, isSearch: true, }, { label: '计划数量', field: 'planQty', sort: 'custom', + isForm:false, isSearch: true, }, { label: '备注', field: 'remark', sort: 'custom', + isForm:false, + isTable: false, + isTableForm: false, isSearch: true, }, { @@ -53,6 +85,7 @@ export const SupplierdeliverInspectionDetail = useCrudSchemas(reactive + > + + @@ -139,9 +158,9 @@ import { SupplierdeliverRequestMainRules, SupplierdeliverRequestDetail, SupplierdeliverRequestDetailRules, - SupplierdeliverRequestDetailLabel, - UploadQualityReport + SupplierdeliverRequestDetailLabel } from './supplierdeliverRequestMain.data' +import {   SupplierdeliverInspectionDetail} from '../supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data' import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' @@ -383,7 +402,7 @@ const isShowMainButtonLabel = (row, val) => { const butttondata = (row) => { return [ defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), // 打开 - defaultButtons.mainListPlanUploadQualityReportBtn({ hide: isShowMainButton(row, ['1']) }), // 提交审批 + defaultButtons.mainListPlanUploadQualityReportBtn({ hide: isShowMainButton(row, ['1','2','3']) }), // 上传质检审批 defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), // 提交审批 defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), // 审批通过 defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), // 驳回按钮 @@ -429,7 +448,7 @@ const buttonTableClick = async (val, row) => { handleClo(row.id) } else if (val == 'mainPlanUploadQualityReport') { // 上传质量报告 - handleUploadQualityReport(row.id) + handleUploadQualityReport(row) } else if (val == 'mainPlanSub') { // 提交审批 handleSub(row.id) @@ -573,18 +592,22 @@ const handleOpe = async (id: number) => { const ploadQualityReportRef = ref() const ploadQualityReportTableData = ref([]) /** 上传质量报告 */ -const handleUploadQualityReport = async (id: number) => { - console.log('UploadQualityReport',UploadQualityReport.allSchemas) - // ploadQualityReportRef.value.dialogVisible = true - ploadQualityReportRef.value.open('create', null, null,'上传质量报告')//创建标签页面 createLabel 标题 +const handleUploadQualityReport = async (row) => { + console.log('SupplierdeliverInspectionDetail',SupplierdeliverInspectionDetail.allSchemas) + const uploadFile = SupplierdeliverInspectionDetail.allSchemas.formSchema.find(item=>item.field=='uploadFile') + if(uploadFile){ + uploadFile['componentProps']['upData']['tableId'] = row.id + } + ploadQualityReportRef.value.open('create', null, {masterId:row.id},'上传质量报告')//创建标签页面 createLabel 标题 const tableFormKeys = {} - UploadQualityReport.allSchemas.tableFormColumns.forEach((item) => { + SupplierdeliverInspectionDetail.allSchemas.tableFormColumns.forEach((item) => { tableFormKeys[item.field] = item.default ? item.default : '' }) ploadQualityReportTableData.value = [tableFormKeys] } const submitFormUploadQualityReport = async (formType, data) => { + delete data.number data.subList = ploadQualityReportTableData.value // 拼接子表数据参数 if (formType === 'create') { await SupplierdeliverInspectionDetailApi.createSupplierdeliverInspectionDetail(data) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts index b03007f2d..8a6b79cdd 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts @@ -1597,7 +1597,7 @@ export const UploadQualityReport = useCrudSchemas(reactive([ componentProps: { upData:{ tableId: '', - tableName: '' + tableName: 'UploadQualityReport' }, limit:1, } @@ -1630,7 +1630,7 @@ export const UploadQualityReport = useCrudSchemas(reactive([ }, { label: '数量', - field: 'orderQty', + field: 'planQty', table: { width: 150 },