Commit faa5c42d authored by caimeng's avatar caimeng

优化发短信

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