webpackJsonp([86],{ftAF:function(e,t,r){"use strict";t.a={phone:{validator:function(e,t,r){t&&(/^1[3-9]\d{9}$/.test(t)?r():r(new Error("请输入正确的手机号")))},trigger:"blur"},number:{validator:function(e,t,r){t&&(/(^[0-9]*$)|(^[0-9]*\.[0-9]*$)/.test(t)?r():r(new Error("请输入正确的数值")))},trigger:"blur"},url:{validator:function(e,t,r){t&&(/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/.test(t)?r():r(new Error("请输入正确的网址")))},trigger:"blur"},email:{validator:function(e,t,r){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)?r():r(new Error("请输入正确的邮箱地址")))},trigger:"blur"},idCard:{validator:function(e,t,r){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)?r():r(new Error("请输入正确的身份证")))},trigger:"blur"},english:{validator:function(e,t,r){t&&(/[A-Za-z]/.test(t)?r():r(new Error("请输入正确的英文字符")))},trigger:"blur"}}},mvHQ:function(e,t,r){e.exports={default:r("qkKv"),__esModule:!0}},qkKv:function(e,t,r){var a=r("FeBl"),o=a.JSON||(a.JSON={stringify:JSON.stringify});e.exports=function(e){return o.stringify.apply(o,arguments)}},rwJ7:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("mvHQ"),o=r.n(a),s=(r("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:"/orderAddress/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:{},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?"/orderAddress/update":"/orderAddress/save",data:t}).then(function(t){t.success?(e.$message.success("成功"),e.$router.go(-1)):e.$message.warning("失败")})},onDelete:function(){var e=this;this.$alert("删除将无法恢复，确认要删除么？","警告",{type:"error"}).then(function(){return e.$http.post({url:"/orderAddress/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("删除失败")})}}}),l={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-form",{ref:"form",staticStyle:{"max-width":"500px"},attrs:{model:e.formData,rules:e.rules,"label-width":"80px","label-position":"right",size:"small"}},[r("el-form-item",{attrs:{prop:"orderId",label:"订单ID"}},[r("el-input",{attrs:{disabled:"orderId"==e.subColumn},model:{value:e.formData.orderId,callback:function(t){e.$set(e.formData,"orderId",t)},expression:"formData.orderId"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"userId",label:"用户ID"}},[r("el-input",{attrs:{disabled:"userId"==e.subColumn},model:{value:e.formData.userId,callback:function(t){e.$set(e.formData,"userId",t)},expression:"formData.userId"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"realName",label:"收件人"}},[r("el-input",{attrs:{disabled:"realName"==e.subColumn},model:{value:e.formData.realName,callback:function(t){e.$set(e.formData,"realName",t)},expression:"formData.realName"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"telephone",label:"电话"}},[r("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(" "),r("el-form-item",{attrs:{prop:"postcode",label:"邮编"}},[r("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(" "),r("el-form-item",{attrs:{prop:"address",label:"地址"}},[r("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(" "),r("el-form-item",{attrs:{prop:"addressDetail",label:"详细地址"}},[r("el-input",{attrs:{disabled:"addressDetail"==e.subColumn},model:{value:e.formData.addressDetail,callback:function(t){e.$set(e.formData,"addressDetail",t)},expression:"formData.addressDetail"}})],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{loading:e.$store.state.fetchingData,type:"primary"},on:{click:e.onSave}},[e._v("保存")]),e._v(" "),e.formData.id?r("el-button",{attrs:{type:"danger"},on:{click:e.onDelete}},[e._v("删除")]):e._e(),e._v(" "),r("el-button",{on:{click:function(t){e.$router.go(-1)}}},[e._v("取消")])],1)],1)],1)},staticRenderFns:[]};var n=r("VU/8")(s,l,!1,function(e){r("sQSF")},"data-v-220e72b8",null);t.default=n.exports},sQSF:function(e,t){}});