Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
loan-manager-customer
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanhai
loan-manager-customer
Commits
7e60ccfd
Commit
7e60ccfd
authored
Oct 24, 2024
by
caimeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
短信发送功能开发完成
parent
280d68fb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
105 additions
and
28 deletions
+105
-28
index.vue
src/components/McDialog/index.vue
+1
-1
LoanInfo.vue
src/components/byh/componments/LoanInfo.vue
+94
-19
Messages.vue
src/components/byh/componments/Messages.vue
+10
-8
No files found.
src/components/McDialog/index.vue
View file @
7e60ccfd
...
...
@@ -45,7 +45,7 @@ export default {
this
.
onCancel
&&
this
.
onCancel
()
},
handleSubmit
()
{
this
.
$emit
(
'update:visible'
,
false
)
//
this.$emit('update:visible', false)
this
.
onSubmit
&&
this
.
onSubmit
()
},
...
...
src/components/byh/componments/LoanInfo.vue
View file @
7e60ccfd
...
...
@@ -89,31 +89,34 @@
<!-- 短信发送 -->
<
template
v-if=
"MessageDialogVisible"
>
<BaseDialog
width=
"45%"
:footer=
"true"
:visible
.
sync=
"MessageDialogVisible"
title=
"发短信"
@
onSubmit=
"handleMessageSubmit"
>
<BaseDialog
width=
"45%"
@
onCancel=
"handleMsgCancel"
:visible
.
sync=
"MessageDialogVisible"
title=
"发短信"
>
<el-form
size=
"small"
:model=
"MessageForm"
:rules=
"MessageRules"
ref=
"MessageForm"
label-width=
"120px"
>
<el-row>
<el-col
:span=
"18"
>
<el-form-item
label=
"短信模板:"
prop=
"template"
>
<el-select
style=
"width: 100%;"
v-model=
"MessageForm.template"
placeholder=
"请选择"
>
<el-option
label=
"label"
value=
"value"
>
<el-form-item
label=
"短信模板:"
prop=
"templateCode"
>
<el-select
style=
"width: 100%;"
@
change=
"handleSelectMsgTemplate"
v-model=
"MessageForm.templateCode"
placeholder=
"请选择"
>
<el-option
v-for=
"(item, index) in msgTemplateEnmu"
:key=
"index"
:label=
"item.templateName"
:value=
"item.templateCode"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"投诉渠道:"
prop=
"channel"
>
<el-select
style=
"width: 100%;"
v-model=
"MessageForm.channel"
placeholder=
"请选择"
>
<el-option
label=
"label"
value=
"value"
>
</el-option>
</el-select>
<template
v-if=
"MessageForm.templateCode === 'COMPLAINT_RETURN_SMS'"
>
<el-form-item
label=
"投诉渠道:"
prop=
"complaintChannel"
>
<el-input
v-model=
"MessageForm.complaintChannel"
@
blur=
"handleInput"
placeholder=
"请填写短信渠道"
/>
</el-form-item>
</
template
>
<el-form-item
label=
"短信内容:"
>
<el-input
type=
"textarea"
v-model=
"MessageForm.context"
placeholder=
"请输入发送号码"
:row=
"4"
disabled
/>
<el-input
type=
"textarea"
v-model=
"MessageForm.context"
placeholder=
"请输入发送号码"
:row
s
=
"4"
disabled
/>
</el-form-item>
<el-form-item
label=
"发送号码:"
>
<el-input
placeholder=
"请输入发送号码"
v-model=
"MessageForm.mobile"
disabled
/>
</el-form-item>
<el-form-item>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleMessageSubmit"
>
提 交
</el-button>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -155,14 +158,21 @@ export default {
zyItem
:
""
,
data
:
[],
// 短信模板
msgTemplateEnmu
:
[],
// 短信发送
MessageForm
:
{
template
:
''
,
channel
:
''
,
context
:
'asdfsaf'
,
mobile
:
'13588322792'
templateCode
:
''
,
complaintChannel
:
''
,
loanNo
:
''
,
operator
:
''
,
context
:
''
,
mobile
:
''
},
MessageRules
:
{
templateCode
:
[{
required
:
true
,
message
:
"请选择短信模板"
,
trigger
:
'change'
}],
complaintChannel
:
[{
required
:
true
,
message
:
"请输入短信渠道"
,
trigger
:
'blur'
}],
},
MessageRules
:
{},
MessageDialogVisible
:
false
,
}
},
...
...
@@ -221,18 +231,83 @@ export default {
this
.
mcTitle
=
title
;
this
.
ActiveCom
=
com
;
},
// 获取短信模板
async
initMsgTemplate
()
{
try
{
const
{
data
,
status
}
=
await
this
.
$$get
(
'/detail/getSmsTemplate'
,
{});
if
(
status
===
200
&&
data
.
success
)
{
this
.
msgTemplateEnmu
=
data
.
result
;
}
}
catch
(
err
)
{
console
.
log
(
err
,
'初始化短信模板异常'
)
}
},
// 根据短信模板获取短信内容
async
initMsgContext
()
{
try
{
const
params
=
this
.
MessageForm
const
{
data
,
status
}
=
await
this
.
$$post
(
'/detail/getSmsTemplateContent'
,
{
...
params
});
if
(
status
===
200
&&
data
.
success
)
{
this
.
MessageForm
.
context
=
decodeURIComponent
(
data
.
result
.
smsContent
);
this
.
MessageForm
.
mobile
=
data
.
result
.
sendPhone
;
}
}
catch
(
err
)
{
console
.
log
(
err
,
'初始化短信模板异常'
)
}
},
// 短信发送弹框
handleMessageSend
(
row
)
{
const
{
loanNo
,
clientCell
}
=
row
;
this
.
initMsgTemplate
();
this
.
MessageDialogVisible
=
true
;
this
.
MessageForm
.
loanNo
=
loanNo
this
.
MessageForm
.
mobile
=
clientCell
this
.
MessageForm
.
operator
=
localStorage
.
getItem
(
'userName'
)
},
// 短信下拉
async
handleSelectMsgTemplate
(
val
)
{
if
(
val
!==
'COMPLAINT_RETURN_SMS'
)
{
this
.
initMsgContext
()
}
else
{
this
.
MessageForm
.
context
=
''
;
this
.
MessageForm
.
mobile
=
''
;
}
},
// 暗示法
handleInput
(
e
)
{
const
value
=
e
.
target
.
value
;
this
.
MessageForm
.
complaintChannel
=
value
this
.
initMsgContext
();
},
// 重置
handleMsgCancel
()
{
this
.
$refs
[
'MessageForm'
].
resetFields
();
},
// 发送短信提交
handleMessageSubmit
()
{
this
.
$refs
[
'MessageForm'
].
validate
((
valid
)
=>
{
console
.
log
(
valid
,
'xx'
)
this
.
$refs
[
'MessageForm'
].
validate
(
async
(
valid
)
=>
{
if
(
!
valid
)
{
return
false
}
try
{
const
params
=
this
.
MessageForm
const
{
data
,
status
}
=
await
this
.
$$post
(
'/detail/sendSms'
,
{
...
params
});
if
(
status
===
200
&&
data
.
success
)
{
this
.
$message
({
message
:
'短信发送,操作成功'
,
type
:
'success'
});
this
.
MessageDialogVisible
=
false
;
this
.
handleMsgCancel
();
}
}
catch
(
err
)
{
console
.
log
(
err
,
'短信发送失败'
)
}
})
}
...
...
src/components/byh/componments/Messages.vue
View file @
7e60ccfd
...
...
@@ -15,44 +15,46 @@
<el-table-column
align=
"center"
prop=
"bizNo"
width=
"1
6
0"
width=
"1
8
0"
label=
"ID/编号"
></el-table-column>
<el-table-column
align=
"center"
width=
"100px"
prop=
"smsType"
label=
"短信类型"
></el-table-column>
<el-table-column
align=
"center"
prop=
"content"
width=
"350"
label=
"短信内容"
></el-table-column>
<el-table-column
align=
"center"
prop=
"content"
width=
"78px"
prop=
"sendChannelStr"
label=
"短信通道"
></el-table-column>
<el-table-column
align=
"center"
prop=
"content"
width=
"78px"
prop=
"operator"
label=
"提交人"
></el-table-column>
<el-table-column
align=
"center"
prop=
"sendStateStr"
label=
"
提交
结果"
label=
"
发送
结果"
></el-table-column>
<el-table-column
align=
"center"
prop=
"send
State
Str"
label=
"发送结果"
prop=
"send
ResultStatus
Str"
label=
"
短信
发送结果"
></el-table-column>
<el-table-column
align=
"center"
prop=
"memo"
label=
"备注"
label=
"
发送结果
备注"
></el-table-column>
<el-table-column
align=
"center"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment