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

webpackJsonp([34],{MFKp:function(e,t){},hekI:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("mvHQ"),a=r.n(n),s=r("Xxa5"),i=r.n(s),l=r("exGp"),u=r.n(l),o={data:function(){var e=this;return{navTitle:"",subForm:{agreement_title:"",agreement_time:"",agreement:"",agreement_type:1},subFormRules:{agreement_title:{required:!0,validator:this.$reg.isNotNull,text:"合同名称",reg_type:2,trigger:"blur"},agreement_time:{required:!0,validator:this.$reg.isNum,text:"合同有效期",reg_type:2,trigger:"blur"},agreement_type:{required:!0,type:"number",message:"请选择",trigger:"blur"},agreement:{required:!0,validator:function(t,r,n){var a=e.subForm.agreement_type;1===a&&!r||2===a&&0===r.length?n(new Error("请选择"+t.text)):n()},input_type:"upload",text:"合同模版",reg_type:2,trigger:"blur"}},regArr:{1:{reg:/\.(doc|docx|xls|xlsx|pdf)$/,text:"doc/docx/xls/xlsx/pdf"},2:{reg:/\.(jpg|jpeg|png)$/,text:"jpg/jpeg/png"}}}},created:function(){this.getDetail()},methods:{getDetail:function(){var e=this;return u()(i.a.mark(function t(){var r,n,a,s,l;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$api.system.fddConfigInfo();case 2:if(r=t.sent,n=r.code,a=r.data,200===n){t.next=7;break}return t.abrupt("return");case 7:for(l in s=e.regArr[2].reg,a.agreement&&a.agreement.length>0&&(a.agreement_type=s.test(a.agreement)?2:1,2===a.agreement_type&&(a.agreement=[{url:a.agreement}])),e.subForm)e.subForm[l]=a[l];case 10:case"end":return t.stop()}},t,e)}))()},getFile:function(e,t){var r=e.length-1;this.subForm[t]=e[r].url},getCover:function(e,t){this.subForm[t]=e},changeAgreementType:function(e){this.subForm.agreement=1===e?"":[]},submitFormInfo:function(){var e=this;return u()(i.a.mark(function t(){var r,n,s,l,u,o,m,g,c;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(r=JSON.parse(a()(e.subForm)),s=!0,l=0,u=(n=["subForm"]).length;l<u;l++)e.$refs[n[l]].validate(function(e){if(!e)return s=!1,!1});if(!s){t.next=18;break}if(1===r.status&&2===r.agreement_type&&(r.agreement=r.agreement[0].url),o=e.regArr[r.agreement_type],m=o.reg,g=o.text,1!==r.status||m.test(r.agreement)){t.next=10;break}return e.$message.error("合同模版只支持"+g+"格式!"),t.abrupt("return");case 10:return delete r.agreement_type,t.next=13,e.$api.system.fddConfigUpdate(r);case 13:if(c=t.sent,200===c.code){t.next=17;break}return t.abrupt("return");case 17:e.$message.success(e.$t("tips.successSub"));case 18:case"end":return t.stop()}},t,e)}))()}},filters:{handleFileName:function(e){return 1===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1)&&"string"==typeof e&&e?e.substring(e.lastIndexOf("/")+1):"请上传合同模版"}}},m={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"lb-contract"},[r("top-nav"),e._v(" "),r("div",{staticClass:"page-main"},[r("lb-tips",[e._v("系统目前对接的是法大大第三方电子签约平台,用于和平台入驻"+e._s(e.$t("action.attendantName"))+"签订线上合作协议,如需使用需在法大大平台购买套餐后,电子合同方可生效")]),e._v(" "),r("el-form",{ref:"subForm",staticClass:"basic-form",attrs:{model:e.subForm,rules:e.subFormRules,"label-width":"120px"},nativeOn:{submit:function(e){e.preventDefault()}}},[r("el-form-item",{attrs:{label:"合同名称",prop:"agreement_title"}},[r("el-input",{attrs:{placeholder:"请输入合同名称"},model:{value:e.subForm.agreement_title,callback:function(t){e.$set(e.subForm,"agreement_title",t)},expression:"subForm.agreement_title"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"合同有效期",prop:"agreement_time"}},[r("el-input",{attrs:{placeholder:"请输入合同有效期"},model:{value:e.subForm.agreement_time,callback:function(t){e.$set(e.subForm,"agreement_time",t)},expression:"subForm.agreement_time"}},[r("template",{slot:"append"},[e._v("年")])],2)],1),e._v(" "),r("el-form-item",{attrs:{label:"合同模版",prop:"agreement"}},[r("div",{staticClass:"flex-warp"},[r("div",{staticClass:"lb-file-input flex-between"},[r("div",{class:[{"c-title":e.subForm.agreement}]},[e._v("\n "+e._s(e._f("handleFileName")(e.subForm.agreement))+"\n ")]),e._v(" "),r("lb-cover",{attrs:{type:"button",fileType:"file",fileSize:1},on:{selectedFiles:function(t){return e.getFile(t,"agreement")}}})],1),e._v(" "),r("lb-tool-tips",[e._v("\n 请上传带公章的合同模版,文件支持pdf/doc/png/jpg/jpge格式\n ")])],1)]),e._v(" "),r("el-form-item",[r("lb-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary"},on:{click:e.submitFormInfo}},[e._v(e._s(e.$t("action.submit")))])],1)],1)],1)],1)},staticRenderFns:[]};var g=r("VU/8")(o,m,!1,function(e){r("MFKp")},"data-v-b434eb6c",null);t.default=g.exports}});