Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-2d0bd5c9.929d3241.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
3.8 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0bd5c9"],{"2c57":function(e,s,t){"use strict";t.r(s);var o=function(){var e=this,s=e._self._c;return s("el-dialog",{attrs:{title:"工单派单",visible:e.dialogVisible,width:"60%","before-close":e.handleClose},on:{"update:visible":function(s){e.dialogVisible=s}}},[s("el-form",{attrs:{model:e.dispatchHousekeepingInfo,"label-width":"120px"}},["BACK"==e.dispatchHousekeepingInfo.action?s("el-form-item",{attrs:{label:"上级处理人"}},[s("el-input",{attrs:{placeholder:"必填,请填写上级处理人",disabled:""},model:{value:e.dispatchHousekeepingInfo.staffName,callback:function(s){e.$set(e.dispatchHousekeepingInfo,"staffName",s)},expression:"dispatchHousekeepingInfo.staffName"}})],1):s("el-form-item",{attrs:{label:"工单师傅"}},[s("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请选择工单师傅"},model:{value:e.dispatchHousekeepingInfo.staffId,callback:function(s){e.$set(e.dispatchHousekeepingInfo,"staffId",s)},expression:"dispatchHousekeepingInfo.staffId"}},[s("el-option",{attrs:{disabled:"",value:"",label:"必填,请选择工单师傅"}}),e._l(e.dispatchHousekeepingInfo.servUsers,(function(e,t){return s("el-option",{key:t,attrs:{label:e.staffName,value:e.staffId}})}))],2)],1),s("el-form-item",{attrs:{label:"处理意见"}},[s("el-input",{attrs:{type:"textarea",rows:3,placeholder:"必填,请填写处理意见"},model:{value:e.dispatchHousekeepingInfo.context,callback:function(s){e.$set(e.dispatchHousekeepingInfo,"context",s)},expression:"dispatchHousekeepingInfo.context"}})],1)],1),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:e.handleClose}},[e._v("取 消")]),s("el-button",{attrs:{type:"primary"},on:{click:e._dispatchHousekeepingInfo}},[e._v("确 定")])],1)],1)},i=[],a=t("7323"),n=t("7080"),p={name:"DispatchHousekeeping",data(){return{dialogVisible:!1,dispatchHousekeepingInfo:{poolId:"",servId:"",staffId:"",staffName:"",context:"",action:"",servUsers:[],shopId:""}}},methods:{open(e){this.dispatchHousekeepingInfo={...this.dispatchHousekeepingInfo,servId:e.servId,poolId:e.poolId,action:e.action},"BACK"==e.action&&(this.dispatchHousekeepingInfo.staffId=e.preStaffId,this.dispatchHousekeepingInfo.staffName=e.preStaffName),this._listServUsers(),this.dialogVisible=!0},handleClose(){this.dialogVisible=!1,this.clearDispatchHousekeepingInfo()},async _listServUsers(){const e={page:1,row:50,shopId:Object(a["f"])(),servId:this.dispatchHousekeepingInfo.servId,state:"9999"};try{const s=await Object(n["c"])(e);this.dispatchHousekeepingInfo.servUsers=s.data}catch(s){console.error("获取服务人员失败:",s)}},dispatchHousekeepingValidate(){return this.dispatchHousekeepingInfo.poolId?this.dispatchHousekeepingInfo.staffId||this.dispatchHousekeepingInfo.staffName?!!this.dispatchHousekeepingInfo.context||(this.$message.error("处理意见不能为空"),!1):(this.$message.error("报修师傅不能为空"),!1):(this.$message.error("报修单不能为空"),!1)},async _dispatchHousekeepingInfo(){if(this.dispatchHousekeepingValidate()){this.dispatchHousekeepingInfo.servUsers.forEach(e=>{e.staffId==this.dispatchHousekeepingInfo.staffId&&(this.dispatchHousekeepingInfo.staffName=e.staffName)}),this.dispatchHousekeepingInfo.shopId=Object(a["f"])();try{const e=await Object(n["b"])(this.dispatchHousekeepingInfo);0===e.code?(this.$message.success("操作成功"),this.handleClose(),this.$emit("dispatch-success")):this.$message.error(e.msg)}catch(e){console.error("请求失败:",e),this.$message.error("操作失败")}}},clearDispatchHousekeepingInfo(){this.dispatchHousekeepingInfo={poolId:"",servId:"",staffId:"",staffName:"",context:"",action:"",servUsers:[],shopId:""}}}},c=p,l=t("2877"),f=Object(l["a"])(c,o,i,!1,null,null,null);s["default"]=f.exports}}]);
//# sourceMappingURL=chunk-2d0bd5c9.929d3241.js.map