leisure-core 0.4.25 → 0.4.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/le-button-qr/src/main.vue +13 -2
- package/le-cp/src/main.vue +24 -6
- package/le-cp/src/sub.vue +35 -8
- package/le-distribution/src/main.vue +11 -9
- package/le-distribution-category/src/main.vue +43 -12
- package/le-distribution-category/src/sub.vue +17 -6
- package/le-user/src/sub.vue +29 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="le-button-qr">
|
|
3
|
-
<le-button text="显示二维码" @click="qrMake"></le-button>
|
|
3
|
+
<le-button text="显示二维码" @click="qrMake(btnAttr)"></le-button>
|
|
4
4
|
<le-dialog-container
|
|
5
5
|
title="二维码"
|
|
6
6
|
width="239px"
|
|
@@ -27,6 +27,12 @@ export default {
|
|
|
27
27
|
type: String,
|
|
28
28
|
default: "二维码",
|
|
29
29
|
},
|
|
30
|
+
btnAttr: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default: () => {
|
|
33
|
+
return {};
|
|
34
|
+
},
|
|
35
|
+
},
|
|
30
36
|
},
|
|
31
37
|
data() {
|
|
32
38
|
return {
|
|
@@ -38,7 +44,12 @@ export default {
|
|
|
38
44
|
this.showQrMake = false;
|
|
39
45
|
},
|
|
40
46
|
qrMake() {
|
|
41
|
-
|
|
47
|
+
let temp = JSON.stringify(this.btnAttr);
|
|
48
|
+
if (!this.btnAttr || temp == "{}") {
|
|
49
|
+
this.$emit("qrMake", this.qrMakeCallBack);
|
|
50
|
+
} else {
|
|
51
|
+
this.$emit("qrMake", this.btnAttr, this.qrMakeCallBack);
|
|
52
|
+
}
|
|
42
53
|
},
|
|
43
54
|
qrMakeCallBack(res) {
|
|
44
55
|
if (res && res == "ok") {
|
package/le-cp/src/main.vue
CHANGED
|
@@ -31,8 +31,9 @@
|
|
|
31
31
|
<template slot-scope="scope">
|
|
32
32
|
<div class="btnClass">
|
|
33
33
|
<le-button-qr
|
|
34
|
-
:qrCodeUrl="
|
|
34
|
+
:qrCodeUrl="qrcode"
|
|
35
35
|
:fileName="scope.row.cp_name"
|
|
36
|
+
:btnAttr="scope.row"
|
|
36
37
|
@qrMake="showQrcodeFun"
|
|
37
38
|
></le-button-qr>
|
|
38
39
|
<le-button
|
|
@@ -64,12 +65,13 @@
|
|
|
64
65
|
@close="closeDialog"
|
|
65
66
|
@rowRefresh="list"
|
|
66
67
|
:rowitem="currentRow"
|
|
68
|
+
:ctype="ctype"
|
|
67
69
|
></le-cp-sub>
|
|
68
70
|
</le-dialog-container>
|
|
69
71
|
</div>
|
|
70
72
|
</template>
|
|
71
73
|
<script>
|
|
72
|
-
import { list, del } from "@/api/systemcp";
|
|
74
|
+
import { list, del, getCpQrCode } from "@/api/systemcp";
|
|
73
75
|
import LeCpSub from "./sub.vue";
|
|
74
76
|
export default {
|
|
75
77
|
name: "le-cp",
|
|
@@ -85,15 +87,21 @@ export default {
|
|
|
85
87
|
type: Boolean,
|
|
86
88
|
default: true,
|
|
87
89
|
},
|
|
90
|
+
ctype: {
|
|
91
|
+
type: Number,
|
|
92
|
+
default: 0,
|
|
93
|
+
},
|
|
88
94
|
},
|
|
89
95
|
data() {
|
|
90
96
|
return {
|
|
91
97
|
searchData: {
|
|
92
98
|
cname: "",
|
|
93
99
|
cphone: "",
|
|
100
|
+
ctype: this.ctype,
|
|
94
101
|
pageNo: 1,
|
|
95
102
|
total: 1,
|
|
96
103
|
},
|
|
104
|
+
qrcode: "",
|
|
97
105
|
tableData: [],
|
|
98
106
|
showDialog: false,
|
|
99
107
|
showQRCodeDialog: false,
|
|
@@ -133,10 +141,20 @@ export default {
|
|
|
133
141
|
this.currentRow = {};
|
|
134
142
|
this.showDialog = false;
|
|
135
143
|
},
|
|
136
|
-
showQrcodeFun(callback) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
144
|
+
showQrcodeFun(item, callback) {
|
|
145
|
+
let param = {};
|
|
146
|
+
param.hid = item.id;
|
|
147
|
+
param.htype = item.cp_ctype;
|
|
148
|
+
getCpQrCode(param).then((res) => {
|
|
149
|
+
if (res.data.code == "10000") {
|
|
150
|
+
this.qrcode = res.data.data;
|
|
151
|
+
if (callback) {
|
|
152
|
+
callback("ok");
|
|
153
|
+
}
|
|
154
|
+
} else {
|
|
155
|
+
this.$message.error(res.data.info);
|
|
156
|
+
}
|
|
157
|
+
});
|
|
140
158
|
},
|
|
141
159
|
},
|
|
142
160
|
};
|
package/le-cp/src/sub.vue
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
<el-form-item label="酒店名称" prop="cp_name">
|
|
4
4
|
<el-input v-model="form.cp_name"></el-input>
|
|
5
5
|
</el-form-item>
|
|
6
|
-
<el-form-item label="酒店二维码">
|
|
6
|
+
<!-- <el-form-item label="酒店二维码">
|
|
7
7
|
<el-row>
|
|
8
8
|
<el-col :span="24">
|
|
9
9
|
<el-input v-model="form.cp_qrcode" disabled></el-input>
|
|
10
10
|
</el-col>
|
|
11
11
|
</el-row>
|
|
12
|
-
</el-form-item>
|
|
12
|
+
</el-form-item> -->
|
|
13
13
|
<el-form-item label="联系人手机">
|
|
14
14
|
<el-input v-model="form.cp_link_phone"></el-input>
|
|
15
15
|
</el-form-item>
|
|
@@ -27,31 +27,42 @@
|
|
|
27
27
|
<el-input v-model="form.note"></el-input>
|
|
28
28
|
</el-form-item>
|
|
29
29
|
<el-form-item v-rfooter>
|
|
30
|
-
<
|
|
31
|
-
|
|
30
|
+
<div style="display: flex">
|
|
31
|
+
<el-button type="primary" @click="onSubmit">保存</el-button>
|
|
32
|
+
<le-button-qr
|
|
33
|
+
:qrCodeUrl="qrcode"
|
|
34
|
+
:fileName="form.id"
|
|
35
|
+
@qrMake="makeQrcode"
|
|
36
|
+
></le-button-qr>
|
|
37
|
+
<el-button @click="close()">取消</el-button>
|
|
38
|
+
</div>
|
|
32
39
|
</el-form-item>
|
|
33
40
|
</el-form>
|
|
34
41
|
</template>
|
|
35
42
|
<script>
|
|
36
|
-
import { edit, create } from "@/api/systemcp";
|
|
43
|
+
import { edit, create, getCpQrCode } from "@/api/systemcp";
|
|
37
44
|
import { userOne } from "@/api/user";
|
|
38
45
|
export default {
|
|
39
46
|
name: "le-cp-sub",
|
|
40
47
|
props: {
|
|
41
48
|
rowitem: {},
|
|
49
|
+
ctype: {
|
|
50
|
+
type: Number,
|
|
51
|
+
default: 0,
|
|
52
|
+
},
|
|
42
53
|
},
|
|
43
54
|
data() {
|
|
44
55
|
return {
|
|
45
56
|
form: {
|
|
46
57
|
id: "",
|
|
47
58
|
cp_name: "",
|
|
48
|
-
|
|
49
|
-
cp_wx_url: "",
|
|
59
|
+
cp_ctype: this.ctype,
|
|
50
60
|
cp_link_uid: "",
|
|
51
61
|
cp_link_nick: "",
|
|
52
62
|
cp_link_phone: "",
|
|
53
63
|
note: "",
|
|
54
64
|
},
|
|
65
|
+
qrcode: "",
|
|
55
66
|
rules: {
|
|
56
67
|
cp_name: [
|
|
57
68
|
{ required: true, message: "请输入名称", trigger: "blur" },
|
|
@@ -76,6 +87,7 @@ export default {
|
|
|
76
87
|
rowitem: {
|
|
77
88
|
handler(newValue) {
|
|
78
89
|
this.form = newValue;
|
|
90
|
+
this.form.cp_ctype = this.ctype;
|
|
79
91
|
},
|
|
80
92
|
immediate: true,
|
|
81
93
|
},
|
|
@@ -86,6 +98,7 @@ export default {
|
|
|
86
98
|
this.$refs["form"].validate((valid) => {
|
|
87
99
|
if (valid) {
|
|
88
100
|
let param = JSON.parse(JSON.stringify(this.form));
|
|
101
|
+
console.log(param);
|
|
89
102
|
if (
|
|
90
103
|
param.cp_link_phone &&
|
|
91
104
|
param.cp_link_phone.length > 0 &&
|
|
@@ -119,7 +132,6 @@ export default {
|
|
|
119
132
|
if (param.phone && param.phone.length > 0) {
|
|
120
133
|
userOne(param).then((response) => {
|
|
121
134
|
let user = response.data.data;
|
|
122
|
-
console.log(user);
|
|
123
135
|
this.form.cp_link_uid = user.id;
|
|
124
136
|
this.form.cp_link_nick = user.nick;
|
|
125
137
|
});
|
|
@@ -127,6 +139,21 @@ export default {
|
|
|
127
139
|
this.$message.error("请输入手机号码");
|
|
128
140
|
}
|
|
129
141
|
},
|
|
142
|
+
makeQrcode(callback) {
|
|
143
|
+
let param = {};
|
|
144
|
+
param.hid = this.form.id;
|
|
145
|
+
param.htype = this.form.cp_ctype;
|
|
146
|
+
getCpQrCode(param).then((res) => {
|
|
147
|
+
if (res.data.code == "10000") {
|
|
148
|
+
this.qrcode = res.data.data;
|
|
149
|
+
if (callback) {
|
|
150
|
+
callback("ok");
|
|
151
|
+
}
|
|
152
|
+
} else {
|
|
153
|
+
this.$message.error(res.data.info);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
},
|
|
130
157
|
close() {
|
|
131
158
|
this.$emit("close");
|
|
132
159
|
},
|
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
</el-radio-group>
|
|
8
8
|
</el-form-item>
|
|
9
9
|
<el-form-item label="分销层级">
|
|
10
|
-
<el-input-number
|
|
10
|
+
<el-input-number
|
|
11
|
+
v-model="form.dlevels"
|
|
12
|
+
:min="1"
|
|
13
|
+
:max="2"
|
|
14
|
+
></el-input-number>
|
|
11
15
|
</el-form-item>
|
|
12
16
|
<el-form-item label="商品详情页显示佣金">
|
|
13
17
|
<el-radio-group v-model="form.is_dc">
|
|
@@ -47,7 +51,7 @@
|
|
|
47
51
|
</el-form>
|
|
48
52
|
</template>
|
|
49
53
|
<script>
|
|
50
|
-
import { select
|
|
54
|
+
import { select } from "@/api/distribution_config";
|
|
51
55
|
export default {
|
|
52
56
|
name: "le-distribution",
|
|
53
57
|
data() {
|
|
@@ -62,22 +66,20 @@ export default {
|
|
|
62
66
|
duser: 0,
|
|
63
67
|
dgoods: 1,
|
|
64
68
|
dgrate: 1,
|
|
65
|
-
}
|
|
69
|
+
},
|
|
66
70
|
};
|
|
67
71
|
},
|
|
68
|
-
mounted() {
|
|
69
|
-
},
|
|
72
|
+
mounted() {},
|
|
70
73
|
methods: {
|
|
71
74
|
selectInfo() {
|
|
72
75
|
select().then((res) => {
|
|
73
76
|
let data = res.data.data;
|
|
74
|
-
console.log(data)
|
|
75
77
|
if (data) {
|
|
76
78
|
this.data = data;
|
|
77
79
|
}
|
|
78
|
-
})
|
|
79
|
-
}
|
|
80
|
+
});
|
|
81
|
+
},
|
|
80
82
|
},
|
|
81
83
|
};
|
|
82
84
|
</script>
|
|
83
|
-
<style lang="scss" scoped></style>
|
|
85
|
+
<style lang="scss" scoped></style>
|
|
@@ -8,20 +8,42 @@
|
|
|
8
8
|
<el-table :data="tableData" border row-key="id" stripe style="width: 100%">
|
|
9
9
|
<el-table-column prop="cname" label="人员类别名称" width="180">
|
|
10
10
|
</el-table-column>
|
|
11
|
-
<el-table-column prop="crate1" label="
|
|
12
|
-
<el-table-column prop="crate2" label="二级佣金比例"> </el-table-column>
|
|
11
|
+
<el-table-column prop="crate1" label="佣金比例"> </el-table-column>
|
|
12
|
+
<!-- <el-table-column prop="crate2" label="二级佣金比例"> </el-table-column> -->
|
|
13
13
|
<el-table-column prop="note" label="备注"> </el-table-column>
|
|
14
|
-
<el-table-column
|
|
14
|
+
<el-table-column
|
|
15
|
+
fixed="right"
|
|
16
|
+
label="操作"
|
|
17
|
+
align="center"
|
|
18
|
+
width="160"
|
|
19
|
+
row
|
|
20
|
+
>
|
|
15
21
|
<template slot-scope="scope">
|
|
16
|
-
<le-button
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
<le-button
|
|
23
|
+
id="btnEdit"
|
|
24
|
+
v-permission="$route.params.btns"
|
|
25
|
+
text="编辑"
|
|
26
|
+
:disp="btnEditDisp"
|
|
27
|
+
@click="openEditWindow(scope.row)"
|
|
28
|
+
></le-button>
|
|
29
|
+
<le-button-msg
|
|
30
|
+
@click="del(scope.row)"
|
|
31
|
+
:disp="btnDelDisp"
|
|
32
|
+
></le-button-msg>
|
|
19
33
|
</template>
|
|
20
34
|
</el-table-column>
|
|
21
35
|
</el-table>
|
|
22
|
-
<le-dialog-container
|
|
23
|
-
|
|
24
|
-
|
|
36
|
+
<le-dialog-container
|
|
37
|
+
:showDialog="showDialog"
|
|
38
|
+
@close="closeDialog"
|
|
39
|
+
width="40%"
|
|
40
|
+
title="分销人员类别"
|
|
41
|
+
>
|
|
42
|
+
<le-distribution-category-sub
|
|
43
|
+
@close="closeDialog"
|
|
44
|
+
@rowRefresh="list"
|
|
45
|
+
:rowitem="currentRow"
|
|
46
|
+
></le-distribution-category-sub>
|
|
25
47
|
</le-dialog-container>
|
|
26
48
|
</div>
|
|
27
49
|
</template>
|
|
@@ -33,6 +55,16 @@ export default {
|
|
|
33
55
|
components: {
|
|
34
56
|
LeDistributionCategorySub,
|
|
35
57
|
},
|
|
58
|
+
props: {
|
|
59
|
+
btnEditDisp: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: true,
|
|
62
|
+
},
|
|
63
|
+
btnDelDisp: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: true,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
36
68
|
data() {
|
|
37
69
|
return {
|
|
38
70
|
tableData: [],
|
|
@@ -40,8 +72,7 @@ export default {
|
|
|
40
72
|
currentRow: {},
|
|
41
73
|
};
|
|
42
74
|
},
|
|
43
|
-
computed: {
|
|
44
|
-
},
|
|
75
|
+
computed: {},
|
|
45
76
|
mounted() {
|
|
46
77
|
this.list();
|
|
47
78
|
},
|
|
@@ -70,4 +101,4 @@ export default {
|
|
|
70
101
|
},
|
|
71
102
|
},
|
|
72
103
|
};
|
|
73
|
-
</script>
|
|
104
|
+
</script>
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-form
|
|
2
|
+
<el-form
|
|
3
|
+
ref="form"
|
|
4
|
+
:model="form"
|
|
5
|
+
:rules="rules"
|
|
6
|
+
label-position="left"
|
|
7
|
+
label-width="110px"
|
|
8
|
+
>
|
|
3
9
|
<el-form-item label="分销类别名称" prop="cname">
|
|
4
10
|
<el-input v-model="form.cname"></el-input>
|
|
5
11
|
</el-form-item>
|
|
6
|
-
<el-form-item label="
|
|
7
|
-
<el-input-number
|
|
12
|
+
<el-form-item label="佣金比例" prop="crate1">
|
|
13
|
+
<el-input-number
|
|
14
|
+
v-model="form.crate1"
|
|
15
|
+
:min="0"
|
|
16
|
+
:max="100"
|
|
17
|
+
></el-input-number>
|
|
8
18
|
<span>%</span>
|
|
9
19
|
</el-form-item>
|
|
10
|
-
<el-form-item label="二级佣金比例" prop="crate2">
|
|
20
|
+
<!-- <el-form-item label="二级佣金比例" prop="crate2">
|
|
11
21
|
<el-input-number v-model="form.crate2" :min="0" :max="100"></el-input-number>
|
|
12
22
|
<span>%</span>
|
|
13
|
-
</el-form-item>
|
|
23
|
+
</el-form-item> -->
|
|
14
24
|
<el-form-item label="备注" prop="note">
|
|
15
25
|
<el-input v-model="form.note"></el-input>
|
|
16
26
|
</el-form-item>
|
|
@@ -67,12 +77,13 @@ export default {
|
|
|
67
77
|
immediate: true,
|
|
68
78
|
},
|
|
69
79
|
},
|
|
70
|
-
mounted() {
|
|
80
|
+
mounted() {},
|
|
71
81
|
methods: {
|
|
72
82
|
onSubmit() {
|
|
73
83
|
this.$refs["form"].validate((valid) => {
|
|
74
84
|
if (valid) {
|
|
75
85
|
let param = JSON.parse(JSON.stringify(this.form));
|
|
86
|
+
param.crate2 = 0;
|
|
76
87
|
if (param.id) {
|
|
77
88
|
update(param).then((response) => {
|
|
78
89
|
this.$message.success(response.data.info);
|
package/le-user/src/sub.vue
CHANGED
|
@@ -66,6 +66,10 @@
|
|
|
66
66
|
</el-option>
|
|
67
67
|
</el-select>
|
|
68
68
|
</el-form-item>
|
|
69
|
+
<!-- <el-form-item label="二维码" v-if="ruleUserForm.utype == 2">
|
|
70
|
+
<el-input v-model="qrcode" readonly></el-input>
|
|
71
|
+
<el-button type="info" @click="makeQrcode()">查看二维码</el-button>
|
|
72
|
+
</el-form-item> -->
|
|
69
73
|
<el-row v-if="ruleUserForm.managered == 0">
|
|
70
74
|
<el-col :span="12">
|
|
71
75
|
<el-form-item label="禁止登录">
|
|
@@ -79,13 +83,20 @@
|
|
|
79
83
|
</el-col>
|
|
80
84
|
</el-row>
|
|
81
85
|
<el-form-item v-rfooter="'center'">
|
|
82
|
-
<
|
|
83
|
-
|
|
86
|
+
<div style="display: flex">
|
|
87
|
+
<el-button type="info" @click="close()">取消</el-button>
|
|
88
|
+
<le-button-qr
|
|
89
|
+
:qrCodeUrl="qrcode"
|
|
90
|
+
:fileName="ruleUserForm.id"
|
|
91
|
+
@qrMake="makeQrcode"
|
|
92
|
+
></le-button-qr>
|
|
93
|
+
<le-button type="primary" text="保存" @click="save"></le-button>
|
|
94
|
+
</div>
|
|
84
95
|
</el-form-item>
|
|
85
96
|
</el-form>
|
|
86
97
|
</template>
|
|
87
98
|
<script>
|
|
88
|
-
import { edit } from "@/api/user";
|
|
99
|
+
import { edit, getUserQrCode } from "@/api/user";
|
|
89
100
|
import { departList } from "@/api/depart";
|
|
90
101
|
export default {
|
|
91
102
|
name: "le-user-sub",
|
|
@@ -113,6 +124,7 @@ export default {
|
|
|
113
124
|
depart_id: "",
|
|
114
125
|
depart_name: "",
|
|
115
126
|
},
|
|
127
|
+
qrcode: "",
|
|
116
128
|
userRules: {
|
|
117
129
|
// account: [{ required: true, message: "请输入账号", trigger: "blur" }],
|
|
118
130
|
},
|
|
@@ -208,6 +220,20 @@ export default {
|
|
|
208
220
|
}
|
|
209
221
|
});
|
|
210
222
|
},
|
|
223
|
+
makeQrcode(callback) {
|
|
224
|
+
let param = {};
|
|
225
|
+
param.uid = this.ruleUserForm.id;
|
|
226
|
+
getUserQrCode(param).then((res) => {
|
|
227
|
+
if (res.data.code == "10000") {
|
|
228
|
+
this.qrcode = res.data.data;
|
|
229
|
+
if (callback) {
|
|
230
|
+
callback("ok");
|
|
231
|
+
}
|
|
232
|
+
} else {
|
|
233
|
+
this.$message.error(res.data.info);
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
},
|
|
211
237
|
},
|
|
212
238
|
};
|
|
213
239
|
</script>
|