1 line
3.5 KiB
JavaScript
1 line
3.5 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-72cd67ad"],{"20cb8":function(t,e,a){var n=a("c3a0");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=a("499e").default;i("06337811",n,!0,{sourceMap:!1,shadowMode:!1})},8462:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"appointment_time"}},[a("c-title",{attrs:{hide:!1,text:"可预约日期"}}),t.showCalendar?a("c-calendar",{ref:"calendar",attrs:{events:t.calendarEvents},on:{select:t.selectedDay,monthChanged:t.monthChanged}}):t._e(),t.timeList.length<=0?a("div",{staticClass:"main"},[a("p",{staticClass:"tips"},[t._v("暂无预约")])]):a("div",{staticClass:"main"},[a("p",{staticClass:"tips"},[t._v("预约时间")]),t._l(t.timeList,(function(e,n){return a("div",{key:n,staticClass:"times"},[a("span",{staticClass:"checked"},[t._v(t._s(e.start_time)+"-"+t._s(e.end_time)),a("em",[t._v("已约")])])])}))],2)],1)},i=[],o=(a("d81d"),a("6968")),s=a("3dc5"),d={data:function(){return{activeNames:[],value:3,calendarEvents:[],result:"",today:"",timeList:[],showCalendar:!0}},activated:function(){this.showCalendar=!1,this.getTime(),this.today=(new Date).getFullYear()+"-"+((new Date).getMonth()+1)+"-"+(new Date).getDate()},computed:{appointmentLang:function(){return this.$store.state.shopLanguage.appointment?this.$store.state.shopLanguage.appointment:{worker:"技师",project:"项目",service:"服务"}}},methods:{selectedDay:function(t){var e="";t.length>=3&&(e=t[0]+"-"+t[1]+"-"+t[2]),this.getAppointment(e)},monthChanged:function(t){},getTime:function(){var t=this;$http.get("plugin.appointment.frontend.work-time.get-period-list",{worker_id:this.$route.params.worker_id},"获取中").then((function(e){t.showCalendar=!0,1===e.result?(t.calendarEvents=e.data.map((function(t){return 1==t.work_status?t.work_date_format+"-休":t.work_date_format})),t.getAppointment(t.today)):t.$dialog.alert({message:e.msg})})).catch((function(e){t.showCalendar=!0}))},getAppointment:function(t){var e=this;$http.get("plugin.appointment.frontend.work-time.get-order-service-time-list",{worker_id:this.$route.params.worker_id,work_date:t},"获取中").then((function(t){1===t.result?e.timeList=t.data:e.$dialog.alert({message:t.msg})})).catch((function(t){}))}},components:{cTitle:o["a"],cCalendar:s["a"]}},r=d,p=r,c=(a("a3e5"),a("2877")),l=Object(c["a"])(p,n,i,!1,null,"5ded58db",null);e["default"]=l.exports},a3e5:function(t,e,a){"use strict";a("20cb8")},c3a0:function(t,e,a){var n=a("24fb");e=n(!1),e.push([t.i,"#appointment_time[data-v-5ded58db]{background:#fff;text-align:left}#appointment_time .main[data-v-5ded58db]{padding:1rem}#appointment_time .tips[data-v-5ded58db]{text-align:left;font-weight:700;font-size:15px}#appointment_time .times[data-v-5ded58db]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-top:1rem}#appointment_time .times span[data-v-5ded58db]{position:relative;display:inline-block;background-color:#fe753e;border-radius:5px;color:#fff;padding:.8rem 1rem;font-size:14px;margin-right:.5rem}#appointment_time .times em[data-v-5ded58db]{position:absolute;right:0;top:0;background-color:#fff;border-radius:0 5px 0 5px;opacity:.57;font-size:10px;color:#999;padding:.2rem}#appointment_time .times .checked[data-v-5ded58db]{background-color:#e1e1e1}#appointment_time .blue[data-v-5ded58db]{display:inline-block;padding:0 .1rem;border-radius:2.5px;background-color:#6eabff;color:#fff}",""]),t.exports=e}}]); |