Commit faa5c42d authored by caimeng's avatar caimeng

优化发短信

parent 571633af
NODE_ENV=prod
VUE_APP_SIGN_URL=https://sign.taimedias.com/index.html
VUE_APP_API=https://water.jqtianxia.com
NODE_ENV=staging
VUE_APP_SIGN_URL=http://m.jqtianxia.cn/sign_agreement/index.html
VUE_APP_API=http://47.99.245.36:8202
......@@ -103,15 +103,23 @@
</el-form-item>
<template v-if="MessageForm.templateCode === 'COMPLAINT_RETURN_SMS'">
<el-form-item label="投诉渠道:" prop="complaintChannel">
<el-input v-model="MessageForm.complaintChannel" @blur="handleInput" placeholder="请填写短信渠道" />
<el-input v-model="MessageForm.complaintChannel" @input="handleInput" placeholder="请填写短信渠道" />
</el-form-item>
</template>
<template
v-if="MessageForm.templateCode && MessageForm.templateCode !== 'COMPLAINT_RETURN_SMS' || MessageForm.templateCode && MessageForm.templateCode === 'COMPLAINT_RETURN_SMS' && MessageForm.complaintChannel">
<el-form-item label="短信内容:" prop="context">
<el-input type="textarea" v-model="MessageForm.context" placeholder="请输入发送号码" :rows="4" disabled />
</el-form-item>
<el-form-item label="发送号码:" prop="mobile">
<el-input placeholder="请输入发送号码" v-model="MessageForm.mobile" disabled />
</el-form-item>
</template>
<el-form-item>
<el-button size="small" type="primary" @click="handleMessageSubmit">提 交</el-button>
</el-form-item>
......@@ -129,6 +137,7 @@ import LoanDetail from "./LoanDetail";
import SettleReport from "./SettleReport";
import GenerateSettleReport from './GenerateSettleReport.vue';
import * as moment from "moment";
import { MessageBox } from "element-ui";
export default {
name: 'AddUserServiceDialog',
......@@ -248,6 +257,9 @@ export default {
if (status === 200 && data.success) {
this.MessageForm.context = decodeURIComponent(data.result.smsContent);
this.MessageForm.mobile = data.result.sendPhone;
} else {
this.MessageForm.context = '';
this.MessageForm.mobile = '';
}
} catch (err) {
console.log(err, '初始化短信模板异常')
......@@ -266,6 +278,7 @@ export default {
// 短信下拉
async handleSelectMsgTemplate(val) {
if (val !== 'COMPLAINT_RETURN_SMS') {
this.MessageForm.complaintChannel = '';
this.initMsgContext()
} else {
this.MessageForm.context = '';
......@@ -273,9 +286,8 @@ export default {
}
},
// 暗示法
handleInput(e) {
const value = e.target.value;
this.MessageForm.complaintChannel = value
handleInput(val) {
this.MessageForm.complaintChannel = val
this.initMsgContext();
},
// 重置
......
......@@ -44,7 +44,7 @@
<el-table-column
align="center"
prop="sendStateStr"
label="发送结果"
label="提交结果"
></el-table-column>
<el-table-column
align="center"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment