From cd08530b628c6b13e86847f7e01c4b71790c197e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E4=BB=95=E4=BC=9F?= <499672082@qq.com>
Date: Fri, 26 Jan 2024 00:20:31 +0800
Subject: [PATCH] =?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/view/sale/ExportSaleData.vue | 62 ++++++++++++++++++++-------
src/view/shipping/NormalSendGoods.vue | 26 +++++------
src/view/shipping/ShippingDesk.vue | 26 +++++------
3 files changed, 72 insertions(+), 42 deletions(-)
diff --git a/src/view/sale/ExportSaleData.vue b/src/view/sale/ExportSaleData.vue
index 7634c43..85028f2 100644
--- a/src/view/sale/ExportSaleData.vue
+++ b/src/view/sale/ExportSaleData.vue
@@ -76,12 +76,32 @@
{{ todayMoney }}
-
库存总量
+
可用库存总量(件)
{{ inventoryTotal }}
-
库存总额
-
{{ inventoryMoeny }}
+
可用库存总额
+
{{ inventoryMoney }}
+
+
+
在途库存总量(件)
+
+
+
{{ inroadTotal }}
+
+
+
在途库存总额
+
+
+
{{ inroadTotalMoney }}
已收货总量(件)
@@ -89,7 +109,7 @@
已收货总货值
-
{{ deliveryMoeny }}
+
{{ deliveryMoney }}
@@ -205,9 +225,11 @@ import { Message } from 'element-ui'
todayTotal: 0,
todayMoney: 0.0,
inventoryTotal: 0,
- inventoryMoeny: 0.0,
+ inventoryMoney: 0.0,
+ inroadTotal: 0,
+ inroadTotalMoney: 0.0,
deliveryTotal: 0,
- deliveryMoeny: 0.0,
+ deliveryMoney: 0.0,
allProductList: [],
startDate: '',
endDate: '',
@@ -245,7 +267,7 @@ import { Message } from 'element-ui'
"销售数据 - 近7日": "lastSevenDaysSaleVolume",
"销售数据 - 近30天": "lastThirtyDaysSaleVolume",
"库存数据 - 仓内可用库存": "inventoryNumInfo.warehouseInventoryNum",
- "库存数据 - 仓内暂不可用库存": "inventoryNumInfo.unavailableWarehouseInventoryNum",
+ "库存数据 - 仓内暂不可用库存": "inventoryNumInfo.waitOnShelfNum",
"库存数据 - 已发货库存": "inventoryNumInfo.waitReceiveNum",
"库存数据 - 已下单待发货库存": "inventoryNumInfo.waitDeliveryInventoryNum",
"库存数据 - 待审核备货库存": "inventoryNumInfo.waitApproveInventoryNum",
@@ -258,7 +280,8 @@ import { Message } from 'element-ui'
"非VMI备货单数 - 发货延迟": "notVmiOrderInfo.deliveryDelayNum",
"非VMI备货单数 - 到货延迟": "notVmiOrderInfo.arrivalDelayNum",
"备货逻辑": "purchaseConfig",
- "库存货值(CNY)": "productTotalPrice",
+ "可用库存货值(CNY)": "productTotalPrice",
+ "在途库存货值(CNY)": "inroadTotalPrice",
"店铺名称": "mallName",
"评分": "mark",
"是否热销": 'hotTag',
@@ -372,8 +395,8 @@ import { Message } from 'element-ui'
},
{
prop: 'productTotalPrice',
- label: '库存货值(CNY)',
- width: '160px',
+ label: '可用库存货值(CNY)',
+ width: '180px',
align: 'center',
fixed: "right",
sortable: true,
@@ -613,10 +636,12 @@ import { Message } from 'element-ui'
this.currentPage = 1
this.todayMoney = 0.0
this.todayTotal = 0
- this.inventoryMoeny = 0.0
+ this.inventoryMoney = 0.0
this.inventoryTotal = 0
+ this.inroadTotalMoney = 0.0
+ this.inroadTotal = 0
this.deliveryTotal = 0
- this.deliveryMoeny = 0.0
+ this.deliveryMoney = 0.0
this.allProductList = []
if (!this.mallId) {
@@ -699,14 +724,19 @@ import { Message } from 'element-ui'
for(let j = 0;j < item.skuQuantityDetailList.length; j++) {
data = {...data, ...item.skuQuantityDetailList[j],
productTotalPrice: ((item.skuQuantityDetailList[j].supplierPrice / 100) * item.skuQuantityDetailList[j].inventoryNumInfo.warehouseInventoryNum).toFixed(2),
+ inroadTotalPrice: ((item.skuQuantityDetailList[j].supplierPrice / 100) * (item.skuQuantityDetailList[j].inventoryNumInfo.waitOnShelfNum + item.skuQuantityDetailList[j].inventoryNumInfo.waitReceiveNum)).toFixed(2),
warehouseInventoryNum: item.skuQuantityDetailList[j].inventoryNumInfo.warehouseInventoryNum}
this.todayTotal += item.skuQuantityDetailList[j].todaySaleVolume
this.todayMoney += new Number(((item.skuQuantityDetailList[j].supplierPrice / 100) * item.skuQuantityDetailList[j].todaySaleVolume).toFixed(2))
this.todayMoney = new Number(this.todayMoney.toFixed(2))
this.inventoryTotal += item.skuQuantityDetailList[j].inventoryNumInfo.warehouseInventoryNum
- this.inventoryMoeny += new Number(((item.skuQuantityDetailList[j].supplierPrice / 100) * item.skuQuantityDetailList[j].inventoryNumInfo.warehouseInventoryNum).toFixed(2))
- this.inventoryMoeny = new Number(this.inventoryMoeny.toFixed(2))
+ this.inventoryMoney += new Number(((item.skuQuantityDetailList[j].supplierPrice / 100) * item.skuQuantityDetailList[j].inventoryNumInfo.warehouseInventoryNum).toFixed(2))
+ this.inventoryMoney = new Number(this.inventoryMoney.toFixed(2))
+ console.log((item.skuQuantityDetailList[j].inventoryNumInfo.waitOnShelfNum + item.skuQuantityDetailList[j].inventoryNumInfo.waitReceiveNum))
+ this.inroadTotal += (item.skuQuantityDetailList[j].inventoryNumInfo.waitOnShelfNum + item.skuQuantityDetailList[j].inventoryNumInfo.waitReceiveNum)
+ this.inroadTotalMoney += new Number(((item.skuQuantityDetailList[j].supplierPrice / 100) * (item.skuQuantityDetailList[j].inventoryNumInfo.waitOnShelfNum + item.skuQuantityDetailList[j].inventoryNumInfo.waitReceiveNum)).toFixed(2))
+ this.inroadTotalMoney = new Number(this.inroadTotalMoney.toFixed(2))
this.adviceProduceNum = item.skuQuantityDetailList[j].adviceProduceNum || '-'
this.availableProduceNum = item.skuQuantityDetailList[j].availableProduceNum || '-'
this.list.push(data);
@@ -714,8 +744,8 @@ import { Message } from 'element-ui'
// 计算已发货货值
for(let k = 0; k < this.allProductList.length; k++) {
if (this.allProductList[k].product_sku_id == data.productSkuId) {
- this.deliveryMoeny += (item.skuQuantityDetailList[j].supplierPrice / 100) * this.allProductList[k].product_sku_number
- this.deliveryMoeny = new Number(this.deliveryMoeny.toFixed(2))
+ this.deliveryMoney += (item.skuQuantityDetailList[j].supplierPrice / 100) * this.allProductList[k].product_sku_number
+ this.deliveryMoney = new Number(this.deliveryMoney.toFixed(2))
}
}
}
diff --git a/src/view/shipping/NormalSendGoods.vue b/src/view/shipping/NormalSendGoods.vue
index 70b722d..c7470ef 100644
--- a/src/view/shipping/NormalSendGoods.vue
+++ b/src/view/shipping/NormalSendGoods.vue
@@ -449,20 +449,21 @@
},
toGetAddressInfo() {
this.addressList = []
- this.getAddressInfo(0)
+ this.getAddressInfo()
},
- getAddressInfo(index) {
+ async getAddressInfo() {
if (!this.mallList) {
Message.error('获取默认发货地址失败,请刷新重试')
return
}
- if (index == this.mallList.length) return
- let mallInfo = this.mallList[index]
- sendChromeAPIMessage({
- url: 'bgSongbird-api/supplier/address/queryDeliveryAddressInfo',
- needMallId: true,
- mallId: mallInfo.mallId,
- data: {}}).then((res) => {
+ for (let index = 0; index < this.mallList.length; index++) {
+ let mallInfo = this.mallList[index]
+ while(true) {
+ let res = await sendChromeAPIMessage({
+ url: 'bgSongbird-api/supplier/address/queryDeliveryAddressInfo',
+ needMallId: true,
+ mallId: mallInfo.mallId,
+ data: {}})
if (res.errorCode == 1000000) {
let addressArr = res.result.deliveryAddressInfoList.filter(i => {
return i.isDefault
@@ -475,11 +476,10 @@
} else {
Message.error("店铺【" + mallInfo.mallName + "】未设置默认发货地址,将无法自动创建发货单")
}
- this.getAddressInfo(index + 1)
- } else {
- Message.error("店铺【" + mallInfo.mallName + "】获取默认发货址失败,将无法自动创建发货单")
+ break
}
- })
+ }
+ }
},
onConfirm () {
if (this.arr.length == 0) {
diff --git a/src/view/shipping/ShippingDesk.vue b/src/view/shipping/ShippingDesk.vue
index 10e4cd8..1d0016f 100644
--- a/src/view/shipping/ShippingDesk.vue
+++ b/src/view/shipping/ShippingDesk.vue
@@ -261,20 +261,21 @@
},
toGetAddressInfo() {
this.addressList = []
- this.getAddressInfo(0)
+ this.getAddressInfo()
},
- getAddressInfo(index) {
+ async getAddressInfo() {
if (!this.mallList) {
Message.error('获取默认发货地址失败,请刷新重试')
return
}
- if (index == this.mallList.length) return
- let mallInfo = this.mallList[index]
- sendChromeAPIMessage({
- url: 'bgSongbird-api/supplier/address/queryDeliveryAddressInfo',
- needMallId: true,
- mallId: mallInfo.mallId,
- data: {}}).then((res) => {
+ for (let index = 0; index < this.mallList.length; index++) {
+ let mallInfo = this.mallList[index]
+ while(true) {
+ let res = await sendChromeAPIMessage({
+ url: 'bgSongbird-api/supplier/address/queryDeliveryAddressInfo',
+ needMallId: true,
+ mallId: mallInfo.mallId,
+ data: {}})
if (res.errorCode == 1000000) {
let addressArr = res.result.deliveryAddressInfoList.filter(i => {
return i.isDefault
@@ -287,11 +288,10 @@
} else {
Message.error("店铺【" + mallInfo.mallName + "】未设置默认发货地址,将无法自动创建发货单")
}
- this.getAddressInfo(index + 1)
- } else {
- Message.error("店铺【" + mallInfo.mallName + "】获取默认发货址失败,将无法自动创建发货单")
+ break
}
- })
+ }
+ }
},
onConfirm () {
if (this.arr.length == 0) {