2 lines
4.6 KiB
JavaScript
2 lines
4.6 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0815965a"],{"3d15":function(e,s,t){"use strict";t("b896")},7617:function(e,s,t){"use strict";t.r(s);var r=function(){var e=this,s=e._self._c;return s("div",[s("el-row",[s("el-col",{attrs:{span:24}},[s("el-card",{staticClass:"box-card"},[s("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[s("span",[e._v(e._s(e.housekeepingServUserManageInfo.servName)+"师傅")]),s("div",[s("el-button",{attrs:{type:"primary",size:"small"},on:{click:e._openAddRepairTypeUserModal}},[s("i",{staticClass:"el-icon-plus"}),e._v("添加 ")]),s("el-button",{attrs:{type:"primary",size:"small"},on:{click:e._goBack}},[s("i",{staticClass:"el-icon-close"}),e._v("返回 ")])],1)]),s("el-table",{staticStyle:{width:"100%"},attrs:{data:e.housekeepingServUserManageInfo.housekeepingServUsers,border:"",stripe:""}},[s("el-table-column",{attrs:{prop:"staffName",label:"员工名称",align:"center"}}),s("el-table-column",{attrs:{prop:"state",label:"员工状态",align:"center"},scopedSlots:e._u([{key:"default",fn:function(s){return[e._v(" "+e._s("9999"==s.row.state?"在线":"离线")+" ")]}}])}),s("el-table-column",{attrs:{prop:"remark",label:"描述",align:"center"}}),s("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(s){return e._openDeleteHousekeepingServUserModel(t.row)}}},[e._v("删除 ")])]}}])})],1),s("el-pagination",{staticStyle:{"margin-top":"20px","text-align":"center"},attrs:{"current-page":e.currentPage,"page-size":e.pageSize,layout:"total, prev, pager, next, jumper",total:e.housekeepingServUserManageInfo.total},on:{"current-change":e.handleCurrentChange}})],1)],1)],1),s("delete-housekeeping-serv-user",{ref:"deleteHousekeepingServUser",on:{refresh:function(s){return e.query()}}}),s("select-staff",{ref:"selectStaff"})],1)},n=[],a=t("e9f8"),o=t("7323"),i={name:"HousekeepingServUserManage",components:{"delete-housekeeping-serv-user":()=>t.e("chunk-2d0f0406").then(t.bind(null,"9c28")),"select-staff":()=>t.e("chunk-09ecc94b").then(t.bind(null,"d719"))},data(){return{housekeepingServUserManageInfo:{housekeepingServUsers:[],total:0,records:1,servName:"",servId:"",conditions:{state:"",shopId:""}},currentPage:1,pageSize:10,shopId:""}},created(){this.shopId=Object(o["f"])(),this.housekeepingServUserManageInfo.conditions.shopId=this.shopId,this.housekeepingServUserManageInfo.servId=this.$route.query.servId,this.housekeepingServUserManageInfo.servName=this.$route.query.servName,this._listHousekeepingServUsers(1,this.pageSize)},methods:{handleCurrentChange(e){this.currentPage=e,this._listHousekeepingServUsers(e,this.pageSize)},query(){this._listHousekeepingServUsers(this.currentPage,this.pageSize)},async _listHousekeepingServUsers(e,s){try{const t={...this.housekeepingServUserManageInfo.conditions,page:e,row:s},r=await Object(a["b"])(t);this.housekeepingServUserManageInfo.total=r.total,this.housekeepingServUserManageInfo.records=r.records,this.housekeepingServUserManageInfo.housekeepingServUsers=r.data}catch(t){console.error("请求失败:",t)}},_openAddRepairTypeUserModal(){this.$refs.selectStaff.open({call:e=>{this.saveHousekeepingServUserInfo(e)}})},async saveHousekeepingServUserInfo(e){try{const s={shopId:this.shopId,staffId:e.staffId,staffName:e.staffName,servId:this.housekeepingServUserManageInfo.servId,state:"9999"},t=await Object(a["c"])(s);0===t.code?(this.$message.success("添加成功"),this._listHousekeepingServUsers(this.currentPage,this.pageSize)):this.$message.error(t.msg)}catch(s){console.error("请求失败:",s),this.$message.error("添加失败")}},_openDeleteHousekeepingServUserModel(e){this.$refs.deleteHousekeepingServUser.open(e)},_goBack(){this.$router.go(-1)}}},u=i,c=(t("3d15"),t("2877")),l=Object(c["a"])(u,r,n,!1,null,"5d2219c2",null);s["default"]=l.exports},b896:function(e,s,t){},e9f8:function(e,s,t){"use strict";t.d(s,"b",(function(){return n})),t.d(s,"c",(function(){return a})),t.d(s,"a",(function(){return o}));var r=t("b775");function n(e){return new Promise((s,t)=>{Object(r["a"])({url:"/housekeepingServUser/queryHousekeepingServUser",method:"get",params:e}).then(e=>{const t=e.data;s(t)}).catch(e=>{t(e)})})}function a(e){return new Promise((s,t)=>{Object(r["a"])({url:"/housekeepingServUser/saveHousekeepingServUser",method:"post",data:e}).then(e=>{const t=e.data;s(t)}).catch(e=>{t(e)})})}function o(e){return new Promise((s,t)=>{Object(r["a"])({url:"/housekeepingServUser/deleteHousekeepingServUser",method:"post",data:e}).then(e=>{const t=e.data;s(t)}).catch(e=>{t(e)})})}}}]);
|
|
//# sourceMappingURL=chunk-0815965a.fd4e7149.js.map
|