王总上门按摩后台代码
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
5.0 KiB

webpackJsonp([62],{HKzs:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s("mvHQ"),r=s.n(a),n=s("Xxa5"),i=s.n(n),c=s("exGp"),l=s.n(c),o=s("Dd8w"),u=s.n(o),m=s("NYxO"),b={data:function(){return{subForm:{clock_cash_status:1,list:[]},subFormRules:{clock_cash_status:{required:!0,type:"number",message:"请选择",trigger:"blur"}}}},created:function(){this.getFormInfo()},computed:u()({},Object(m.d)({routesItem:function(t){return t.routes}})),methods:{getFormInfo:function(){var t=this;return l()(i.a.mark(function e(){var s,a,r,n;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$api.service.addClockInfo();case 2:if(s=e.sent,a=s.code,r=s.data,200===a){e.next=7;break}return e.abrupt("return");case 7:for(n in r.list=0===r.list.length?[{balance:""}]:r.list,t.subForm)t.subForm[n]=r[n];case 9:case"end":return e.stop()}},e,t)}))()},toAddDel:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments[1];if(1===t)this.subForm.list.splice(e,1);else{var s=0===e?0:e-1,a=this.subForm.list[s].balance,r=0===s?"首次":"第"+(1*s+1)+"次",n=""===a?"请输入返佣比例":"请输入0至100的整数";if(""===a||!/^(?:0|[1-9][0-9]?|100)$/.test(a))return void this.$message.error(r+"加钟返佣比例:"+n);this.subForm.list.push({balance:""})}},submitForm:function(){var t=this;return l()(i.a.mark(function e(){var s,a,n,c,l,o,u,m;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=!1,t.$refs.subForm.validate(function(t){t&&(s=!0)}),a=JSON.parse(r()(t.subForm)),n=/^(?:0|[1-9][0-9]?|100)$/,1!==a.clock_cash_status){e.next=19;break}e.t0=i.a.keys(a.list);case 6:if((e.t1=e.t0()).done){e.next=17;break}if(c=e.t1.value,l=1*c+1,""!==(o=a.list[c].balance)&&n.test(o)){e.next=15;break}return u=1===l?"首次":"第"+l+"次",m=""===o?"请输入返佣比例":"请输入0至100的整数",t.$message.error(u+"加钟返佣比例:"+m),e.abrupt("return");case 15:e.next=6;break;case 17:e.next=20;break;case 19:a.list=[];case 20:if(a.list.map(function(t,e){t.times=1*e+1}),!s){e.next=25;break}return e.next=24,t.$api.service.addClockUpdate(a);case 24:t.$message.success(t.$t("tips.successSub"));case 25:case"end":return e.stop()}},e,t)}))()}}},d={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"lb-service-bell-set"},[s("top-nav"),t._v(" "),s("div",{staticClass:"page-main"},[s("el-form",{ref:"subForm",staticClass:"config-form",attrs:{model:t.subForm,rules:t.subFormRules,"label-width":"150px"},nativeOn:{submit:function(t){t.preventDefault()}}},[s("el-form-item",{attrs:{label:"是否开启",prop:"clock_cash_status"}},[s("el-radio-group",{model:{value:t.subForm.clock_cash_status,callback:function(e){t.$set(t.subForm,"clock_cash_status",e)},expression:"subForm.clock_cash_status"}},[s("el-radio",{attrs:{label:1}},[t._v(t._s(t.$t("action.ON")))]),t._v(" "),s("el-radio",{attrs:{label:0}},[t._v(t._s(t.$t("action.OFF")))]),t._v(" "),s("lb-tool-tips",{attrs:{padding:0}},[t._v("开启之后,将以以下设置的加钟返佣比例为准,否则将以"+t._s(t.$t("action.attendantName"))+"实际等级的提成比例为准")])],1)],1),t._v(" "),1===t.subForm.clock_cash_status?s("el-form-item",{attrs:{label:"加钟返佣比例",prop:"list"}},t._l(t.subForm.list,function(e,a){return s("div",{key:a,staticClass:"flex-y-center",class:[{"mt-md":0!==a}]},[s("div",{staticStyle:{width:"150px"}},[t._v("\n "+t._s(1*a+1==1?"首次":"第"+(1*a+1)+"次")+"加钟返佣比例\n ")]),t._v(" "),s("el-input",{attrs:{placeholder:"请输入返佣比例"},model:{value:e.balance,callback:function(s){t.$set(e,"balance",s)},expression:"item.balance"}},[s("template",{slot:"append"},[t._v("%")])],2),t._v(" "),0===a?s("lb-tool-tips",[t._v("若用户实际下单次数超过了后台设置的次数返佣比例,则超出的订单以最后一次设置的比例为准\n "),s("div",{staticClass:"mt-sm"},[t._v("\n 例如:后台设置了首次加钟返佣70%,第二次加钟返佣比例80%,但是未设置第三次加钟的返佣比例\n ")]),t._v(" "),s("div",{staticClass:"mt-sm"},[t._v("\n 若用户已加钟2次,第三次加钟的返佣比例应按照80%返给"+t._s(t.$t("action.attendantName"))+"\n ")])]):t._e(),t._v(" "),0!==a?s("el-button",{staticStyle:{"margin-left":"15px"},attrs:{type:"danger",size:"mini",plain:""},on:{click:function(e){return t.toAddDel(1,a)}}},[t._v(t._s(t.$t("action.delete")))]):t._e(),t._v(" "),a===t.subForm.list.length-1?s("el-button",{staticStyle:{"margin-left":"15px"},attrs:{type:"primary",size:"mini",plain:""},on:{click:function(e){return t.toAddDel(2,a)}}},[t._v(t._s(t.$t("action.add")))]):t._e()],1)}),0):t._e(),t._v(" "),s("el-form-item",[s("lb-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$t("action.submit")))])],1)],1)],1)],1)},staticRenderFns:[]};var v=s("VU/8")(b,d,!1,function(t){s("bgi4")},"data-v-5fcbc694",null);e.default=v.exports},bgi4:function(t,e){}});