(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5bcbbd4e"],{"1df9":function(e,t,o){},f214:function(e,t,o){"use strict";o("1df9")},fdd8:function(e,t,o){"use strict";o.r(t);var r=function(){var e=this,t=e._self._c;return t("div",[t("el-row",[t("el-col",{attrs:{span:24}},[t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.housekeepingServPoolPayOrderInfo.servName)+"待支付")]),t("div",[t("el-button",{attrs:{type:"primary",size:"small"},on:{click:e._back}},[e._v("返回")])],1)]),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.housekeepingServPoolPayOrderInfo.fees,border:"",stripe:""}},[t("el-table-column",{attrs:{prop:"typeName",label:"费用大类",align:"center"}}),t("el-table-column",{attrs:{prop:"feeName",label:"费用名称",align:"center"}}),t("el-table-column",{attrs:{prop:"price",label:"收费金额",align:"center"}}),t("el-table-column",{attrs:{prop:"payPrice",label:"实收金额",align:"center"}}),t("el-table-column",{attrs:{label:"状态",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s("1001"==t.row.state?"未支付":"已支付")+" ")]}}])})],1)],1)],1)],1),t("el-row",[t("el-col",{attrs:{span:18}}),t("el-col",{attrs:{span:4}},[t("div",{staticStyle:{"text-align":"right","line-height":"60px"}},[e._v(" 缴费金额:"),t("span",{staticStyle:{"font-size":"30px",color:"red"}},[e._v(e._s(e.housekeepingServPoolPayOrderInfo.feePrices)+"元")])])]),t("el-col",{attrs:{span:2}},[t("el-button",{staticStyle:{width:"100%","margin-bottom":"10px"},attrs:{type:"warning",size:"large"},on:{click:e._payFee}},[e._v(" 缴费 ")])],1)],1),t("el-dialog",{attrs:{title:"缴费二维码",visible:e.qrDialogVisible,width:"30%",center:""},on:{"update:visible":function(t){e.qrDialogVisible=t}}},[t("div",{staticClass:"text-center"},[t("div",{staticStyle:{width:"200px",height:"200px",margin:"0 auto"},attrs:{id:"qrcode"}})]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{type:"success"},on:{click:e._back}},[e._v("支付完成")])],1)])],1)},a=[],s=o("7323"),l=o("b775");function i(e){return new Promise((t,o)=>{Object(l["a"])({url:"/storeOrder.queryStoreOrderCartFee",method:"get",params:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function n(e){return new Promise((t,o)=>{Object(l["a"])({url:"/payment/toQrServFeePay",method:"post",data:e,headers:{"Content-Type":"application/json"}}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}var c={name:"HousekeepingServPoolPayOrder",data(){return{qrDialogVisible:!1,housekeepingServPoolPayOrderInfo:{fees:[],poolId:"",servName:"",feePrices:0,codeUrl:""}}},created(){this.housekeepingServPoolPayOrderInfo.poolId=this.$route.query.poolId,this.housekeepingServPoolPayOrderInfo.servName=this.$route.query.servName,this._loadPoolFees()},methods:{async _loadPoolFees(){try{const e={page:1,row:50,state:"1001",poolId:this.housekeepingServPoolPayOrderInfo.poolId,shopId:Object(s["f"])()},t=await i(e);let o=0;t.data.forEach(e=>{o+=parseFloat(e.payPrice)}),this.housekeepingServPoolPayOrderInfo.feePrices=o,this.housekeepingServPoolPayOrderInfo.fees=t.data}catch(e){console.error("请求失败:",e)}},async _payFee(){try{const e={shopId:Object(s["f"])(),poolId:this.housekeepingServPoolPayOrderInfo.poolId},t=await n(e);if(0===t.code)return this.housekeepingServPoolPayOrderInfo.codeUrl=t.codeUrl,this._viewQr(t.codeUrl),this.qrDialogVisible=!0,void this.$message.success(t.msg);this.$message.error(t.msg)}catch(e){console.error("请求失败:",e),this.$message.error("支付请求失败")}},_back(){this.qrDialogVisible=!1,this.$router.go(-1)},_viewQr(e){document.getElementById("qrcode").innerHTML="";let t=new Window.QRCode(document.getElementById("qrcode"),{text:"服务费用",width:200,height:200,colorDark:"#000000",colorLight:"#ffffff",correctLevel:window.QRCode.CorrectLevel.H});t.makeCode(e)}}},d=c,p=(o("f214"),o("2877")),h=Object(p["a"])(d,r,a,!1,null,"ffedd9ea",null);t["default"]=h.exports}}]); //# sourceMappingURL=chunk-5bcbbd4e.c4fc7b5f.js.map