From 662d1fc8e15761cb3a93796ca47fcb392929f88b Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Fri, 28 Jun 2024 14:46:17 +0800 Subject: [PATCH 1/7] =?UTF-8?q?M=E7=B1=BB=E5=9E=8B=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E6=94=B6=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchasereceiptRecordMain/index.vue | 2 +- .../purchasereceiptRequestMain/index.vue | 2 ++ .../index.vue | 26 ++++++++++--------- .../purchasereceiptRequestMain.data.ts | 4 +-- .../sparereceiptRequestMain/index.vue | 2 ++ 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue index 869231e59..f32d747da 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue @@ -173,7 +173,7 @@ const butttondata = (row,$index) => { return [ defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请 defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),// 生成采购上架申请 - defaultButtons.mainListPlanCheckQualityReportBtn({}), // 查看质检报告 + defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), // 查看质检报告 ] } diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue index 0f8416636..27b1a655d 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue @@ -729,9 +729,11 @@ const submitForm = async (formType, submitData) => { data.subList = tableData.value // 拼接子表数据参数 try { if (formType === 'create') { + data.orderTypeM='1'; await PurchasereceiptRequestMainApi.createPurchasereceiptRequestMain(data) message.success(t('common.createSuccess')) } else { + data.orderTypeM='1'; await PurchasereceiptRequestMainApi.updatePurchasereceiptRequestMain(data) message.success(t('common.updateSuccess')) } diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue index f93c5f128..8863f857d 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue @@ -353,20 +353,20 @@ const butttondata = (row,$index) => { defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:refused'}), // 驳回 defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:agree'}), // 审批通过 // defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:update'}), // 编辑 - { - label: '生成标签', - name: 'ssbq', - hide: isASNShowMainButton(row, ['3']), - type: 'primary', - icon: '', - color: '', - hasPermi: '', - link: true // 文本展现按钮 - }, - defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','8']) }), // 标签打印 + // { + // label: '生成标签', + // name: 'ssbq', + // hide: isASNShowMainButton(row, ['3']), + // type: 'primary', + // icon: '', + // color: '', + // hasPermi: '', + // link: true // 文本展现按钮 + // }, + // defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','8']) }), // 标签打印 defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), // 处理 defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), // 关闭 - defaultButtons.mainListPlanCheckQualityReportBtn({}), // 查看质检报告 + // defaultButtons.mainListPlanCheckQualityReportBtn({}), // 查看质检报告 ] } @@ -729,9 +729,11 @@ const submitForm = async (formType, submitData) => { data.subList = tableData.value // 拼接子表数据参数 try { if (formType === 'create') { + data.orderTypeM='2'; await PurchasereceiptRequestMainApi.createPurchasereceiptRequestMain(data) message.success(t('common.createSuccess')) } else { + data.orderTypeM='2'; await PurchasereceiptRequestMainApi.updatePurchasereceiptRequestMain(data) message.success(t('common.updateSuccess')) } diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/purchasereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/purchasereceiptRequestMain.data.ts index 2a7c4a340..5a46ecd78 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/purchasereceiptRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/purchasereceiptRequestMain.data.ts @@ -535,6 +535,7 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( componentProps: { inactiveValue: 'FALSE', activeValue: 'TRUE', + disabled:true } } }, @@ -589,9 +590,6 @@ export const PurchasereceiptRequestMainRules = reactive({ autoExecute: [ { required: true, message: '请选择是否自动执行', trigger: 'change' } ], - directCreateRecord: [ - { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } - ], businessType: [ { required: true, message: '请输入业务类型', trigger: 'blur' } ], diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue index f79b3655e..45c2359b6 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue @@ -590,9 +590,11 @@ const submitForm = async (formType, submitData) => { data.subList = tableData.value // 拼接子表数据参数 try { if (formType === 'create') { + data.orderTypeM='1'; await PurchasereceiptRequestMainApi.createPurchasereceiptRequestMainSpare(data) message.success(t('common.createSuccess')) } else { + data.orderTypeM='1'; await PurchasereceiptRequestMainApi.updatePurchasereceiptRequestMain(data) message.success(t('common.updateSuccess')) } From 753739ce057b63425ad6bb74f7149646644d4d0f Mon Sep 17 00:00:00 2001 From: TengXF <302828528@qq.com> Date: Fri, 28 Jun 2024 14:50:09 +0800 Subject: [PATCH 2/7] =?UTF-8?q?WMS=E5=88=97=E8=A1=A8=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../issueRequestMain/issueRequestMain.data.ts | 4 +- .../productdismantleRecordMain.data.ts | 4 +- .../productionMain/productionMain.data.ts | 23 +++++----- .../productionMainAssemble.data.ts | 23 +++++----- .../productionMainAssembleSparePart.data.ts | 23 +++++----- .../productionMainPredictSparePart.data.ts | 23 +++++----- .../qadProductionPlanMain.data.ts | 31 +++++++++++++ .../productreceiptRecordMain.data.ts | 8 ++-- .../productreceiptAssembleRecordMain.data.ts | 4 +- .../productreceiptscrapRecordMain.data.ts | 8 ++-- .../productredressJobMain.data.ts | 4 +- .../productredressRecordMain.data.ts | 4 +- .../productredressRequestMain.data.ts | 4 +- .../productrepairRequestMain.data.ts | 4 +- .../purchasereturnRequestMain.data.ts | 46 +++++++++---------- 15 files changed, 124 insertions(+), 89 deletions(-) diff --git a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts index 2c3743059..4a7479093 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts +++ b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts @@ -745,7 +745,7 @@ export const IssueRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, - isSearch: true, + isSearch: false, isTable:false, sortSearchDefault:6, sortTableDefault:1100, @@ -864,7 +864,7 @@ export const IssueRequestDetail = useCrudSchemas(reactive([ } } }, - + { label: '备注', field: 'remark', diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRecordMain/productdismantleRecordMain.data.ts b/src/views/wms/productionManage/productdismantle/productdismantleRecordMain/productdismantleRecordMain.data.ts index 75e6b0954..c4ec4ac11 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRecordMain/productdismantleRecordMain.data.ts +++ b/src/views/wms/productionManage/productdismantle/productdismantleRecordMain/productdismantleRecordMain.data.ts @@ -190,7 +190,7 @@ export const ProductdismantleRecordMain = useCrudSchemas(reactive( label: '创建者', field: 'creator', sort: 'custom', - isTable: true, + isTable: false, table: { width: 150 }, @@ -206,7 +206,7 @@ export const ProductdismantleRecordMain = useCrudSchemas(reactive( table: { width: 180 }, - isTable: true, + isTable: false, form: { component: 'DatePicker', componentProps: { diff --git a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts index 8919838d3..abb9a9833 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts @@ -204,17 +204,17 @@ export const ProductionMain = useCrudSchemas(reactive([ } } }, - { - label: '物料代码', - field: 'detailItemCode', - sort: 'custom', - isSearch: true, - table: { - width: 150 - }, - isTable: false, - isForm: false - }, + // { + // label: '物料代码', + // field: 'detailItemCode', + // sort: 'custom', + // isSearch: true, + // table: { + // width: 150 + // }, + // isTable: false, + // isForm: false + // }, { label: '计划数量', field: 'detailPlanQty', @@ -610,6 +610,7 @@ export const ProductionDetail = useCrudSchemas(reactive([ label: '物料代码', field: 'itemCode', sort: 'custom', + isSearch: true, table: { width: 150 }, diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts index 7ef13b457..345ed64c1 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts @@ -195,17 +195,17 @@ export const ProductionMain = useCrudSchemas(reactive([ } } }, - { - label: '物料代码', - field: 'detailItemCode', - sort: 'custom', - isSearch: true, - table: { - width: 150 - }, - isTable: false, - isForm: false - }, + // { + // label: '物料代码', + // field: 'detailItemCode', + // sort: 'custom', + // isSearch: true, + // table: { + // width: 150 + // }, + // isTable: false, + // isForm: false + // }, { label: '计划数量', field: 'detailPlanQty', @@ -601,6 +601,7 @@ export const ProductionDetail = useCrudSchemas(reactive([ label: '物料代码', field: 'itemCode', sort: 'custom', + isSearch: true, table: { width: 150 }, diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts index fb83717e3..7b01b6b20 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts @@ -195,17 +195,17 @@ export const ProductionMain = useCrudSchemas(reactive([ } } }, - { - label: '物料代码', - field: 'detailItemCode', - sort: 'custom', - isSearch: true, - table: { - width: 150 - }, - isTable: false, - isForm: false - }, + // { + // label: '物料代码', + // field: 'detailItemCode', + // sort: 'custom', + // isSearch: true, + // table: { + // width: 150 + // }, + // isTable: false, + // isForm: false + // }, { label: '计划数量', field: 'detailPlanQty', @@ -601,6 +601,7 @@ export const ProductionDetail = useCrudSchemas(reactive([ label: '物料代码', field: 'itemCode', sort: 'custom', + isSearch: true, table: { width: 150 }, diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts index 652609905..4ad8db37b 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts @@ -196,17 +196,17 @@ export const ProductionMain = useCrudSchemas(reactive([ } }, - { - label: '物料代码', - field: 'detailItemCode', - sort: 'custom', - isSearch: true, - table: { - width: 150 - }, - isTable: false, - isForm: false - }, + // { + // label: '物料代码', + // field: 'detailItemCode', + // sort: 'custom', + // isSearch: true, + // table: { + // width: 150 + // }, + // isTable: false, + // isForm: false + // }, { label: '计划数量', field: 'detailPlanQty', @@ -602,6 +602,7 @@ export const ProductionDetail = useCrudSchemas(reactive([ label: '物料代码', field: 'itemCode', sort: 'custom', + isSearch: true, table: { width: 150 }, diff --git a/src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts b/src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts index 93884b7a8..e9de6fa60 100644 --- a/src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts +++ b/src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter2 } from '@/utils/formatTime' +import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const QadProductionPlanMainRules = reactive({ @@ -71,6 +72,36 @@ export const QadProductionPlanMain = useCrudSchemas(reactive([ component: 'SelectV2' }, }, + { + 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: 'remark', diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts index fcbbb78e5..7253d12da 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts +++ b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts @@ -229,7 +229,7 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive([ table: { width: 150 }, - isTable: true, + isTable: false, }, { label: '创建时间', @@ -238,7 +238,7 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive([ detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - isTable: true, + isTable: false, sort: 'custom', table: { width: 180 @@ -671,7 +671,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive( table: { width: 180 }, - isTable: false, + isTable: true, form: { component: 'DatePicker', componentProps: { @@ -688,7 +688,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive( table: { width: 150 }, - isTable: false, + isTable: true, }, // { // label: '任务明细ID', diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts index 2c9ade555..f447fd858 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts @@ -676,7 +676,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive( table: { width: 180 }, - isTable: false, + isTable: true, form: { component: 'DatePicker', componentProps: { @@ -693,7 +693,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive( table: { width: 150 }, - isTable: false, + isTable: true, }, // { // label: '任务明细ID', diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptscrapRecordMain.data.ts b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptscrapRecordMain.data.ts index 26ad1fd50..745ceb9fb 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptscrapRecordMain.data.ts +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptscrapRecordMain.data.ts @@ -217,7 +217,7 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive([ table: { width: 150 }, - isTable: true, + isTable: false, }, { label: '创建时间', @@ -230,7 +230,7 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive([ table: { width: 180 }, - isTable: true, + isTable: false, form: { component: 'DatePicker', componentProps: { @@ -665,7 +665,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive( table: { width: 180 }, - isTable: false, + isTable: true, form: { component: 'DatePicker', componentProps: { @@ -682,7 +682,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive( table: { width: 150 }, - isTable: false, + isTable: true, }, // { diff --git a/src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts b/src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts index 7f65ffdc9..e797d3192 100644 --- a/src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts +++ b/src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts @@ -659,7 +659,7 @@ export const ProductredressJobDetail = useCrudSchemas(reactive([ table: { width: 150 }, - isTable:false, + isTable:true, hiddenInMain:true, }, { @@ -673,7 +673,7 @@ export const ProductredressJobDetail = useCrudSchemas(reactive([ table: { width: 180 }, - isTable:false, + isTable:true, hiddenInMain:true, form: { component: 'DatePicker', diff --git a/src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts b/src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts index 6f5459c3d..43672b0b5 100644 --- a/src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts +++ b/src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts @@ -568,7 +568,7 @@ export const ProductredressRecordDetail = useCrudSchemas(reactive( table: { width: 150 }, - isTable:false, + isTable:true, hiddenInMain: true, }, { @@ -592,7 +592,7 @@ export const ProductredressRecordDetail = useCrudSchemas(reactive( } }, isForm: false, - isTable:false, + isTable:true, hiddenInMain: true, }, { diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts b/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts index 038b6e892..eab66118f 100644 --- a/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts +++ b/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts @@ -575,7 +575,7 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive }, isTableForm: false, isForm: false, - isTable:false, + isTable:true, hiddenInMain:true }, { @@ -589,7 +589,7 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive table: { width: 180 }, - isTable:false, + isTable:true, hiddenInMain:true, form: { component: 'DatePicker', diff --git a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts index 7c7f9db37..45a183c70 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts +++ b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts @@ -809,7 +809,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive width: 180 }, hiddenInMain: true, - isTable: false, + isTable: true, form: { component: 'DatePicker', componentProps: { @@ -830,7 +830,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive width: 150 }, hiddenInMain: true, - isTable: false, + isTable: true, isTableForm: false, isForm: false }, diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts index a4eb4c14b..1358415e2 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts @@ -1279,29 +1279,29 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive isTableForm:false, isForm:false }, - { - label: '接口类型', - field: 'interfaceType', - dictType: DICT_TYPE.INTERFACE_TYPE, - dictClass: 'string', - isSearch: true, - isTable: true, - hiddenInMain: true, - sort: 'custom', - table: { - width: 150 - }, - tableForm:{ - disabled:true - }, - isForm:false, - isTableForm:false, - form: { - componentProps:{ - disabled:true - } - }, - }, + // { + // label: '接口类型', + // field: 'interfaceType', + // dictType: DICT_TYPE.INTERFACE_TYPE, + // dictClass: 'string', + // isSearch: true, + // isTable: true, + // hiddenInMain: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm:{ + // disabled:true + // }, + // isForm:false, + // isTableForm:false, + // form: { + // componentProps:{ + // disabled:true + // } + // }, + // }, { label: '备注', field: 'remark', From f562aacf2137e986f515cda283ec2f5b4e61ab44 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Fri, 28 Jun 2024 15:05:34 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/supplierinvoiceRequestMain/index.ts | 5 ++ src/components/BasicForm/src/BasicForm.vue | 9 +++- .../supplierinvoiceRequestMain/index.vue | 53 ++++++++++++++----- 3 files changed, 53 insertions(+), 14 deletions(-) diff --git a/src/api/wms/supplierinvoiceRequestMain/index.ts b/src/api/wms/supplierinvoiceRequestMain/index.ts index 5358945de..338cd176e 100644 --- a/src/api/wms/supplierinvoiceRequestMain/index.ts +++ b/src/api/wms/supplierinvoiceRequestMain/index.ts @@ -147,3 +147,8 @@ export const getLoginUserRoleList = async () => { } +// 编辑的时候计算主表系统税额 +export const getTaxAmount = async ({id,taxRate}) => { + return await request.get({ url: `/wms/supplierinvoice-request-main/computeById?id=${id}&taxRate=${taxRate}`}) + +} \ No newline at end of file diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 82c91d1c7..5444c2218 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -500,9 +500,13 @@ let originFormModel = {} const updateOriginFormModel = (data)=>{ originFormModel = JSON.parse(JSON.stringify(data)) } +const sumFormDataHandle1 = ()=>{ + emit('sumFormDataHandle',formRef,unref(formRef)?.formModel,props.tableData,formType.value,originFormModel,updateOriginFormModel) +} + watch(()=>unref(formRef)?.formModel,async () => { if(props?.sumFormDataByForm&&unref(formRef)?.formModel){ - props?.sumFormDataByForm(formRef,unref(formRef)?.formModel,props.tableData,formType.value,originFormModel,updateOriginFormModel) + props?.sumFormDataByForm(formRef,unref(formRef)?.formModel,props.tableData,formType.value,originFormModel,updateOriginFormModel,sumFormDataHandle1) } },{ deep:true @@ -678,7 +682,8 @@ const emit = defineEmits([ 'formFormDateChange', 'footButtonClick', 'clearSearchInput', - 'clearInput' + 'clearInput', + 'sumFormDataHandle' ]) //普通下拉改变事件 const formSelectChange = (field, val, row) => { diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index 77de5e34e..a43eff0e3 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -53,26 +53,42 @@ :tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas" :tableFormRules="SupplierinvoiceRequestDetailRules" :tableData="tableData" - :sumFormDataByForm ="(formRef,formModel,tableData,formType,originFormModel,updateOriginFormModel)=>{ - const {taxRate=0,amount=0,taxAmount=0,beforeTaxAmount=0,totalTaxAmount=0,discountAmount1=0,beforeTaxDiffAmount=0,taxAmountDiff=0} = formModel + :sumFormDataByForm ="(formRef,formModel,tableData,formType,originFormModel,updateOriginFormModel,sumFormDataHandle1)=>{ + const {taxRate=0,amount=0,taxAmount=0,beforeTaxAmount=0,totalTaxAmount=0,discountAmount1=0,beforeTaxDiffAmount=0,taxAmountDiff=0} = formModel // 2、系统税额:每条数据的合同价格X可开票数量,计算结果取两位小数之后*税率的计算结果,再保留2位。所有子表数据再求和 - let taxAmount_ = 0.00 if(formType=='update'){ // 编辑 - taxAmount_ = taxAmount + console.log('taxRate',taxRate) + console.log('originFormModel',originFormModel.taxRate) + console.log('taxAmount',taxAmount) + if(taxRate!=originFormModel.taxRate){ + if(originFormModel){ + sumFormDataHandle1() + } + updateOriginFormModel(formModel) + } + formRef.value.setValues({ + afterTaxAmount:amount+taxAmount, // 3、系统价税合计:系统未税金额+系统税额 + adTaxAmount:beforeTaxAmount+totalTaxAmount, //6、价税合计金额:未税金额+税额 + beforeTaxDiffAmount:beforeTaxAmount-amount-discountAmount1,//未税差额:未税金额-系统未税金额-折扣金额 + taxAmountDiff:totalTaxAmount-taxAmount,// 税额差异:税额-系统税额 + totalTaxDiffAmount:beforeTaxDiffAmount+taxAmountDiff // 价税合计差额=未税差额+税额差异 + }) }else if(formType=='create'){ // 新增 + let taxAmount_ = taxAmount if(taxRate!=originFormModel.taxRate){ taxAmount_ = tableData.reduce((prev, item) => prev + Number(Number(taxRate*0.01*Number(Number(item['singlePrice']*item['invoicableQuantity']).toFixed(2))).toFixed(2)),0) updateOriginFormModel(formModel) } + formRef.value.setValues({ + taxAmount:taxAmount_, + afterTaxAmount:amount+taxAmount, // 3、系统价税合计:系统未税金额+系统税额 + adTaxAmount:beforeTaxAmount+totalTaxAmount, //6、价税合计金额:未税金额+税额 + beforeTaxDiffAmount:beforeTaxAmount-amount-discountAmount1,//未税差额:未税金额-系统未税金额-折扣金额 + taxAmountDiff:totalTaxAmount-taxAmount,// 税额差异:税额-系统税额 + totalTaxDiffAmount:beforeTaxDiffAmount+taxAmountDiff // 价税合计差额=未税差额+税额差异 + }) } - formRef.value.setValues({ - taxAmount:taxAmount_, - afterTaxAmount:amount+taxAmount, // 3、系统价税合计:系统未税金额+系统税额 - adTaxAmount:beforeTaxAmount+totalTaxAmount, //6、价税合计金额:未税金额+税额 - beforeTaxDiffAmount:beforeTaxAmount-amount-discountAmount1,//未税差额:未税金额-系统未税金额-折扣金额 - taxAmountDiff:totalTaxAmount-taxAmount,// 税额差异:税额-系统税额 - totalTaxDiffAmount:beforeTaxDiffAmount+taxAmountDiff // 价税合计差额=未税差额+税额差异 - }) + }" :sumFormDataByTableCustom ="(formRef,formModel,tableData)=>{ @@ -92,6 +108,7 @@ @tableSelectionDelete="tableSelectionDelete" @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" + @sumFormDataHandle="sumFormDataHandle" >