From 5e2996c9e53f125323042b7cb9c56d540d8075d8 Mon Sep 17 00:00:00 2001 From: weiwei Date: Tue, 25 Feb 2025 16:15:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E6=8A=BD=E5=B1=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supermarketerp/smErpInventoryRecords.ts | 1 + .../taskDrawer}/agree.vue | 0 src/components/taskDrawer/index.vue | 123 ++++++++++++++++++ .../taskDrawer}/refuse.vue | 0 .../taskDrawer}/transfer.vue | 0 src/components/taskDrawer/types.ts | 24 ++++ src/views/flow/task/handler/types.ts | 22 ---- src/views/flow/task/pending.vue | 113 +++------------- src/views/supermarket/smSpu/form.vue | 39 ++---- .../smErpCgPlan/cgPlanOption.vue | 1 + .../wallet/wallet-recharge-apply/index.vue | 34 +++++ 11 files changed, 207 insertions(+), 150 deletions(-) rename src/{views/flow/task/handler => components/taskDrawer}/agree.vue (100%) create mode 100644 src/components/taskDrawer/index.vue rename src/{views/flow/task/handler => components/taskDrawer}/refuse.vue (100%) rename src/{views/flow/task/handler => components/taskDrawer}/transfer.vue (100%) create mode 100644 src/components/taskDrawer/types.ts delete mode 100644 src/views/flow/task/handler/types.ts diff --git a/src/api/supermarketerp/smErpInventoryRecords.ts b/src/api/supermarketerp/smErpInventoryRecords.ts index 49db3e5..f1657a9 100644 --- a/src/api/supermarketerp/smErpInventoryRecords.ts +++ b/src/api/supermarketerp/smErpInventoryRecords.ts @@ -1,4 +1,5 @@ import request from "/@/utils/request" + export function fetchList(query?: Object) { return request({ url: "/supermarket/smErpInventoryRecords/page", diff --git a/src/views/flow/task/handler/agree.vue b/src/components/taskDrawer/agree.vue similarity index 100% rename from src/views/flow/task/handler/agree.vue rename to src/components/taskDrawer/agree.vue diff --git a/src/components/taskDrawer/index.vue b/src/components/taskDrawer/index.vue new file mode 100644 index 0000000..4279c3d --- /dev/null +++ b/src/components/taskDrawer/index.vue @@ -0,0 +1,123 @@ + + + diff --git a/src/views/flow/task/handler/refuse.vue b/src/components/taskDrawer/refuse.vue similarity index 100% rename from src/views/flow/task/handler/refuse.vue rename to src/components/taskDrawer/refuse.vue diff --git a/src/views/flow/task/handler/transfer.vue b/src/components/taskDrawer/transfer.vue similarity index 100% rename from src/views/flow/task/handler/transfer.vue rename to src/components/taskDrawer/transfer.vue diff --git a/src/components/taskDrawer/types.ts b/src/components/taskDrawer/types.ts new file mode 100644 index 0000000..50b91d3 --- /dev/null +++ b/src/components/taskDrawer/types.ts @@ -0,0 +1,24 @@ +// First let's create types for our form data +export interface FlowFormItem { + id: string + type: string + props: { + value: any + [key: string]: any + } +} + +export interface TaskData { + processName: string + taskId: string + processInstanceId: string + flowId: string +} + +export interface TaskSubmitParam { + paramMap: Record + taskId: string + taskLocalParamMap: { + approveDesc: string + } +} diff --git a/src/views/flow/task/handler/types.ts b/src/views/flow/task/handler/types.ts deleted file mode 100644 index 32cbeeb..0000000 --- a/src/views/flow/task/handler/types.ts +++ /dev/null @@ -1,22 +0,0 @@ -// First let's create types for our form data -export interface FlowFormItem { - id: string - type: string - props: { - value: any - [key: string]: any - } -} - -export interface TaskData { - taskId: string - nodeId: string -} - -export interface TaskSubmitParam { - paramMap: Record - taskId: string - taskLocalParamMap: { - approveDesc: string - } -} \ No newline at end of file diff --git a/src/views/flow/task/pending.vue b/src/views/flow/task/pending.vue index 5296a68..5c64ea4 100644 --- a/src/views/flow/task/pending.vue +++ b/src/views/flow/task/pending.vue @@ -52,73 +52,35 @@ - - - - - - - - - - - - - - - + + From 9ac9c0634c89858942ddcf5ff0914e01784f9784 Mon Sep 17 00:00:00 2001 From: weiwei Date: Tue, 25 Feb 2025 16:59:09 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/supermarketerp/common.ts | 4 +++- src/views/supermarketerp/smErpCgBack/smErpCgBackOption.vue | 4 ++-- src/views/supermarketerp/smErpCgDd/smErpCgDdOption.vue | 4 ++-- .../smErpInventoryRecords/smErpInventoryRecordsOption.vue | 4 ++-- .../supermarketerp/smErpRetailBack/smErpRetailBackOption.vue | 4 ++-- .../smErpRetailDelivery/smErpRetailDeliveryOption.vue | 4 ++-- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/api/supermarketerp/common.ts b/src/api/supermarketerp/common.ts index 115f4a2..6b212f1 100644 --- a/src/api/supermarketerp/common.ts +++ b/src/api/supermarketerp/common.ts @@ -4,7 +4,9 @@ import request from "/@/utils/request" // type:2 获取采购订单编号 // type:3 获取采购入库编号 // type:4 获取采购退货编号 -export function getPlanCode(params: { type: 1 | 2 | 3 | 4 }) { +// type:5 获取零售出库编号 +// type:4 获取零售退货编号 +export function getPlanCode(params: { type: 1 | 2 | 3 | 4 | 5 | 6 }) { return request({ url: "/supermarket/sm/common/getSequence", method: "get", diff --git a/src/views/supermarketerp/smErpCgBack/smErpCgBackOption.vue b/src/views/supermarketerp/smErpCgBack/smErpCgBackOption.vue index 68914b8..c5a2fd4 100644 --- a/src/views/supermarketerp/smErpCgBack/smErpCgBackOption.vue +++ b/src/views/supermarketerp/smErpCgBack/smErpCgBackOption.vue @@ -427,8 +427,8 @@ const cgPlanSpuItems = computed(() => { id: item.isNew ? undefined : item.id, erpSpuId: item.erpSpuId, quantity: item.quantity, - unitPrice: item.unitPrice ? Number(item.unitPrice) : 0, - totalAmount: Number(item.unitPrice || 0) * item.quantity, + unitPrice: item.purchasePrice ? Number(item.purchasePrice) : 0, + totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0, remark: item.remark, unitId: item.unitId, } diff --git a/src/views/supermarketerp/smErpCgDd/smErpCgDdOption.vue b/src/views/supermarketerp/smErpCgDd/smErpCgDdOption.vue index 5c8a31e..b5ee6b8 100644 --- a/src/views/supermarketerp/smErpCgDd/smErpCgDdOption.vue +++ b/src/views/supermarketerp/smErpCgDd/smErpCgDdOption.vue @@ -432,8 +432,8 @@ const cgPlanSpuItems = computed(() => { id: item.isNew ? undefined : item.id, erpSpuId: item.erpSpuId, quantity: item.quantity, - unitPrice: item.unitPrice ? Number(item.unitPrice) : 0, - totalAmount: Number(item.unitPrice || 0) * item.quantity, + unitPrice: item.purchasePrice ? Number(item.purchasePrice) : 0, + totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0, remark: item.remark, unitId: item.unitId, } diff --git a/src/views/supermarketerp/smErpInventoryRecords/smErpInventoryRecordsOption.vue b/src/views/supermarketerp/smErpInventoryRecords/smErpInventoryRecordsOption.vue index 95548a0..ea52fbe 100644 --- a/src/views/supermarketerp/smErpInventoryRecords/smErpInventoryRecordsOption.vue +++ b/src/views/supermarketerp/smErpInventoryRecords/smErpInventoryRecordsOption.vue @@ -431,8 +431,8 @@ const cgPlanSpuItems = computed(() => { id: item.isNew ? undefined : item.id, erpSpuId: item.erpSpuId, quantity: item.quantity, - unitPrice: item.unitPrice ? Number(item.unitPrice) : 0, - totalAmount: Number(item.unitPrice || 0) * item.quantity, + unitPrice: item.purchasePrice ? Number(item.purchasePrice) : 0, + totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0, remark: item.remark, unitId: item.unitId, } diff --git a/src/views/supermarketerp/smErpRetailBack/smErpRetailBackOption.vue b/src/views/supermarketerp/smErpRetailBack/smErpRetailBackOption.vue index 533a703..5b73e3c 100644 --- a/src/views/supermarketerp/smErpRetailBack/smErpRetailBackOption.vue +++ b/src/views/supermarketerp/smErpRetailBack/smErpRetailBackOption.vue @@ -469,8 +469,8 @@ const cgPlanSpuItems = computed(() => { id: item.isNew ? undefined : item.id, erpSpuId: item.erpSpuId, quantity: item.quantity, - unitPrice: item.unitPrice ? Number(item.unitPrice) : 0, - totalAmount: item.unitPrice ? Number(item.unitPrice) * item.quantity : 0, + unitPrice: item.purchasePrice ? Number(item.purchasePrice) : 0, + totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0, remark: item.remark, unitId: item.unitId, } diff --git a/src/views/supermarketerp/smErpRetailDelivery/smErpRetailDeliveryOption.vue b/src/views/supermarketerp/smErpRetailDelivery/smErpRetailDeliveryOption.vue index 77c024c..ed31e14 100644 --- a/src/views/supermarketerp/smErpRetailDelivery/smErpRetailDeliveryOption.vue +++ b/src/views/supermarketerp/smErpRetailDelivery/smErpRetailDeliveryOption.vue @@ -469,8 +469,8 @@ const cgPlanSpuItems = computed(() => { id: item.isNew ? undefined : item.id, erpSpuId: item.erpSpuId, quantity: item.quantity, - unitPrice: item.unitPrice ? Number(item.unitPrice) : 0, - totalAmount: item.unitPrice ? Number(item.unitPrice) * item.quantity : 0, + unitPrice: item.purchasePrice ? Number(item.purchasePrice) : 0, + totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0, remark: item.remark, unitId: item.unitId, }