2 lines
18 KiB
JavaScript
2 lines
18 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-76e2d9ee"],{5267:function(e,t,o){"use strict";o.d(t,"b",(function(){return n})),o.d(t,"d",(function(){return a})),o.d(t,"a",(function(){return i}));var s=o("b775");function n(e){return new Promise((t,o)=>{Object(s["a"])({url:"/housekeepingServ.queryHousekeepingServ",method:"get",params:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function a(e){return new Promise((t,o)=>{Object(s["a"])({url:"/housekeepingServ.saveHousekeepingServ",method:"post",data:e}).then(e=>{const s=e.data;0===s.code?t(s):o(s.msg)}).catch(e=>{o(e)})})}function i(e){return new Promise((t,o)=>{Object(s["a"])({url:"/housekeepingServ.deleteHousekeepingServ",method:"post",data:{servId:e}}).then(e=>{const s=e.data;0===s.code?t(s):o(s.msg)}).catch(e=>{o(e)})})}},"68e1":function(e,t,o){"use strict";o.d(t,"b",(function(){return n})),o.d(t,"c",(function(){return a})),o.d(t,"d",(function(){return i})),o.d(t,"a",(function(){return r}));var s=o("b775");function n(e){return new Promise((t,o)=>{Object(s["a"])({url:"/housekeepingType.queryHousekeepingType",method:"get",params:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function a(e){return new Promise((t,o)=>{Object(s["a"])({url:"/housekeepingType.saveHousekeepingType",method:"post",data:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function i(e){return new Promise((t,o)=>{Object(s["a"])({url:"/housekeepingType.updateHousekeepingType",method:"post",data:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function r(e){return new Promise((t,o)=>{Object(s["a"])({url:"/housekeepingType.deleteHousekeepingType",method:"post",data:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}},b43e:function(e,t,o){"use strict";o("eb3c")},e9f8:function(e,t,o){"use strict";o.d(t,"b",(function(){return n})),o.d(t,"c",(function(){return a})),o.d(t,"a",(function(){return i}));var s=o("b775");function n(e){return new Promise((t,o)=>{Object(s["a"])({url:"/housekeepingServUser/queryHousekeepingServUser",method:"get",params:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function a(e){return new Promise((t,o)=>{Object(s["a"])({url:"/housekeepingServUser/saveHousekeepingServUser",method:"post",data:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function i(e){return new Promise((t,o)=>{Object(s["a"])({url:"/housekeepingServUser/deleteHousekeepingServUser",method:"post",data:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}},eb3c:function(e,t,o){},f3cf:function(e,t,o){"use strict";o.r(t);var s=function(){var e=this,t=e._self._c;return t("div",[t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:3}},[t("el-card",{staticClass:"list-selector"},[t("ul",{staticClass:"list-selector-list"},[t("li",{class:{selected:""===e.housekeepingServPoolManageInfo.conditions.state},on:{click:function(t){return e.handleStateSelect("")}}},[e._v(" 全部 ")]),e._l(e.housekeepingServPoolManageInfo.states,(function(o,s){return t("li",{key:s,class:{selected:e.housekeepingServPoolManageInfo.conditions.state===o.statusCd},on:{click:function(t){return e.handleStateSelect(o.statusCd)}}},[e._v(" "+e._s(o.name)+" ")])}))],2)])],1),t("el-col",{attrs:{span:21}},[t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v("查询条件")])]),t("el-form",{staticClass:"flex justify-start",attrs:{inline:!0,model:e.housekeepingServPoolManageInfo.conditions}},[t("el-form-item",[t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入服务名称"},model:{value:e.housekeepingServPoolManageInfo.conditions.servName,callback:function(t){e.$set(e.housekeepingServPoolManageInfo.conditions,"servName",t)},expression:"housekeepingServPoolManageInfo.conditions.servName"}})],1)],1),t("el-form-item",[t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入申请人"},model:{value:e.housekeepingServPoolManageInfo.conditions.applyName,callback:function(t){e.$set(e.housekeepingServPoolManageInfo.conditions,"applyName",t)},expression:"housekeepingServPoolManageInfo.conditions.applyName"}})],1)],1),t("el-form-item",[t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入联系电话"},model:{value:e.housekeepingServPoolManageInfo.conditions.applyTel,callback:function(t){e.$set(e.housekeepingServPoolManageInfo.conditions,"applyTel",t)},expression:"housekeepingServPoolManageInfo.conditions.applyTel"}})],1)],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e._queryHousekeepingServPoolMethod()}}},[t("i",{staticClass:"el-icon-search"}),e._v(" 查询 ")]),t("el-button",{on:{click:function(t){return e._resetHousekeepingServPoolMethod()}}},[t("i",{staticClass:"el-icon-refresh"}),e._v(" 重置 ")])],1)],1)],1),t("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"20px"}},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v("服务工单池")]),t("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"primary"},on:{click:function(t){return e._openAddTelSerModal()}}},[t("i",{staticClass:"el-icon-plus"}),e._v("服务登记 ")])],1),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.housekeepingServPoolManageInfo.housekeepingServPools,border:""}},[t("el-table-column",{attrs:{prop:"servName",label:"服务名称",align:"center"}}),t("el-table-column",{attrs:{prop:"cartId",label:"订单编号",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s("-1"==t.row.cartId?"电话预约":t.row.cartId)+" ")]}}])}),t("el-table-column",{attrs:{prop:"applyName",label:"申请人",align:"center"}}),t("el-table-column",{attrs:{prop:"applyTel",label:"联系方式",align:"center"}}),t("el-table-column",{attrs:{prop:"appointmentTime",label:"预约时间",align:"center"}}),t("el-table-column",{attrs:{prop:"createTime",label:"申请时间",align:"center"}}),t("el-table-column",{attrs:{prop:"stateName",label:"状态",align:"center"}}),t("el-table-column",{attrs:{prop:"context",label:"备注",align:"center"}}),t("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(o){return["1000"==o.row.state&&"200"==o.row.repairWay?t("el-button",{attrs:{type:"text",size:"small"},on:{click:function(t){return e._openDispatchHousekeepingModel(o.row)}}},[e._v(" 指派 ")]):e._e(),t("el-button",{attrs:{type:"text",size:"small"},on:{click:function(t){return e._openDetail(o.row)}}},[e._v(" 详情 ")])]}}])})],1),t("el-pagination",{attrs:{"current-page":e.housekeepingServPoolManageInfo.conditions.page,"page-size":e.housekeepingServPoolManageInfo.conditions.row,layout:"total, prev, pager, next",total:e.housekeepingServPoolManageInfo.total},on:{"current-change":e.handleCurrentChange}})],1)],1)],1),t("add-owner-repair",{ref:"addOwnerRepair"}),t("dispatch-housekeeping",{ref:"dispatchHousekeeping"})],1)},n=[],a=o("7323"),i=o("b775");function r(e){return new Promise((t,o)=>{Object(i["a"])({url:"/housekeepingServPool/queryHousekeepingServPool",method:"get",params:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function l(e){return new Promise((t,o)=>{Object(i["a"])({url:"/housekeepingServPool.saveTelHousekeepingServ",method:"post",data:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function p(e){return new Promise((t,o)=>{Object(i["a"])({url:"/housekeepingServPoolUser.poolDispatch",method:"post",data:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}var c=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:"服务登记",visible:e.dialogVisible,width:"50%","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[t("el-form",{ref:"form",attrs:{model:e.addTelHousekeepingInfo,rules:e.rules,"label-width":"120px"}},[t("el-form-item",{attrs:{label:"服务类型",prop:"houseTypeId"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请选择服务类型"},on:{change:e.changeHouseType},model:{value:e.addTelHousekeepingInfo.houseTypeId,callback:function(t){e.$set(e.addTelHousekeepingInfo,"houseTypeId",t)},expression:"addTelHousekeepingInfo.houseTypeId"}},e._l(e.addTelHousekeepingInfo.repairSettings,(function(e,o){return t("el-option",{key:o,attrs:{label:e.hktName,value:e.hktId}})})),1)],1),t("el-form-item",{attrs:{label:"服务",prop:"servId"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请选择服务"},on:{change:e.changeSer},model:{value:e.addTelHousekeepingInfo.servId,callback:function(t){e.$set(e.addTelHousekeepingInfo,"servId",t)},expression:"addTelHousekeepingInfo.servId"}},e._l(e.addTelHousekeepingInfo.housekeepingServs,(function(e,o){return t("el-option",{key:o,attrs:{label:e.servName,value:e.servId}})})),1)],1),t("el-form-item",{attrs:{label:"报修人",prop:"applyName"}},[t("el-input",{attrs:{placeholder:"必填,请填写报修人"},model:{value:e.addTelHousekeepingInfo.applyName,callback:function(t){e.$set(e.addTelHousekeepingInfo,"applyName",t)},expression:"addTelHousekeepingInfo.applyName"}})],1),t("el-form-item",{attrs:{label:"联系方式",prop:"applyTel"}},[t("el-input",{attrs:{placeholder:"必填,请填写联系方式",type:"number"},model:{value:e.addTelHousekeepingInfo.applyTel,callback:function(t){e.$set(e.addTelHousekeepingInfo,"applyTel",t)},expression:"addTelHousekeepingInfo.applyTel"}})],1),t("el-form-item",{attrs:{label:"预约时间",prop:"appointmentTime"}},[t("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"datetime",placeholder:"必填,请填写预约时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.addTelHousekeepingInfo.appointmentTime,callback:function(t){e.$set(e.addTelHousekeepingInfo,"appointmentTime",t)},expression:"addTelHousekeepingInfo.appointmentTime"}})],1),t("el-form-item",{attrs:{label:"报修内容",prop:"context"}},[t("el-input",{attrs:{type:"textarea",rows:3,placeholder:"必填,请填写报修内容"},model:{value:e.addTelHousekeepingInfo.context,callback:function(t){e.$set(e.addTelHousekeepingInfo,"context",t)},expression:"addTelHousekeepingInfo.context"}})],1)],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.handleClose}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.saveOwnerRepairInfo}},[e._v("提 交")])],1)],1)},d=[],u=o("68e1"),h=o("5267"),f={data(){return{dialogVisible:!1,addTelHousekeepingInfo:{poolId:"",houseTypeId:"",servId:"",servName:"",shopId:"",applyName:"",applyTel:"",appointmentTime:"",context:"",housekeepingServs:[],repairSettings:[]},rules:{servId:[{required:!0,message:"报修类型不能为空",trigger:"blur"}],applyName:[{required:!0,message:"报修人不能为空",trigger:"blur"},{min:2,max:50,message:"报修人名称必须在2至50字符之间",trigger:"blur"}],applyTel:[{required:!0,message:"联系方式不能为空",trigger:"blur"},{pattern:/^1[3-9]\d{9}$/,message:"联系方式格式不正确",trigger:"blur"}],appointmentTime:[{required:!0,message:"预约时间不能为空",trigger:"blur"}],context:[{required:!0,message:"报修内容不能为空",trigger:"blur"},{max:2e3,message:"报修内容不能超过2000字符",trigger:"blur"}]}}},methods:{open(e){this.dialogVisible=!0,this.addTelHousekeepingInfo.shopId=e.shopId,this._initAddOwnerRepairInfo(),this._listRepairSettings(1,50)},handleClose(){this.dialogVisible=!1,this.$refs.form.resetFields(),this.clearAddOwnerRepairInfo()},async saveOwnerRepairInfo(){this.$refs.form.validate(async e=>{if(e)try{await l(this.addTelHousekeepingInfo),this.$message.success("登记成功"),this.handleClose(),this.$emit("refresh")}catch(t){console.error("保存失败:",t)}})},clearAddOwnerRepairInfo(){const e=this.addTelHousekeepingInfo.repairSettings;this.addTelHousekeepingInfo={poolId:"",servId:"",houseTypeId:"",shopId:this.addTelHousekeepingInfo.shopId,servName:"",applyName:"",applyTel:"",appointmentTime:"",context:"",housekeepingServs:[],repairSettings:e}},_initAddOwnerRepairInfo(){this.addTelHousekeepingInfo.appointmentTime=new Date},async _listRepairSettings(e,t){try{const o=await Object(u["b"])({page:e,row:t,shopId:this.addTelHousekeepingInfo.shopId,typeCd:"1001"});this.addTelHousekeepingInfo.repairSettings=o.data}catch(o){console.error("请求失败:",o)}},async _listHousekeepingServs(e,t,o){try{const s=await Object(h["b"])({page:e,row:t,hktId:o,shopId:this.addTelHousekeepingInfo.shopId});this.addTelHousekeepingInfo.housekeepingServs=s.data}catch(s){console.error("请求失败:",s)}},changeHouseType(e){this._listHousekeepingServs(1,50,e)},changeSer(e){const t=this.addTelHousekeepingInfo.housekeepingServs.find(t=>t.servId===e);t&&(this.addTelHousekeepingInfo.servName=t.servName)}}},g=f,k=o("2877"),m=Object(k["a"])(g,c,d,!1,null,null,null),I=m.exports,v=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:"工单派单",visible:e.dialogVisible,width:"50%","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[t("el-form",{ref:"form",attrs:{model:e.dispatchHousekeepingInfo,rules:e.rules,"label-width":"120px"}},[t("el-form-item",{attrs:{label:"BACK"==e.dispatchHousekeepingInfo.action?"上级处理人":"工单师傅",prop:"staffId"}},["BACK"==e.dispatchHousekeepingInfo.action?t("el-input",{attrs:{placeholder:"必填,请填写上级处理人",disabled:""},model:{value:e.dispatchHousekeepingInfo.staffName,callback:function(t){e.$set(e.dispatchHousekeepingInfo,"staffName",t)},expression:"dispatchHousekeepingInfo.staffName"}}):t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请选择工单师傅"},model:{value:e.dispatchHousekeepingInfo.staffId,callback:function(t){e.$set(e.dispatchHousekeepingInfo,"staffId",t)},expression:"dispatchHousekeepingInfo.staffId"}},e._l(e.dispatchHousekeepingInfo.servUsers,(function(e,o){return t("el-option",{key:o,attrs:{label:e.staffName,value:e.staffId}})})),1)],1),t("el-form-item",{attrs:{label:"处理意见",prop:"context"}},[t("el-input",{attrs:{type:"textarea",rows:3,placeholder:"必填,请填写处理意见"},model:{value:e.dispatchHousekeepingInfo.context,callback:function(t){e.$set(e.dispatchHousekeepingInfo,"context",t)},expression:"dispatchHousekeepingInfo.context"}})],1)],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.handleClose}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:e._dispatchHousekeepingInfo}},[e._v("提 交")])],1)],1)},b=[],y=o("e9f8"),H={data(){return{dialogVisible:!1,dispatchHousekeepingInfo:{poolId:"",servId:"",staffId:"",staffName:"",context:"",action:"",servUsers:[]},rules:{staffId:[{required:!0,message:"报修师傅不能为空",trigger:"blur"}],context:[{required:!0,message:"处理意见不能为空",trigger:"blur"}]}}},methods:{open(e){this.dialogVisible=!0,this.dispatchHousekeepingInfo.shopId=Object(a["f"])(),this.dispatchHousekeepingInfo={...this.dispatchHousekeepingInfo,poolId:e.poolId,servId:e.servId,action:e.action},"BACK"==e.action&&(this.dispatchHousekeepingInfo.staffId=e.preStaffId,this.dispatchHousekeepingInfo.staffName=e.preStaffName),this._listServUsers()},handleClose(){this.dialogVisible=!1,this.$refs.form.resetFields(),this.clearDispatchHousekeepingInfo()},async _dispatchHousekeepingInfo(){this.$refs.form.validate(async e=>{if(e){if("BACK"!==this.dispatchHousekeepingInfo.action){const e=this.dispatchHousekeepingInfo.servUsers.find(e=>e.staffId===this.dispatchHousekeepingInfo.staffId);e&&(this.dispatchHousekeepingInfo.staffName=e.staffName)}try{await p(this.dispatchHousekeepingInfo),this.$message.success("操作成功"),this.handleClose(),this.$emit("refresh")}catch(t){console.error("请求失败:",t)}}})},clearDispatchHousekeepingInfo(){this.dispatchHousekeepingInfo={poolId:"",servId:"",staffId:"",staffName:"",context:"",action:"",servUsers:[]}},async _listServUsers(){try{const e=await Object(y["b"])({page:1,row:50,shopId:Object(a["f"])(),servId:this.dispatchHousekeepingInfo.servId,state:"9999"});this.dispatchHousekeepingInfo.servUsers=e.data}catch(e){console.error("请求失败:",e)}}}},S=H,T=Object(k["a"])(S,v,b,!1,null,null,null),w=T.exports,P={components:{AddOwnerRepair:I,DispatchHousekeeping:w},data(){return{housekeepingServPoolManageInfo:{housekeepingServPools:[],total:0,records:1,states:[],conditions:{servName:"",state:"",applyName:"",applyTel:"",shopId:"",page:1,row:10}}}},created(){this._initMethod()},methods:{_initMethod(){this._listHousekeepingServPools(1,10),this.getDictData()},async getDictData(){try{const{data:e}=await Object(a["e"])("housekeeping_serv_pool","state");this.housekeepingServPoolManageInfo.states=e}catch(e){console.error("获取字典数据失败:",e)}},async _listHousekeepingServPools(e,t){this.housekeepingServPoolManageInfo.conditions.page=e,this.housekeepingServPoolManageInfo.conditions.row=t;try{const e=await r(this.housekeepingServPoolManageInfo.conditions);this.housekeepingServPoolManageInfo.total=e.total,this.housekeepingServPoolManageInfo.records=e.records,this.housekeepingServPoolManageInfo.housekeepingServPools=e.data}catch(o){console.error("请求失败:",o)}},_queryHousekeepingServPoolMethod(){this._listHousekeepingServPools(1,10)},_resetHousekeepingServPoolMethod(){this.housekeepingServPoolManageInfo.conditions={servName:"",state:"",applyName:"",applyTel:"",shopId:"",page:1,row:10},this._listHousekeepingServPools(1,10)},_openAddTelSerModal(){this.$refs.addOwnerRepair.open(this.housekeepingServPoolManageInfo.conditions)},_openDispatchHousekeepingModel(e){e.action="DISPATCH",this.$refs.dispatchHousekeeping.open(e)},_openDetail(e){this.$router.push("/pages/housekeeping/housekeepingServDetail?poolId="+e.poolId)},handleCurrentChange(e){this._listHousekeepingServPools(e,10)},handleStateSelect(e){this.housekeepingServPoolManageInfo.conditions.state=e,this.housekeepingServPoolManageInfo.conditions.page=1,this._listHousekeepingServPools(1,this.housekeepingServPoolManageInfo.conditions.row)}}},_=P,x=(o("b43e"),Object(k["a"])(_,s,n,!1,null,"eef468a8",null));t["default"]=x.exports}}]);
|
|
//# sourceMappingURL=chunk-76e2d9ee.8f6cf572.js.map
|