webpackJsonp([25],{hcyk: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.id&&this.$http.get({url:"/seeOrder/getOne",data:{id:this.$route.query.id}}).then(function(t){t.success&&(t.data.orderStatus=String(t.data.orderStatus),e.formData=t.data)})},data:function(){return{saving:!1,formData:{orderStatus:"0",showFlag:"Y"},rules:{userId:[{required:!0,message:"请输入 用户ID",trigger:"blur"}],houseId:[{required:!0,message:"请输入 房源",trigger:"blur"}],orderTime:[{required:!0,message:"请选择预约时间",trigger:"blur"}]},orderStatusList:[{value:"0",label:"待客服确认"},{value:"1",label:"待看房"},{value:"2",label:"已完成"},{value:"3",label:"已取消"}]}},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));t.orderTime=Date.parse(new Date(this.formData.orderTime)),this.formData.seeTime?t.seeTime=Date.parse(new Date(this.formData.seeTime)):delete t.seeTime,this.$http.post({url:this.formData.id?"/seeOrder/update":"/seeOrder/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:"/seeOrder/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,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:"userId",label:"用户ID"}},[a("el-input",{model:{value:e.formData.userId,callback:function(t){e.$set(e.formData,"userId",t)},expression:"formData.userId"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"houseId",label:"房源"}},[a("el-input",{model:{value:e.formData.houseId,callback:function(t){e.$set(e.formData,"houseId",t)},expression:"formData.houseId"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"housekeeper",label:"管家ID"}},[a("el-input",{model:{value:e.formData.housekeeper,callback:function(t){e.$set(e.formData,"housekeeper",t)},expression:"formData.housekeeper"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"contact",label:"联系人"}},[a("el-input",{model:{value:e.formData.contact,callback:function(t){e.$set(e.formData,"contact",t)},expression:"formData.contact"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"telephone",label:"手机号"}},[a("el-input",{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:"leaveMessage",label:"留言"}},[a("el-input",{model:{value:e.formData.leaveMessage,callback:function(t){e.$set(e.formData,"leaveMessage",t)},expression:"formData.leaveMessage"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"orderTime",label:"预约时间"}},[[a("div",{staticClass:"block"},[a("el-date-picker",{attrs:{type:"datetime",placeholder:"选择日期"},model:{value:e.formData.orderTime,callback:function(t){e.$set(e.formData,"orderTime",t)},expression:"formData.orderTime"}})],1)]],2),e._v(" "),a("el-form-item",{attrs:{prop:"timeInterval",label:"预约时段"}},[a("el-input",{model:{value:e.formData.timeInterval,callback:function(t){e.$set(e.formData,"timeInterval",t)},expression:"formData.timeInterval"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"orderStatus",label:"状态"}},[a("el-select",{attrs:{filterable:"",placeholder:"状态",size:"small"},model:{value:e.formData.orderStatus,callback:function(t){e.$set(e.formData,"orderStatus",t)},expression:"formData.orderStatus"}},e._l(e.orderStatusList,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1),e._v(" "),a("el-form-item",{attrs:{prop:"seeTime",label:"看房时间"}},[[a("div",{staticClass:"block"},[a("el-date-picker",{attrs:{type:"datetime",placeholder:"选择日期"},model:{value:e.formData.seeTime,callback:function(t){e.$set(e.formData,"seeTime",t)},expression:"formData.seeTime"}})],1)]],2),e._v(" "),a("el-form-item",{attrs:{prop:"showFlag",label:"用户查看"}},[a("el-input",{model:{value:e.formData.showFlag,callback:function(t){e.$set(e.formData,"showFlag",t)},expression:"formData.showFlag"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{loading:e.$store.state.fetchingData,type:"primary"},on:{click:e.onSave}},[e._v("保存")]),e._v(" "),e.formData.id?a("el-button",{attrs:{type:"danger"},on:{click:e.onDelete}},[e._v("删除")]):e._e(),e._v(" "),a("el-button",{on:{click:function(t){e.$router.go(-1)}}},[e._v("取消")])],1)],1)],1)},staticRenderFns:[]};var i=a("VU/8")(s,l,!1,function(e){a("pZWi")},"data-v-78f21e8a",null);t.default=i.exports},pZWi:function(e,t){}});
//# sourceMappingURL=25.4277ff9a0215d765b596.js.map