启程易购后端代码
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.
 
 
 
 
 
 
qicheng_shop_backend/public/system/js/chunk-07cd2417.959624d3.js

1 lines
11 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-07cd2417"],{1184:function(t,e,s){"use strict";s("c1bc4")},"1af0":function(t,e,s){},"1c8c":function(t,e,s){"use strict";s("1af0")},c1bc4:function(t,e,s){},c95f:function(t,e,s){"use strict";s.r(e);var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("el-card",{staticClass:"ivu-mt"},[s("el-form",{ref:"levelFrom",attrs:{model:t.levelFrom,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},["/admin/sms/template"===t.$route.path?s("el-row",{attrs:{type:"flex",gutter:24}},[s("el-button",{staticClass:"ml20",attrs:{type:"primary"},on:{click:t.add}},[t._v("申请模板")]),t._v(" "),s("el-button",{staticClass:"ml20",on:{click:t.editSign}},[t._v("修改签名")])],1):s("el-row",{attrs:{type:"flex",gutter:24}},[s("el-col",t._b({},"el-col",t.grid,!1),[s("el-form-item",{attrs:{label:"是否拥有:"}},[s("el-select",{attrs:{placeholder:"请选择",clearable:""},on:{change:t.userSearchs},model:{value:t.levelFrom.is_have,callback:function(e){t.$set(t.levelFrom,"is_have",e)},expression:"levelFrom.is_have"}},[s("el-option",{attrs:{value:"1"}},[t._v("有")]),t._v(" "),s("el-option",{attrs:{value:"0"}},[t._v("没有")])],1)],1)],1)],1)],1),t._v(" "),s("el-table",{ref:"table",staticClass:"mt25",attrs:{data:t.levelLists,loading:t.loading}},[s("el-table-column",{attrs:{prop:"id",label:"ID","min-width":"200"}}),t._v(" "),s("el-table-column",{attrs:{prop:"templateid",label:"模板ID","min-width":"90"}}),t._v(" "),s("el-table-column",{attrs:{prop:"title",label:"模板名称","min-width":"90"}}),t._v(" "),s("el-table-column",{attrs:{prop:"content",label:"模板内容","min-width":"70"}}),t._v(" "),s("el-table-column",{attrs:{prop:"type",label:"模板类型","min-width":"90"}}),t._v(" "),s("el-table-column",{attrs:{prop:"status",label:"模板状态","min-width":"70"}}),t._v(" "),s("el-table-column",{attrs:{slot:"is_have","min-width":"70"},slot:"is_have"},["/admin/setting/sms/sms_template_apply/commons"===t.$route.path?[s("span",{directives:[{name:"show",rawName:"v-show",value:1===t.row.status,expression:"row.status === 1"}]},[t._v("有")]),t._v(" "),s("span",{directives:[{name:"show",rawName:"v-show",value:0===t.row.status,expression:"row.status === 0"}]},[t._v("没有")])]:t._e()],2)],1),t._v(" "),s("div",{staticClass:"acea-row row-right page"},[s("el-pagination",{attrs:{background:"",total:t.total,current:t.levelFrom.page,"show-elevator":"","show-total":"","page-size":t.levelFrom.limit},on:{change:t.pageChange}})],1)],1),t._v(" "),s("edit-from",{ref:"edits",attrs:{FromData:t.FromData},on:{submitFail:t.submitFail}}),t._v(" "),t.modals?s("el-dialog",{staticClass:"order_box",attrs:{visible:t.modals,title:"短信账户签名修改",width:"600px","before-close":t.cancel("formInline")},on:{"update:visible":function(e){t.modals=e}}},[s("el-form",{ref:"formInline",attrs:{model:t.formInline,rules:t.ruleInline,"label-width":63},nativeOn:{submit:function(t){t.preventDefault()}}},[s("el-form-item",[s("el-input",{staticClass:"pageWidth",attrs:{disabled:"",prefix:"ios-person-outline",size:"small"},model:{value:t.accountInfo.account,callback:function(e){t.$set(t.accountInfo,"account",e)},expression:"accountInfo.account"}})],1),t._v(" "),s("el-form-item",{attrs:{prop:"phone"}},[s("el-input",{staticClass:"pageWidth",attrs:{prefix:"ios-call-outline",placeholder:"请输入您的手机号",disabled:t.formInline.phone,size:"small"},model:{value:t.formInline.phone,callback:function(e){t.$set(t.formInline,"phone",e)},expression:"formInline.phone"}})],1),t._v(" "),s("el-form-item",[s("el-input",{staticClass:"pageWidth",attrs:{disabled:t.sign,prefix:"ios-document-outline",placeholder:"请输入短信签名,例如:CRMEB",size:"small"},model:{value:t.sign,callback:function(e){t.sign=e},expression:"sign"}})],1),t._v(" "),s("el-form-item",{attrs:{prop:"sign"}},[s("el-input",{staticClass:"pageWidth",attrs:{prefix:"ios-document-outline",placeholder:"请输入新的短信签名,例如:CRMEB",size:"small"},model:{value:t.formInline.sign,callback:function(e){t.$set(t.formInline,"sign",e)},expression:"formInline.sign"}})],1),t._v(" "),s("el-form-item",{attrs:{prop:"code"}},[s("div",{staticClass:"code acea-row row-middle"},[s("el-input",{staticClass:"pageWidth",attrs:{type:"text",prefix:"ios-keypad-outline",placeholder:"验证码",size:"small"},model:{value:t.formInline.code,callback:function(e){t.$set(t.formInline,"code",e)},expression:"formInline.code"}}),t._v(" "),s("el-button",{attrs:{disabled:!this.canClick,size:"small"},on:{click:t.cutDown}},[t._v(t._s(t.cutNUm))])],1)]),t._v(" "),s("el-form-item",[s("el-button",{staticClass:"btn width100",attrs:{type:"primary",long:"",size:"small"},on:{click:function(e){return t.editSubmit("formInline")}}},[t._v("确认修改")])],1)],1)],1):t._e()],1)},i=[],n=(s("7f7f"),s("c80c")),o=(s("96cf"),s("3b8d")),l=s("db72"),r=s("2f62"),c=s("90e7"),m=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.FromData?s("div",[t.modals?s("el-dialog",{attrs:{visible:t.modals,title:t.FromData.title,"z-index":1,width:"700","before-close":t.cancel},on:{"update:visible":function(e){t.modals=e}}},[["/marketing/coupon/save.html"===t.FromData.action?s("div",{staticClass:"radio acea-row row-middle"},[s("div",{staticClass:"name ivu-form-item-content"},[t._v("优惠券类型")]),t._v(" "),s("el-radio-group",{on:{change:t.couponsType},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[s("el-radio",{attrs:{label:0}},[t._v("通用券")]),t._v(" "),s("el-radio",{attrs:{label:1}},[t._v("品类券")]),t._v(" "),s("el-radio",{attrs:{label:2}},[t._v("商品券")])],1)],1):t._e()],t._v(" "),s("form-create",{ref:"fc",staticClass:"formBox",attrs:{option:t.config,rule:Array.from(t.FromData.rules),handleIcon:"false"},on:{submit:t.onSubmit}})],2):t._e()],1):t._e()},u=[],d=s("30ba"),p=s.n(d),h=s("0c6d"),f={name:"edit",components:{formCreate:p.a.$form()},computed:Object(l["a"])({},Object(r["d"])("admin/userLevel",["taskId","levelId"])),props:{FromData:{type:Object,default:null}},data:function(){return{modals:!1,type:0,config:{global:{upload:{props:{onSuccess:function(t,e){200===t.status?e.url=t.data.src:this.Message.error(t.message)}}}}}}},methods:{couponsType:function(){this.$parent.addType(this.type)},onSubmit:function(t){var e=this,s={};s=t,Object(h["a"])({url:this.FromData.action,method:this.FromData.method,data:s}).then((function(t){e.$parent.getList(),e.$message.success(t.message),e.modals=!1,setTimeout((function(){e.$emit("submitFail")}),1e3)})).catch((function(t){e.$message.error(t.message)}))},cancel:function(){this.type=0}}},v=f,b=(s("1184"),s("2877")),g=Object(b["a"])(v,m,u,!1,null,"540d9cab",null),_=g.exports,w={name:"smsTemplateApply",components:{editFrom:_},data:function(){var t=function(t,e,s){if(!e)return s(new Error("请填写手机号"));/^1[3456789]\d{9}$/.test(e)?s():s(new Error("手机号格式不正确!"))};return{modals:!1,cutNUm:"获取验证码",canClick:!0,spinShow:!0,grid:{xl:7,lg:7,md:12,sm:24,xs:24},sign:"",formInline:{sign:"",phone:"",code:""},ruleInline:{sign:[{required:!0,message:"请输入短信签名",trigger:"blur"}],phone:[{required:!0,validator:t,trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}]},loading:!1,columns1:[],levelFrom:{type:"",status:"",title:"",page:1,limit:20},levelFrom2:{is_have:"",page:1,limit:20},total:0,FromData:null,delfromData:{},levelLists:[],accountInfo:{}}},watch:{$route:function(t,e){this.getList()}},created:function(){this.onIsLogin()},mounted:function(){var t=this;Object(c["T"])().then((function(e){t.accountInfo=e.data,console.log(e.data),t.formInline.phone=e.data.phone,1!=e.data.sms.open&&t.$router.push("/admin/setting/sms/sms_config/index?url="+t.$route.path)}))},computed:Object(l["a"])(Object(l["a"])({},Object(r["d"])("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:75},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:{onIsLogin:function(){var t=this;this.spinShow=!0,Object(c["y"])().then(function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(s){var a;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:a=s.data,a.status?t.getList():(t.$message.warning("请先登录"),t.$router.push("/admin/setting/sms/sms_config/index?url="+t.$route.path));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.message)}))},getList:function(){var t=this;this.loading=!0,this.levelFrom.status=this.levelFrom.status||"",this.levelFrom.is_have=this.levelFrom.is_have||"";var e={data:"/admin/sms/template"===this.$route.path?this.levelFrom:this.levelFrom2,url:"/admin/sms/template"===this.$route.path?"serve/sms/temps":"notify/sms/public_temp"},s=[{title:"ID",key:"id",sortable:!0,width:80},{title:"模板ID",key:"templateid",minWidth:110},{title:"模板名称",key:"title",minWidth:150},{title:"模板内容",key:"content",minWidth:550},{title:"模板类型",key:"type",minWidth:100},{title:"模板状态",slot:"status",minWidth:100}];"/admin/setting/sms/sms_template_apply/commons"===this.$route.path?this.columns1=Object.assign([],s).slice(0,6).concat([{title:"是否拥有",slot:"is_have",minWidth:110}]):this.columns1=s,Object(c["tempListApi"])(e).then(function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(s){var a;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:a=s.data,t.levelLists=a.data,t.total=a.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$message.error(e.message)}))},pageChange:function(t){this.levelFrom.page=t,this.getList()},add:function(){var t=this;Object(c["tempCreateApi"])().then(function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(s){return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.FromData=s.data,t.$refs.edits.modals=!0;case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.message)}))},userSearchs:function(){this.levelFrom.page=1,this.getList()},submitFail:function(){this.getList()},editSign:function(){0!==this.accountInfo.sms.sign_status?(this.sign=this.accountInfo.sms.sign,this.modals=!0):this.$message.warning("签名待审核,暂无法修改")},cancel:function(t){this.modals=!1,this.$refs[t].resetFields(),this.formInline.phone=this.accountInfo.phone},editSubmit:function(t){var e=this;this.$refs[t].validate((function(s){s&&Object(c["Y"])(e.formInline).then((function(s){e.modals=!1,e.$message.success(s.message),e.$refs[t].resetFields()})).catch((function(t){e.$message.error(t.message)}))}))},cutDown:function(){var t=this;if(this.formInline.phone){if(!this.canClick)return;this.canClick=!1,this.cutNUm=60;var e={phone:this.formInline.phone};Object(c["l"])(e).then(function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(s){return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$message.success(s.message);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.message)}));var s=setInterval((function(){t.cutNUm--,0===t.cutNUm&&(t.cutNUm="获取验证码",t.canClick=!0,clearInterval(s))}),1e3)}else this.$message.warning("请填写手机号!")}}},I=w,$=(s("1c8c"),Object(b["a"])(I,a,i,!1,null,"e094b768",null));e["default"]=$.exports}}]);