leisure-core 0.4.23 → 0.4.25

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.
@@ -19,27 +19,34 @@
19
19
  </el-table-column>
20
20
  <el-table-column prop="cp_link_phone" label="联系人手机">
21
21
  </el-table-column>
22
- <el-table-column prop="cp_wx_url" label="二维码"> </el-table-column>
22
+ <el-table-column prop="cp_qrcode" label="二维码"> </el-table-column>
23
23
  <el-table-column prop="note" label="备注"> </el-table-column>
24
24
  <el-table-column
25
25
  fixed="right"
26
26
  label="操作"
27
27
  align="center"
28
- width="160"
28
+ width="250"
29
29
  row
30
30
  >
31
31
  <template slot-scope="scope">
32
- <le-button
33
- id="btnEdit"
34
- v-permission="$route.params.btns"
35
- text="编辑"
36
- :disp="btnEditDisp"
37
- @click="openEditWindow(scope.row)"
38
- ></le-button>
39
- <le-button-msg
40
- @click="del(scope.row)"
41
- :disp="btnDelDisp"
42
- ></le-button-msg>
32
+ <div class="btnClass">
33
+ <le-button-qr
34
+ :qrCodeUrl="scope.row.cp_qrcode"
35
+ :fileName="scope.row.cp_name"
36
+ @qrMake="showQrcodeFun"
37
+ ></le-button-qr>
38
+ <le-button
39
+ id="btnEdit"
40
+ v-permission="$route.params.btns"
41
+ text="编辑"
42
+ :disp="btnEditDisp"
43
+ @click="openEditWindow(scope.row)"
44
+ ></le-button>
45
+ <le-button-msg
46
+ @click="del(scope.row)"
47
+ :disp="btnDelDisp"
48
+ ></le-button-msg>
49
+ </div>
43
50
  </template>
44
51
  </el-table-column>
45
52
  </el-table>
@@ -89,6 +96,7 @@ export default {
89
96
  },
90
97
  tableData: [],
91
98
  showDialog: false,
99
+ showQRCodeDialog: false,
92
100
  currentRow: {},
93
101
  };
94
102
  },
@@ -116,6 +124,7 @@ export default {
116
124
  this.searchData.pageNo = currentPage;
117
125
  this.list();
118
126
  },
127
+
119
128
  openEditWindow(item) {
120
129
  this.currentRow = item;
121
130
  this.showDialog = true;
@@ -124,6 +133,16 @@ export default {
124
133
  this.currentRow = {};
125
134
  this.showDialog = false;
126
135
  },
136
+ showQrcodeFun(callback) {
137
+ if (callback) {
138
+ callback("ok");
139
+ }
140
+ },
127
141
  },
128
142
  };
129
143
  </script>
144
+ <style scoped>
145
+ .btnClass {
146
+ display: flex;
147
+ }
148
+ </style>
package/le-cp/src/sub.vue CHANGED
@@ -5,12 +5,9 @@
5
5
  </el-form-item>
6
6
  <el-form-item label="酒店二维码">
7
7
  <el-row>
8
- <el-col :span="20">
8
+ <el-col :span="24">
9
9
  <el-input v-model="form.cp_qrcode" disabled></el-input>
10
10
  </el-col>
11
- <el-col :span="4">
12
- <le-button @click="makeQrcode" text="生成二维码" />
13
- </el-col>
14
11
  </el-row>
15
12
  </el-form-item>
16
13
  <el-form-item label="联系人手机">
@@ -22,7 +19,7 @@
22
19
  <el-input v-model="form.cp_link_nick" disabled></el-input>
23
20
  </el-col>
24
21
  <el-col :span="4">
25
- <le-button @click="getUser" text="获取用户信息"></le-button>
22
+ <le-button @click="getUser" text="绑定联系人"></le-button>
26
23
  </el-col>
27
24
  </el-row>
28
25
  </el-form-item>
@@ -89,30 +86,40 @@ export default {
89
86
  this.$refs["form"].validate((valid) => {
90
87
  if (valid) {
91
88
  let param = JSON.parse(JSON.stringify(this.form));
92
- if (param.id && param.id.length > 0) {
93
- edit(param).then((response) => {
94
- this.$message.success(response.data.info);
95
- this.$emit("rowRefresh");
96
- this.close();
97
- });
89
+ if (
90
+ param.cp_link_phone &&
91
+ param.cp_link_phone.length > 0 &&
92
+ !param.cp_link_uid
93
+ ) {
94
+ this.$message.warning("请先绑定联系人");
98
95
  } else {
99
- create(param).then((res) => {
100
- this.$message.success(res.data.info);
101
- this.$emit("rowRefresh");
102
- this.close();
103
- });
96
+ this.savaData(param);
104
97
  }
105
- } else {
106
- return false;
107
98
  }
108
99
  });
109
100
  },
101
+ savaData(param) {
102
+ if (param.id && param.id.length > 0) {
103
+ edit(param).then((response) => {
104
+ this.$message.success(response.data.info);
105
+ this.$emit("rowRefresh");
106
+ this.close();
107
+ });
108
+ } else {
109
+ create(param).then((res) => {
110
+ this.$message.success(res.data.info);
111
+ this.$emit("rowRefresh");
112
+ this.close();
113
+ });
114
+ }
115
+ },
110
116
  getUser() {
111
117
  let param = {};
112
118
  param.phone = this.form.cp_link_phone;
113
119
  if (param.phone && param.phone.length > 0) {
114
120
  userOne(param).then((response) => {
115
121
  let user = response.data.data;
122
+ console.log(user);
116
123
  this.form.cp_link_uid = user.id;
117
124
  this.form.cp_link_nick = user.nick;
118
125
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leisure-core",
3
- "version": "0.4.23",
3
+ "version": "0.4.25",
4
4
  "description": "leisure-core是leisure-ui-core的简称,是京心数据基于vue2.0开发的一套后台系统框架与js库,包含登录,首页框架等",
5
5
  "private": false,
6
6
  "author": "北方乐逍遥(zcx7878)",