Commit 0e64314c authored by houjn@hikoon.cn's avatar houjn@hikoon.cn

1.短信渠道增加英文

2.短信模板配置增加英文
parent 0fd82d4d
......@@ -127,7 +127,7 @@ export const DICT_TYPE = {
COMMISSION_TYPE: 'commission_type',//佣金类型
COMMISSION_DARK_TYPE: 'commission_dark_type',//暗涌类型
COMMISSION_CURRENCY_TYPE: 'commission_currency_type',//佣金货币类型
COMMISSION_UNIT: 'commission_unit',//佣金货物单位
// COMMISSION_UNIT: 'commission_unit',//佣金货物单位
ECW_PORT_TYPE: 'port_type', //港口类型
CERTIFICATE_TYPE: 'certificate_type',//证件类型
//customer
......
......@@ -101,11 +101,11 @@
<el-form-item label="英文内容" prop="contentEn">
<editor v-model="form.contentEn" :min-height="150"/>
</el-form-item>
<el-form-item label="WEB端广告图片" prop="bannerUrlWeb">
<el-form-item label="WEB端广告图片(建议尺寸210*902)" prop="bannerUrlWeb">
<el-col :span="8">
<el-input v-model="form.bannerUrlWeb" placeholder="请上传WEB端广告图片" />
</el-col>
<el-upload action="#" :http-request="requestUpload" :show-file-list="false" :before-upload="beforeUploadWeb">
<el-button size="small">
上传图片
......@@ -113,7 +113,7 @@
</el-button>
</el-upload>
</el-form-item>
<el-form-item label="APP端广告图片" prop="bannerUrlApp">
<el-form-item label="APP端广告图片(建议尺寸688*294)" prop="bannerUrlApp">
<el-col :span="8">
<el-input v-model="form.bannerUrlApp" placeholder="请上传APP端广告图片" />
</el-col>
......
......@@ -35,6 +35,7 @@
<el-table v-loading="loading" :data="list">
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="短信签名" align="center" prop="signature" />
<el-table-column label="英文短信签名" align="center" prop="signatureEn" />
<el-table-column label="渠道编码" align="center" prop="code">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE" :value="scope.row.code"/>
......@@ -73,6 +74,9 @@
<el-form-item label="短信签名" prop="signature">
<el-input v-model="form.signature" placeholder="请输入短信签名" />
</el-form-item>
<el-form-item label="英文短信签名" prop="signatureEn">
<el-input v-model="form.signatureEn" placeholder="请输入英文短信签名" />
</el-form-item>
<el-form-item label="渠道编码" prop="code">
<el-input v-model="form.code" placeholder="请输入渠道编码" />
</el-form-item>
......@@ -138,6 +142,7 @@ export default {
// 表单校验
rules: {
signature: [{ required: true, message: "短信签名不能为空", trigger: "blur" }],
signatureEn: [{ required: true, message: "英文短信签名不能为空", trigger: "blur" }],
code: [{ required: true, message: "渠道编码不能为空", trigger: "blur" }],
status: [{ required: true, message: "启用状态不能为空", trigger: "blur" }],
apiKey: [{ required: true, message: "短信 API 的账号不能为空", trigger: "blur" }],
......@@ -171,6 +176,7 @@ export default {
this.form = {
id: undefined,
signature: undefined,
signatureEn: undefined,
code: undefined,
status: undefined,
remark: undefined,
......
......@@ -21,6 +21,9 @@
<el-form-item label="短信 API 的模板编号" prop="apiTemplateId">
<el-input v-model="queryParams.apiTemplateId" placeholder="请输入短信 API 的模板编号" clearable size="small" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="短信 API 的模板编号" prop="apiTemplateIdEn">
<el-input v-model="queryParams.apiTemplateIdEn" placeholder="请输入英文短信 API 的模板编号" clearable size="small" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="短信渠道" prop="channelId">
<el-select v-model="queryParams.channelId" placeholder="请选择短信渠道" clearable>
<el-option v-for="channel in channelOptions"
......@@ -55,7 +58,8 @@
<el-table v-loading="loading" :data="list">
<el-table-column label="模板编码" align="center" prop="code" />
<el-table-column label="模板名称" align="center" prop="name" />
<el-table-column label="模板内容" align="center" prop="content" width="300" />
<el-table-column label="中文API模板编号" align="center" prop="apiTemplateId" width="180" />
<el-table-column label="中文模板内容" align="center" prop="content" width="300" />
<el-table-column label="短信类型" align="center" prop="type">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE" :value="scope.row.type"/>
......@@ -66,8 +70,8 @@
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="短信 API 的模板编号" align="center" prop="apiTemplateId" width="180" />
<el-table-column label="英文API模板编号" align="center" prop="apiTemplateIdEn" width="180" />
<el-table-column label="英文模板内容" align="center" prop="contentEn" width="300" />
<el-table-column label="短信渠道" align="center" width="120">
<template slot-scope="scope">
<div>{{ formatChannelSignature(scope.row.channelId) }}</div>
......@@ -79,6 +83,8 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-share" @click="handleSendSms(scope.row)"
......@@ -116,23 +122,25 @@
<el-form-item label="模板名称" prop="name">
<el-input v-model="form.name" placeholder="请输入模板名称" />
</el-form-item>
<el-form-item label="模板内容" prop="content">
<el-input type="textarea" v-model="form.content" placeholder="请输入模板内容" />
</el-form-item>
<el-form-item label="英文模板内容" prop="content">
<el-input type="textarea" v-model="form.contentEn" placeholder="请输入模板内容" />
</el-form-item>
<el-form-item label="开启状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key="dict.value" :label="parseInt(dict.value)">{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="短信 API 模板编号" prop="apiTemplateId">
<el-form-item label="中文短信API模板编号" prop="apiTemplateId">
<el-input v-model="form.apiTemplateId" placeholder="请输入短信 API 的模板编号" />
</el-form-item>
<el-form-item label="短信 API 英文模板编号" prop="apiTemplateId">
<el-input v-model="form.apiTemplateIdEn" placeholder="请输入短信 API 的英文模板编号" />
<el-form-item label="模板内容" prop="content">
<el-input type="textarea" v-model="form.content" placeholder="请输入模板内容" />
</el-form-item>
<el-form-item label="英文短信API模板编号" prop="apiTemplateIdEn">
<el-input v-model="form.apiTemplateIdEn" placeholder="请输入英文短信API模板编号" />
</el-form-item>
<el-form-item label="英文模板内容" prop="contentEn">
<el-input type="textarea" v-model="form.contentEn" placeholder="请输入英文模板内容" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
......@@ -150,6 +158,22 @@
<el-form-item label="模板内容" prop="content">
<el-input v-model="sendSmsForm.content" type="textarea" placeholder="请输入模板内容" readonly />
</el-form-item>
<el-form-item label="英文模板内容" prop="contentEn">
<el-input v-model="sendSmsForm.contentEn" type="textarea" placeholder="请输入英文模板内容" readonly />
</el-form-item>
<!-- <el-table-column-->
<!-- prop="areaCode"-->
<!-- label="区号">-->
<!-- <template v-slot:header>-->
<!-- 区号 <span style="color: #ff0000">*</span>-->
<!-- </template>-->
<!--&lt;!&ndash; <template v-slot="{row}">&ndash;&gt;-->
<!-- <el-select v-model="areaCode" placeholder="请选择区号" filterable>-->
<!-- <el-option v-for="(item, index) in countryList"-->
<!-- :key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" />-->
<!-- </el-select>-->
<!--&lt;!&ndash; </template>&ndash;&gt;-->
<!-- </el-table-column>-->
<el-form-item label="手机号" prop="mobile">
<el-input v-model="sendSmsForm.mobile" placeholder="请输入手机号" />
</el-form-item>
......@@ -170,6 +194,7 @@
import { createSmsTemplate, updateSmsTemplate, deleteSmsTemplate, getSmsTemplate, getSmsTemplatePage,
exportSmsTemplateExcel, sendSms } from "@/api/system/sms/smsTemplate";
import { getSimpleSmsChannels } from "@/api/system/sms/smsChannel";
import {getCountryListAll} from "@/api/ecw/country";
export default {
name: "SmsTemplate",
......@@ -199,6 +224,7 @@ export default {
code: null,
content: null,
apiTemplateId: null,
apiTemplateIdEn: null,
channelId: null,
},
// 表单参数
......@@ -210,11 +236,15 @@ export default {
code: [{ required: true, message: "模板编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "模板名称不能为空", trigger: "blur" }],
content: [{ required: true, message: "模板内容不能为空", trigger: "blur" }],
apiTemplateId: [{ required: true, message: "短信 API 的模板编号不能为空", trigger: "blur" }],
contentEn: [{ required: true, message: "英文模板内容不能为空", trigger: "blur" }],
apiTemplateId: [{ required: true, message: "中文短信API的模板编号不能为空", trigger: "blur" }],
apiTemplateIdEn: [{ required: true, message: "英文短信API的模板编号不能为空", trigger: "blur" }],
channelId: [{ required: true, message: "短信渠道编号不能为空", trigger: "change" }],
},
// 短信渠道
channelOptions: [],
countryList: [],
areaCode:"",
// 发送短信
sendSmsOpen: false,
sendSmsForm: {
......@@ -233,6 +263,10 @@ export default {
getSimpleSmsChannels().then(response => {
this.channelOptions = response.data;
})
getCountryListAll().then(r => {
this.countryList = r.data
})
},
methods: {
/** 查询列表 */
......@@ -349,6 +383,7 @@ export default {
this.resetSendSms(row);
// 设置参数
this.sendSmsForm.content = row.content;
this.sendSmsForm.contentEn = row.contentEn;
this.sendSmsForm.params = row.params;
this.sendSmsForm.templateCode = row.code;
this.sendSmsForm.templateParams = row.params.reduce(function(obj, item) {
......
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