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
6.8 KiB
1 lines
6.8 KiB
webpackJsonp([20],{"2gzM":function(e,t){},TRvy:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("mvHQ"),s=r.n(a),n=r("Xxa5"),l=r.n(n),i=r("exGp"),o=r.n(i),u={data:function(){var e=this;return{navTitle:"",subForm:{status:0,AppId:"",AppSecret:"",agreement_title:"",agreement_time:"",agreement:"",agreement_type:1},subFormRules:{status:{required:!0,type:"number",message:"请选择",trigger:"blur"}},bFormRules:{AppId:{required:!0,validator:this.$reg.isNotNull,text:"AppId",reg_type:2,trigger:"blur"},AppSecret:{required:!0,validator:this.$reg.isNotNull,text:"AppSecret",reg_type:2,trigger:"blur"},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,a){var s=e.subForm.agreement_type;1===s&&!r||2===s&&0===r.length?a(new Error("请选择"+t.text)):a()},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 o()(l.a.mark(function t(){var r,a,s,n,i;return l.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,a=r.code,s=r.data,200===a){t.next=7;break}return t.abrupt("return");case 7:for(i in n=e.regArr[2].reg,s.agreement&&s.agreement.length>0&&(s.agreement_type=n.test(s.agreement)?2:1,2===s.agreement_type&&(s.agreement=[{url:s.agreement}])),e.subForm)e.subForm[i]=s[i];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 o()(l.a.mark(function t(){var r,a,n,i,o,u,m,p,g;return l.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(r=JSON.parse(s()(e.subForm)),a=["aForm"],1===r.status&&a.push("bForm"),n=!0,i=0,o=a.length;i<o;i++)e.$refs[a[i]].validate(function(e){if(!e)return n=!1,!1});if(!n){t.next=19;break}if(1===r.status&&2===r.agreement_type&&(r.agreement=r.agreement[0].url),u=e.regArr[r.agreement_type],m=u.reg,p=u.text,1!==r.status||m.test(r.agreement)){t.next=11;break}return e.$message.error("合同模版只支持"+p+"格式!"),t.abrupt("return");case 11:return delete r.agreement_type,t.next=14,e.$api.system.fddConfigUpdate(r);case 14:if(g=t.sent,200===g.code){t.next=18;break}return t.abrupt("return");case 18:e.$message.success(e.$t("tips.successSub"));case 19: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:"aForm",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:"status"}},[r("el-radio-group",{model:{value:e.subForm.status,callback:function(t){e.$set(e.subForm,"status",t)},expression:"subForm.status"}},[r("el-radio",{attrs:{label:1}},[e._v(e._s(e.$t("action.ON")))]),e._v(" "),r("el-radio",{attrs:{label:0}},[e._v(e._s(e.$t("action.OFF")))])],1)],1),e._v(" "),1===e.subForm.status?r("el-form",{ref:"bForm",staticClass:"basic-form",attrs:{model:e.subForm,rules:e.bFormRules,"label-width":"120px"},nativeOn:{submit:function(e){e.preventDefault()}}},[r("el-form-item",{attrs:{label:"AppId",prop:"AppId"}},[r("el-input",{attrs:{placeholder:"请输入AppId"},model:{value:e.subForm.AppId,callback:function(t){e.$set(e.subForm,"AppId",t)},expression:"subForm.AppId"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"AppSecret",prop:"AppSecret"}},[r("el-input",{attrs:{placeholder:"请输入AppSecret"},model:{value:e.subForm.AppSecret,callback:function(t){e.$set(e.subForm,"AppSecret",t)},expression:"subForm.AppSecret"}})],1),e._v(" "),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_type"}},[r("el-radio-group",{on:{change:e.changeAgreementType},model:{value:e.subForm.agreement_type,callback:function(t){e.$set(e.subForm,"agreement_type",t)},expression:"subForm.agreement_type"}},[r("el-radio",{attrs:{label:1}},[e._v("文件")]),e._v(" "),r("el-radio",{attrs:{label:2}},[e._v("图片")])],1)],1),e._v(" "),r("el-form-item",{attrs:{label:"合同模版",prop:"agreement"}},[r("div",{staticClass:"flex-warp"},[1===e.subForm.agreement_type?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,e.subForm.agreement_type))+"\n ")]),e._v(" "),r("lb-cover",{attrs:{type:"button",fileType:"file",fileSize:1,regType:3},on:{selectedFiles:function(t){return e.getFile(t,"agreement")}}})],1):e._e(),e._v(" "),2===e.subForm.agreement_type?r("lb-cover",{attrs:{fileList:e.subForm.agreement,regType:2},on:{selectedFiles:function(t){return e.getCover(t,"agreement")}}}):e._e(),e._v(" "),r("lb-tool-tips",[e._v("\n 请上传带公章的合同模版\n "),r("div",{staticClass:"mt-sm"},[e._v("\n "+e._s(1===e.subForm.agreement_type?"文件支持doc、docx、xls、xlsx、pdf格式":"图片支持jpg、jpeg、png格式")+"\n ")])])],1)])],1):e._e(),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 p=r("VU/8")(u,m,!1,function(e){r("2gzM")},"data-v-fb44a92e",null);t.default=p.exports}}); |