diff --git a/src/api/wms/pickJobMain/index.ts b/src/api/wms/pickJobMain/index.ts index 20722e557..3cf2aa47f 100644 --- a/src/api/wms/pickJobMain/index.ts +++ b/src/api/wms/pickJobMain/index.ts @@ -75,7 +75,7 @@ export const exportPickJobMain = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/wms/pick-job-main/export-excel-senior', data }) + return await request.downloadPost({ url: '/wms/pick-job-main/export-excel-senior', data }) } else { return await request.download({ url: `/wms/pick-job-main/export-excel`, params }) } @@ -84,4 +84,4 @@ export const exportPickJobMain = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/pick-job-main/get-import-template' }) -} \ No newline at end of file +} diff --git a/src/api/wms/pickRecordMain/index.ts b/src/api/wms/pickRecordMain/index.ts index bf291181c..78e83914e 100644 --- a/src/api/wms/pickRecordMain/index.ts +++ b/src/api/wms/pickRecordMain/index.ts @@ -62,7 +62,7 @@ export const exportPickRecordMain = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/wms/pick-record-main/export-excel-senior', data }) + return await request.downloadPost({ url: '/wms/pick-record-main/export-excel-senior', data }) } else { return await request.download({ url: `/wms/pick-record-main/export-excel`, params }) } @@ -71,4 +71,4 @@ export const exportPickRecordMain = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/pick-record-main/get-import-template' }) -} \ No newline at end of file +} diff --git a/src/api/wms/plansetting/index.ts b/src/api/wms/plansetting/index.ts index 1b703dadc..07badf234 100644 --- a/src/api/wms/plansetting/index.ts +++ b/src/api/wms/plansetting/index.ts @@ -51,7 +51,7 @@ export const exportPlansetting = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/wms/plansetting/export-excel-senior', data }) + return await request.downloadPost({ url: '/wms/plansetting/export-excel-senior', data }) } else { return await request.download({ url: `/wms/plansetting/export-excel`, params }) } @@ -60,4 +60,4 @@ export const exportPlansetting = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/plansetting/get-import-template' }) -} \ No newline at end of file +} diff --git a/src/api/wms/purchasereceiptRequestDetail/index.ts b/src/api/wms/purchasereceiptRequestDetail/index.ts index 13ce13323..4d5789976 100644 --- a/src/api/wms/purchasereceiptRequestDetail/index.ts +++ b/src/api/wms/purchasereceiptRequestDetail/index.ts @@ -57,6 +57,18 @@ export const getPurchasereceiptRequestDetailPageSpare = async (params) => { } } + +// 查询M类型收货申请子列表 +export const getPurchasereceiptRequestDetailPageOrderMType = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchasereceipt-request-detail/seniorOrderMType', data }) + } else { + return await request.get({ url: `/wms/purchasereceipt-request-detail/pageOrderMType`, params }) + } +} + // 查询采购收货申请子详情 export const getPurchasereceiptRequestDetail = async (id: number) => { return await request.get({ url: `/wms/purchasereceipt-request-detail/get?id=` + id }) diff --git a/src/api/wms/scrapJobMain/index.ts b/src/api/wms/scrapJobMain/index.ts index e2cc48093..61a448a59 100644 --- a/src/api/wms/scrapJobMain/index.ts +++ b/src/api/wms/scrapJobMain/index.ts @@ -85,7 +85,7 @@ export const exportScrapJobMain = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/wms/scrap-job-main/export-excel-senior', data }) + return await request.downloadPost({ url: '/wms/scrap-job-main/export-excel-senior', data }) } else { return await request.download({ url: `/wms/scrap-job-main/export-excel`, params }) } @@ -94,4 +94,4 @@ export const exportScrapJobMain = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/scrap-job-main/get-import-template' }) -} \ No newline at end of file +} diff --git a/src/api/wms/stockupMainJob/index.ts b/src/api/wms/stockupMainJob/index.ts index b9dffb7ff..150609126 100644 --- a/src/api/wms/stockupMainJob/index.ts +++ b/src/api/wms/stockupMainJob/index.ts @@ -84,7 +84,7 @@ export const exportStockupMainJob = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/wms/stockup-main-job/export-excel-senior', data }) + return await request.downloadPost({ url: '/wms/stockup-main-job/export-excel-senior', data }) } else { return await request.download({ url: `/wms/stockup-main-job/export-excel`, params }) } @@ -113,4 +113,4 @@ export const closeStockupMainJob = async (id) => { // 执行发货任务主 export const executeStockupMainJob = async (data: StockupMainJobVO) => { return await request.put({ url: `/wms/stockup-main-job/execute`, data }) -} \ No newline at end of file +} diff --git a/src/api/wms/strategy/index.ts b/src/api/wms/strategy/index.ts index d10cd5108..bd26f0071 100644 --- a/src/api/wms/strategy/index.ts +++ b/src/api/wms/strategy/index.ts @@ -46,7 +46,7 @@ export const exportStrategy = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/wms/strategy/export-excel-senior', data }) + return await request.downloadPost({ url: '/wms/strategy/export-excel-senior', data }) } else { return await request.download({ url: `/wms/strategy/export-excel`, params }) } diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 854ededeb..2df16c7e7 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -494,7 +494,7 @@ watch(()=>props.tableData,() => { }) watch(()=>unref(formRef)?.formModel,() => { if(props?.sumFormDataByForm&&unref(formRef)?.formModel){ - props?.sumFormDataByForm(formRef,unref(formRef)?.formModel) + props?.sumFormDataByForm(formRef,unref(formRef)?.formModel,props.tableData) } },{ deep:true diff --git a/src/components/TableForm/src/TableForm.vue b/src/components/TableForm/src/TableForm.vue index c658bdbba..703f5f630 100644 --- a/src/components/TableForm/src/TableForm.vue +++ b/src/components/TableForm/src/TableForm.vue @@ -316,7 +316,7 @@ - { const currentPage =ref(1) const pageSize = ref(10) const showTableData = ()=>{ - console.log('props.tableData',props.tableData) - if(props.tableData.length>100){ + if(props.tableData.length>10){ return props.tableData.slice((currentPage.value-1)*pageSize.value,currentPage.value*pageSize.value) }else{ return props.tableData diff --git a/src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts b/src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts index 4071a1df5..fd38865bb 100644 --- a/src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts +++ b/src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts @@ -783,8 +783,7 @@ export const CountPlanDetailRules = reactive({ { required: true, message: '请选择盘点范围类型', trigger: 'change' } ], value: [ - { required: true, message: '请选择盘点范围值', trigger: ['blur','change'] }, - { max: 50, message: '不得超过50个字符', trigger: ['blur','change'] } + { required: true, message: '请选择盘点范围值', trigger: ['blur','change'] } ], }) /** @@ -830,4 +829,4 @@ export const CountPlanMain1 = useCrudSchemas(reactive([ } } }, -])) \ No newline at end of file +])) diff --git a/src/views/wms/issueManage/issue/issueRequestMain/index.vue b/src/views/wms/issueManage/issue/issueRequestMain/index.vue index f71bba7c9..df3aa6188 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRequestMain/index.vue @@ -207,7 +207,7 @@ const butttondata = (row,$index) => { defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:issue-request-main:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:issue-request-main:refused'}), // 驳回 defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:issue-request-main:handle'}), // 审批通过 - defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']), hasPermi:'wms:issue-request-main:update'}), // 处理 + defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3','7']), hasPermi:'wms:issue-request-main:update'}), // 处理 defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:issue-request-main:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({hasPermi:'wms:issue-request-main:delete'}), // 删除 ] diff --git a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts index f5c3345d5..701d7a9ce 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts +++ b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts @@ -764,6 +764,7 @@ export const IssueRequestDetail = useCrudSchemas(reactive([ } } }, + { label: '备注', field: 'remark', @@ -930,6 +931,19 @@ export const IssueRequestDetail = useCrudSchemas(reactive([ isTableForm: false, isForm: false }, + { + label: '未执行任务数量', + field: 'unexecutedQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + isTableForm:false, + hiddenInMain:true, + }, { label: '操作', field: 'action', diff --git a/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue index 6ba1e2d00..b8f15698c 100644 --- a/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue @@ -227,14 +227,14 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { const BASE_URL = getJmreportBaseUrl() const src = ref(BASE_URL + '/jmreport/view/965858364788637696?token=' + getAccessToken()) const handleDocumentPrint = async (row) => { - window.open(src.value+'&id='+row.masterId) + window.open(src.value+'&type=predict'+'&id='+row.masterId) } /** * 待处理全部打印 */ const handleDocumentPrintAll = async () => { - window.open(src.value+'&id=printAllPending') + window.open(src.value+'&type=predict'+'&id=printAllPending') } /** 导出按钮操作 */ diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue index af130fef1..a7ba72a23 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue @@ -73,6 +73,9 @@ import * as ProductputawayJobMainApi from '@/api/wms/productputawayJobMain' import * as ProductputawayJobDetailApi from '@/api/wms/productputawayJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import * as SwitchApi from '@/api/wms/switch' +import {getAccessToken} from "@/utils/auth"; +import { getJmreportBaseUrl } from '@/utils/systemParam' // 装配制品上架任务主 defineOptions({ name: 'ProductputawayJobMain' }) @@ -114,13 +117,40 @@ const { tableObject, tableMethods } = useTable({ // 获得表格的各种操作 const { getList, setSearchParams } = tableMethods +const switchproductPutawayJobPrint = ref(false) +const getSwitchStatus = async ()=>{ + let res = await SwitchApi.getSwitchPage({ + pageSize: 20, + pageNo: 1, + code: 'productPutawayJobPrint' + }) + console.log('getSwitchStatus',res) + if(res&&res.list){ + switchproductPutawayJobPrint.value = res.list[0].effectiveSetValue == 'TRUE' + + } +} + // 列表头部按钮 -const HeadButttondata = [ +const HeadButttondata = computed(()=>{ + return [ defaultButtons.defaultExportBtn({hasPermi:'wms:productputaway-job-main:export'}), // 导出 + { + label: '待处理状态全部打印', + name: 'printAllPending', + hide: !switchproductPutawayJobPrint.value, + type: 'primary', + icon: '', + color: '', + hasPermi: '' + }, defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 -] +]}) + + + // 头部按钮事件 const buttonBaseClick = (val, item) => { @@ -134,6 +164,9 @@ const buttonBaseClick = (val, item) => { } else { getList() } + } else if(val == 'printAllPending'){ + // 单据打印 + handleDocumentPrintAll() } else if (val == 'filtrate') { // 筛选 } else { // 其他按钮 console.log('其他按钮', item) @@ -156,6 +189,7 @@ const butttondata = (row,$index) => { return [] } return [ + defaultButtons.mainListDocumentPrintBtn({hide:!switchproductPutawayJobPrint.value}), // 单据打印 defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭 defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 @@ -166,75 +200,7 @@ const butttondata = (row,$index) => { // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'mainJobExe') { // 执行 - let aaa = { - "id": "1809190000111838147", - "requestNumber": "REC4620231214-0004", - "supplierCode": null, - "fromWarehouseCode": "W1", - "toWarehouseCode": null, - "fromAreaCodes": "", - "toAreaCodes": "", - "fromAreaTypes": "WIP,RAW", - "toAreaTypes": "SEMI,FG", - "completetime": 1702545291000, - "requestTime": 1702524283000, - "requestDueTime": 1689562428000, - "status": "2", - "expiredTime": null, - "updateTime": 1702545291000, - "updater": "1", - "jobStageStatus": null, - "priority": null, - "priorityIncrement": null, - "departmentCode": "103", - "acceptUserId": "1", - "acceptTime": 1702552206000, - "completeUserId": null, - "number": "JOB2220231214-0007", - "businessType": "ProductPutaway", - "remark": "111100", - "createTime": 1702545291000, - "creator": "1", - "autoComplete": "FALSE", - "allowModifyLocation": "FALSE", - "allowModifyQty": "TRUE", - "allowBiggerQty": "TRUE", - "allowSmallerQty": "TRUE", - "allowModifyInventoryStatus": "TRUE", - "allowContinuousScanning": "TRUE", - "allowPartialComplete": "TRUE", - "allowModifyBatch": "FALSE", - "allowModifyPackingNumber": "FALSE", - "inInventoryStatuses": "OK", - "outInventoryStatuses": "OK", - subList: [ - { - "id": "1809190001814017359", - "packingNumber": "12", - "containerNumber": "001", - "batch": "21", - "inventoryStatus": "OK", - "poNumber": null, - "poLine": "item01", - "fromLocationCode": "H03", - "toLocationCode": "L-R-001-002-1-02", - "itemCode": "item01", - "itemName": "物料01", - "itemDesc1": "", - "itemDesc2": "", - "projectCode": "xm01", - "qty": 3, - "uom": "EA", - "number": "JOB2220231214-0007", - "remark": "00", - "createTime": 1702545291000, - "creator": "1", - "fromOwnerCode": null, - "toOwnerCode": null -} - ] - } - ProductputawayJobMainApi.executeProductputawayMain(aaa) + // ProductputawayJobMainApi.executeProductputawayMain(aaa) } else if (val == 'mainJobAba') { // 放弃 await ProductputawayJobMainApi.abandonProductputawayMain(row.masterId) getList() @@ -244,8 +210,26 @@ const buttonTableClick = async (val, row) => { } else if (val == 'mainJobAcc') { // 承接 await ProductputawayJobMainApi.acceptProductputawayMain(row.masterId) getList() + }else if (val == 'documentPrint') { + // 单据打印 + handleDocumentPrint(row) } } + + +const BASE_URL = getJmreportBaseUrl() +const src = ref(BASE_URL + '/jmreport/view/965858364788637696?token=' + getAccessToken()) +const handleDocumentPrint = async (row) => { + window.open(src.value+'&type=assemble'+'&id='+row.masterId) +} + +/** + * 待处理全部打印 + */ +const handleDocumentPrintAll = async () => { + window.open(src.value+'&type=assemble'+'&id=printAllPending') +} + // 获取部门 用于详情 部门回显 const { wsCache } = useCache() /** 详情操作 */ @@ -283,6 +267,7 @@ const searchFormClick = (searchData) => { /** 初始化 **/ onMounted(async () => { + await getSwitchStatus() getList() }) diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/productputawayAssembleJobMain.data.ts b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/productputawayAssembleJobMain.data.ts index 2531a7bc4..ed167fa55 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/productputawayAssembleJobMain.data.ts +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/productputawayAssembleJobMain.data.ts @@ -545,7 +545,7 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ isDetail: false, isForm: false, table: { - width: 150, + width: 300, fixed: 'right' }, } diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts index b5e393dce..aec14295a 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts @@ -552,7 +552,7 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( isDetail: false, isForm: false, table: { - width: 300, + width: 400, fixed: 'right' }, } diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue new file mode 100644 index 000000000..f93c5f128 --- /dev/null +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue @@ -0,0 +1,795 @@ + + + diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/purchasereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/purchasereceiptRequestMain.data.ts new file mode 100644 index 000000000..2a7c4a340 --- /dev/null +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/purchasereceiptRequestMain.data.ts @@ -0,0 +1,2479 @@ +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: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + sortSearchDefault:1, + isForm: false, + isSearch: true, + }, + { + label: 'M型采购订单号', + 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.getPurchaseDetailPageWMS, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'status', + value:'2', + message: '已发布状态', + isMainValue: false + }, + { + key: 'status', // 查询列表中字段 + value: '2', // 指查询具体值 + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 + },{ + key: 'po_line_type', // 查询列表中字段 + value: 'M', // 指查询具体值 + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 + }] + } + }, + isForm: true, + }, + { + label: '发货单号', + field: 'asnNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch:true, + sortSearchDefault:3, + isForm: true, + sortTableDefault:2 + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + sortTableDefault:1, + table: { + width: 150 + }, + isSearch: true, + sortSearchDefault:2, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled: true, + isSearchList: false, // 开启查询弹窗 + searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '供应商信息', // 查询弹窗标题 + searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 + searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法 + } + } + }, + // { + // label: '要货计划单号', + // field: 'ppNumber', + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择要货计划单号', // 输入框占位文本 + // searchField: 'number', // 查询弹窗赋值字段 + // searchTitle: '要货计划信息', // 查询弹窗标题 + // searchAllSchemas: PurchasePlanMain.allSchemas, // 查询弹窗所需类 + // searchPage: PurchasePlanMainApi.getPurchasePlanMainPage, // 查询弹窗所需分页方法 + // searchCondition: [ + // { + // key: 'supplierCode', + // value: 'supplierCode', + // message: '请填写供应商代码!', + // isMainValue: true + // }, + // { + // key: 'status', + // value: 4, + // isMainValue: false + // }, + // { + // key: 'available', + // value: "TRUE", + // isMainValue: false + // }] + // } + // }, + // isForm: true, + // }, + { + label: '承运商', + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '运输方式', + field: 'transferMode', + dictType: DICT_TYPE.TRANSFER_MODE, + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + }, + { + label: '车牌号', + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数据来源', + field: 'sourceType', + dictType: DICT_TYPE.PURCHASERECEIPT_SOURCE_TYPE, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: 'ASN_ExternalReceipt', + componentProps: { + disabled: true + } + }, + isSearch: true, + }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + isTable:false, + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + isTable:false, + table: { + width: 150 + }, + isForm: 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 + }, + isForm: false, + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + isTable: false, + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + isTable: false, + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到月台代码', + field: 'toDockCode', + sort: 'custom', + isTable: false, + table: { + width: 150 + }, + isForm: false, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + isTable: false, + table: { + width: 150 + }, + form: { + value: 'PurchaseReceipt', + componentProps: { + disabled: true + } + }, + isForm: false, + }, + { + 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', + } + } + }, + { + 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: '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 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: {width:'100%'}, + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // }, + // { + // label: '部门', + // field: 'departmentCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // 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: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: false, + isTable: true, + sortTableDefault:3, + isForm:false, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm:false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'FALSE', + 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: 'FALSE', + 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: 'FALSE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true, + } + } + }, + { + label: '直接生成记录', + field: 'directCreateRecord', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isForm: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: "TRUE", + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + } + } + }, + { + label: '标签状态', + field: 'labelStatus', + sort: 'custom', + dictType: DICT_TYPE.LABEL_STATUS, + dictClass: 'string', + table: { + width: 150 + }, + isForm: false, + isTable: false, + isSearch: false, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 400, + fixed: 'right' + }, + } +])) + +//表单校验 +export const PurchasereceiptRequestMainRules = reactive({ + ppNumber: [ + { required: true, message: '请输入采购订单', trigger: 'blur' } + ], + supplierCode: [ + { required: true, message: '请输入供应商代码', trigger: 'blur' } + ], + toWarehouseCode: [ + { required: true, message: '请输入到仓库代码', trigger: 'blur' } + ], + toAreaTypes: [ + { required: true, message: '请输入到库区类型范围', trigger: 'blur' } + ], + 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 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.getPurchaseDetailPageWMS, + searchCondition: [ + { + key:'number', + value:'poNumber', + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isFormModel:true, + 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.getPurchaseDetailPageWMS, + 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: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:7, + isTableForm: false, + isForm: false + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:7, + hiddenInMain:true, + isTableForm: false, + isForm: false + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:7, + hiddenInMain:true, + isTableForm: false, + isForm: false + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain:true, + isTable:false, + isTableForm: false, + isForm: false + }, + // { + // label: '数量', + // field: 'qty', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'InputNumber', + // componentProps: { + // min: 1, + // precision: 6 + // }, + // }, + // tableForm: { + // type: 'InputNumber', + // min: 1, + // precision: 6 + // } + // }, + { + label: '订单数量', + field: 'orderQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + }, + }, + sortTableDefault:9, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 + } + }, + { + label: '收货数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:9, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + }, + }, + tableForm: { + type: 'InputNumber', + min: 1, + 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: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + hiddenInMain:true, + sortTableDefault:11, + isForm: false + }, + { + label: '包装规格', + field: 'packUnit', + dictClass: 'string', + isTable: true, + isTableForm: false, + sort: 'custom', + table: { + width: 150, + componentProps: { + disabled: true + } + }, + sortTableDefault:11, + tableForm:{ + disabled:true + }, + isForm: true + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:11, + 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: { + 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: false, + isForm: true + }, + { + label: '到库位代码', + field: 'defaultToLocationCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:13, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + isTableForm: true, + isForm: false + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:13, + hiddenInMain:true, + isTableForm: false, + isForm: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:13, + hiddenInMain:true, + isTableForm: false, + isForm: false + }, + { + label: '供应商计量数量', + field: 'supplierPackQty', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:13, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + }, + }, + hiddenInMain:true, + isTableForm: false, + isForm: false + }, + { + label: '供应商计量单位', + field: 'supplierPackUnit', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:13, + hiddenInMain:true, + isTableForm: false, + isForm: false, + tableForm: { + type: 'Select' + } + }, + { + label: '转换率', + field: 'convertRate', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:13, + hiddenInMain:true, + form: { + component: 'InputNumber', + componentProps: { + min: 0 + }, + }, + isTableForm: false, + isForm: false + }, + // { + // 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 + }, + 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', + }, + }, + { + 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', + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + sortTableDefault:8, + table: { + width: 150 + }, + tableForm:{ + disabled: true + } + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + sortTableDefault:11, + table: { + width: 180 + }, + isTable:true, + 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 + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:12, + hiddenInMain:true, + isTableForm: false, + isForm: false, + tableForm: { + type: 'Select' + } + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:12, + isTableForm: false, + isForm: false + }, + + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain:true, + isTableForm: false, + isForm: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain:true, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, + + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain:true, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain:true, + isTableForm: false, + isForm: false + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain:true, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTableForm: false, + isForm: false + }, + { + label: '操作', + hiddenInMain:true, + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:false, + } +])) + +//表单校验 +export const PurchasereceiptRequestDetailRules = reactive({ + 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: 'blur' } + ], + 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/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index e22d13671..e3dd21a14 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -821,6 +821,7 @@ const formLabelRef = ref() const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({ getListApi: SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage }) +detatableData.pageSize = 500 const { getList:getDetailList } = detatableMethods