text: (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-7797"],{"9QD0":function(t,e,i){"use strict";var a=i("k65F"),l={data:function(){return{dialogFormVisible:!1,dialogStatus:"",temp:{id:void 0,childName:void 0,returnInformation:void 0}}},created:function(){},methods:{show:function(t){this.dialogFormVisible=!0,this.temp=t},handleClickConfirm:function(){var t=this;this.$confirm("是否确认该用户预约?","提示",{confirmButtonText:"是",cancelButtonText:"否",type:"warning"}).then(function(){Object(a.c)({id:t.temp.id,information:t.temp.returnInformation}).then(function(e){t.$emit("confirmSuccess"),t.dialogFormVisible=!1,t.$message({type:"success",message:"确认成功!"})})}).catch(function(){})}}},n=i("KHd+"),o=Object(n.a)(l,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{title:"确认预约",visible:t.dialogFormVisible},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[i("el-form",{staticStyle:{width:"400px","margin-left":"50px"},attrs:{model:t.temp,"label-position":"left","label-width":"70px"}},[i("el-form-item",{attrs:{label:"联系电话",prop:"timestamp"}},[i("el-input",{attrs:{disabled:""},model:{value:t.temp.phone,callback:function(e){t.$set(t.temp,"phone",e)},expression:"temp.phone"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"预约反馈",prop:"timestamp"}},[i("el-input",{attrs:{autosize:{minRows:4,maxRows:10},type:"textarea"},model:{value:t.temp.returnInformation,callback:function(e){t.$set(t.temp,"returnInformation",e)},expression:"temp.returnInformation"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"约定时间",prop:"timestamp"}},[i("el-input",{attrs:{disabled:""},model:{value:t.temp.date,callback:function(e){t.$set(t.temp,"date",e)},expression:"temp.date"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"备注",prop:"timestamp"}},[i("span",{staticStyle:{color:"red"}},[t._v("请联系用户，协商预约！预约反馈中写清楚预约的详细信息.")])])],1),t._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:t.handleClickConfirm}},[t._v("确定")]),t._v(" "),i("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("取消")])],1)],1)},[],!1,null,null,null);o.options.__file="appoint_confirm.vue";e.a=o.exports},RPJT:function(t,e,i){"use strict";var a={data:function(){return{dialogFormVisible:!1,dialogStatus:"",temp:{id:void 0,childName:void 0,remark:"",timestamp:new Date,title:"",type:"",status:"published"}}},created:function(){},methods:{show:function(t){this.dialogFormVisible=!0,this.temp=t}}},l=i("KHd+"),n=Object(l.a)(a,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{title:"预约信息",visible:t.dialogFormVisible},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[i("el-form",{staticStyle:{width:"400px","margin-left":"50px"},attrs:{model:t.temp,"label-position":"left","label-width":"70px"}},[i("el-form-item",{attrs:{label:"儿童姓名",prop:"timestamp"}},[i("el-input",{attrs:{disabled:""},model:{value:t.temp.childName,callback:function(e){t.$set(t.temp,"childName",e)},expression:"temp.childName"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"联系方式",prop:"timestamp"}},[i("el-input",{attrs:{disabled:""},model:{value:t.temp.phone,callback:function(e){t.$set(t.temp,"phone",e)},expression:"temp.phone"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"预约时间",prop:"timestamp"}},[i("el-input",{attrs:{disabled:""},model:{value:t.temp.date,callback:function(e){t.$set(t.temp,"date",e)},expression:"temp.date"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"预约描述",prop:"timestamp"}},[i("el-input",{attrs:{disabled:""},model:{value:t.temp.note,callback:function(e){t.$set(t.temp,"note",e)},expression:"temp.note"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"状态",prop:"timestamp"}},[i("el-input",{attrs:{disabled:""},model:{value:t.temp.stateName,callback:function(e){t.$set(t.temp,"stateName",e)},expression:"temp.stateName"}})],1),t._v(" "),"confirmed"===t.temp.state?i("el-form-item",{attrs:{label:"预约反馈",prop:"timestamp"}},[i("el-input",{attrs:{autosize:{minRows:4,maxRows:10},type:"textarea",disabled:""},model:{value:t.temp.returnInformation,callback:function(e){t.$set(t.temp,"returnInformation",e)},expression:"temp.returnInformation"}})],1):t._e(),t._v(" "),"user_cancelled"===t.temp.state||"doctor_cancelled"===t.temp.state||"admin_cancelled"===t.temp.state?i("el-form-item",{attrs:{label:"取消原因",prop:"timestamp"}},[i("el-input",{attrs:{disabled:""},model:{value:t.temp.cancelledReason,callback:function(e){t.$set(t.temp,"cancelledReason",e)},expression:"temp.cancelledReason"}})],1):t._e()],1),t._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("确定")])],1)],1)},[],!1,null,null,null);n.options.__file="appoint_show.vue";e.a=n.exports},U7XQ:function(t,e,i){"use strict";var a=i("k65F"),l={data:function(){return{dialogFormVisible:!1,dialogStatus:"",temp:{id:void 0,childName:void 0,cancelledReason:void 0}}},created:function(){},methods:{show:function(t){this.dialogFormVisible=!0,this.temp=t},handleClickCancel:function(){var t=this;this.$confirm("是否取消该用户预约?","提示",{confirmButtonText:"是",cancelButtonText:"否",type:"warning"}).then(function(){Object(a.b)({id:t.temp.id,information:t.temp.cancelledReason}).then(function(e){t.$emit("cancelSuccess"),t.dialogFormVisible=!1,t.$message({type:"success",message:"确认成功!"})})}).catch(function(){})}}},n=i("KHd+"),o=Object(n.a)(l,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{title:"确认预约",visible:t.dialogFormVisible},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[i("el-form",{staticStyle:{width:"400px","margin-left":"50px"},attrs:{model:t.temp,"label-position":"left","label-width":"70px"}},[i("el-form-item",{attrs:{label:"联系电话",prop:"timestamp"}},[i("el-input",{attrs:{disabled:""},model:{value:t.temp.phone,callback:function(e){t.$set(t.temp,"phone",e)},expression:"temp.phone"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"取消原因",prop:"timestamp"}},[i("el-input",{attrs:{autosize:{minRows:2,maxRows:4},type:"textarea"},model:{value:t.temp.cancelledReason,callback:function(e){t.$set(t.temp,"cancelledReason",e)},expression:"temp.cancelledReason"}})],1)],1),t._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:t.handleClickCancel}},[t._v("提交")]),t._v(" "),i("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("取消")])],1)],1)},[],!1,null,null,null);o.options.__file="appoint_cancel.vue";e.a=o.exports},k65F:function(t,e,i){"use strict";i.d(e,"a",function(){return l}),i.d(e,"c",function(){return n}),i.d(e,"d",function(){return o}),i.d(e,"b",function(){return s});var a=i("t3Un");function l(t){return Object(a.a)({url:"/api/a1/appoints",method:"get",params:t})}function n(t){return Object(a.a)({url:"/api/a1/appoints/"+t.id+"/confirm",method:"put",data:t})}function o(t){return Object(a.a)({url:"/api/a1/appoints/"+t.id+"/done",method:"put",data:t})}function s(t){return Object(a.a)({url:"/api/a1/appoints/"+t.id+"/cancel",method:"put",data:t})}},sB7W:function(t,e,i){"use strict";i.r(e);var a=i("k65F"),l=i("RPJT"),n=i("9QD0"),o=i("U7XQ"),s={components:{AppointShow:l.a,AppointConfirm:n.a,AppointCancel:o.a},data:function(){return{list:null,total:null,todayCount:0,pendingCount:0,listLoading:!0,listQuery:{page:1,limit:20,importance:void 0,code:void 0,childName:void 0,phone:void 0}}},computed:{todayText:function(){return"今日将有"+this.todayCount+"个用户预约到店建档。有"+this.pendingCount+"个预约待处理。"}},created:function(){this.getList()},methods:{handleClickCancel:function(t){this.$refs.cancel.show(t)},handleClickShow:function(t){this.$refs.show.show(t)},handleClickConfirm:function(t){this.$refs.confirm.show(t)},handleClickDone:function(t){var e=this;this.$confirm("是否确认该用户已到店?","提示",{confirmButtonText:"是",cancelButtonText:"否",type:"warning"}).then(function(){Object(a.d)(t).then(function(t){e.getList(),e.$message({type:"success",message:"确认成功!"})})}).catch(function(){})},getList:function(){var t=this;Object(a.a)(this.listQuery).then(function(e){t.list=e.data.items,t.total=e.data.total,t.todayCount=e.data.todayCount,t.pendingCount=e.data.pendingCount,setTimeout(function(){t.listLoading=!1},1500)})},handleCurrentChange:function(t){this.listQuery.page=t,this.getList()},handleSizeChange:function(t){this.listQuery.limit=t,this.getList()},handleColumnSort:function(t){this.listQuery.sortProp=t.prop,this.listQuery.sortOrder=t.order,this.getList()},handleFilter:function(){this.getList()},handleFilterClear:function(){this.listQuery.code="",this.listQuery.childName="",this.phone="",this.getList()}}},r=i("KHd+"),c=Object(r.a)(s,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[t._v("新的预约")])]),t._v(" "),i("div",{staticClass:"filter-container"},[i("el-alert",{attrs:{closable:!1,title:t.todayText,type:"success"}})],1),t._v(" "),i("el-row",{staticStyle:{"margin-bottom":"10px"}},[t._v("\n      预约码:\n      "),i("el-input",{staticClass:"filter-item",staticStyle:{width:"100px"},attrs:{label:"预约码",placeholder:"预约码",clearable:""},model:{value:t.listQuery.code,callback:function(e){t.$set(t.listQuery,"code",e)},expression:"listQuery.code"}}),t._v("\n      姓名:\n      "),i("el-input",{staticClass:"filter-item",staticStyle:{width:"100px"},attrs:{label:"姓名",placeholder:"姓名",clearable:""},model:{value:t.listQuery.childName,callback:function(e){t.$set(t.listQuery,"childName",e)},expression:"listQuery.childName"}}),t._v("\n      手机号:\n      "),i("el-input",{staticClass:"filter-item",staticStyle:{width:"100px"},attrs:{label:"手机号",placeholder:"手机号",clearable:""},model:{value:t.listQuery.phone,callback:function(e){t.$set(t.listQuery,"phone",e)},expression:"listQuery.phone"}}),t._v(" "),i("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.handleFilter}},[t._v("查询")]),t._v(" "),i("el-button",{staticClass:"filter-item",attrs:{type:"primary"},on:{click:t.handleFilterClear}},[t._v("清空")])],1),t._v(" "),i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.list,border:""},on:{"sort-change":t.handleColumnSort}},[i("el-table-column",{attrs:{prop:"date",label:"预约时间","min-width":"120"}}),t._v(" "),i("el-table-column",{attrs:{prop:"code",label:"预约码","min-width":"80"}}),t._v(" "),i("el-table-column",{attrs:{prop:"childName",label:"姓名","min-width":"80"}}),t._v(" "),i("el-table-column",{attrs:{prop:"phone",label:"联系电话","min-width":"90"}}),t._v(" "),i("el-table-column",{attrs:{prop:"age",label:"年龄","min-width":"60"}}),t._v(" "),i("el-table-column",{attrs:{prop:"stateName",label:"预约状态","min-width":"100"}}),t._v(" "),i("el-table-column",{attrs:{prop:"reachTime",label:"到店时间","min-width":"120"}}),t._v(" "),i("el-table-column",{attrs:{label:"操作","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){t.handleClickShow(e.row)}}},[t._v("查看")]),t._v(" "),"pending"===e.row.state?i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){t.handleClickConfirm(e.row)}}},[t._v("确认预约")]):t._e(),t._v(" "),"pending"===e.row.state?i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){t.handleClickCancel(e.row)}}},[t._v("取消")]):t._e(),t._v(" "),"confirmed"===e.row.state?i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){t.handleClickDone(e.row)}}},[t._v("确认到店")]):t._e(),t._v(" "),"done"===e.row.state?i("router-link",{attrs:{to:"/apt_arch/archives"}},[i("el-button",{attrs:{type:"text",size:"small"}},[t._v("建立档案")])],1):t._e()]}}])})],1),t._v(" "),i("div",{staticClass:"pagination-container"},[i("el-pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total>0"}],attrs:{"current-page":t.listQuery.page,"page-sizes":[10,20,30,50],"page-size":t.listQuery.limit,total:t.total,background:"",layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1),t._v(" "),i("AppointShow",{ref:"show"}),t._v(" "),i("AppointConfirm",{ref:"confirm",on:{confirmSuccess:t.getList}}),t._v(" "),i("AppointCancel",{ref:"cancel",on:{cancelSuccess:t.getList}})],1)},[],!1,null,null,null);c.options.__file="appointments.vue";e.default=c.exports}}]);