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 + }) } // 提交