|
@@ -6,7 +6,7 @@
|
|
|
style="width: 180px;"
|
|
style="width: 180px;"
|
|
|
clearable
|
|
clearable
|
|
|
placeholder="请输入推广人"
|
|
placeholder="请输入推广人"
|
|
|
- v-model="search.addressDetail"
|
|
|
|
|
|
|
+ v-model="search.userName"
|
|
|
></el-input
|
|
></el-input
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
@@ -16,7 +16,7 @@
|
|
|
style="width: 180px;"
|
|
style="width: 180px;"
|
|
|
clearable
|
|
clearable
|
|
|
placeholder="请输入推广码"
|
|
placeholder="请输入推广码"
|
|
|
- v-model="search.addressDetail"
|
|
|
|
|
|
|
+ v-model="search.promoCode"
|
|
|
></el-input
|
|
></el-input
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
@@ -26,7 +26,7 @@
|
|
|
style="width: 180px;"
|
|
style="width: 180px;"
|
|
|
clearable
|
|
clearable
|
|
|
placeholder="请输入手机号码"
|
|
placeholder="请输入手机号码"
|
|
|
- v-model="search.addressDetail"
|
|
|
|
|
|
|
+ v-model="search.phone"
|
|
|
></el-input
|
|
></el-input
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
@@ -58,7 +58,7 @@
|
|
|
>导入
|
|
>导入
|
|
|
</el-button> -->
|
|
</el-button> -->
|
|
|
<el-button
|
|
<el-button
|
|
|
- :disabled="!isAuth('deliveryAddress:export')"
|
|
|
|
|
|
|
+ :disabled="!isAuth('promotion:export')"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="warning"
|
|
type="warning"
|
|
|
icon="document"
|
|
icon="document"
|
|
@@ -67,7 +67,7 @@
|
|
|
导出Excel
|
|
导出Excel
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
- :disabled="!isAuth('deliveryAddress:add')"
|
|
|
|
|
|
|
+ :disabled="!isAuth('promotion:add')"
|
|
|
style="margin-left:15px;"
|
|
style="margin-left:15px;"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="primary"
|
|
type="primary"
|
|
@@ -80,17 +80,17 @@
|
|
|
<!-- <el-table-column type="selection"> @selection-change="changeFun"
|
|
<!-- <el-table-column type="selection"> @selection-change="changeFun"
|
|
|
</el-table-column> -->
|
|
</el-table-column> -->
|
|
|
<!-- <el-table-column prop="id" label="编号" width="80"></el-table-column> -->
|
|
<!-- <el-table-column prop="id" label="编号" width="80"></el-table-column> -->
|
|
|
- <el-table-column prop="stationName" label="推广码"> </el-table-column>
|
|
|
|
|
- <el-table-column prop="stationName" label="推广人"> </el-table-column>
|
|
|
|
|
- <el-table-column prop="stationName" label="身份证号"> </el-table-column>
|
|
|
|
|
- <el-table-column prop="province" label="手机号码"> </el-table-column>
|
|
|
|
|
- <el-table-column prop="province" label="推广人次"> </el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="promoCode" label="推广码"> </el-table-column>
|
|
|
|
|
+ <el-table-column prop="userName" label="推广人"> </el-table-column>
|
|
|
|
|
+ <el-table-column prop="idCard" label="身份证号"> </el-table-column>
|
|
|
|
|
+ <el-table-column prop="phone" label="手机号码"> </el-table-column>
|
|
|
|
|
+ <el-table-column prop="promoCount" label="推广人次"> </el-table-column>
|
|
|
<el-table-column fixed="right" align="center" label="操作" width="260">
|
|
<el-table-column fixed="right" align="center" label="操作" width="260">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
<el-button
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
- :disabled="!isAuth('deliveryAddress:update')"
|
|
|
|
|
|
|
+ :disabled="!isAuth('promotion:tuiguang')"
|
|
|
@click="promotionDetail(scope.row)"
|
|
@click="promotionDetail(scope.row)"
|
|
|
style="margin: 3px;"
|
|
style="margin: 3px;"
|
|
|
>推广明细
|
|
>推广明细
|
|
@@ -98,7 +98,7 @@
|
|
|
<el-button
|
|
<el-button
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
- :disabled="!isAuth('deliveryAddress:update')"
|
|
|
|
|
|
|
+ :disabled="!isAuth('promotion:update')"
|
|
|
@click="updates(scope.row)"
|
|
@click="updates(scope.row)"
|
|
|
style="margin: 3px;"
|
|
style="margin: 3px;"
|
|
|
>修改
|
|
>修改
|
|
@@ -106,7 +106,7 @@
|
|
|
<el-button
|
|
<el-button
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="danger"
|
|
type="danger"
|
|
|
- :disabled="!isAuth('deliveryAddress:delete')"
|
|
|
|
|
|
|
+ :disabled="!isAuth('promotion:delete')"
|
|
|
@click="deleteuser(scope.row)"
|
|
@click="deleteuser(scope.row)"
|
|
|
style="margin: 3px;"
|
|
style="margin: 3px;"
|
|
|
v-if="scope.row.id != 14"
|
|
v-if="scope.row.id != 14"
|
|
@@ -133,32 +133,35 @@
|
|
|
<el-form :model="addForm" :rules="rules" ref="ruleForm">
|
|
<el-form :model="addForm" :rules="rules" ref="ruleForm">
|
|
|
<el-form-item label="推广码:" :label-width="formLabelWidth">
|
|
<el-form-item label="推广码:" :label-width="formLabelWidth">
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-model="addForm.addressDetail"
|
|
|
|
|
|
|
+ v-model="addForm.promoCode"
|
|
|
style="width: 250px"
|
|
style="width: 250px"
|
|
|
placeholder="请输入推广码"
|
|
placeholder="请输入推广码"
|
|
|
>
|
|
>
|
|
|
- <el-button style="color: #3e8ef7;" slot="append"
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ @click="generateVerificationCode"
|
|
|
|
|
+ style="color: #3e8ef7;"
|
|
|
|
|
+ slot="append"
|
|
|
>自动生成</el-button
|
|
>自动生成</el-button
|
|
|
>
|
|
>
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="推广人:" :label-width="formLabelWidth">
|
|
<el-form-item label="推广人:" :label-width="formLabelWidth">
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-model="addForm.lng"
|
|
|
|
|
|
|
+ v-model="addForm.userName"
|
|
|
style="width: 250px"
|
|
style="width: 250px"
|
|
|
placeholder="请输入推广人"
|
|
placeholder="请输入推广人"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="身份证号:" :label-width="formLabelWidth">
|
|
<el-form-item label="身份证号:" :label-width="formLabelWidth">
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-model="addForm.lat"
|
|
|
|
|
|
|
+ v-model="addForm.idCard"
|
|
|
style="width: 250px"
|
|
style="width: 250px"
|
|
|
placeholder="请输入身份证号"
|
|
placeholder="请输入身份证号"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="手机号码:" :label-width="formLabelWidth">
|
|
<el-form-item label="手机号码:" :label-width="formLabelWidth">
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-model="addForm.deliveryFee"
|
|
|
|
|
|
|
+ v-model="addForm.phone"
|
|
|
style="width: 250px"
|
|
style="width: 250px"
|
|
|
placeholder="请输入手机号码"
|
|
placeholder="请输入手机号码"
|
|
|
></el-input>
|
|
></el-input>
|
|
@@ -185,14 +188,14 @@
|
|
|
style="width: 160px;"
|
|
style="width: 160px;"
|
|
|
clearable
|
|
clearable
|
|
|
placeholder="请输入手机号码"
|
|
placeholder="请输入手机号码"
|
|
|
- v-model="search.addressDetail"
|
|
|
|
|
|
|
+ v-model="promotionSearch.userPhone"
|
|
|
></el-input
|
|
></el-input
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="margin:15px 0;display: inline-block;">
|
|
<div style="margin:15px 0;display: inline-block;">
|
|
|
<span>开通时间:</span>
|
|
<span>开通时间:</span>
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
- v-model="search.createTime"
|
|
|
|
|
|
|
+ v-model="promotionSearch.time"
|
|
|
type="datetimerange"
|
|
type="datetimerange"
|
|
|
unlink-panels
|
|
unlink-panels
|
|
|
range-separator="-"
|
|
range-separator="-"
|
|
@@ -208,7 +211,7 @@
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
icon="document"
|
|
icon="document"
|
|
|
- @click="select"
|
|
|
|
|
|
|
+ @click="promotionSelect"
|
|
|
>查询
|
|
>查询
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
@@ -216,25 +219,25 @@
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
icon="document"
|
|
icon="document"
|
|
|
- @click="cleans"
|
|
|
|
|
|
|
+ @click="promotionCleans"
|
|
|
>重置
|
|
>重置
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-table v-loading="tableDataLoading" :data="tableData.list">
|
|
|
|
|
|
|
+ <el-table v-loading="tableDataLoading" :data="promotionTable.list">
|
|
|
<el-table-column prop="id" label="编号" width="80"></el-table-column>
|
|
<el-table-column prop="id" label="编号" width="80"></el-table-column>
|
|
|
- <el-table-column prop="stationName" label="用户名"> </el-table-column>
|
|
|
|
|
- <el-table-column prop="stationName" label="手机号码"> </el-table-column>
|
|
|
|
|
- <el-table-column prop="stationName" label="开通时间"> </el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="userName" label="用户名"> </el-table-column>
|
|
|
|
|
+ <el-table-column prop="userPhone" label="手机号码"> </el-table-column>
|
|
|
|
|
+ <el-table-column prop="createTime" label="开通时间"> </el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<div style="text-align: center;margin-top: 10px;">
|
|
<div style="text-align: center;margin-top: 10px;">
|
|
|
<el-pagination
|
|
<el-pagination
|
|
|
- @size-change="handleSizeChange"
|
|
|
|
|
- @current-change="handleCurrentChange"
|
|
|
|
|
|
|
+ @size-change="promotionSizeChange"
|
|
|
|
|
+ @current-change="promotionCurrentChange"
|
|
|
:page-sizes="[10, 15, 20, 25]"
|
|
:page-sizes="[10, 15, 20, 25]"
|
|
|
- :page-size="limit"
|
|
|
|
|
- :current-page="page"
|
|
|
|
|
|
|
+ :page-size="promotionLimit"
|
|
|
|
|
+ :current-page="promotionPage"
|
|
|
layout="total,sizes, prev, pager, next"
|
|
layout="total,sizes, prev, pager, next"
|
|
|
- :total="tableData.totalCount"
|
|
|
|
|
|
|
+ :total="promotionTable.totalCount"
|
|
|
>
|
|
>
|
|
|
</el-pagination>
|
|
</el-pagination>
|
|
|
</div>
|
|
</div>
|
|
@@ -352,10 +355,9 @@ export default {
|
|
|
page: 1,
|
|
page: 1,
|
|
|
tableDataLoading: false,
|
|
tableDataLoading: false,
|
|
|
search: {
|
|
search: {
|
|
|
- addressDetail: "",
|
|
|
|
|
- createTime: "",
|
|
|
|
|
- status: "",
|
|
|
|
|
- stationId: ""
|
|
|
|
|
|
|
+ userName: "",
|
|
|
|
|
+ promoCode: "",
|
|
|
|
|
+ phone: ""
|
|
|
},
|
|
},
|
|
|
stationList: [],
|
|
stationList: [],
|
|
|
tableData: {
|
|
tableData: {
|
|
@@ -377,13 +379,10 @@ export default {
|
|
|
district: "", //区
|
|
district: "", //区
|
|
|
addForm: {
|
|
addForm: {
|
|
|
id: "",
|
|
id: "",
|
|
|
- stationId: "", //站点id不能为空
|
|
|
|
|
- deliveryFee: "", //配送费用不能小于0
|
|
|
|
|
- addressDetail: "", //地址详情不能为空
|
|
|
|
|
- lng: "", //经度不能为空
|
|
|
|
|
- lat: "", //维度不能为空
|
|
|
|
|
- status: "", //启用状态;1启用、0禁用
|
|
|
|
|
- sort: "" //排序不能为空
|
|
|
|
|
|
|
+ promoCode: "",
|
|
|
|
|
+ userName: "",
|
|
|
|
|
+ idCard: "",
|
|
|
|
|
+ phone: ""
|
|
|
},
|
|
},
|
|
|
rules: {
|
|
rules: {
|
|
|
name: [
|
|
name: [
|
|
@@ -397,10 +396,15 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 推广明细
|
|
// 推广明细
|
|
|
|
|
+ promotionLimit: 10,
|
|
|
|
|
+ promotionPage: 1,
|
|
|
|
|
+ promoCodeId: "",
|
|
|
promotionDialog: false,
|
|
promotionDialog: false,
|
|
|
- promotionSearch:{
|
|
|
|
|
-
|
|
|
|
|
|
|
+ promotionSearch: {
|
|
|
|
|
+ time: "",
|
|
|
|
|
+ userPhone: ""
|
|
|
},
|
|
},
|
|
|
|
|
+ promotionTable: "",
|
|
|
|
|
|
|
|
// 导出限制
|
|
// 导出限制
|
|
|
exportTitle: "导出错误",
|
|
exportTitle: "导出错误",
|
|
@@ -448,64 +452,25 @@ export default {
|
|
|
cleans() {
|
|
cleans() {
|
|
|
this.page = 1;
|
|
this.page = 1;
|
|
|
this.search = {
|
|
this.search = {
|
|
|
- addressDetail: "",
|
|
|
|
|
- createTime: "",
|
|
|
|
|
- status: "",
|
|
|
|
|
- stationId: ""
|
|
|
|
|
|
|
+ userName: "",
|
|
|
|
|
+ promoCode: "",
|
|
|
|
|
+ phone: ""
|
|
|
};
|
|
};
|
|
|
this.dataSelect();
|
|
this.dataSelect();
|
|
|
},
|
|
},
|
|
|
- // 是否启用
|
|
|
|
|
- changeType(flag, row) {
|
|
|
|
|
- console.log(flag, row);
|
|
|
|
|
- this.$http({
|
|
|
|
|
- url: this.$http.adornUrl("admin/inside-address/updateStatus"),
|
|
|
|
|
- method: "post",
|
|
|
|
|
- data: this.$http.adornData({
|
|
|
|
|
- id: row.id,
|
|
|
|
|
- status: flag //启用状态;1启用、0禁用
|
|
|
|
|
- })
|
|
|
|
|
- }).then(({ data }) => {
|
|
|
|
|
- console.log(data, "新增收货地址");
|
|
|
|
|
- if (data.msg == "success") {
|
|
|
|
|
- this.$message({
|
|
|
|
|
- message: "操作成功",
|
|
|
|
|
- type: "success",
|
|
|
|
|
- duration: 1500,
|
|
|
|
|
- onClose: () => {
|
|
|
|
|
- this.dataSelect();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- // 获取省市区
|
|
|
|
|
- handleChange(value) {
|
|
|
|
|
- console.log(value);
|
|
|
|
|
-
|
|
|
|
|
- value = this.$refs["cascaderAddr"].currentLabels;
|
|
|
|
|
- this.province = value[0];
|
|
|
|
|
- this.city = value[1];
|
|
|
|
|
- this.district = value[2];
|
|
|
|
|
- if (this.city == "市辖区") {
|
|
|
|
|
- this.city = this.province;
|
|
|
|
|
- }
|
|
|
|
|
- console.log(this.$refs["cascaderAddr"].currentLabels);
|
|
|
|
|
- },
|
|
|
|
|
|
|
|
|
|
// 删除
|
|
// 删除
|
|
|
deleteuser(row) {
|
|
deleteuser(row) {
|
|
|
let delid = [row.id];
|
|
let delid = [row.id];
|
|
|
- this.$confirm(`确定删除此收货地址?`, "提示", {
|
|
|
|
|
|
|
+ this.$confirm(`确定删除此推广?`, "提示", {
|
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
type: "warning"
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
this.$http({
|
|
this.$http({
|
|
|
- url: this.$http.adornUrl("admin/inside-address/delete"),
|
|
|
|
|
- method: "post",
|
|
|
|
|
|
|
+ url: this.$http.adornUrl("admin/vip-promo"),
|
|
|
|
|
+ method: "delete",
|
|
|
// data: delid
|
|
// data: delid
|
|
|
data: this.$http.adornData(delid)
|
|
data: this.$http.adornData(delid)
|
|
|
}).then(({ data }) => {
|
|
}).then(({ data }) => {
|
|
@@ -534,19 +499,17 @@ export default {
|
|
|
dataSelect() {
|
|
dataSelect() {
|
|
|
this.tableDataLoading = false;
|
|
this.tableDataLoading = false;
|
|
|
this.$http({
|
|
this.$http({
|
|
|
- url: this.$http.adornUrl("admin/inside-address/pages"),
|
|
|
|
|
|
|
+ url: this.$http.adornUrl("admin/vip-promo/pages"),
|
|
|
method: "get",
|
|
method: "get",
|
|
|
params: this.$http.adornParams({
|
|
params: this.$http.adornParams({
|
|
|
page: this.page,
|
|
page: this.page,
|
|
|
limit: this.limit,
|
|
limit: this.limit,
|
|
|
- addressDetail: this.search.addressDetail,
|
|
|
|
|
- status: this.search.status,
|
|
|
|
|
- stationId: this.search.stationId,
|
|
|
|
|
- startTime: this.search.createTime[0],
|
|
|
|
|
- endTime: this.search.createTime[1]
|
|
|
|
|
|
|
+ userName: this.search.userName,
|
|
|
|
|
+ promoCode: this.search.promoCode,
|
|
|
|
|
+ phone: this.search.phone
|
|
|
})
|
|
})
|
|
|
}).then(({ data }) => {
|
|
}).then(({ data }) => {
|
|
|
- console.log(data, "收货地址列表");
|
|
|
|
|
|
|
+ console.log(data, "会员推广列表");
|
|
|
if (data.msg == "success") {
|
|
if (data.msg == "success") {
|
|
|
this.tableDataLoading = false;
|
|
this.tableDataLoading = false;
|
|
|
let returnData = data.data;
|
|
let returnData = data.data;
|
|
@@ -561,23 +524,24 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ // 获取随机六位数
|
|
|
|
|
+ generateVerificationCode() {
|
|
|
|
|
+ let code = "";
|
|
|
|
|
+ for (let i = 0; i < 6; i++) {
|
|
|
|
|
+ code += Math.floor(Math.random() * 10);
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$set(this.addForm, "promoCode", code);
|
|
|
|
|
+ // return code;
|
|
|
|
|
+ },
|
|
|
// 新增收货地址
|
|
// 新增收货地址
|
|
|
addAddress() {
|
|
addAddress() {
|
|
|
- this.addTitle = "新增收货地址";
|
|
|
|
|
- this.storeAddreStr = "请选择省市区";
|
|
|
|
|
- this.storeAddre = [];
|
|
|
|
|
|
|
+ this.addTitle = "新增推广";
|
|
|
this.addForm = {
|
|
this.addForm = {
|
|
|
id: "",
|
|
id: "",
|
|
|
- stationId: "", //站点id不能为空
|
|
|
|
|
- deliveryFee: "", //配送费用不能小于0
|
|
|
|
|
- province: "", //省份不能为空
|
|
|
|
|
- city: "", //城市不能为空
|
|
|
|
|
- district: "", //区县不能为空
|
|
|
|
|
- addressDetail: "", //地址详情不能为空
|
|
|
|
|
- lng: "", //经度不能为空
|
|
|
|
|
- lat: "", //维度不能为空
|
|
|
|
|
- status: "", //启用状态;1启用、0禁用
|
|
|
|
|
- sort: "" //排序不能为空
|
|
|
|
|
|
|
+ promoCode: "",
|
|
|
|
|
+ userName: "",
|
|
|
|
|
+ idCard: "",
|
|
|
|
|
+ phone: ""
|
|
|
};
|
|
};
|
|
|
this.addDialog = true;
|
|
this.addDialog = true;
|
|
|
},
|
|
},
|
|
@@ -585,94 +549,72 @@ export default {
|
|
|
// 编辑
|
|
// 编辑
|
|
|
updates(row) {
|
|
updates(row) {
|
|
|
console.log(row);
|
|
console.log(row);
|
|
|
- this.addTitle = "编辑收货地址";
|
|
|
|
|
- this.storeAddre = [];
|
|
|
|
|
|
|
+ this.addTitle = "编辑推广";
|
|
|
this.addForm = {
|
|
this.addForm = {
|
|
|
id: row.id,
|
|
id: row.id,
|
|
|
- stationId: row.stationId, //站点id不能为空
|
|
|
|
|
- deliveryFee: row.deliveryFee, //配送费用不能小于0
|
|
|
|
|
- province: row.province, //省份不能为空
|
|
|
|
|
- city: row.city, //城市不能为空
|
|
|
|
|
- district: row.district, //区县不能为空
|
|
|
|
|
- addressDetail: row.addressDetail, //地址详情不能为空
|
|
|
|
|
- lng: row.lng, //经度不能为空
|
|
|
|
|
- lat: row.lat, //维度不能为空
|
|
|
|
|
- status: row.status, //启用状态;1启用、0禁用
|
|
|
|
|
- sort: row.sort //排序不能为空, //排序不能为空
|
|
|
|
|
|
|
+ promoCode: row.promoCode,
|
|
|
|
|
+ userName: row.userName,
|
|
|
|
|
+ idCard: row.idCard,
|
|
|
|
|
+ phone: row.phone
|
|
|
};
|
|
};
|
|
|
- this.province = row.province;
|
|
|
|
|
- this.city = row.city;
|
|
|
|
|
- this.district = row.district;
|
|
|
|
|
this.addDialog = true;
|
|
this.addDialog = true;
|
|
|
- this.storeAddreStr = `${row.province}/${row.city}/${row.district}`;
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 确定收货地址
|
|
// 确定收货地址
|
|
|
amendAddress() {
|
|
amendAddress() {
|
|
|
- if (this.addForm.stationId == "") {
|
|
|
|
|
- this.$notify({
|
|
|
|
|
- title: "提示",
|
|
|
|
|
- duration: 1800,
|
|
|
|
|
- message: "站点不能为空",
|
|
|
|
|
- type: "warning"
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (this.addForm.deliveryFee == "" && this.addForm.deliveryFee < 0) {
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.addForm.promoCode == "" ||
|
|
|
|
|
+ /^\s+$/.test(this.addForm.promoCode)
|
|
|
|
|
+ ) {
|
|
|
this.$notify({
|
|
this.$notify({
|
|
|
title: "提示",
|
|
title: "提示",
|
|
|
duration: 1800,
|
|
duration: 1800,
|
|
|
- message: "配送费不能为空且不能小于0",
|
|
|
|
|
|
|
+ message: "推广码不能为空",
|
|
|
type: "warning"
|
|
type: "warning"
|
|
|
});
|
|
});
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if (this.addForm.addressDetail == "") {
|
|
|
|
|
|
|
+ if (this.addForm.userName == "" || /^\s+$/.test(this.addForm.userName)) {
|
|
|
this.$notify({
|
|
this.$notify({
|
|
|
title: "提示",
|
|
title: "提示",
|
|
|
duration: 1800,
|
|
duration: 1800,
|
|
|
- message: "地址详情不能为空",
|
|
|
|
|
|
|
+ message: "推广人不能为空",
|
|
|
type: "warning"
|
|
type: "warning"
|
|
|
});
|
|
});
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if (this.addForm.lng == "") {
|
|
|
|
|
|
|
+ if (this.addForm.idCard == "" || /^\s+$/.test(this.addForm.idCard)) {
|
|
|
this.$notify({
|
|
this.$notify({
|
|
|
title: "提示",
|
|
title: "提示",
|
|
|
duration: 1800,
|
|
duration: 1800,
|
|
|
- message: "经度不能为空",
|
|
|
|
|
|
|
+ message: "身份证号不能为空",
|
|
|
type: "warning"
|
|
type: "warning"
|
|
|
});
|
|
});
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if (this.addForm.lat == "") {
|
|
|
|
|
|
|
+ if (this.addForm.phone == "" || /^\s+$/.test(this.addForm.phone)) {
|
|
|
this.$notify({
|
|
this.$notify({
|
|
|
title: "提示",
|
|
title: "提示",
|
|
|
duration: 1800,
|
|
duration: 1800,
|
|
|
- message: "纬度不能为空",
|
|
|
|
|
|
|
+ message: "手机号码不能为空",
|
|
|
type: "warning"
|
|
type: "warning"
|
|
|
});
|
|
});
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
if (this.addForm.id) {
|
|
if (this.addForm.id) {
|
|
|
this.$http({
|
|
this.$http({
|
|
|
- url: this.$http.adornUrl("admin/inside-address/update"),
|
|
|
|
|
- method: "post",
|
|
|
|
|
|
|
+ url: this.$http.adornUrl("admin/vip-promo"),
|
|
|
|
|
+ method: "put",
|
|
|
data: this.$http.adornData({
|
|
data: this.$http.adornData({
|
|
|
id: this.addForm.id,
|
|
id: this.addForm.id,
|
|
|
- stationId: this.addForm.stationId, //站点id不能为空
|
|
|
|
|
- deliveryFee: this.addForm.deliveryFee, //配送费用不能小于0
|
|
|
|
|
- province: this.province, //省份不能为空
|
|
|
|
|
- city: this.city, //城市不能为空
|
|
|
|
|
- district: this.district, //区县不能为空
|
|
|
|
|
- addressDetail: this.addForm.addressDetail, //地址详情不能为空
|
|
|
|
|
- lng: this.addForm.lng, //经度不能为空
|
|
|
|
|
- lat: this.addForm.lat, //维度不能为空
|
|
|
|
|
- status: this.addForm.status, //启用状态;1启用、0禁用
|
|
|
|
|
- sort: this.addForm.sort //排序不能为空
|
|
|
|
|
|
|
+ idCard: this.addForm.idCard, //会员卡号不能为空
|
|
|
|
|
+ phone: this.addForm.phone, //手机号不能为空
|
|
|
|
|
+ promoCode: this.addForm.promoCode,
|
|
|
|
|
+ userName: this.addForm.userName
|
|
|
})
|
|
})
|
|
|
}).then(({ data }) => {
|
|
}).then(({ data }) => {
|
|
|
- console.log(data, "新增收货地址");
|
|
|
|
|
|
|
+ console.log(data, "编辑推广");
|
|
|
if (data.msg == "success") {
|
|
if (data.msg == "success") {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
message: "操作成功",
|
|
message: "操作成功",
|
|
@@ -697,22 +639,16 @@ export default {
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
this.$http({
|
|
this.$http({
|
|
|
- url: this.$http.adornUrl("admin/inside-address/add"),
|
|
|
|
|
|
|
+ url: this.$http.adornUrl("admin/vip-promo"),
|
|
|
method: "post",
|
|
method: "post",
|
|
|
data: this.$http.adornData({
|
|
data: this.$http.adornData({
|
|
|
- stationId: this.addForm.stationId, //站点id不能为空
|
|
|
|
|
- deliveryFee: this.addForm.deliveryFee, //配送费用不能小于0
|
|
|
|
|
- province: this.province, //省份不能为空
|
|
|
|
|
- city: this.city, //城市不能为空
|
|
|
|
|
- district: this.district, //区县不能为空
|
|
|
|
|
- addressDetail: this.addForm.addressDetail, //地址详情不能为空
|
|
|
|
|
- lng: this.addForm.lng, //经度不能为空
|
|
|
|
|
- lat: this.addForm.lat, //维度不能为空
|
|
|
|
|
- status: this.addForm.status, //启用状态;1启用、0禁用
|
|
|
|
|
- sort: this.addForm.sort //排序不能为空
|
|
|
|
|
|
|
+ idCard: this.addForm.idCard, //会员卡号不能为空
|
|
|
|
|
+ phone: this.addForm.phone, //手机号不能为空
|
|
|
|
|
+ promoCode: this.addForm.promoCode,
|
|
|
|
|
+ userName: this.addForm.userName
|
|
|
})
|
|
})
|
|
|
}).then(({ data }) => {
|
|
}).then(({ data }) => {
|
|
|
- console.log(data, "新增收货地址");
|
|
|
|
|
|
|
+ console.log(data, "新增会员推广");
|
|
|
if (data.msg == "success") {
|
|
if (data.msg == "success") {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
message: "操作成功",
|
|
message: "操作成功",
|
|
@@ -739,15 +675,65 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 推广明细
|
|
// 推广明细
|
|
|
|
|
+ promotionDetailList() {
|
|
|
|
|
+ this.$http({
|
|
|
|
|
+ url: this.$http.adornUrl("admin/vip-promo/record/pages"),
|
|
|
|
|
+ method: "get",
|
|
|
|
|
+ params: this.$http.adornParams({
|
|
|
|
|
+ page: this.promotionPage,
|
|
|
|
|
+ limit: this.promotionLimit,
|
|
|
|
|
+ startTime: this.promotionSearch.time[0],
|
|
|
|
|
+ endTime: this.promotionSearch.time[1],
|
|
|
|
|
+ userPhone: this.promotionSearch.userPhone,
|
|
|
|
|
+ promoCodeId: this.promoCodeId
|
|
|
|
|
+ })
|
|
|
|
|
+ }).then(({ data }) => {
|
|
|
|
|
+ console.log(data, "推广明细列表");
|
|
|
|
|
+ if (data.msg == "success") {
|
|
|
|
|
+ let returnData = data.data;
|
|
|
|
|
+ this.promotionTable = returnData;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: data.msg,
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ duration: 1500,
|
|
|
|
|
+ onClose: () => {}
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
promotionDetail(row) {
|
|
promotionDetail(row) {
|
|
|
console.log(row);
|
|
console.log(row);
|
|
|
this.promotionDialog = true;
|
|
this.promotionDialog = true;
|
|
|
|
|
+ this.promoCodeId = row.id;
|
|
|
|
|
+ this.promotionDetailList();
|
|
|
|
|
+ },
|
|
|
|
|
+ promotionSizeChange(val) {
|
|
|
|
|
+ this.promotionLimit = val;
|
|
|
|
|
+ this.promotionDetailList();
|
|
|
|
|
+ },
|
|
|
|
|
+ promotionCurrentChange(val) {
|
|
|
|
|
+ this.promotionPage = val;
|
|
|
|
|
+ this.promotionDetailList();
|
|
|
|
|
+ },
|
|
|
|
|
+ // 查询
|
|
|
|
|
+ promotionSelect() {
|
|
|
|
|
+ this.promotionPage = 1;
|
|
|
|
|
+ this.promotionDetailList();
|
|
|
|
|
+ },
|
|
|
|
|
+ // 重置
|
|
|
|
|
+ promotionCleans() {
|
|
|
|
|
+ this.promotionPage = 1;
|
|
|
|
|
+ this.promotionSearch = {
|
|
|
|
|
+ time: "",
|
|
|
|
|
+ userPhone: ""
|
|
|
|
|
+ };
|
|
|
|
|
+ this.promotionDetailList();
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
exportList() {
|
|
exportList() {
|
|
|
console.log(this.tableData.totalCount, "导出条数");
|
|
console.log(this.tableData.totalCount, "导出条数");
|
|
|
this.exportTitle = "导出";
|
|
this.exportTitle = "导出";
|
|
|
- // this.exportFlag = 4;
|
|
|
|
|
this.exportVisible = true;
|
|
this.exportVisible = true;
|
|
|
if (this.tableData.totalCount >= 50000) {
|
|
if (this.tableData.totalCount >= 50000) {
|
|
|
this.exportTitle = "导出错误";
|
|
this.exportTitle = "导出错误";
|
|
@@ -756,20 +742,16 @@ export default {
|
|
|
this.exportTitle = "导出";
|
|
this.exportTitle = "导出";
|
|
|
this.exportFlag = 2;
|
|
this.exportFlag = 2;
|
|
|
this.exportVisible = true;
|
|
this.exportVisible = true;
|
|
|
- var userId = this.$cookie.get("userId");
|
|
|
|
|
this.$http({
|
|
this.$http({
|
|
|
- url: this.$http.adornUrl("admin/export/exportShippingAddress"),
|
|
|
|
|
|
|
+ url: this.$http.adornUrl("admin/export/exportVipPromoRecord"),
|
|
|
method: "get",
|
|
method: "get",
|
|
|
// responseType: "blob",
|
|
// responseType: "blob",
|
|
|
params: this.$http.adornParams({
|
|
params: this.$http.adornParams({
|
|
|
- // 'page': page,
|
|
|
|
|
- // 'size': this.size,
|
|
|
|
|
- userId: userId,
|
|
|
|
|
- addressDetail: this.search.addressDetail,
|
|
|
|
|
- status: this.search.status,
|
|
|
|
|
- stationId: this.search.stationId,
|
|
|
|
|
- startTime: this.search.createTime[0],
|
|
|
|
|
- endTime: this.search.createTime[1]
|
|
|
|
|
|
|
+ page: 1,
|
|
|
|
|
+ limit: 5000,
|
|
|
|
|
+ userName: this.search.userName,
|
|
|
|
|
+ promoCode: this.search.promoCode,
|
|
|
|
|
+ phone: this.search.phone
|
|
|
})
|
|
})
|
|
|
}).then(({ data }) => {
|
|
}).then(({ data }) => {
|
|
|
console.log(data, "导出");
|
|
console.log(data, "导出");
|
|
@@ -782,11 +764,11 @@ export default {
|
|
|
// "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
// "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
|
// });
|
|
// });
|
|
|
// if (window.navigator.msSaveOrOpenBlob) {
|
|
// if (window.navigator.msSaveOrOpenBlob) {
|
|
|
- // navigator.msSaveBlob(blob);
|
|
|
|
|
|
|
+ // navigator.msSaveBlob(data);
|
|
|
// } else {
|
|
// } else {
|
|
|
- // let url = window.URL.createObjectURL(blob);
|
|
|
|
|
|
|
+ // let url = window.URL.createObjectURL(data);
|
|
|
// let elink = document.createElement("a");
|
|
// let elink = document.createElement("a");
|
|
|
- // elink.download = "订单列表.xlsx";
|
|
|
|
|
|
|
+ // elink.download = "会员推广列表.xlsx";
|
|
|
// elink.style.display = "none";
|
|
// elink.style.display = "none";
|
|
|
// elink.href = url;
|
|
// elink.href = url;
|
|
|
// document.body.appendChild(elink);
|
|
// document.body.appendChild(elink);
|
|
@@ -901,7 +883,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.dataSelect();
|
|
this.dataSelect();
|
|
|
- this.stationsData();
|
|
|
|
|
|
|
+ // this.stationsData();
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|