|
- webpackJsonp([1],{"+BTi":function(e,t){},"+Rdb":function(e,t){},"/I4U":function(e,t){},"2BWB":function(e,t){},"2rGO":function(e,t){},"5M0c":function(e,t){},"5ObC":function(e,t){},"8mNY":function(e,t){},BNJR:function(e,t){},Dte2:function(e,t){},GXEp:function(e,t){},I4nB:function(e,t){},IExV:function(e,t){},Iun5:function(e,t){},NHnr:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});a("cwe7"),a("+BTi");var l=a("2X9z"),o=a.n(l),r=(a("/I4U"),a("yg6k")),n=a.n(r),i=(a("oq7i"),a("+TD8")),s=a.n(i),c=(a("2rGO"),a("nu7/")),u=a.n(c),d=(a("XPMo"),a("uEG6")),p=a.n(d),m=(a("8mNY"),a("YnkO")),b=a.n(m),_=(a("Q6SQ"),a("LQMI")),f=a.n(_),h=(a("jZDA"),a("91Nw")),v=a.n(h),O=(a("d7TW"),a("ajQY")),y=a.n(O),j=(a("Iun5"),a("ttjG")),w=a.n(j),g=(a("+Rdb"),a("Mezo")),x=a.n(g),k=(a("qunJ"),a("vqwl")),$=a.n(k),S=(a("5ObC"),a("4ZDJ")),T=a.n(S),L=(a("2BWB"),a("bFD8")),N=a.n(L),M=(a("isgN"),a("tLa+")),P=a.n(M),C=(a("Dte2"),a("q4le")),D=a.n(C),z=(a("isE6"),a("LR6y")),E=a.n(z),H=(a("GXEp"),a("mtrD")),I=a.n(H),A=(a("5M0c"),a("YJmC")),B=a.n(A),q=(a("I4nB"),a("STLj")),R=a.n(q),Y=(a("cDSy"),a("e0Bm")),F=a.n(Y),J=(a("bRYy"),a("eBGF")),X=a.n(J),G=(a("BNJR"),a("fDPO")),W=a.n(G),Q=(a("Zki6"),a("0kY3")),U=a.n(Q),V=(a("X+ky"),a("HJMx")),Z=a.n(V),K=a("7+uW"),ee=a("woOf"),te=a.n(ee),ae=a("Gu7T"),le=a.n(ae),oe=a("mvHQ"),re=a.n(oe),ne=a("BO1k"),ie=a.n(ne),se=a("mtWM"),ce=a.n(se),ue={name:"hotel",props:{supplier_idList:Array,userOpt:Array,type:String,saleCount:Number,dataObj:Object,hotelListOpt:Array},data:function(){return{dataObjTemp:this.$lo.cloneDeep(this.dataObj),opened:"1",roomListOpt:[],date:[],roomPlan:[],day:[]}},computed:{disable:function(){return"view"==this.dataObjTemp.editType}},watch:{dataObj:function(e){console.log("change"),this.dataObjTemp=this.$lo.cloneDeep(this.dataObj)},date:function(e){console.log(e),this.$set(this.dataObj,"check_in_date",e[0]),this.$set(this.dataObj,"check_out_date",e[1]);var t=new Date(e[0]),a=new Date(e[1]),l=this.getAllDateCN(t,a),o=[],r=!0,n=!1,i=void 0;try{for(var s,c=ie()(l);!(r=(s=c.next()).done);r=!0){var u=s.value;o.push({run_date:u,price:"",cost:"",count:"",customer_comments:"",supplier_id:""})}}catch(e){n=!0,i=e}finally{try{!r&&c.return&&c.return()}finally{if(n)throw i}}this.dataObj.purchasePriceList=o,this.$set(this.dataObj,"purchasePriceList",o)}},methods:{changeNum:function(e){var t=this;"add"==this.type&&this.dataObj.purchasePriceList.forEach(function(a){t.$set(a,"count",e)})},changesupplier_id:function(e){var t=this;"add"==this.type&&(this.dataObj.purchasePriceList.forEach(function(a){t.$set(a,"supplier_id",e)}),this.dataObj.supplier_id=e)},changeNote:function(e){var t=this;"add"==this.type&&(this.dataObj.purchasePriceList.forEach(function(a){t.$set(a,"customer_comments",e)}),this.dataObj.customer_comments=e)},arraySpanMethod:function(e){e.row,e.column,e.rowIndex;var t=e.columnIndex;return 3===t?[this.dataObj.purchasePriceList.length,1]:4===t?[this.dataObj.purchasePriceList.length,1]:5===t?[this.dataObj.purchasePriceList.length,1]:[1,1]},getAllDateCN:function(e,t){for(var a=[],l=0;t.getTime()-e.getTime()>0;){var o=e.getFullYear(),r=e.getMonth()+1,n=e.getDate();a[l]=o+"-"+r+"-"+n,e.setDate(e.getDate()+1),l+=1}return a},getSummaries:function(e){var t=this,a=e.columns,l=e.data,o=[];return a.forEach(function(e,r){if(0!==r)if(3!==r){if(5!==r)if(4!==r){var n=l.map(function(t){return Number(t[e.property])*Number(t[a[3].property])});n.every(function(e){return isNaN(e)})?o[r]="N/A":(o[r]=n.reduce(function(e,t){var a=Number(t);return isNaN(a)?e:e+t},0),1==r&&(t.dataObj.total_price=o[r],t.$set(t.dataObj,"total_price",o[r])),2==r&&(t.dataObj.total_cost=o[r],t.$set(t.dataObj,"total_cost",o[r])),4==r&&(t.dataObj.profit=o[r],t.$set(t.dataObj,"profit",o[r])),o[r]+=" 元")}else{var i=l.map(function(e){return(Number(e[a[1].property])*t.saleCount-Number(e[a[2].property]))*Number(e[a[3].property])});i.every(function(e){return isNaN(e)})?o[r]="N/A":(o[r]=i.reduce(function(e,t){var a=Number(t);return isNaN(a)?e:e+t},0),o[r]+=" 元")}}else o[r]="利润";else o[r]="总价"}),o},selectChange:function(e){var t=this;console.log(e),this.roomListOpt=[],ce.a.get("/hotel.php/cf_room_info/getRoomList?hotelId="+e).then(function(e){console.log(e),t.roomListOpt=e.data.list,t.dataObj.room_id="",t.$set(t.dataObj,"room_id","")}).catch(function(e){console.log(e)})},roomselectChange:function(e){var t=this,a=this.roomListOpt.find(function(t){return t.id==e});console.log(a),this.dataObjTemp.room_memo=a.room_memo,this.roomPlan=[],ce.a.get("/hotel.php/cf_room_plan/getList?room_id="+e).then(function(e){console.log(e),t.roomPlan=e.data.list,t.dataObj.plan_id="",t.$set(t.dataObj,"plan_id","")}).catch(function(e){console.log(e)})},priceselectChange:function(e){console.log(this.roomPlan);var t=this.$lo.cloneDeep(this.roomPlan.find(function(t){return t.id==e}));this.dataObjTemp.plan_memo=t.plan_memo,this.dataObj.purchase_user_id=t.purchase_user_id,this.$set(this.dataObj,"purchase_user_id",t.purchase_user_id)},edit:function(){this.dataObjTemp.editType="edit"},save:function(){var e=this;ce.a.post("/hotel.php/order_main/subOrderSave",this.dataObj).then(function(t){console.log(t.data),t.data.flag&&(e.dataObjTemp.editType="view"),e.$alert(t.data.msg,"提示",{confirmButtonText:"确定"})}).catch(function(e){console.log(e)})},cancel:function(){this.dataObjTemp.editType="view",this.$set(this.dataObj,"editType","view"),this.$set(this,"dataObj",this.dataObj)}},mounted:function(){0}},de={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",["view"==e.type?a("el-collapse",{model:{value:e.opened,callback:function(t){e.opened=t},expression:"opened"}},[a("el-collapse-item",{attrs:{name:"1"}},[a("template",{slot:"title"},[a("el-row",{staticStyle:{width:"100%","margin-top":"10px","margin-bottom":"10px","padding-right":"20px"},attrs:{type:"flex",justify:"space-between",align:"middle"}},[a("el-col",{attrs:{span:2}},[e._v("\n "+e._s("酒店")+"\n ")]),e._v(" "),a("div",[a("el-button",{directives:[{name:"show",rawName:"v-show",value:"view"==e.dataObjTemp.editType,expression:"dataObjTemp.editType=='view'"}],on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.edit.apply(null,arguments)}}},[e._v("修改")]),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"edit"==e.dataObjTemp.editType,expression:"dataObjTemp.editType=='edit'"}],on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.save.apply(null,arguments)}}},[e._v("保存")]),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"edit"==e.dataObjTemp.editType,expression:"dataObjTemp.editType=='edit'"}],on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.cancel.apply(null,arguments)}}},[e._v("取消")])],1)],1)],1),e._v(" "),a("el-form",{ref:"form",attrs:{model:e.dataObj,"label-width":"100px",disabled:e.disable}},[a("el-row",{staticStyle:{"margin-top":"25px"}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"酒店名称"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"请选择"},on:{change:e.selectChange},model:{value:e.dataObj.hotel_id,callback:function(t){e.$set(e.dataObj,"hotel_id",t)},expression:"dataObj.hotel_id"}},e._l(e.hotelListOpt,function(e){return a("el-option",{key:"hotel_id"+e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"房型名称"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"请选择"},on:{change:e.roomselectChange},model:{value:e.dataObj.room_id,callback:function(t){e.$set(e.dataObj,"room_id",t)},expression:"dataObj.room_id"}},e._l(e.roomListOpt,function(e){return a("el-option",{key:"room_id"+e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"价格方案"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"请选择"},on:{change:e.priceselectChange},model:{value:e.dataObj.plan_id,callback:function(t){e.$set(e.dataObj,"plan_id",t)},expression:"dataObj.plan_id"}},e._l(e.roomPlan,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"入离日期"}},[a("el-date-picker",{attrs:{type:"daterange","value-format":"yyyy-MM-dd HH:mm:ss","range-separator":"-","start-placeholder":"入住日期","end-placeholder":"离店日期"},model:{value:e.date,callback:function(t){e.date=t},expression:"date"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{"label-width":"100px",label:"出游人姓名"}},[a("el-input",{model:{value:e.dataObj.customer_name,callback:function(t){e.$set(e.dataObj,"customer_name",t)},expression:"dataObj.customer_name"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"确认号"}},[a("el-input",{model:{value:e.dataObj.confirm_no,callback:function(t){e.$set(e.dataObj,"confirm_no",t)},expression:"dataObj.confirm_no"}})],1)],1)],1),e._v(" "),a("el-form-item",[a("el-table",{staticStyle:{width:"100%","min-width":"890px","margin-top":"20px"},attrs:{data:e.dataObj.purchasePriceList,border:"",height:"500","span-method":e.arraySpanMethod,"summary-method":e.getSummaries,"show-summary":""}},[a("el-table-column",{attrs:{prop:"run_date",label:"日期",width:"180"}}),e._v(" "),a("el-table-column",{attrs:{prop:"price",label:"售卖价"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{attrs:{size:"small"},model:{value:t.row.price,callback:function(a){e.$set(t.row,"price",a)},expression:"scope.row.price"}})]}}],null,!1,3889844378)}),e._v(" "),a("el-table-column",{attrs:{prop:"cost",label:"成本价"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{attrs:{size:"small"},model:{value:t.row.cost,callback:function(a){e.$set(t.row,"cost",a)},expression:"scope.row.cost"}})]}}],null,!1,4017309820)}),e._v(" "),a("el-table-column",{attrs:{prop:"count",label:"数量"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{attrs:{size:"small"},model:{value:t.row.count,callback:function(a){e.$set(t.row,"count",a)},expression:"scope.row.count"}})]}}],null,!1,4205415252)}),e._v(" "),a("el-table-column",{attrs:{prop:"supplier_id",label:"供应商"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"请选择"},on:{change:e.changesupplier_id},model:{value:t.row.supplier_id,callback:function(a){e.$set(t.row,"supplier_id",a)},expression:"scope.row.supplier_id"}},e._l(e.supplier_idList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)]}}],null,!1,3608846825)}),e._v(" "),a("el-table-column",{attrs:{prop:"customer_comments",label:"备注"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{attrs:{type:"textarea"},on:{change:e.changeNote},model:{value:t.row.customer_comments,callback:function(a){e.$set(t.row,"customer_comments",a)},expression:"scope.row.customer_comments"}})]}}],null,!1,112926545)})],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{"label-width":"100px",label:"对方订单号"}},[a("el-input",{model:{value:e.dataObj.trade_order_number,callback:function(t){e.$set(e.dataObj,"trade_order_number",t)},expression:"dataObj.trade_order_number"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"资源状态"}},[a("el-radio-group",{staticStyle:{"min-width":"270px"},attrs:{size:"small"},model:{value:e.dataObj.confirm_status,callback:function(t){e.$set(e.dataObj,"confirm_status",t)},expression:"dataObj.confirm_status"}},[a("el-radio-button",{attrs:{label:1,name:"未发单"}},[e._v("未发单")]),e._v(" "),a("el-radio-button",{attrs:{label:2,name:"已发单"}},[e._v("已发单")]),e._v(" "),a("el-radio-button",{attrs:{label:3,name:"已确认"}},[e._v("已确认")]),e._v(" "),a("el-radio-button",{attrs:{label:4,name:"已取消"}},[e._v("已取消")])],1)],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{"label-width":"100px",label:"床型说明"}},[a("el-input",{attrs:{readonly:""},model:{value:e.dataObjTemp.room_memo,callback:function(t){e.$set(e.dataObjTemp,"room_memo",t)},expression:"dataObjTemp.room_memo"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{"label-width":"100px",label:"资源负责人"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{disabled:"",placeholder:"请选择"},model:{value:e.dataObj.purchase_user_id,callback:function(t){e.$set(e.dataObj,"purchase_user_id",t)},expression:"dataObj.purchase_user_id"}},e._l(e.userOpt,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{"label-width":"100px",label:"价格方案说明"}},[a("el-input",{attrs:{readonly:"",type:"textarea"},model:{value:e.dataObjTemp.plan_memo,callback:function(t){e.$set(e.dataObjTemp,"plan_memo",t)},expression:"dataObjTemp.plan_memo"}})],1)],1)],1)],1)],2)],1):[a("el-form",{ref:"form",attrs:{model:e.dataObj,"label-width":"100px",disabled:e.disable}},[a("el-row",{staticStyle:{"margin-top":"25px"}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"酒店名称"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"请选择"},on:{change:e.selectChange},model:{value:e.dataObj.hotel_id,callback:function(t){e.$set(e.dataObj,"hotel_id",t)},expression:"dataObj.hotel_id"}},e._l(e.hotelListOpt,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"房型名称"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"请选择"},on:{change:e.roomselectChange},model:{value:e.dataObj.room_id,callback:function(t){e.$set(e.dataObj,"room_id",t)},expression:"dataObj.room_id"}},e._l(e.roomListOpt,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"价格方案"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"请选择"},on:{change:e.priceselectChange},model:{value:e.dataObj.plan_id,callback:function(t){e.$set(e.dataObj,"plan_id",t)},expression:"dataObj.plan_id"}},e._l(e.roomPlan,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"入离日期"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"daterange","value-format":"yyyy-MM-dd HH:mm:ss","range-separator":"-","start-placeholder":"入住日期","end-placeholder":"离店日期"},model:{value:e.date,callback:function(t){e.date=t},expression:"date"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{"label-width":"100px",label:"出游人姓名"}},[a("el-input",{model:{value:e.dataObj.customer_name,callback:function(t){e.$set(e.dataObj,"customer_name",t)},expression:"dataObj.customer_name"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"确认号"}},[a("el-input",{model:{value:e.dataObj.confirm_no,callback:function(t){e.$set(e.dataObj,"confirm_no",t)},expression:"dataObj.confirm_no"}})],1)],1)],1),e._v(" "),a("el-form-item",[a("el-table",{staticStyle:{width:"100%","min-width":"890px","margin-top":"20px"},attrs:{data:e.dataObj.purchasePriceList,border:"",height:"500","summary-method":e.getSummaries,"span-method":e.arraySpanMethod,"show-summary":""}},[a("el-table-column",{attrs:{prop:"run_date",label:"日期",width:"180"}}),e._v(" "),a("el-table-column",{attrs:{prop:"price",label:"售卖价"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{attrs:{size:"small"},model:{value:t.row.price,callback:function(a){e.$set(t.row,"price",a)},expression:"scope.row.price"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"cost",label:"成本价"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{attrs:{size:"small"},model:{value:t.row.cost,callback:function(a){e.$set(t.row,"cost",a)},expression:"scope.row.cost"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"count",label:"数量"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{attrs:{size:"small"},on:{change:e.changeNum},model:{value:t.row.count,callback:function(a){e.$set(t.row,"count",a)},expression:"scope.row.count"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"supplier_id",label:"供应商"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"请选择"},on:{change:e.changesupplier_id},model:{value:t.row.supplier_id,callback:function(a){e.$set(t.row,"supplier_id",a)},expression:"scope.row.supplier_id"}},e._l(e.supplier_idList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"customer_comments",label:"备注"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{attrs:{type:"textarea"},on:{change:e.changeNote},model:{value:t.row.customer_comments,callback:function(a){e.$set(t.row,"customer_comments",a)},expression:"scope.row.customer_comments"}})]}}])})],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{"label-width":"100px",label:"对方订单号"}},[a("el-input",{model:{value:e.dataObj.trade_order_number,callback:function(t){e.$set(e.dataObj,"trade_order_number",t)},expression:"dataObj.trade_order_number"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"资源状态"}},[a("el-radio-group",{staticStyle:{"min-width":"270px"},attrs:{size:"small"},model:{value:e.dataObj.confirm_status,callback:function(t){e.$set(e.dataObj,"confirm_status",t)},expression:"dataObj.confirm_status"}},[a("el-radio-button",{attrs:{label:1,name:"未发单"}},[e._v("未发单")]),e._v(" "),a("el-radio-button",{attrs:{label:2,name:"已发单"}},[e._v("已发单")]),e._v(" "),a("el-radio-button",{attrs:{label:3,name:"已确认"}},[e._v("已确认")]),e._v(" "),a("el-radio-button",{attrs:{label:4,name:"已取消"}},[e._v("已取消")])],1)],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{"label-width":"100px",label:"床型说明"}},[a("el-input",{attrs:{readonly:""},model:{value:e.dataObjTemp.room_memo,callback:function(t){e.$set(e.dataObjTemp,"room_memo",t)},expression:"dataObjTemp.room_memo"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{"label-width":"100px",label:"资源负责人"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{disabled:"",placeholder:"请选择"},model:{value:e.dataObj.purchase_user_id,callback:function(t){e.$set(e.dataObj,"purchase_user_id",t)},expression:"dataObj.purchase_user_id"}},e._l(e.userOpt,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{"label-width":"100px",label:"价格方案说明"}},[a("el-input",{attrs:{readonly:"",type:"textarea"},model:{value:e.dataObjTemp.plan_memo,callback:function(t){e.$set(e.dataObjTemp,"plan_memo",t)},expression:"dataObjTemp.plan_memo"}})],1)],1)],1)],1)]],2)},staticRenderFns:[]};var pe=a("VU/8")(ue,de,!1,function(e){a("IExV")},"data-v-423abb12",null).exports,me={name:"hotelother",props:{supplier_idList:Array,cf_itemOpt:Array,userOpt:Array,type:String,saleCount:Number,dataObj:Object},data:function(){return{dataObjTemp:this.$lo.cloneDeep(this.dataObj),opened:"1",check_in_date:"",day:[]}},computed:{disable:function(){return"view"==this.dataObjTemp.editType}},watch:{dataObj:function(e){console.log("change"),this.dataObjTemp=this.$lo.cloneDeep(this.dataObj)},check_in_date:function(e){var t=this.getAllDateCN(e);console.log(t),this.$set(this.dataObj,"check_in_date",t);var a=[];a.push({run_date:t,price:"",cost:"",count:"",customer_comments:"",supplier_id:""}),this.dataObj.purchasePriceList=a,this.$set(this.dataObj,"purchasePriceList",a)}},methods:{changeItem:function(e){var t=this.cf_itemOpt.find(function(t){return t.id==e});console.log(t),t.item_name=t.name,this.dataObjTemp=te()(this.dataObjTemp,t)},changeNum:function(e){var t=this;"add"==this.type&&this.dataObj.purchasePriceList.forEach(function(a){t.$set(a,"count",e)})},changesupplier_id:function(e){var t=this;"add"==this.type&&(this.dataObj.purchasePriceList.forEach(function(a){t.$set(a,"supplier_id",e)}),this.dataObj.supplier_id=e)},changeNote:function(e){var t=this;"add"==this.type&&(this.dataObj.purchasePriceList.forEach(function(a){t.$set(a,"customer_comments",e)}),this.dataObj.customer_comments=e)},arraySpanMethod:function(e){e.row,e.column,e.rowIndex;var t=e.columnIndex;return 3===t?[this.dataObj.purchasePriceList.length,1]:4===t?[this.dataObj.purchasePriceList.length,1]:5===t?[this.dataObj.purchasePriceList.length,1]:[1,1]},getAllDateCN:function(e){return e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate()},getSummaries:function(e){var t=this,a=e.columns,l=e.data,o=[];return a.forEach(function(e,r){if(0!==r)if(3!==r){if(5!==r)if(4!==r){var n=l.map(function(t){return Number(t[e.property])*Number(t[a[3].property])});n.every(function(e){return isNaN(e)})?o[r]="N/A":(o[r]=n.reduce(function(e,t){var a=Number(t);return isNaN(a)?e:e+t},0),1==r&&(t.dataObj.total_price=o[r],t.$set(t.dataObj,"total_price",o[r])),2==r&&(t.dataObj.total_cost=o[r],t.$set(t.dataObj,"total_cost",o[r])),4==r&&(t.dataObj.profit=o[r],t.$set(t.dataObj,"profit",o[r])),o[r]+=" 元")}else{var i=l.map(function(e){return(Number(e[a[1].property])*t.saleCount-Number(e[a[2].property]))*Number(e[a[3].property])});i.every(function(e){return isNaN(e)})?o[r]="N/A":(o[r]=i.reduce(function(e,t){var a=Number(t);return isNaN(a)?e:e+t},0),o[r]+=" 元")}}else o[r]="利润";else o[r]="总价"}),o},edit:function(){this.dataObjTemp.editType="edit"},save:function(){var e=this;ce.a.post("/hotel.php/order_main/subOrderSave",this.dataObj).then(function(t){console.log(t),t.data.flag&&(e.dataObjTemp.editType="view"),e.$alert(t.data.msg,"提示",{confirmButtonText:"确定"})}).catch(function(e){console.log(e)})},cancel:function(){this.dataObjTemp.editType="view",this.$set(this.dataObj,"editType","view"),this.$set(this,"dataObj",this.dataObj)}},mounted:function(){0}},be={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",["view"==e.type?a("el-collapse",{model:{value:e.opened,callback:function(t){e.opened=t},expression:"opened"}},[a("el-collapse-item",{attrs:{name:"1"}},[a("template",{slot:"title"},[a("el-row",{staticStyle:{width:"100%","margin-top":"10px","margin-bottom":"10px","padding-right":"20px"},attrs:{type:"flex",justify:"space-between",align:"middle"}},[a("el-col",{attrs:{span:2}},[e._v("\n "+e._s("附加项目")+"\n ")]),e._v(" "),a("div",[a("el-button",{directives:[{name:"show",rawName:"v-show",value:"view"==e.dataObjTemp.editType,expression:"dataObjTemp.editType=='view'"}],on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.edit.apply(null,arguments)}}},[e._v("修改")]),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"edit"==e.dataObjTemp.editType,expression:"dataObjTemp.editType=='edit'"}],on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.save.apply(null,arguments)}}},[e._v("保存")]),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"edit"==e.dataObjTemp.editType,expression:"dataObjTemp.editType=='edit'"}],on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.cancel.apply(null,arguments)}}},[e._v("取消")])],1)],1)],1),e._v(" "),a("el-form",{ref:"form",attrs:{model:e.dataObj,"label-width":"100px",disabled:e.disable}},[a("el-row",{staticStyle:{"margin-top":"25px"}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"附加项目名称"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"请选择"},on:{change:e.changeItem},model:{value:e.dataObj.item_id,callback:function(t){e.$set(e.dataObj,"item_id",t)},expression:"dataObj.item_id"}},e._l(e.cf_itemOpt,function(e){return a("el-option",{key:"item_id"+e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"附加项目类型"}},[a("el-input",{attrs:{readonly:""},model:{value:e.dataObjTemp.item_type_name,callback:function(t){e.$set(e.dataObjTemp,"item_type_name",t)},expression:"dataObjTemp.item_type_name"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"计价单位"}},[a("el-input",{attrs:{readonly:""},model:{value:e.dataObjTemp.item_unit,callback:function(t){e.$set(e.dataObjTemp,"item_unit",t)},expression:"dataObjTemp.item_unit"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"使用日期"}},[a("el-col",{attrs:{span:11}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"选择日期"},model:{value:e.check_in_date,callback:function(t){e.check_in_date=t},expression:"check_in_date"}})],1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{"label-width":"100px",label:"出游人姓名"}},[a("el-input",{model:{value:e.dataObj.customer_name,callback:function(t){e.$set(e.dataObj,"customer_name",t)},expression:"dataObj.customer_name"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"确认号"}},[a("el-input",{model:{value:e.dataObj.confirm_no,callback:function(t){e.$set(e.dataObj,"confirm_no",t)},expression:"dataObj.confirm_no"}})],1)],1)],1),e._v(" "),a("el-form-item",[a("el-table",{staticStyle:{width:"100%","min-width":"890px","margin-top":"20px"},attrs:{data:e.dataObj.purchasePriceList,border:"",height:"500","span-method":e.arraySpanMethod,"summary-method":e.getSummaries,"show-summary":""}},[a("el-table-column",{attrs:{prop:"run_date",label:"日期",width:"180"}}),e._v(" "),a("el-table-column",{attrs:{prop:"price",label:"售卖价"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{attrs:{size:"small"},model:{value:t.row.price,callback:function(a){e.$set(t.row,"price",a)},expression:"scope.row.price"}})]}}],null,!1,3889844378)}),e._v(" "),a("el-table-column",{attrs:{prop:"cost",label:"成本价"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{attrs:{size:"small"},model:{value:t.row.cost,callback:function(a){e.$set(t.row,"cost",a)},expression:"scope.row.cost"}})]}}],null,!1,4017309820)}),e._v(" "),a("el-table-column",{attrs:{prop:"count",label:"数量"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{attrs:{size:"small"},model:{value:t.row.count,callback:function(a){e.$set(t.row,"count",a)},expression:"scope.row.count"}})]}}],null,!1,4205415252)}),e._v(" "),a("el-table-column",{attrs:{prop:"supplier_id",label:"供应商"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"请选择"},on:{change:e.changesupplier_id},model:{value:t.row.supplier_id,callback:function(a){e.$set(t.row,"supplier_id",a)},expression:"scope.row.supplier_id"}},e._l(e.supplier_idList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)]}}],null,!1,3608846825)}),e._v(" "),a("el-table-column",{attrs:{prop:"customer_comments",label:"备注"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{attrs:{type:"textarea"},on:{change:e.changeNote},model:{value:t.row.customer_comments,callback:function(a){e.$set(t.row,"customer_comments",a)},expression:"scope.row.customer_comments"}})]}}],null,!1,112926545)})],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{"label-width":"100px",label:"对方订单号"}},[a("el-input",{model:{value:e.dataObj.trade_order_number,callback:function(t){e.$set(e.dataObj,"trade_order_number",t)},expression:"dataObj.trade_order_number"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{"label-width":"100px",label:"资源负责人"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"请选择"},model:{value:e.dataObj.purchase_user_id,callback:function(t){e.$set(e.dataObj,"purchase_user_id",t)},expression:"dataObj.purchase_user_id"}},e._l(e.userOpt,function(e){return a("el-option",{key:"purchase_user_id"+e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"资源状态"}},[a("el-radio-group",{staticStyle:{"min-width":"270px"},attrs:{size:"small"},model:{value:e.dataObj.confirm_status,callback:function(t){e.$set(e.dataObj,"confirm_status",t)},expression:"dataObj.confirm_status"}},[a("el-radio-button",{attrs:{label:1,name:"未发单"}},[e._v("未发单")]),e._v(" "),a("el-radio-button",{attrs:{label:2,name:"已发单"}},[e._v("已发单")]),e._v(" "),a("el-radio-button",{attrs:{label:3,name:"已确认"}},[e._v("已确认")]),e._v(" "),a("el-radio-button",{attrs:{label:4,name:"已取消"}},[e._v("已取消")])],1)],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{"label-width":"100px",label:"附加项目说明"}},[a("el-input",{attrs:{readonly:"",type:"textarea"},model:{value:e.dataObjTemp.item_memo,callback:function(t){e.$set(e.dataObjTemp,"item_memo",t)},expression:"dataObjTemp.item_memo"}})],1)],1)],1)],1)],2)],1):[a("el-form",{ref:"form",attrs:{model:e.dataObj,"label-width":"100px",disabled:e.disable}},[a("el-row",{staticStyle:{"margin-top":"25px"}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"附加项目名称"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"请选择"},on:{change:e.changeItem},model:{value:e.dataObj.item_id,callback:function(t){e.$set(e.dataObj,"item_id",t)},expression:"dataObj.item_id"}},e._l(e.cf_itemOpt,function(e){return a("el-option",{key:"item_id"+e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"附加项目类型"}},[a("el-input",{attrs:{readonly:""},model:{value:e.dataObjTemp.item_type_name,callback:function(t){e.$set(e.dataObjTemp,"item_type_name",t)},expression:"dataObjTemp.item_type_name"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"计价单位"}},[a("el-input",{attrs:{readonly:""},model:{value:e.dataObjTemp.item_unit,callback:function(t){e.$set(e.dataObjTemp,"item_unit",t)},expression:"dataObjTemp.item_unit"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"使用日期"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"选择日期"},model:{value:e.check_in_date,callback:function(t){e.check_in_date=t},expression:"check_in_date"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{"label-width":"100px",label:"出游人姓名"}},[a("el-input",{model:{value:e.dataObj.customer_name,callback:function(t){e.$set(e.dataObj,"customer_name",t)},expression:"dataObj.customer_name"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"确认号"}},[a("el-input",{model:{value:e.dataObj.confirm_no,callback:function(t){e.$set(e.dataObj,"confirm_no",t)},expression:"dataObj.confirm_no"}})],1)],1)],1),e._v(" "),a("el-form-item",[a("el-table",{staticStyle:{width:"100%","min-width":"890px","margin-top":"20px"},attrs:{data:e.dataObj.purchasePriceList,border:"",height:"500","summary-method":e.getSummaries,"span-method":e.arraySpanMethod,"show-summary":""}},[a("el-table-column",{attrs:{prop:"run_date",label:"日期",width:"180"}}),e._v(" "),a("el-table-column",{attrs:{prop:"price",label:"售卖价"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{attrs:{size:"small"},model:{value:t.row.price,callback:function(a){e.$set(t.row,"price",a)},expression:"scope.row.price"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"cost",label:"成本价"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{attrs:{size:"small"},model:{value:t.row.cost,callback:function(a){e.$set(t.row,"cost",a)},expression:"scope.row.cost"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"count",label:"数量"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{attrs:{size:"small"},on:{change:e.changeNum},model:{value:t.row.count,callback:function(a){e.$set(t.row,"count",a)},expression:"scope.row.count"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"supplier_id",label:"供应商"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"请选择"},on:{change:e.changesupplier_id},model:{value:t.row.supplier_id,callback:function(a){e.$set(t.row,"supplier_id",a)},expression:"scope.row.supplier_id"}},e._l(e.supplier_idList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"customer_comments",label:"备注"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{attrs:{type:"textarea"},on:{change:e.changeNote},model:{value:t.row.customer_comments,callback:function(a){e.$set(t.row,"customer_comments",a)},expression:"scope.row.customer_comments"}})]}}])})],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{"label-width":"100px",label:"对方订单号"}},[a("el-input",{model:{value:e.dataObj.trade_order_number,callback:function(t){e.$set(e.dataObj,"trade_order_number",t)},expression:"dataObj.trade_order_number"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{"label-width":"100px",label:"资源负责人"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"请选择"},model:{value:e.dataObj.purchase_user_id,callback:function(t){e.$set(e.dataObj,"purchase_user_id",t)},expression:"dataObj.purchase_user_id"}},e._l(e.userOpt,function(e){return a("el-option",{key:"purchase_user_id"+e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"资源状态"}},[a("el-radio-group",{staticStyle:{"min-width":"270px"},attrs:{size:"small"},model:{value:e.dataObj.confirm_status,callback:function(t){e.$set(e.dataObj,"confirm_status",t)},expression:"dataObj.confirm_status"}},[a("el-radio-button",{attrs:{label:1,name:"未发单"}},[e._v("未发单")]),e._v(" "),a("el-radio-button",{attrs:{label:2,name:"已发单"}},[e._v("已发单")]),e._v(" "),a("el-radio-button",{attrs:{label:3,name:"已确认"}},[e._v("已确认")]),e._v(" "),a("el-radio-button",{attrs:{label:4,name:"已取消"}},[e._v("已取消")])],1)],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{"label-width":"100px",label:"附加项目说明"}},[a("el-input",{attrs:{readonly:"",type:"textarea"},model:{value:e.dataObjTemp.item_memo,callback:function(t){e.$set(e.dataObjTemp,"item_memo",t)},expression:"dataObjTemp.item_memo"}})],1)],1)],1)],1)]],2)},staticRenderFns:[]};var _e={components:{hotel:pe,hotelother:a("VU/8")(me,be,!1,function(e){a("xzLt")},"data-v-3958e6c6",null).exports},data:function(){return{active:"1",type:window.id?"view":"add",saleCount:1,editSingle:!1,orderMain:{commissioner_id:"",channel_id:"",channel_order_no:"",user_name:"",user_phone:"",order_memo:""},rules:{commissioner_id:[{required:!0,message:"请输入",trigger:"blur"}],channel_id:[{required:!0,message:"请输入",trigger:"blur"}],channel_order_no:[{required:!0,message:"请输入",trigger:"blur"}],user_name:[{required:!0,message:"请输入",trigger:"blur"}],user_phone:[{required:!0,message:"请输入",trigger:"blur"}],order_memo:[{required:!0,message:"请输入",trigger:"blur"}]},orderMainCopy:{},hotelListObj:{prod_type:"hotel",hotel_id:"",room_id:"",plan_id:"",check_in_date:"",check_out_date:"",customer_name:"",confirm_no:"",trade_order_number:"",confirm_status:"1",room_memo:"",purchase_user_id:"",plan_memo:"",total_price:"",total_cost:"",profit:"",editType:"add",purchasePriceList:[{run_date:"请选择日期",price:"",cost:"",count:"",customer_comments:"",supplier_id:0}]},hotelList:[],hotelotherListObj:{prod_type:"item",item_id:"",item_name:"",item_unit:"",check_in_date:"",customer_name:"",confirm_no:"",trade_order_number:"",purchase_user_id:"",confirm_status:"1",item_memo:"",total_price:"",total_cost:"",profit:"",editType:"add",purchasePriceList:[{run_date:"请选择日期",price:"",cost:"",count:"",customer_comments:"",supplier_id:0}]},hotelotherList:[],hotelListOpt:[],channelListOpt:[],userOpt:[],cf_itemOpt:[],supplier_idList:[]}},computed:{disable:function(){return!("add"==this.type||this.editSingle)}},methods:{selectChange:function(e){this.saleCount=this.channelListOpt.filter(function(t){return t.id==e}),this.saleCount=Number(this.saleCount.commission_rate)||1,console.log(this.saleCount)},addHotel:function(){this.hotelList.push(JSON.parse(re()(this.hotelListObj)))},addHotelOther:function(){this.hotelotherList.push(JSON.parse(re()(this.hotelotherListObj)))},delSinHotel:function(e){this.hotelList.splice(e,1)},delSinHotelOther:function(e){this.hotelotherList.splice(e,1)},onSubmit:function(){var e=this;console.log("submit!"),this.$refs.form.validate(function(t){if(!t)return console.log("error submit!!"),!1;var a,l=[].concat(le()(e.hotelList),le()(e.hotelotherList));a=te()({},e.orderMain,{subOrderList:l}),ce.a.post("/hotel.php/order_main/save",a).then(function(t){e.$alert("新增成功","提示",{confirmButtonText:"确定",callback:function(e){Fast.api.close()}})}).catch(function(e){console.log(e)})})},save:function(){var e=this;this.editSingle=!1;var t=this.orderMain;ce.a.post("/hotel.php/order_main/save",t).then(function(t){t.data.flag,e.$alert(t.data.msg,"提示",{confirmButtonText:"确定"})}).catch(function(e){console.log(e)})},cancel:function(){this.editSingle=!1,this.orderMain=this.orderMainCopy}},mounted:function(){var e=this;ce.a.get("/hotel.php/cf_item/getList").then(function(t){e.cf_itemOpt=t.data.list}).catch(function(e){console.log(e)}),ce.a.get("/hotel.php/auth/admin/getList").then(function(t){e.userOpt=t.data.list}).catch(function(e){console.log(e)}),ce.a.get("/hotel.php/cf_hotel_info/getHotelList").then(function(t){e.hotelListOpt=t.data.list}).catch(function(e){console.log(e)}),ce.a.get("/hotel.php/cf_suplier_info/getList").then(function(t){e.supplier_idList=t.data.list}).catch(function(e){console.log(e)}),ce.a.get("/hotel.php/cf_channel_info/getList").then(function(t){e.channelListOpt=t.data.list}).catch(function(e){console.log(e)}),console.log(this.type),"add"!=this.type&&ce.a.post("/hotel.php/order_main/getShowInfo",{id:window.id}).then(function(t){if(console.log("detailDatas",t.data),t.data.flag){var a=e.$lo.cloneDeep(t.data.data);delete a.subOrderList,e.orderMain=a,e.orderMainCopy=e.$lo.cloneDeep(a),t.data.data.subOrderList.forEach(function(e){e.purchasePriceList.forEach(function(t){t.supplier_id=e.supplier_id,t.customer_comments=e.customer_comments}),e.editType="view"}),e.hotelList=t.data.data.subOrderList.filter(function(e){return e.hotel_id}),e.hotelotherList=t.data.data.subOrderList.filter(function(e){return e.item_id})}}).catch(function(e){console.log(e)})}},fe={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-collapse",{model:{value:e.active,callback:function(t){e.active=t},expression:"active"}},[a("el-collapse-item",{attrs:{name:"1"}},[a("template",{slot:"title"},[a("el-row",{staticStyle:{width:"100%",padding:"0 30px"},attrs:{type:"flex",justify:"space-between"}},[a("el-button",{attrs:{type:"text"}},[e._v("基本信息")]),e._v(" "),a("div",[a("el-button",{directives:[{name:"show",rawName:"v-show",value:"view"==e.type&&!e.editSingle,expression:"type=='view'&&!editSingle"}],on:{click:function(t){t.stopPropagation(),t.preventDefault(),e.editSingle=!0}}},[e._v("修改")]),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:e.editSingle,expression:"editSingle"}],on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.save.apply(null,arguments)}}},[e._v("保存")]),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:e.editSingle,expression:"editSingle"}],on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.cancel.apply(null,arguments)}}},[e._v("取消")])],1)],1)],1),e._v(" "),a("el-form",{ref:"form",attrs:{model:e.orderMain,rules:e.rules,"label-width":"120px",disabled:e.disable}},[a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"订单专员",prop:"commissioner_id"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"请选择"},model:{value:e.orderMain.commissioner_id,callback:function(t){e.$set(e.orderMain,"commissioner_id",t)},expression:"orderMain.commissioner_id"}},e._l(e.userOpt,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}})],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"订单渠道",prop:"channel_id"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"请选择"},on:{change:e.selectChange},model:{value:e.orderMain.channel_id,callback:function(t){e.$set(e.orderMain,"channel_id",t)},expression:"orderMain.channel_id"}},e._l(e.channelListOpt,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"渠道订单编号",prop:"channel_order_no"}},[a("el-input",{model:{value:e.orderMain.channel_order_no,callback:function(t){e.$set(e.orderMain,"channel_order_no",t)},expression:"orderMain.channel_order_no"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"用户姓名",prop:"user_name"}},[a("el-input",{model:{value:e.orderMain.user_name,callback:function(t){e.$set(e.orderMain,"user_name",t)},expression:"orderMain.user_name"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"用户电话",prop:"user_phone"}},[a("el-input",{model:{value:e.orderMain.user_phone,callback:function(t){e.$set(e.orderMain,"user_phone",t)},expression:"orderMain.user_phone"}})],1)],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"备注"}},[a("el-input",{attrs:{type:"textarea"},model:{value:e.orderMain.order_memo,callback:function(t){e.$set(e.orderMain,"order_memo",t)},expression:"orderMain.order_memo"}})],1)],1)],2)],1),e._v(" "),a("el-form",[a("el-form-item",[a("el-row",{staticStyle:{"margin-top":"20px"},attrs:{type:"flex"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.addHotel}},[e._v("添加酒店")])],1)],1),e._v(" "),e._l(e.hotelList,function(t,l){return[a("el-card",{key:"hotel"+l,staticClass:"card",attrs:{shadow:"hover"}},["add"==e.type?a("el-row",{attrs:{type:"flex",justify:"end"}},[a("i",{staticClass:"el-icon-close",on:{click:function(t){return e.delSinHotel(l)}}})]):e._e(),e._v(" "),a("hotel",{attrs:{userOpt:e.userOpt,supplier_idList:e.supplier_idList,dataObj:t,hotelListOpt:e.hotelListOpt,saleCount:e.saleCount,type:e.type}})],1)]}),e._v(" "),a("el-form-item",[a("el-row",{staticStyle:{"margin-top":"20px"},attrs:{type:"flex"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.addHotelOther}},[e._v("添加附加项目")])],1)],1),e._v(" "),e._l(e.hotelotherList,function(t,l){return[a("el-card",{key:"hotelother"+l,staticClass:"card",attrs:{shadow:"hover"}},["add"==e.type?a("el-row",{attrs:{type:"flex",justify:"end"}},[a("i",{staticClass:"el-icon-close",on:{click:function(t){return e.delSinHotelOther(l)}}})]):e._e(),e._v(" "),a("hotelother",{attrs:{userOpt:e.userOpt,supplier_idList:e.supplier_idList,dataObj:t,cf_itemOpt:e.cf_itemOpt,saleCount:e.saleCount,type:e.type}})],1)]}),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("提交订单")])],1)],2)],1)},staticRenderFns:[]};var he={name:"App",components:{HelloWorld:a("VU/8")(_e,fe,!1,function(e){a("rt+L")},null,null).exports}},ve={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"app"}},[t("HelloWorld")],1)},staticRenderFns:[]};var Oe=a("VU/8")(he,ve,!1,function(e){a("zuYX")},null,null).exports,ye=a("M4fF"),je=a.n(ye);K.default.use(Z.a),K.default.use(U.a),K.default.use(W.a),K.default.use(X.a),K.default.use(F.a),K.default.use(R.a),K.default.use(B.a),K.default.use(I.a),K.default.use(E.a),K.default.use(D.a),K.default.use(P.a),K.default.use(N.a),K.default.use(T.a),K.default.use($.a),K.default.use(x.a),K.default.use(w.a),K.default.use(y.a),K.default.use(v.a),K.default.use(f.a),K.default.use(b.a),K.default.use(p.a),K.default.use(u.a.directive),K.default.prototype.$loading=u.a.service,K.default.prototype.$msgbox=s.a,K.default.prototype.$alert=s.a.alert,K.default.prototype.$confirm=s.a.confirm,K.default.prototype.$prompt=s.a.prompt,K.default.prototype.$notify=n.a,K.default.prototype.$message=o.a,K.default.config.productionTip=!1,K.default.prototype.$lo=je.a,new K.default({el:"#app",render:function(e){return e(Oe)}})},Q6SQ:function(e,t){},"X+ky":function(e,t){},XPMo:function(e,t){},Zki6:function(e,t){},bRYy:function(e,t){},cDSy:function(e,t){},cwe7:function(e,t){},d7TW:function(e,t){},isE6:function(e,t){},isgN:function(e,t){},jZDA:function(e,t){},oq7i:function(e,t){},qunJ:function(e,t){},"rt+L":function(e,t){},xzLt:function(e,t){},zuYX:function(e,t){}},["NHnr"]);
|