This commit is contained in:
刘仕伟
2024-01-26 00:20:31 +08:00
parent 7eec4b50ce
commit cd08530b62
3 changed files with 72 additions and 42 deletions

View File

@@ -76,12 +76,32 @@
<p>{{ todayMoney }}</p>
</div>
<div class="item">
<h2>库存总量</h2>
<h2>可用库存总量()</h2>
<p>{{ inventoryTotal }}</p>
</div>
<div class="item">
<h2>库存总额</h2>
<p>{{ inventoryMoeny }}</p>
<h2>可用库存总额</h2>
<p>{{ inventoryMoney }}</p>
</div>
<div class="item">
<h2><span>在途库存总量()<el-tooltip
effect="dark"
content="包括暂不可用库存以及已发货库存"
placement="right">
<i class="el-icon-question"
style="font-size: 16px; vertical-align: middle;"></i>
</el-tooltip></span></h2>
<p>{{ inroadTotal }}</p>
</div>
<div class="item">
<h2><span>在途库存总额<el-tooltip
effect="dark"
content="(暂不可用库存+已发货库存)*申报价格"
placement="right">
<i class="el-icon-question"
style="font-size: 16px; vertical-align: middle;"></i>
</el-tooltip></span></h2>
<p>{{ inroadTotalMoney }}</p>
</div>
<div class="item">
<h2>已收货总量()</h2>
@@ -89,7 +109,7 @@
</div>
<div class="item">
<h2>已收货总货值</h2>
<p>{{ deliveryMoeny }}</p>
<p>{{ deliveryMoney }}</p>
</div>
</div>
<ai-card title="数据明细" style="padding-bottom: 40px;">
@@ -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))
}
}
}

View File

@@ -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) {

View File

@@ -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) {