Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui

master
mhhhh 2022-05-17 09:19:58 +08:00
commit b6fa3175c6
4 changed files with 139 additions and 86 deletions

BIN
.DS_Store vendored

Binary file not shown.

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
/.vscode/
/.idea/
/dist/
.DS_Store
node_modules/
yarn.lock
package-lock.json

View File

@ -2,16 +2,14 @@
<div>
<!-- 统计 -->
<div class="card">
<h4>
基本信息
</h4>
<h4>基本信息</h4>
<div class="count-list flex">
<div class="count-item" @click="navigateTo('managerGoods')">
<div>
<Icon class="icon" size="31" type="md-photos" />
</div>
<div>
<div class="counts">{{homeData.goodsNum ||0}}</div>
<div class="counts">{{ homeData.goodsNum || 0 }}</div>
<div>商品数量</div>
</div>
</div>
@ -20,30 +18,27 @@
<Icon class="icon" size="31" type="md-person" />
</div>
<div>
<div class="counts">{{homeData.memberNum ||0}}</div>
<div class="counts">{{ homeData.memberNum || 0 }}</div>
<div>会员数量</div>
</div>
</div>
<div class="count-item" @click="navigateTo('orderList')">
<div>
<Icon class="icon" size="31" type="md-list" />
</div>
<div>
<div class="counts">{{homeData.orderNum ||0}}</div>
<div class="counts">{{ homeData.orderNum || 0 }}</div>
<div>订单数量</div>
</div>
</div>
<div class="count-item" @click="navigateTo('shopList')">
<div>
<Icon class="icon" size="31" type="ios-stats" />
</div>
<div>
<div class="counts">{{homeData.storeNum ||0}}</div>
<div class="counts">{{ homeData.storeNum || 0 }}</div>
<div>店铺数量</div>
</div>
</div>
</div>
</div>
@ -53,27 +48,29 @@
<h4>今日待办</h4>
<div class="todo-list flex">
<div class="todo-item" @click="navigateTo('applyGoods')">
<div class="counts">{{$store.state.notices.goods || 0}}</div>
<div class="counts">{{ $store.state.notices.goods || 0 }}</div>
<div>待审核商品</div>
</div>
<div class="todo-item" @click="navigateTo('shopAuth')">
<div class="counts">{{$store.state.notices.store|| 0}}</div>
<div class="counts">{{ $store.state.notices.store || 0 }}</div>
<div>待审核店铺</div>
</div>
<div class="todo-item" @click="navigateTo('orderComplaint')">
<div class="counts">{{$store.state.notices.complain|| 0}}</div>
<div class="counts">{{ $store.state.notices.complain || 0 }}</div>
<div>待审核投诉</div>
</div>
<div class="todo-item" @click="navigateTo('afterSaleOrder')">
<div class="counts">{{$store.state.notices.refund|| 0}}</div>
<div class="counts">{{ $store.state.notices.refund || 0 }}</div>
<div>待审核售后</div>
</div>
<div class="todo-item">
<div class="counts">{{$store.state.notices.distributionCash|| 0}}</div>
<div class="counts">
{{ $store.state.notices.distributionCash || 0 }}
</div>
<div>待审核分销提现</div>
</div>
<div class="todo-item" @click="navigateTo('accountStatementBill')">
<div class="counts">{{$store.state.notices.waitPayBill|| 0}}</div>
<div class="counts">{{ $store.state.notices.waitPayBill || 0 }}</div>
<div>待审核分账</div>
</div>
</div>
@ -82,84 +79,75 @@
<!-- 今日流量概括 -->
<div class="card flow">
<div class="flow-list flex">
<div class="flow-item ">
<div class="flow-item">
<div class="flow-member">
<div>当前在线人数</div>
<span>
{{homeData.currentNumberPeopleOnline || 0}}
{{ homeData.currentNumberPeopleOnline || 0 }}
</span>
</div>
<div class="flow-wrapper">
<h4>
流量概括
</h4>
<h4>流量概括</h4>
<div class="card flow-box flex">
<div class="flow-box-item">
<div>
今日访客数
</div>
<div>今日访客数</div>
<div class="counts">
{{homeData.todayUV || 0}}
{{ homeData.todayUV || 0 }}
</div>
</div>
<div class="flow-box-item">
<div>
昨日访客数
</div>
<div>昨日访客数</div>
<div class="counts">
{{homeData.yesterdayUV || 0}}
{{ homeData.yesterdayUV || 0 }}
</div>
</div>
</div>
<div class="flow-splice flex">
<div class="flow-box-splice">
<div>
前七日访客数
</div>
<div>前七日访客数</div>
<div class="counts">
{{homeData.lastSevenUV || 0}}
{{ homeData.lastSevenUV || 0 }}
</div>
</div>
<div class="flow-box-splice">
<div>
前三十日访客数
</div>
<div>前三十日访客数</div>
<div class="counts">
{{homeData.lastThirtyUV || 0}}
{{ homeData.lastThirtyUV || 0 }}
</div>
</div>
</div>
</div>
</div>
<div class="today-box">
<h4> 今日概括</h4>
<h4>今日概括</h4>
<div class="today-list flex">
<div class="today-item">
<div>今日订单数</div>
<span>{{homeData.todayOrderNum}}</span>
<span>{{ homeData.todayOrderNum }}</span>
</div>
<div class="today-item">
<div>今日交易额</div>
<span v-if="homeData.todayOrderPrice">{{homeData.todayOrderPrice | unitPrice}}</span>
<span v-if="homeData.todayOrderPrice"
>{{ homeData.todayOrderPrice | unitPrice }}</span
>
<span v-else>0.00</span>
</div>
<div class="today-item">
<div>今日新增店铺</div>
<span>{{homeData.todayStoreNum || 0}}</span>
<span>{{ homeData.todayStoreNum || 0 }}</span>
</div>
<div class="today-item">
<div>今日新增会员数</div>
<span>{{homeData.todayMemberNum || 0}}</span>
<span>{{ homeData.todayMemberNum || 0 }}</span>
</div>
<div class="today-item">
<div>今日上架商品数量</div>
<span>{{homeData.todayGoodsNum || 0}}</span>
<span>{{ homeData.todayGoodsNum || 0 }}</span>
</div>
<div class="today-item">
<div>今日新增评论</div>
<span>{{homeData.todayMemberEvaluation || 0}}</span>
<span>{{ homeData.todayMemberEvaluation || 0 }}</span>
</div>
</div>
</div>
@ -174,7 +162,7 @@
</div>
</div>
<!-- chart -->
<div class="charts flex">
<div class="charts flex">
<div class="chart-item">
<h4>流量走势</h4>
<div id="pvChart"></div>
@ -188,16 +176,22 @@
<!-- top10商品 -->
<div class="card transform">
<h4>热卖商品TOP10</h4>
<Table stripe :columns="tophotGoodsColumns" :data="topHotGoodsData"></Table>
<Table
stripe
:columns="tophotGoodsColumns"
:data="topHotGoodsData"
></Table>
</div>
<!-- top10店铺 -->
<div class="card transform">
<h4>热卖店铺TOP10</h4>
<Table stripe :columns="tophotShopsColumns" :data="topHotShopsData"></Table>
<Table
stripe
:columns="tophotShopsColumns"
:data="topHotShopsData"
></Table>
</div>
</div>
</template>
@ -217,7 +211,7 @@ export default {
//
test: {
a: "test",
languages:[]
languages: [],
},
//
tophotShopsColumns: [
@ -418,6 +412,7 @@ export default {
let data = [...uv, ...pv];
console.log("pv", data);
this.pvChart.data(data);
this.pvChart.scale({
activeQuantity: {
@ -491,13 +486,31 @@ export default {
initHistoryMemberChart() {
// legend-filter
let data = this.chartList;
let num = [];
let lastNum = [];
data.forEach((item) => {
item.title = "历史在线人数";
item.date = item.date.substring(5);
});
this.historyMemberChart.data(data);
num.push({
date: item.date.substring(5),
title: "最近48小时",
num: item.num,
res: item.num,
});
lastNum.push({
date: item.date.substring(5),
title: "历史记录",
lastNum: item.lastNum || 0,
res: item.lastNum || 0,
});
});
let params = [...num, ...lastNum];
this.historyMemberChart.data(params);
this.historyMemberChart.scale({
activeQuantity: {
range: [0, 1],
nice: true,
},
});
this.historyMemberChart.tooltip({
showCrosshairs: true,
shared: true,
@ -505,14 +518,15 @@ export default {
this.historyMemberChart
.line()
.position("date*num")
.color("title", ["#ffaa71"])
.position("date*res")
.color("title", ["#ffaa71", "#398AB9"])
.label("res")
.shape("smooth");
this.historyMemberChart
.point()
.position("date*num")
.color("title", ["#ffaa71"])
.position("date*res")
.color("title", ["#ffaa71", "#398AB9"])
.label("res")
.shape("circle");
this.historyMemberChart.render();
},

View File

@ -67,14 +67,14 @@
prop="goodsUnit"
>
<Select v-model="baseInfoForm.goodsUnit" style="width: 100px">
<Scroll :on-reach-bottom="handleReachBottom" >
<Option
v-for="(item, index) in goodsUnitList"
:key="index"
:value="item"
>{{ item }}
</Option>
</Scroll>
<Scroll :on-reach-bottom="handleReachBottom">
<Option
v-for="(item, index) in goodsUnitList"
:key="index"
:value="item"
>{{ item }}
</Option>
</Scroll>
</Select>
</FormItem>
<FormItem
@ -604,7 +604,7 @@ export default {
};
return {
regular,
total:0,
total: 0,
accessToken: "", //token
goodsParams: "",
categoryId: "", // id
@ -689,9 +689,9 @@ export default {
value: [regular.REQUIRED, regular.VARCHAR60],
templateId: [regular.REQUIRED],
},
params:{
pageNumber:1,
pageSize:10
params: {
pageNumber: 1,
pageSize: 10,
},
skuInfoRules: {},
/** 品牌列表 */
@ -700,6 +700,7 @@ export default {
shopCategory: [],
/** 商品单位列表 */
goodsUnitList: [],
initSkuTableData: [],
ignoreColumn: [
//
"_index",
@ -871,8 +872,8 @@ export default {
}
);
},
//
handleReachBottom(){
//
handleReachBottom() {
setTimeout(() => {
if (this.params.pageNumber * this.params.pageSize <= this.total) {
this.params.pageNumber++;
@ -884,7 +885,7 @@ export default {
GET_GoodsUnit() {
API_GOODS.getGoodsUnitList(this.params).then((res) => {
if (res.success) {
console.log(res)
console.log(res);
this.goodsUnitList.push(...res.result.records.map((i) => i.name));
this.total = res.result.total;
}
@ -957,7 +958,7 @@ export default {
renderGoodsDetailSku(skuList) {
let skus = [];
let skusInfo = [];
skuList.map((e) => {
skuList.map((e, skuListIndex) => {
let sku = {
id: e.id,
sn: e.sn,
@ -965,6 +966,7 @@ export default {
cost: e.cost,
quantity: e.quantity,
weight: e.weight,
_id: new Date().getTime() + skuListIndex, //
};
e.specList.forEach((u) => {
if (u.specName === "images") {
@ -978,8 +980,10 @@ export default {
skusInfo.push({
name: u.specName,
spec_id: u.specNameId,
_id: new Date().getTime(),
spec_values: [
{
_id: new Date().getTime(),
id: u.specValueId,
name: u.specName,
value: u.specValue || "",
@ -994,6 +998,7 @@ export default {
) {
sk.spec_values.push({
id: u.specValueId,
_id: new Date().getTime(),
name: u.specName,
value: u.specValue || "",
});
@ -1059,8 +1064,15 @@ export default {
}
//
this.$set(this.skuInfo, this.skuInfo.length, {
spec_values: [],
spec_values: [
{
name: "规格项",
value: "规格项值" + this.skuInfo.length,
_id: new Date().getTime() + Math.random(0.1),
},
],
name: "规格名",
_id: new Date().getTime(),
});
this.renderTableData();
},
@ -1117,6 +1129,7 @@ export default {
this.$set(item.spec_values, item.spec_values.length, {
name: item.name,
value: "",
_id: new Date().getTime(),
});
this.baseInfoForm.regeneratorSkuFlag = true;
/**
@ -1142,8 +1155,9 @@ export default {
*/
renderTableData() {
this.skuTableColumn = [];
this.skuTableData = [];
let pushData = [];
this.initSkuTableData = this.skuTableData;
this.skuTableData = [];
//
this.skuInfo.forEach((sku) => {
// !sku.name ? (sku.name = "") : "";
@ -1188,8 +1202,6 @@ export default {
//
let cloneTemp = cloneObj(this.skuInfo);
//
this.$set(this, "skuTableData", []);
//
if (cloneTemp[0]) {
//
@ -1199,12 +1211,31 @@ export default {
result.push({
[cloneTemp[0].name]: specItem.value,
images: this.baseInfoForm.goodsGalleryFiles || [],
_name: cloneTemp[0].name,
...specItem,
});
});
cloneTemp.splice(0, 1);
result = this.specIterator(result, cloneTemp);
this.skuTableData = result;
console.log(this.skuTableData);
this.skuTableData.forEach((item, index) => {
this.initSkuTableData.forEach((sku) => {
// id
if (sku._id.length && this.scalarArrayEquals(item._id, sku._id)) {
this.skuTableData[index] = {
...item,
...sku,
};
} else if (item.value == sku[item._name] || item._id == sku._id) {
// // id
this.skuTableData[index] = {
...sku,
...item,
};
// }
}
});
});
}
},
/**
@ -1217,10 +1248,13 @@ export default {
if (cloneTemp.length > 0) {
let table = [];
result.forEach((resItem) => {
cloneTemp[0].spec_values.forEach((valItem) => {
cloneTemp[0].spec_values.forEach((valItem,i) => {
let obj = cloneObj(resItem);
obj[cloneTemp[0].name] = valItem.value;
obj._name = obj[cloneTemp[0].name];
if (obj._id) {
obj._id = `${obj._id},${obj._id + i}`.split(",");
}
table.push(obj);
});
});
@ -1355,6 +1389,10 @@ export default {
delete sku._rowKey;
delete sku.specNameId;
delete sku.specValueId;
delete sku._id;
delete sku.name;
delete sku.value;
delete sku._name
return sku;
});
@ -1496,7 +1534,7 @@ export default {
</style>
<style>
.ivu-select .ivu-select-dropdown{
.ivu-select .ivu-select-dropdown {
overflow: hidden !important;
}
</style>