webpackJsonp([57],{ /***/ "DclD": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "qf+m": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js var stringify = __webpack_require__("mvHQ"); var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify); // EXTERNAL MODULE: ./src/api/index.js + 5 modules var api = __webpack_require__("gyMJ"); // EXTERNAL MODULE: ./src/common/echart/index.vue + 4 modules var echart = __webpack_require__("C3+4"); // EXTERNAL MODULE: ./node_modules/moment/moment.js var moment = __webpack_require__("PJh5"); var moment_default = /*#__PURE__*/__webpack_require__.n(moment); // EXTERNAL MODULE: ./src/utils/util.js var util = __webpack_require__("oFuF"); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/rechargeManagement/rechargeManagement.vue // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var rechargeManagement = ({ name: "contrast", data: function data() { return { payOptions: [{ label: '现金', value: 1 }, { label: '刷卡', value: 2 }, { label: '支付宝', value: 3 }, { label: '微信', value: 4 }], multipleSelection: [], multipleSelectionTotal: 0, tableDataLease: [], LeasePageTotal: 0, form: { payValue: 1, total: 0, remark: ' ', payType: 1 }, drawRadio: '1', drawerPay: false, qrcodeStatus: false, pageNum: 1, pageSize: 20, radio3: '1', tableData: [], pageTotal: 0, payValue: 0, codeDialogVisible: false, //微信支付二维码弹窗 codeUrl: '', // 二维码 cdata: { title: { text: '交易统计', subtext: '', left: 'center' }, tooltip: { trigger: 'item' }, legend: { orient: 'vertical', left: 'left' }, series: [{ name: '交易统计', type: 'pie', radius: '70%', data: [{ value: 1048, name: '消费' }, { value: 735, name: '充值' }], emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } } }] }, info: { balance: 0 }, infoData: { balance: 0 }, documentHeight: 0 }; }, components: { Echart: echart["a" /* default */] }, created: function created() { this.info = JSON.parse(localStorage.getItem('info')); this.getOrderList(); this.payTotalMethods(); this.getLeasesList(); this.documentHeight = document.documentElement.clientHeight - 200; }, mounted: function mounted() { this.getUserlist(); }, methods: { // 获取合同列表 getLeasesList: function getLeasesList() { var _this = this; var QData = util["a" /* default */].validObject({ status: 2 }); var data = { pageNum: 0, pageSize: 0, orderBy: "create_time desc", q: stringify_default()(QData) }; if (data.q == '{}') { delete data.q; } Object(api["g" /* httpPost */])(data, this.$api.postLeasesList).then(function (res) { if (res.success) { res.data.list.map(function (li) { li.signingTime = moment_default()(li.signingTime).format('YYYY-MM-DD HH:mm:ss'); li.contractTime = moment_default()(li.contractTime).format('YYYY-MM-DD HH:mm:ss'); li.createTime = moment_default()(li.createTime).format('YYYY-MM-DD HH:mm:ss'); }); _this.tableDataLease = res.data.list; _this.LeasePageTotal = res.data.total; } else { _this.$message.error(res.message); } }); }, // 多选 handleSelectionChange: function handleSelectionChange(val) { this.multipleSelection = val; var multipleSelectionTotal = 0; val.map(function (li) { multipleSelectionTotal += parseInt(li.monthRent); }); this.multipleSelectionTotal = parseFloat(multipleSelectionTotal).toFixed(2); }, // 计算充值短信金额 payTotalMethods: function payTotalMethods() { if (this.form.payValue == '') { this.$message.error('数量不能为0'); this.form.payValue = 1; return; } this.form.total = parseInt(this.form.payValue) / 10; }, // 隐藏充值界面 handleClose: function handleClose() { this.drawerPay = false; }, // 退款 drawback: function drawback(no) { var _this2 = this; var url = "/v1/pay/refunds/" + no + "/\u9000\u6B3E"; Object(api["d" /* httpGet */])('', url).then(function (res) { if (res.data.success) { _this2.$message.success('退款成功'); _this2.getUserlist(); _this2.getOrderList(); } else { _this2.$message.error(res.data.msg); } }); }, handleSizeChange: function handleSizeChange(val) { this.pageSize = val; this.getOrderList(); }, handleCurrentChange: function handleCurrentChange(val) { this.pageNum = val; this.getOrderList(); }, getUserlist: function getUserlist() { var _this3 = this; Object(api["d" /* httpGet */])('', this.$api.getBalance).then(function (res) { if (res.code == 200) { _this3.infoData = res.data; } else { _this3.$message.error(res.message); } }); }, getOrderList: function getOrderList() { var _this4 = this; var data = { pageSize: this.pageSize, pageNum: this.pageNum, orderBy: "create_time desc" }; Object(api["d" /* httpGet */])(data, this.$api.getOrderList).then(function (res) { if (res.code == 200) { res.data.list.map(function (li) { li.totalFee = (li.totalFee / 100).toFixed(2); li.createTime = moment_default()(li.createTime).format('YYYY-MM-DD HH:mm:ss'); li.expand = JSON.parse(li.expand); }); _this4.tableData = res.data.list; _this4.pageTotal = res.data.total; } else { _this4.$message.error(res.message); } }); }, getRadioLable: function getRadioLable() { this.goPay(); }, closeDialog: function closeDialog() { this.codeDialogVisible = false; this.getOrderList(); this.getUserlist(); }, goPay: function goPay() { var _this5 = this; var info = JSON.parse(localStorage.getItem('info')); if (this.drawRadio == 1) { var data = { description: this.form.remark, productName: this.drawRadio == 1 ? "短信服务" : '交租', total: parseInt(this.form.payValue) * 10, userId: info.id, cardId: info.id, orderType: this.drawRadio == 1 ? 0 : 1, payType: 0, expand: stringify_default()({ phone: info.phone, nickname: info.username }) }; console.log(data); Object(api["g" /* httpPost */])(data, this.$api.createOrder).then(function (res) { if (res.success) { _this5.codeUrl = res.data.code_url; _this5.qrcodeStatus = true; } else { _this5.$message.error(res.data.msg); } }); } else if (this.drawRadio == 2) { this.multipleSelection.map(function (li) { var data = { description: "交租", productName: "交租", total: parseInt(li.monthRent) * 100, //parseInt(this.data.leases.expand.rent)*100, userId: li.cardId, cardId: li.cardId, appid: 'wx20de9fe5943934a1', uid: info.id, eid: info.enterpriseId, orderType: 1, payType: _this5.form.payType, expand: stringify_default()({ phone: li.phone, nickname: li.name }) }; Object(api["g" /* httpPost */])(data, _this5.$api.rentPrepayOrder).then(function (res) { if (res.success) { _this5.$message.success('结算成功'); _this5.getLeasesList(); } else { _this5.$message.error("\u7ED3\u7B97\u5931\u8D25\uFF1A" + res.message); } }); }); } }, rechargeMethods: function rechargeMethods() { this.codeDialogVisible = true; } } }); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-6f96ac48","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/rechargeManagement/rechargeManagement.vue var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-card',{attrs:{"shadow":"never"}},[_c('el-row',{attrs:{"gutter":20}},[_c('el-table',{staticStyle:{"width":"100%"},attrs:{"data":_vm.tableData,"header-row-style":{textAlign:'center'},"height":_vm.documentHeight,"align":"center"}},[_c('el-table-column',{attrs:{"prop":"createTime","label":"日期"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"orderNo","label":"订单号"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"totalFee","label":"金额"}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"类型"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('span',[_vm._v(_vm._s(scope.row.orderType==0?'短信充值':scope.row.orderType==1?'交租':scope.row.orderType==2?'语音电话费用充值':scope.row.orderType==3?'系统续费':'未知'))])]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"支付方式"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('span',[_vm._v(_vm._s(scope.row.payType==0?'微信支付':scope.row.payType==1?'支付宝支付':scope.row.payType==2?'现金支付':scope.row.payType==3?'银联支付':scope.row.payType==4?'积分支付':'未知'))])]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"orderStatus","label":"状态"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('span',[_vm._v(_vm._s(scope.row.orderStatus==0?'支付成功':scope.row.orderStatus==1?'转入退款':scope.row.orderStatus==2?'未支付':scope.row.orderStatus==3?'已关闭':scope.row.orderStatus==4?'已撤销(付款码支付)':scope.row.orderStatus==5?'用户支付中(付款码支付)':scope.row.orderStatus==6?'支付失败(其他原因,如银行返回失败)':'支付失败'))])]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"describe","label":"操作人"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('span',[_vm._v(_vm._s(scope.row.expand?scope.row.expand.nickname:''))])]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"describe","label":"备注"}}),_vm._v(" "),(_vm.info.type === 0)?_c('el-table-column',{attrs:{"label":"操作"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.orderStatus==0)?_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":function($event){return _vm.drawback(scope.row.orderNo)}}},[_vm._v("退款")]):_vm._e()]}}],null,false,2213948113)}):_vm._e()],1),_vm._v(" "),_c('div',{staticClass:"text-right mt-2 d-flex flex-wrap justify-space-between"},[_c('div',{staticClass:"d-inlie-block"},[_c('div',{staticClass:"d-inlie-block"},[_vm._v("短信余额:"),_c('span',{staticClass:"color-e94848 font-size-24 font-weight-600"},[_vm._v(_vm._s(_vm.infoData.balance?(_vm.infoData.balance/10):0))]),_c('span',{staticClass:"color-666 font-size-14 font-weight-600"},[_vm._v("条")])]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"small"},on:{"click":function($event){_vm.drawerPay=true}}},[_vm._v("充值结算")])],1),_vm._v(" "),_c('div',{staticClass:"d-inlie-block"},[_c('el-pagination',{attrs:{"current-page":_vm.pageNum,"page-sizes":[20,100, 200, 300, 400],"page-size":_vm.pageSize,"layout":"total, sizes, prev, pager, next, jumper","total":_vm.pageTotal},on:{"size-change":_vm.handleSizeChange,"current-change":_vm.handleCurrentChange}})],1)])],1)],1),_vm._v(" "),_c('el-drawer',{staticClass:"position-relative",attrs:{"title":"充值结算","visible":_vm.drawerPay,"direction":"rtl","size":"90%","before-close":_vm.handleClose},on:{"update:visible":function($event){_vm.drawerPay=$event}}},[_c('el-card',{staticStyle:{"border":"none"},attrs:{"shadow":"never","body-style":{border:'none'}}},[_c('div',[_c('el-radio',{attrs:{"label":"1","border":""},model:{value:(_vm.drawRadio),callback:function ($$v) {_vm.drawRadio=$$v},expression:"drawRadio"}},[_vm._v("短信充值")]),_vm._v(" "),_c('el-radio',{attrs:{"label":"2","border":""},model:{value:(_vm.drawRadio),callback:function ($$v) {_vm.drawRadio=$$v},expression:"drawRadio"}},[_vm._v("线下交租")])],1),_vm._v(" "),(_vm.drawRadio == 1)?_c('div',{staticClass:"mt-2"},[_c('el-form',{ref:"form",attrs:{"model":_vm.form,"label-width":"80px"}},[_c('el-form-item',{attrs:{"label":"短信数量"}},[_c('el-input',{attrs:{"type":"number"},on:{"input":_vm.payTotalMethods},model:{value:(_vm.form.payValue),callback:function ($$v) {_vm.$set(_vm.form, "payValue", $$v)},expression:"form.payValue"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"备注"}},[_c('el-input',{model:{value:(_vm.form.remark),callback:function ($$v) {_vm.$set(_vm.form, "remark", $$v)},expression:"form.remark"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"账单金额"}},[_c('el-link',{attrs:{"type":"danger","disabled":""}},[_vm._v(_vm._s(_vm.form.total))])],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"扫码支付"}},[(_vm.qrcodeStatus)?_c('div',{staticClass:"text-center"},[_c('qriously',{attrs:{"value":_vm.codeUrl,"size":150}}),_vm._v(" "),_c('div',{staticClass:"remark text-center"},[_vm._v("使用微信扫码支付")])],1):_vm._e()])],1)],1):_c('div',{staticClass:"mt-2"},[_c('el-table',{ref:"multipleTable",staticStyle:{"width":"100%"},attrs:{"data":_vm.tableDataLease,"tooltip-effect":"dark","height":"500px"},on:{"selection-change":_vm.handleSelectionChange}},[_c('el-table-column',{attrs:{"type":"selection","width":"55","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"number","label":"合同编号","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"name","label":"姓名","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"phone","label":"电话","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"sex","label":"性别","align":"center"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v("\n "+_vm._s(scope.row.sex === 1?'男':scope.row.sex === 2?'女':'')+"\n ")]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"address","label":"房间","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"租期","align":"center"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v("\n "+_vm._s(scope.row.signingTime)),_c('br'),_vm._v(" 至 "),_c('br'),_vm._v(_vm._s(scope.row.contractTime)+"\n ")]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"monthRent","label":"租金/¥","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"合约状态","align":"center"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-tag',{attrs:{"type":scope.row.status===0?'':scope.row.status===1?'success':scope.row.status===2?'danger':scope.row.status===3?'warning':scope.row.status===4?'info':''}},[_vm._v("\n "+_vm._s(scope.row.status===0?'待签约':scope.row.status===1?'已签约':scope.row.status===2?'已欠费':scope.row.status===3?'已退租':scope.row.status===4?'已删除':scope.row.status===5?'已到期':'未知')+"\n ")])]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"createTime","label":"创建日期","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"remark","label":"备注"}})],1),_vm._v(" "),_c('div',{staticClass:"mt-2 font-size-16 color-666"},[_c('el-form',{ref:"form",attrs:{"model":_vm.form,"label-width":"100px"}},[_c('el-form-item',{attrs:{"label":"支付方式:"}},[_c('el-select',{staticClass:"d-inlie-block",attrs:{"size":"small","placeholder":"请选择支付方式"},model:{value:(_vm.form.payType),callback:function ($$v) {_vm.$set(_vm.form, "payType", $$v)},expression:"form.payType"}},_vm._l((_vm.payOptions),function(item){return _c('el-option',{key:item.value,attrs:{"label":item.label,"value":item.value}})}),1)],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"总数:"}},[_vm._v("\n "+_vm._s(_vm.LeasePageTotal)+" 条\n ")]),_vm._v(" "),_c('el-form-item',{attrs:{"label":"选择合计:"}},[_c('span',{staticClass:"font-size-20 color-e94848 font-weight-600"},[_vm._v("¥ "+_vm._s(_vm.multipleSelectionTotal))]),_vm._v("("+_vm._s(_vm.multipleSelection.length)+"笔)\n ")])],1)],1)],1)]),_vm._v(" "),_c('div',{staticClass:"text-right box-sizing-border-box pa-2 width-percentage-100"},[_c('el-button',{attrs:{"size":"small"},on:{"click":function($event){_vm.drawerPay = false}}},[_vm._v("取消")]),_vm._v(" "),_c('el-button',{attrs:{"size":"small","type":"primary"},on:{"click":_vm.getRadioLable}},[_vm._v("结算")])],1)],1)],1)} var staticRenderFns = [] var esExports = { render: render, staticRenderFns: staticRenderFns } /* harmony default export */ var rechargeManagement_rechargeManagement = (esExports); // CONCATENATED MODULE: ./src/views/rechargeManagement/rechargeManagement.vue function injectStyle (ssrContext) { __webpack_require__("DclD") } var normalizeComponent = __webpack_require__("VU/8") /* script */ /* template */ /* template functional */ var __vue_template_functional__ = false /* styles */ var __vue_styles__ = injectStyle /* scopeId */ var __vue_scopeId__ = "data-v-6f96ac48" /* moduleIdentifier (server only) */ var __vue_module_identifier__ = null var Component = normalizeComponent( rechargeManagement, rechargeManagement_rechargeManagement, __vue_template_functional__, __vue_styles__, __vue_scopeId__, __vue_module_identifier__ ) /* harmony default export */ var views_rechargeManagement_rechargeManagement = __webpack_exports__["default"] = (Component.exports); /***/ }) });