|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6c587718"],{"49bb":function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"main-content"},[e._m(0),t("div",{staticClass:"content"},[t("div",{staticStyle:{width:"50px"}},[t("download-excel",{staticClass:"export-excel-wrapper",attrs:{fetch:e.fetchData,fields:e.json_fields,"before-finish":e.finishDownload,name:"家政服务记录.xls"}},[t("el-button",{attrs:{size:"mini",icon:"el-icon-folder-add",plain:""}},[e._v("导出Excel")])],1)],1),t("div",{},[t("VueTable",{ref:"table",attrs:{config:e.config},on:{tableCheck:e.tableCheck}},[t("template",{slot:"footer"},[t("div",{staticClass:"table-footer"})])],2)],1),t("Drawer",{attrs:{drawerTitle:"审核",drawerVrisible:e.add_vrisible},on:{drawerClose:e.addClose}},[t("div",{staticStyle:{padding:"30px"}},[t("FromCard",[t("template",{slot:"title"},[e._v("审核信息")]),[t("VueForm",{ref:"addForm",attrs:{formObj:e.addForm},scopedSlots:e._u([{key:"date",fn:function(){return[t("el-time-picker",{attrs:{"is-range":"","range-separator":"至","value-format":"HH:MM:SS","start-placeholder":"开始时间","end-placeholder":"结束时间",placeholder:"选择时间范围"},on:{change:e.dateTimeChange},model:{value:e.addDate,callback:function(t){e.addDate=t},expression:"addDate"}})]},proxy:!0}])},[t("template",{slot:"imgUrls"},[[t("el-upload",{attrs:{action:e.$baseUrl+"upload/uploadAnnouncement","on-success":e.ImgeSuccess,"file-list":e.imglist,"on-exceed":e.handleExceed,limit:1,accept:".jpg,.png,.JPG,.PNG","before-upload":e.beforeAvatarUpload}},[t("el-button",{attrs:{icon:"el-icon-edit",size:"small"}},[e._v("上传图片")]),t("span",{staticStyle:{"margin-left":"10px","font-size":"12px",color:"#444444"}},[e._v("建议比例:3:2")]),t("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t("span",[e._v("支持扩展名:png,jpg")])])],1)]],2)],2)]],2)],1),t("div",{attrs:{slot:"footer"},slot:"footer"},[t("button",{staticClass:"btn-orange",on:{click:function(t){return e.addSubmit()}}},[t("span",[t("i",{staticClass:"el-icon-circle-check"}),e._v("提交")])]),t("button",{staticClass:"btn-gray",on:{click:e.addClose}},[t("span",[e._v("取消")])])])])],1)])])},s=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"main-titel"},[t("span",[e._v("家政服务记录")])])}],r=a("662b"),o=a("2b74"),i={data(){return{add_vrisible:!1,addDate:null,addForm:{ruleForm:{},form_item:[{type:"Select",label:"审核状态",placeholder:"请选择",width:"100%",options:[{value:1,label:"通过"},{value:2,label:"不通过"}],prop:"status"},{type:"Slot",label:"图片上传",placeholder:"请输入",width:"100%",prop:"imgUrls",slotName:"imgUrls"},{type:"textarea",label:"备注",placeholder:"请输入",width:"50%",prop:"remakes"}]},table_row:[],imglist:[],activeName:"0",json_fields:{"申请人姓名":"proposerName","申请人手机号":"proposerTel","房屋名称":"roomName","服务类型":{field:"type",callback:e=>{switch(e){case 1:return"室内清洁";case 2:return"洗涤护理";default:break}}},"家政内容":"content","状态":{field:"status",callback:e=>{switch(e){case 1:return"待派单";case 2:return"已派单";case 3:return"处理中";case 4:return"待支付";case 5:return"待评价";case 6:return"已完成";case 9:return"已取消";default:break}}},"完成情况":{field:"completion",callback:e=>{switch(e){case 1:return"未完成";case 2:return"已完成";default:break}}},"处理人名称":"handlerName","处理人电话":"handlerTel","处理描述":"processDescription","处理时间":"handlingTime"},config:{thead:[{label:"序号",type:"index",width:"80"},{label:"申请人姓名",prop:"proposerName",width:"auto"},{label:"申请人手机号",prop:"proposerTel",width:"auto"},{label:"房屋名称",prop:"roomName",width:"auto"},{label:"服务类型",prop:"type",width:"auto",type:"function",callback:(e,t)=>{switch(e.type){case 1:return"室内清洁";case 2:return"洗涤护理";default:break}}},{label:"服务内容",prop:"content",width:"auto"},{label:"状态",prop:"status",width:"auto",type:"function",callback:(e,t)=>{switch(e.status){case 1:return"待派单";case 2:return"已派单";case 3:return"处理中";case 4:return"待支付";case 5:return"待评价";case 6:return"已完成";case 9:return"已取消";default:break}}},{label:"完成情况",prop:"completion",width:"auto",type:"function",callback:(e,t)=>{switch(e.completion){case 1:return"未完成";case 2:return"已完成";default:break}}},{label:"处理人名称",prop:"handlerName",width:"auto"},{label:"处理人电话",prop:"handlerTel",width:"auto"},{label:"处理描述",prop:"processDescription",width:"auto"},{label:"处理时间",prop:"handlingTime",width:"auto"}],table_data:[],url:"housekeepingServiceList",search_item:[{type:"select",label:"服务类型",placeholder:"选择服务类型",prop:"type",options:[{label:"室内清洁",value:1},{label:"洗涤护理",value:2}]},{type:"select",label:"状态",placeholder:"选择服务类型",prop:"status",options:[{label:"待派单",value:1},{label:"已派单",value:2},{label:"处理中",value:3},{label:"待支付",value:4},{label:"待评价",value:5},{label:"已完成",value:6},{label:"已取消",value:9}]}],data:{pageNum:1,size:10}}}},methods:{async fetchData(){let e={url:"housekeepingServiceList",data:{pageNum:1,size:100}};const t=await Object(r["a"])(e,this);return t},ExcelLoading(e,t){const a=this.$loading({lock:!0,text:"正在导出Excel"+e,spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});a.text=`正在导出Excel ${e}/${t}`,console.log(a.text)},finishDownload(){const e=this.$loading();e.close()},add(e){e.length>1?this.$message.error("只能操作一条数据"):e.length?1!==e[0].status?this.$message({message:"该审核已结束",type:"error"}):this.add_vrisible=!0:this.$message.error("请选择")},addClose(){this.$refs.addForm.reset(),this.add_vrisible=!1},addSubmit(){let e={...this.addForm.ruleForm,id:this.table_row[0].id};Object(o["e"])(e).then(e=>{e.status&&(this.$message({message:e.message,type:"success"}),this.$refs.table.loadData(),this.addClose())})},dateTimeChange(e){this.addForm.ruleForm.openStartDate=e[0],this.addForm.ruleForm.openEndDate=e[1]},handleClick(e,t){let a=null;a=0!=this.activeName?this.activeName:null;const l={pageNum:1,size:10,status:a};this.$refs.table.requestData(l)},tableCheck(e){this.table_row=e},del(e){if(e.length){let e=[];for(let t=0;t<this.table_row.length;t++)e.push(this.table_row[t].id);this.$confirm("是否确认删除?删除不可恢复","删除",{confirmButtonText:"确定",cancelButtonText:"取消",confirmButtonClass:"confirmButton",cancelButtonClass:"cancelButton"}).then(()=>{this.$refs.table.tableDelete(e)}).catch(e=>{})}else this.$message.error("请选中需要删除的数据")},ImgeSuccess(e,t){this.addForm.ruleForm.imgUrls[0]=t.response.url},beforeAvatarUpload(e){const t=e.size/1024/1024<2,a="image/png"===e.type,l="image/jpeg"===e.type;return a||l||this.$message.error("上传头像图片只能是 JPG/PNG 格式!"),t||this.$message.error("上传头像图片大小不能超过 2MB!"),(a||l)&&t},handleExceed(e,t){this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${e.length} 个文件,共选择了 ${e.length+t.length} 个文件`)}}},n=i,c=a("2877"),d=Object(c["a"])(n,l,s,!1,null,null,null);t["default"]=d.exports},"662b":function(e,t,a){"use strict";a.d(t,"a",(function(){return s})),a.d(t,"b",(function(){return r}));a("f2d9");var l=a("2b74");async function s(e,t){let a=[];const s=await Object(l["b"])(e);if(a.push(...s.tableList),s.pageCount>1)for(let r=1;r<s.pageCount;r++){e.pageNum=r+1;const o=await Object(l["b"])(e);t.ExcelLoading(r,s.pageCount),a.push(...o.tableList)}return a}async function r(e){let t=[];const a=await Object(l["b"])(e);return console.log(a),t.push(...a.tableList),t}}}]);
|