You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
9.2 KiB
1 lines
9.2 KiB
webpackJsonp([70],{Edcl:function(e,r){},oRGl:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("mvHQ"),i=t.n(n),o=t("Xxa5"),a=t.n(o),m=t("exGp"),s=t.n(m),l={data:function(){var e=this,r=function(r,t,n){var i=e.subForm[r.key],o=e.subForm,a=o.reminder_status,m=void 0===a?0:a,s=o.reminder_type,l=o.reminder_public,u=void 0===l?0:l;i=i?i.replace(/(^\s*)|(\s*$)/g,""):"",1!==m||(1!==s||("reminder_phone"!==r.key||0!==u)&&"reminder_phone"===r.key)&&2!==s||i?n():n(new Error("请输入"+r.text))};return{subForm:{reminder_status:0,reminder_type:1,reminder_public:0,reminder_tmpl_id:"",reminder_phone:"",reminder_text:"",moor_reminder_phone:"",reminder_timing:"",notice_agent:0,reminder_admin_status:0,reminder_admin_phone:[]},subFormRules:{reminder_status:{required:!0,type:"number",message:"请选择是否开启来电通知",trigger:"blur"},reminder_type:{required:!0,type:"number",message:"请选择语音通知运营商",trigger:"blur"},reminder_public:{required:!0,type:"number",message:"请选择语音通知模式",trigger:"blur"},reminder_tmpl_id:{required:!0,validator:r,key:"reminder_tmpl_id",text:"语音通知模板id",trigger:"blur"},reminder_phone:{required:!0,validator:r,key:"reminder_phone",text:"语音通知电话",trigger:"blur"},reminder_text:{required:!0,validator:r,key:"reminder_text",text:"语音通知内容",trigger:"blur"},moor_reminder_phone:{required:!0,validator:r,key:"moor_reminder_phone",text:"语音通知电话",trigger:"blur"},reminder_timing:{required:!0,validator:function(r,t,n){1!==e.subForm.reminder_status||/^\+?[0-9]*$/.test(t)?n():n(new Error("请输入语音通知定时任务分钟数"))},trigger:"blur"},notice_agent:{required:!0,trigger:"blur"},reminder_admin_status:{required:!0,trigger:"blur"},reminder_admin_phone:{required:!0,validator:function(e,r,t){var n=/^1[3-9]\d{9}$/;for(var i in r){var o=1*i+1,a=r[i].phone;if(!a||!n.test(a))return void t(new Error("第"+o+"条数据:"+(a?a+" 手机号无效":"请输入管理员手机号")))}r.filter(function(e){return e.phone}).length===r.length&&t()},trigger:"blur"}}}},created:function(){var e=this;return s()(a.a.mark(function r(){return a.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.getDetail();case 2:case"end":return r.stop()}},r,e)}))()},methods:{getDetail:function(){var e=this;return s()(a.a.mark(function r(){var t,n,i,o;return a.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.$api.system.reminderConfigInfo();case 2:if(t=r.sent,n=t.code,i=t.data,200===n){r.next=7;break}return r.abrupt("return");case 7:for(o in i.reminder_admin_phone=i.reminder_admin_phone.length>0?i.reminder_admin_phone.map(function(e){return{phone:e}}):[{phone:""}],e.subForm)e.subForm[o]=i[o];case 9:case"end":return r.stop()}},r,e)}))()},toAddItem:function(e,r){var t=this;return s()(a.a.mark(function n(){return a.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:2===e?t.subForm.reminder_admin_phone.splice(r,1):t.subForm.reminder_admin_phone.push({phone:""});case 1:case"end":return n.stop()}},n,t)}))()},submitFormInfo:function(e){var r=this;this.$refs[e].validate(function(e){if(e){var t=JSON.parse(i()(r.subForm)),n=/^1[3-9]\d{9}$/,o=t.reminder_admin_phone.filter(function(e){return e.phone&&n.test(e.phone)});t.reminder_admin_phone=o.map(function(e){return e.phone}),r.$api.system.reminderConfigUpdate(t).then(function(e){200===e.code&&(r.subForm.reminder_admin_phone=o,r.$message.success(r.$t("tips.successSub")))})}})}}},u={render:function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"lb-group-news"},[t("top-nav"),e._v(" "),t("div",{staticClass:"page-main"},[t("lb-tips",[t("p",{staticClass:"c-warning"},[e._v("\n 温馨提示:运营商规定,针对同一个“资质+用途“下的主叫进行流控限制,1次/分钟、5次/小时、20次/24小时(流控规则计时是从第一次正常外呼开始计时的)\n ")])]),e._v(" "),t("el-form",{ref:"subForm",attrs:{model:e.subForm,rules:e.subFormRules,"label-width":"160px"},nativeOn:{submit:function(e){e.preventDefault()}}},[t("el-form-item",{attrs:{label:"是否开启来电通知",prop:"reminder_status"}},[t("el-radio-group",{model:{value:e.subForm.reminder_status,callback:function(r){e.$set(e.subForm,"reminder_status",r)},expression:"subForm.reminder_status"}},[t("el-radio",{attrs:{label:1}},[e._v(e._s(e.$t("action.ON")))]),e._v(" "),t("el-radio",{attrs:{label:0}},[e._v(e._s(e.$t("action.OFF")))])],1),e._v(" "),t("lb-tool-tips",[e._v("开启后,必须配置语音通知模板id, 用户下单时会电话通知"+e._s(e.$t("action.attendantName")))])],1),e._v(" "),1===e.subForm.reminder_status?t("block",[t("el-form-item",{attrs:{label:"语音通知运营商",prop:"reminder_type"}},[t("el-radio-group",{model:{value:e.subForm.reminder_type,callback:function(r){e.$set(e.subForm,"reminder_type",r)},expression:"subForm.reminder_type"}},[t("el-radio",{attrs:{label:1}},[e._v("阿里云")]),e._v(" "),t("el-radio",{attrs:{label:2}},[e._v("容联七陌")])],1)],1),e._v(" "),1===e.subForm.reminder_type?t("block",[t("el-form-item",{attrs:{label:"语音通知模式",prop:"reminder_public"}},[t("el-radio-group",{model:{value:e.subForm.reminder_public,callback:function(r){e.$set(e.subForm,"reminder_public",r)},expression:"subForm.reminder_public"}},[t("el-radio",{attrs:{label:0}},[e._v("专属模式")]),e._v(" "),t("el-radio",{attrs:{label:1}},[e._v("公共模式")])],1)],1),e._v(" "),t("el-form-item",{attrs:{label:"语音通知模板id",prop:"reminder_tmpl_id"}},[t("el-input",{attrs:{placeholder:"请输入语音通知模板id"},model:{value:e.subForm.reminder_tmpl_id,callback:function(r){e.$set(e.subForm,"reminder_tmpl_id",r)},expression:"subForm.reminder_tmpl_id"}})],1),e._v(" "),0===e.subForm.reminder_public?t("el-form-item",{attrs:{label:"语音通知电话",prop:"reminder_phone"}},[t("el-input",{attrs:{placeholder:"请输入语音通知电话"},model:{value:e.subForm.reminder_phone,callback:function(r){e.$set(e.subForm,"reminder_phone",r)},expression:"subForm.reminder_phone"}})],1):e._e()],1):e._e(),e._v(" "),2===e.subForm.reminder_type?t("block",[t("el-form-item",{attrs:{label:"语音通知内容",prop:"reminder_text"}},[t("el-input",{attrs:{placeholder:"请输入语音通知内容"},model:{value:e.subForm.reminder_text,callback:function(r){e.$set(e.subForm,"reminder_text",r)},expression:"subForm.reminder_text"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"语音通知电话",prop:"moor_reminder_phone"}},[t("el-input",{attrs:{placeholder:"请输入语音通知电话"},model:{value:e.subForm.moor_reminder_phone,callback:function(r){e.$set(e.subForm,"moor_reminder_phone",r)},expression:"subForm.moor_reminder_phone"}})],1)],1):e._e(),e._v(" "),t("el-form-item",{attrs:{label:"语音通知定时任务",prop:"reminder_timing"}},[t("el-input",{attrs:{placeholder:"请输入语音通知定时任务分钟数"},model:{value:e.subForm.reminder_timing,callback:function(r){e.$set(e.subForm,"reminder_timing",r)},expression:"subForm.reminder_timing"}},[t("template",{slot:"append"},[e._v("分钟")])],2),e._v(" "),t("lb-tool-tips",[e._v("填写0就是没有定时任务,仅下单的时候通知一次")])],1),e._v(" "),t("el-form-item",{attrs:{label:"是否通知代理商",prop:"notice_agent"}},[t("el-radio-group",{model:{value:e.subForm.notice_agent,callback:function(r){e.$set(e.subForm,"notice_agent",r)},expression:"subForm.notice_agent"}},[t("el-radio",{attrs:{label:1}},[e._v("通知")]),e._v(" "),t("el-radio",{attrs:{label:0}},[e._v("不通知")])],1),e._v(" "),t("lb-tool-tips",[e._v("选择通知,用户下单后,订单所选"+e._s(e.$t("action.attendantName"))+"的代理商将收到来电提醒")])],1),e._v(" "),t("el-form-item",{attrs:{label:"是否通知管理员",prop:"reminder_admin_status"}},[t("el-radio-group",{model:{value:e.subForm.reminder_admin_status,callback:function(r){e.$set(e.subForm,"reminder_admin_status",r)},expression:"subForm.reminder_admin_status"}},[t("el-radio",{attrs:{label:1}},[e._v("通知")]),e._v(" "),t("el-radio",{attrs:{label:0}},[e._v("不通知")])],1)],1),e._v(" "),1===e.subForm.reminder_admin_status?t("el-form-item",{attrs:{label:"管理员手机号",prop:"reminder_admin_phone"}},e._l(e.subForm.reminder_admin_phone,function(r,n){return t("div",{key:n,staticClass:"mb-md"},[t("el-input",{attrs:{placeholder:"请输入管理员手机号"},model:{value:r.phone,callback:function(t){e.$set(r,"phone",t)},expression:"item.phone"}}),e._v(" "),e.subForm.reminder_admin_phone.length>1||1===e.subForm.reminder_admin_phone.length&&0!==n?t("lb-button",{staticStyle:{"margin-left":"16px"},attrs:{type:"danger",icon:"el-icon-delete"},on:{click:function(r){return e.toAddItem(2,n)}}},[e._v("删除")]):e._e(),e._v(" "),n===e.subForm.reminder_admin_phone.length-1?t("lb-button",{staticStyle:{"margin-left":"16px"},attrs:{type:"primary",icon:"el-icon-plus"},on:{click:function(r){return e.toAddItem(1)}}},[e._v("新增")]):e._e()],1)}),0):e._e()],1):e._e(),e._v(" "),t("el-form-item",[t("lb-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary"},on:{click:function(r){return e.submitFormInfo("subForm")}}},[e._v(e._s(e.$t("action.submit")))])],1)],1)],1)],1)},staticRenderFns:[]};var d=t("VU/8")(l,u,!1,function(e){t("Edcl")},"data-v-46e8f480",null);r.default=d.exports}}); |