IfqY.af21705f.js 11 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["IfqY"],{IfqY:function(e,t,a){"use strict";a.r(t);var n=a("QbLZ"),r=a.n(n),i=a("t3Un");var l={data:function(){return{options:[{value:"人找车",label:"人找车"},{value:"车找人",label:"车找人"}],loading:!0,ids:[],single:!0,multiple:!0,total:0,appointmentList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,companyId:void 0,appointedBy:void 0,carpoolingType:void 0,route:void 0,phone:void 0,startPlace:void 0,endPlace:void 0,departureLatitude:void 0,latitudeArrival:void 0,departureTime:void 0,numberPeople:void 0,explain:void 0,unitPrice:void 0,price:void 0,status:void 0,remark1:void 0,remark2:void 0,remark3:void 0,deleteFlag:void 0,gmtCreate:void 0,gmtUpdate:void 0,userId:void 0,adminId:void 0},form:{},rules:{deleteFlag:[{required:!0,message:"0:否(默认) 1:是不能为空",trigger:"blur"}]}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.loading=!0,function(e){return Object(i.a)({method:"get",params:r()({_gp:"admin.unimall.pincheMakeAppointment",_mt:"list"},e)})}(this.queryParams).then(function(t){e.appointmentList=t.data.data.items,e.total=t.data.data.count,e.loading=!1})},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:void 0,companyId:void 0,appointedBy:void 0,carpoolingType:void 0,route:void 0,phone:void 0,startPlace:void 0,endPlace:void 0,departureLatitude:void 0,latitudeArrival:void 0,departureTime:void 0,numberPeople:void 0,explain:void 0,unitPrice:void 0,price:void 0,status:"0",remark1:void 0,remark2:void 0,remark3:void 0,deleteFlag:void 0,gmtCreate:void 0,gmtUpdate:void 0,userId:void 0,adminId:void 0},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map(function(e){return e.id}),this.single=1!=e.length,this.multiple=!e.length},handleAdd:function(){this.reset(),this.open=!0,this.title="添加预约信息"},handleUpdate:function(e){var t=this;this.reset(),function(e){return Object(i.a)({method:"get",params:{_gp:"admin.unimall.pincheMakeAppointment",_mt:"get",id:e}})}(e.id||this.ids.join(",")).then(function(e){t.form=e.data.data,t.open=!0,t.title="修改预约信息"})},submitForm:function(){var e=this;this.$refs.form.validate(function(t){t&&(void 0!=e.form.id?function(e){return Object(i.a)({method:"post",params:{_gp:"admin.unimall.pincheMakeAppointment",_mt:"update",pincheMakeAppointment:e}})}(e.form).then(function(t){t.data?(e.msgSuccess("修改成功"),e.open=!1,e.getList()):e.msgError(t.msg)}):function(e){return Object(i.a)({method:"post",params:{_gp:"admin.unimall.pincheMakeAppointment",_mt:"add",pincheMakeAppointment:e}})}(e.form).then(function(t){t.data?(e.msgSuccess("新增成功"),e.open=!1,e.getList()):e.msgError(t.msg)}))})},handleDelete:function(e){var t=this,a=e.id||this.ids.join(",");this.$confirm('是否确认删除预约信息编号为"'+a+'"的数据项?',"警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){return function(e){return Object(i.a)({method:"post",params:{_gp:"admin.unimall.pincheMakeAppointment",_mt:"delete",id:e}})}(a)}).then(function(){t.getList(),t.msgSuccess("删除成功")}).catch(function(){})},handleExport:function(){var e=this,t=this.queryParams;this.$confirm("是否确认导出所有预约信息数据项?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){return function(e){return Object(i.a)({method:"get",params:r()({_gp:"admin.unimall.pincheMakeAppointment",_mt:"export"},e)})}(t)}).then(function(t){e.download(t.data.data)}).catch(function(){})}}},o=a("KHd+"),s=Object(o.a)(l,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-form",{ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"}},[a("el-form-item",{attrs:{label:"预约人",prop:"appointedBy"}},[a("el-input",{attrs:{placeholder:"请输入预约人",clearable:"",size:"small"},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleQuery(t):null}},model:{value:e.queryParams.appointedBy,callback:function(t){e.$set(e.queryParams,"appointedBy",t)},expression:"queryParams.appointedBy"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"路线",prop:"route"}},[a("el-input",{attrs:{placeholder:"请输入路线",clearable:"",size:"small"},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleQuery(t):null}},model:{value:e.queryParams.route,callback:function(t){e.$set(e.queryParams,"route",t)},expression:"queryParams.route"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"手机号",prop:"phone"}},[a("el-input",{attrs:{placeholder:"请输入手机号",clearable:"",size:"small"},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleQuery(t):null}},model:{value:e.queryParams.phone,callback:function(t){e.$set(e.queryParams,"phone",t)},expression:"queryParams.phone"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"状态",prop:"status"}},[a("el-input",{attrs:{placeholder:"请输入状态",clearable:"",size:"small"},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleQuery(t):null}},model:{value:e.queryParams.status,callback:function(t){e.$set(e.queryParams,"status",t)},expression:"queryParams.status"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.appointmentList},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{label:"预约人",align:"center",prop:"appointedBy"}}),e._v(" "),a("el-table-column",{attrs:{label:"拼车类型",align:"center",prop:"carpoolingType"}}),e._v(" "),a("el-table-column",{attrs:{label:"路线",align:"center",prop:"route"}}),e._v(" "),a("el-table-column",{attrs:{label:"手机号",align:"center",prop:"phone"}}),e._v(" "),a("el-table-column",{attrs:{label:"出发地点",align:"center",prop:"startPlace"}}),e._v(" "),a("el-table-column",{attrs:{label:"到达地点",align:"center",prop:"endPlace"}}),e._v(" "),a("el-table-column",{attrs:{label:"出发时间",align:"center",prop:"departureTime",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.parseTime(t.row.departureTime)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"人数",align:"center",prop:"numberPeople"}}),e._v(" "),a("el-table-column",{attrs:{label:"说明",align:"center",prop:"explain"}}),e._v(" "),a("el-table-column",{attrs:{label:"单价",align:"center",prop:"unitPrice"}}),e._v(" "),a("el-table-column",{attrs:{label:"总价",align:"center",prop:"price"}}),e._v(" "),a("el-table-column",{attrs:{label:"状态",align:"center",prop:"status"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:appointment:edit"],expression:"['unimall:appointment:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(a){e.handleUpdate(t.row)}}},[e._v("修改")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:appointment:remove"],expression:"['unimall:appointment:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(a){e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),e._v(" "),a("el-dialog",{attrs:{title:e.title,visible:e.open,width:"500px"},on:{"update:visible":function(t){e.open=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"预约人",prop:"appointedBy"}},[a("el-input",{attrs:{placeholder:"请输入预约人"},model:{value:e.form.appointedBy,callback:function(t){e.$set(e.form,"appointedBy",t)},expression:"form.appointedBy"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"拼车类型"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择拼车类型"},model:{value:e.form.carpoolingType,callback:function(t){e.$set(e.form,"carpoolingType",t)},expression:"form.carpoolingType"}},e._l(e.options,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1),e._v(" "),a("el-form-item",{attrs:{label:"路线",prop:"route"}},[a("el-input",{attrs:{placeholder:"请输入路线"},model:{value:e.form.route,callback:function(t){e.$set(e.form,"route",t)},expression:"form.route"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"手机号",prop:"phone"}},[a("el-input",{attrs:{placeholder:"请输入手机号"},model:{value:e.form.phone,callback:function(t){e.$set(e.form,"phone",t)},expression:"form.phone"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"出发地点",prop:"startPlace"}},[a("el-input",{attrs:{placeholder:"请输入出发地点"},model:{value:e.form.startPlace,callback:function(t){e.$set(e.form,"startPlace",t)},expression:"form.startPlace"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"到达地点",prop:"endPlace"}},[a("el-input",{attrs:{placeholder:"请输入到达地点"},model:{value:e.form.endPlace,callback:function(t){e.$set(e.form,"endPlace",t)},expression:"form.endPlace"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"出发时间",prop:"departureTime"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{clearable:"",size:"small",type:"datetime",placeholder:"选择出发时间"},model:{value:e.form.departureTime,callback:function(t){e.$set(e.form,"departureTime",t)},expression:"form.departureTime"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"人数",prop:"numberPeople"}},[a("el-input",{attrs:{placeholder:"请输入人数"},model:{value:e.form.numberPeople,callback:function(t){e.$set(e.form,"numberPeople",t)},expression:"form.numberPeople"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"说明",prop:"explain"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.explain,callback:function(t){e.$set(e.form,"explain",t)},expression:"form.explain"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"单价",prop:"unitPrice"}},[a("el-input",{attrs:{placeholder:"请输入单价"},model:{value:e.form.unitPrice,callback:function(t){e.$set(e.form,"unitPrice",t)},expression:"form.unitPrice"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"总价",prop:"price"}},[a("el-input",{attrs:{placeholder:"请输入总价"},model:{value:e.form.price,callback:function(t){e.$set(e.form,"price",t)},expression:"form.price"}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),e._v(" "),a("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},[],!1,null,null,null);s.options.__file="index.vue";t.default=s.exports}}]);