webpackJsonp([91],{Sb9z:function(e,t){},ftAF:function(e,t,a){"use strict";t.a={phone:{validator:function(e,t,a){t&&(/^1[3-9]\d{9}$/.test(t)?a():a(new Error("请输入正确的手机号")))},trigger:"blur"},number:{validator:function(e,t,a){t&&(/(^[0-9]*$)|(^[0-9]*\.[0-9]*$)/.test(t)?a():a(new Error("请输入正确的数值")))},trigger:"blur"},url:{validator:function(e,t,a){t&&(/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/.test(t)?a():a(new Error("请输入正确的网址")))},trigger:"blur"},email:{validator:function(e,t,a){t&&(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)?a():a(new Error("请输入正确的邮箱地址")))},trigger:"blur"},idCard:{validator:function(e,t,a){t&&(/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$/.test(t)?a():a(new Error("请输入正确的身份证")))},trigger:"blur"},english:{validator:function(e,t,a){t&&(/[A-Za-z]/.test(t)?a():a(new Error("请输入正确的英文字符")))},trigger:"blur"}}},mvHQ:function(e,t,a){e.exports={default:a("qkKv"),__esModule:!0}},qkKv:function(e,t,a){var r=a("FeBl"),o=r.JSON||(r.JSON={stringify:JSON.stringify});e.exports=function(e){return o.stringify.apply(o,arguments)}},rtQP:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("mvHQ"),o=a.n(r),s=(a("ftAF"),{created:function(){var e=this;this.$route.query.column&&(this.subColumn=this.$route.query.column.split(",")[1],this.subValue=this.$route.query.column.split(",")[0]),this.$route.query.id?this.$http.get({url:"/contactUs/getOne",data:{id:this.$route.query.id}}).then(function(t){t.success&&(e.formData=t.data,e.$route.query.column&&(e.formData[e.subColumn]=e.subValue))}):this.$route.query.column&&(this.formData[this.subColumn]=this.subValue)},data:function(){return{saving:!1,formData:{},rules:{companyName:[{required:!0,message:"请输入 公司名称",trigger:"blur"}],telephone:[{required:!0,message:"请输入 电话",trigger:"blur"}]},subColumn:"",subValue:""}},methods:{onSave:function(){var e=this;this.$refs.form.validate(function(t){if(!t)return!1;e.submit()})},submit:function(){var e=this,t=JSON.parse(o()(this.formData));this.$http.post({url:this.formData.id?"/contactUs/update":"/contactUs/save",data:t}).then(function(t){t.success?e.$message.success("成功"):e.$message.warning("失败")})},onDelete:function(){var e=this;this.$alert("删除将无法恢复，确认要删除么？","警告",{type:"error"}).then(function(){return e.$http.post({url:"/contactUs/del",data:{id:e.formData.id}})}).then(function(){e.$message.success("删除成功"),e.$router.go(-1)}).catch(function(t){"cancel"===t?e.$message.info("删除取消"):e.$message.error("删除失败")})}}}),n={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-form",{ref:"form",staticStyle:{"max-width":"500px"},attrs:{model:e.formData,rules:e.rules,"label-width":"80px","label-position":"right",size:"small"}},[a("el-form-item",{attrs:{prop:"companyName",label:"公司名称"}},[a("el-input",{attrs:{disabled:"companyName"==e.subColumn},model:{value:e.formData.companyName,callback:function(t){e.$set(e.formData,"companyName",t)},expression:"formData.companyName"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"telephone",label:"电话"}},[a("el-input",{attrs:{disabled:"telephone"==e.subColumn},model:{value:e.formData.telephone,callback:function(t){e.$set(e.formData,"telephone",t)},expression:"formData.telephone"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"faxes",label:"传真"}},[a("el-input",{attrs:{disabled:"faxes"==e.subColumn},model:{value:e.formData.faxes,callback:function(t){e.$set(e.formData,"faxes",t)},expression:"formData.faxes"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"postcode",label:"邮编"}},[a("el-input",{attrs:{disabled:"postcode"==e.subColumn},model:{value:e.formData.postcode,callback:function(t){e.$set(e.formData,"postcode",t)},expression:"formData.postcode"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"address",label:"地址"}},[a("el-input",{attrs:{disabled:"address"==e.subColumn},model:{value:e.formData.address,callback:function(t){e.$set(e.formData,"address",t)},expression:"formData.address"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"serviceTime",label:"服务时间"}},[a("el-input",{model:{value:e.formData.serviceTime,callback:function(t){e.$set(e.formData,"serviceTime",t)},expression:"formData.serviceTime"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"servicePhone",label:"服务热线"}},[a("el-input",{model:{value:e.formData.servicePhone,callback:function(t){e.$set(e.formData,"servicePhone",t)},expression:"formData.servicePhone"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{loading:e.$store.state.fetchingData,type:"primary"},on:{click:e.onSave}},[e._v("保存")])],1)],1)],1)},staticRenderFns:[]};var i=a("VU/8")(s,n,!1,function(e){a("Sb9z")},"data-v-0fcb47aa",null);t.default=i.exports}});