mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-11-07 09:28:53 +08:00
refactor(axios): 优化HTTP请求拦截器和错误处理机制
- 移除调试用的console.log语句 - 调整表格列对齐方式,将操作列从居中改为右对齐 - 添加搜索表单功能,包括账单号、店铺名称、生成时间等筛选条件 - 重构axios拦截器逻辑,简化错误处理流程 - 实现统一的token刷新机制,使用单例模式避免重复请求 - 优化防抖函数实现,提高性能表现 - 添加401和403状态码的特殊处理逻辑 - 统一错误提示信息的显示方式 - 优化表格列宽度设置,调整金额相关列的显示效果 - 删除未使用的组件文件和样式代码 - 移除调试相关的代码和注释 - 优化图标组件的导入方式,使用markRaw包装 - 优化热词统计图表的数据显示逻辑,添加空数据提示
This commit is contained in:
@@ -142,8 +142,7 @@ export default {
|
||||
value: String(item.sortOrder),
|
||||
label: item.gradeName || `等级值${item.sortOrder}`,
|
||||
}));
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
formatGrade(name, gradeId) {
|
||||
if (name) {
|
||||
|
||||
@@ -60,7 +60,6 @@ export function useChat(liveId, userInfo, liveDetail) {
|
||||
}
|
||||
if (!groupID.value) {
|
||||
initError.value = "直播间群组 ID 不存在";
|
||||
console.warn("groupID 不存在,跳过 IM 初始化");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -160,18 +159,15 @@ export function useChat(liveId, userInfo, liveDetail) {
|
||||
}
|
||||
|
||||
function onSdkNotReady() {
|
||||
console.log("[SDK Not Ready]");
|
||||
imReady.value = false;
|
||||
}
|
||||
|
||||
function onSdkReady() {
|
||||
console.log("[SDK Ready]");
|
||||
imReady.value = true;
|
||||
updateUserInfo();
|
||||
}
|
||||
|
||||
function onKickedOut() {
|
||||
console.log("[用户被踢下线]");
|
||||
imReady.value = false;
|
||||
initError.value = "IM 已下线,请刷新页面";
|
||||
}
|
||||
@@ -203,11 +199,10 @@ export function useChat(liveId, userInfo, liveDetail) {
|
||||
}
|
||||
|
||||
try {
|
||||
const imResponse = await chat.value.joinGroup({
|
||||
await chat.value.joinGroup({
|
||||
groupID: groupID.value,
|
||||
type: TencentCloudChat.TYPES.GRP_AVCHATROOM,
|
||||
});
|
||||
console.log("[加群成功]", imResponse);
|
||||
} catch (imError) {
|
||||
console.warn("joinGroup error:", imError);
|
||||
throw imError;
|
||||
|
||||
@@ -21,7 +21,6 @@ export async function fetchLiveSetting(force = false) {
|
||||
cachedSetting = res.result;
|
||||
return cachedSetting;
|
||||
}
|
||||
console.warn("获取直播配置失败", res);
|
||||
return null;
|
||||
} catch (error) {
|
||||
console.error("获取直播配置异常:", error);
|
||||
|
||||
@@ -327,8 +327,7 @@ export default {
|
||||
if (res.success && res.result?.buyerDomain) {
|
||||
this.wapUrl = res.result.buyerDomain;
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -759,9 +759,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(this.typeList)
|
||||
if (this.typeList.length >= 3) {
|
||||
console.log(123123)
|
||||
this.getContentPrice()
|
||||
}
|
||||
},
|
||||
|
||||
@@ -232,9 +232,7 @@ export default {
|
||||
handleAddNav() {
|
||||
this.navList.list.push({ name: "", url: "", title: "" });
|
||||
},
|
||||
handleMoveEnd({ newIndex, oldIndex }) {
|
||||
console.log("index", newIndex, oldIndex);
|
||||
},
|
||||
handleMoveEnd({ newIndex, oldIndex }) {},
|
||||
handleModel(type) {
|
||||
if (type == "topAdvert") {
|
||||
this.draftTopAdvert = JSON.parse(JSON.stringify(this.topAdvert));
|
||||
|
||||
@@ -285,7 +285,6 @@ export default {
|
||||
},
|
||||
// 选择商品回调
|
||||
selectedGoodsData(val) {
|
||||
console.log(val);
|
||||
let goods = val[0];
|
||||
this.selected.img = goods.thumbnail;
|
||||
this.selected.price = goods.price;
|
||||
|
||||
@@ -160,9 +160,7 @@ export default {
|
||||
watch: {
|
||||
modelForm: {
|
||||
deep: true,
|
||||
handler: function (val) {
|
||||
console.log(val);
|
||||
},
|
||||
handler: function (val) {},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -116,10 +116,6 @@ export default {
|
||||
advertising: {
|
||||
handler(val) {
|
||||
this.$store.state.openStyleStore = val;
|
||||
console.log(
|
||||
"this.$store.state.openStyleStore",
|
||||
this.$store.state.openStyleStore
|
||||
);
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
|
||||
@@ -119,10 +119,6 @@ export default {
|
||||
advertising: {
|
||||
handler(val) {
|
||||
this.$store.state.openStyleStore = val;
|
||||
console.log(
|
||||
"this.$store.state.openStyleStore",
|
||||
this.$store.state.openStyleStore
|
||||
);
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
|
||||
@@ -1,16 +1,3 @@
|
||||
import * as API_Other from "@/api/other";
|
||||
|
||||
// 获取楼层装修信息
|
||||
export function initData(id) {
|
||||
API_Other.getHomeData(id).then(res => {
|
||||
debugger
|
||||
homeData = res;
|
||||
console.log(res)
|
||||
});
|
||||
}
|
||||
|
||||
export let homeData = {};
|
||||
|
||||
/**
|
||||
* drawer:true 广告右侧打开抽屉中显示
|
||||
* drawerPromotions:true 广告右侧打开抽屉中显示
|
||||
|
||||
@@ -621,8 +621,6 @@ export default {
|
||||
return item.___index != this.goodsSelectedIndex;
|
||||
});
|
||||
this.res.options.list[0].titleWay[this.goodsSelectedIndex] = data;
|
||||
|
||||
console.log(this.res.options.list[0]);
|
||||
},
|
||||
// 商品排序
|
||||
slotGoods(list, key, val) {
|
||||
@@ -659,7 +657,6 @@ export default {
|
||||
|
||||
// 轮播图排序
|
||||
slotBanner(val, key, index, down) {
|
||||
console.log(val);
|
||||
if (down == "down") {
|
||||
this.downData(val.options.list, index);
|
||||
} else {
|
||||
|
||||
@@ -192,15 +192,12 @@ export default {
|
||||
this.saveDialog = false;
|
||||
this.$Message.error("修改失败,请稍后重试");
|
||||
}
|
||||
console.log(res);
|
||||
})
|
||||
.catch(error => {});
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 更新
|
||||
update(submitWay) {
|
||||
console.log(this.$store.state.openStyleStore[0], "123123123");
|
||||
if (this.$store.state.openStyleStore == void 0) {
|
||||
this.$Message.error("请装修楼层!");
|
||||
return false;
|
||||
@@ -209,7 +206,6 @@ export default {
|
||||
|
||||
let id = this.$route.query.id;
|
||||
const pagetype = this.$route.query.pagetype;
|
||||
console.log(this.$store.state.openStyleStore, submitWay);
|
||||
const pageType = {
|
||||
INDEX: "INDEX",
|
||||
ALERT: "OPEN_SCREEN_PAGE",
|
||||
@@ -239,9 +235,7 @@ export default {
|
||||
this.saveDialog = false;
|
||||
this.$Message.error("修改失败,请稍后重试");
|
||||
}
|
||||
console.log(res);
|
||||
})
|
||||
.catch((error) => {});
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -270,9 +264,7 @@ export default {
|
||||
this.saveDialog = false;
|
||||
this.$Message.error("保存失败,请稍后重试");
|
||||
}
|
||||
console.log(res);
|
||||
})
|
||||
.catch(error => {});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
>
|
||||
<el-table-column prop="articleCategoryName" label="分类名称" min-width="200" />
|
||||
<el-table-column prop="sort" label="排序" width="120" />
|
||||
<el-table-column label="操作" width="320" align="center">
|
||||
<el-table-column label="操作" width="320" align="right">
|
||||
<template #default="{ row }">
|
||||
<template v-if="row">
|
||||
<a class="link-text" @click="edit(row)">编辑</a>
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
title="这里展示历史某一天的热词数据统计,可根据需求配置每日持久化多少条数据。"
|
||||
/>
|
||||
|
||||
<div id="container"></div>
|
||||
<div v-show="hasData" id="container"></div>
|
||||
<el-empty v-if="!hasData" description="该日期暂无热词数据" :image-size="100" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Chart } from "@antv/g2";
|
||||
import { getHotWordsHistory } from "@/api/index";
|
||||
import { Message } from "@/utils/message";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -34,6 +34,7 @@ export default {
|
||||
},
|
||||
hotWordsChart: null,
|
||||
hotWordsData: [],
|
||||
hasData: true,
|
||||
endMonth: null,
|
||||
};
|
||||
},
|
||||
@@ -60,13 +61,11 @@ export default {
|
||||
const res = await getHotWordsHistory(this.params);
|
||||
if (res.success) {
|
||||
this.hotWordsData = res.result || [];
|
||||
if (this.hotWordsChart) {
|
||||
this.hasData = this.hotWordsData.length > 0;
|
||||
if (this.hasData && this.hotWordsChart) {
|
||||
this.hotWordsChart.changeData(this.hotWordsData);
|
||||
this.hotWordsChart.render();
|
||||
}
|
||||
if (!this.hotWordsData.length) {
|
||||
Message.error("暂无数据");
|
||||
}
|
||||
}
|
||||
},
|
||||
init() {
|
||||
|
||||
@@ -13,11 +13,12 @@
|
||||
</div>
|
||||
</el-affix>
|
||||
|
||||
<div id="container"></div>
|
||||
<el-table border :data="hotWordsData" style="width: 100%">
|
||||
<div v-show="hasData" id="container"></div>
|
||||
<el-table v-if="hasData" border :data="hotWordsData" style="width: 100%">
|
||||
<el-table-column prop="keywords" label="热词名称" min-width="160" />
|
||||
<el-table-column prop="score" label="搜索次数" min-width="120" />
|
||||
</el-table>
|
||||
<el-empty v-else description="暂无热词统计数据" :image-size="100" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -40,6 +41,7 @@ export default {
|
||||
},
|
||||
hotWordsChart: "",
|
||||
hotWordsData: [],
|
||||
hasData: true,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -61,7 +63,11 @@ export default {
|
||||
async search() {
|
||||
const res = await getHotWordsStatistics(this.params);
|
||||
if (res.success) {
|
||||
this.hotWordsData = res.result;
|
||||
this.hotWordsData = res.result || [];
|
||||
this.hasData = this.hotWordsData.length > 0;
|
||||
if (!this.hasData) {
|
||||
return;
|
||||
}
|
||||
if (!this.hotWordsChart) {
|
||||
this.hotWordsChart = new Chart({
|
||||
container: "container",
|
||||
|
||||
@@ -10,13 +10,19 @@
|
||||
title="这里展示今日系统中搜索前一百的搜索热词,分数为热词在排序系统中的分数,分数越高,可以在用户获取热词时进行优先展示(首页商品搜索栏下方推荐位)(分数可以填写负数,会降低推荐度)"
|
||||
/>
|
||||
|
||||
<div class="card-list">
|
||||
<el-card v-for="words in data" :key="words" class="card-item" shadow="hover">
|
||||
<div class="card-item-inner">
|
||||
<a href="#" class="word-link" @click.prevent="add(words)">{{ words }}</a>
|
||||
<el-icon class="close-icon" @click="deleteWords(words)"><Close /></el-icon>
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="word-list">
|
||||
<el-tag
|
||||
v-for="words in data"
|
||||
:key="words"
|
||||
size="large"
|
||||
closable
|
||||
class="word-tag"
|
||||
@close="deleteWords(words)"
|
||||
@click="add(words)"
|
||||
>
|
||||
{{ words }}
|
||||
</el-tag>
|
||||
<el-empty v-if="!data.length" description="暂无热词,点击上方按钮设置" :image-size="80" />
|
||||
</div>
|
||||
|
||||
<el-dialog
|
||||
@@ -44,13 +50,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Close } from "@element-plus/icons-vue";
|
||||
import { getHotWords, setHotWords, deleteHotWords } from "@/api/index";
|
||||
import { regular } from "@/utils";
|
||||
|
||||
export default {
|
||||
name: "todayHotWords",
|
||||
components: { Close },
|
||||
data() {
|
||||
return {
|
||||
submitLoading: false,
|
||||
@@ -127,36 +131,23 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.card-list {
|
||||
.word-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.card-item {
|
||||
min-width: 100px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.card-item-inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.word-link {
|
||||
color: var(--el-color-primary);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.close-icon {
|
||||
.word-tag {
|
||||
cursor: pointer;
|
||||
color: var(--el-text-color-secondary);
|
||||
padding: 0 14px;
|
||||
height: 32px;
|
||||
font-size: 14px;
|
||||
|
||||
&:hover {
|
||||
color: var(--el-color-danger);
|
||||
color: var(--el-color-primary);
|
||||
border-color: var(--el-color-primary);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -461,7 +461,6 @@ export default {
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
@@ -286,6 +286,8 @@ export default {
|
||||
storeId: e.storeId,
|
||||
storeName: e.storeName,
|
||||
skuId: e.id,
|
||||
goodsId: e.goodsId,
|
||||
thumbnail: e.thumbnail || "",
|
||||
goodsType: e.goodsType,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -60,29 +60,19 @@
|
||||
style="width: 100%"
|
||||
@sort-change="changeSort"
|
||||
>
|
||||
<el-table-column prop="goodsId" label="商品编号" width="180" show-overflow-tooltip />
|
||||
<el-table-column label="商品图片" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<img
|
||||
v-if="row && row.thumbnail"
|
||||
:src="row.thumbnail"
|
||||
style="height: 50px; width: 50px; object-fit: cover"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" min-width="200" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<template v-if="row">
|
||||
<a class="link-text mr_10" @click="linkTo(row.goodsId, row.skuId)">{{ row.goodsName }}</a>
|
||||
<el-popover trigger="hover" title="扫码在手机中查看" placement="top" width="180">
|
||||
<template #reference>
|
||||
<img
|
||||
src="../../../assets/qrcode.svg"
|
||||
class="hover-pointer"
|
||||
width="20"
|
||||
height="20"
|
||||
alt="qrcode"
|
||||
/>
|
||||
</template>
|
||||
<vue-qr
|
||||
:text="wapLinkTo(row.goodsId, row.skuId)"
|
||||
:margin="0"
|
||||
color-dark="#000"
|
||||
color-light="#fff"
|
||||
:size="150"
|
||||
/>
|
||||
</el-popover>
|
||||
</template>
|
||||
<a v-if="row" class="link-text" @click="linkTo(row.goodsId, row.skuId)">{{ row.goodsName }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存数量" width="100">
|
||||
@@ -156,11 +146,9 @@
|
||||
|
||||
<script>
|
||||
import { getKanJiaGoodsList, delKanJiaGoods } from "@/api/promotion";
|
||||
import vueQr from "vue-qr";
|
||||
|
||||
export default {
|
||||
name: "kanjia-activity-goods",
|
||||
components: { vueQr },
|
||||
data() {
|
||||
return {
|
||||
selectDate: [],
|
||||
@@ -290,13 +278,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.mr_10 {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.hover-pointer {
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.padding-row {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
@@ -69,29 +69,19 @@
|
||||
class="mt_10"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column label="商品名称" min-width="200" fixed="left" show-overflow-tooltip>
|
||||
<el-table-column prop="goodsId" label="商品编号" width="180" show-overflow-tooltip />
|
||||
<el-table-column label="商品图片" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<template v-if="row">
|
||||
<a class="link-text mr_10" @click="linkTo(row.goodsId, row.skuId)">{{ row.goodsName }}</a>
|
||||
<el-popover trigger="hover" title="扫码在手机中查看" placement="top" width="180">
|
||||
<template #reference>
|
||||
<img
|
||||
src="../../../assets/qrcode.svg"
|
||||
class="hover-pointer"
|
||||
width="20"
|
||||
height="20"
|
||||
alt="qrcode"
|
||||
/>
|
||||
</template>
|
||||
<vue-qr
|
||||
:text="wapLinkTo(row.goodsId, row.skuId)"
|
||||
:margin="0"
|
||||
color-dark="#000"
|
||||
color-light="#fff"
|
||||
:size="150"
|
||||
/>
|
||||
</el-popover>
|
||||
</template>
|
||||
<img
|
||||
v-if="row && row.thumbnail"
|
||||
:src="row.thumbnail"
|
||||
style="height: 50px; width: 50px; object-fit: cover"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" min-width="200" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<a v-if="row" class="link-text" @click="linkTo(row.goodsId, row.skuId)">{{ row.goodsName }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="市场价" width="110">
|
||||
@@ -171,11 +161,9 @@ import {
|
||||
editPointsGoodsStatus,
|
||||
deletePointsGoodsStatus,
|
||||
} from "@/api/promotion";
|
||||
import vueQr from "vue-qr";
|
||||
|
||||
export default {
|
||||
name: "pointsGoods",
|
||||
components: { vueQr },
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
@@ -307,13 +295,6 @@ export default {
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
.mr_10 {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.hover-pointer {
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.op-split {
|
||||
margin: 0 8px;
|
||||
color: #dcdee2;
|
||||
|
||||
@@ -43,38 +43,38 @@
|
||||
<div>
|
||||
<h3 class="ml_10">结算详细</h3>
|
||||
<el-table :data="billData" border style="width: 100%">
|
||||
<el-table-column label="结算金额" prop="billPrice" align="center" width="200" fixed="left">
|
||||
<el-table-column label="结算金额" prop="billPrice" align="center" width="160" fixed="left">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row">{{ formatPrice(row.billPrice) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收入" align="center">
|
||||
<el-table-column label="用户实付" prop="orderPrice" align="center" width="200">
|
||||
<el-table-column label="用户实付" prop="orderPrice" align="center" width="160">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row">{{ formatPrice(row.orderPrice) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="平台优惠券补贴" prop="siteCouponCommission" align="center" width="200">
|
||||
<el-table-column label="平台优惠券补贴" prop="siteCouponCommission" align="center" width="160">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row">{{ formatPrice(row.siteCouponCommission) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="积分商品补贴" prop="pointSettlementPrice" align="center" width="200">
|
||||
<el-table-column label="积分商品补贴" prop="pointSettlementPrice" align="center" width="160">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row">{{ formatPrice(row.pointSettlementPrice) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="砍价商品补贴" prop="kanjiaSettlementPrice" align="center" width="200">
|
||||
<el-table-column label="砍价商品补贴" prop="kanjiaSettlementPrice" align="center" width="160">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row">{{ formatPrice(row.kanjiaSettlementPrice) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="礼品卡补贴" prop="giftCardSubsidy" align="center" width="200">
|
||||
<el-table-column label="礼品卡补贴" prop="giftCardSubsidy" align="center" width="160">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row">{{ formatPrice(row.giftCardSubsidy) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分销佣金" prop="distributionCommission" align="center" width="200">
|
||||
<el-table-column label="分销佣金" prop="distributionCommission" align="center" width="160">
|
||||
<template #default="{ row }">
|
||||
<priceColorScheme
|
||||
v-if="row"
|
||||
@@ -83,7 +83,7 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="平台服务费" prop="commissionPrice" align="center" width="200">
|
||||
<el-table-column label="平台服务费" prop="commissionPrice" align="center" width="160">
|
||||
<template #default="{ row }">
|
||||
<priceColorScheme
|
||||
v-if="row"
|
||||
@@ -94,7 +94,7 @@
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="退款" align="center">
|
||||
<el-table-column label="退款金额" prop="refundPrice" align="center" width="200">
|
||||
<el-table-column label="退款金额" prop="refundPrice" align="center" width="160">
|
||||
<template #default="{ row }">
|
||||
<priceColorScheme v-if="row" :value="negate(row.refundPrice)" :color="$mainColor" />
|
||||
</template>
|
||||
@@ -103,7 +103,7 @@
|
||||
label="退单返还平台优惠券补贴"
|
||||
prop="siteCouponRefundCommission"
|
||||
align="center"
|
||||
width="200"
|
||||
width="160"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<priceColorScheme
|
||||
@@ -117,7 +117,7 @@
|
||||
label="退单返还积分商品补贴"
|
||||
prop="pointRefundSettlementPrice"
|
||||
align="center"
|
||||
width="200"
|
||||
width="160"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<priceColorScheme
|
||||
@@ -131,7 +131,7 @@
|
||||
label="退单返还砍价商品补贴"
|
||||
prop="kanjiaRefundSettlementPrice"
|
||||
align="center"
|
||||
width="200"
|
||||
width="160"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<priceColorScheme
|
||||
@@ -141,7 +141,7 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="礼品卡返还" prop="giftCardRefundSubsidy" align="center" width="200">
|
||||
<el-table-column label="礼品卡返还" prop="giftCardRefundSubsidy" align="center" width="160">
|
||||
<template #default="{ row }">
|
||||
<priceColorScheme
|
||||
v-if="row"
|
||||
@@ -154,7 +154,7 @@
|
||||
label="退单返还分销佣金"
|
||||
prop="distributionRefundCommission"
|
||||
align="center"
|
||||
width="200"
|
||||
width="160"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span v-if="row">{{ formatPrice(row.distributionRefundCommission) }}</span>
|
||||
@@ -164,7 +164,7 @@
|
||||
label="退单返还平台服务费"
|
||||
prop="refundCommissionPrice"
|
||||
align="center"
|
||||
width="200"
|
||||
width="160"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span v-if="row">{{ formatPrice(row.refundCommissionPrice) }}</span>
|
||||
@@ -450,9 +450,6 @@ export default {
|
||||
} else {
|
||||
navigator.msSaveBlob(blob, "结算单-" + this.id + ".xlsx");
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
init() {
|
||||
@@ -556,12 +553,16 @@ table {
|
||||
margin-left: 40px;
|
||||
|
||||
tr {
|
||||
font-size: 12px;
|
||||
height: 40px;
|
||||
padding: 10px;
|
||||
|
||||
td:nth-child(1) {
|
||||
width: 120px;
|
||||
width: 140px;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
td:nth-child(2) {
|
||||
color: #303133;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,56 @@
|
||||
<template>
|
||||
<div class="search">
|
||||
<el-card>
|
||||
<el-form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
inline
|
||||
label-width="70px"
|
||||
class="search-form"
|
||||
@keyup.enter="handleSearch"
|
||||
>
|
||||
<el-form-item label="账单号">
|
||||
<el-input
|
||||
v-model="searchForm.sn"
|
||||
placeholder="请输入账单号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="店铺名称">
|
||||
<el-input
|
||||
v-model="searchForm.storeName"
|
||||
placeholder="请输入店铺名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生成时间">
|
||||
<el-date-picker
|
||||
v-model="selectDate"
|
||||
type="daterange"
|
||||
clearable
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
:default-time="defaultTime"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 260px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" class="search-btn" @click="handleSearch">搜索</el-button>
|
||||
<el-button @click="handleReset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-tabs v-model="activeStatus" @tab-change="handleStatusChange">
|
||||
<el-tab-pane label="全部" name="" />
|
||||
<el-tab-pane label="已出账" name="OUT" />
|
||||
<el-tab-pane label="已对账" name="CHECK" />
|
||||
<el-tab-pane label="已付款" name="COMPLETE" />
|
||||
</el-tabs>
|
||||
<div class="mb_10">
|
||||
<el-button type="primary" @click="handleExportList">导出列表</el-button>
|
||||
<el-button :disabled="selectCount === 0" @click="handleBatchDownload">批量下载</el-button>
|
||||
@@ -66,11 +116,19 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
selectDate: [],
|
||||
defaultTime: [new Date(2000, 0, 1, 0, 0, 0), new Date(2000, 0, 1, 23, 59, 59)],
|
||||
activeStatus: "",
|
||||
searchForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 20,
|
||||
sort: "createTime",
|
||||
order: "desc",
|
||||
sn: "",
|
||||
storeName: "",
|
||||
billStatus: "",
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
},
|
||||
selectList: [],
|
||||
selectCount: 0,
|
||||
@@ -102,14 +160,32 @@ export default {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
handleStatusChange(name) {
|
||||
this.searchForm.billStatus = name;
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.getDataList();
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {
|
||||
this.searchForm.startDate = this.selectDate[0];
|
||||
this.searchForm.endDate = this.selectDate[1];
|
||||
} else {
|
||||
this.searchForm.startDate = null;
|
||||
this.searchForm.endDate = null;
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
handleReset() {
|
||||
this.selectDate = [];
|
||||
this.searchForm.sn = "";
|
||||
this.searchForm.storeName = "";
|
||||
this.searchForm.startDate = null;
|
||||
this.searchForm.endDate = null;
|
||||
this.handleSearch();
|
||||
},
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
if (this.searchForm.startTime) {
|
||||
this.searchForm.startTime = this.$filters.unixToDate(this.searchForm.startTime / 1000);
|
||||
}
|
||||
if (this.searchForm.endTime) {
|
||||
this.searchForm.endTime = this.$filters.unixToDate(this.searchForm.endTime / 1000);
|
||||
}
|
||||
API_Shop.getBuyBillPage(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="结算信息" class="tab" name="settlement">
|
||||
<el-alert type="error" :closable="false" show-icon>
|
||||
<el-alert type="info" :closable="false" show-icon>
|
||||
已添加<span class="theme_color">{{ settlementCycle.length }}</span
|
||||
>个结算日,最多可添加5个结算日,当月不包含所设日期时,将会顺延到下一个结算日
|
||||
</el-alert>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { markRaw } from "vue";
|
||||
import {
|
||||
ArrowRight,
|
||||
DataAnalysis,
|
||||
@@ -40,25 +41,25 @@ const REPORT_MODULES = [
|
||||
name: "storePerformanceReport",
|
||||
title: "店铺业绩报表",
|
||||
desc: "支付金额、营业额、转化率及同环比分析",
|
||||
icon: TrendCharts,
|
||||
icon: markRaw(TrendCharts),
|
||||
},
|
||||
{
|
||||
name: "goodsComparisonReport",
|
||||
title: "商品同比环比报表",
|
||||
desc: "商品销售金额、销量占比及同环比对比",
|
||||
icon: DataAnalysis,
|
||||
icon: markRaw(DataAnalysis),
|
||||
},
|
||||
{
|
||||
name: "salesOrderDetailReport",
|
||||
title: "销售订单明细报表",
|
||||
desc: "订单流水、收款明细与优惠明细",
|
||||
icon: Document,
|
||||
icon: markRaw(Document),
|
||||
},
|
||||
{
|
||||
name: "goodsSalesSummaryReport",
|
||||
title: "商品销售汇总报表",
|
||||
desc: "商品销量、净销售额及优惠汇总",
|
||||
icon: Goods,
|
||||
icon: markRaw(Goods),
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -175,9 +175,11 @@ export default {
|
||||
this.loadData();
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.loadData();
|
||||
},
|
||||
beforeUnmount() {
|
||||
if (this.trendChart) {
|
||||
this.trendChart.destroy();
|
||||
@@ -244,6 +246,8 @@ export default {
|
||||
this.trendChart = null;
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
const container = document.getElementById("memberTrendChart");
|
||||
if (!container) return;
|
||||
this.trendChart = new Chart({
|
||||
container: "memberTrendChart",
|
||||
autoFit: true,
|
||||
@@ -280,13 +284,15 @@ export default {
|
||||
},
|
||||
async loadData() {
|
||||
const query = { ...this.params };
|
||||
const [overviewRes, analysisRes, genderRes, regionRes, trendRes] = await Promise.all([
|
||||
API_Statistics.getMemberOverview(query),
|
||||
API_Statistics.getMemberAnalysis(query),
|
||||
API_Statistics.getMemberGenderDistribution(),
|
||||
API_Statistics.getMemberRegionDistribution(),
|
||||
API_Statistics.getMemberNewTrend(query),
|
||||
]);
|
||||
const [overviewRes, analysisRes, genderRes, regionRes, trendRes] = (
|
||||
await Promise.allSettled([
|
||||
API_Statistics.getMemberOverview(query),
|
||||
API_Statistics.getMemberAnalysis(query),
|
||||
API_Statistics.getMemberGenderDistribution(),
|
||||
API_Statistics.getMemberRegionDistribution(),
|
||||
API_Statistics.getMemberNewTrend(query),
|
||||
])
|
||||
).map((r) => (r.status === "fulfilled" ? r.value : null));
|
||||
if (overviewRes && overviewRes.success) {
|
||||
this.overview = overviewRes.result || {};
|
||||
}
|
||||
|
||||
@@ -458,7 +458,6 @@ export default {
|
||||
|
||||
clickBreadcrumb(item, index) {
|
||||
let callback = JSON.parse(JSON.stringify(item));
|
||||
console.log("callback",callback)
|
||||
this.orderParams = callback;
|
||||
|
||||
this.overViewParams = callback;
|
||||
@@ -482,6 +481,8 @@ export default {
|
||||
this.chartList = res.result;
|
||||
|
||||
if (!this.orderChart) {
|
||||
const container = document.getElementById("orderChart");
|
||||
if (!container) return;
|
||||
this.orderChart = new Chart({
|
||||
container: "orderChart",
|
||||
autoFit: true,
|
||||
|
||||
@@ -1103,7 +1103,6 @@ export default {
|
||||
|
||||
|
||||
handleContextMenu(val) {
|
||||
console.log('handleContextMenu', val);
|
||||
this.selectedGroupData = val;
|
||||
},
|
||||
// 编辑分组
|
||||
@@ -1450,10 +1449,7 @@ export default {
|
||||
this.init();
|
||||
ElMessage.success("批量删除文件成功");
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("失败", err);
|
||||
});
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 单个删除文件
|
||||
|
||||
@@ -70,7 +70,6 @@ export default {
|
||||
this.selected = v;
|
||||
getSetting(v).then((res) => {
|
||||
if (res.result) {
|
||||
console.log(res);
|
||||
this.modalVisible = true;
|
||||
this.form = res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user