From 2c6677a0c00214fdba290b141fa31a6c62273e61 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Fri, 23 Feb 2024 16:55:33 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E5=8E=9F=E5=9B=A0=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../transferissue/transferissueRequestMain/index.vue | 4 ---- 1 file changed, 4 deletions(-) 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 } From 5814a1e64d20ffdf6b08dde893160bbbd2ca5104 Mon Sep 17 00:00:00 2001 From: chenfang Date: Fri, 23 Feb 2024 17:26:29 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E7=AD=9B=E9=80=89=E5=AF=BC=E5=87=BAapi?= =?UTF-8?q?=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/offlinesettlementRecordMain/index.ts | 8 ++++- .../wms/offlinesettlementRequestMain/index.ts | 8 ++++- .../wms/onlinesettlementRecordMain/index.ts | 8 ++++- .../wms/onlinesettlementRequestMain/index.ts | 8 ++++- src/api/wms/packageunit/index.ts | 8 ++++- .../itemManage/itembasic/itembasic.data.ts | 33 ------------------- 6 files changed, 35 insertions(+), 38 deletions(-) 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/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 From 470beca86e1988acc05fdb07711f5a07571c1679 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 26 Feb 2024 11:55:09 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E8=B0=83=E6=8B=A8=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8E=9F=E5=9B=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../transferissueJobMain.data.ts | 23 +++++++++++++++++++ .../transferissueRecordMain.data.ts | 23 +++++++++++++++++++ 2 files changed, 46 insertions(+) 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', From 137c827bf029905f4fbd5c6dcb61fefef1032f72 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 26 Feb 2024 13:12:54 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E5=8E=9F=E5=9B=A0=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../transferreceiptJobMain.data.ts | 23 +++++++++++++++++++ .../transferreceiptRecordMain.data.ts | 23 +++++++++++++++++++ .../transferreceiptRequestMain.data.ts | 22 ++++++++++++++++++ 3 files changed, 68 insertions(+) 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', From 19c1632084f2986d01a6eed68f7dab528382ea30 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 26 Feb 2024 14:29:16 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unplannedissueJobMain.data.ts | 15 +++++++++++++-- .../unplannedissueRecordMain.data.ts | 15 +++++++++++++-- .../unplannedissueRequestMain/index.vue | 14 ++++++++++++++ .../unplannedissueRequestMain.data.ts | 13 ++++++++++--- 4 files changed, 50 insertions(+), 7 deletions(-) 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 } }, { From 08060af301df07f95c92260f293cf97adfc5752f Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 26 Feb 2024 14:40:58 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unplannedreceiptJobMain.data.ts | 15 +++++++++++++-- .../unplannedreceiptRecordMain.data.ts | 15 +++++++++++++-- .../unplannedreceiptRequestMain/index.vue | 14 ++++++++++++++ .../unplannedreceiptRequestMain.data.ts | 13 ++++++++++--- 4 files changed, 50 insertions(+), 7 deletions(-) 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 } }, { From 47e91ab5d57c3641567d86e39b831c8e5acbf806 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 26 Feb 2024 15:04:17 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scrap/scrapJobMain/scrapJobMain.data.ts | 15 +++++++++++++-- .../scrap/scrapRecordMain/scrapRecordMain.data.ts | 15 +++++++++++++-- .../scrap/scrapRequestMain/index.vue | 14 ++++++++++++++ .../scrapRequestMain/scrapRequestMain.data.ts | 13 ++++++++++--- 4 files changed, 50 insertions(+), 7 deletions(-) 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 } }, { From d957c6e0fc790009823c51bb126fc59606b073a8 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 26 Feb 2024 15:42:41 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E5=8F=91=E8=B4=A7=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E5=8D=95=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliverRequestMain/index.vue | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index d0c354779..f5b2b3a02 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -264,7 +264,7 @@ const butttondata = (row) => { defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3','8']) }), // 单据打印 // 生成记录 { - label: '处理', + label: '发货', name: 'genRecords', hide: isShowMainButton(row, ['3']), type: 'primary', @@ -462,14 +462,28 @@ 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 => { + if(!res){ + message.success(t('处理成功!')) + // 单据打印 + handleDocumentPrint(id) + } + }) + // 刷新列表 + getList() + } + }).catch(err => { + console.log("自检报告校验异常",err) + }) } catch {}finally{ tableObject.loading = false } From 4009c183eb1d1f1881290028842e208a339d2045 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 26 Feb 2024 16:24:25 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8D=95?= =?UTF-8?q?=E6=8D=AE=E6=89=93=E5=8D=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliverRecordMain/index.vue | 14 +++++++++++++- .../supplierdeliverRecordMain.data.ts | 2 +- .../supplierdeliverRequestMain/index.vue | 10 ++++------ 3 files changed, 18 insertions(+), 8 deletions(-) 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 f5b2b3a02..9e4a2140c 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -261,7 +261,7 @@ 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: '发货', @@ -472,11 +472,9 @@ const genRecords = async (id: number) => { tableObject.loading = true // 发起处理 SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id).then(res => { - if(!res){ - message.success(t('处理成功!')) - // 单据打印 - handleDocumentPrint(id) - } + message.success(t('处理成功!')) + // 单据打印 + handleDocumentPrint(res) }) // 刷新列表 getList() From 6bd5cb2c3fd93c968870f8c1c78ec7210b4cbb81 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Tue, 27 Feb 2024 14:20:35 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=80=81=E8=BE=BE?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E5=AD=97=E6=AE=B5=E4=BF=AE=E6=94=B9=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=AA=97=E5=AD=97=E6=AE=B5=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/purchasePlanMain/index.ts | 5 ++ .../purchasePlanMain/index.vue | 23 +++++-- .../purchasePlanMain/purchasePlanMain.data.ts | 67 +++++++++++++------ 3 files changed, 72 insertions(+), 23 deletions(-) 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/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..10ff7a48c 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts @@ -48,14 +48,60 @@ export const PurchasePlanMain = useCrudSchemas(reactive([ } } }, + { + label: '送达日期', + field: 'deliveryDate', + table: { + width: 150 + }, + 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 +154,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', From af8a6177dd826d1f6739532ae98b626de12e1060 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Tue, 27 Feb 2024 14:51:13 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts index 10ff7a48c..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' @@ -54,6 +54,7 @@ export const PurchasePlanMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: dateFormatter2, form: { component: 'DatePicker', componentProps: { From daac3d26077d8b95ae6c0335d856ecbddc881d55 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Tue, 27 Feb 2024 16:03:22 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91?= =?UTF-8?q?=E8=B4=A7=E5=A2=9E=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliverRequestMain/index.vue | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 9e4a2140c..37a7cc94c 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 = [] } @@ -600,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