|
|
@@ -2,18 +2,18 @@
|
|
|
<div class="record-ward">
|
|
|
<div class="record-ward-top fl_b mb20">
|
|
|
<div v-for="(item, index) in countList" :key="index">
|
|
|
- <p>67678</p>
|
|
|
+ <p>{{ item.value || 0 }}</p>
|
|
|
<p>{{ item.lebel }}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
<container title="核销管理" height="252">
|
|
|
<template v-slot:btn>
|
|
|
- <el-button>导出excel</el-button>
|
|
|
+ <el-button @click="handelExport">导出excel</el-button>
|
|
|
</template>
|
|
|
<search-box-new
|
|
|
:formData="formData"
|
|
|
:formList="formList"
|
|
|
- @search="search"
|
|
|
+ @search="init"
|
|
|
@init="init"
|
|
|
/>
|
|
|
<table-list
|
|
|
@@ -23,15 +23,20 @@
|
|
|
:navText="navText"
|
|
|
:loading="loading"
|
|
|
>
|
|
|
+ <template slot="payType" slot-scope="props">
|
|
|
+ <div>
|
|
|
+ {{ ["微信", "支付宝", "现金"][props.scope.row.payType - 1] }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<template slot="btn" slot-scope="props">
|
|
|
<el-button type="text" @click="handelClick(2, props.scope.row.tpId)"
|
|
|
- >复制</el-button
|
|
|
+ >详情</el-button
|
|
|
>
|
|
|
<el-button type="text" @click="handelClick(1, props.scope.row.tpId)"
|
|
|
- >修改</el-button
|
|
|
+ >退款</el-button
|
|
|
>
|
|
|
<el-button type="text" @click="handelDel(props.scope.row.tpId)"
|
|
|
- >删除</el-button
|
|
|
+ >记录</el-button
|
|
|
>
|
|
|
</template>
|
|
|
</table-list>
|
|
|
@@ -46,6 +51,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import {
|
|
|
+ getOrderList,
|
|
|
+ getOrderDetail,
|
|
|
+ orderExport,
|
|
|
+ orderStatistics,
|
|
|
+} from "@/api/order/index";
|
|
|
export default {
|
|
|
name: "SaasMemberRecord",
|
|
|
|
|
|
@@ -54,27 +65,33 @@ export default {
|
|
|
countList: [
|
|
|
{
|
|
|
lebel: "订单金额(元)",
|
|
|
- key: "",
|
|
|
+ key: "orderPriceTotal",
|
|
|
+ value: 0,
|
|
|
},
|
|
|
{
|
|
|
lebel: "已付金额(元)",
|
|
|
- key: "",
|
|
|
+ key: "payPriceTotal",
|
|
|
+ value: 0,
|
|
|
},
|
|
|
{
|
|
|
lebel: "抵扣金额(元)",
|
|
|
- key: "",
|
|
|
+ key: "deductionPriceTotal",
|
|
|
+ value: 0,
|
|
|
},
|
|
|
{
|
|
|
lebel: "抵扣积分",
|
|
|
- key: "",
|
|
|
+ key: "deductionIntegralTotal",
|
|
|
+ value: 0,
|
|
|
},
|
|
|
{
|
|
|
lebel: "退款金额(元)",
|
|
|
- key: "",
|
|
|
+ key: "refundMoneyTotal",
|
|
|
+ value: 0,
|
|
|
},
|
|
|
{
|
|
|
lebel: "商品金额(元)",
|
|
|
- key: "",
|
|
|
+ key: "goodsPriceTotal",
|
|
|
+ value: 0,
|
|
|
},
|
|
|
],
|
|
|
loading: false,
|
|
|
@@ -89,49 +106,78 @@ export default {
|
|
|
formData: { datePicker: [] },
|
|
|
tableSet: [
|
|
|
{
|
|
|
- label: "模板名称1",
|
|
|
- prop: "tpName",
|
|
|
+ label: "所属店铺",
|
|
|
+ prop: "storeName",
|
|
|
+ isStore: true,
|
|
|
},
|
|
|
{
|
|
|
label: "核销日期",
|
|
|
- prop: "tpName",
|
|
|
+ prop: "createTime",
|
|
|
+ scope: "aTimeList",
|
|
|
},
|
|
|
{
|
|
|
label: "核销人",
|
|
|
- prop: "tpName",
|
|
|
+ prop: "",
|
|
|
},
|
|
|
{
|
|
|
label: "会员手机号",
|
|
|
- prop: "tpName",
|
|
|
+ prop: "telphone",
|
|
|
},
|
|
|
{
|
|
|
label: "会员名称",
|
|
|
- prop: "tpName",
|
|
|
+ prop: "userName",
|
|
|
},
|
|
|
{
|
|
|
label: "订单号",
|
|
|
- prop: "tpName",
|
|
|
+ prop: "orderSn",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "商品金额(元)",
|
|
|
+ prop: "",
|
|
|
+ scope: "money",
|
|
|
},
|
|
|
{
|
|
|
label: "已付金额(元)",
|
|
|
- prop: "tpName",
|
|
|
+ prop: "payPrice",
|
|
|
+ scope: "money",
|
|
|
},
|
|
|
{
|
|
|
label: "抵扣金额(元)",
|
|
|
- prop: "tpName",
|
|
|
+ prop: "deductionIntegral",
|
|
|
+ scope: "money",
|
|
|
},
|
|
|
{
|
|
|
label: "抵扣积分",
|
|
|
- prop: "tpName",
|
|
|
+ prop: "deductionIntegral",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "积分规则",
|
|
|
+ prop: "integralRule",
|
|
|
},
|
|
|
{
|
|
|
label: "退款金额(元)",
|
|
|
- prop: "tpName",
|
|
|
+ prop: "payType",
|
|
|
+ scope: "money",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "订单金额(元)",
|
|
|
+ prop: "orderPrice",
|
|
|
+ scope: "money",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "付款方式",
|
|
|
+ prop: "payType",
|
|
|
+ scope: "solt",
|
|
|
+ soltName: "payType",
|
|
|
},
|
|
|
],
|
|
|
tableData: [],
|
|
|
total: 0,
|
|
|
formList: [
|
|
|
+ {
|
|
|
+ prop: "storeId",
|
|
|
+ scope: "store",
|
|
|
+ },
|
|
|
{
|
|
|
prop1: "classStartTime",
|
|
|
prop2: "classEndTime",
|
|
|
@@ -140,21 +186,55 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
lable: "姓名",
|
|
|
- prop: "name",
|
|
|
- placeholder: "请输产品名称",
|
|
|
+ prop: "telphone",
|
|
|
+ placeholder: "输入会员手机号",
|
|
|
},
|
|
|
],
|
|
|
};
|
|
|
},
|
|
|
|
|
|
- mounted() {},
|
|
|
+ mounted() {
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
|
|
|
methods: {
|
|
|
search(v) {
|
|
|
- console.log(this.formData, 789);
|
|
|
+ this.loading = true;
|
|
|
+ if (v === 2) {
|
|
|
+ this.formData = {
|
|
|
+ pageSize: 10,
|
|
|
+ pageNum: 1,
|
|
|
+ status: "0,1",
|
|
|
+ };
|
|
|
+ }
|
|
|
+ getOrderList(this.formData)
|
|
|
+ .then((res) => {
|
|
|
+ this.tableData = res.rows;
|
|
|
+ this.total = res.total;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ init(v = 2) {
|
|
|
+ this.search(v);
|
|
|
+ this.orderStatistics();
|
|
|
+ },
|
|
|
+ handelExport() {
|
|
|
+ orderExport(this.formData).then((res) => {
|
|
|
+ if (res.msg) {
|
|
|
+ exportFn(res.msg, "导出会员管理数据");
|
|
|
+ } else {
|
|
|
+ this.$message.error("导出失败");
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
- init() {
|
|
|
- this.search();
|
|
|
+ orderStatistics() {
|
|
|
+ orderStatistics(this.formData).then((res) => {
|
|
|
+ this.countList.forEach(
|
|
|
+ (e) => (e.value = res.data ? res.data[e.key] : 0)
|
|
|
+ );
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
};
|