2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-583070e3","chunk-fcd760a4"],{35495:function(e,t,n){},"430d":function(e,t,n){},"4fb4":function(e,t,n){"use strict";var i=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.form.qrcodeName,visible:e.visible,width:"400px"},on:{"update:visible":function(t){e.visible=t},close:e.handleClose}},[t("div",{staticClass:"text-center"},[t("div",{staticStyle:{width:"200px",height:"200px",margin:"0 auto"},attrs:{id:"qrcode"}}),t("p",{staticStyle:{margin:"15px 0","font-size":"16px","font-weight":"bold"}},[e._v(" "+e._s(e.form.qrcodeName)+" ")]),t("p",{staticStyle:{color:"#999"}},[e._v(" "+e._s(e.form.remark)+" ")])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.visible=!1}}},[e._v(" "+e._s(e.$t("common.close"))+" ")])],1)])},r=[],o=n("d044"),s=n.n(o),a={name:"ViewQrcode",data(){return{visible:!1,form:{qrcodeName:"",qrCodeUrl:"",remark:""},qrcode:null}},methods:{open(e){this.visible=!0,this.form={...e},this.$nextTick(()=>{this.generateQRCode()})},handleClose(){this.qrcode&&(this.qrcode.clear(),document.getElementById("qrcode").innerHTML=""),this.form={qrcodeName:"",qrCodeUrl:"",remark:""}},generateQRCode(){this.qrcode&&(this.qrcode.clear(),document.getElementById("qrcode").innerHTML=""),this.form.qrCodeUrl&&(this.qrcode=new s.a(document.getElementById("qrcode"),{text:this.form.qrCodeUrl,width:200,height:200,colorDark:"#000000",colorLight:"#ffffff",correctLevel:s.a.CorrectLevel.L}))}},beforeDestroy(){this.qrcode&&this.qrcode.clear()}},l=a,d=(n("5cbf"),n("2877")),c=Object(d["a"])(l,i,r,!1,null,"b2ac6c9c",null);t["a"]=c.exports},"567f":function(e,t,n){"use strict";n("8df3")},"5cbf":function(e,t,n){"use strict";n("430d")},"696b":function(e,t,n){"use strict";n("35495")},"86f1":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("div",[t("el-row",{attrs:{gutter:15}},[t("el-col",{staticClass:"padding-r-0",attrs:{span:4}},[t("admin-shop",{on:{"shop-change":e.handleShopChange}})],1),t("el-col",{attrs:{span:20}},[t("el-card",[t("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.$t("adminServ.queryCondition")))])]),t("div",{},[t("el-form",{staticClass:"flex justify-start",attrs:{inline:!0,model:e.adminServInfo.conditions}},[t("el-form-item",[t("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("adminServ.inputServName"),clearable:""},model:{value:e.adminServInfo.conditions.servName,callback:function(t){e.$set(e.adminServInfo.conditions,"servName",t)},expression:"adminServInfo.conditions.servName"}})],1),t("el-form-item",[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("adminServ.selectServiceType"),clearable:""},model:{value:e.adminServInfo.conditions.hktId,callback:function(t){e.$set(e.adminServInfo.conditions,"hktId",t)},expression:"adminServInfo.conditions.hktId"}},e._l(e.adminServInfo.housekeepingTypes,(function(e){return t("el-option",{key:e.hktId,attrs:{label:e.hktName,value:e.hktId}})})),1)],1),t("el-form-item",[t("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e._queryAdminServMethod}},[e._v(e._s(e.$t("adminServ.query")))])],1)],1)],1)]),t("el-card",{staticClass:"margin-top-sm"},[t("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.$t("adminServ.onShelvesService")))])]),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.adminServInfo.housekeepingServs,border:""}},[t("el-table-column",{attrs:{prop:"shopName",label:e.$t("adminServ.shop"),align:"center",width:"120"}}),t("el-table-column",{attrs:{prop:"servId",label:e.$t("adminServ.serviceNumber"),align:"center",width:"120"}}),t("el-table-column",{attrs:{prop:"servName",label:e.$t("adminServ.serviceName"),align:"center",width:"150"}}),t("el-table-column",{attrs:{prop:"hktName",label:e.$t("adminServ.serviceType"),align:"center",width:"120"}}),t("el-table-column",{attrs:{prop:"repairWay",label:e.$t("adminServ.dispatchMethod"),align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(n){return["100"===n.row.repairWay?t("span",[e._v(e._s(e.$t("adminServ.grabOrder")))]):"200"===n.row.repairWay?t("span",[e._v(e._s(e.$t("adminServ.assign")))]):"300"===n.row.repairWay?t("span",[e._v(e._s(e.$t("adminServ.roundRobin")))]):e._e()]}}])}),t("el-table-column",{attrs:{prop:"returnVisitFlag",label:e.$t("adminServ.returnVisitMethod"),align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(n){return["001"===n.row.returnVisitFlag?t("span",[e._v(e._s(e.$t("adminServ.noReturnVisit")))]):"002"===n.row.returnVisitFlag?t("span",[e._v(e._s(e.$t("adminServ.noReturnVisitAfterComment")))]):"003"===n.row.returnVisitFlag?t("span",[e._v(e._s(e.$t("adminServ.allReturnVisit")))]):e._e()]}}])}),t("el-table-column",{attrs:{prop:"sales",label:e.$t("adminServ.salesVolume"),align:"center",width:"100"}}),t("el-table-column",{attrs:{prop:"defaultFee",label:e.$t("adminServ.defaultFee"),align:"center",width:"120"}}),t("el-table-column",{attrs:{prop:"sort",label:e.$t("adminServ.sort"),align:"center",width:"80"}}),t("el-table-column",{attrs:{prop:"state",label:e.$t("adminServ.shelvesStatus"),align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s("1001"===t.row.state?e.$t("adminServ.notOnShelves"):e.$t("adminServ.onShelves"))+" ")]}}])}),t("el-table-column",{attrs:{prop:"createTime",label:e.$t("adminServ.shelvesTime"),align:"center",width:"180"}}),t("el-table-column",{attrs:{label:e.$t("adminServ.operation"),align:"center",width:"180"},scopedSlots:e._u([{key:"default",fn:function(n){return[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._viewServDetail(n.row)}}},[e._v(e._s(e.$t("adminServ.view")))]),t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e._openDeleteAdminServModel(n.row)}}},[e._v(e._s(e.$t("adminServ.delete")))])]}}])})],1),t("el-pagination",{attrs:{"current-page":e.adminServInfo.conditions.page,"page-size":e.adminServInfo.conditions.row,layout:"total, prev, pager, next",total:e.adminServInfo.total},on:{"current-change":e.handleCurrentChange}})],1)],1)],1),t("delete-admin-serv",{ref:"deleteAdminServ",on:{refresh:e._listAdminServs}}),t("view-qrcode",{ref:"viewQrcode"})],1)},r=[],o=n("7323"),s=n("b775");function a(e){return new Promise((t,n)=>{Object(s["a"])({url:"/housekeepingServ.queryAdminServ",method:"get",params:e}).then(e=>{const n=e.data;t(n)}).catch(e=>{n(e)})})}function l(e){return new Promise((t,n)=>{Object(s["a"])({url:"/housekeepingType.queryHousekeepingType",method:"get",params:e}).then(e=>{const n=e.data;t(n)}).catch(e=>{n(e)})})}var d=n("c962"),c=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("deleteAdminServ.confirmOperation"),visible:e.dialogVisible,width:"30%",center:""},on:{"update:visible":function(t){e.dialogVisible=t}}},[t("div",{attrs:{align:"center"}},[t("p",[e._v(e._s(e.$t("deleteAdminServ.confirmDeleteService")))])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.closeDeleteAdminServModel}},[e._v(e._s(e.$t("deleteAdminServ.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.deleteAdminServ}},[e._v(e._s(e.$t("deleteAdminServ.confirmDelete")))])],1)])},m=[];function h(e){return new Promise((t,n)=>{Object(s["a"])({url:"/housekeepingServ.deleteAdminServ",method:"post",data:e,emulateJSON:!0}).then(e=>{const n=e.data;t(n)}).catch(e=>{n(e)})})}var p={name:"DeleteAdminServ",data(){return{dialogVisible:!1,deleteAdminServInfo:{}}},methods:{open(e){this.deleteAdminServInfo=e,this.dialogVisible=!0},async deleteAdminServ(){try{const e=await h(this.deleteAdminServInfo);0===e.code?(this.$message.success(e.msg),this.dialogVisible=!1,this.$emit("refresh")):this.$message.error(e.msg)}catch(e){console.error("删除服务失败:",e),this.$message.error("删除服务失败")}},closeDeleteAdminServModel(){this.dialogVisible=!1}}},v=p,u=(n("567f"),n("2877")),f=Object(u["a"])(v,c,m,!1,null,"907c32ba",null),S=f.exports,g=n("4fb4"),b={name:"AdminServ",components:{AdminShop:d["default"],DeleteAdminServ:S,ViewQrcode:g["a"]},data(){return{adminServInfo:{housekeepingServs:[],total:0,records:1,moreCondition:!1,servId:"",componentShow:"adminServ",housekeepingTypes:[],conditions:{repairWay:"",servName:"",hktId:"",state:"2002",createTime:"",shopId:"",page:1,row:10}}}},created(){this._listAdminServs(),this._listHousekeepingTypes()},methods:{handleShopChange(e){this.adminServInfo.conditions.shopId=e.shopId,this._listAdminServs()},handleCurrentChange(e){this.adminServInfo.conditions.page=e,this._listAdminServs()},async _listHousekeepingTypes(){try{const e={page:1,row:50,typeCd:1001,shopId:Object(o["f"])()},t=await l(e);this.adminServInfo.housekeepingTypes=t.data}catch(e){console.error("获取家政服务类型失败:",e)}},async _listAdminServs(){try{const e=await a(this.adminServInfo.conditions);this.adminServInfo.total=e.total,this.adminServInfo.records=e.records,this.adminServInfo.housekeepingServs=e.data}catch(e){console.error("获取家政服务列表失败:",e)}},_queryAdminServMethod(){this.adminServInfo.conditions.page=1,this._listAdminServs()},_openDeleteAdminServModel(e){this.$refs.deleteAdminServ.open(e)},_viewServDetail(e){console.log(this.adminServInfo.moreCondition),this.$refs.viewQrcode.open({qrcodeName:e.servName,qrCodeUrl:e.pageUrl,remark:this.$t("adminServ.scanToViewService")})}}},_=b,w=(n("696b"),Object(u["a"])(_,i,r,!1,null,"4c23a3f0",null));t["default"]=w.exports},"8df3":function(e,t,n){},9418:function(e,t,n){"use strict";n("cd80")},c962:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return t("el-card",{staticClass:"list-selector"},[t("ul",{staticClass:"list-selector-list"},["Y"==e.showAll?t("li",{class:{selected:""===e.adminShopInfo.shopId},on:{click:function(t){return e.swatchAdminShopId({shopId:"",shopName:"全部"})}}},[e._v(" "+e._s(e.$t("common.all"))+" ")]):e._e(),e._l(e.adminShopInfo.shops,(function(n,i){return t("li",{key:i,class:{selected:e.adminShopInfo.shopId===n.shopId},on:{click:function(t){return e.swatchAdminShopId(n)}}},[e._v(" "+e._s(n.shopName)+" ")])}))],2)])},r=[],o=n("7323"),s={name:"AdminShop",data(){return{adminShopInfo:{shops:[],shopId:""}}},props:{showAll:{type:String,default:"Y"}},created(){this._listAdminShops()},methods:{async _listAdminShops(){try{const e=await Object(o["k"])({page:1,row:100});this.adminShopInfo.shops=e.data,"N"==this.showAll&&this.adminShopInfo.shops.length>0&&this.swatchAdminShopId(this.adminShopInfo.shops[0])}catch(e){console.error("获取店铺列表失败:",e)}},swatchAdminShopId(e){this.adminShopInfo.shopId=e.shopId,this.$emit("shop-change",e)}}},a=s,l=(n("9418"),n("2877")),d=Object(l["a"])(a,i,r,!1,null,"177c0c26",null);t["default"]=d.exports},cd80:function(e,t,n){}}]);
|
|
//# sourceMappingURL=chunk-583070e3.48dd781d.js.map
|