diff --git a/src/api/qms/inspectionQ2/index.ts b/src/api/qms/inspectionQ2/index.ts index f1e245047..a89604a84 100644 --- a/src/api/qms/inspectionQ2/index.ts +++ b/src/api/qms/inspectionQ2/index.ts @@ -81,3 +81,7 @@ export const finishQ2 = async (id: number) => { export const getEmail = () => { return request.get({ url: `/qms/inspectionQ2/getEmail`}) } + +export const sendQ2 = async (id: number) => { + return await request.get({ url: `/qms/inspectionQ2/send?id=` + id }) +} diff --git a/src/api/wms/business/inputBlur.ts b/src/api/wms/business/inputBlur.ts index a32ee78b6..47e660eb3 100644 --- a/src/api/wms/business/inputBlur.ts +++ b/src/api/wms/business/inputBlur.ts @@ -573,6 +573,9 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form } } await tableFormSchemaObj.verificationPage(params.value).then(async (res) => { + if(!Array.isArray(res)&&res.list&&Array.isArray(res.list)){ + res = res.list + } list.value = res ? res : [] if (arr1.length != res.length) { const arr2 = res.map((item) => item[headerItem.tableForm.searchField]) diff --git a/src/api/wms/deliverRecordDetail/index.ts b/src/api/wms/deliverRecordDetail/index.ts index 99890101c..293f1c00a 100644 --- a/src/api/wms/deliverRecordDetail/index.ts +++ b/src/api/wms/deliverRecordDetail/index.ts @@ -33,7 +33,16 @@ export interface DeliverRecordDetailVO { interfaceType: string jobDetailId: string } - +// 查询发货记录子列表 +export const getDeliverRecordDetailPageCustomerreturn = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/deliver-record-detail/seniorCustomerreturn', data }) + } else { + return await request.get({ url: `/wms/deliver-record-detail/pageCustomerreturn`, params }) + } +} // 查询发货记录子列表 export const getDeliverRecordDetailPage = async (params) => { if (params.isSearch) { diff --git a/src/api/wms/productionreturnRecordMain/index.ts b/src/api/wms/productionreturnRecordMain/index.ts index 1c6f18ece..5515c4b54 100644 --- a/src/api/wms/productionreturnRecordMain/index.ts +++ b/src/api/wms/productionreturnRecordMain/index.ts @@ -71,18 +71,18 @@ export const exportProductionreturnRecordMain = async (params) => { export const exportProductionreturnRecordMainStore = async (params) => { if (params.isSearch){ const data = {...params} - return await request.downloadPost({ url: `/wms/productionreturn-job-detail-store/export-excel-senior`, data }) + return await request.downloadPost({ url: `/wms/productionreturn-record-detail-store/export-excel-senior`, data }) }else { - return await request.download({ url: `/wms/productionreturn-job-detail-store/export-excel`, params }) + return await request.download({ url: `/wms/productionreturn-record-detail-store/export-excel`, params }) } } // 导出隔离退料记录主 Excel -hold export const exportProductionreturnRecordMainHold = async (params) => { if (params.isSearch){ const data = {...params} - return await request.downloadPost({ url: `/wms/productionreturn-job-detail-hold/export-excel-senior`, data }) + return await request.downloadPost({ url: `/wms/productionreturn-record-detail-hold/export-excel-senior`, data }) }else { - return await request.download({ url: `/wms/productionreturn-job-detail-hold/export-excel`, params }) + return await request.download({ url: `/wms/productionreturn-record-detail-hold/export-excel`, params }) } } @@ -100,4 +100,4 @@ export const receive = (id) => { // 拒收隔离收货 export const refuse = (id) => { return request.put({ url: '/wms/productionreturn-record-main/refuse?id=' + id }) -} \ No newline at end of file +} diff --git a/src/api/wms/productreceiptRecordMain/index.ts b/src/api/wms/productreceiptRecordMain/index.ts index 0fe298f8c..c3e96dc81 100644 --- a/src/api/wms/productreceiptRecordMain/index.ts +++ b/src/api/wms/productreceiptRecordMain/index.ts @@ -86,14 +86,14 @@ export const deleteProductreceiptRecordMain = async (id: number) => { // 导出制品收货记录主 Excel export const exportProductreceiptRecordMain = async (params) => { - params.type = 'predict' + // params.type = 'predict' if (params.isSearch) { - const cmd = { - 'column':'type', - 'action':'==', - 'value':'predict' - } - params.filters.push(cmd) + // const cmd = { + // 'column':'type', + // 'action':'==', + // 'value':'predict' + // } + // params.filters.push(cmd) delete params.isSearch const data = {...params} return await request.downloadPost({ url: '/wms/productreceipt-record-main/export-excel-senior', data }) @@ -102,6 +102,26 @@ export const exportProductreceiptRecordMain = async (params) => { } } + +// 导出制品收货记录主 Excel +export const exportProductreceiptRecordScapMain = async (params) => { + // params.type = 'predict' + if (params.isSearch) { + // const cmd = { + // 'column':'type', + // 'action':'==', + // 'value':'predict' + // } + // params.filters.push(cmd) + delete params.isSearch + const data = {...params} + return await request.downloadPost({ url: '/wms/productreceipt-record-main/export-excel-senior-scrap', data }) + } else { + return await request.download({ url: `/wms/productreceipt-record-main/export-excel-scrap`, params }) + } +} + + // 导出装配收货记录主 Excel export const exportProductreceiptRecordAssembleMain = async (params) => { params.type = 'assemble' @@ -138,3 +158,13 @@ export const createInspectRequest = async (number:string) => { export const handleRecoveryProductreceiptRecord = async (data: ProductreceiptRecordMainVO) => { return await request.put({ url: `/wms/productreceipt-record-main/handleRecovery`, data }) } + +// 接收隔离收货 +export const receive = (id) => { + return request.put({ url: '/wms/productreceipt-record-main/receive?id=' + id }) +} + +// 拒收隔离收货 +export const refuse = (id) => { + return request.put({ url: '/wms/productreceipt-record-main/refuse?id=' + id }) +} \ No newline at end of file diff --git a/src/api/wms/purchaseDetail/index.ts b/src/api/wms/purchaseDetail/index.ts index e1226b751..4623e6fea 100644 --- a/src/api/wms/purchaseDetail/index.ts +++ b/src/api/wms/purchaseDetail/index.ts @@ -55,6 +55,18 @@ export const getPurchaseDetailPageWMS = async (params) => { } } + +// 查询M类型的采购订单子列表 +export const getPurchaseDetailPageWMSMOrderType = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchase-detail/seniorWMS-MOrderType', data }) + } else { + return await request.get({ url: `/wms/purchase-detail/pageWMS-MOrderType`, params }) + } +} + export const getPurchaseDetailPageWMSTypeM = async (params) => { if (params.isSearch) { delete params.isSearch diff --git a/src/api/wms/purchasereturnRecordDetail/index.ts b/src/api/wms/purchasereturnRecordDetail/index.ts index 420405cba..c7347653c 100644 --- a/src/api/wms/purchasereturnRecordDetail/index.ts +++ b/src/api/wms/purchasereturnRecordDetail/index.ts @@ -60,6 +60,17 @@ export const getPurchasereturnRecordDetailPageSpare = async (params) => { } } + +export const getPurchasereturnRecordDetailPageMorderType = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchasereturn-record-detail/seniorMorderType', data }) + } else { + return await request.get({ url: `/wms/purchasereturn-record-detail/pageMorderType`, params }) + } +} + export const getPurchasereturnRecordDetailPageSCP = async (params) => { if (params.isSearch) { delete params.isSearch diff --git a/src/api/wms/purchasereturnRecordMain/index.ts b/src/api/wms/purchasereturnRecordMain/index.ts index 27fa9161e..6c799db37 100644 --- a/src/api/wms/purchasereturnRecordMain/index.ts +++ b/src/api/wms/purchasereturnRecordMain/index.ts @@ -75,6 +75,17 @@ export const exportPurchasereturnRecordMain = async (params) => { } } + +// 导出采购退货记录主 Excel +export const exportPurchasereturnRecordMainMorderType = async (params) => { + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/purchasereturn-record-main/export-excel-senior-mordertype`, data }) + } else { + return await request.download({url: `/wms/purchasereturn-record-main/export-excel-mordertype`, params}) + } +} + // 导出维修备件退货记录主 Excel export const exportPurchasereturnRecordMainSpare = async (params) => { if (params.isSearch) { diff --git a/src/api/wms/purchasereturnRequestDetail/index.ts b/src/api/wms/purchasereturnRequestDetail/index.ts index 3451bc4aa..18e6f6dde 100644 --- a/src/api/wms/purchasereturnRequestDetail/index.ts +++ b/src/api/wms/purchasereturnRequestDetail/index.ts @@ -42,6 +42,12 @@ export const getPurchasereturnRequestDetailPage = async (params) => { export const getPurchasereturnRequestDetailEditData = async (params) => { return await request.get({ url: `/wms/purchasereturn-request-main/editReturnNew`, params }) } + +// 查询M类型采购退货申请子列表 +export const getPurchasereturnRequestDetailEditDataMOrderType = async (params) => { + return await request.get({ url: `/wms/purchasereturn-request-main/editReturnNewMtype`, params }) +} + // 物料供应商查询 export const getPurchasereturnSupplierByCode = async (params) => { return await request.get({ url: `/wms/supplieritem/querySupplierByCode`, params }) @@ -66,6 +72,18 @@ export const getPurchasereturnRequestDetailPageSpare = async (params) => { } } + +// 查询采购退货申请子列表--M类型退货 +export const getPurchasereturnRequestDetailPageMorderType = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchasereturn-request-detail/seniorMorderType', data }) + } else { + return await request.get({ url: `/wms/purchasereturn-request-detail/pageMorderType`, params }) + } +} + // 查询采购退货申请子详情 export const getPurchasereturnRequestDetail = async (id: number) => { return await request.get({ url: `/wms/purchasereturn-request-detail/get?id=` + id }) diff --git a/src/api/wms/purchasereturnRequestMain/index.ts b/src/api/wms/purchasereturnRequestMain/index.ts index 68cc0f4bd..8af2811a3 100644 --- a/src/api/wms/purchasereturnRequestMain/index.ts +++ b/src/api/wms/purchasereturnRequestMain/index.ts @@ -57,6 +57,11 @@ export const createPurchasereturnRequestMainNew = async (data: PurchasereturnReq return await request.post({ url: `/wms/purchasereturn-request-main/createReturnNew`, data }) } +// 新增采购退货申请主 --M类型采购退货 +export const createPurchasereturnRequestMainMType = async (data: PurchasereturnRequestMainVO) => { + return await request.post({ url: `/wms/purchasereturn-request-main/createReturnNewMtype`, data }) +} + // 修改采购退货申请主 export const updatePurchasereturnRequestMain = async (data: PurchasereturnRequestMainVO) => { return await request.put({ url: `/wms/purchasereturn-request-main/update`, data }) @@ -66,6 +71,11 @@ export const updatePurchasereturnRequestMainNew = async (data: PurchasereturnReq return await request.post({ url: `/wms/purchasereturn-request-main/updateReturnNew`, data }) } +// 修改M类型采购收货申请主 +export const updatePurchasereturnRequestMainNewMType = async (data: PurchasereturnRequestMainVO) => { + return await request.post({ url: `/wms/purchasereturn-request-main/updateReturnNewMtype`, data }) +} + // 删除采购退货申请主 export const deletePurchasereturnRequestMain = async (id: number) => { return await request.delete({ url: `/wms/purchasereturn-request-main/delete?id=` + id }) @@ -81,6 +91,16 @@ export const exportPurchasereturnRequestMain = async (params) => { } } +// 导出采购退货申请主 Excel +export const exportPurchasereturnRequestMainMorderType = async (params) => { + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/purchasereturn-request-main/export-excel-senior-mordertype`, data }) + } else { + return await request.download({url: `/wms/purchasereturn-request-main/export-excel-mordertype`, params}) + } +} + // 导出采购退货申请主 Excel export const exportPurchasereturnRequestMainSpare = async (params) => { if (params.isSearch) { @@ -106,6 +126,11 @@ export const importTemplateNew = () => { return request.download({ url: '/wms/purchasereturn-request-main/get-import-template-new' }) } +// 下载用户导入模板(新) +export const importTemplateMorderType = () => { + return request.download({ url: '/wms/purchasereturn-request-main/get-import-template-mordertype' }) +} + // 关闭采购退货申请主 Excel export const closePurchasereturnRequestMain = async (id) => { return await request.put({ url: `/wms/purchasereturn-request-main/close?id=` + id }) diff --git a/src/api/wms/supplierdeliverRequestMain/index.ts b/src/api/wms/supplierdeliverRequestMain/index.ts index 57e8b703f..f4d4a7b20 100644 --- a/src/api/wms/supplierdeliverRequestMain/index.ts +++ b/src/api/wms/supplierdeliverRequestMain/index.ts @@ -124,4 +124,9 @@ export const importTemplate = () => { // 删除之前的包装和标签 export const deleteOldLabels = async (id) => { return await request.post({ url: `/wms/supplierdeliver-request-main/deleteOldLabels?id=` + id }) +} + +// 查看履历表 +export const querySupplierResume = (asnNumber:string) => { + return request.get({ url: `/wms/supplierdeliver-request-main/querySupplierResume?asnNumber=` + asnNumber }) } \ No newline at end of file diff --git a/src/api/wms/supplierinvoiceRequestMain/index.ts b/src/api/wms/supplierinvoiceRequestMain/index.ts index f9dbf4ee8..4330d5a38 100644 --- a/src/api/wms/supplierinvoiceRequestMain/index.ts +++ b/src/api/wms/supplierinvoiceRequestMain/index.ts @@ -151,4 +151,9 @@ export const getLoginUserRoleList = async () => { export const getTaxAmount = async ({id,taxRate}) => { return await request.get({ url: `/wms/supplierinvoice-request-main/computeById?id=${id}&taxRate=${taxRate}`}) +} +// 采购离散订单查看-点击未读按钮 +export const getDiscreteIsRead = async ({id}) => { + return await request.get({ url: `/wms/supplierinvoice-record-main/discreteIsRead?id=${id}`}) + } \ No newline at end of file diff --git a/src/components/BasicForm/src/BasicFormWmsCount.vue b/src/components/BasicForm/src/BasicFormWmsCount.vue index 398f38994..6ae5c8320 100644 --- a/src/components/BasicForm/src/BasicFormWmsCount.vue +++ b/src/components/BasicForm/src/BasicFormWmsCount.vue @@ -789,16 +789,16 @@ const submitForm = async () => { if (!valid) return // 针对主子表 明细校验 if (props.isBusiness) { - formLoading.value = true + // formLoading.value = true if (formType.value == 'create') { const validateForm = await tableFormRef.value.validateForm() if (!validateForm && props.tableFormDataLength) { if (props.tableData.length == 0) { message.warning('请填写明细信息!') - formLoading.value = false + // formLoading.value = false return } - formLoading.value = false + // formLoading.value = false return } // 主子表——提交请求 @@ -807,7 +807,7 @@ const submitForm = async () => { const data1 = unref(formRef1)?.formModel emit('submitForm', formType.value, { ...data, ...data1 }) } finally { - formLoading.value = false + // formLoading.value = false } } else { // 编辑 @@ -816,17 +816,17 @@ const submitForm = async () => { const data1 = unref(formRef1)?.formModel emit('submitForm', formType.value, { ...data }) } finally { - formLoading.value = false + // formLoading.value = false } } } else { // 基础数据单表——提交请求 - formLoading.value = true + // formLoading.value = true try { const data = unref(formRef)?.formModel emit('success', formType.value, data) } finally { - formLoading.value = false + // formLoading.value = false } } } diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 3d21b3965..22f0dd4a6 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -78,6 +78,9 @@ v-model:currentPage="tableObjectRef.currentPage" v-model:sort="tableObjectRef.sort" > + @@ -821,7 +824,15 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: } } const updateList = ()=>{ - getList() + + // 刷新 + if (tableObjectRef.value.params.filters && tableObjectRef.value.params.filters.length > 0) { + searchFormClick({ + filters: tableObjectRef.value.params.filters + }) + } else { + getList() + } } // 获取备注列表 @@ -1005,7 +1016,7 @@ const submitForm = async (formType, data) => { emit('handleMainFefresh') formRef.value.dialogVisible = false // 刷新当前列表 - await getList() + updateList() updateKey.value += 1 } } finally { @@ -1016,7 +1027,7 @@ const submitForm = async (formType, data) => { const submitUpdateList = async ()=>{ formRef.value.dialogVisible = false // 刷新当前列表 - await getList() + updateList() updateKey.value += 1 } @@ -1064,29 +1075,35 @@ const handleDelete = async (id: number) => { message.success(t('common.delSuccess')) emit('handleMainFefresh') // 刷新列表 - await getList() + await updateList() updateKey.value += 1 } catch { tableObject.loading = false - getList() + updateList() } } // 筛选提交 const searchFormClick = async (searchData) => { - const { tableObject, tableMethods } = useTable({ - getListApi: props.apiPage // 分页接口 - }) - tableObject.params = { + tableObjectRef.value.params = { isSearch: true, filters: searchData.filters ? searchData.filters : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }] } - detailAllSchemasRef.value = props.detailAllSchemas - tableObjectRef.value = tableObject - tableMethodsRef.value = tableMethods - tableObjectRef.value.tableList = [] - const { getList } = tableMethods + // const { tableObject, tableMethods } = useTable({ + // getListApi: props.apiPage // 分页接口 + // }) + // tableObject.params = { + // isSearch: true, + // filters: searchData.filters + // ? searchData.filters + // : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }] + // } + // detailAllSchemasRef.value = props.detailAllSchemas + // tableObjectRef.value = tableObject + // tableMethodsRef.value = tableMethods + // tableObjectRef.value.tableList = [] + // const { getList } = tableMethods await getList() updateKey.value += 1 // tableObjectRef.value.params = { diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index e571f3bf9..ab2bdf9bf 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -757,6 +757,7 @@ export default { 物料描述2:'Material Description2', 项目代码:'Item Code', 质检明细:'Quality inspection details', + 履历表明细:'Details of your resume', 添加附件:'Add Attachment', 变更记录:'Change Record', 添加明细:'Add Detail', @@ -1147,6 +1148,8 @@ export default { '确 认':'Confirm', 请输入拒收原因:'Please enter the reason for rejection', 查看明细:'View details', + 未读:'unread', + 已读:'read', 全部已读:'All read', '申请发货数量不能大于 计划数量 - 已发货数量':'The requested quantity cannot be greater than the planned quantity - the quantity shipped', 不允许超发:'Oversend is not allowed', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index c5655b206..7c72bc20a 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -759,6 +759,7 @@ export default { 物料描述2:'物料描述2', 项目代码:'项目代码', 质检明细:'质检明细', + 履历表明细:'履历表明细', 添加附件:'添加附件', 变更记录:'变更记录', 添加明细:'添加明细', @@ -1150,6 +1151,8 @@ export default { '确 认':'确 认', 请输入拒收原因:'请输入拒收原因', 查看明细:'查看明细', + 未读:'未读', + 已读:'已读', 全部已读:'全部已读', '申请发货数量不能大于 计划数量 - 已发货数量':'申请发货数量不能大于 计划数量 - 已发货数量', 不允许超发:'不允许超发', diff --git a/src/permission.ts b/src/permission.ts index 08c744c55..4ef46714a 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -23,7 +23,8 @@ const whiteList = [ '/bind', '/register', '/oauthLogin/gitee', - '/purchasereceiptReport' + '/purchasereceiptReport', + '/supplierResume' ] // 路由加载前 diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 285839f2d..93b4a8b26 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -265,6 +265,16 @@ const remainingRouter: AppRouteRecordRaw[] = [ noTagsView: true } }, + { + path: '/supplierResume', + component: () => import('@/views/wms/purchasereceiptManage/supplierdeliver/supplierResume/index.vue'), + name: 'supplierResume', + meta: { + hidden: true, + title: t('ts.查看履历表'), + noTagsView: true + } + }, { path: '/bpm', component: Layout, diff --git a/src/utils/dict.ts b/src/utils/dict.ts index dde325e83..cfb938dbc 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -359,6 +359,7 @@ export enum DICT_TYPE { INTERFACE_STATUS = 'interfaceStatus', // 接口调用信息 接口状态 SYSTEM_DAY = 'system_day', // 系统天数 PURCHASE_INVOICE_ORDER_TYPE = 'purchase_invoice_order_type', // 发票采购订单类型 + DISCRETE_SUPPLIERINVOICE_READ = 'discrete_supplierinvoice_read', // 采购离散订单查看 // ========== eam - 业务 - ========== DEVICE_TYPE = 'device_type', // 设备分类 diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index 8d9ec527d..d06beb311 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -452,6 +452,18 @@ export function mainListFinishBtn(option: any) { }) } +export function mainListSendBtn(option: any) { + return __defaultBtnOption(option, { + label: t(`ts.发送邮件`).replace('ts.', ''), + name: 'send', + hide: false, + type: 'primary', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} + // 主列表-作废按钮 export function mainListCancelBtn(option: any) { return __defaultBtnOption(option, { @@ -772,6 +784,17 @@ export function mainListPlanCheckQualityReportBtn(option: any) { hasPermi: '' }) } +export function mainListSupplierResumeBtn(option: any) { + return __defaultBtnOption(option, { + label: t(`ts.查看履历表`).replace('ts.', ''), + name: 'mainSupplierResume', + hide: false, + type: 'primary', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} // 主列表-计划流程-提交审批按钮 export function mainListPlanSubBtn(option: any) { diff --git a/src/utils/validator.ts b/src/utils/validator.ts index b040b2ddf..83e031265 100644 --- a/src/utils/validator.ts +++ b/src/utils/validator.ts @@ -776,6 +776,19 @@ export function validateYS(rule, value, callback) { callback() } } +//校验只可输入大小写字母、数字、空格 +export function validateYSK(rule, value, callback) { + if (value) { + const regs = /^[a-zA-Z0-9-_. ]+$/ + if (regs.test(value)) { + callback() + } else { + callback(new Error('只能输入大小写字母、数字及空格')) + } + } else { + callback() + } +} // 校验百分比 export function validatePercent(rule, value, callback){ if (!value) { diff --git a/src/views/qms/inspectionJob/addForm.vue b/src/views/qms/inspectionJob/addForm.vue index 79484f230..7741bcfd9 100644 --- a/src/views/qms/inspectionJob/addForm.vue +++ b/src/views/qms/inspectionJob/addForm.vue @@ -184,7 +184,7 @@ - + - + { defaultButtons.mainListPackageBtn(null), // 包装 defaultButtons.mainListPlanCheckQualityReportBtn({ hide: isShowMainButton3(row) - }) // 查看质检报告 + }), // 查看质检报告 + defaultButtons.mainListSupplierResumeBtn({ + hide: isShowMainButton3(row) + }) // 查看履历表 ] } const listTableRef = ref() @@ -313,6 +316,9 @@ const buttonTableClick = async (val, row) => { } else if (val == 'mainPlanCheckQualityReport') { // 查看质检报告 checkQualityReport(row) + } else if (val == 'mainSupplierResume') { + // 查看履历表 + checkSupplierResume(row) } else if (val == 'mainJobAcc') { // 承接 handleAccept(row.id) @@ -323,11 +329,19 @@ const buttonTableClick = async (val, row) => { const reportHeight = ref(window.innerHeight - 120) const showQualityReport = ref(false) const qualityReport = ref('') +const reportTitle = ref('') + const checkQualityReport = async (row) => { + reportTitle.value = t('ts.质检明细') showQualityReport.value = true qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber } - +// 查看履历表 +const checkSupplierResume = async (row) => { + reportTitle.value = t('ts.履历表明细') + showQualityReport.value = true + qualityReport.value = getReportUrl() + '/supplierResume?asnNumber=' + row.asnNumber +} /** 添加/修改操作 */ // const formRef = ref() // const openForm = async (type : string, row ?: number) => { diff --git a/src/views/qms/inspectionJob/inspectionJobMain.data.ts b/src/views/qms/inspectionJob/inspectionJobMain.data.ts index 30a62efa2..2dbdc478f 100644 --- a/src/views/qms/inspectionJob/inspectionJobMain.data.ts +++ b/src/views/qms/inspectionJob/inspectionJobMain.data.ts @@ -686,7 +686,7 @@ export const InspectionJobMain = useCrudSchemas( isForm: false, isDetail: false, table: { - width: 300, + width: 390, fixed: 'right' } } diff --git a/src/views/qms/inspectionQ2/index.vue b/src/views/qms/inspectionQ2/index.vue index 930bf64d7..acdb4c3f6 100644 --- a/src/views/qms/inspectionQ2/index.vue +++ b/src/views/qms/inspectionQ2/index.vue @@ -651,7 +651,10 @@ const butttondata = (row) => { defaultButtons.mainListFinishBtn({ hide: isShowMainButton(row, ['0']), hasPermi: 'qms:Q2:finish' - }) // 完成 + }), // 完成 + defaultButtons.mainListSendBtn({ + hide: isShowMainButton(row, ['0']), + }) // 发送邮件 ] } @@ -667,6 +670,9 @@ const buttonTableClick = async (val, row) => { // 删除 handleFinish(row.id) } + else if (val == 'send') { + handleSend(row.id) + } } const handleFinish = async (id: number) => { @@ -678,22 +684,52 @@ const handleFinish = async (id: number) => { } catch {} } +const handleSend = async (id: number) => { + try { + // 发送邮件的二次确认 + await message.confirm('确认发送邮件吗?') + // 发送邮件 + await Q2Api.sendQ2(id) + message.success(t('邮件发送成功')) + // message.success(t('common.success')) + // 刷新列表 + // await getList() + } catch {} +} + /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + if (row && row.claimAddress?.trim()) { row.filePathList = row.claimAddress.split(',') } + if (row && row.claimAddressName?.trim()) { + row.claimAddressNameList = row.claimAddressName.split(','); + } if (row && row.filePathList && row.filePathList.length > 0) { - row.filePathListView = row.filePathList.map((item) => { + row.filePathListView = row.filePathList.map((item, index) => { return { - name: item, + name: row.claimAddressNameList ? row.claimAddressNameList[index] || item : item, url: item } }) } + // if (row && row.claimAddress?.trim()) { + // row.filePathList = row.claimAddress.split(',') + // } + // + // if (row && row.filePathList && row.filePathList.length > 0) { + // row.filePathListView = row.filePathList.map((item) => { + // return { + // name: item, + // url: item + // } + // }) + // } + basicFormRef.value.open(type, row) if (!row || !row.claimAmount) { nextTick(() => { diff --git a/src/views/qms/inspectionQ2/inspectionQ2.data.ts b/src/views/qms/inspectionQ2/inspectionQ2.data.ts index 4112c30fd..1270b5928 100644 --- a/src/views/qms/inspectionQ2/inspectionQ2.data.ts +++ b/src/views/qms/inspectionQ2/inspectionQ2.data.ts @@ -868,7 +868,7 @@ export const Q2 = useCrudSchemas( isForm: false, isDetail: false, table: { - width: 150, + width: 230, fixed: 'right' } } diff --git a/src/views/qms/inspectionRecord/index.vue b/src/views/qms/inspectionRecord/index.vue index 88c78d50f..f61aae936 100644 --- a/src/views/qms/inspectionRecord/index.vue +++ b/src/views/qms/inspectionRecord/index.vue @@ -85,7 +85,7 @@ /> { // hasPermi: 'qms:inspection-recode-main:execute', // }), // 执行 defaultButtons.mainListEditBtn({ hide: isShowEditBtn(row, ['11']) }), // 编辑 - defaultButtons.mainListPlanCheckQualityReportBtn({}) // 查看质检报告 + defaultButtons.mainListPlanCheckQualityReportBtn({}), // 查看质检报告 + defaultButtons.mainListSupplierResumeBtn({}) // 查看履历表 ] } @@ -306,6 +307,9 @@ const buttonTableClick = async (val, row) => { } else if (val == 'mainPlanCheckQualityReport') { // 查看质检报告 checkQualityReport(row) + } else if (val == 'mainSupplierResume') { + // 查看履历表 + checkSupplierResume(row) } else if (val == 'edit') { //修改 // 执行 @@ -317,10 +321,18 @@ const buttonTableClick = async (val, row) => { const reportHeight = ref(window.innerHeight - 120) const showQualityReport = ref(false) const qualityReport = ref('') +const reportTitle = ref('') const checkQualityReport = async (row) => { + reportTitle.value = t('ts.质检明细') showQualityReport.value = true qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber } +// 查看履历表 +const checkSupplierResume = async (row) => { + reportTitle.value = t('ts.履历表明细') + showQualityReport.value = true + qualityReport.value = getReportUrl() + '/supplierResume?asnNumber=' + row.asnNumber +} /** 添加/修改操作 */ const basicFormRef = ref() // const openForm = async (type : string, row ?: number) => { diff --git a/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts b/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts index b40337a96..2952c93c1 100644 --- a/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts +++ b/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts @@ -603,7 +603,7 @@ export const InspectionRecordMain = useCrudSchemas( isForm: false, isDetail: false, table: { - width: 340, + width: 430, fixed: 'right' } } diff --git a/src/views/qms/inspectionRecord/inspectionRecordPurchase.vue b/src/views/qms/inspectionRecord/inspectionRecordPurchase.vue index 8f4d0a7b6..83f1384eb 100644 --- a/src/views/qms/inspectionRecord/inspectionRecordPurchase.vue +++ b/src/views/qms/inspectionRecord/inspectionRecordPurchase.vue @@ -5,7 +5,7 @@ diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMOrderTypeMain/purchasereturnRecordMOrderTypeMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMOrderTypeMain/purchasereturnRecordMOrderTypeMain.data.ts new file mode 100644 index 000000000..ed6c01452 --- /dev/null +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMOrderTypeMain/purchasereturnRecordMOrderTypeMain.data.ts @@ -0,0 +1,994 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' + +import * as InspectionQ2Api from '@/api/qms/inspectionQ2' +import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data' + +/** + * @returns {Array} 采购退货记录主表 + */ +export const PurchasereturnRecordMOrderTypeMain = useCrudSchemas( + reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + sortTableDefault: 1012, + sortSearchDefault: 1, + isSearch: true + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault: 1 + }, + { + label: '任务单号', + field: 'jobNumber', + sort: 'custom', + isTable:false, + table: { + width: 180 + }, + + sortTableDefault: 1 + }, + { + label: '采购收货记录单号', + field: 'purchaseReceiptRecordNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: false, + isTable:false, + sortTableDefault: 3, + sortSearchDefault: 5 + }, + { + label: 'qad采购退货记录单号', + field: 'qadPurchaseReturnRecordCode', + sort: 'custom', + table: { + width: 180 + }, + sortSearchDefault: 3, + sortTableDefault: 4, + isTable: true + }, + { + label: '发货单号', + field: 'asnNumber', + sort: 'custom', + table: { + width: 180 + }, + sortSearchDefault: 3, + isSearch: false, + isTable:false, + sortTableDefault: 2 + }, + { + label: '要货计划单号', + field: 'ppNumber', + sort: 'custom', + table: { + width: 180 + }, + isTable: false + }, + { + label: 'Q2通知单号', + field: 'q2Number', + sort: 'custom', + isSearch: false, + isDetail: false, + isTable:false, + sortTableDefault: 4, + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + // multiple: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择Q2通知单号', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: 'Q2通知单号', // 查询弹窗标题 + searchAllSchemas: Q2.allSchemas, // 查询弹窗所需类 + searchPage: InspectionQ2Api.getQ2Page, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'status', + value: '0', + isMainValue: false + } + ], + verificationParams: [ + { + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1, + sortSearchDefault: 2, + isSearch: true + }, + { + label: '从月台代码', + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '承运商', + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '运输方式', + field: 'transferMode', + dictType: DICT_TYPE.TRANSFER_MODE, + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '车牌号', + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '出库事务类型', + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '入库事务类型', + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '执行时间', + field: 'executeTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '生效日期', + field: 'activeDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x' + } + } + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '截止时间', + field: 'dueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + } + }, + // { + // label: '原因', + // field: 'available', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: true, + // }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + 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')] + }, + } + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 150, + fixed: 'right' + }, + isTable:false, + } + ]) +) + +//表单校验 +export const PurchasereturnRecordMOrderTypeMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + supplierCode: [ + { required: true, message: '请选择供应商代码', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromAreaTypes: [ + { required: true, message: '请选择从库区类型范围', trigger: 'change' } + ], + outTransaction: [ + { required: true, message: '请输入出库事务类型', trigger: 'blur' } + ], + inTransaction: [ + { required: true, message: '请输入入库事务类型', trigger: 'blur' } + ], + executeTime: [ + { required: true, message: '请输入执行时间', trigger: 'change' } + ], + activeDate: [ + { required: true, message: '请输入生效日期', trigger: 'change' } + ], + available: [ + { required: true, message: '请输入是否可用', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + interfaceType: [ + { required: true, message: '请选择接口类型', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请选择创建时间', trigger: 'change' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 采购退货记录子表 + */ +export const PurchasereturnRecordMOrderTypeDetail = useCrudSchemas(reactive([ + + { + label: '从包装号', + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + isTable:false, + sortTableDefault: 1001, + sortSearchDefault: 1001, + }, + { + label: '到包装号', + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + isTable:false, + hiddenInMain: true, + sortSearchDefault: 1002, + sortTableDefault: 1001, + }, + { + label: '包装规格', + field: 'packUnit', + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1004, + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + isTable:false, + table: { + width: 150 + }, + sortTableDefault: 1004, + form: { + component: 'InputNumber', + } + }, + { + label: '退货数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + disabled:false + } + }, + sortTableDefault: 1004, + hiddenInMain:false, + isForm:false, + tableForm:{ + type:'InputNumber', + min:0, + precision: 6, + disabled:false + } + }, + // { + // label: '从器具号', + // field: 'fromContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false, + // hiddenInMain: true + // }, + // { + // label: '到器具号', + // field: 'toContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false, + // hiddenInMain: true + // }, + { + label: '从批次', + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + sortTableDefault: 1000, + }, + { + label: '到批次', + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + sortTableDefault: 1000, + hiddenInMain: true + }, + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false, + // hiddenInMain: true + // }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1009, + hiddenInMain: true + }, + // { + // label: '到库位代码', + // field: 'toLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault: 1009, + // hiddenInMain: true + // }, + { + label: '从库位组代码', + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1010, + hiddenInMain: true + }, + // { + // label: '到库位组代码', + // field: 'toLocationGroupCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault: 1010, + // hiddenInMain: true + // }, + { + label: '从库区代码', + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1010, + hiddenInMain: true + }, + // { + // label: '到库区代码', + // field: 'toAreaCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault: 1010, + // hiddenInMain: true + // }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1010, + hiddenInMain: true + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1010, + hiddenInMain: true + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1008, + hiddenInMain: true + }, + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 4, + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 5, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + }, + sortTableDefault: 1013, + hiddenInMain: true, + isSearch: false + }, + + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + sortSearchDefault: 6, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + isTable:false, + table: { + width: 150 + }, + sortSearchDefault: 6, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + sortSearchDefault: 7, + hiddenInMain: true + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + sortSearchDefault: 7, + hiddenInMain: true + }, + // { + // label: '数量', + // field: 'qty', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:true, + // sortTableDefault: 1005, + // form: { + // component: 'InputNumber', + // } + // }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sortTableDefault: 1006, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '单价', + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain:true, + sortTableDefault: 1006, + form: { + component: 'InputNumber', + } + }, + { + label: '金额', + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain:true, + sortTableDefault: 1006, + form: { + component: 'InputNumber', + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1011, + hiddenInMain: true + }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + // { + // label: '任务明细ID', + // field: 'jobDetailId', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '退货原因', + field: 'reasonType', + dictType: DICT_TYPE.RETURN_REASON_TYPE, + dictClass: 'string', + // isSearch: true, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + type: 'Select', + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '退货原因描述', + field: 'reason', + sort: 'custom', + isTable:false, + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1007, + hiddenInMain: true + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain: false, + sortTableDefault: 1014, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1014, + hiddenInMain: false, + }, + +])) + +//表单校验 +export const PurchasereturnRecordMOrderTypeDetailRules = reactive({ + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + toPackingNumber: [ + { required: true, message: '请选择到包装号', trigger: 'change' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + reason: [ + { required: true, message: '请选择原因', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + poNumber: [ + { required: true, message: '请选择订单号', trigger: 'change' } + ], + poline: [ + { required: true, message: '请选择订单行', trigger: 'change' } + ], +}) diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/index.vue new file mode 100644 index 000000000..fe72a010c --- /dev/null +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/index.vue @@ -0,0 +1,1140 @@ + + + diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMOrderTypeMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMOrderTypeMain.data.ts new file mode 100644 index 000000000..aa8b29ec4 --- /dev/null +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMOrderTypeMain.data.ts @@ -0,0 +1,1711 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as SupplierApi from '@/api/wms/supplier' +import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' +import * as PurchaseMainApi from '@/api/wms/purchaseMain' +import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' +import * as LocationApi from '@/api/wms/location' +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' +import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' +import * as ItemPackageApi from '@/api/wms/itempackage/index' +import { PurchaseDetail, PurchaseMain } from '../../supplierdeliver/purchaseMain/purchaseMain.data' +import { useUserStore } from '@/store/modules/user' + + +const { t } = useI18n() // 国际化 +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'PurchaseReceiptRequest' +} +const data = await getRequestsettingApi.getRequestsettingPage(queryParams) +const requestsettingData =data?.list[0]||{} + + +// 获取当前操作人的部门 +const userStore = useUserStore() +const userDept = userStore.userSelfInfo.dept +// id 转str 否则form回显匹配不到 +userDept.id = userDept.id.toString() +const userDeptArray:any = [userDept] + +/** + * @returns {Array} 采购收货申请主表 + */ +export const PurchasereceiptRequestMain = useCrudSchemas(reactive([ + { + label: '采购订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch:true, + sortTableDefault:4, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择采购订单', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: '采购订单信息', // 查询弹窗标题 + isConcatDetailSchemas:true,//是否是主子表合并 默认false + searchDetailSchemas:PurchaseDetail.allSchemas, + searchAllSchemas: PurchaseMain.allSchemas, // 查询弹窗所需类 + searchPage: PurchaseDetailApi.getPurchaseDetailPageWMSMOrderType, // 查询弹窗所需分页方法 + isEnter:true, + searchCondition: [{ + key:'poLineType', + value:'M', + action: '==', + message: 'M型的采购订单', + isSearch: true, + isMainValue: false + }, + { + key: 'status', // 查询列表中字段 + value: '2', // 指查询具体值 + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 + }], + verificationParams: [{ + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + }, + isForm: true, + }, +])) + +//表单校验 +export const PurchasereceiptRequestMainRules = reactive({ + poNumber: [ + { required: true, message: '请选择采购订单号', trigger: 'blur' } + ] +}) + +/** + * @returns {Array} 采购收货申请子表 + */ +export const PurchasereceiptRequestDetail = useCrudSchemas(reactive([ + + { + label: '订单号', + field: 'poNumber', + hiddenInMain:true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:5, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '采购订单信息', + isConcatDetailSchemas:true,//是否是主子表合并 默认false + searchDetailSchemas:PurchaseDetail.allSchemas, + searchAllSchemas: PurchaseMain.allSchemas, + searchPage: PurchaseDetailApi.getPurchaseDetailPageWMSMOrderType, + searchCondition: [ + { + key:'number', + value:'poNumber', + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isFormModel:true, + required:true, + message:'请选择采购订单号', + isMainValue: false + }, + { + key: 'status', // 查询列表中字段 + value: '2', // 指查询具体值 + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 + }] + }, + form: { + labelMessage: '该订单号会影响订单行的选择', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '采购订单信息', + searchDetailSchemas:PurchaseDetail.allSchemas, + searchAllSchemas: PurchaseMain.allSchemas, + searchPage: PurchaseDetailApi.getPurchaseDetailPageWMSMOrderType, + searchCondition: [{ + key:'supplierCode', + value:'supplierCode', + message: '请选择供应商!', + isMainValue: true + }] + } + } + }, + { + label: '订单类型', + field: 'type', + dictType: DICT_TYPE.WORK_ORDER_TYPE, + dictClass: 'string', + isSearch: false, + isTable: false, + isTableForm: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + isForm: false, + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:5, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择订单行', // 输入框占位文本 + searchField: 'lineNumber', // 查询弹窗赋值字段 + searchTitle: '订单信息', // 查询弹窗标题 + searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类 + searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'number', + value:'poNumber', + message: '请填写订单号!', + isMainValue: true + }] + } + }, + tableForm:{ + multiple:true, + isInpuFocusShow: true, + searchListPlaceholder: '请选择订单行', // 输入框占位文本 + searchField: 'lineNumber', // 查询弹窗赋值字段 + searchTitle: '订单信息', // 查询弹窗标题 + searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类 + searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'number', + value:'poNumber', + message: '请填写订单号!', + isMainValue: true + }] + } + }, + { + label: '行类型', + field: 'poLineType', + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault:5, + hiddenInMain:true, + isForm: false, + tableForm:{ + disabled: true + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch:true, + sortTableDefault:6, + tableForm:{ + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + + { + label: '订单数量', + field: 'orderQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + }, + }, + hiddenInMain: true, + sortTableDefault:9, + tableForm: { + disabled:true, + type: 'InputNumber', + min: 1, + precision: 6 + } + }, + { + label: '收货数量', + field: 'receivedQty', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:9, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6 + }, + }, + tableForm: { + disabled: true, + type: 'InputNumber', + min: 0, + precision: 6 + } + }, + { + label: '退货数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:9, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6 + }, + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:10, + tableForm: { + type: 'Select', + disabled: true + } + }, + { + label: '到库位代码', + field: 'defaultToLocationCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:13, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.selectBusinessTypeToLocation, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'businessType', + value: 'PurchaseReceipt', + isMainValue: false + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + }, + tableForm: { + enterSearch: true, + isInpuFocusShow: true, + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.selectBusinessTypeToLocation, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'businessType', + value: 'PurchaseReceipt', + isMainValue: false + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }], + isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据 + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + isTable:false, + isDetail:false, + isTableForm: false, + isForm: false + }, + { + label: '到货日期', + field: 'arriveDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault:11, + hiddenInMain:true, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + type:'FormDate', + placeholder: '请选择到货日期', + valueFormat: 'x', + }, + isTable:false, + isDetail:false, + isTableForm: false, + isForm: false + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain:true, + sortTableDefault:11, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + type:'FormDate', + placeholder: '请选择生产日期', + valueFormat: 'x', + }, + isTable:false, + isDetail:false, + isTableForm: false, + isForm: false + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + sortTableDefault:8, + table: { + width: 150 + }, + tableForm:{ + disabled: true + }, + isTable:false, + isDetail:false, + isTableForm: false, + isForm: false + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + sortTableDefault:11, + table: { + width: 180 + }, + hiddenInMain:true, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + // tableForm:{ + // type:'FormDate', + // placeholder: '请选择过期日期', + // valueFormat: 'x', + // }, + tableForm:{ + type: 'slot', + disabled: true + }, + isTable:false, + isDetail:false, + isTableForm: false, + isForm: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain:true, + }, +])) + +//表单校验 +export const PurchasereceiptRequestDetailRules = reactive({ + qty: [ + { required: true, message: '请输入退货数量', trigger: 'blur' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + produceDate: [ + { required: true, message: '请输入生产日期', trigger: 'change' } + ], + arriveDate: [ + { required: true, message: '请输入到货日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请输入过期日期', trigger: 'change' } + ], + packQty: [ + { required: true, message: '请输入包装数量', trigger: 'change' } + ], + poNumber: [ + { required: true, message: '请输入订单号', trigger: 'change' } + ], + poLine: [ + { required: true, message: '请输入订单行', trigger: 'change' } + ], + packUnit: [ + { required: true, message: '请选择包装规格', trigger: 'change' } + ], + convertRate: [ + { required: true, message: '请输入转换率', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + itemCode: [ + { required: true, message: '请输入物料代码', trigger: 'change' } + ], +}) + +/** + * @returns {Array} 采购收货申请子表--子包装号 + */ +export const PurchasereceiptRequestDetailPackingNumber = useCrudSchemas(reactive([ + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true, + isInpuFocusShow: false, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '采购订单信息', + searchAllSchemas: PurchaseMain.allSchemas, + searchPage: PurchaseMainApi.getPurchaseMainPage, + searchCondition: [{ + key:'supplierCode', + value:'supplierCode', + message: '请选择供应商!', + isMainValue: true + }] + }, + form: { + labelMessage: '该订单号会影响订单行的选择', + componentProps: { + disabled:true, + isSearchList: false, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '采购订单信息', + searchAllSchemas: PurchaseMain.allSchemas, + searchPage: PurchaseMainApi.getPurchaseMainPage, + searchCondition: [{ + key:'supplierCode', + value:'supplierCode', + message: '请选择供应商!', + isMainValue: true + }] + } + } + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled:true, + isSearchList: false, // 开启查询弹窗 + searchListPlaceholder: '请选择订单行', // 输入框占位文本 + searchField: 'lineNumber', // 查询弹窗赋值字段 + searchTitle: '订单信息', // 查询弹窗标题 + searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类 + searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'number', + value:'poNumber', + message: '请填写订单号!', + isMainValue: true + }] + } + }, + tableForm:{ + disabled:true, + isInpuFocusShow: false, + searchListPlaceholder: '请选择订单行', // 输入框占位文本 + searchField: 'lineNumber', // 查询弹窗赋值字段 + searchTitle: '订单信息', // 查询弹窗标题 + searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类 + searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'number', + value:'poNumber', + message: '请填写订单号!', + isMainValue: true + }] + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + // { + // label: '器具号', + // field: 'containerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // isForm: false + // }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + }, + }, + tableForm: { + disabled: true, + type: 'InputNumber', + min: 1, + precision: 6 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + } + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '默认到库位代码', + field: 'defaultToLocationCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + tableForm:{ + disabled: true, + isInpuFocusShow: false, + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + isTableForm: true, + isForm: false + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled:true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + disabled: true, + type:'FormDate', + placeholder: '请选择生产日期', + valueFormat: 'x', + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true + } + }, + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // isForm: false + // }, + { + label: '到货日期', + field: 'arriveDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled:true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + disabled: true, + type:'FormDate', + placeholder: '请选择到货日期', + valueFormat: 'x', + }, + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled:true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + disabled: true, + type:'FormDate', + placeholder: '请选择过期日期', + valueFormat: 'x', + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + tableForm: { + type: 'Select', + disabled: true, + } + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择包装', + searchField: 'packQty', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + + ] + } + }, + tableForm: { + disabled: true, + isInpuFocusShow: false, + searchListPlaceholder: '请选择包装', + searchField: 'packQty', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + isTableForm: true, + isForm: true + }, + { + label: '包装规格', + field: 'packUnit', + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150, + componentProps: { + disabled: true + } + }, + tableForm:{ + disabled:true + }, + isTableForm: true, + isForm: true + }, + { + label: '供应商计量数量', + field: 'supplierPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + }, + }, + isTableForm: false, + isForm: false + }, + { + label: '供应商计量单位', + field: 'supplierPackUnit', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + tableForm: { + type: 'Select' + } + }, + { + label: '转换率', + field: 'convertRate', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0 + }, + }, + tableForm: { + disabled: true, + }, + isTableForm: false, + isForm: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTableForm: false, + isForm: false + } +])) + + +export const PurchasereceiptRequestDetailLabel = useCrudSchemas(reactive([ + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true, + isInpuFocusShow: false, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '采购订单信息', + searchAllSchemas: PurchaseMain.allSchemas, + searchPage: PurchaseMainApi.getPurchaseMainPage, + searchCondition: [{ + key:'supplierCode', + value:'supplierCode', + message: '请选择供应商!', + isMainValue: true + }] + }, + form: { + labelMessage: '该订单号会影响订单行的选择', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '采购订单信息', + searchAllSchemas: PurchaseMain.allSchemas, + searchPage: PurchaseMainApi.getPurchaseMainPage, + searchCondition: [{ + key:'supplierCode', + value:'supplierCode', + message: '请选择供应商!', + isMainValue: true + }] + } + } + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled:true, + isSearchList: false, // 开启查询弹窗 + searchListPlaceholder: '请选择订单行', // 输入框占位文本 + searchField: 'lineNumber', // 查询弹窗赋值字段 + searchTitle: '订单信息', // 查询弹窗标题 + searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类 + searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'number', + value:'poNumber', + message: '请填写订单号!', + isMainValue: true + }] + } + }, + tableForm:{ + disabled:true, + isInpuFocusShow: false, + searchListPlaceholder: '请选择订单行', // 输入框占位文本 + searchField: 'lineNumber', // 查询弹窗赋值字段 + searchTitle: '订单信息', // 查询弹窗标题 + searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类 + searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'number', + value:'poNumber', + message: '请填写订单号!', + isMainValue: true + }] + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + isTableForm: true, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + isTableForm: true, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + // { + // label: '器具号', + // field: 'containerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // isForm: false + // }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled:true, + min: 1, + precision: 6 + }, + }, + tableForm: { + disabled:true, + type: 'InputNumber', + min: 1, + precision: 6 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + } + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '默认到库位代码', + field: 'defaultToLocationCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled:true, + isSearchList: false, // 开启查询弹窗 + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + tableForm:{ + disabled:true, + isInpuFocusShow: false, + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + isTableForm: true, + isForm: false + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled:true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + disabled:true, + type:'FormDate', + placeholder: '请选择生产日期', + valueFormat: 'x', + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true + } + }, + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // isForm: false + // }, + { + label: '到货日期', + field: 'arriveDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled: true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + disabled: true, + type:'FormDate', + placeholder: '请选择到货日期', + valueFormat: 'x', + }, + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled: true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + disabled: true, + type:'FormDate', + placeholder: '请选择过期日期', + valueFormat: 'x', + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + tableForm: { + type: 'Select' + } + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true, + isSearchList: true, + searchListPlaceholder: '请选择包装', + searchField: 'packQty', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isTableRowValue: true, //查询当前searchTable表中行数据的值 + isMainValue: false + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + + ] + } + }, + tableForm: { + disabled: true, + isInpuFocusShow: true, + searchListPlaceholder: '请选择包装', + searchField: 'packQty', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isTableRowValue: true, //查询当前searchTable表中行数据的值 + isMainValue: false + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + isTableForm: true, + isForm: true + }, + { + label: '包装规格', + field: 'packUnit', + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150, + componentProps: { + disabled: true + } + }, + tableForm:{ + disabled:true + }, + isTableForm: true, + isForm: true + }, + { + label: '供应商计量数量', + field: 'supplierPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled: true, + min: 1, + precision: 6 + }, + }, + isTableForm: false, + isForm: false + }, + { + label: '供应商计量单位', + field: 'supplierPackUnit', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + tableForm: { + type: 'Select' + } + }, + { + label: '转换率', + field: 'convertRate', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled: true, + min: 0 + }, + }, + isTableForm: false, + isForm: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, +])) diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMain.data.ts new file mode 100644 index 000000000..69d9a946e --- /dev/null +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMain.data.ts @@ -0,0 +1,1891 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import { + PurchasereceiptRecordDetail, + PurchasereceiptRecordMain +} from '../../purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data' +import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail' +import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' +import * as SupplierApi from '@/api/wms/supplier' +import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' +import * as ItemPackageApi from '@/api/wms/itempackage/index' +import * as LocationApi from '@/api/wms/location' +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' +import * as BalanceApi from '@/api/wms/balance' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +import * as InspectionQ2Api from '@/api/qms/inspectionQ2' +import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data' + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize: 10, + pageNo: 1, + code: 'PurchaseReturnRequest' +} +const data = await getRequestsettingApi.getRequestsettingPage(queryParams) +const requestsettingData = data?.list[0] || {} + +// 获取当前操作人的部门 +import { useUserStore } from '@/store/modules/user' +import { TableColumn } from '@/types/table' +const userStore = useUserStore() +const userDept = userStore.userSelfInfo.dept +// id 转str 否则form回显匹配不到 +userDept.id = userDept.id.toString() +const userDeptArray: any = [userDept] + +// 采购收货记录展示列 +export const PurchasereceiptRecordMain1 = useCrudSchemas( + reactive([ + { + label: '物料代码', + field: 'itemCode', + fixed: 'left', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '采购收货记录单号', + field: 'number', + fixed: 'left', + sort: 'custom', + table: { + width: 200 + }, + isSearch: true + }, + { + label: '发货单号', + field: 'asnNumber', + sort: 'custom', + isTable:false, + table: { + width: 180 + }, + sortTableDefault: 2, + isSearch: false + }, + { + label: '采购订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + } + }, + + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '批次', // 实际是子表的从批次,为了不影响页面,单独放上面 + field: 'fromBatch', + sort: 'custom', + isForm: false, + isTableForm: false, + table: { + width: 150 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + } + }, + // { + // label: '包装规格', + // field: 'packUnit', + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '从库位代码', + // field: 'fromLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // + // }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + } + } + ]) +) + +/** + * @returns {Array} 采购退货申请主表 + */ +export const PurchasereturnRequestMain = useCrudSchemas( + reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isForm: false, + isSearch: true + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1, + isSearch: true, + form: { + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '供应商信息', // 查询弹窗标题 + searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 + searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法 + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + + { + // label: '采购收货记录单号', + // field: 'purchaseReceiptRecordNumber', + label: '发货单号', + field: 'asnNumber', + sort: 'custom', + table: { + width: 180 + }, + isTable:false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + disabled: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择发货单号', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: '采购收货记录', // 查询弹窗标题 + searchAllSchemas: PurchasereceiptRecordMain1.allSchemas, // 查询弹窗所需类 + searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageReturn, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'supplierCode', + value: 'supplierCode', + isMainValue: true + } + ], + verificationParams: [ + { + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + // { + // label: '发货单号', + // field: 'asnNumber', + // sort: 'custom', + // table: { + // width: 180 + // }, + // isForm: false, + // sortTableDefault: 2 + // }, + { + label: '要货计划单号', + field: 'ppNumber', + sort: 'custom', + table: { + width: 180 + }, + isForm: false, + isTable: false + }, + { + label: 'Q2通知单号', + field: 'q2Number', + sort: 'custom', + isSearch: false, + isDetail: false, + isTable:false, + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + // multiple: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择Q2通知单号', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: 'Q2通知单号', // 查询弹窗标题 + searchAllSchemas: Q2.allSchemas, // 查询弹窗所需类 + searchPage: InspectionQ2Api.getQ2Page, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'status', + value: '0', + isMainValue: false + }, + { + key: 'supplierCode', + value: 'supplierCode', + isMainValue: true + } + ], + verificationParams: [ + { + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + { + label: '承运商', + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '运输方式', + field: 'transferMode', + sort: 'custom', + dictType: DICT_TYPE.TRANSFER_MODE, + dictClass: 'string', + table: { + width: 150 + }, + isTable: false + }, + { + label: '车牌号', + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTable: false + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + isTable: false + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTable: false + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTable: false, + isTableForm: false + }, + { + label: '从月台代码', + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTable: false + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + form: { + value: 'PurchaseReturn', + componentProps: { + disabled: true + } + }, + isForm: false, + isTable: false + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + isForm: false, + isTable: false + }, + { + label: '截止时间', + field: 'dueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + isForm: false, + table: { + width: 150 + }, + isTable: false, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id == cellValue)?.name + }, + form: { + value: userDept.id, + component: 'Select', + api: () => userDeptArray, + componentProps: { + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } + } + } + }, + + { + label: '原因', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '创建时间', + field: 'createTime', + isForm: false, + table: { + width: 180 + }, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + 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')] + }, + } + }, + { + label: '创建者', + field: 'creator', + table: { + width: 130 + }, + isForm: false, + isTable: true + }, + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + isDetail: true, + isForm: false, + isTable: false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '最后更新者', + field: 'updater', + isDetail: true, + isForm: false, + isTable: false, + table: { + width: 150 + } + }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoCommit, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '自动通过', + field: 'autoAgree', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoAgree, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '自动执行', + field: 'autoExecute', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoExecute, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '直接生成记录', + field: 'directCreateRecord', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isForm: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.directCreateRecord, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 300, + fixed: 'right' + } + } + ]) +) + +//表单校验 +export const PurchasereturnRequestMainRules = reactive({ + supplierCode: [ + { required: true, message: '请输入供应商代码', trigger: 'blur' } + ], + dueTime: [ + { required: true, message: '请选择截止时间', trigger: 'blur' } + ], + purchaseReceiptRecordNumber: [ + { required: true, message: '请输入采购收货记录单号', trigger: 'blur' } + ], + carrierCode: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' }, + ], + vehiclePlateNumber: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' }, + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + fromWarehouseCode: [ + { required: true, message: '请输入从仓库代码', trigger: 'blur' } + ], + fromAreaTypes: [ + { required: true, message: '请选择从库区类型范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 采购退货申请子表 + */ +export const PurchasereturnRequestDetail = useCrudSchemas(reactive([ + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: false, // 开启查询弹窗 + searchListPlaceholder: '请选择订单行', + searchField: 'poLine', + searchTitle: '采购收货记录信息', + searchAllSchemas: PurchasereceiptRecordDetail.allSchemas, + searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage, + searchCondition: [{ + key: 'number', + value: 'purchaseReceiptRecordNumber', + message: '请填写采购收货记录号!', + isMainValue: true + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: false, + searchListPlaceholder: '请选择订单行', + searchField: 'poLine', + searchTitle: '采购收货记录信息', + searchAllSchemas: PurchasereceiptRecordDetail.allSchemas, + searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage, + searchCondition: [{ + key: 'number', + value: 'purchaseReceiptRecordNumber', + message: '请填写采购收货记录号!', + isMainValue: true + }] + } + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + // labelMessage: '信息提示说明!!!', + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择订单行', + searchField: 'poLine', + searchTitle: '采购收货记录信息', + searchAllSchemas: PurchasereceiptRecordDetail.allSchemas, + searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageBySupplierCode, + searchCondition: [{ + key: 'supplierCode', + value: 'supplierCode', + message: '请填写采购收货记录号!', + isMainValue: true + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled:true, + isSearchList: true, + searchListPlaceholder: '请选择订单行', + searchField: 'poLine', + searchTitle: '采购收货记录信息', + searchAllSchemas: PurchasereceiptRecordDetail.allSchemas, + searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageBySupplierCode, + searchCondition: [{ + key: 'supplierCode', + value: 'supplierCode', + message: '请填写采购收货记录号!', + isMainValue: true + }] + } + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm:false, + isTable:false, + hiddenInMain: true, + isForm: false, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm:false, + isTable:false, + hiddenInMain: true, + isForm: false, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true, + // isTableForm: false, + // isTable: false, + // isForm: false, + // tableForm:{ + // disabled:true + // }, + // form: { + // componentProps:{ + // disabled:true + // } + // } + // }, + // { + // label: '器具号', + // field: 'containerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true, + // tableForm:{ + // disabled:true + // }, + // isTableForm: false, + // isTable: false, + // isForm: false, + // form: { + // componentProps:{ + // disabled:true + // } + // } + // }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + // isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true, + type: 'Select', + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '退货数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + disabled:false + } + }, + isTable:false, + isTableForm:false, + tableForm:{ + disabled:true, + type:'InputNumber', + min:0, + precision: 6 + } + }, + // { //与国强联调的时候发现退货数量用的是qty + // label: '退货数量', + // field: 'returnedQty', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'InputNumber', + // componentProps: { + // min: 0, + // precision: 6, + // disabled:false + // } + // }, + // isTable: false, + // isTableForm: false, + // isForm:false, + // tableForm:{ + // type:'InputNumber', + // min:0, + // precision: 6, + // disabled:false + // } + // }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + // tableForm: { + // enterSearch: true, + // // labelMessage: '信息提示说明!!!', + // isInpuFocusShow: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择从库位代码', + // searchField: 'code', + // searchTitle: '库位代码信息', + // searchAllSchemas: Location.allSchemas, + // searchPage: LocationApi.getLocationListByAreaAndBusinesstype, + // searchCondition: [{ + // key: 'businessType', + // value: 'PurchaseReturn', + // message: '请填写业务类型', + // isMainValue: false + // },{ + // key: 'isIn', + // value: 'out', + // message: '', + // isMainValue: false + // }], + // verificationParams: [{ + // key: 'code', + // action: '==', + // value: '', + // isMainValue: false, + // isSearch: true, + // isFormModel: true, + // }], // 失去焦点校验参数 + // }, + form: { + componentProps:{ + disabled:true + } + }, + // form:{ + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // enterSearch: true, + // isSearchList: true, + // searchListPlaceholder: '请选择从库位代码', + // searchField: 'code', + // searchTitle: '库位代码信息', + // searchAllSchemas: Location.allSchemas, + // searchPage: LocationApi.getLocationListByAreaAndBusinesstype, + // searchCondition: [{ + // key: 'businessType', + // value: 'PurchaseReturn', + // message: '请填写业务类型', + // isMainValue: false + // },{ + // key: 'isIn', + // value: 'out', + // message: '', + // isMainValue: false + // }], + // verificationParams: [{ + // key: 'code', + // action: '==', + // value: '', + // isMainValue: false, + // isSearch: true, + // isFormModel: true, + // }], // 失去焦点校验参数 + // } + // }, + hiddenInMain: true, + isTable: false, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTable: false, + // form: { + // componentProps:{ + // disabled: true, + // } + // }, + form: { + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择包装号', + searchField: 'packingNumber', + searchTitle: '库存余额信息', // 查询弹窗标题 + searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 + searchPage: BalanceApi.getBalancePageReturn, + searchCondition: [{ + key: 'itemCode', + value: 'itemCode', + message: '请填写物料代码', + isTableRowValue: true, //查询当前searchTable表中行数据的值 + required:true, + isMainValue:true + }, + // { + // key: 'batch', + // value: 'batch', + // message: '请填写批次', + // isTableRowValue: true, //查询当前searchTable表中行数据的值 + // // required:true, + // isMainValue:true + // } + ], + verificationParams: [{ + key: 'packingNumber', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + }, + tableForm: { + enterSearch: true, + multiple: true, + // labelMessage: '信息提示说明!!!', + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码、批次、从库位代码', + searchField: 'packingNumber', + searchTitle: '库存余额信息', // 查询弹窗标题 + searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 + searchPage: BalanceApi.getBalancePageReturn, + searchCondition: [{ + key: 'itemCode', + value: 'itemCode', + message: '请填写物料代码', + isTableRowValue: true, //查询当前searchTable表中行数据的值 + required:true, + isMainValue:false + }, + // { + // key: 'batch', + // value: 'batch', + // message: '请填写批次', + // isTableRowValue: true, //查询当前searchTable表中行数据的值 + // required:true, + // isMainValue:false + // } + ], + verificationParams: [{ + key: 'packingNumber', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + }, + { + label: '库存余额', + field: 'inventoryBalance', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled: true, + min: 0, + precision: 6 + } + }, + tableForm:{ + hidden:false,//控制列是否展示 + type:'InputNumber', + min:0, + precision: 6 + }, + hiddenInMain: true, + isTable: false, + isDetail: false, + }, + { + label: '退货数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6 + } + }, + isForm:false, + tableForm:{ + type:'InputNumber', + min:0, + precision: 6 + } + }, + { + label: '退货原因', + field: 'reasonType', + dictType: DICT_TYPE.RETURN_REASON_TYPE, + dictClass: 'string', + // isSearch: true, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + type: 'Select', + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '退货原因描述', + field: 'reason', + sort: 'custom', + isTable:false, + table: { + width: 150 + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isSearch: false, + hiddenInMain: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true, + type: 'Select', + }, + isTableForm: false, + isTable: false, + isForm: false, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + hiddenInMain: true, + isTableForm: false, + isTable: false, + isForm: false, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + hiddenInMain: true, + isTableForm: false, + isTable: false, + isForm: false, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + hiddenInMain: true, + isTableForm: false, + isTable: false, + isForm: false, + form: { + componentProps:{ + disabled:true + } + } + }, + // { + // label: '到货日期', + // field: 'arriveDate', + // formatter: dateFormatter2, + // detail: { + // dateFormat: 'YYYY-MM-DD' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // hiddenInMain: true, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: {width: '100%'}, + // type: 'date', + // dateFormat: 'YYYY-MM-DD', + // valueFormat: 'x', + // } + // }, + // tableForm:{ + // disabled:true, + // type: 'FormDate', + // dateFormat: 'YYYY-MM-DD', + // valueFormat: 'x', + // }, + // isTableForm: false + // }, + // { + // label: '生产日期', + // field: 'produceDate', + // formatter: dateFormatter2, + // detail: { + // dateFormat: 'YYYY-MM-DD' + // }, + // hiddenInMain: true, + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // disabled: true, + // style: {width: '100%'}, + // type: 'date', + // dateFormat: 'YYYY-MM-DD', + // valueFormat: 'x', + // } + // }, + // tableForm:{ + // disabled:true, + // type: 'FormDate', + // format: 'YYYY-MM-DD', + // valueFormat: 'x', + // }, + // isTableForm: false + // }, + // { + // label: '过期日期', + // field: 'expireDate', + // formatter: dateFormatter2, + // detail: { + // dateFormat: 'YYYY-MM-DD' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // hiddenInMain: true, + // form: { + // component: 'DatePicker', + // componentProps: { + // disabled: true, + // style: {width: '100%'}, + // type: 'date', + // dateFormat: 'YYYY-MM-DD', + // valueFormat: 'x', + // } + // }, + // isTableForm: false, + // isTable: false, + // tableForm:{ + // disabled:true, + // type: 'FormDate', + // format: 'YYYY-MM-DD', + // valueFormat: 'x', + // } + // }, + // { + // label: '任务明细ID', + // field: 'jobDetailId', + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm:{ + // disabled:true + // }, + // isTableForm:false, + // hiddenInMain: true, + // isForm:false, + // form: { + // componentProps:{ + // disabled:true + // } + // }, + // }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + isForm: false, + isTableForm: false, + isTable: false, + hiddenInMain: true, + form: { + componentProps:{ + disabled:true + } + }, + }, + + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain: true, + tableForm:{ + disabled:true + }, + isForm: false, + isTableForm:false, + }, + // { + // label: '接口类型', + // field: 'interfaceType', + // dictType: DICT_TYPE.INTERFACE_TYPE, + // dictClass: 'string', + // isSearch: true, + // isTable: true, + // hiddenInMain: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm:{ + // disabled:true + // }, + // isForm:false, + // isTableForm:false, + // form: { + // componentProps:{ + // disabled:true + // } + // }, + // }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + isTableForm: false, + isTable: false, + hiddenInMain: true, + isForm: false, + form: { + componentProps:{ + disabled:true + } + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain: true, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + tableForm:{ + disabled:true + }, + isTableForm:false, + isForm:false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + hiddenInMain: true, + isTableForm:false, + isForm:false + }, + { + label: '原因', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + // { + // label: '操作', + // hiddenInMain:true, + // field: 'action', + // isDetail: false, + // isForm: false , + // table: { + // width: 150, + // fixed: 'right' + // }, + // isTableForm:false, + // } +])) + +//表单校验 +export const PurchasereturnRequestDetailRules = reactive({ + // packingNumber: [ + // { required: true, message: '请输入包装号', trigger: 'blur' } + // ], + // batch: [ + // { required: true, message: '请输入批次', trigger: 'blur' } + // ], + // inventoryStatus: [ + // { required: true, message: '请选择库存状态', trigger: 'change' } + // ], + // poNumber: [ + // { required: true, message: '请输入订单号', trigger: 'blur' } + // ], + // poLine: [ + // { required: true, message: '请输入订单行', trigger: 'blur' } + // ], + // reason: [ + // { required: true, message: '请选择原因', trigger: 'change' } + // ], + itemCode: [ + { required: true, message: '请输入物料代码', trigger: 'blur' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], +}) + +export const PurchasereReturnRequestDetailLabel = useCrudSchemas(reactive([ + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + isTableForm: true, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + isTableForm: true, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + isTableForm: false, + isForm: false + }, + // { + // label: '器具号', + // field: 'containerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // isForm: false + // }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled:true, + min: 1, + precision: 6 + }, + }, + tableForm: { + disabled:true, + type: 'InputNumber', + min: 1, + precision: 6 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + } + }, + { + label: '从库位代码1', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled:true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + disabled:true, + type:'FormDate', + placeholder: '请选择生产日期', + valueFormat: 'x', + }, + }, + + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // isForm: false + // }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + tableForm: { + type: 'Select' + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true, + isSearchList: true, + searchListPlaceholder: '请选择包装', + searchField: 'packQty', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + + ] + } + }, + tableForm: { + disabled: true, + isInpuFocusShow: true, + searchListPlaceholder: '请选择包装', + searchField: 'packQty', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + isTableForm: true, + isForm: true + }, + { + label: '包装规格', + field: 'packUnit', + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150, + componentProps: { + disabled: true + } + }, + tableForm:{ + disabled:true + }, + isTableForm: true, + isForm: true + }, +])) + diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMainNew.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMainNew.data.ts new file mode 100644 index 000000000..13c162522 --- /dev/null +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMainNew.data.ts @@ -0,0 +1,597 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import { + PurchasereceiptRecordDetail, + PurchasereceiptRecordMain +} from '../../purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data' +import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail' +import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' +import * as SupplierApi from '@/api/wms/supplier' +import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' +import * as ItemPackageApi from '@/api/wms/itempackage/index' +import * as LocationApi from '@/api/wms/location' +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' +import * as BalanceApi from '@/api/wms/balance' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +import * as InspectionQ2Api from '@/api/qms/inspectionQ2' +import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data' + +import * as ItembasicApi from '@/api/wms/itembasic' +import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' + +let locationList = await LocationApi.selectBusinessTypeOutLocationAll({ + businessType:'PurchaseReturn', + isIn:'out' +}) +locationList = locationList.list.map(item=>({ + label :item.code, + value :item.code +})) + +console.log('locationList',locationList) + + +// 获取当前操作人的部门 +import { useUserStore } from '@/store/modules/user' +import { TableColumn } from '@/types/table' +const userStore = useUserStore() +const userDept = userStore.userSelfInfo.dept +// id 转str 否则form回显匹配不到 +userDept.id = userDept.id.toString() +const userDeptArray: any = [userDept] + +/** + * @returns {Array} 采购退货申请主表 + */ +export const PurchasereturnRequestMainNew = useCrudSchemas( + reactive([ + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + table:{ + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch:true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '物料基础信息', // 查询弹窗标题 + searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 + searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + action: '==', + isSearch: true, + isMainValue: false + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: 'true', + isFormModel: true + }], // 失去焦点校验参数 + } + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '供应商', + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Select', + componentProps: { + options: [], + optionsAlias: { + labelField: 'supplierCode', + valueField: 'supplierCode' + }, + filterable: true, + } + } + }, + { + label: '供应商名称', + field: 'supplierName', + sort: 'custom', + table: { + width: 180, + }, + isForm: true, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: ' ', + field: 'hahaha', + table: { + width: 180 + }, + isTable:false, + isDetail:false, + form: { + componentProps: { + type: 'slot', + } + }, + }, + { + label: ' ', + field: 'hehehe', + table: { + width: 180 + }, + isTable:false, + isDetail:false, + form: { + componentProps: { + type: 'slot', + } + }, + }, + { + label: '采购订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '采购订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '收货单号', + field: 'receiptNumber', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '发货单号', + field: 'asnNumber', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, + { + label: '退货库位', + field: 'locationCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Select', + value:locationList[0]['value'], + componentProps: { + options: locationList + } + } + }, + { + label: 'Q2通知单号', + field: 'q2Number', + sort: 'custom', + isSearch: false, + isDetail: true, + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + // multiple: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择Q2通知单号', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: 'Q2通知单号', // 查询弹窗标题 + searchAllSchemas: Q2.allSchemas, // 查询弹窗所需类 + searchPage: InspectionQ2Api.getQ2Page, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'status', + value: '0', + isMainValue: false + }, + { + key: 'supplierCode', + value: 'supplierCode', + isMainValue: true + } + ], + verificationParams: [ + { + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 300, + fixed: 'right' + } + } + ]) +) +//表单校验 +export const PurchasereturnRequestMainRulesNew = reactive({ + itemCode: [ + { required: true, message: '请输入供应商代码', trigger: 'blur' } + ], + supplierCode: [ + { required: true, message: '请输入供应商代码', trigger: 'blur' } + ], + poNumber: [ + { required: true, message: '请选择采购订单号', trigger: 'blur' } + ], + poLine: [ + { required: true, message: '请选择订单行', trigger: 'blur' } + ], + locationCode: [ + { required: true, message: '请选择收货单明细', trigger: 'blur' } + ] +}) + +export const PurchasereturnPurchasereceiptRecordNew = useCrudSchemas( + reactive([ + { + label: '收货日期', + field: 'currentDeliveryDate', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + } + }, + { + label: '收货单号', + field: 'receiptNumber', + sort: 'custom', + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '发货单号', + field: 'asnNumber', + sort: 'custom', + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + } + ]) +) + + + +/** + * @returns {Array} 采购退货申请子表 + */ +export const PurchasereturnRequestDetailNew = useCrudSchemas(reactive([ + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + type: 'Select', + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '隔离库存数量', + field: 'inventoryBalance', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled: true, + min: 0, + precision: 6 + } + }, + tableForm:{ + disabled:true, + hidden:false,//控制列是否展示 + type:'InputNumber', + min:0, + precision: 6 + }, + hiddenInMain: true, + isTable: false, + isDetail: false, + }, + { + label: '退货数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + disabled:false + } + }, + isTable:false, + isTableForm:true, + tableForm:{ + type:'InputNumber', + min:0, + precision: 6 + } + }, + { + label: '退货原因', + field: 'reasonType', + dictType: DICT_TYPE.RETURN_REASON_TYPE, + dictClass: 'string', + // isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + type: 'Select', + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '退货原因描述', + field: 'reason', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + { + label: '操作', + hiddenInMain:true, + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:false, + } +])) + +//表单校验 +export const PurchasereturnRequestDetailRulesNew = reactive({ +}) + + diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts index 974ba8a8c..95425975f 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts @@ -84,6 +84,13 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( action: '==', // 查询拼接条件 isSearch: true, // 使用自定义拼接条件 isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 + }, + { + key: 'poLineType', // 查询列表中字段 + value: '', // 指查询具体值 + action: 'isNull', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 }], verificationParams: [{ key: 'number', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts index 00647dec5..d58f4181d 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts @@ -68,6 +68,16 @@ export const PurchaseMain = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '行类型', + field: 'poLineType', + isTable: true, + isSearch: true, + sort: 'custom', + table: { + width: 150 + }, + }, { label: '状态', field: 'status', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierResume/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierResume/index.vue new file mode 100644 index 000000000..9326606b9 --- /dev/null +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierResume/index.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/index.vue b/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/index.vue new file mode 100644 index 000000000..a3c980593 --- /dev/null +++ b/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/index.vue @@ -0,0 +1,464 @@ + + + + + \ No newline at end of file diff --git a/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts b/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts new file mode 100644 index 000000000..47515e88f --- /dev/null +++ b/src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts @@ -0,0 +1,1863 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import { accountantFormart } from '@/utils/formatter' + +/** + * @returns {Array} 供应商发票记录主表 + */ +export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ + { + label: '单据号', + field:'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: false + }, + { + label: '发票申请单号', + field:'requestNumber', + sort: 'custom', + table: { + width: 180, + }, + sortSearchDefault:1, + sortTableDefault:1, + isSearch: true + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:1, + isSearch: true + }, + { + label: '供应商名称', + field: 'supplierName', + sort: 'custom', + table: { + width: 180, + }, + sortTableDefault:2, + isForm: false, + isSearch:true + }, + { + label: '税率', + field: 'taxRate', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:3, + form: { + component: 'InputNumber', + } + }, + + { + label: '价差合计', + field: 'differencePriceTotalMain', + formatter: accountantFormart, + table: { + width: 100 + }, + sortTableDefault: 3, + isForm: false, + isTable: true, + isSearch: false, + isDetail: true, + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.SUPPLIERINVOICE_REQUEST_STATUS, + dictClass: 'string', + isTable: true, + sortTableDefault:7, + isForm:false, + sort: 'custom', + table: { + width: 150 + }, + search: { + componentProps: { + multiple: true, + collapseTags: true, + collapseTagsTooltip: true, + } + }, + isSearch: true, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, + { + label: '已读状态', + field: 'isRead', + dictType: DICT_TYPE.DISCRETE_SUPPLIERINVOICE_READ, + dictClass: 'string', + isTable: true, + sortTableDefault:7, + isForm:false, + sort: 'custom', + table: { + width: 150 + }, + search: { + componentProps: { + collapseTags: true, + collapseTagsTooltip: true, + } + }, + isSearch: true, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, + + // { + // label: '申请单号', + // field: 'requestNumber', + // sort: 'custom', + // table: { + // width: 180, + // }, + // isTable: false, + // isSearch: true + // }, + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + isTable:false, + table: { + width: 150 + }, + }, + { + label: '金税票号',//金税票号 + field: 'goldenTaxInvoiceNumber', + sort: 'custom', + table: { + width: 200 + }, + sortTableDefault:5, + isSearch: true + }, + { + label: '未税尾差', + field: 'beforeTaxDiffAmount', + formatter: accountantFormart, + table: { + width: 150 + }, + sortTableDefault:5, + isForm:false, + isTableForm:false + }, + { + label: '税额尾差', + field: 'taxAmountDiff', + formatter: accountantFormart, + table: { + width: 150 + }, + sortTableDefault:5, + isForm:false, + isTableForm:false + }, + { + label: '价税合计尾差', + field: 'totalTaxDiffAmount', + formatter: accountantFormart, + table: { + width: 150 + }, + sortTableDefault:5, + isForm:false, + isTableForm:false + }, + + { + label: '供应商维护税额', + field: 'taxAmount', + formatter: accountantFormart, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:8, + form: { + component: 'InputNumber', + } + }, + { + label: '发票未税金额', + field: 'beforeTaxAmount', + formatter: accountantFormart, + table: { + width: 150 + }, + sortTableDefault:3, + isForm:false, + isTableForm:false + }, + { + label: '发票税额', + field: 'totalTaxAmount', + formatter: accountantFormart, + table: { + width: 150 + }, + sortTableDefault:3, + isForm:false, + isTableForm:false + }, + { + label: '发票价税合计', + field: 'adTaxAmount', + formatter: accountantFormart, + table: { + width: 150 + }, + sortTableDefault:3, + isForm:false, + isTableForm:false + }, + { + label: '是否有价差', + field: 'balanceStatementStatus', + dictType: DICT_TYPE.INVOICE_BALANCE_STATEMENT_STATUS, + dictClass: 'string', + isTable: true, + isForm:false, + isSearch:false, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:3, + }, + + { + label: '价差说明', + field: 'balanceStatement', + isTable: false, + isForm:false, + isSearch:false, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:5, + }, + { + label: '供应商维护价税合计',//税后金额 + field: 'afterTaxAmount', + formatter: accountantFormart, + sort: 'custom', + table: { + width: 160 + }, + sortTableDefault:9, + form: { + component: 'InputNumber', + } + }, + + { + label: '价差',//总差额 + field: 'totalDifference', + table: { + width: 150 + }, + isTable: false, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6, + } + }, + + { + label: '供应商维护未税金额', + field: 'amount', + formatter: accountantFormart, + sort: 'custom', + table: { + width: 160 + }, + sortTableDefault:8, + form: { + component: 'InputNumber', + } + }, + + + + { + label: '索赔金额', + field: 'claimAmount', + formatter: accountantFormart, + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + form: { + component: 'InputNumber', + } + }, + { + label: '调整价差', + field: 'discountAmount', + formatter: accountantFormart, + sort: 'custom', + table: { + width: 150 + }, + isDetail:false, + isTable: false, + form: { + component: 'InputNumber', + } + }, + { + label: '调整税额', + field: 'adjustingTaxAmount', + formatter: accountantFormart, + sort: 'custom', + isDetail:false, + table: { + width: 150 + }, + isTable: false, + form: { + component: 'InputNumber', + } + }, + + { + label: '未税差额', + field: 'untaxedDifference', + formatter: accountantFormart, + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + } + }, + isTable: false, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6, + } + }, + { + label: '含税差额', + field: 'taxInclusiveDifference', + formatter: accountantFormart, + table: { + width: 150 + }, + isTable: false, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6, + } + }, + { + label: '快递单号', + field: 'expressTrackingNumber', + sort: 'custom', + isTable:false, + isForm:false, + isSearch:false, + table: { + width: 150 + }, + }, + { + label: '开票日期', + field: 'invoiceTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form:{ + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD',//YYYY-MM-DD + valueFormat: 'x',//数据转成时间戳 + } + }, + sortTableDefault:4, + sort: 'custom', + table: { + width: 180 + }, + }, + // { + // label: '采购审批人', + // field: 'procurementCreatorName', + // sort: 'custom', + // table: { + // width: 180 + // }, + // isTable:true, + // isDetail: true, + // isTableForm: false, + // isForm:false, + // isSearch:false, + // sortTableDefault:10 + // }, + { + label: '过账日期', + field: 'postingDate', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form:{ + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD',//YYYY-MM-DD + valueFormat: 'x',//数据转成时间戳 + } + }, + isTable: true, + sortTableDefault:6, + sort: 'custom', + table: { + width: 180 + }, + isSearch: true, + search: { + value:[], + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + dateFormat: 'YYYY-MM-DD', + type: 'daterange', + defaultTime: [new Date('1 '), new Date('1 ')] + } + }, + }, + //子表数据,仅是查询条件 + { + label: '货运单号', + field: 'asnBillNum', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isTableForm:false, + isTable:false, + isDetail:false, + isSearch: true, + isForm: false, + }, + { + label: '财务凭证号', + field: 'voucherNumber', + sort: 'custom', + table: { + width: 200, + }, + isTable:true, + sortTableDefault:6, + isForm: false + }, + + { + label: '业务类型', + field:'businessType', + sort: 'custom', + isTable:false, + isTableForm:false, + isDetail:false, + table: { + width: 150 + }, + }, + { + label: '出库事务类型', + field: 'outTransactionType', + sort: 'custom', + isTable:false, + isTableForm:false, + isDetail:false, + table: { + width: 150 + }, + }, + { + label: '入库事务类型', + field: 'inTransactionType', + isTable:false, + isTableForm:false, + isDetail:false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '执行时间', + field: 'executeTime', + isTable:false, + isTableForm:false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '生效日期', + field: 'activeDate', + isTable:false, + isTableForm:false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '申请时间', + field: 'requestTime', + isTable:false, + isTableForm:false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '截止时间', + field: 'dueTime', + isTable:false, + isTableForm:false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '部门', + field: 'departmentCode', + isTable:false, + isTableForm:false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '代码', + field: 'code', + isTable:false, + isTableForm:false, + isDetail:false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable:false, + isDetail:false, + isTableForm:false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + isTable:false, + isTableForm:false, + dictClass: 'string', + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + sortTableDefault:1000, + isTable: false, + table: { + width: 150 + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isForm: false, + isDetail: false, + isTableForm: false, + isTable: true, + 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')] + } + }, + }, + { + label: '供应商创建时间', + field: 'requestTime', + isTable: true, + sortTableDefault:1001, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + }, + // { + // label: '采购审批人', + // field: 'procurementCreatorName', + // sort: 'custom', + // table: { + // width: 180 + // }, + // isTable:true, + // isDetail: true, + // isTableForm: false, + // isForm:false, + // isSearch:false, + // sortTableDefault:10 + // }, + // { + // label: '采购审批人代码', + // field: 'procurementCreator', + // sortTableDefault:1002, + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false, + // isForm: false, + // }, + + { + label: '回转日期', + field: 'reversepostingdate', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:11, + }, + { + label: '说明',//回转说明 + field: 'tcCInvoiceRemark', + sortTableDefault:11, + table: { + width: 150 + }, + }, + { + label: '回转凭证号', + field: 'transferNumber', + sort: 'custom', + table: { + width: 200, + }, + sortTableDefault:11, + isTable:true, + isForm: false + }, + // { + // label: '冲销日记帐', + // field: 'reverseInvoiceJournal', + // sortTableDefault:11, + // table: { + // width: 150 + // }, + // }, + // { + // label: '调整账代码', + // field: 'adjustmentJournal', + // sortTableDefault:11, + // table: { + // width: 150 + // }, + // }, + + { + label: '采购审批时间', + field: 'procurementCreateTime', + sortTableDefault:11, + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form:{ + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss',//YYYY-MM-DD + valueFormat: 'x',//数据转成时间戳 + } + }, + sort: 'custom', + table: { + width: 180 + }, + isForm: false, + }, + { + label: '采购价格审批人', + field: 'procurementCreatorName', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:12, + isForm: false, + }, + { + label: '财务审批人', + field: 'financialCreatorName', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:12, + isForm: false, + }, + + { + label: '财务审批时间', + field: 'financialCreateTime', + sortTableDefault:13, + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form:{ + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss',//YYYY-MM-DD + valueFormat: 'x',//数据转成时间戳 + } + }, + sort: 'custom', + table: { + width: 180 + }, + isForm: false, + }, + // { + // label: '采购驳回原因', + // field: 'purchaseRejectCause', + // table: { + // width: 180 + // }, + // sortTableDefault:14, + // isTable: true, + // isSearch: false, + // isForm: false, + // isDetail:false, + // }, + // { + // label: '财务驳回原因', + // field: 'financeRejectCause', + // table: { + // width: 180 + // }, + // sortTableDefault:15, + // isTable: true, + // isSearch: false, + // isForm: false, + // isDetail:false, + // }, + { + label: '供应商审批人', + field: 'supplierCreatorName', + sort: 'custom', + isTable:false, + isTableForm:false, + table: { + width: 150 + }, + isForm: false, + }, + { + label: '供应商审批时间', + field: 'supplierCreateTime', + isTable:false, + isTableForm:false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isForm: false, + }, + { + label: '凭证描述', + field: 'voucherNumberRemark', + isTable:true, + isTableForm:false, + sort: 'custom', + table: { + width: 180 + }, + isForm: false, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 200, + fixed: 'right' + }, + } +])) +/** + * @returns {Array} 供应商发票在详情展示的主表字段 + */ +export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive([ + { + label: '汇总信息', + field: '', + sort: 'custom', + isForm: false, + isSearch: false, + isTable: false, + isDetail: true, + }, + { + label: '供应商信息', + field: '', + sort: 'custom', + isForm: false, + isSearch: false, + isTable: false, + isDetail: true, + }, + { + label: '价差', + field: '', + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: 'SCP系统数据', + field: '', + sort: 'custom', + isForm: false, + isSearch: false, + isTable: false, + isDetail: false, + }, + + { + label: '单据号', + field: 'number', + sort: 'custom', + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '系统未税金额', + field: 'purchaseAmountTotalMain', + formatter: accountantFormart, + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '财务凭证号', + field: 'voucherNumber', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '供应商名称', + field: 'supplierName', + sort: 'custom', + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '价差合计', + field: 'differencePriceTotalMain', + formatter: accountantFormart, + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '供应商创建时间', + field: 'requestTime', + sort: 'custom', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '订单类型', + field: 'orderType', + dictType: DICT_TYPE.PURCHASE_INVOICE_ORDER_TYPE, + dictClass: 'string', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '', + field: '', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.SUPPLIERINVOICE_REQUEST_STATUS, + dictClass: 'string', + sort: 'custom', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '发票号码', + field: 'goldenTaxInvoiceNumber', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + // { + // label: '尾差', + // field: 'totalDifference', + // sortTableDefault: 6, + // isForm: false, + // isTable: false, + // isSearch: false, + // isDetail: false, + // }, + { + label: '尾差', + field: '', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + + { + label: '采购价格审批人', + field: 'procurementCreatorName', + sortTableDefault: 1003, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '开票日期', + field: 'invoiceTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '供应商维护价税合计', + field: 'afterTaxAmount', + formatter: accountantFormart, + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '采购价格审批时间', + field: 'procurementCreateTime', + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sortTableDefault: 1003, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '税率(%)', + field: 'taxRate', + dictType: DICT_TYPE.TAX_RATE_DICT, + dictClass: 'string', + sortTableDefault: 3, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '供应商维护未税金额', + field: 'amount', + formatter: accountantFormart, + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '价差通过说明', + field: 'balanceStatement', + sort: 'custom', + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '发票价税合计', + field: 'adTaxAmount', + formatter: accountantFormart, + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '供应商维护税额', + field: 'taxAmount', + formatter: accountantFormart, + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '财务审批人', + field: 'financialCreatorName', + sort: 'custom', + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '发票未税金额', + field: 'beforeTaxAmount', + formatter: accountantFormart, + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '', + field: '', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '财务审批时间', + field: 'financialCreateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '发票税额', + field: 'totalTaxAmount', + formatter: accountantFormart, + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '价税合计尾差', + field: 'totalTaxDiffAmount', + formatter: accountantFormart, + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + detail:{ + slotFilter: true + } + }, + { + label: '财务过账日期', + field: 'postingDate', + isTable: true, + sortTableDefault: 15, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + + }, + { + label: '返利未税金额',//折扣金额 + field: 'discountAmount1', + formatter: accountantFormart, + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '未税尾差', + field: 'beforeTaxDiffAmount', + formatter: accountantFormart, + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + detail:{ + slotFilter: true + } + }, + { + label: '回转凭证号', + field: 'transferNumber', + sort: 'custom', + }, + { + label: '工厂地点', + field: 'siteId', + sort: 'custom', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '税额尾差', + field: 'taxAmountDiff', + formatter: accountantFormart, + + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + detail:{ + slotFilter: true + } + }, + + { + label: '回转日期', + field: 'reversepostingdate', + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + }, + { + label: '', + field: '', + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '', + field: '', + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '说明', //回转说明 + field: 'tcCInvoiceRemark', + }, + { + label: '', + field: '', + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '', + field: '', + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '参考凭证描述', + field: 'voucherNumberRemark', + sort: 'custom', + sortTableDefault: 6, + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + // detail:{ + // span:2 + // } + }, + { + label: '', + field: '', + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + { + label: '', + field: '', + isForm: false, + isTable: false, + isSearch: false, + isDetail: true, + }, + + +])) +//表单校验 +export const SupplierinvoiceRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + supplierCode: [ + { required: true, message: '请选择供应商代码', trigger: 'change' } + ], + outTransaction: [ + { required: true, message: '请输入出库事务类型', trigger: 'blur' } + ], + inTransaction: [ + { required: true, message: '请输入入库事务类型', trigger: 'blur' } + ], + executeTime: [ + { required: true, message: '请输入执行时间', trigger: 'blur' } + ], + activeDate: [ + { required: true, message: '请输入生效日期', trigger: 'blur' } + ], + available: [ + { required: true, message: '请输入是否可用', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + interfaceType: [ + { required: true, message: '请选择接口类型', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + requestTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 供应商发票记录子表 + */ +export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive([ + { + label: '项目编号', + field: 'projectCode', + isTable:false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '采购收货记录单号', + field: 'qadNumber', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '单据类型', + field: 'billType', + dictType: DICT_TYPE.BILL_TYPE, + dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:7, + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '待开票单据号', + field: 'recvBillNum', + table: { + width: 150 + }, + sortTableDefault:9, + form: { + componentProps: { + disabled: true + } + }, + tableForm:{ + disabled: true + } + }, + { + label: '单据号', + field: 'number', + hiddenInMain:true, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '供应商发货单号', + field: 'asnBillNum', + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault:8, + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + sortTableDefault:3, + table: { + width: 150 + }, + }, + { + label: '物料描述', + field: 'itemDesc', + table: { + width: 150 + }, + sortTableDefault:4, + isForm:false, + isTableForm:false, + isDetail: false, + isTable: true, + }, + { + label: '到货时间', + field: 'planArriveTime', + table: { + width: 150 + }, + formatter: dateFormatter2, + sortTableDefault:5, + isForm:false, + isTableForm:false, + isDetail: false, + isTable: true, + }, + { + label: '到货数量', + field: 'arrivalQty', + table: { + width: 150 + }, + sortTableDefault:6, + isForm:false, + isTableForm:false, + isDetail: false, + isTable: true, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '货币', + field: 'currency', + sort: 'custom', + dictType: DICT_TYPE.CURRENCY, + dictClass: 'string', + table: { + width: 150 + }, + tableForm:{ + type:'Select', + disabled: true + } + }, + { + label: '合同价格', + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '采购价格', + field: 'purchasePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '合同金额', + field: 'contractAmountTotal', + table: { + width: 150 + }, + isForm:false, + tableForm:{ + disabled: true + } + }, + { + label: '采购金额', + field: 'purchaseAmontTotal', + table: { + width: 150 + }, + isForm:false, + tableForm:{ + disabled: true + } + }, + { + label: '总差额', + field: 'differencePriceTotal', + table: { + width: 150 + }, + isForm:false, + tableForm:{ + disabled: true + } + }, + { + label: '单价差额', + field: 'differencePrice', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm:{ + type: 'slot', + disabled: true + } + }, + // { + // label: '未税差额', + // field: 'untaxedDifference', + // formatter: accountantFormart, + // table: { + // width: 150 + // }, + // form: { + // component: 'InputNumber', + // componentProps: { + // min: 0, + // precision: 6, + // } + // }, + // tableForm: { + // type: 'InputNumber', + // min: 0, + // precision: 6, + // } + // }, + // { + // label: '含税差额', + // field: 'taxInclusiveDifference', + // formatter: accountantFormart, + // table: { + // width: 150 + // }, + // form: { + // component: 'InputNumber', + // componentProps: { + // min: 0, + // precision: 6, + // } + // }, + // tableForm: { + // type: 'InputNumber', + // min: 0, + // precision: 6, + // } + // }, + { + label: '收货日期', + field: 'deliveryDate', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + } + }, + { + label: '开票数量', + field: 'invoicableQuantity', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '财务凭证号', + field: 'voucherNumber', + sort: 'custom', + table: { + width: 200 + } + }, + { + label: '参考凭证描述', + field: 'voucherNumberRemark', + sort: 'custom', + table: { + width: 150 + }, + }, +])) + +//表单校验 +export const SupplierinvoiceRecordDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请输入包装号', trigger: 'blur' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + poNumber: [ + { required: true, message: '请输入订单号', trigger: 'blur' } + ], + poLine: [ + { required: true, message: '请输入订单行', trigger: 'blur' } + ], + packQty: [ + { required: true, message: '请输入包装数量', trigger: 'blur' } + ], + packUnit: [ + { required: true, message: '请输入包装规格', trigger: 'blur' } + ], + convertRate: [ + { required: true, message: '请输入转换率', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请输入物料代码', trigger: 'blur' } + ], + requestTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + + +// 发票回转 +export const SupplierinvoiceRecordMainTransfer = useCrudSchemas(reactive([ + { + label: '冲销日记帐', + field: 'reverseInvoiceJournal', + form: { + componentProps: { + value:'APINVCOR', + disabled: true, + } + }, + }, + { + label: '调整账代码', + field: 'adjustmentJournal', + form: { + componentProps: { + value:'APADJ', + disabled: true, + } + }, + }, + { + label: '回转日期', + field: 'reversepostingdate', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault:11, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '说明', + field: 'tcCInvoiceRemark', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: true, + isDetail:false, + form: { + componentProps: { + type:"textarea", + maxlength:50, + showWordLimit:true + } + } + } +])) + + +//表单校验 +export const SupplierinvoiceRecordMainTransferRules = reactive({ + reversepostingdate: [ + { required: true, message: '请选择过账日期', trigger: 'change' } + ] +}) + diff --git a/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/supplierApbalanceMain.data.ts b/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/supplierApbalanceMain.data.ts index 8a4420f45..ab2dd008b 100644 --- a/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/supplierApbalanceMain.data.ts +++ b/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/supplierApbalanceMain.data.ts @@ -44,8 +44,8 @@ export const SupplierApbalanceMain = useCrudSchemas(reactive([ field: 'ttGltype', sort: 'custom', isSearch: true, - dictType: DICT_TYPE.TT_GLTYPE, - dictClass: 'string', + // dictType: DICT_TYPE.TT_GLTYPE, + // dictClass: 'string', }, { label: '类型固定值',