1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
<template>
<div>
<van-form @submit="onSubmit">
<table>
<tr>
<td>
<mobile-input label="营销人员:" :readonly="true" :border="false" label-width="10px" input-align="left" name="USERID" v-model="USERID" size="small" />
</td>
<td>
<mobile-input label="营销时间:" :readonly="true" :border="false" label-width="10px" input-align="left" name="OPERATEDATE" v-model="OPERATEDATE" size="small" />
</td>
</tr>
<tr>
<td>
<mobile-input label="客户类型:" :readonly="true" :border="false" label-width="10px" input-align="left" name="CUSTOMERTYPE" v-model="CUSTOMERTYPE" size="small" />
</td>
<td>
<mobile-input label="客户名称:" :readonly="true" :border="false" label-width="10px" input-align="left" name="CUSTOMERNAME" v-model="CUSTOMERNAME" size="small" />
</td>
</tr>
<tr>
<td>
<mobile-input label="单位名称:" :readonly="true" :border="false" label-width="10px" input-align="left" name="COMPANYNAME" v-model="COMPANYNAME" size="small" />
</td>
<td>
<mobile-input label="联系电话:" :readonly="true" :border="false" label-width="10px" input-align="left" name="TELPHONE" v-model="TELPHONE" size="small" />
</td>
</tr>
<tr>
<td colspan="2">
<div class="marketing-direction">
<div class="marketing-type">营销产品:</div><span style="font-size: 20px;color: red">*</span>
<div class="marketing-direction-label">
<div @click="marketing_direction_1" :style="md1">随意分</div>
<div @click="marketing_direction_2" :style="md2">优易贷</div>
<div @click="marketing_direction_3" :style="md3">综合消费贷款</div>
<div @click="marketing_direction_4" :style="md4">综合消费分期</div>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="choice">
<div class="choice-title">是否添加微信:</div><span style="font-size: 20px;color: red;width: 18px">*</span>
<div class="choice-flag">
<div ref="ISWECHAT_yes" @click="ISWECHAT_yes">是</div>
<div ref="ISWECHAT_no" @click="ISWECHAT_no">否</div>
</div>
</div>
</td>
<td>
<d-datetime-picker label="下次任务生成日期:" :rules="[{ required: true, message: '' }]" v-model="NEXTTASKDATE" placeholder="请选择下次任务生成日期" :border="true" :required="true"></d-datetime-picker>
</td>
</tr>
<tr>
<td>
<d-select label="营销结果:" :rules="[{ required: true, message: '' }]" placeholder="请选择客户类型" :required="true" border="true" v-model="TASKRESULT" sfield="TelMarketingResult" size="small"></d-select>
</td>
</tr>
<tr>
<td colspan="2" class="table-imput-style">
<mobile-input label="备注:" class="remarks" type="textarea" :maxlength="500" :rows="3" label-width="10px" input-align="left" name="RESULTDESCRIBE" v-model="RESULTDESCRIBE" placeholder="请输入" size="small" />
</td>
</tr>
<tr>
<td colspan="2">
<div class="operate">
<van-button round type="info" size="normal">保存</van-button>
</div>
</td>
</tr>
</table>
</van-form>
</div>
</template>
<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import TitleBar from "@/components/general/TitleBar.vue";
import MobileInput from "@/components/general/form/MobileInput.vue";
import DSelect from "@/components/general/form/DSelect.vue";
import DDatetimePicker from "@/components/general/form/DDatetimePicker.vue";
import IF from "@/public/factory/InterFaceFactory";
import { NativeUI } from "@/public/ts/NativeUI";
import { getText } from '@/stores';
import nettyApi from "@/constants/api/ms-netty/netty.api.ts";
/**
* @Description:电话营销
* @author pd
* @date 2021-11-08 15:53:04
*/
@Component({
name: "DoingMarketByPhone",
components: { TitleBar, MobileInput, DSelect, DDatetimePicker },
})
export default class DoingMarketByPhone extends Vue {
CERTID = this.$store.getters.getCusInfo.CERTID || ''; //身份证
COMPANYADD = this.$store.getters.getCusInfo.COMPANYADD || ''; //地址
USERID = this.$store.getters.getCusInfo.OPERATEUSERID || ''; //营销人员
OPERATEDATE = this.$store.getters.getCusInfo.OPERATEDATE || ''; //营销时间
CUSTOMERTYPE = ''; //客户类型
CUSTOMERNAME = this.$store.getters.getCusInfo.CUSTOMERNAME || ''; //客户名称
COMPANYNAME = this.$store.getters.getCusInfo.COMPANYNAME || ''; //单位名称
TELPHONE = this.$store.getters.getCusInfo.TELPHONE || ''; //联系电话
CstNm = ''; //无用
PRODUCTID = ''; //营销产品
ISWECHAT = ''; //是否添加微信 1是/2否
NEXTTASKDATE = ''; //下次任务生成日期
TASKRESULT = ''; //营销结果
RESULTDESCRIBE = ''; //备注
NULLIFYREASON = ''; //作废原因
REMARK = ''; //退回原因
SYF_data = '0'; //随意分
YYD_data = '0'; //优易贷
DYDK_data = '0'; //综合消费抵押贷款
XFFQ_data = '0'; //综合消费分期
onClick() {
console.log("111");
}
radio: any = "1";
src = require("../../assets/svg/red-subscript.svg");
s = {
backgroundColor: "#fff4f6",
border: "1px solid #fd5065",
color: "#fd5065",
backgroundImage: `url("${this.src}")`,
backgroundRepeat: "no-repeat",
backgroundPosition: "right bottom",
};
//营销产品
md1: any = {};
md2: any = {};
md3: any = {};
md4: any = {};
marketing_direction_1() {
if (this.md1 === this.s) {
this.SYF_data = "";
this.md1 = {};
} else {
this.SYF_data = "1";
this.md1 = this.s;
}
}
marketing_direction_2() {
if (this.md2 === this.s) {
this.YYD_data = "";
this.md2 = {};
} else {
this.YYD_data = "1";
this.md2 = this.s;
}
}
marketing_direction_3() {
if (this.md3 === this.s) {
this.DYDK_data = "";
this.md3 = {};
} else {
this.DYDK_data = "1";
this.md3 = this.s;
}
}
marketing_direction_4() {
if (this.md4 === this.s) {
this.XFFQ_data = "";
this.md4 = {};
} else {
this.XFFQ_data = "1";
this.md4 = this.s;
}
}
//是否添加微信
ISWECHAT_yes() {
this.ISWECHAT = '1';
(this.$refs.ISWECHAT_yes as any).style.border = '0';
(this.$refs.ISWECHAT_yes as any).style.backgroundColor = '#FF574C';
(this.$refs.ISWECHAT_yes as any).style.color = '#fff';
(this.$refs.ISWECHAT_no as any).style.border = '1px solid #e8e8e8';
(this.$refs.ISWECHAT_no as any).style.backgroundColor = '#fff';
(this.$refs.ISWECHAT_no as any).style.color = '#333333';
};
ISWECHAT_no() {
this.ISWECHAT = '2';
(this.$refs.ISWECHAT_no as any).style.border = '0';
(this.$refs.ISWECHAT_no as any).style.backgroundColor = '#FF574C';
(this.$refs.ISWECHAT_no as any).style.color = '#fff';
(this.$refs.ISWECHAT_yes as any).style.border = '1px solid #e8e8e8';
(this.$refs.ISWECHAT_yes as any).style.backgroundColor = '#fff';
(this.$refs.ISWECHAT_yes as any).style.color = '#333333';
};
//提交
onSubmit() {
if (this.SYF_data == '1') {
this.PRODUCTID = this.PRODUCTID + '303131,';
}
if (this.YYD_data == '1') {
this.PRODUCTID = this.PRODUCTID + '140331,';
}
if (this.DYDK_data == '1') {
this.PRODUCTID = this.PRODUCTID + '140111,';
}
if (this.XFFQ_data == '1') {
this.PRODUCTID = this.PRODUCTID + '302121,';
}
if (this.PRODUCTID.length > 0 && this.TASKRESULT != '' && this.ISWECHAT != '') {
this.PRODUCTID = this.PRODUCTID.substring(0, this.PRODUCTID.length - 1);
this.selectYXJL();
} else if (this.TASKRESULT != '' && this.PRODUCTID.length == 0) {
NativeUI.toast('请选择营销产品!');
} else if (this.TASKRESULT != '' && this.ISWECHAT == '') {
NativeUI.toast('请选择是否添加微信!');
}
}
/**
* @Description 营销记录保存
* @Author JiangTao
* @Date 2021-11-29 下午 04:11
*/
selectYXJL() {
let param = {
SERIALNO: this.$store.getters.getCusInfo.SERIALNO, //营销任务流水号
TASKDATE: this.OPERATEDATE, //营销时间
PRODUCTID: this.PRODUCTID, //营销产品
ISTASK: '1', //业务标识
NEXTTASKDATE: this.NEXTTASKDATE, //下次任务生成日期
TASKRESULT: this.TASKRESULT, //营销结果
RESULTDESCRIBE: this.RESULTDESCRIBE, //备注
ISWECHAT: this.ISWECHAT, //是否添加微信
tc: nettyApi.TRADE_CODE.selectGDHYXJL
};
NativeUI.showWaiting('正在保存...');
return IF.transferDataInter(nettyApi.commonRq, param).then((res: any) => {
console.log("+++", param);
console.log("---", res);
NativeUI.closeWaiting();
if (res.rc == '1') {
NativeUI.toast("保存成功!");
setTimeout(() => {
this.$router.go(-1);
}, 2500);
} else {
NativeUI.toast(res.msg);
}
});
}
//重置数据
resetData() {
this.md1 = {};
this.md2 = {};
this.md3 = {};
this.md4 = {};
this.SYF_data = '0'; //随意分
this.YYD_data = '0'; //优易贷
this.DYDK_data = '0'; //综合消费抵押贷款
this.XFFQ_data = '0'; //综合消费分期
(this.$refs.ISWECHAT_no as any).style.border = '1px solid #e8e8e8';
(this.$refs.ISWECHAT_no as any).style.backgroundColor = '#fff';
(this.$refs.ISWECHAT_no as any).style.color = '#333333';
(this.$refs.ISWECHAT_yes as any).style.border = '1px solid #e8e8e8';
(this.$refs.ISWECHAT_yes as any).style.backgroundColor = '#fff';
(this.$refs.ISWECHAT_yes as any).style.color = '#333333';
this.ISWECHAT = "";
this.NEXTTASKDATE = "";
this.TASKRESULT = "";
this.RESULTDESCRIBE = "";
}
activated() {
this.resetData();
}
mounted() {
this.resetData();
this.CUSTOMERTYPE = getText(this.$store.getters.getCusInfo.CUSTOMERTYPE, 'TelMarketingCustomerType');
}
}
</script>
<style scoped>
.marketing-type {
width: 6.2em;
color: #999999;
font-size: 14px;
text-align: right;
}
.marketing-direction {
display: flex;
align-items: center;
padding: 0 14px 21px 14px;
}
.marketing-direction-label {
width: 80%;
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
}
.marketing-direction-label > * {
width: 20%;
font-size: 13px;
padding-top: 1.1%;
padding-bottom: 0.7%;
border-radius: 5px;
text-align: center;
background-color: #f2f2f2;
border: 1px solid rgba(215, 215, 215, 1);
margin: 0.7% 1%;
}
::v-deep .van-field__label {
text-align: right;
}
::v-deep .d-form-field,
::v-deep .van-field {
align-items: center;
}
.operate {
width: 100%;
display: flex;
justify-content: center;
}
.operate button {
width: 20.5%;
border-radius: 30px;
font-size: 18px;
padding: 1% 0;
margin: 1%;
}
.operate > button:nth-child(1) {
color: white;
background-color: #FF574C;
border: 1px solid #FF574C;
}
::v-deep .van-button__text {
font-size: 18px;
}
.choice {
background-color: white;
display: flex;
justify-content: flex-start;
align-items: center;
padding: 0 14px 21px 14px;
}
.choice-title {
width: 89px;
font-size: 14px;
color: #999999;
text-align: right;
}
.choice-flag {
display: flex;
justify-content: flex-end;
}
.choice-flag div {
width: 60px;
border: 1px solid #e8e8e8;
font-size: 13px;
height: 34px;
display: flex;
justify-content: center;
align-items: center;
}
.choice-flag > div:nth-child(1) {
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
.choice-flag > div:nth-child(2) {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
table {
width: 90%;
margin: 0 auto;
}
::v-deep .table-imput-style > div:nth-child(1) .van-field {
align-items: flex-start;
}
</style>