王总上门按摩后台代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

823 lines
34 KiB

webpackJsonp([46], {
"7MlJ": function(e, t) {},
RUn2: function(e, t, a) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = a("mvHQ")
, n = a.n(r)
, i = a("Dd8w")
, l = a.n(i)
, s = a("Xxa5")
, o = a.n(s)
, c = a("exGp")
, u = a.n(c)
, p = a("NYxO")
, m = a("PJh5")
, d = a.n(m)
, h = {
data: function() {
var e = this;
return {
pickerOptions: {
disabledDate: function(e) {
return e.getTime() > 1e3 * (d()(d()(Date.now()).format("YYYY-MM-DD")).unix() + 86400 - 1)
}
},
statusOptions: [{
label: "全部",
value: 0
}, {
label: "未授权微信昵称/头像",
value: 1
}, {
label: "已授权微信昵称/头像",
value: 2
}],
pagePermission: [],
loading: {
list: !1,
pay: !1
},
searchForm: {
list: {
page: 1,
limit: 10,
id: "",
nickName: "",
start_time: "",
end_time: "",
type: 0
},
pay: {
page: 1,
limit: 10,
nickName: "",
status: 1
}
},
tableData: {
list: [],
pay: []
},
total: {
list: 0,
pay: 0
},
showDialog: {
pay: !1
},
payForm: {
id: "",
nickName: "",
avatarUrl: "",
phone: "",
type: 1,
card_id: 0,
price: ""
},
payFormRules: {
type: {
required: !0,
type: "number",
message: "请选择充值方式",
trigger: "blur"
},
price: {
required: !0,
validator: function(t, a, r) {
// 2 !== e.payForm.type || /^(-)?\d+(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/.test(a) ? r() : r(new Error("请输入充值金额,最多保留2位小数"))
2 !== e.payForm.type || a!=0 ? r() : r(new Error("请输入充值金额,最多保留2位小数"))
},
key: "short_sign",
text: "签名",
trigger: "blur"
}
},
currentRow: {}
}
},
created: function() {
var e = this;
return u()(o.a.mark(function t() {
return o.a.wrap(function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return e.routesItem.routes.map(function(t) {
"/custom" === t.path && t.children.map(function(t) {
"CustomList" === t.name && (e.pagePermission = t.meta.pagePermission[0].auth)
})
}),
t.next = 3,
e.getTableDataList(1, "list");
case 3:
case "end":
return t.stop()
}
}, t, e)
}))()
},
computed: l()({}, Object(p.d)({
routesItem: function(e) {
return e.routes
}
})),
methods: {
resetForm: function(e) {
var t = e + "Form";
this.$refs[t].resetFields(),
this.getTableDataList(1, e)
},
handleSizeChange: function(e, t) {
this.searchForm[t].limit = e,
this.handleCurrentChange(1, t)
},
handleCurrentChange: function(e, t) {
this.searchForm[t].page = e,
this.getTableDataList("", t)
},
getTableDataList: function(e, t) {
var a = this;
return u()(o.a.mark(function r() {
var i, l, s, c, u, p, m, d;
return o.a.wrap(function(r) {
for (; ; )
switch (r.prev = r.next) {
case 0:
return e && (a.searchForm[t].page = 1),
a.loading[t] = !0,
i = JSON.parse(n()(a.searchForm[t])),
"list" === t && ((l = i.start_time) && l.length > 0 ? (i.start_time = l[0] / 1e3,
i.end_time = l[1] / 1e3) : (i.start_time = "",
i.end_time = "")),
s = {
list: {
methodKey: "custom",
methodModel: "userList"
},
pay: {
methodKey: "finance",
methodModel: "cardList"
}
}[t],
c = s.methodKey,
u = s.methodModel,
r.next = 8,
a.$api[c][u](i);
case 8:
if (p = r.sent,
m = p.code,
d = p.data,
a.loading[t] = !1,
200 === m) {
r.next = 14;
break
}
return r.abrupt("return");
case 14:
a.tableData[t] = d.data,
a.total[t] = d.total;
case 16:
case "end":
return r.stop()
}
}, r, a)
}))()
},
confirmDel: function(e, t) {
var a = this;
this.$confirm(this.$t("tips.confirmDelete"), this.$t("tips.reminder"), {
confirmButtonText: this.$t("action.comfirm"),
cancelButtonText: this.$t("action.cancel"),
type: "warning"
}).then(function() {
a.updateItem(e, t)
}).catch(function() {})
},
updateItem: function(e, t) {
var a = this;
return u()(o.a.mark(function r() {
return o.a.wrap(function(r) {
for (; ; )
switch (r.prev = r.next) {
case 0:
a.$api.storeStatusUpdate({
id: e,
status: t
}).then(function(e) {
if (200 === e.code) {
if (a.$message.success(a.$t(-1 === t ? "tips.successDel" : "tips.successOper")),
-1 !== t)
return;
a.searchForm.list.page = a.searchForm.list.page < Math.ceil((a.total.list - 1) / a.searchForm.list.limit) ? a.searchForm.list.page : Math.ceil((a.total.list - 1) / a.searchForm.list.limit),
a.getTableDataList("", "list")
} else {
if (-1 === t)
return;
a.getTableDataList("", "list")
}
});
case 1:
case "end":
return r.stop()
}
}, r, a)
}))()
},
toDelLabel: function(e, t) {
var a = this;
return u()(o.a.mark(function r() {
var n;
return o.a.wrap(function(r) {
for (; ; )
switch (r.prev = r.next) {
case 0:
return r.next = 2,
a.$api.custom.delUserLabel({
user_id: e,
label_id: t
});
case 2:
if (n = r.sent,
200 === n.code) {
r.next = 6;
break
}
return r.abrupt("return");
case 6:
a.$message.success(a.$t("tips.successDel")),
a.getTableDataList("", "list");
case 8:
case "end":
return r.stop()
}
}, r, a)
}))()
},
toShowDialog: function(e) {
var t = this
, a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
return u()(o.a.mark(function r() {
var i;
return o.a.wrap(function(r) {
for (; ; )
switch (r.prev = r.next) {
case 0:
for (i in a = JSON.parse(n()(a)),
"pay" === e && (a.type = 1,
a.card_id = 0,
a.price = ""),
t[e + "Form"])
t[e + "Form"][i] = a[i];
return t.searchForm.pay.title = "",
r.next = 6,
t.getTableDataList(1, e);
case 6:
t.showDialog[e] = !t.showDialog[e];
case 7:
case "end":
return r.stop()
}
}, r, t)
}))()
},
handleSelectionChange: function(e) {
this.currentRow = e
},
submitForm: function(e) {
var t = this;
return u()(o.a.mark(function a() {
var r, n, i, l, s, c, u, p, m;
return o.a.wrap(function(a) {
for (; ; )
switch (a.prev = a.next) {
case 0:
if (r = !0,
n = t.payForm,
i = n.id,
l = n.card_id,
s = n.type,
c = n.price,
2 === s && t.$refs.payForm.validate(function(e) {
e || (r = !1)
}),
!r) {
a.next = 23;
break
}
if (u = {
user_id: [i],
card_id: l
},
1 !== s) {
a.next = 13;
break
}
if (null !== t.currentRow && t.currentRow.id) {
a.next = 9;
break
}
return t.$message.error("请选择充值套餐"),
a.abrupt("return");
case 9:
p = t.currentRow.id,
u.card_id = p,
a.next = 14;
break;
case 13:
u.price = c;
case 14:
return a.next = 16,
t.$api.finance.payBalanceOrder(u);
case 16:
if (m = a.sent,
200 === m.code) {
a.next = 20;
break
}
return a.abrupt("return");
case 20:
t.$message.success(t.$t("tips.successSub")),
t.showDialog[e] = !1,
t.getTableDataList("", "list");
case 23:
case "end":
return a.stop()
}
}, a, t)
}))()
}
},
filters: {
handleTime: function(e, t) {
return 1 === t ? d()(1e3 * e).format("YYYY-MM-DD") : 2 === t ? d()(1e3 * e).format("HH:mm:ss") : d()(1e3 * e).format("YYYY-MM-DD HH:mm:ss")
}
}
}
, f = {
render: function() {
var e = this
, t = e.$createElement
, a = e._self._c || t;
return a("div", {
staticClass: "lb-custom"
}, [a("top-nav"), e._v(" "), a("div", {
staticClass: "page-main"
}, [a("el-row", {
staticClass: "page-search-form"
}, [a("el-form", {
ref: "listForm",
attrs: {
inline: !0,
model: e.searchForm.list
},
nativeOn: {
submit: function(e) {
e.preventDefault()
}
}
}, [a("el-form-item", {
attrs: {
label: "用户ID",
prop: "id"
}
}, [a("el-input", {
attrs: {
placeholder: "请输入用户ID"
},
model: {
value: e.searchForm.list.id,
callback: function(t) {
e.$set(e.searchForm.list, "id", t)
},
expression: "searchForm.list.id"
}
})], 1), e._v(" "), a("el-form-item", {
attrs: {
label: "微信昵称",
prop: "nickName"
}
}, [a("el-input", {
attrs: {
placeholder: "请输入微信昵称/手机号"
},
model: {
value: e.searchForm.list.nickName,
callback: function(t) {
e.$set(e.searchForm.list, "nickName", t)
},
expression: "searchForm.list.nickName"
}
})], 1), e._v(" "), a("el-form-item", {
attrs: {
label: "授权类型",
prop: "type"
}
}, [a("el-select", {
attrs: {
placeholder: "请选择"
},
on: {
change: function(t) {
return e.getTableDataList(1, "list")
}
},
model: {
value: e.searchForm.type,
callback: function(t) {
e.$set(e.searchForm, "type", t)
},
expression: "searchForm.type"
}
}, e._l(e.statusOptions, function(e) {
return a("el-option", {
key: e.value,
attrs: {
label: e.label,
value: e.value
}
})
}), 1)], 1), e._v(" "), a("el-form-item", {
attrs: {
label: "加入时间",
prop: "start_time"
}
}, [a("el-date-picker", {
attrs: {
type: "daterange",
"range-separator": "至",
"start-placeholder": "开始日期",
"end-placeholder": "结束日期",
"value-format": "timestamp",
"picker-options": e.pickerOptions,
"default-time": ["00:00:00", "23:59:59"]
},
on: {
change: function(t) {
return e.getTableDataList(1, "list")
}
},
model: {
value: e.searchForm.start_time,
callback: function(t) {
e.$set(e.searchForm, "start_time", t)
},
expression: "searchForm.start_time"
}
})], 1), e._v(" "), a("el-form-item", [a("lb-button", {
staticStyle: {
"margin-right": "5px"
},
attrs: {
size: "medium",
type: "primary",
icon: "el-icon-search"
},
on: {
click: function(t) {
return e.getTableDataList(1, "list")
}
}
}, [e._v(e._s(e.$t("action.search")))]), e._v(" "), a("lb-button", {
staticStyle: {
"margin-right": "5px"
},
attrs: {
size: "medium",
icon: "el-icon-refresh-left"
},
on: {
click: function(t) {
return e.resetForm("list")
}
}
}, [e._v(e._s(e.$t("action.reset")))])], 1)], 1)], 1), e._v(" "), a("el-table", {
directives: [{
name: "loading",
rawName: "v-loading",
value: e.loading.list,
expression: "loading.list"
}],
staticStyle: {
width: "100%"
},
attrs: {
data: e.tableData.list,
"header-cell-style": {
background: "#f5f7fa",
color: "#606266"
}
}
}, [a("el-table-column", {
attrs: {
prop: "id",
label: "ID"
}
}), e._v(" "), a("el-table-column", {
attrs: {
prop: "nickName",
label: "微信昵称"
}
}), e._v(" "), a("el-table-column", {
attrs: {
prop: "avatarUrl",
label: "微信头像"
},
scopedSlots: e._u([{
key: "default",
fn: function(e) {
return [a("lb-image", {
attrs: {
src: e.row.avatarUrl
}
})]
}
}])
}), e._v(" "), a("el-table-column", {
attrs: {
prop: "phone",
label: "手机号"
}
}), e._v(" "), a("el-table-column", {
attrs: {
prop: "balance",
label: "储值余额"
},
scopedSlots: e._u([{
key: "default",
fn: function(t) {
return [e._v(" ¥" + e._s(t.row.balance) + " ")]
}
}])
}), e._v(" "), a("el-table-column", {
attrs: {
prop: "user_label",
label: "用户标签",
"min-width": "180"
},
scopedSlots: e._u([{
key: "default",
fn: function(t) {
return e._l(t.row.user_label, function(r, n) {
return a("el-tag", {
key: n,
staticClass: "mr-md mt-sm mb-sm",
attrs: {
closable: e.pagePermission.includes("deleteTag")
},
on: {
close: function(a) {
return e.toDelLabel(t.row.id, r.label_id)
}
}
}, [e._v(e._s(r.title))])
})
}
}])
}), e._v(" "), a("el-table-column", {
attrs: {
prop: "create_time",
label: "加入时间"
},
scopedSlots: e._u([{
key: "default",
fn: function(t) {
return [a("p", [e._v(e._s(e._f("handleTime")(t.row.create_time, 1)))]), e._v(" "), a("p", [e._v(e._s(e._f("handleTime")(t.row.create_time, 2)))])]
}
}])
}), e._v(" "), a("el-table-column", {
attrs: {
label: "操作"
},
scopedSlots: e._u([{
key: "default",
fn: function(t) {
return [a("div", {
staticClass: "table-operate"
}, [a("lb-button", {
directives: [{
name: "hasPermi",
rawName: "v-hasPermi",
value: e.$route.name + "-helpPayBalanceOrder",
expression: "`${$route.name}-helpPayBalanceOrder`"
}],
attrs: {
size: "mini",
plain: "",
type: "success"
},
on: {
click: function(a) {
return e.toShowDialog("pay", t.row)
}
}
}, [e._v(e._s(e.$t("action.helpPayBalanceOrder")))])], 1)]
}
}])
})], 1), e._v(" "), a("lb-page", {
attrs: {
batch: !1,
page: e.searchForm.list.page,
pageSize: e.searchForm.list.limit,
total: e.total.list
},
on: {
handleSizeChange: function(t) {
return e.handleSizeChange(t, "list")
},
handleCurrentChange: function(t) {
return e.handleCurrentChange(t, "list")
}
}
}), e._v(" "), a("el-dialog", {
attrs: {
title: e.$t("action.helpPayBalanceOrder"),
visible: e.showDialog.pay,
width: "800px",
center: ""
},
on: {
"update:visible": function(t) {
return e.$set(e.showDialog, "pay", t)
}
}
}, [a("el-form", {
ref: "payForm",
staticClass: "dialog-form",
attrs: {
model: e.payForm,
rules: e.payFormRules,
"label-width": "120px"
}
}, [a("el-form-item", {
attrs: {
label: "微信昵称",
prop: ""
}
}, [e._v("\n " + e._s(e.payForm.nickName) + "\n ")]), e._v(" "), a("el-form-item", {
attrs: {
label: "微信头像",
prop: ""
}
}, [a("lb-image", {
attrs: {
src: e.payForm.avatarUrl
}
})], 1), e._v(" "), a("el-form-item", {
attrs: {
label: "手机号",
prop: ""
}
}, [e._v("\n " + e._s(e.payForm.phone || "-") + "\n ")]), e._v(" "), a("el-form-item", {
attrs: {
label: "选择储值方式",
prop: "type"
}
}, [a("el-radio-group", {
model: {
value: e.payForm.type,
callback: function(t) {
e.$set(e.payForm, "type", t)
},
expression: "payForm.type"
}
}, [a("el-radio", {
attrs: {
label: 1
}
}, [e._v("选择充值套餐")]), e._v(" "), a("el-radio", {
attrs: {
label: 2
}
}, [e._v("自定义充值")])], 1)], 1), e._v(" "), 1 === e.payForm.type ? a("el-form-item", {
attrs: {
label: "充值套餐",
prop: "user"
}
}, [a("div", {
staticStyle: {
width: "600px"
}
}, [a("el-table", {
directives: [{
name: "loading",
rawName: "v-loading",
value: e.loading.pay,
expression: "loading.pay"
}],
ref: "singleTable",
staticStyle: {
width: "100%"
},
attrs: {
data: e.tableData.pay,
"header-cell-style": {
background: "#f5f7fa",
color: "#606266"
},
"tooltip-effect": "dark",
"highlight-current-row": ""
},
on: {
"current-change": e.handleSelectionChange
}
}, [a("el-table-column", {
attrs: {
prop: "title",
label: "套餐名称"
}
}), e._v(" "), a("el-table-column", {
attrs: {
prop: "price",
label: "购买价格",
width: "120"
},
scopedSlots: e._u([{
key: "default",
fn: function(t) {
return [e._v("\n ¥" + e._s(t.row.price) + "\n ")]
}
}], null, !1, 1547869429)
}), e._v(" "), a("el-table-column", {
attrs: {
prop: "true_price",
label: "实际充值",
width: "120"
},
scopedSlots: e._u([{
key: "default",
fn: function(t) {
return [e._v("\n ¥" + e._s(t.row.true_price) + "\n ")]
}
}], null, !1, 2061991772)
})], 1), e._v(" "), a("lb-page", {
attrs: {
batch: !1,
page: e.searchForm.pay.page,
pageSize: e.searchForm.pay.limit,
total: e.total.pay
},
on: {
handleSizeChange: function(t) {
return e.handleSizeChange(t, "pay")
},
handleCurrentChange: function(t) {
return e.handleCurrentChange(t, "pay")
}
}
})], 1)]) : e._e(), e._v(" "), 2 === e.payForm.type ? a("el-form-item", {
attrs: {
label: "充值金额",
prop: "price"
}
}, [a("el-input", {
staticStyle: {
width: "300px"
},
attrs: {
placeholder: "请输入充值金额"
},
model: {
value: e.payForm.price,
callback: function(t) {
e.$set(e.payForm, "price", t)
},
expression: "payForm.price"
}
})], 1) : e._e()], 1), e._v(" "), a("span", {
staticClass: "dialog-footer",
attrs: {
slot: "footer"
},
slot: "footer"
}, [a("el-button", {
on: {
click: function(t) {
e.showDialog.pay = !1
}
}
}, [e._v("取 消")]), e._v(" "), a("el-button", {
directives: [{
name: "preventReClick",
rawName: "v-preventReClick"
}],
attrs: {
type: "primary"
},
on: {
click: function(t) {
return e.submitForm("pay")
}
}
}, [e._v("确 定")])], 1)], 1)], 1)], 1)
},
staticRenderFns: []
};
var b = a("VU/8")(h, f, !1, function(e) {
a("7MlJ")
}, "data-v-764ee634", null);
t.default = b.exports
}
});