diff --git a/src/api/wms/offlinesettlementRecordMain/index.ts b/src/api/wms/offlinesettlementRecordMain/index.ts index f93eabe92..da771ba9a 100644 --- a/src/api/wms/offlinesettlementRecordMain/index.ts +++ b/src/api/wms/offlinesettlementRecordMain/index.ts @@ -53,7 +53,13 @@ export const deleteOfflinesettlementRecordMain = async (id: number) => { // 导出下线结算记录主 Excel export const exportOfflinesettlementRecordMain = async (params) => { - return await request.download({ url: `/wms/offlinesettlement-record-main/export-excel`, params }) + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/offlinesettlement-record-main/export-excel-senior', data }) + } else { + return await request.download({ url: `/wms/offlinesettlement-record-main/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/wms/offlinesettlementRequestMain/index.ts b/src/api/wms/offlinesettlementRequestMain/index.ts index ccdeb8d2d..0dcbb20bc 100644 --- a/src/api/wms/offlinesettlementRequestMain/index.ts +++ b/src/api/wms/offlinesettlementRequestMain/index.ts @@ -53,7 +53,13 @@ export const deleteOfflinesettlementRequestMain = async (id: number) => { // 导出下线结算申请主 Excel export const exportOfflinesettlementRequestMain = async (params) => { - return await request.download({ url: `/wms/offlinesettlement-request-main/export-excel`, params }) + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/offlinesettlement-request-main/export-excel-senior', data }) + } else { + return await request.download({ url: `/wms/offlinesettlement-request-main/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/wms/onlinesettlementRecordMain/index.ts b/src/api/wms/onlinesettlementRecordMain/index.ts index bacbd72d4..31018c0e9 100644 --- a/src/api/wms/onlinesettlementRecordMain/index.ts +++ b/src/api/wms/onlinesettlementRecordMain/index.ts @@ -53,7 +53,13 @@ export const deleteOnlinesettlementRecordMain = async (id: number) => { // 导出上线结算记录主 Excel export const exportOnlinesettlementRecordMain = async (params) => { - return await request.download({ url: `/wms/onlinesettlement-record-main/export-excel`, params }) + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/onlinesettlement-record-main/export-excel-senior', data }) + } else { + return await request.download({ url: `/wms/onlinesettlement-record-main/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/wms/onlinesettlementRequestMain/index.ts b/src/api/wms/onlinesettlementRequestMain/index.ts index 119078788..6f6238f40 100644 --- a/src/api/wms/onlinesettlementRequestMain/index.ts +++ b/src/api/wms/onlinesettlementRequestMain/index.ts @@ -53,7 +53,13 @@ export const deleteOnlinesettlementRequestMain = async (id: number) => { // 导出上线结算申请主 Excel export const exportOnlinesettlementRequestMain = async (params) => { - return await request.download({ url: `/wms/onlinesettlement-request-main/export-excel`, params }) + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/onlinesettlement-request-main/export-excel-senior', data }) + } else { + return await request.download({ url: `/wms/onlinesettlement-request-main/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/wms/packageunit/index.ts b/src/api/wms/packageunit/index.ts index df62a5c11..ae9b04f92 100644 --- a/src/api/wms/packageunit/index.ts +++ b/src/api/wms/packageunit/index.ts @@ -56,7 +56,13 @@ export const deletePackageunit = async (id: number) => { // 导出物品包装规格信息 Excel export const exportPackageunit = async (params) => { - return await request.download({ url: `/wms/packageunit/export-excel`, params }) + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/packageunit/export-excel-senior', data }) + } else { + return await request.download({ url: `/wms/packageunit/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/wms/purchasePlanMain/index.ts b/src/api/wms/purchasePlanMain/index.ts index 614cd6a95..167e3ffd6 100644 --- a/src/api/wms/purchasePlanMain/index.ts +++ b/src/api/wms/purchasePlanMain/index.ts @@ -90,3 +90,8 @@ export const exportPurchasePlanMain = async (params) => { export const importTemplate = () => { return request.download({ url: '/wms/purchase-plan-main/get-import-template' }) } + +// 查询要货计划策略根据供应商 +export const queryPurchasePlan = async (supplierCode: string) => { + return await request.get({ url: `/wms/purchase-plan-main/queryPurchasePlan?supplierCode=` + supplierCode }) +} \ No newline at end of file diff --git a/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts b/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts index 9f2d10efa..c5e1778db 100644 --- a/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts @@ -438,14 +438,6 @@ export const rules = reactive({ { required: true, message: '请输入名称', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' }, ], - desc1: [ - { required: true, message: '请输入描述1', trigger: 'blur' }, - { max: 50, message: '不得超过50个字符', trigger: 'blur' }, - ], - desc2: [ - { required: true, message: '请输入描述2', trigger: 'blur' }, - { max: 50, message: '不得超过50个字符', trigger: 'blur' }, - ], status: [ { required: true, message: '请选择状态', trigger: 'change' }, ], @@ -479,36 +471,11 @@ export const rules = reactive({ type: [ { required: true, message: '请选择类型', trigger: 'change' }, ], - category: [ - { required: true, message: '请选择种类', trigger: 'change' }, - ], - itemGroup: [ - { required: true, message: '请选择分组', trigger: 'change' }, - ], - color: [ - { required: true, message: '请选择颜色', trigger: 'change' }, - ], - configuration: [ - { required: true, message: '请选择配置', trigger: 'change' }, - ], - project: [ - { required: true, message: '请输入项目', trigger: 'blur' }, - { max: 50, message: '不得超过50个字符', trigger: 'blur' }, - ], - eqLevel: [ - { required: true, message: '请选择质量等级', trigger: 'change' }, - ], validityDays: [ { required: true, message: '请输入有效天数', trigger: 'change' }, ], available: [ { required: true, message: '请选择是否可用', trigger: 'change' }, ], - activeTime: [ - { required: true, message: '请输入生效时间', trigger: 'change' }, - ], - expireTime: [ - { required: true, message: '请输入失效时间', trigger: 'change' }, - ], }) console.log(Itembasic) \ No newline at end of file diff --git a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts index c4e907bdf..c616db448 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import { TableColumn } from '@/types/table' /** * @returns {Array} 报废出库任务主表 @@ -668,11 +669,21 @@ export const ScrapJobDetail = useCrudSchemas(reactive([ field: 'reason', dictType: DICT_TYPE.SCRAP_REASON, dictClass: 'string', - isTable: true, - sort: 'custom', + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return cellValue + }, table: { width: 150 }, + form: { + componentProps: { + filterable: true + } + }, + tableForm: { + type: 'Select', + filterable: true + } }, { label: '货主代码', diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts index 598e17e16..7d8ae6095 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import { TableColumn } from '@/types/table' /** * @returns {Array} 报废出库记录主表 @@ -409,11 +410,21 @@ export const ScrapRecordDetail = useCrudSchemas(reactive([ field: 'reason', dictType: DICT_TYPE.SCRAP_REASON, dictClass: 'string', - isTable: true, - sort: 'custom', + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return cellValue + }, table: { width: 150 }, + form: { + componentProps: { + filterable: true + } + }, + tableForm: { + type: 'Select', + filterable: true + } }, { label: '单价', diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue index 40519f859..aa9d8e2e9 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue @@ -54,6 +54,7 @@ @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" + @tableFormSelectOnBlur="tableFormSelectOnBlur" /> @@ -70,6 +71,7 @@ :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" :detailValidate="detailValidate" + @onBlur="onBlur" /> @@ -444,6 +446,18 @@ const searchFormClick = (searchData) => { getList() // 刷新当前列表 } +const onBlur = (field, e) => { + if (field == 'reason') { + detailRef.value.formRef.formRef.formModel[field] = e.target.value + } +} + +const tableFormSelectOnBlur = (field, val, row, index) => { + if (field == 'reason') { + tableData.value[index][field] = val.target.value + } +} + /** 初始化 **/ onMounted(async () => { getList() diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts index 69b788290..7246c6242 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts @@ -584,13 +584,20 @@ export const ScrapRequestDetail = useCrudSchemas(reactive([ field: 'reason', dictType: DICT_TYPE.SCRAP_REASON, dictClass: 'string', - isTable: true, - sort: 'custom', + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return cellValue + }, table: { width: 150 }, + form: { + componentProps: { + filterable: true + } + }, tableForm: { - type: 'Select' + type: 'Select', + filterable: true } }, { diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/transferissueJobMain.data.ts b/src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/transferissueJobMain.data.ts index 19cb9e853..8a96b382a 100644 --- a/src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/transferissueJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/transferissueJobMain.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import { TableColumn } from '@/types/table' /** * @returns {Array} 调拨出库任务主表 @@ -761,6 +762,28 @@ export const TransferissueJobDetail = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '原因', + field: 'reason', + sort: 'custom', + dictType: DICT_TYPE.TRANSFER_REASON, + dictClass: 'string', + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return cellValue + }, + table: { + width: 150 + }, + form: { + componentProps: { + filterable: true + } + }, + tableForm: { + type: 'Select', + filterable: true + } + }, { label: '备注', field: 'remark', diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/transferissueRecordMain.data.ts b/src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/transferissueRecordMain.data.ts index 38617f65b..7e996b6eb 100644 --- a/src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/transferissueRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/transferissueRecordMain.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import { TableColumn } from '@/types/table' /** * @returns {Array} 调拨出库记录主表 @@ -608,6 +609,28 @@ export const TransferissueRecordDetail = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '原因', + field: 'reason', + sort: 'custom', + dictType: DICT_TYPE.TRANSFER_REASON, + dictClass: 'string', + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return cellValue + }, + table: { + width: 150 + }, + form: { + componentProps: { + filterable: true + } + }, + tableForm: { + type: 'Select', + filterable: true + } + }, // { // label: '代码', // field: 'code', diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue index aba5da784..d9d57d8c4 100644 --- a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue @@ -317,16 +317,12 @@ const handleHandle = async (id: number) => { } const onBlur = (field, e) => { - console.log('字段', field) - console.log('失焦后值', e.target.value) if (field == 'reason') { detailRef.value.formRef.formRef.formModel[field] = e.target.value } } const tableFormSelectOnBlur = (field, val, row, index) => { - // console.log('字段', field) - // console.log('失焦后值', val.target.value) if (field == 'reason') { tableData.value[index][field] = val.target.value } diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts index cf4bbc1ca..7e5236aff 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import { TableColumn } from '@/types/table' /** * @returns {Array} 调拨入库任务主表 @@ -753,6 +754,28 @@ export const TransferreceiptJobDetail = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '原因', + field: 'reason', + sort: 'custom', + dictType: DICT_TYPE.TRANSFER_REASON, + dictClass: 'string', + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return cellValue + }, + table: { + width: 150 + }, + form: { + componentProps: { + filterable: true + } + }, + tableForm: { + type: 'Select', + filterable: true + } + }, { label: '备注', field: 'remark', diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts index c21ac2380..290ae7d95 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import { TableColumn } from '@/types/table' /** * @returns {Array} 调拨入库记录主表 @@ -524,6 +525,28 @@ export const TransferreceiptRecordDetail = useCrudSchemas(reactive width: 150 }, }, + { + label: '原因', + field: 'reason', + sort: 'custom', + dictType: DICT_TYPE.TRANSFER_REASON, + dictClass: 'string', + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return cellValue + }, + table: { + width: 150 + }, + form: { + componentProps: { + filterable: true + } + }, + tableForm: { + type: 'Select', + filterable: true + } + }, { label: '从库位组代码', field: 'fromLocationGroupCode', diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts index a1035cc7d..4b3a27e5b 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts @@ -567,6 +567,28 @@ export const TransferreceiptRequestDetail = useCrudSchemas(reactive { + return cellValue + }, + table: { + width: 150 + }, + form: { + componentProps: { + filterable: true + } + }, + tableForm: { + type: 'Select', + filterable: true + } + }, { label: '备注', field: 'remark', diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts index 9f2668ef9..96c9e6e94 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import { TableColumn } from '@/types/table' /** * @returns {Array} 计划外出库任务主表 @@ -669,11 +670,21 @@ export const UnplannedissueJobDetail = useCrudSchemas(reactive([ field: 'reason', dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON, dictClass: 'string', - isTable: true, - sort: 'custom', + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return cellValue + }, table: { width: 150 }, + form: { + componentProps: { + filterable: true + } + }, + tableForm: { + type: 'Select', + filterable: true + } }, { label: '货主代码', diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts index 9635f4391..783a7594e 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import { TableColumn } from '@/types/table' /** * @returns {Array} 计划外出库记录主表 @@ -443,11 +444,21 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( field: 'reason', dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON, dictClass: 'string', - isTable: true, - sort: 'custom', + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return cellValue + }, table: { width: 150 }, + form: { + componentProps: { + filterable: true + } + }, + tableForm: { + type: 'Select', + filterable: true + } }, { label: '货主代码', diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue index c477ec814..fcefc2809 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue @@ -54,6 +54,7 @@ @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" + @tableFormSelectOnBlur="tableFormSelectOnBlur" /> @@ -70,6 +71,7 @@ :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" :detailValidate="detailValidate" + @onBlur="onBlur" /> @@ -400,6 +402,18 @@ const submitForm = async (formType, data) => { } } +const onBlur = (field, e) => { + if (field == 'reason') { + detailRef.value.formRef.formRef.formModel[field] = e.target.value + } +} + +const tableFormSelectOnBlur = (field, val, row, index) => { + if (field == 'reason') { + tableData.value[index][field] = val.target.value + } +} + // 子表新增/编辑校验 const detailValidate = (data) => { let tag = false; diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts index 9acae343f..e12e112c3 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts @@ -515,13 +515,20 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive field: 'reason', dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON, dictClass: 'string', - isTable: true, - sort: 'custom', + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return cellValue + }, table: { width: 150 }, + form: { + componentProps: { + filterable: true + } + }, tableForm: { - type: 'Select' + type: 'Select', + filterable: true } }, { diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts index 999ad81c7..167feec0e 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import { TableColumn } from '@/types/table' /** * @returns {Array} 计划外入库任务主表 @@ -699,11 +700,21 @@ export const UnplannedreceiptJobDetail = useCrudSchemas(reactive([ field: 'reason', dictType: DICT_TYPE.UNPLANNED_RECEIPT_REASON, dictClass: 'string', - isTable: true, - sort: 'custom', + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return cellValue + }, table: { width: 150 }, + form: { + componentProps: { + filterable: true + } + }, + tableForm: { + type: 'Select', + filterable: true + } }, { label: '货主代码', diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts index d2b9f57b7..afcc31947 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import { TableColumn } from '@/types/table' /** * @returns {Array} 计划外入库记录主表 @@ -514,11 +515,21 @@ export const UnplannedreceiptRecordDetail = useCrudSchemas(reactive { + return cellValue + }, table: { width: 150 }, + form: { + componentProps: { + filterable: true + } + }, + tableForm: { + type: 'Select', + filterable: true + } }, { label: '货主代码', diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index 983eb7684..05319c4c8 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -55,6 +55,7 @@ @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" @inputNumberChange="inputNumberChange" + @tableFormSelectOnBlur="tableFormSelectOnBlur" /> @@ -72,6 +73,7 @@ @searchTableSuccessDetail="searchTableSuccessDetail" :detailValidate="detailValidate" @detailBasicFormOnChange="qtyOnChange" + @onBlur="onBlur" /> @@ -634,6 +636,18 @@ const qtyOnChange = (field,val) =>{ } } +const onBlur = (field, e) => { + if (field == 'reason') { + detailRef.value.formRef.formRef.formModel[field] = e.target.value + } +} + +const tableFormSelectOnBlur = (field, val, row, index) => { + if (field == 'reason') { + tableData.value[index][field] = val.target.value + } +} + /** 初始化 **/ onMounted(async () => { getList() diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index 0997c043f..902bad166 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -745,13 +745,20 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive { + return cellValue + }, table: { width: 150 }, + form: { + componentProps: { + filterable: true + } + }, tableForm: { - type: 'Select' + type: 'Select', + filterable: true } }, { diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue index 856b77acc..157816868 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue @@ -27,9 +27,12 @@ - { + let beginTime = res.beginTime + var ms = beginTime.substring(0, 2) + var me = beginTime.substring(3) + setV['beginTime'] = new Date(2024, 1, 1, Number(ms), Number(me)) + let endTime = res.endTime + var ms = endTime.substring(0, 2) + var me = endTime.substring(3) + setV['endTime'] = new Date(2024, 1, 1, Number(ms), Number(me)) + }) + } if (formField == 'poLine') { setV['itemCode'] = val[0]['itemCode'] setV['uom'] = val[0]['uom'] diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts index a7cdca71d..45cc14d71 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts @@ -1,5 +1,5 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter } from '@/utils/formatTime' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import * as SupplierApi from '@/api/wms/supplier' import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' import * as PurchaseMainApi from '@/api/wms/purchaseMain' @@ -48,14 +48,61 @@ export const PurchasePlanMain = useCrudSchemas(reactive([ } } }, + { + label: '送达日期', + field: 'deliveryDate', + table: { + width: 150 + }, + formatter: dateFormatter2, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + }, { label: '时间窗口', field: 'timeWindow', + table: { + width: 150 + }, + isForm: false + }, + { + label: '开始时间', + field: 'beginTime', sort: 'custom', table: { width: 150 }, - isForm: false, + form:{ + component:"TimePicker", + componentProps: { + format:"HH:mm", + } + } + }, + { + label: '结束时间', + field: 'endTime', + sort: 'custom', + table: { + width: 150 + }, + form:{ + component:"TimePicker", + componentProps: { + format:"HH:mm", + } + } }, { label: '仓库代码', @@ -108,24 +155,7 @@ export const PurchasePlanMain = useCrudSchemas(reactive([ } } }, - { - label: '开始时间', - field: 'beginTime', - sort: 'custom', - table: { - width: 150 - }, - isForm: false, - }, - { - label: '结束时间', - field: 'endTime', - sort: 'custom', - table: { - width: 150 - }, - isForm: false, - }, + { label: '自动发布', field: 'autoPublish', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue index 081ffc15d..65c78e8bb 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue @@ -66,6 +66,7 @@ import { SupplierdeliverRecordMain,SupplierdeliverRecordMainRules,Supplierdelive import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain' import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' +import { getAccessToken } from '@/utils/auth' // 供应商发货记录主 defineOptions({ name: 'SupplierdeliverRecordMain' }) @@ -128,13 +129,17 @@ const buttonBaseClick = (val, item) => { const butttondata = (row) => { return [ defaultButtons.mainListGenerateApplicationBtn({hasPermi:'wms:supplierdeliver-record-main:createPurchasereceiptRequest',hide:!row.purchasereceiptRequestFlag}), // 生成采购申请 - ] + defaultButtons.mainListDocumentPrintBtn({}) // 单据打印 + ] } // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if(val == 'generateApplication'){ handlerCreatePurchasereceiptRequest(row.number) + }else if (val == 'documentPrint') { + // 单据打印 + handleDocumentPrint(row.id) } } @@ -151,6 +156,13 @@ const handlerCreatePurchasereceiptRequest = async (number:string) => { } } +// 单据打印 +const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL +const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken()) +const handleDocumentPrint = async (id) => { + window.open(documentSrc.value + '&id=' + id) +} + /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts index 3e55ba2bd..3410ecdf4 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts @@ -327,7 +327,7 @@ export const SupplierdeliverRecordMain = useCrudSchemas(reactive([ isDetail: false, isForm: false, table: { - width: 160, + width: 300, fixed: 'right' }, } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 0032683d2..f9912cbae 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -105,7 +105,7 @@ import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequest import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import point from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/point.vue' -import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain' +import { formatDate } from '@/utils/formatTime' // 供应商发货申请 defineOptions({ name: 'SupplierdeliverRequestMain' }) @@ -123,6 +123,7 @@ const updataTableColumns = (val) => { tableColumns.value = val } +const planArriveTimeStr = ref() // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { nextTick(() => { @@ -144,6 +145,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => const setV = {} setV[formField] = val[0][searchField] if(formField == 'ppNumber'){ + // 设置计划到货时间 + let beginTime = val[0]['endTime'] + let deliveryDate = formatDate(val[0]['deliveryDate'],'YYYY-MM-DD') + planArriveTimeStr.value = deliveryDate + ' '+ beginTime+":00" + setV['planArriveTime']= new Date(planArriveTimeStr.value) // 清空子表数据 tableData.value = [] } @@ -261,10 +267,10 @@ const butttondata = (row) => { link: true // 文本展现按钮 }, defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3','8']) }), // 标签打印 - defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3','8']) }), // 单据打印 + //defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3','8']) }), // 单据打印 // 生成记录 { - label: '处理', + label: '发货', name: 'genRecords', hide: isShowMainButton(row, ['3']), type: 'primary', @@ -462,14 +468,26 @@ const handleTur = async (id: number) => { /** 处理按钮操作 */ const genRecords = async (id: number) => { try { - // 处理的二次确认 - await message.confirm('是否处理所选中数据?') - tableObject.loading = true - // 发起处理 - await SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id) - message.success(t('处理成功!')) - // 刷新列表 - await getList() + await SupplierdeliverRequestMainApi.selfCheckReport(id).then(res => { + if(!res){ + message.warning("请先上传自检报告!") + return + }else{ + // 处理的二次确认 + message.confirm('是否处理所选中数据?') + tableObject.loading = true + // 发起处理 + SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id).then(res => { + message.success(t('处理成功!')) + // 单据打印 + handleDocumentPrint(res) + }) + // 刷新列表 + getList() + } + }).catch(err => { + console.log("自检报告校验异常",err) + }) } catch {}finally{ tableObject.loading = false } @@ -588,6 +606,23 @@ const submitForm = async (formType, data) => { } try { if (formType === 'create') { + let planArriveStr = formatDate(data.planArriveTime); + if(planArriveStr > planArriveTimeStr.value){ + let confirmFlag = false; + await message.confirm("计划到货时间大于要货计划送达日期是否继续?").then(() => { + console.log("选择了OK") + //选择OK + }).catch(() => { + //选择取消 + console.log("选择了cancel") + confirmFlag = true; + formRef.value.formLoading = false + return; + }) + if(confirmFlag){ + return; + } + } if(tableData.value.length <= 0){ message.warning(`子表明细不能为空!`) formRef.value.formLoading = false