From 5b6c1dd063b723184ae434c02d2630ba0007e100 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 08 Jan 2024 17:10:45 +0800
Subject: [PATCH] 党成员回显问题修改;物业商户配置;物业缴费记录表,物业缴费项
---
src/views/property/propertyCompany.vue | 249 ++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 234 insertions(+), 15 deletions(-)
diff --git a/src/views/property/propertyCompany.vue b/src/views/property/propertyCompany.vue
index 5c657e8..c22a526 100644
--- a/src/views/property/propertyCompany.vue
+++ b/src/views/property/propertyCompany.vue
@@ -2,25 +2,73 @@
<template>
<basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
- v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
- @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
- @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+ v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
+ :before-open="beforeOpen"
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
+ @on-load="onLoad">
<template slot="menuLeft">
<el-button size="small" icon="el-icon-delete" plain v-if="permission.propertyCompany_delete"
- @click="handleDelete">删 除
+ @click="handleDelete">删 除
</el-button>
</template>
+
+ <template slot-scope="scope" slot="menu">
+ <el-button v-if="permission.payInfo" type="text" icon="el-icon-circle-plus-outline" size="small"
+ @click="openPayConfig(scope.row)">商户配置
+ </el-button>
+ </template>
+
+
</avue-crud>
+
+ <el-dialog title="商户配置" append-to-body :visible.sync="payInfoVisible" top="10vh" width="70%">
+ <el-tabs v-model="currentTab">
+ <el-tab-pane label="微信商户配置" name="wxInfo">
+ <avue-form ref="wxForm" :option="wxPayOption" v-model="wxPayForm" @submit="wxSubmit">
+ </avue-form>
+ </el-tab-pane>
+ <el-tab-pane label="支付宝商户配置" name="second">
+ <avue-form ref="aliForm" :option="aliPayOption" v-model="aliPayForm" @submit="aliSubmit">
+ </avue-form>
+ </el-tab-pane>
+
+ </el-tabs>
+
+ <!-- <div slot="footer" class="dialog-footer">-->
+ <!-- <el-button @click="payInfoVisible = false">取 消</el-button>-->
+ <!-- <el-button type="primary"@click="submit">提 交</el-button>-->
+ <!-- </div>-->
+
+ </el-dialog>
+
+
</basic-container>
</template>
<script>
-import { getList, remove, update, add, getPropertyCompany } from "@/api/property/propertyCompany";
-import { mapGetters } from "vuex";
+import {
+ getList,
+ remove,
+ update,
+ add,
+ getPropertyCompany,
+ getPayConfig,
+ saveOrUpdateWx, saveOrUpdateAli
+} from "@/api/property/propertyCompany";
+import {mapGetters} from "vuex";
import website from '@/config/website';
+import func from "@/util/func";
+
+const labelWidth = 120
export default {
data() {
return {
+
+ currentTab: "wxInfo",
+ payInfoVisible: false,
+ currentRow: {},
+
form: {},
query: {},
loading: true,
@@ -51,7 +99,7 @@
prop: "name",
searchSpan: 6,
search: true,
- searchLabelWidth:120,
+ searchLabelWidth: 120,
span: 18,
row: true,
labelWidth: 120,
@@ -72,7 +120,7 @@
label: 'name',
value: 'code'
},
- hide:true,
+ hide: true,
span: 6,
labelWidth: 120,
cascader: ['city'],
@@ -96,7 +144,7 @@
label: 'name',
value: 'code'
},
- hide:true,
+ hide: true,
dicUrl: `/api/blade-system/region/select?code={{key}}`,
rules: [
{
@@ -116,7 +164,7 @@
label: 'name',
value: 'code'
},
- hide:true,
+ hide: true,
dicUrl: `/api/blade-system/region/select?code={{key}}`,
rules: [
{
@@ -129,9 +177,9 @@
{
label: "地址",
prop: "address",
- span:18,
+ span: 18,
labelWidth: 120,
- row:true,
+ row: true,
},
{
label: "社会信用代码",
@@ -158,10 +206,128 @@
],
},
data: [],
+
+ wxPayForm: {},
+ wxPayOption: {
+ emptyBtn: false,
+ height: "auto",
+ calcHeight: 180,
+ //stripe:true,
+ column: [
+ {
+ label: "appId",
+ labelWidth: labelWidth,
+ prop: "appId",
+ span: 24,
+ rules: [{
+ required: true,
+ message: "请输入appId",
+ trigger: ["blur", "change"]
+ },],
+ },
+ {
+ label: "mch-id",
+ labelWidth: labelWidth,
+ prop: "mchId",
+ span: 24,
+ rules: [{
+ required: true,
+ message: "请输入mch-id",
+ trigger: ["blur", "change"]
+ },],
+ },
+ {
+ label: "mchKey",
+ labelWidth: labelWidth,
+ prop: "mchKey",
+ rules: [{
+ required: true,
+ message: "请输入mchKey",
+ trigger: ["blur", "change"]
+ },],
+ span: 24,
+ },
+ {
+ label: "appSecret",
+ labelWidth: labelWidth,
+ prop: "appSecret",
+ rules: [{
+ required: true,
+ message: "请输入appSecret",
+ trigger: ["blur", "change"]
+ },],
+ span: 24,
+ },
+ {
+ label: '安全证书',
+ labelWidth: labelWidth,
+ prop: 'keyPath',
+ type: 'upload',
+ drag: true,
+ limit: 1,
+ loadText: '上传中,请稍等',
+ span: 24,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: 'name',
+ url: "link",
+ },
+ rules: [{
+ required: true,
+ message: "请上传安全证书",
+ trigger: ["blur", "change"]
+ },],
+ },
+ ],
+ },
+
+ aliPayForm: {},
+ aliPayOption: {
+ emptyBtn: false,
+ height: "auto",
+ calcHeight: 180,
+ //stripe:true,
+ column: [
+ {
+ label: "appId",
+ labelWidth: labelWidth,
+ prop: "appId",
+ span: 24,
+ rules: [{
+ required: true,
+ message: "请输入appId",
+ trigger: ["blur", "change"]
+ },],
+ },
+ {
+ label: "privateKey",
+ labelWidth: labelWidth,
+ prop: "privateKey",
+ span: 24,
+ rules: [{
+ required: true,
+ message: "请输入privateKey",
+ trigger: ["blur", "change"]
+ },],
+ },
+ {
+ label: "publicKey",
+ labelWidth: labelWidth,
+ prop: "publicKey",
+ span: 24,
+ rules: [{
+ required: true,
+ message: "请输入publicKey",
+ trigger: ["blur", "change"]
+ },],
+ },
+ ],
+ }
+
};
},
- watch: {
- },
+ watch: {},
computed: {
...mapGetters(["permission", "userInfo"]),
permissionList() {
@@ -180,7 +346,60 @@
return ids.join(",");
},
},
+ created() {
+ },
methods: {
+
+ aliSubmit(form, done) {
+
+ console.log("支付宝商户配置", this.aliPayForm)
+
+ this.aliPayForm.propertyCompanyId = this.currentRow.id
+ saveOrUpdateAli(this.aliPayForm).then(res => {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ })
+
+ },
+
+ wxSubmit(form, done) {
+ this.wxPayForm.propertyCompanyId = this.currentRow.id
+
+ this.wxPayForm.keyPath = func.join(this.wxPayForm.keyPath)
+ if (this.wxPayForm.keyPath.length > 0) {
+ var urls = []
+ var split = this.wxPayForm.keyPath.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ this.wxPayForm.keyPath = urls.join(",")
+ }
+
+ console.log("微信商户配置", this.wxPayForm)
+ saveOrUpdateWx(this.wxPayForm).then(res => {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ })
+ },
+
+ openPayConfig(row) {
+ this.currentRow = row
+ //调接口获取商户数据
+ getPayConfig(row.id).then(res => {
+ let data = res.data.data
+ this.wxPayForm = data.wxPayInfo ? data.wxPayInfo : {}
+ this.aliPayForm = data.aliPayInfo ? data.aliPayInfo : {}
+ })
+ this.payInfoVisible = !this.payInfoVisible
+ },
+
rowSave(row, done, loading) {
row.userid = this.userInfo.user_id;
add(row).then(
@@ -289,7 +508,7 @@
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
- const { dateTime } = this.query;
+ const {dateTime} = this.query;
let values = {
...params,
};
--
Gitblit v1.9.3