From 80e29b5edac8792cd009437e9a222309b3b4c7c5 Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 7 Mar 2025 10:40:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E5=A4=8D=E5=92=8C?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/supermarketerp/common.ts | 2 +- .../purchaseManagement/smErpCgBack/form.vue | 8 ++--- .../purchaseManagement/smErpCgDd/form.vue | 8 ++--- .../smErpCgInventory/form.vue | 8 ++--- .../retailManagement/smErpRetailBack/form.vue | 19 ++++------- .../smErpRetailDelivery/form.vue | 19 ++++------- .../supermarketerp/supermarketSpu/form.vue | 32 ++++++++++--------- 7 files changed, 42 insertions(+), 54 deletions(-) diff --git a/src/api/supermarketerp/common.ts b/src/api/supermarketerp/common.ts index ec46887..aa14def 100644 --- a/src/api/supermarketerp/common.ts +++ b/src/api/supermarketerp/common.ts @@ -34,7 +34,7 @@ export function getErpSpuSimpleAll() { // 获取出入库订单列表 export function getCgInventoryPage(params?: Object) { return request({ - url: "/smErpInventoryRecords/inventory/page", + url: "/supermarket/smErpInventoryRecords/inventory/page", method: "get", params, }) diff --git a/src/views/supermarketerp/purchaseManagement/smErpCgBack/form.vue b/src/views/supermarketerp/purchaseManagement/smErpCgBack/form.vue index 620ae91..3e410da 100644 --- a/src/views/supermarketerp/purchaseManagement/smErpCgBack/form.vue +++ b/src/views/supermarketerp/purchaseManagement/smErpCgBack/form.vue @@ -115,18 +115,18 @@ diff --git a/src/views/supermarketerp/purchaseManagement/smErpCgDd/form.vue b/src/views/supermarketerp/purchaseManagement/smErpCgDd/form.vue index 41cabb0..f64c235 100644 --- a/src/views/supermarketerp/purchaseManagement/smErpCgDd/form.vue +++ b/src/views/supermarketerp/purchaseManagement/smErpCgDd/form.vue @@ -115,18 +115,18 @@ diff --git a/src/views/supermarketerp/purchaseManagement/smErpCgInventory/form.vue b/src/views/supermarketerp/purchaseManagement/smErpCgInventory/form.vue index 7d997db..0052482 100644 --- a/src/views/supermarketerp/purchaseManagement/smErpCgInventory/form.vue +++ b/src/views/supermarketerp/purchaseManagement/smErpCgInventory/form.vue @@ -120,18 +120,18 @@ diff --git a/src/views/supermarketerp/retailManagement/smErpRetailBack/form.vue b/src/views/supermarketerp/retailManagement/smErpRetailBack/form.vue index a815e64..69ab7e6 100644 --- a/src/views/supermarketerp/retailManagement/smErpRetailBack/form.vue +++ b/src/views/supermarketerp/retailManagement/smErpRetailBack/form.vue @@ -125,20 +125,18 @@ @@ -153,19 +151,14 @@ - {{ - displayPrice(totalAmount, "元", 2) - }} + {{ displayPrice(totalAmount) }} - {{ - receiveAmountForm.receiveAmount && - displayPrice(Number(totalAmount) - storePrice(receiveAmountForm.receiveAmount), "元", 2) - }} + {{ receiveAmountForm.receiveAmount && displayPrice(Number(totalAmount) - storePrice(receiveAmountForm.receiveAmount)) }} diff --git a/src/views/supermarketerp/retailManagement/smErpRetailDelivery/form.vue b/src/views/supermarketerp/retailManagement/smErpRetailDelivery/form.vue index a5f6050..3e8bed7 100644 --- a/src/views/supermarketerp/retailManagement/smErpRetailDelivery/form.vue +++ b/src/views/supermarketerp/retailManagement/smErpRetailDelivery/form.vue @@ -125,20 +125,18 @@ @@ -153,19 +151,14 @@ - {{ - displayPrice(totalAmount, "元", 2) - }} + {{ displayPrice(totalAmount) }} - {{ - receiveAmountForm.receiveAmount && - displayPrice(Number(totalAmount) - storePrice(receiveAmountForm.receiveAmount), "元", 2) - }} + {{ receiveAmountForm.receiveAmount && displayPrice(Number(totalAmount) - storePrice(receiveAmountForm.receiveAmount)) }} diff --git a/src/views/supermarketerp/supermarketSpu/form.vue b/src/views/supermarketerp/supermarketSpu/form.vue index 1636595..0dd863e 100644 --- a/src/views/supermarketerp/supermarketSpu/form.vue +++ b/src/views/supermarketerp/supermarketSpu/form.vue @@ -132,16 +132,16 @@ const getsupermarketSpuData = async (id: string) => { if (res.code === 0) { res.data.smErpUnitEntityList = res.data.smErpUnitEntityList.map((item: rowVU) => { // 格式化金额数据 - item.retailPrice = parseFloat(displayPrice(item.retailPrice, "", 2)) - item.promotionPrice = parseFloat(displayPrice(item.promotionPrice, "", 2)) - item.purchasePrice = parseFloat(displayPrice(item.purchasePrice, "", 2)) - item.costPrice = parseFloat(displayPrice(item.costPrice, "", 2)) + item.retailPrice = parseFloat(displayPrice(item.retailPrice, "")) + item.promotionPrice = parseFloat(displayPrice(item.promotionPrice, "")) + item.purchasePrice = parseFloat(displayPrice(item.purchasePrice, "")) + item.costPrice = parseFloat(displayPrice(item.costPrice, "")) return item }) Object.assign(form, { ...res.data, - grossMargin: parseFloat(displayPrice(res.data.grossMargin, "", 2)), + grossMargin: parseFloat(displayPrice(res.data.grossMargin, "")), }) } } catch (error: any) { @@ -184,16 +184,18 @@ const usePackageUnitList = () => { // 整理辅助条码列表 const useAuxiliaryCode = () => { - return form.smErpAuxiliaryCodeEntityList.map((item: rowVC) => { - const curAuxiliaryCodeItem = form.smErpUnitEntityList.find((unitItem: any) => unitItem.id === item.unitId) - if (curAuxiliaryCodeItem.barCode) item.barCode = curAuxiliaryCodeItem.barCode - if (item.isNew) { - item.id = "" - if (curAuxiliaryCodeItem.isNew) item.unitId = "" - delete item.isNew - } - return item - }) + return form.smErpAuxiliaryCodeEntityList + .filter((item: rowVC) => item.unitId) + .map((item: rowVC) => { + const curAuxiliaryCodeItem = form.smErpUnitEntityList.find((unitItem: any) => unitItem.id === item.unitId) + if (curAuxiliaryCodeItem.barCode) item.barCode = curAuxiliaryCodeItem.barCode + if (item.isNew) { + item.id = "" + if (curAuxiliaryCodeItem.isNew) item.unitId = "" + delete item.isNew + } + return item + }) } // 提交