This commit is contained in:
余同学 2024-12-06 19:14:50 +08:00
parent a40bf2970e
commit b66f585487
16 changed files with 1059 additions and 50 deletions

View File

@ -0,0 +1,32 @@
import $http from "@/utils/httpRequest.js";
//
export const dataCenter = {
customerAnalysis: (data) => {
return $http.request({
url: `/merchant-api/pc/data/analyse/customer/analyse`,
method: "get",
params: data,
});
},
customerTrend: (data) => {
return $http.request({
url: `/merchant-api/pc/data/analyse/customer/trend`,
method: "get",
params: data,
});
},
updatePreSaleProducts: (data) => {
return $http.request({
url: `/merchant-api/product/save/advance/sell`,
method: "post",
data,
});
},
closePreSaleProducts: (data) => {
return $http.request({
url: `/merchant-api/product/update/advance/sell/status`,
method: "post",
data,
});
},
};

View File

@ -15,4 +15,12 @@ export const marketing = {
params: data, params: data,
}); });
}, },
//积分列表
integralList: (data) => {
return $http.request({
url: `/merchant-api/memberUnitMemberTask/list`,
method: "post",
data,
});
},
}; };

View File

@ -23,4 +23,12 @@ export const preSale = {
data, data,
}); });
}, },
closePreSaleProducts: (data) => {
return $http.request({
url: `/merchant-api/product/update/advance/sell/status`,
method: "post",
data,
});
},
}; };

View File

@ -305,6 +305,111 @@ export default {
}, },
], ],
}, },
{
menuId: getUUID(),
parentId: 0,
parentName: null,
name: "代理商",
url: "",
perms: "",
type: 0,
elIcon: "el-icon-tickets",
orderNum: 0,
open: null,
list: [
{
menuId: getUUID(),
parentId: 0,
parentName: null,
name: "数据面板",
url: "agent/data-panel/index",
perms: "",
type: 1,
elIcon: "el-icon-user",
orderNum: 0,
open: null,
list: [],
},
{
menuId: getUUID(),
parentId: 0,
parentName: null,
name: "品牌管理",
url: "agent/brand/index",
perms: "",
type: 1,
elIcon: "el-icon-data-analysis",
orderNum: 0,
open: null,
list: [],
},
{
menuId: getUUID(),
parentId: 0,
parentName: null,
name: "报表",
url: "agent/report-form/index",
perms: "",
type: 1,
elIcon: "el-icon-shopping-cart-full",
orderNum: 0,
open: null,
list: [],
},
{
menuId: getUUID(),
parentId: 0,
parentName: null,
name: "市场列表",
url: "agent/market-list/index",
perms: "",
type: 1,
elIcon: "el-icon-shopping-cart-full",
orderNum: 0,
open: null,
list: [],
},
{
menuId: getUUID(),
parentId: 0,
parentName: null,
name: "店铺列表",
url: "agent/shop-list/index",
perms: "",
type: 1,
elIcon: "el-icon-shopping-cart-full",
orderNum: 0,
open: null,
list: [],
},
{
menuId: getUUID(),
parentId: 0,
parentName: null,
name: "分销商列表",
url: "agent/distributor/index",
perms: "",
type: 1,
elIcon: "el-icon-shopping-cart-full",
orderNum: 0,
open: null,
list: [],
},
{
menuId: getUUID(),
parentId: 0,
parentName: null,
name: "权限管理",
url: "agent/jurisdiction/index",
perms: "",
type: 1,
elIcon: "el-icon-shopping-cart-full",
orderNum: 0,
open: null,
list: [],
},
],
},
], ],
code: 0, code: 0,
permissions: [], permissions: [],

View File

@ -0,0 +1,15 @@
<template>
<div>
品牌管理
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
数据面板
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
分销商
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
权限管理
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
市场列表
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
报表
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
店铺列表
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

View File

@ -35,7 +35,7 @@
> >
</el-option> </el-option>
</el-select> </el-select>
<el-button type="primary">查询</el-button> <el-button @click="getList" type="primary">查询</el-button>
<el-button type="success">导出</el-button> <el-button type="success">导出</el-button>
</div> </div>
<div class="stat-list"> <div class="stat-list">
@ -44,14 +44,20 @@
<div class="stat-right"> <div class="stat-right">
<div class="stat-title">展现量 </div> <div class="stat-title">展现量 </div>
<div class="stat-value"> <div class="stat-value">
<span style="font-size: 20px">562</span> <span style="font-size: 20px">{{
<span style="font-size: 16px; margin: 0 5px; color: green"></span> analysis.viewCount ? analysis.viewCount : "0"
}}</span>
<span <span
style="font-size: 16px; margin: 0 5px; color: red" v-if="analysis.viewCountRatio < 0"
v-if="false" style="font-size: 16px; margin: 0 5px; color: green"
></span
>
<span style="font-size: 16px; margin: 0 5px; color: red" v-else
></span ></span
> >
<span style="font-size: 16px">56%</span> <span style="font-size: 16px">{{
absoluteValue(analysis.viewCountRatio)
}}</span>
</div> </div>
</div> </div>
</div> </div>
@ -62,12 +68,16 @@
<div class="stat-value"> <div class="stat-value">
<span style="font-size: 20px">62</span> <span style="font-size: 20px">62</span>
<span <span
v-if="analysis.peopleCountRatio < 0"
style="font-size: 16px; margin: 0 5px; color: green" style="font-size: 16px; margin: 0 5px; color: green"
v-if="false"
></span ></span
> >
<span style="font-size: 16px; margin: 0 5px; color: red"></span> <span style="font-size: 16px; margin: 0 5px; color: red" v-else
<span style="font-size: 16px">56%</span> ></span
>
<span style="font-size: 16px">{{
absoluteValue(analysis.peopleCountRatio)
}}</span>
</div> </div>
</div> </div>
</div> </div>
@ -76,14 +86,20 @@
<div class="stat-right"> <div class="stat-right">
<div class="stat-title">新客数量 </div> <div class="stat-title">新客数量 </div>
<div class="stat-value"> <div class="stat-value">
<span style="font-size: 20px">62</span> <span style="font-size: 20px">{{
analysis.newPeopleCount ? analysis.newPeopleCount : "0"
}}</span>
<span <span
v-if="analysis.newPeopleCountRatio"
style="font-size: 16px; margin: 0 5px; color: green" style="font-size: 16px; margin: 0 5px; color: green"
v-if="false"
></span ></span
> >
<span style="font-size: 16px; margin: 0 5px; color: red"></span> <span style="font-size: 16px; margin: 0 5px; color: red" v-else
<span style="font-size: 16px">56%</span> ></span
>
<span style="font-size: 16px">{{
absoluteValue(analysis.newPeopleCountRatio)
}}</span>
</div> </div>
</div> </div>
</div> </div>
@ -91,21 +107,27 @@
<i style="font-size: 22px" class="el-icon-user-solid"></i> <i style="font-size: 22px" class="el-icon-user-solid"></i>
<div class="stat-right"> <div class="stat-right">
<div class="stat-title">支付订单人数 </div> <div class="stat-title">支付订单人数 </div>
<div style="font-size: 20px" class="stat-value">199</div> <div style="font-size: 20px" class="stat-value">
{{ analysis.payCount ? analysis.payCount : "0" }}
</div>
</div> </div>
</div> </div>
<div class="stat-item"> <div class="stat-item">
<i style="font-size: 22px" class="el-icon-s-order"></i> <i style="font-size: 22px" class="el-icon-s-order"></i>
<div class="stat-right"> <div class="stat-right">
<div class="stat-title">支付订单转化率 %</div> <div class="stat-title">支付订单转化率 %</div>
<div style="font-size: 20px" class="stat-value">1256</div> <div style="font-size: 20px" class="stat-value">
{{ analysis.payConversion ? analysis.payConversion : "0" }}
</div>
</div> </div>
</div> </div>
<div class="stat-item"> <div class="stat-item">
<i style="font-size: 22px" class="el-icon-s-order"></i> <i style="font-size: 22px" class="el-icon-s-order"></i>
<div class="stat-right"> <div class="stat-right">
<div class="stat-title">客户复购率 %</div> <div class="stat-title">客户复购率 %</div>
<div style="font-size: 20px" class="stat-value">1256</div> <div style="font-size: 20px" class="stat-value">
{{ analysis.repurchaseRate ? analysis.repurchaseRate : "0" }}
</div>
</div> </div>
</div> </div>
</div> </div>
@ -124,18 +146,45 @@
</template> </template>
<script> <script>
import { mapState } from "vuex";
import * as echarts from "echarts"; import * as echarts from "echarts";
export default { export default {
data() { data() {
return { return {
value1: "", value1: "",
value: "", value: "",
formInline: {
marketId: "",
shopId: "",
brandId: "",
countType: "",
dataType: "",
provinceCode: "",
cityCode: "",
},
analysis: {},
trend: [],
}; };
}, },
mounted() { mounted() {
this.init(); this.formInline = {
marketId: this.marketId,
shopId: this.shopId,
brandId: JSON.parse(sessionStorage.getItem("userInfo")).brandId,
};
this.getList();
}, },
methods: { methods: {
getList() {
console.log("1213");
this.$api.dataCenter.customerAnalysis(this.formInline).then((res) => {
this.analysis = res.data.data;
});
this.$api.dataCenter.customerTrend(this.formInline).then((res) => {
console.log(res);
});
this.init();
},
init() { init() {
this.$nextTick(() => { this.$nextTick(() => {
// 线 // 线
@ -200,6 +249,21 @@ export default {
], ],
}; };
}, },
absoluteValue(row) {
if (row === 0) {
return 0;
}
return Math.abs(row);
},
},
computed: {
...mapState("userData", [
"isMerchant",
"marketList",
"storeList",
"marketId",
"shopId",
]),
}, },
}; };
</script> </script>

View File

@ -1,15 +1,226 @@
<template> <template>
<div> <div style="height: calc(100vh - 200px)">
积分商城 <obj-table-plus
ref="oTable"
style="height: 100%"
:tableCols="tableCols"
:tableProp="tableProp"
@query="queryList"
v-model="dataList"
:tableEvent="tableEvent"
:enableAutoQuery="false"
>
<template slot="tableTop">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="商品ID">
<el-input
placeholder="请输入商品ID"
v-model="formInline.name"
></el-input>
</el-form-item>
<el-form-item label="商品名称">
<el-input
placeholder="请输入商品名称"
v-model="formInline.name"
></el-input>
</el-form-item>
<el-form-item label="商品状态">
<el-select
@change="getData"
v-model="formInline.marketId"
placeholder="请选择"
>
<el-option
v-for="item in marketList"
:key="item.marketId"
:label="item.marketName"
:value="item.marketId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="积分数量">
<el-input
placeholder="请输入手机号"
v-model="formInline.name"
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="$refs.oTable.reload()"
>查询</el-button
>
<el-button type="primary" @click="$refs.oTable.reload()"
>重置</el-button
>
</el-form-item>
</el-form>
<div class="mb-2">
<el-button type="primary" size="small">+添加</el-button>
</div>
</template>
</obj-table-plus>
<!-- 添加或编辑 -->
<!-- <add-or-update
@queryList="$refs.oTable.reload()"
ref="addOrUpdate"
></add-or-update> -->
<!-- 查看详情 -->
<!-- <viewDetails ref="viewDetails"></viewDetails> -->
</div> </div>
</template> </template>
<script> <script>
// import AddOrUpdate from "./popup/add-or-update.vue";
// import viewDetails from "./popup/view-details.vue";
import { mapState } from "vuex";
export default { export default {
// components: { AddOrUpdate },
} data() {
return {
dataList: [],
formInline: {
marketId: "",
shopId: "",
unitType: "",
},
tableProp: {
"auto-resize": true,
border: true,
height: "auto",
"row-id": "id",
"show-overflow": false,
},
productFilterType: "SALE",
selectList: [],
value1: [],
};
},
created() {
this.formInline = {
unitType: JSON.parse(sessionStorage.getItem("userInfo")).unitType,
marketId: this.marketId,
shopId: "",
};
this.$nextTick(() => {
this.$refs.oTable.reload();
});
},
methods: {
getData() {
this.$api.mer_admin
.storeList({ marketId: this.formInline.marketId })
.then((res) => {
this.storeList = res.data.data;
// this.formInline.shopId = res.data.data[0].shopId;
this.$nextTick(() => {
this.$refs.oTable.reload();
});
});
},
queryList(pageNo, pageSize) {
this.$api.marketing
.marketingUserPage({
pageNumber: pageNo,
pageSize: pageSize,
...this.formInline,
})
.then((res) => {
console.log(res);
this.$refs.oTable.complete(
res.data.data.data,
Number(res.data.data.total)
);
})
.catch((err) => {
this.$refs.oTable.complete(false);
});
},
},
computed: {
tableCols() {
return [
{ type: "checkbox", width: "60px", fixed: "left" },
// { type: "seq", width: "60px", align: "center", title: "" },
{
title: "商品ID",
align: "center",
field: "name",
},
{
title: "商品名称",
align: "center",
field: "publisher",
type: "jsx",
render: ({ row }) => {
if (row.publisher === "MERCHANT") {
return <span>店铺</span>;
} else if (row.publisher == "PLATFORM") {
return <span>平台</span>;
}
},
},
{
title: "兑换积分",
align: "center",
field: "name",
},
{
title: "剩余兑换库存",
align: "center",
field: "name",
},
{
title: "兑换状态",
align: "center",
field: "name",
},
{
title: "已兑换数",
align: "center",
field: "name",
},
{
title: "操作",
fixed: "right",
type: "jsx",
align: "center",
width: "140px",
render: (row) => {
let edit = () => {
// this.$refs.viewDetails.toggle(row).update();
};
return (
<div>
<el-button size="mini" type="primary" onClick={edit}>
编辑
</el-button>
<el-button size="mini" type="danger" onClick={edit}>
删除
</el-button>
</div>
);
},
},
];
},
tableEvent() {
return {
"checkbox-all": ({ records, reserves }) => {
this.selectList = [...records, ...reserves];
},
"checkbox-change": ({ records, reserves }) => {
this.selectList = [...records, ...reserves];
},
};
},
...mapState("userData", [
"isMerchant",
"marketList",
"storeList",
"marketId",
"shopId",
]),
},
};
</script> </script>
<style> <style lang="scss" scoped></style>
</style>

View File

@ -1,15 +1,375 @@
<template> <template>
<div> <div>
积分订单 <div v-if="isShopId" style="height: calc(100vh - 200px)">
<obj-table-plus
ref="oTable"
style="height: 100%"
:tableCols="tableCols"
:tableProp="tableProp"
@query="queryList"
v-model="dataList"
:tableEvent="tableEvent"
:enableAutoQuery="false"
>
<template slot="tableTop">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="订单号">
<el-input
v-model="formInline.name"
placeholder="订单号搜索"
></el-input>
</el-form-item>
<el-form-item label="商品名称">
<el-input
v-model="formInline.name"
placeholder="商品名称或id"
></el-input>
</el-form-item>
<el-form-item label="下单时间">
<el-date-picker
v-model="value1"
type="datetimerange"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="$refs.oTable.reload()"
>查询</el-button
>
<el-button type="primary" @click="Reset">重置</el-button>
</el-form-item>
</el-form>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
v-for="item in statusList"
:key="item.value"
:label="item.label"
:name="item.value"
></el-tab-pane>
</el-tabs>
<div class="mb-2">
<el-button type="primary" size="small" @click="addProduct"
>批量导出</el-button
>
</div>
</template>
</obj-table-plus>
<!-- 添加或编辑 -->
<!-- <add-or-update
:marketId="formInline.marketId"
:shopId="formInline.shopId"
@queryList="$refs.oTable.reload()"
ref="addOrUpdate"
></add-or-update> -->
</div>
<div style="height: calc(100vh - 200px)" v-else>
<el-empty :image-size="200" description="您不是摊主哦"></el-empty>
</div>
</div> </div>
</template> </template>
<script> <script>
// import AddDiscount from "./popup/add-discount.vue";
// import AddPrice from "./popup/add-price.vue";
// import AddOrUpdate from "./popup/add-or-update.vue";
// import earlyWarning from "./popup/early-warning.vue";
export default { export default {
// components: { earlyWarning, AddOrUpdate },
} data() {
return {
activeName: "5",
value1: "1",
advanceSellStatus: "",
dataList: [],
formInline: {
name: "",
marketId: "",
shopId: "",
},
marketList: [],
tableProp: {
"auto-resize": true,
border: true,
height: "auto",
"row-id": "id",
"show-overflow": false,
},
statusList: [
{
label: "全部",
value: "5",
},
{
label: "代发货",
value: "0",
},
{
label: "带收货",
value: "1",
},
{
label: "待评价",
value: "2",
},
{
label: "已取消",
value: "3",
},
{
label: "交易关闭",
value: "3",
},
{
label: "已完成",
value: "3",
},
],
productFilterType: "SALE",
selectList: [],
isShopId: "",
storeList: [],
};
},
created() {
if (JSON.parse(sessionStorage.getItem("userInfo")).markets?.length > 0) {
this.isShopId = true;
this.formInline.marketId = JSON.parse(
sessionStorage.getItem("userInfo")
).markets[0].marketId;
this.marketList = JSON.parse(sessionStorage.getItem("userInfo")).markets;
console.log(this.marketList);
this.getData();
} else if (JSON.parse(sessionStorage.getItem("userInfo")).shopId) {
(this.formInline.shopId = JSON.parse(
sessionStorage.getItem("userInfo")
).shopId),
(this.isShopId = true);
this.$nextTick(() => {
this.$refs.oTable.reload();
});
} else {
this.isShopId = false;
}
},
methods: {
getData() {
this.$api.mer_admin
.storeList({ marketId: this.formInline.marketId })
.then((res) => {
this.storeList = res.data.data;
this.formInline.shopId = res.data.data[0].shopId;
this.$nextTick(() => {
this.$refs.oTable.reload();
});
});
},
addProduct() {
this.$refs.addOrUpdate.toggle().add();
},
deleteProduct() {
console.log(this.selectList);
let integers = this.selectList.map((item) => {
return item.id;
});
this.$confirm("此操作将删除该商品, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
console.log("111");
this.$api.mer_admin.BatchDeleteProducts(integers).then((res) => {
this.$refs.oTable.reload();
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
queryList(pageNo, pageSize) {
this.$api.preSale
.preSaleProducts({
pageNumber: pageNo,
pageSize: pageSize,
...this.formInline,
advanceSellStatus: this.advanceSellStatus,
merchantId: JSON.parse(sessionStorage.getItem("userInfo")).merchantId,
productQuerySortParam: [],
})
.then((res) => {
console.log(res);
this.$refs.oTable.complete(
res.data.data.data,
Number(res.data.data.total)
);
})
.catch((err) => {
this.$refs.oTable.complete(false);
});
},
Reset() {
this.formInline = {
name: "",
marketId: JSON.parse(sessionStorage.getItem("userInfo")).markets[0]
.marketId,
};
this.$refs.oTable.reload();
},
handleClick(e) {
console.log(e.name);
if (e.name == "5") {
this.advanceSellStatus = "";
} else {
this.advanceSellStatus = e.name;
}
this.$refs.oTable.reload();
},
addEarlyWarning() {
this.$refs.earlyWarning.toggle().add();
},
},
computed: {
tableCols() {
return [
{ type: "checkbox", width: "60px", fixed: "left" },
// { type: "seq", width: "60px", align: "center", title: "" },
{
title: "订单号",
align: "center",
field: "id",
},
{
title: "订单商品",
field: "productPhotoList",
align: "center",
width: "80px",
type: "jsx",
render: ({ row }) => {
if (row.productPhotoList.length > 0) {
return (
<el-image
preview-src-list={row.productPhotoList.map((item) => {
return item.url;
})}
src={row.productPhotoList[0].url}
></el-image>
);
} else {
return <span>暂无商品图</span>;
}
},
},
{
title: "规格/数量",
align: "center",
field: "startTime",
type: "jsx",
render: ({ row }) => {
return (
<span>
{row.startTime}{row.endTime}
</span>
);
},
},
{
title: "兑换积分",
align: "center",
field: "minSalePrice",
type: "jsx",
render: ({ row }) => {
return (
<span>
{row.balancePaymentStartTime}{row.balancePaymentEndTime}
</span>
);
},
},
{
title: "下单时间",
align: "center",
field: "presalePrice",
type: "jsx",
render: ({ row }) => {
if (
Math.min.apply(
Math,
row.productSpecificationList.map((item) => item.presalePrice)
) ==
Math.max.apply(
Math,
row.productSpecificationList.map((item) => item.presalePrice)
)
) {
return (
<span>
{Math.min.apply(
Math,
row.productSpecificationList.map(
(item) => item.presalePrice
)
)}
</span>
);
} else {
return (
<span>
{Math.min.apply(
Math,
row.productSpecificationList.map(
(item) => item.presalePrice
)
)}
{Math.max.apply(
Math,
row.productSpecificationList.map(
(item) => item.presalePrice
)
)}
</span>
);
}
},
},
{
title: "操作",
fixed: "right",
type: "jsx",
align: "center",
width: "100px",
render: ({ row }) => {
let changeInventory = () => {
this.$refs.addStock.toggle(row).update();
};
return (
<div>
<el-button size="mini" type="primary" onClick={changeInventory}>
查看
</el-button>
</div>
);
},
},
];
},
tableEvent() {
return {
"checkbox-all": ({ records, reserves }) => {
this.selectList = [...records, ...reserves];
},
"checkbox-change": ({ records, reserves }) => {
this.selectList = [...records, ...reserves];
},
};
},
},
};
</script> </script>
<style> <style lang="scss" scoped></style>
</style>

View File

@ -1,15 +1,129 @@
<template> <template>
<div> <div>
积分设置 <div class="tips">
此页面数据在每日0点提交并生效;请勿频繁操作以免影响用户体验
</div>
<div class="tipsLevel">积分/成长值任务9</div>
<div class="tipsLevel" v-if="storeList.length > 0">
<el-select v-model="formInline.shopId" placeholder="请选择">
<el-option
v-for="item in storeList"
:key="item.shopId"
:label="item.shopName"
:value="item.shopId"
>
</el-option>
</el-select>
<el-button style="margin-left: 20px" @click="getList" type="primary"
>查询</el-button
>
</div>
<el-table :data="list" :border="true" style="width: 100%">
<el-table-column align="center" label="任务名称" prop="taskName" />
<el-table-column align="center" label="任务描述" prop="taskConfigDetail" />
<el-table-column
align="center"
label="排序"
prop="taskSort"
/>
<el-table-column
align="center"
label="状态"
prop="packageEffectiveTimeUnit"
>
<template v-slot="scope">
<span>{{
scope.row.packageEffectiveTimeUnit == 1 ? "年" : "月"
}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="240">
<template v-slot="scope">
<el-button @click="add(scope.row)" type="primary">编辑</el-button>
<el-button @click="add(scope.row)" type="primary">转移</el-button>
<el-popconfirm
confirm-button-text="确定"
cancel-button-text="取消"
icon-color="#626AEF"
title="确定删除吗?"
@confirm="confirmEvent(scope.row)"
@cancel="cancelEvent"
>
<template #reference>
<el-button type="danger">删除</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</div> </div>
</template> </template>
<script> <script>
import { mapState } from "vuex";
export default { export default {
data() {
} return {
list: [],
formInline: {
unitType: "1",
marketId: "",
shopId: "",
},
};
},
created() {
this.formInline = {
unitType: JSON.parse(sessionStorage.getItem("userInfo")).unitType,
marketId: this.marketId,
shopId: this.shopId,
};
this.getList();
},
methods: {
// getData() {
// this.$api.mer_admin
// .storeList({ marketId: this.formInline.marketId })
// .then((res) => {
// this.storeList = res.data.data;
// this.formInline.shopId = res.data.data[0].shopId;
// this.$nextTick(() => {
// this.getList();
// });
// });
// },
getList() {
this.$api.marketing.integralList(this.formInline).then((res) => {
this.list = res.data.data;
});
},
add() {},
confirmEvent() {},
cancelEvent() {},
},
computed: {
...mapState("userData", [
"isMerchant",
"marketList",
"storeList",
"marketId",
"shopId",
]),
},
};
</script> </script>
<style> <style scoped lang="scss" >
.tips {
padding: 15px;
margin-bottom: 20px;
border-radius: 10px;
width: 100%;
font-size: 16px;
background: #e5e5e5;
color: #faa639;
}
.tipsLevel {
margin: 20px 0;
}
</style> </style>

View File

@ -89,7 +89,7 @@
type="danger" type="danger"
size="small" size="small"
@click="deleteProduct" @click="deleteProduct"
>批量删除</el-button >批量关闭</el-button
> >
<el-button type="primary" size="small" @click="addProduct" <el-button type="primary" size="small" @click="addProduct"
>添加商品</el-button >添加商品</el-button
@ -500,9 +500,15 @@ export default {
console.log(row); console.log(row);
this.$refs.addOrUpdate.toggle(row).update(); this.$refs.addOrUpdate.toggle(row).update();
}; };
let priceAdjustment = () => { let close = () => {
console.log(row); this.$api.preSale
this.$refs.AddPrice.toggle(row).update(); .closePreSaleProducts({
productIds: [row.id],
advanceSellStatus: 3,
})
.then((res) => {
this.$refs.oTable.reload();
});
}; };
let changeInventory = () => { let changeInventory = () => {
this.$refs.addStock.toggle(row).update(); this.$refs.addStock.toggle(row).update();
@ -512,30 +518,26 @@ export default {
}; };
return ( return (
<div> <div>
<el-button size="mini" type="primary" onClick={priceAdjustment}> <el-button size="mini" type="primary" onClick={changeInventory}>
查看 查看
</el-button> </el-button>
<el-button size="mini" type="primary" onClick={edit}>
编辑
</el-button>
<el-button <el-button
v-show={ v-show={
row.advanceSellStatus != "0" && row.advanceSellStatus != "2" row.advanceSellStatus == "0" || row.advanceSellStatus == "1"
} }
size="mini" size="mini"
type="primary" type="primary"
onClick={changeInventory} onClick={edit}
> >
关闭 编辑
</el-button> </el-button>
<el-button <el-button
v-show={row.advanceSellStatus != "1"} v-show={row.advanceSellStatus == "1"}
size="mini" size="mini"
type="primary" type="primary"
onClick={setDiscounts} onClick={close}
> >
删除 关闭
</el-button> </el-button>
</div> </div>
); );