| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7dbda7c8"],{"512f":function(e,t,n){"use strict";n("ce45")},"7c4b":function(e,t,n){"use strict";n("c692")},bb5b:function(e,t,n){"use strict";n.r(t);var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"divBox"},[n("div",{staticClass:"selCard"},[n("div",{staticClass:"container"},[n("el-form",{ref:"searchForm",attrs:{model:e.tableFrom,size:"small","label-width":"auto",inline:""}},[n("el-form-item",{attrs:{label:"预约人员:"}},[n("el-input",{staticClass:"selWidth",attrs:{clearable:"",placeholder:"请输入预约人员姓名电话搜索"},on:{keydown:e.searchList},model:{value:e.tableFrom.reservation_keyword,callback:function(t){e.$set(e.tableFrom,"reservation_keyword",t)},expression:"tableFrom.reservation_keyword"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"服务人员:"}},[n("el-select",{staticClass:"selWidth",staticStyle:{width:"200px"},attrs:{placeholder:"请选择服务人员",clearable:""},on:{change:e.searchList},model:{value:e.tableFrom.staff_id,callback:function(t){e.$set(e.tableFrom,"staff_id",t)},expression:"tableFrom.staff_id"}},e._l(e.staffList,(function(e){return n("el-option",{key:e.staffs_id,attrs:{label:e.name,value:e.staffs_id}})})),1)],1),e._v(" "),n("el-form-item",{attrs:{label:"服务方式:"}},[n("el-select",{staticClass:"selWidth",staticStyle:{width:"200px"},attrs:{placeholder:"请选择服务方式",clearable:""},on:{change:e.searchList},model:{value:e.tableFrom.service_type,callback:function(t){e.$set(e.tableFrom,"service_type",t)},expression:"tableFrom.service_type"}},e._l(e.serviceList,(function(e){return n("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),n("select-search",{ref:"selectSearch",attrs:{select:e.select,searchSelectList:e.searchSelectList},on:{search:e.searchList}}),e._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.searchList}},[e._v("搜索")]),e._v(" "),n("el-button",{attrs:{size:"small"},on:{click:e.reset}},[e._v("重置")])],1)],1)],1)]),e._v(" "),n("el-card",{staticClass:"mt14 board-card"},[n("fullCalendar",{ref:"fullCalendar",attrs:{tableFrom:e.tableFrom},on:{onOrderDetails:e.onOrderDetails}}),e._v(" "),n("order-detail",{ref:"orderDetail",attrs:{orderId:e.orderId,drawer:e.drawer},on:{closeDrawer:e.closeDrawer,changeDrawer:e.changeDrawer,reSend:e.reSend,reDriving:e.reDriving,onOrderRefund:e.onOrderRefund,getlist:e.searchList}})],1),e._v(" "),n("order-refund",{ref:"orderRefund",on:{refundSuccess:e.refundSuccess}})],1)},r=[],a=(n("c5f6"),n("068f")),i=n("f51c"),o=n("8593"),l=n("f8b7"),c=n("6e76"),d=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"h-full"},[n("FullCalendar",{ref:"fullCalendar",attrs:{options:e.calendarOptions},scopedSlots:e._u([{key:"eventContent",fn:function(t){return[n("el-tooltip",[n("div",{attrs:{slot:"content"},slot:"content"},[n("div",{staticClass:"reservation-name flex"},[1==t.event.extendedProps.order_type?n("div",{staticClass:"reservation-type border-color"},[e._v("\n 到店\n ")]):0==t.event.extendedProps.order_type?n("div",{staticClass:"reservation-type border-color"},[e._v("\n 上门\n ")]):e._e(),e._v(" "),n("div",{staticClass:"name",staticStyle:{display:"inline-block"}},[e._v("\n "+e._s(t.event.extendedProps.real_name)+"\n ")]),e._v(" "),n("div",{staticClass:"phone text-1",staticStyle:{display:"inline-block"}},[e._v("\n "+e._s(t.event.extendedProps.user_phone)+"\n "),0==t.event.extendedProps.order_type?n("span",[e._v("\n "+e._s(t.event.extendedProps.user_address))]):e._e()])]),e._v(" "),n("div",{staticClass:"text-1",staticStyle:{"margin-top":"4px"}},[e._v("\n "+e._s(t.event.extendedProps.productInfo.store_name)+"\n ")])]),e._v(" "),n("div",[n("div",{staticClass:"reservation-name"},[1==t.event.extendedProps.order_type?n("div",{staticClass:"reservation-type"},[e._v("\n 到店\n ")]):0==t.event.extendedProps.order_type?n("div",{staticClass:"reservation-type"},[e._v("\n 上门\n ")]):e._e(),e._v(" "),n("div",{staticClass:"name",staticStyle:{display:"inline-block"}},[e._v("\n "+e._s(t.event.extendedProps.real_name)+"\n ")]),e._v(" "),n("div",{staticClass:"phone text-1",staticStyle:{display:"inline-block"}},[e._v("\n "+e._s(t.event.extendedProps.user_phone)+"\n "),0==t.event.extendedProps.order_type?n("span",[e._v("\n "+e._s(t.event.extendedProps.user_address))]):e._e()])]),e._v(" "),n("div",{staticClass:"text-1"},[e._v("\n "+e._s(t.event.extendedProps.productInfo.store_name)+"\n ")])])])]}}])}),e._v(" "),n("div",{staticClass:"float-box"},[n("div",{staticClass:"list"},[n("div",{staticClass:"item"},[n("span",{staticClass:"iconfont mark",class:e.checkBox.includes(1)?"iconfuxuankuang-xuanzhong":"iconfuxuankuang-weixuanzhong",on:{click:function(t){return e.handleMark(1)}}}),e._v("\n 待服务\n ")]),e._v(" "),n("div",{staticClass:"item"},[n("span",{staticClass:"iconfont mark mark2",class:e.checkBox.includes(2)?"iconfuxuankuang-xuanzhong":"iconfuxuankuang-weixuanzhong",on:{click:function(t){return e.handleMark(2)}}}),e._v("\n 服务中\n ")]),e._v(" "),n("div",{staticClass:"item"},[n("span",{staticClass:"iconfont mark mark3",class:e.checkBox.includes(3)?"iconfuxuankuang-xuanzhong":"iconfuxuankuang-weixuanzhong",on:{click:function(t){return e.handleMark(3)}}}),e._v("\n 已完成\n ")])])]),e._v(" "),n("el-dialog",{attrs:{title:"时间间隔",visible:e.dialogVisible,width:"504px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[n("div",{staticClass:"slider"},[e.dialogVisible?n("el-slider",{staticStyle:{width:"226","white-space":"nowrap"},attrs:{min:30,max:180,step:30,marks:e.marks,"show-stops":""},model:{value:e.sliderValue,callback:function(t){e.sliderValue=t},expression:"sliderValue"}}):e._e()],1),e._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogVisible=!1}}},[e._v("取消")]),e._v(" "),n("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.setConfig}},[e._v("确定")])],1)])],1)},u=[],f=(n("55dd"),n("6762"),n("2fdb"),n("db72")),m=(n("7f7f"),n("ac6a"),n("a203")),h={components:{FullCalendar:function(){return n.e("chunk-2d0d6e79").then(n.bind(null,"7516"))}},props:{tableFrom:{type:Object,default:function(){}}},data:function(){var e=this;return{marks:{30:"30分钟",60:"1小时",90:"",120:"2小时",150:"",180:"3小时"},sliderValue:30,checkBox:[1,2,3],dialogVisible:!1,formValidate:{is_show_staff_switch:1,chart_time_interval:30},calendarOptions:{height:"calc(100vh - 276px)",slotMinWidth:90,eventMaxStack:50,moreLinkContent:{html:'<a>全部预约<span class="fc-icon fc-icon-chevron-right"></span></a>'},locale:"zh-cn",plugins:[m["a"]],initialView:"resourceTimelineDay",aspectRatio:3,headerToolbar:{left:"prev,title,next,volume,number",right:"setup"},customButtons:{setup:{text:"时间设置",click:function(t){e.showPopover()}},volume:{text:"当日预约量"},number:{text:"0"}},slotLabelFormat:{hour:"2-digit",minute:"2-digit",hour12:!1,omitZeroMinute:!1,locale:"zh-cn"},nowIndicator:!0,editable:!1,droppable:!1,resourceAreaWidth:"15%",scrollTime:"9:00",resourceAreaHeaderContent:"",resources:[],events:[],slotDuration:"00:30:00",slotLabelInterval:"00:30",datesSet:this.handleDatesSet,eventClick:this.handleEventClick,schedulerLicenseKey:"GPL-My-Project-Is-Open-Source"},reservationTime:"",where:{service_type:"",staff_id:"",uid:"",phone:"",nickname:"",reservation_date:"",reservation_status:[1,2,3]}}},watch:{},beforeDestroy:function(){document.removeEventListener("click",this.closePopover)},mounted:function(){this.getConfig(),this.getList()},methods:{getList:function(){var e=this;for(var t in this.tableFrom)this.where[t]=this.tableFrom[t];Object(l["C"])(this.where).then((function(t){var n=t.data.list,s=[],r=[];n.forEach((function(t){s.push({id:t.staffs_id,title:0==t.staffs_id?"未分配":t.name}),t.orders.forEach((function(n){var s="#377DFF";0==t.order_type&&1==n.status||1==t.order_type&&(1==n.status||0==n.status)?s="##377DFF":20==n.status?s="#FF8D30":n.status>=2&&(s="#23C471"),r.push(Object(f["a"])(Object(f["a"])({},n),{},{id:n.order_id,staff_name:t.name,resourceId:t.staffs_id+"",start:e.moment(n.productInfo.reservation_date+" "+n.productInfo.reservation_start).format("YYYY-MM-DD HH:mm"),end:e.moment(n.productInfo.reservation_date+" "+n.productInfo.reservation_end).format("YYYY-MM-DD HH:mm"),color:s}))}))})),e.calendarOptions.resources=s,e.$set(e.calendarOptions,"events",r),e.calendarOptions.customButtons.number.text=t.data.count+""}))},showPopover:function(){this.dialogVisible=!0},handleMark:function(e){this.checkBox.includes(e)?(this.checkBox=this.checkBox.filter((function(t){return t!=e})),this.where.reservation_status=this.checkBox):(this.checkBox.push(e),this.where.reservation_status=this.checkBox),this.getList()},handleDatesSet:function(e){this.where.reservation_date=this.moment(e.start).format("YYYY-MM-DD"),this.getList()},handleEventClick:function(e){var t=e.event;this.$emit("onOrderDetails",t.extendedProps.order_id)},setConfig:function(){localStorage.setItem("sliderValue",this.sliderValue),this.dialogVisible=!1,this.getConfig()},getConfig:function(){var e=30;localStorage.getItem("sliderValue")&&(e=localStorage.getItem("sliderValue")),this.sliderValue=Number(e),this.calendarOptions.slotDuration=this.moment.utc(60*this.sliderValue*1e3).format("HH:mm:ss"),this.calendarOptions.slotLabelInterval=this.moment.utc(60*this.sliderValue*1e3).format("HH:mm:ss")},close:function(){this.modal=!1},handleRefresh:function(){this.isRefresh=!0},handleMoreLinkClick:function(e){e.jsEvent.preventDefault();var t=e.hiddenSegs[0].event,n=t.getResources(),s=n[0].getEvents(),r=s.filter((function(e){var n=e.start,s=e.end;return t.start<=s&&n<t.end}));r.sort((function(e,t){return e.start-t.start}));var a=r.map((function(e){var t=e.extendedProps,n=e.id;return Object(f["a"])(Object(f["a"])({},t),{},{id:n})}));this.$emit("serviceTap",a)}}},v=h,_=(n("7c4b"),n("2877")),p=Object(_["a"])(v,d,u,!1,null,"cc108a2e",null),g=p.exports,b={name:"",components:{selectSearch:c["default"],fullCalendar:g,orderDetail:a["a"],orderRefund:i["a"]},props:{},data:function(){return{tableFrom:{reservation_keyword:"",service_type:"",staff_id:"",uid:"",phone:"",nickname:""},orderId:"",drawer:!1,select:"",staffList:[],serviceList:[{id:"0",name:"上门服务"},{id:1,name:"到店服务"}],searchSelectList:[{label:"全部",value:""},{label:"昵称",value:"nickname"},{label:"用户ID",value:"uid"},{label:"手机号",value:"phone"}]}},computed:{},watch:{},created:function(){},mounted:function(){this.getSelectStaff()},methods:{getSelectStaff:function(){var e=this;Object(o["L"])(this.where).then((function(t){e.staffList=t.data.list}))},onOrderDetails:function(e){this.orderId=e,this.$refs.orderDetail.getInfo(e),this.drawer=!0},reset:function(){for(var e in this.$refs.selectSearch.resetParmas(),this.tableFrom)this.tableFrom[e]="";this.$refs.fullCalendar.getList()},closeDrawer:function(){this.drawer=!1},changeDrawer:function(e){this.drawer=e},reDriving:function(){var e=this;Object(l["nb"])(this.orderId).then((function(t){e.$message.success(t.message)})).catch((function(t){e.$message.error(t.message)}))},reSend:function(e){var t=this;this.isBatch=!1,this.sendVisible=!0,this.orderId=e,this.isResend=!0,delete this.shipment.order_id,Object(l["eb"])(e).then((function(e){var n=e.data;t.shipment.delivery_type=t.isDump||mer_dump_switch||4!=n.delivery_type?Number(n.delivery_type):1,t.noLogistics=n.delivery_type,t.loading=!1,t.original={delivery_name:n.delivery_name,delivery_id:n.delivery_id},t.loading=!1})).catch((function(e){var n=e.message;t.loading=!1,t.$message.error(n)}))},onOrderRefund:function(e){this.$refs.orderRefund.getOrderDetails(e)},refundSuccess:function(){var e=this;setTimeout((function(){e.drawer=!1,e.searchList()}),500)},searchList:function(e){e?(this.tableFrom.nickname=e.nickname,this.tableFrom.uid=e.uid,this.tableFrom.phone=e.phone,this.$refs.fullCalendar.getList()):this.$refs.fullCalendar.getList()}}},k=b,x=Object(_["a"])(k,s,r,!1,null,"7552daf0",null);t["default"]=x.exports},c692:function(e,t,n){},ce45:function(e,t,n){},f51c:function(e,t,n){"use strict";var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.dialogVisible?n("el-dialog",{attrs:{title:"手动退款",visible:e.dialogVisible,width:"850px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"container"},[n("div",[n("el-table",{ref:"multipleSelection",attrs:{data:e.productList,"tooltip-effect":"dark",size:"small",border:"","row-key":function(e){return e.product_id},"header-cell-style":{background:"#F0F5FF"}},on:{"selection-change":e.handleSelectionChange}},[n("el-table-column",{attrs:{align:"center",type:"selection","reserve-selection":!0,"min-width":"50"}}),e._v(" "),n("el-table-column",{attrs:{align:"center",label:"商品信息","min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("div",{staticClass:"acea-row",staticStyle:{"align-items":"center"}},[n("div",{staticClass:"demo-image__preview"},[n("el-image",{attrs:{src:t.row.cart_info.productAttr.image,"preview-src-list":[t.row.cart_info.productAttr.image]}})],1),e._v(" "),n("span",{staticStyle:{width:"150px"}},[e._v(e._s(t.row.cart_info.product.store_name))])])]}}],null,!1,732792787)}),e._v(" "),n("el-table-column",{attrs:{align:"center",label:"规格","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",[e._v(e._s(t.row.cart_info.productAttr.sku||"默认"))])]}}],null,!1,3717964922)}),e._v(" "),n("el-table-column",{attrs:{align:"center",label:"商品实付金额","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",[e._v(e._s(t.row.product_price))])]}}],null,!1,1676187007)}),e._v(" "),n("el-table-column",{attrs:{align:"center",label:"运费","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",[e._v(e._s(t.row.postage_price))])]}}],null,!1,2147956495)}),e._v(" "),n("el-table-column",{attrs:{align:"center",prop:"product_num",label:"总数","min-width":"80"}}),e._v(" "),n("el-table-column",{attrs:{label:"退款数量",align:"center","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-input-number",{staticStyle:{width:"100px"},attrs:{type:"number",min:1,max:t.row.max_num,"controls-position":"right"},on:{change:function(n){return e.limitNum(t.row)}},model:{value:t.row["refund_num"],callback:function(n){e.$set(t.row,"refund_num",n)},expression:"scope.row['refund_num']"}})]}}],null,!1,105020361)})],1)],1),e._v(" "),n("el-form",{staticStyle:{"margin-top":"20px"},attrs:{"label-width":"100px",size:"small"}},[n("el-form-item",{attrs:{label:"退款金额:",required:""}},[n("el-input-number",{staticClass:"selWidth",attrs:{min:0,max:e.maxRefundPrice,precision:2,placeholder:"请输入退款金额",size:"small","controls-position":"right"},model:{value:e.refund_price,callback:function(t){e.refund_price=t},expression:"refund_price"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"退款原因",required:""}},[n("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择"},model:{value:e.refund_message,callback:function(t){e.refund_message=t},expression:"refund_message"}},e._l(e.reasonList,(function(e){return n("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),e._v(" "),n("el-form-item",{attrs:{label:"备注:"}},[n("el-input",{staticClass:"selWidth",attrs:{size:"small"},model:{value:e.mer_mark,callback:function(t){e.mer_mark=t},expression:"mer_mark"}})],1)],1)],1),e._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogVisible=!1}}},[e._v("取消")]),e._v(" "),n("el-button",{attrs:{type:"primary",loading:e.btnloading,size:"small"},on:{click:e.submitForm}},[e._v("确定")])],1)]):e._e()],1)},r=[],a=(n("c5f6"),n("ac6a"),n("f8b7")),i={name:"OrderCancellate",data:function(){return{dialogVisible:!1,loading:!0,btnloading:!1,code:"",order_id:"",ruleValidate:{refund_price:[{required:!0,message:"请输入退款金额",trigger:"blur"}],refund_message:[{required:!0,message:"请选择退款原因",trigger:"change"}]},refund_price:"",refund_message:"",mer_mark:"",reasonList:[],multipleSelection:[],ids:[],productList:[],maxRefundPrice:0}},methods:{submitForm:function(){var e=this;if(void 0==this.refund_price)return this.$message.warning("请输入退款金额!");if(!this.refund_message)return this.$message.warning("请选择退款原因!");if(!this.multipleSelection.length)return this.$message.warning("请选择商品!");var t={};this.multipleSelection.map((function(e){t[e.order_product_id]=e.refund_num}));var n={order_id:this.order_id,refund:t,refund_message:this.refund_message,refund_price:this.refund_price,mer_mark:this.mer_mark};this.btnloading=!0,Object(a["Eb"])(n).then((function(t){e.btnloading=!1,e.$message.success(t.message),e.dialogVisible=!1,e.$emit("refundSuccess")})).catch((function(t){var n=t.message;e.btnloading=!1,e.$message.error(n)}))},getRefundPrice:function(){var e=this,t={};this.multipleSelection.map((function(e){t[e.order_product_id]=e.refund_num})),Object(a["e"])({order_id:this.order_id,refund:t}).then((function(t){e.refund_price=t.data.totalRefundPrice})).catch((function(t){t.message;e.refund_price=0}))},getOrderDetails:function(e){var t=this;this.order_id=e,this.loading=!0,this.dialogVisible=!0,Object(a["E"])(e).then((function(e){t.getRefundMessage(),t.refund_message=e.data.refund_message,t.mer_mark=e.data.mer_mark,t.productList=e.data.product,t.productList.forEach((function(e,t){e.max_num=e.refund_num})),t.maxRefundPrice=Number(e.data.postage_price)+Number(e.data.total_refund_price),t.refund_price=0,t.loading=!1})).catch((function(e){var n=e.message;t.dialogVisible=!1,t.loading=!1,t.$message.error(n)}))},getRefundMessage:function(){var e=this;Object(a["D"])().then((function(t){e.reasonList=t.data,e.refund_message=t.data[0]})).catch((function(t){var n=t.message;e.$message.error(n)}))},handleSelectionChange:function(e){this.multipleSelection=e,this.getRefundPrice()},limitNum:function(e){e.refund_num>e.max_num?e.refund_num=e.max_num:e.refund_num<1&&(e.refund_num=1),this.getRefundPrice()}}},o=i,l=(n("512f"),n("2877")),c=Object(l["a"])(o,s,r,!1,null,"0d60a482",null);t["a"]=c.exports}}]);
|