webpackJsonp([15],{yp6Q:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("fZjL"),o=a.n(r),n=a("//Fk"),l=a.n(n),i=a("Dd8w"),d=a.n(i),p=a("woOf"),u=a.n(p),s=a("oqQY"),c=a.n(s),f=a("vLgD"),m={search:function(e){return Object(f.a)({data:e,timeout:6e4,url:"/order/orderInfo/listOrders"})},orderInfo:function(e){return Object(f.a)({data:e,url:"/order/orderInfo/orderinfo"})},export:function(e){return Object(f.a)({data:e,download:!0,url:"/order/orderInfo/dowland"})}},b=a("0xDb"),g={name:"orderSearch",components:{SearchTableTemplate:a("NUeu").a},methods:{search:function(e,t){this.tableConfig=u()({},this.tableConfig,{btn:t}),this.searchData=u()({search:!0},{data:d()({},e,{startDate:e.orderDate[0],endDate:e.orderDate[1]})})},orderInfo:function(e){var t=this;return new l.a(function(a,r){m.orderInfo({orderNo:e.orderNo}).then(function(e){t.dialogCollapselist[0].dialogTableData.tableData=[e.data.data.orderInfo],t.dialogCollapselist[1].dialogTableData.tableData=o()(e.data.data.flightSegments).reduce(function(t,a){var r=e.data.data.flightSegments[t].map(function(e){return e.flightType=t,e});if(e.data.data.flightSegments[a].length){var o=e.data.data.flightSegments[a].map(function(e){return e.flightType=a,e});r=r.concat(o)}return r.sort(function(e,t){return c()(c()(e.departureDate).format("YYYY-MM-DD")+" "+e.departureTime).unix()>c()(c()(t.departureDate).format("YYYY-MM-DD")+" "+t.departureTime).unix()})}),t.dialogCollapselist[2].dialogTableData.tableData=e.data.data.flightPassengers,t.dialogCollapselist[3].dialogTableData.tableData=e.data.data.oaAddSer,t.dialogCollapselist[4].dialogTableData.tableData=e.data.data.ticketInfos,t.dialogConfig=u()({},t.dialogConfig,{visible:!0}),a()}).catch(function(){return a()})})},export:function(e,t){var a=this;this.$prompt("请输入导出数量","导出",{inputType:"number",inputValue:50,inputValidator:function(e){return""===e?"导出数量不能为空":e<0?"导出数量不能为负数":!(e>500)||"导出数量不能大于500条"}}).then(function(r){var n=r.value,l=void 0;o()(a.searchData).length?l=u()({},a.searchData,{size:n}):(a.searchData=u()({},e,{startDate:e.orderDate[0],endDate:e.orderDate[1]}),l=u()({},a.searchData,{size:n})),t.disabled=!0;var i=a.$loading({target:a.$refs.searchTable.$el});m.export(l).then(function(){t.disabled=!1,i.close()}).catch(function(){t.disabled=!1,i.close()})})}},data:function(){var e=this;return{formInputList:[{label:"订单起止日期",value:[c()().format("YYYY-MM-DD"),c()().format("YYYY-MM-DD")],module:"date",name:"orderDate",type:"daterange",format:"yyyy-MM-dd",startPlaceholder:"开始",endPlaceholder:"结束",pickerOptions:{disabledDate:function(e){return e.getTime()>Date.now()}}},{label:"订单号",value:"",type:"text",module:"input",name:"orderNo",placeholder:"订单号"},{label:"PNR",value:"",maxlength:6,type:"text",module:"input",name:"pnrCode",placeholder:"PNR",handle:function(e){e[this.name]=e[this.name].toUpperCase()}},{label:"订单状态",value:"",module:"select",name:"status",placeholder:"订单状态",optionList:e.$store.getters.dic.orderSearch.status},{label:"订单源",value:"ctrip",module:"select",name:"orderSource",readonly:!0,hidden:!0,placeholder:"订单源",optionList:e.$store.getters.dic.orderSearch.orderSource}],formButtonlist:[{module:"button",title:"搜索",type:"primary",icon:"el-icon-search",loading:!1,handle:function(){e.search(arguments[0],this)}},{module:"button",title:"导出",disabled:!1,handle:function(){e.export(arguments[0],this)}},{module:"reset",title:"重置",type:"text"}],tableColumn:[{label:"订单号",prop:"orderNo",minWidth:90},{label:"订单状态",prop:"status",minWidth:130,formatter:function(){return 1===arguments[2]?'
'+Object(b.d)(e.$store.getters.dic.orderSearch.status,arguments[2])+"
":Object(b.d)(e.$store.getters.dic.orderSearch.status,arguments[2])}},{label:"航班号",prop:"flightNum",minWidth:70,formatter:function(){var e=arguments[0].segments.go.map(function(e){return"
"+e.flightNum+"
"}).join("");return arguments[0].segments.back.length?e+"
"+arguments[0].segments.back.map(function(e){return"
"+e.flightNum+"
"}).join(""):e}},{label:"起降城市",prop:"Aircode",minWidth:90,formatter:function(){var e=arguments[0].segments.go.map(function(e){return"
"+e.depAircode+"-"+e.arrAircode+"
"}).join("");return arguments[0].segments.back.length?e+"
"+arguments[0].segments.back.map(function(e){return"
"+e.depAircode+"-"+e.arrAircode+"
"}).join(""):e}},{label:"出发日期",prop:"departureDate",minWidth:150,formatter:function(){var e=arguments[0].segments.go.map(function(e){return"
"+c()(e.departureDate).format("YYYY-MM-DD")+" "+e.departureTime+"
"}).join("");return arguments[0].segments.back.length?e+"
"+arguments[0].segments.back.map(function(e){return"
"+c()(e.departureDate).format("YYYY-MM-DD")+" "+e.departureTime+"
"}).join(""):e}},{label:"到达日期",prop:"arrivalDate",minWidth:150,formatter:function(){var e=arguments[0].segments.go.map(function(e){return"
"+c()(e.departureDate).format("YYYY-MM-DD")+" "+e.arrivalTime+"
"}).join("");return arguments[0].segments.back.length?e+"
"+arguments[0].segments.back.map(function(e){return"
"+c()(e.arrivalDate).format("YYYY-MM-DD")+" "+e.arrivalTime+"
"}).join(""):e}},{label:"附加服务",prop:"productAdditional",class:"text-danger",formatter:function(){return arguments[2].map(function(e){return"
"+e+"
"}).join("")}},{label:"订单总价",prop:"allPrice"},{label:"利润",prop:"profits",class:"text-danger"},{label:"订单日期",prop:"createTime",minWidth:150,formatter:function(){return c()(arguments[2]).format("YYYY-MM-DD hh:mm:ss")}},{label:"查看",prop:"orderInfo",fixed:"right",custom:!0,minWidth:100,button:{module:"button",title:"查看",prop:"orderInfo",type:"primary",handle:function(){var t=arguments,a=this;arguments[0][this.prop+"_loading"]=!0,e.orderInfo(arguments[0]).then(function(){t[0][a.prop+"_loading"]=!1})}}}],tableConfig:{pageSizeKey:"size",request:m.search,handleResponse:function(e){return e.data.data.records.map(function(e){return o()(e.segments).forEach(function(t){e.segments[t].length&&(e.segments[t]=e.segments[t].sort(function(e,t){return c()(c()(e.departureDate).format("YYYY-MM-DD")+" "+e.departureTime).unix()>c()(c()(t.departureDate).format("YYYY-MM-DD")+" "+t.departureTime).unix()}))}),e})}},searchData:{},dialogConfig:{minWidth:"70%",title:"订单详情",visible:!1,type:"collapse",activeNames:[0,1,2,3,4]},dialogCollapselist:[{title:"订单信息",dialogTableData:{tableColumn:[{label:"订单状态",prop:"status",formatter:function(){return 1===arguments[2]?'
'+Object(b.d)(e.$store.getters.dic.orderSearch.status,arguments[2])+"
":Object(b.d)(e.$store.getters.dic.orderSearch.status,arguments[2])}},{label:"订单金额",prop:"orderPrice",formatter:function(){return arguments[0].allPrice+arguments[0].luggageIncome}},{label:"机票金额",prop:"allPrice"},{label:"行李金额",prop:"luggageIncome"},{label:"行李利润",prop:"luggageProfit"},{label:"值机金额",prop:"checkInIncome"},{label:"值机利润",prop:"checkInProfit"},{label:"利润",prop:"profits",class:"text-danger"}],tableData:[]}},{title:"航班信息",dialogTableData:{tableColumn:[{label:"航班类型",prop:"flightType",formatter:function(){return"go"===arguments[2]?"去程":"返程"}},{label:"航班号",prop:"flightNum"},{label:"仓位",prop:"cabin"},{label:"起降城市",prop:"Aircode",formatter:function(){return arguments[0].depAircode+"-"+arguments[0].arrAircode}},{label:"出发时间",prop:"departureDate",formatter:function(){return c()(arguments[2]).format("YYYY-MM-DD")+" "+arguments[0].departureTime}},{label:"到达时间",prop:"arrivalDate",formatter:function(){return c()(arguments[2]).format("YYYY-MM-DD")+" "+arguments[0].arrivalTime}}],tableData:[]}},{title:"乘客信息",dialogTableData:{tableColumn:[{label:"乘客类型",prop:"ageType",formatter:function(){return"0"===arguments[2]?"成人":arguments[2]>0?"儿童":"留学生"}},{label:"姓名",prop:"name"},{label:"性别",prop:"gender",formatter:function(){return"M"===arguments[2]?"男":"女"}},{label:"国籍",prop:"nationality"},{label:"证件类型",prop:"cardType",formatter:function(){return Object(b.d)(e.$store.getters.dic.orderSearch.cardType,arguments[2])}},{label:"证件号",prop:"cardNum"},{label:"证件有效期",prop:"cardExpired",formatter:function(){return c()(arguments[2]).format("YYYY-MM-DD")}},{label:"生日",prop:"birthday",formatter:function(){return c()(arguments[2]).format("YYYY-MM-DD")}},{label:"票号",prop:"eticketNum"}],tableData:[]}},{title:"附加服务",dialogTableData:{tableColumn:[{label:"服务类型",prop:"productType"},{label:"数量",prop:"counts"},{label:"单价",prop:"price"},{label:"乘机人",prop:"passenger"},{label:"航段",prop:"flightSegment"},{label:"详情",prop:"typedetails"},{label:"供应链联系方式",prop:"supplyCotractTel"}],tableData:[]}},{title:"支付信息",dialogTableData:{tableColumn:[{label:"类型",prop:"payType",formatter:function(){return Object(b.d)(e.$store.getters.dic.orderSearch.payType,arguments[2])}},{label:"支付渠道",prop:"payChannelsStr"},{label:"原始币种金额",prop:"foreignCurrency",class:"text-danger"},{label:"支付币种",prop:"currency"},{label:"汇率",prop:"currencyRate"},{label:"支付金额",prop:"paymentAmount",class:"text-danger"}],tableData:[]}}]}}},h={render:function(){var e=this.$createElement;return(this._self._c||e)("search-table-template",{ref:"searchTable",attrs:{formInputList:this.formInputList,formButtonlist:this.formButtonlist,tableColumn:this.tableColumn,searchData:this.searchData,tableConfig:this.tableConfig,dialogCollapselist:this.dialogCollapselist,dialogConfig:this.dialogConfig}})},staticRenderFns:[]},D=a("VU/8")(g,h,!1,null,null,null);t.default=D.exports}});