Merge branch 'master' of http://60.204.229.151:20080/chenkangxu/merchant-web
This commit is contained in:
commit
ab920f2bc3
|
@ -0,0 +1,20 @@
|
||||||
|
import $http from "@/utils/httpRequest.js";
|
||||||
|
//代理商
|
||||||
|
export const agent = {
|
||||||
|
//商铺列表
|
||||||
|
agentShopPage: (data) => {
|
||||||
|
return $http.request({
|
||||||
|
url: `/merchant-api/agent/shop/page`,
|
||||||
|
method: "get",
|
||||||
|
params: data,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//市场列表
|
||||||
|
agentMarketPage: (data) => {
|
||||||
|
return $http.request({
|
||||||
|
url: `/merchant-api/agent/market/page`,
|
||||||
|
method: "get",
|
||||||
|
params: data,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
|
@ -15,18 +15,36 @@ export const dataCenter = {
|
||||||
params: data,
|
params: data,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updatePreSaleProducts: (data) => {
|
//商品分析
|
||||||
|
productAnalysis: (data) => {
|
||||||
return $http.request({
|
return $http.request({
|
||||||
url: `/merchant-api/product/save/advance/sell`,
|
url: `/merchant-api/pc/data/analyse/product/analyse`,
|
||||||
method: "post",
|
method: "get",
|
||||||
data,
|
params: data,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
closePreSaleProducts: (data) => {
|
//订单分析
|
||||||
|
orderAnalysis: (data) => {
|
||||||
return $http.request({
|
return $http.request({
|
||||||
url: `/merchant-api/product/update/advance/sell/status`,
|
url: `/merchant-api/pc/data/analyse/order/analyse`,
|
||||||
method: "post",
|
method: "get",
|
||||||
data,
|
params: data,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//订单结算统计
|
||||||
|
orderSummary: (data) => {
|
||||||
|
return $http.request({
|
||||||
|
url: `/merchant-api/pc/data/analyse/settle/summary`,
|
||||||
|
method: "get",
|
||||||
|
params: data,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//订单结算明细
|
||||||
|
orderSummaryPage: (data) => {
|
||||||
|
return $http.request({
|
||||||
|
url: `/merchant-api/pc/data/analyse/settle/page`,
|
||||||
|
method: "get",
|
||||||
|
params: data,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,15 +1,231 @@
|
||||||
<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="菜市场名称">
|
||||||
|
<el-input
|
||||||
|
v-model="formInline.marketName"
|
||||||
|
placeholder="菜市场名称搜索"
|
||||||
|
></el-input>
|
||||||
|
</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>
|
||||||
|
<div class="mb-2"></div>
|
||||||
|
</template>
|
||||||
|
</obj-table-plus>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapState } from "vuex";
|
||||||
export default {
|
export default {
|
||||||
|
components: {},
|
||||||
}
|
data() {
|
||||||
|
return {
|
||||||
|
dataList: [],
|
||||||
|
formInline: {
|
||||||
|
name: "",
|
||||||
|
},
|
||||||
|
tableProp: {
|
||||||
|
"auto-resize": true,
|
||||||
|
border: true,
|
||||||
|
height: "auto",
|
||||||
|
"row-id": "id",
|
||||||
|
"show-overflow": false,
|
||||||
|
},
|
||||||
|
productFilterType: "SALE",
|
||||||
|
selectList: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
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();
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
Reset() {
|
||||||
|
this.formInline = {
|
||||||
|
name: "",
|
||||||
|
};
|
||||||
|
this.$refs.oTable.reload();
|
||||||
|
},
|
||||||
|
queryList(pageNo, pageSize) {
|
||||||
|
this.$api.agent
|
||||||
|
.agentMarketPage({
|
||||||
|
pageNumber: pageNo,
|
||||||
|
pageSize: pageSize,
|
||||||
|
...this.formInline,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
this.$refs.oTable.complete(
|
||||||
|
res.data.data.content,
|
||||||
|
Number(res.data.data.totalElements)
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.$refs.oTable.complete(false);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
tableCols() {
|
||||||
|
return [
|
||||||
|
{ type: "checkbox", width: "60px", fixed: "left" },
|
||||||
|
// { type: "seq", width: "60px", align: "center", title: "序号" },
|
||||||
|
{
|
||||||
|
title: "菜市场名称",
|
||||||
|
align: "center",
|
||||||
|
field: "name",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "地址",
|
||||||
|
align: "center",
|
||||||
|
field: "address",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "经纬度",
|
||||||
|
align: "center",
|
||||||
|
field: "category",
|
||||||
|
type: "jsx",
|
||||||
|
render: ({ row }) => {
|
||||||
|
return (
|
||||||
|
<span>
|
||||||
|
经度:{row.longitude}; 维度:{row.latitude}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "营业执照",
|
||||||
|
align: "center",
|
||||||
|
field: "couponType",
|
||||||
|
type: "jsx",
|
||||||
|
render: ({ row }) => {
|
||||||
|
return (
|
||||||
|
<el-image
|
||||||
|
preview-src-list={[row.license]}
|
||||||
|
src={row.license}
|
||||||
|
></el-image>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "评分",
|
||||||
|
align: "center",
|
||||||
|
field: "score",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "收藏数量",
|
||||||
|
align: "center",
|
||||||
|
field: "collectCount",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "点赞数量",
|
||||||
|
align: "center",
|
||||||
|
field: "likeItCount",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "平台结算比例",
|
||||||
|
align: "center",
|
||||||
|
field: "platformSettleRatio",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "代理商结算比例",
|
||||||
|
align: "center",
|
||||||
|
field: "agentSettleRatio",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "加入时间",
|
||||||
|
align: "center",
|
||||||
|
field: "createTime",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "状态",
|
||||||
|
align: "center",
|
||||||
|
field: "status",
|
||||||
|
type: "jsx",
|
||||||
|
width: "120px",
|
||||||
|
render: ({ row }) => {
|
||||||
|
let changeState = () => {};
|
||||||
|
return (
|
||||||
|
<el-switch
|
||||||
|
onchange={changeState}
|
||||||
|
v-model={row.status}
|
||||||
|
active-text="开"
|
||||||
|
inactive-text="关"
|
||||||
|
active-value={1}
|
||||||
|
inactive-value={0}
|
||||||
|
></el-switch>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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>
|
||||||
|
</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>
|
|
|
@ -1,15 +1,236 @@
|
||||||
<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="摊铺名称">
|
||||||
|
<el-input
|
||||||
|
v-model="formInline.name"
|
||||||
|
placeholder="摊铺名称搜索"
|
||||||
|
></el-input>
|
||||||
|
</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>
|
||||||
|
<div class="mb-2"></div>
|
||||||
|
</template>
|
||||||
|
</obj-table-plus>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapState } from "vuex";
|
||||||
export default {
|
export default {
|
||||||
|
components: {},
|
||||||
}
|
data() {
|
||||||
|
return {
|
||||||
|
dataList: [],
|
||||||
|
formInline: {
|
||||||
|
name: "",
|
||||||
|
},
|
||||||
|
tableProp: {
|
||||||
|
"auto-resize": true,
|
||||||
|
border: true,
|
||||||
|
height: "auto",
|
||||||
|
"row-id": "id",
|
||||||
|
"show-overflow": false,
|
||||||
|
},
|
||||||
|
productFilterType: "SALE",
|
||||||
|
selectList: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
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();
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
Reset() {
|
||||||
|
this.formInline = {
|
||||||
|
name: "",
|
||||||
|
};
|
||||||
|
this.$refs.oTable.reload();
|
||||||
|
},
|
||||||
|
queryList(pageNo, pageSize) {
|
||||||
|
this.$api.agent
|
||||||
|
.agentShopPage({
|
||||||
|
pageNumber: pageNo,
|
||||||
|
pageSize: pageSize,
|
||||||
|
...this.formInline,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
this.$refs.oTable.complete(
|
||||||
|
res.data.data.content,
|
||||||
|
Number(res.data.data.totalElements)
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.$refs.oTable.complete(false);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
tableCols() {
|
||||||
|
return [
|
||||||
|
{ type: "checkbox", width: "60px", fixed: "left" },
|
||||||
|
// { type: "seq", width: "60px", align: "center", title: "序号" },
|
||||||
|
{
|
||||||
|
title: "摊位名称",
|
||||||
|
align: "center",
|
||||||
|
field: "name",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "菜市场名称",
|
||||||
|
align: "center",
|
||||||
|
field: "marketName",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "地址",
|
||||||
|
align: "center",
|
||||||
|
field: "address",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "经纬度",
|
||||||
|
align: "center",
|
||||||
|
field: "category",
|
||||||
|
type: "jsx",
|
||||||
|
render: ({ row }) => {
|
||||||
|
return (
|
||||||
|
<span>
|
||||||
|
经度:{row.longitude}; 维度:{row.latitude}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "营业执照",
|
||||||
|
align: "center",
|
||||||
|
field: "couponType",
|
||||||
|
type: "jsx",
|
||||||
|
render: ({ row }) => {
|
||||||
|
return (
|
||||||
|
<el-image
|
||||||
|
preview-src-list={[row.license]}
|
||||||
|
src={row.license}
|
||||||
|
></el-image>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "评分",
|
||||||
|
align: "center",
|
||||||
|
field: "score",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "收藏数量",
|
||||||
|
align: "center",
|
||||||
|
field: "collectCount",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "点赞数量",
|
||||||
|
align: "center",
|
||||||
|
field: "likeItCount",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "平台结算比例",
|
||||||
|
align: "center",
|
||||||
|
field: "platformSettleRatio",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "代理商结算比例",
|
||||||
|
align: "center",
|
||||||
|
field: "agentSettleRatio",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "加入时间",
|
||||||
|
align: "center",
|
||||||
|
field: "createTime",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "状态",
|
||||||
|
align: "center",
|
||||||
|
field: "status",
|
||||||
|
type: "jsx",
|
||||||
|
width: "120px",
|
||||||
|
render: ({ row }) => {
|
||||||
|
let changeState = () => {};
|
||||||
|
return (
|
||||||
|
<el-switch
|
||||||
|
onchange={changeState}
|
||||||
|
v-model={row.status}
|
||||||
|
active-text="开"
|
||||||
|
inactive-text="关"
|
||||||
|
active-value={1}
|
||||||
|
inactive-value={0}
|
||||||
|
></el-switch>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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>
|
||||||
|
</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>
|
|
|
@ -1,25 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||||
|
<el-form-item label="日期类型">
|
||||||
<el-select
|
<el-select
|
||||||
style="margin-right: 20px"
|
style="margin-right: 20px"
|
||||||
v-model="value1"
|
v-model="formInline.dateType"
|
||||||
placeholder="请选择统计类型"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in [
|
|
||||||
{ value: '1', label: '1' },
|
|
||||||
{ value: '2', label: '2' },
|
|
||||||
]"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
<el-select
|
|
||||||
style="margin-right: 20px"
|
|
||||||
v-model="value"
|
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -35,8 +21,32 @@
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="统计类型">
|
||||||
|
<el-select
|
||||||
|
style="margin-right: 20px"
|
||||||
|
v-model="formInline.elementType"
|
||||||
|
placeholder="请选择统计类型"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in [
|
||||||
|
{ value: '1', label: '浏览数量' },
|
||||||
|
{ value: '2', label: '浏览人数' },
|
||||||
|
{ value: '3', label: '新客数量' },
|
||||||
|
{ value: '4', label: '支付订单人数' },
|
||||||
|
]"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
<el-button @click="getList" type="primary">查询</el-button>
|
<el-button @click="getList" type="primary">查询</el-button>
|
||||||
<el-button type="success">导出</el-button>
|
<el-button @click="batchExport" type="success">导出</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-list">
|
<div class="stat-list">
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
|
@ -48,16 +58,14 @@
|
||||||
analysis.viewCount ? analysis.viewCount : "0"
|
analysis.viewCount ? analysis.viewCount : "0"
|
||||||
}}</span>
|
}}</span>
|
||||||
<span
|
<span
|
||||||
v-if="analysis.viewCountRatio < 0"
|
v-if="analysis.viewCountRatio < '0%'"
|
||||||
style="font-size: 16px; margin: 0 5px; color: green"
|
style="font-size: 16px; margin: 0 5px; color: green"
|
||||||
>↓</span
|
>↓</span
|
||||||
>
|
>
|
||||||
<span style="font-size: 16px; margin: 0 5px; color: red" v-else
|
<span style="font-size: 16px; margin: 0 5px; color: red" v-else
|
||||||
>↑</span
|
>↑</span
|
||||||
>
|
>
|
||||||
<span style="font-size: 16px">{{
|
<span style="font-size: 16px">{{ analysis.viewCountRatio }}</span>
|
||||||
absoluteValue(analysis.viewCountRatio)
|
|
||||||
}}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -66,18 +74,16 @@
|
||||||
<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.peopleCount }}</span>
|
||||||
<span
|
<span
|
||||||
v-if="analysis.peopleCountRatio < 0"
|
v-if="analysis.peopleCountRatio < '0%'"
|
||||||
style="font-size: 16px; margin: 0 5px; color: green"
|
style="font-size: 16px; margin: 0 5px; color: green"
|
||||||
>↓</span
|
>↓</span
|
||||||
>
|
>
|
||||||
<span style="font-size: 16px; margin: 0 5px; color: red" v-else
|
<span style="font-size: 16px; margin: 0 5px; color: red" v-else
|
||||||
>↑</span
|
>↑</span
|
||||||
>
|
>
|
||||||
<span style="font-size: 16px">{{
|
<span style="font-size: 16px">{{ analysis.peopleCountRatio }}</span>
|
||||||
absoluteValue(analysis.peopleCountRatio)
|
|
||||||
}}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -90,7 +96,7 @@
|
||||||
analysis.newPeopleCount ? analysis.newPeopleCount : "0"
|
analysis.newPeopleCount ? analysis.newPeopleCount : "0"
|
||||||
}}</span>
|
}}</span>
|
||||||
<span
|
<span
|
||||||
v-if="analysis.newPeopleCountRatio"
|
v-if="analysis.newPeopleCountRatio < '0%'"
|
||||||
style="font-size: 16px; margin: 0 5px; color: green"
|
style="font-size: 16px; margin: 0 5px; color: green"
|
||||||
>↓</span
|
>↓</span
|
||||||
>
|
>
|
||||||
|
@ -98,7 +104,7 @@
|
||||||
>↑</span
|
>↑</span
|
||||||
>
|
>
|
||||||
<span style="font-size: 16px">{{
|
<span style="font-size: 16px">{{
|
||||||
absoluteValue(analysis.newPeopleCountRatio)
|
analysis.newPeopleCountRatio
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -146,6 +152,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import * as XLSX from "xlsx";
|
||||||
|
import { saveAs } from "file-saver";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
export default {
|
export default {
|
||||||
|
@ -154,59 +162,51 @@ export default {
|
||||||
value1: "",
|
value1: "",
|
||||||
value: "",
|
value: "",
|
||||||
formInline: {
|
formInline: {
|
||||||
marketId: "",
|
dateType: "1",
|
||||||
shopId: "",
|
elementType: "1",
|
||||||
brandId: "",
|
|
||||||
countType: "",
|
|
||||||
dataType: "",
|
|
||||||
provinceCode: "",
|
|
||||||
cityCode: "",
|
|
||||||
},
|
},
|
||||||
analysis: {},
|
analysis: {},
|
||||||
trend: [],
|
trend: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.formInline = {
|
|
||||||
marketId: this.marketId,
|
|
||||||
shopId: this.shopId,
|
|
||||||
brandId: JSON.parse(sessionStorage.getItem("userInfo")).brandId,
|
|
||||||
};
|
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
console.log("1213");
|
console.log("1213");
|
||||||
this.$api.dataCenter.customerAnalysis(this.formInline).then((res) => {
|
this.$api.dataCenter
|
||||||
|
.customerAnalysis({ dateType: this.formInline.dateType })
|
||||||
|
.then((res) => {
|
||||||
this.analysis = res.data.data;
|
this.analysis = res.data.data;
|
||||||
});
|
});
|
||||||
this.$api.dataCenter.customerTrend(this.formInline).then((res) => {
|
this.$api.dataCenter.customerTrend(this.formInline).then((res) => {
|
||||||
console.log(res);
|
this.trend = res.data.data;
|
||||||
|
this.init(res.data.data);
|
||||||
});
|
});
|
||||||
this.init();
|
|
||||||
},
|
},
|
||||||
init() {
|
init(data) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// 折线图
|
// 折线图
|
||||||
const myChat = echarts.init(
|
const myChat = echarts.init(
|
||||||
document.getElementById("echarts-LineChart")
|
document.getElementById("echarts-LineChart")
|
||||||
);
|
);
|
||||||
myChat.setOption(this.LineChart());
|
myChat.setOption(this.LineChart(data));
|
||||||
window.addEventListener("resize", () => {
|
window.addEventListener("resize", () => {
|
||||||
myChat.resize();
|
myChat.resize();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
LineChart() {
|
LineChart(data) {
|
||||||
return {
|
return {
|
||||||
title: {
|
title: {
|
||||||
text: "交易趋势分析",
|
text: "数据趋势分析",
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: "axis",
|
trigger: "axis",
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: ["订单金额", "订单数", "订单商品数"],
|
data: [this.elementTypeName(this.formInline.elementType)],
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
left: "3%",
|
left: "3%",
|
||||||
|
@ -222,38 +222,65 @@ export default {
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: "category",
|
type: "category",
|
||||||
boundaryGap: false,
|
boundaryGap: false,
|
||||||
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
|
data: data.map((item) => {
|
||||||
|
return item.countDate;
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: "value",
|
type: "value",
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: "订单金额",
|
name: this.elementTypeName(this.formInline.elementType),
|
||||||
type: "line",
|
type: "line",
|
||||||
stack: "Total",
|
stack: "Total",
|
||||||
data: [120, 132, 101, 134, 90, 230, 210],
|
data: data.map((item) => {
|
||||||
},
|
return item.value;
|
||||||
{
|
}),
|
||||||
name: "订单数",
|
|
||||||
type: "line",
|
|
||||||
stack: "Total",
|
|
||||||
data: [220, 182, 191, 234, 290, 330, 310],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "订单商品数",
|
|
||||||
type: "line",
|
|
||||||
stack: "Total",
|
|
||||||
data: [150, 232, 201, 154, 190, 330, 410],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
absoluteValue(row) {
|
elementTypeName(row) {
|
||||||
if (row === 0) {
|
if (row == "1") {
|
||||||
return 0;
|
return "浏览数量";
|
||||||
|
} else if (row == "2") {
|
||||||
|
return "浏览人数";
|
||||||
|
} else if (row == "3") {
|
||||||
|
return "新客数量";
|
||||||
|
} else if (row == "4") {
|
||||||
|
return "支付订单人数";
|
||||||
}
|
}
|
||||||
return Math.abs(row);
|
},
|
||||||
|
async batchExport() {
|
||||||
|
let trendData = this.trend.map((item) => {
|
||||||
|
return {
|
||||||
|
日期: item.countDate,
|
||||||
|
数量: item.value,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
let row = this.analysis;
|
||||||
|
const analysisData = [
|
||||||
|
{
|
||||||
|
展现量: row.viewCount,
|
||||||
|
浏览人数: row.peopleCount,
|
||||||
|
新客数量: row.newPeopleCount,
|
||||||
|
支付订单人数: row.payCount,
|
||||||
|
支付订单转化率: row.payConversion,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const workbook = XLSX.utils.book_new();
|
||||||
|
const worksheet = XLSX.utils.json_to_sheet(analysisData);
|
||||||
|
const worksheetOne = XLSX.utils.json_to_sheet(trendData);
|
||||||
|
|
||||||
|
XLSX.utils.book_append_sheet(workbook, worksheet, "总数据");
|
||||||
|
XLSX.utils.book_append_sheet(workbook, worksheetOne, "数据趋势");
|
||||||
|
const excelData = XLSX.write(workbook, {
|
||||||
|
type: "array",
|
||||||
|
bookType: "xlsx",
|
||||||
|
});
|
||||||
|
const blob = new Blob([excelData], { type: "application/octet-stream" });
|
||||||
|
saveAs(blob, "客户分析.xlsx");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||||
|
<el-form-item label="日期类型">
|
||||||
<el-select
|
<el-select
|
||||||
style="margin-right: 20px"
|
style="margin-right: 20px"
|
||||||
v-model="value1"
|
v-model="formInline.dateType"
|
||||||
placeholder="请选择统计类型"
|
placeholder="请选择"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in [
|
v-for="item in [
|
||||||
{ value: '1', label: '1' },
|
{ value: '1', label: '日' },
|
||||||
{ value: '2', label: '2' },
|
{ value: '2', label: '周' },
|
||||||
|
{ value: '3', label: '月' },
|
||||||
|
{ value: '4', label: '年' },
|
||||||
]"
|
]"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
|
@ -17,7 +21,11 @@
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button type="primary">查询</el-button>
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="getList" type="primary">查询</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<div style="font-size: 18px">订单分析</div>
|
<div style="font-size: 18px">订单分析</div>
|
||||||
|
@ -25,58 +33,83 @@
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">435</div>
|
<div style="font-size: 20px" class="stat-value">
|
||||||
|
{{ productList.orderCount }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">45</div>
|
<div style="font-size: 20px" class="stat-value">
|
||||||
|
{{ productList.payCount }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">34</div>
|
<div style="font-size: 20px" class="stat-value">
|
||||||
|
{{ productList.validCount }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">
|
||||||
|
{{ productList.validRatio }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">
|
||||||
|
{{ productList.payMoney }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">
|
||||||
|
{{ productList.refundMoney }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">34</div>
|
<div style="font-size: 20px" class="stat-value">
|
||||||
|
{{ productList.afterSaleCount }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">
|
||||||
|
{{ productList.afterSaleRatio }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding: 20px; border: 1px solid #ccc; margin-top: 20px">
|
</div>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
padding: 20px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
margin-top: 20px;
|
||||||
|
height: 60vh;
|
||||||
|
"
|
||||||
|
>
|
||||||
<div style="font-size: 18px; margin-bottom: 40px">订单结算明细</div>
|
<div style="font-size: 18px; margin-bottom: 40px">订单结算明细</div>
|
||||||
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
<el-form :inline="true" :model="formData" class="demo-form-inline">
|
||||||
<el-form-item label="下单时间">
|
<el-form-item label="下单时间">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
@change="changeValue"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
v-model="value"
|
v-model="value"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
|
@ -86,7 +119,9 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="结算时间">
|
<el-form-item label="结算时间">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="value"
|
@change="changeValueOne"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
v-model="valueOne"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
|
@ -94,12 +129,14 @@
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态:">
|
<el-form-item label="状态:">
|
||||||
<el-select v-model="formInline.marketId" placeholder="请选择状态">
|
<el-select v-model="formData.status" placeholder="请选择状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in [
|
v-for="item in [
|
||||||
{ label: '全部', value: '' },
|
{ label: '全部', value: '' },
|
||||||
{ label: '进行中', value: '1' },
|
{ label: '待结算 ', value: '0' },
|
||||||
|
{ label: ' 部分结算', value: '1' },
|
||||||
{ label: '已结算', value: '2' },
|
{ label: '已结算', value: '2' },
|
||||||
|
{ label: '结算失败', value: '-1' },
|
||||||
]"
|
]"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
|
@ -123,68 +160,92 @@
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<span>退款金额</span><span style="margin-left: 10px">¥</span
|
<span>退款金额</span><span style="margin-left: 10px">¥</span
|
||||||
><span style="font-weight: 600; font-size: 22px">999</span>
|
><span style="font-weight: 600; font-size: 22px">{{
|
||||||
|
orderSummaryList.refundMoney
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span>订单支出</span><span style="margin-left: 10px">¥</span
|
<span>订单支出</span><span style="margin-left: 10px">¥</span
|
||||||
><span style="font-weight: 600; font-size: 22px">999</span>
|
><span style="font-weight: 600; font-size: 22px">{{
|
||||||
|
orderSummaryList.expendMoney
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span>待入账金额</span><span style="margin-left: 10px">¥</span
|
<span>待入账金额</span><span style="margin-left: 10px">¥</span
|
||||||
><span style="font-weight: 600; font-size: 22px">888</span>
|
><span style="font-weight: 600; font-size: 22px">{{
|
||||||
|
orderSummaryList.waitSettleMoney
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span>已入账金额</span><span style="margin-left: 10px">¥</span
|
<span>已入账金额</span><span style="margin-left: 10px">¥</span
|
||||||
><span style="font-weight: 600; font-size: 22px">888</span>
|
><span style="font-weight: 600; font-size: 22px">{{
|
||||||
|
orderSummaryList.settleMoney
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="tableData" border style="width: 100%">
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
style="width: 100%; height: 33vh; overflow-y: scroll"
|
||||||
|
>
|
||||||
<el-table-column align="center" type="index" label="排名" width="50">
|
<el-table-column align="center" type="index" label="排名" width="50">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="date" label="订单编号"> </el-table-column>
|
<el-table-column prop="unitOrderNo" label="订单编号"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="name"
|
prop="payTime"
|
||||||
label="下单时间"
|
label="下单时间"
|
||||||
width="140"
|
width="140"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column align="center" prop="settleTime" label="结算时间">
|
||||||
align="center"
|
|
||||||
prop="name"
|
|
||||||
label="结算时间"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="name"
|
prop="unitSettleAmount"
|
||||||
label="实付金额(元)"
|
label="实付金额(元)"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="name"
|
prop="refundAmount"
|
||||||
label="退款金额(元)"
|
label="退款金额(元)"
|
||||||
width="140"
|
width="140"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="name"
|
prop="finalOutcome"
|
||||||
label="订单支出(元)"
|
label="订单支出(元)"
|
||||||
width="140"
|
width="140"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="name"
|
prop="finalIncome"
|
||||||
label="入账金额(元)"
|
label="入账金额(元)"
|
||||||
width="140"
|
width="140"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="name" label="状态" width="140">
|
<el-table-column align="center" prop="name" label="状态" width="140">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ getStatus(scope.row.status) }}</span>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<div class="pagination-container">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="query.pageNumber"
|
||||||
|
:page-sizes="[10, 20, 30, 50]"
|
||||||
|
:page-size="query.pageSize"
|
||||||
|
:total="total"
|
||||||
|
background
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -193,56 +254,116 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
value1: "",
|
valueOne: [],
|
||||||
value: "",
|
value: [],
|
||||||
formInline: {
|
formInline: {
|
||||||
marketId: "",
|
dateType: "1",
|
||||||
shopId: "",
|
|
||||||
name: "",
|
|
||||||
},
|
},
|
||||||
tableData: [
|
formData: {
|
||||||
{
|
payBeginDate: "",
|
||||||
date: "2016-05-02",
|
payEndDate: "",
|
||||||
name: "王小虎",
|
settleBeginDate: "",
|
||||||
address: "上海市普陀区金沙江路 1518 弄",
|
settleEndDate: "",
|
||||||
url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
|
status: "",
|
||||||
},
|
},
|
||||||
{
|
query: {
|
||||||
date: "2016-05-04",
|
pageNumber: 1,
|
||||||
name: "王小虎",
|
pageSize: 10,
|
||||||
address: "上海市普陀区金沙江路 1517 弄",
|
|
||||||
url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
|
|
||||||
},
|
},
|
||||||
{
|
total: 0,
|
||||||
date: "2016-05-01",
|
tableData: [],
|
||||||
name: "王小虎",
|
productList: {},
|
||||||
address: "上海市普陀区金沙江路 1519 弄",
|
orderSummaryList: {},
|
||||||
url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: "2016-05-03",
|
|
||||||
name: "王小虎",
|
|
||||||
address: "上海市普陀区金沙江路 1516 弄",
|
|
||||||
url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: "2016-05-03",
|
|
||||||
name: "王小虎",
|
|
||||||
address: "上海市普陀区金沙江路 1516 弄",
|
|
||||||
url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getCurrentDate();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {},
|
getList() {
|
||||||
|
this.$api.dataCenter.orderAnalysis(this.formInline).then((res) => {
|
||||||
|
this.productList = res.data.data;
|
||||||
|
});
|
||||||
|
this.$api.dataCenter.orderSummary(this.formData).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
this.orderSummaryList = res.data.data;
|
||||||
|
});
|
||||||
|
this.$api.dataCenter
|
||||||
|
.orderSummaryPage({ ...this.formData, ...this.query })
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
this.tableData = res.data.data.data;
|
||||||
|
this.total = Number(res.data.data.total);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getCurrentDate() {
|
||||||
|
let now = new Date();
|
||||||
|
let year = now.getFullYear();
|
||||||
|
let month = now.getMonth() + 1;
|
||||||
|
let day = now.getDate();
|
||||||
|
console.log(year, month, day);
|
||||||
|
this.value = [
|
||||||
|
year + "-" + month + "-" + day + " 00:00:00",
|
||||||
|
year + "-" + month + "-" + day + " 23:59:59",
|
||||||
|
];
|
||||||
|
this.formData.payBeginDate = year + "-" + month + "-" + day + " 00:00:00";
|
||||||
|
this.formData.payEndDate = year + "-" + month + "-" + day + " 23:59:59";
|
||||||
|
this.valueOne = [
|
||||||
|
year + "-" + month + "-" + day + " 00:00:00",
|
||||||
|
year + "-" + month + "-" + day + " 23:59:59",
|
||||||
|
];
|
||||||
|
this.formData.settleBeginDate =
|
||||||
|
year + "-" + month + "-" + day + " 00:00:00";
|
||||||
|
this.formData.settleEndDate =
|
||||||
|
year + "-" + month + "-" + day + " 23:59:59";
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
changeValue(e) {
|
||||||
|
console.log(e);
|
||||||
|
if (e) {
|
||||||
|
this.formData.payBeginDate = e[0];
|
||||||
|
this.formData.payEndDate = e[1];
|
||||||
|
} else {
|
||||||
|
this.formData.payBeginDate = "";
|
||||||
|
this.formData.payEndDate = "";
|
||||||
|
}
|
||||||
|
// this.formInline.brandId = e;
|
||||||
|
},
|
||||||
|
changeValueOne(e) {
|
||||||
|
console.log(e);
|
||||||
|
if (e) {
|
||||||
|
this.formData.settleBeginDate = e[0];
|
||||||
|
this.formData.settleEndDate = e[1];
|
||||||
|
} else {
|
||||||
|
this.formData.settleBeginDate = "";
|
||||||
|
this.formData.settleEndDate = "";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.query.pageSize = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.query.pageNumber = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
getStatus(row) {
|
||||||
|
if (row == 0) {
|
||||||
|
return "禁用";
|
||||||
|
} else if (row == 1) {
|
||||||
|
return "启用";
|
||||||
|
} else if (row == 2) {
|
||||||
|
return " 已结算";
|
||||||
|
} else {
|
||||||
|
return "结算失败";
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.product {
|
.product {
|
||||||
margin-top: 20px;
|
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
// border: 1px solid #ccc;
|
// border: 1px solid #ccc;
|
||||||
background: #edf4ff;
|
background: #edf4ff;
|
||||||
|
|
|
@ -1,25 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||||
|
<el-form-item label="日期类型">
|
||||||
<el-select
|
<el-select
|
||||||
style="margin-right: 20px"
|
style="margin-right: 20px"
|
||||||
v-model="value1"
|
v-model="formInline.dateType"
|
||||||
placeholder="请选择统计类型"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in [
|
|
||||||
{ value: '1', label: '1' },
|
|
||||||
{ value: '2', label: '2' },
|
|
||||||
]"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
<el-select
|
|
||||||
style="margin-right: 20px"
|
|
||||||
v-model="value"
|
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -35,8 +21,12 @@
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button type="primary">查询</el-button>
|
</el-form-item>
|
||||||
<el-button type="success">导出</el-button>
|
<el-form-item>
|
||||||
|
<el-button @click="getList" type="primary">查询</el-button>
|
||||||
|
<el-button @click="batchExport" type="success">导出</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<div style="font-size: 18px">商品整体概况</div>
|
<div style="font-size: 18px">商品整体概况</div>
|
||||||
|
@ -44,66 +34,100 @@
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">435</div>
|
<div style="font-size: 20px" class="stat-value">
|
||||||
|
{{ productList.onSaleNum }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">45</div>
|
<div style="font-size: 20px" class="stat-value">
|
||||||
|
{{ productList.viewNum }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">34</div>
|
<div style="font-size: 20px" class="stat-value">
|
||||||
|
{{ productList.discountNum }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">
|
||||||
|
{{ productList.preSellNum }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">
|
||||||
|
{{ productList.viewTimes }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">
|
||||||
|
{{ productList.viewPeople }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">34</div>
|
<div style="font-size: 20px" class="stat-value">
|
||||||
|
{{ productList.onCartNum }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">
|
||||||
|
{{ productList.likeCount }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<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">
|
||||||
|
{{ productList.payCount }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding: 10px; border: 1px solid #ccc; margin-top: 20px">
|
</div>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
padding: 10px;
|
||||||
|
height: 48vh;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
margin-top: 20px;
|
||||||
|
"
|
||||||
|
>
|
||||||
<div style="font-size: 18px; margin-bottom: 40px">商品排行榜</div>
|
<div style="font-size: 18px; margin-bottom: 40px">商品排行榜</div>
|
||||||
<el-row style="" type="flex" justify="space-between">
|
<el-row style="" type="flex" justify="space-between">
|
||||||
<el-col :span="11"
|
<el-col :span="11"
|
||||||
><div class="grid-content bg-purple">商品访客数TOP</div>
|
><div class="grid-content bg-purple">商品访客数TOP</div>
|
||||||
<el-table :data="tableData" border style="width: 100%;" >
|
<el-table
|
||||||
<el-table-column align="center" type="index" label="排名" width="50">
|
:data="productList.viewPeopleList"
|
||||||
|
border
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
type="index"
|
||||||
|
label="排名"
|
||||||
|
width="50"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="date" label="商品名称">
|
<el-table-column prop="date" label="商品名称">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -111,22 +135,38 @@
|
||||||
<div>
|
<div>
|
||||||
<el-image
|
<el-image
|
||||||
style="width: 60px; height: 60px"
|
style="width: 60px; height: 60px"
|
||||||
:src="scope.row.url"
|
:src="scope.row.productImg"
|
||||||
:preview-src-list="[scope.row.url]"
|
:preview-src-list="[scope.row.productImg]"
|
||||||
>
|
>
|
||||||
</el-image>
|
</el-image>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-left:10px;color:blue">{{ scope.row.name }}</div>
|
<div style="margin-left: 10px; color: blue">
|
||||||
|
{{ scope.row.productName }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="name" label="访客数" width="140">
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="sortData"
|
||||||
|
label="访客数"
|
||||||
|
width="140"
|
||||||
|
>
|
||||||
</el-table-column> </el-table
|
</el-table-column> </el-table
|
||||||
></el-col>
|
></el-col>
|
||||||
<el-col :span="11"
|
<el-col :span="11"
|
||||||
><div class="grid-content bg-purple">商品支付转化率TOP</div>
|
><div class="grid-content bg-purple">商品支付转化率TOP</div>
|
||||||
<el-table :data="tableData" border style="width: 100%">
|
<el-table
|
||||||
<el-table-column align="center" type="index" label="排名" width="50">
|
:data="productList.payConversionList"
|
||||||
|
border
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
type="index"
|
||||||
|
label="排名"
|
||||||
|
width="50"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="date" label="商品名称">
|
<el-table-column prop="date" label="商品名称">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -134,18 +174,25 @@
|
||||||
<div>
|
<div>
|
||||||
<el-image
|
<el-image
|
||||||
style="width: 60px; height: 60px"
|
style="width: 60px; height: 60px"
|
||||||
:src="scope.row.url"
|
:src="scope.row.productImg"
|
||||||
:preview-src-list="[scope.row.url]"
|
:preview-src-list="[scope.row.productImg]"
|
||||||
>
|
>
|
||||||
</el-image>
|
</el-image>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-left:10px;color:blue">{{ scope.row.name }}</div>
|
<div style="margin-left: 10px; color: blue">
|
||||||
|
{{ scope.row.productName }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="name" label="支付转化率(%)" width="140">
|
<el-table-column
|
||||||
</el-table-column> </el-table
|
align="center"
|
||||||
|
prop="sortData"
|
||||||
|
label="支付转化率(%)"
|
||||||
|
width="140"
|
||||||
>
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
@ -156,44 +203,25 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
value1: "",
|
formInline: {
|
||||||
value: "",
|
dateType: "1",
|
||||||
tableData: [
|
|
||||||
{
|
|
||||||
date: "2016-05-02",
|
|
||||||
name: "王小虎",
|
|
||||||
address: "上海市普陀区金沙江路 1518 弄",
|
|
||||||
url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
|
|
||||||
},
|
},
|
||||||
{
|
productList: {},
|
||||||
date: "2016-05-04",
|
|
||||||
name: "王小虎",
|
|
||||||
address: "上海市普陀区金沙江路 1517 弄",
|
|
||||||
url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: "2016-05-01",
|
|
||||||
name: "王小虎",
|
|
||||||
address: "上海市普陀区金沙江路 1519 弄",
|
|
||||||
url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: "2016-05-03",
|
|
||||||
name: "王小虎",
|
|
||||||
address: "上海市普陀区金沙江路 1516 弄",
|
|
||||||
url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: "2016-05-03",
|
|
||||||
name: "王小虎",
|
|
||||||
address: "上海市普陀区金沙江路 1516 弄",
|
|
||||||
url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {},
|
getList() {
|
||||||
|
this.$api.dataCenter.productAnalysis(this.formInline).then((res) => {
|
||||||
|
this.productList = res.data.data;
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
batchExport() {
|
||||||
|
console.log("导出");
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -87,6 +87,8 @@
|
||||||
</obj-table-plus>
|
</obj-table-plus>
|
||||||
<!-- 添加或编辑 -->
|
<!-- 添加或编辑 -->
|
||||||
<add-or-update
|
<add-or-update
|
||||||
|
:marketId="formInline.marketId"
|
||||||
|
:shopId="formInline.shopId"
|
||||||
@queryList="$refs.oTable.reload()"
|
@queryList="$refs.oTable.reload()"
|
||||||
ref="addOrUpdate"
|
ref="addOrUpdate"
|
||||||
></add-or-update>
|
></add-or-update>
|
||||||
|
|
|
@ -15,62 +15,7 @@
|
||||||
label-width="150px"
|
label-width="150px"
|
||||||
class="demo-ruleForm"
|
class="demo-ruleForm"
|
||||||
>
|
>
|
||||||
<el-row>
|
<!-- <el-form-item label="定金可退:" prop="isRefundEarnestMoney">
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="订金支付时间:" prop="startTime">
|
|
||||||
<el-date-picker
|
|
||||||
@change="getOrderTime"
|
|
||||||
format="yyyy-MM-dd HH:mm"
|
|
||||||
data-format="yyyy-MM-dd HH:mm"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
v-model="orderTime"
|
|
||||||
type="datetimerange"
|
|
||||||
range-separator="至"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
:editable="false"
|
|
||||||
>
|
|
||||||
</el-date-picker> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="尾款支付时间:"
|
|
||||||
prop="balancePaymentStartTime"
|
|
||||||
>
|
|
||||||
<el-date-picker
|
|
||||||
@change="getArrearsTime"
|
|
||||||
format="yyyy-MM-dd"
|
|
||||||
data-format="yyyy-MM-dd"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
v-model="arrears"
|
|
||||||
type="datetimerange"
|
|
||||||
range-separator="至"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
:picker-options="pickerOptions"
|
|
||||||
>
|
|
||||||
</el-date-picker> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-form-item
|
|
||||||
label="预计发货时间:"
|
|
||||||
prop="estimatedStartDeliveryTime"
|
|
||||||
>
|
|
||||||
<el-date-picker
|
|
||||||
format="yyyy-MM-dd HH:mm"
|
|
||||||
data-format="yyyy-MM-dd HH:mm"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
@change="deliveryTime"
|
|
||||||
v-model="delivery"
|
|
||||||
type="datetimerange"
|
|
||||||
range-separator="至"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
:picker-options="pickerOptions"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="定金可退:" prop="isRefundEarnestMoney">
|
|
||||||
<el-radio v-model="ruleForm.isRefundEarnestMoney" :label="1"
|
<el-radio v-model="ruleForm.isRefundEarnestMoney" :label="1"
|
||||||
>是</el-radio
|
>是</el-radio
|
||||||
>
|
>
|
||||||
|
@ -80,7 +25,7 @@
|
||||||
<span>
|
<span>
|
||||||
选择是,用户可在付尾款前申请退定金(申请后自动退,无需审核),或付尾款时间结束后系统自动退定金
|
选择是,用户可在付尾款前申请退定金(申请后自动退,无需审核),或付尾款时间结束后系统自动退定金
|
||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item v-if="isAdd" label="选择商品:">
|
<el-form-item v-if="isAdd" label="选择商品:">
|
||||||
<el-button type="primary" @click="selectProduct"
|
<el-button type="primary" @click="selectProduct"
|
||||||
>点击请选择商品</el-button
|
>点击请选择商品</el-button
|
||||||
|
@ -93,7 +38,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-if="isAdd" style="padding: 20px">
|
<div v-if="isAdd" style="padding: 20px">
|
||||||
<div
|
<div
|
||||||
v-for="item in ruleForm.productList"
|
v-for="item in ruleForm.list"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
style="border-top: 1px solid #ccc; padding: 10px 0 0 0"
|
style="border-top: 1px solid #ccc; padding: 10px 0 0 0"
|
||||||
>
|
>
|
||||||
|
@ -104,7 +49,7 @@
|
||||||
<el-table
|
<el-table
|
||||||
border
|
border
|
||||||
ref="multipleTable"
|
ref="multipleTable"
|
||||||
:data="item.productSpecificationList"
|
:data="item.pointsProductSpecList"
|
||||||
tooltip-effect="dark"
|
tooltip-effect="dark"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
|
@ -366,52 +311,8 @@ export default {
|
||||||
productList: [],
|
productList: [],
|
||||||
isRefundEarnestMoney: 1, //定金可退 1是 2否
|
isRefundEarnestMoney: 1, //定金可退 1是 2否
|
||||||
},
|
},
|
||||||
pickerOptions: {
|
|
||||||
disabledDate(time) {
|
|
||||||
return time.getTime() < Date.now();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
orderTime: [], //订单支付时间
|
|
||||||
arrears: [], //尾款时间
|
|
||||||
delivery: [], //发货时间
|
|
||||||
tableData: [],
|
tableData: [],
|
||||||
rules: {
|
rules: {},
|
||||||
startTime: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请选择支付时间",
|
|
||||||
trigger: ["blur", "change"],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
balancePaymentStartTime: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请选择尾款支付时间",
|
|
||||||
trigger: "change",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
estimatedStartDeliveryTime: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请选择预计发货时间",
|
|
||||||
trigger: "change",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
isRefundEarnestMoney: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请选择定金可退",
|
|
||||||
trigger: "change",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
presalePrice: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请输入预售价格",
|
|
||||||
trigger: ["blur", "change"],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -437,24 +338,17 @@ export default {
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
add: () => {
|
add: () => {
|
||||||
this.orderTime = [];
|
|
||||||
this.arrears = [];
|
|
||||||
this.delivery = [];
|
|
||||||
this.ruleForm = {
|
this.ruleForm = {
|
||||||
startTime: "",
|
marketId: this.marketId,
|
||||||
endTime: "",
|
shopId: this.shopId,
|
||||||
balancePaymentStartTime: "",
|
unitType: JSON.parse(sessionStorage.getItem("userInfo")).unitType,
|
||||||
balancePaymentEndTime: "",
|
list: [],
|
||||||
estimatedStartDeliveryTime: "",
|
|
||||||
estimatedEndDeliveryTime: "",
|
|
||||||
productList: [],
|
|
||||||
isRefundEarnestMoney: 1, //定金可退 1是 2否
|
|
||||||
};
|
};
|
||||||
this.modalConfig.title = "新增预售";
|
this.modalConfig.title = "添加积分兑换商品";
|
||||||
this.isAdd = true;
|
this.isAdd = true;
|
||||||
},
|
},
|
||||||
update: () => {
|
update: () => {
|
||||||
this.modalConfig.title = "编辑预售";
|
this.modalConfig.title = "编辑积分商品";
|
||||||
this.isAdd = false;
|
this.isAdd = false;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -484,39 +378,6 @@ export default {
|
||||||
|
|
||||||
// this.ruleForm = row;
|
// this.ruleForm = row;
|
||||||
},
|
},
|
||||||
//订单支付时间
|
|
||||||
getOrderTime(e) {
|
|
||||||
if (e) {
|
|
||||||
console.log(e);
|
|
||||||
this.ruleForm.startTime = e[0];
|
|
||||||
this.ruleForm.endTime = e[1];
|
|
||||||
} else {
|
|
||||||
this.ruleForm.startTime = "";
|
|
||||||
this.ruleForm.endTime = "";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//尾款支付时间
|
|
||||||
getArrearsTime(e) {
|
|
||||||
if (e) {
|
|
||||||
console.log(e);
|
|
||||||
this.ruleForm.balancePaymentStartTime = e[0];
|
|
||||||
this.ruleForm.balancePaymentEndTime = e[1];
|
|
||||||
} else {
|
|
||||||
this.ruleForm.balancePaymentStartTime = "";
|
|
||||||
this.ruleForm.balancePaymentEndTime = "";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//发货时间
|
|
||||||
deliveryTime(e) {
|
|
||||||
if (e) {
|
|
||||||
console.log(e);
|
|
||||||
this.ruleForm.estimatedStartDeliveryTime = e[0];
|
|
||||||
this.ruleForm.estimatedEndDeliveryTime = e[1];
|
|
||||||
} else {
|
|
||||||
this.ruleForm.estimatedStartDeliveryTime = "";
|
|
||||||
this.ruleForm.estimatedEndDeliveryTime = "";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selectProduct() {
|
selectProduct() {
|
||||||
console.log("选择商品", this.marketId, this.shopId);
|
console.log("选择商品", this.marketId, this.shopId);
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
|
@ -58,7 +58,7 @@ export default {
|
||||||
this.modalData = {
|
this.modalData = {
|
||||||
targetId: row.targetId,
|
targetId: row.targetId,
|
||||||
title: "",
|
title: "",
|
||||||
module: row.position,
|
position: row.position,
|
||||||
type: 0,
|
type: 0,
|
||||||
status: true,
|
status: true,
|
||||||
app: 1,
|
app: 1,
|
||||||
|
|
|
@ -5,11 +5,7 @@
|
||||||
<vxe-table border :data="row.productOrders" height="200">
|
<vxe-table border :data="row.productOrders" height="200">
|
||||||
<vxe-column field="productOrderNo" title="商品订单号"></vxe-column>
|
<vxe-column field="productOrderNo" title="商品订单号"></vxe-column>
|
||||||
<vxe-column field="productName" title="商品名称"></vxe-column>
|
<vxe-column field="productName" title="商品名称"></vxe-column>
|
||||||
<vxe-column
|
<vxe-column field="productImg" title="商品图片" width="120">
|
||||||
field="productImg"
|
|
||||||
title="商品图片"
|
|
||||||
width="120"
|
|
||||||
>
|
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<el-image
|
<el-image
|
||||||
:preview-src-list="[row.productImg]"
|
:preview-src-list="[row.productImg]"
|
||||||
|
@ -38,15 +34,7 @@
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {};
|
||||||
imgUrlCellRender: {
|
|
||||||
name: "VxeImage",
|
|
||||||
props: {
|
|
||||||
width: 36,
|
|
||||||
height: 36,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue