guoshilong
2024-01-08 5b6c1dd063b723184ae434c02d2630ba0007e100
党成员回显问题修改;物业商户配置;物业缴费记录表,物业缴费项
4 files modified
4 files added
1080 ■■■■■ changed files
src/api/property/propertyCharge.js 50 ●●●●● patch | view | raw | blame | history
src/api/property/propertyChargeRecord.js 50 ●●●●● patch | view | raw | blame | history
src/api/property/propertyCompany.js 29 ●●●●● patch | view | raw | blame | history
src/views/property/components/partyOrganizationMember.vue 4 ●●● patch | view | raw | blame | history
src/views/property/partyOrganization.vue 1 ●●●● patch | view | raw | blame | history
src/views/property/propertyCharge.vue 360 ●●●●● patch | view | raw | blame | history
src/views/property/propertyChargeRecord.vue 337 ●●●●● patch | view | raw | blame | history
src/views/property/propertyCompany.vue 249 ●●●●● patch | view | raw | blame | history
src/api/property/propertyCharge.js
New file
@@ -0,0 +1,50 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
  return request({
    url: '/api/propertyCharge/propertyCharge/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const remove = (ids) => {
  return request({
    url: '/api/propertyCharge/propertyCharge/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}
export const add = (row) => {
  return request({
    url: '/api/propertyCharge/propertyCharge/save',
    method: 'post',
    data: row
  })
}
export const update = (row) => {
  return request({
    url: '/api/propertyCharge/propertyCharge/update',
    method: 'post',
    data: row
  })
}
export const getPropertyCompany = (id) => {
  return request({
    url: '/api/propertyCharge/propertyCharge/detail',
    method: 'get',
    params: {
      id
    }
  })
}
src/api/property/propertyChargeRecord.js
New file
@@ -0,0 +1,50 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
  return request({
    url: '/api/propertyChargeRecord/propertyChargeRecord/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const remove = (ids) => {
  return request({
    url: '/api/propertyChargeRecord/propertyChargeRecord/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}
export const add = (row) => {
  return request({
    url: '/api/propertyChargeRecord/propertyChargeRecord/save',
    method: 'post',
    data: row
  })
}
export const update = (row) => {
  return request({
    url: '/api/propertyChargeRecord/propertyChargeRecord/update',
    method: 'post',
    data: row
  })
}
export const getPropertyCompany = (id) => {
  return request({
    url: '/api/propertyChargeRecord/propertyChargeRecord/detail',
    method: 'get',
    params: {
      id
    }
  })
}
src/api/property/propertyCompany.js
@@ -47,3 +47,32 @@
    }
  })
}
export const getPayConfig = (id) => {
  return request({
    url: '/api/blade-propertyCompany/propertyCompany/getPayConfig',
    method: 'get',
    params: {
      id
    }
  })
}
export const saveOrUpdateWx = (row) => {
  return request({
    url: '/api/wxpay/saveOrUpdate',
    method: 'post',
    data: row
  })
}
export const saveOrUpdateAli = (row) => {
  return request({
    url: '/api/alipay/saveOrUpdate',
    method: 'post',
    data: row
  })
}
src/views/property/components/partyOrganizationMember.vue
@@ -515,6 +515,7 @@
      done()
    },
    beforeOpen (done, type) {
      const column = this.findObject(this.option.column, "householdId");
      if (["edit", "view"].includes(type)) {
        getDetail(this.form.id).then(res => {
          this.form = res.data.data
@@ -524,11 +525,12 @@
            id:this.form.householdId
          }
          getAllHouseHold(params).then(res=>{
            const column = this.findObject(this.option.column, "householdId");
            column.dicData = res.data.data
          })
        })
      }else{
        column.dicData = []
      }
      this.initFlag = true
      done()
src/views/property/partyOrganization.vue
@@ -196,7 +196,6 @@
            },
            row:true
          },
          {
            label: "排序",
            prop: "sort",
src/views/property/propertyCharge.vue
New file
@@ -0,0 +1,360 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="form"
               :permission="permissionList" @search-change="searchChange" @search-reset="searchReset"
               @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel"
               :before-open="beforeOpen"
               @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
               @refresh-change="refreshChange" @on-load="onLoad">
    </avue-crud>
  </basic-container>
</template>
<script>
import {mapGetters} from "vuex";
import {getDetail,getList,add,update,remove} from "@/api/property/propertyCharge";
import website from "@/config/website";
import func from "@/util/func";
import {validatePhone} from "@/util/validate";
const searchSpan = 4
const labelWidth=110
export default {
  name: "propertyCharge",
  data () {
    return {
      form: {},
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      datetime: "",
      selectionList: [],
      memberFlag: false,
      option: {
        // menu: false,
        // addBtn: false,
        border: true,
        index: true,
        selection: false,
        height: "auto",
        calcHeight: 54,
        dialogWidth: 950,
        tip: false,
        searchShow: true,
        searchMenuSpan: 3,
        //stripe:true,
        viewBtn: true,
        excelBtn: true,
        dialogClickModal: false,
        column: [
          {
            label: "物业公司",
            labelWidth:labelWidth,
            prop: "propertyId",
            checkStrictly: true,
            dicUrl: "/api/blade-propertyCompany/propertyCompany/getPropertyCompanyList",
            props: {
              label: "name",
              value: "deptId",
            },
            search:true,
            disabled:false,
            type: "select",
            rules: [{
              required: true,
              message: "请选择物业公司",
              trigger: ["blur","change"]
            }, ],
          },
          {
            label: "类型",
            labelWidth:labelWidth,
            prop: "payType",
            checkStrictly: true,
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=payType",
            props: {
              label: "dictValue",
              value: "dictKey",
            },
            type: "select",
            rules: [{
              required: true,
              message: "请选择类型",
              trigger: ["blur","change"]
            }, ],
          },
          {
            label: "收费项名称",
            labelWidth:labelWidth,
            prop: "name",
            searchSpan: searchSpan,
            searchLabelWidth: labelWidth,
            search: true,
            rules: [{
              required: true,
              message: "请输入收费项名称",
              trigger: ["blur","change"]
            },],
          },
          {
            label: "计算方式",
            labelWidth:labelWidth,
            prop: "calculationFormula",
            checkStrictly: true,
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=payCalculationFormula",
            props: {
              label: "dictValue",
              value: "dictKey",
            },
            type: "select",
            rules: [{
              required: true,
              message: "请选择计算方式",
              trigger: ["blur","change"]
            }, ],
          },
          {
            label: "单价(元)",
            labelWidth:labelWidth,
            prop: "unitPrice",
            type:'number',
            precision:2,
            rules: [{
              required: true,
              message: "请输入单价",
              trigger: ["blur","change"]
            }]
          },
          {
            label: "缴费周期",
            labelWidth:labelWidth,
            placeholder:"几个月收费一次",
            prop: "payPeriod",
            checkStrictly: true,
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=payPeriod",
            props: {
              label: "dictValue",
              value: "dictKey",
            },
            type: "select",
            rules: [{
              required: true,
              message: "请选择缴费周期",
              trigger: ["blur","change"]
            }, ],
          },
        ],
      },
      data: [],
    }
  },
  watch: {},
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    permissionList () {
      return {
        addBtn: this.vaildData(this.permission.gridWorkLog_add, true),
        viewBtn: this.vaildData(this.permission.gridWorkLog_view, true),
        delBtn: this.vaildData(this.permission.gridWorkLog_delete, true),
        editBtn: this.vaildData(this.permission.gridWorkLog_edit, true),
      }
    },
    ids () {
      let ids = []
      this.selectionList.forEach((ele) => {
        ids.push(ele.id)
      })
      return ids.join(",")
    },
    textDispose () {
      return (row, flag, type) => {
        if (row[flag] || row[type] == null) {
          return row[type]
        } else {
          if (type == 'idCard') {
            return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
          } else {
            return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
          }
        }
      }
    },
  },
  methods: {
    showStringDispose (row, type) {
      row[type] = !row[type]
    },
    manageMember (row) {
      this.memberFlag = true
      var that = this
      this.$nextTick(() => {
        that.$refs.partyOrganizationMember.init(row)
      })
    },
    rowSave (row, done, loading) {
      add(row).then(
        () => {
          this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          })
          done()
        },
        (error) => {
          window.console.log(error)
          loading()
        }
      )
    },
    rowUpdate (row, index, done, loading) {
      if (row.urls.length > 0) {
        var urls = []
        var split = row.urls.split(",")
        split.forEach(url => {
          var names = url.split("jczz/")
          urls.push(names[1])
        })
        row.urls = urls.join(",")
      }
      update(row).then(
        () => {
          this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          })
          done()
        },
        (error) => {
          window.console.log(error)
          loading()
        }
      )
    },
    rowDel (row) {
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          return remove(row.id)
        })
        .then(() => {
          this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          })
        })
    },
    // handleDelete() {
    //   if (this.selectionList.length === 0) {
    //     this.$message.warning("请选择至少一条数据");
    //     return;
    //   }
    //   this.$confirm("确定将选择数据删除?", {
    //       confirmButtonText: "确定",
    //       cancelButtonText: "取消",
    //       type: "warning",
    //     })
    //     .then(() => {
    //       return remove(this.ids);
    //     })
    //     .then(() => {
    //       this.onLoad(this.page);
    //       this.$message({
    //         type: "success",
    //         message: "操作成功!",
    //       });
    //       this.$refs.crud.toggleSelection();
    //     });
    // },
    beforeOpen (done, type) {
      if (["edit", "view"].includes(type)) {
        getDetail(this.form.id).then((res) => {
          this.form = res.data.data
          const column = this.findObject(this.option.column, "principalId")
          let arr = []
          arr.push(this.form.areaId)
          column.defaultExpandedKeys = arr
        })
      }
      // //如果当前角色为物业管理员,则默认物业公司为该用户的物业公司
      // if (this.userInfo.role_name.indexOf("wygly")>-1){
      //   let column = this.findObject(this.option.column, "propertyId")
      //   column.disabled = true
      //   column.search = false
      //   this.form.propertyId = this.userInfo.dept_id
      // }
      done()
    },
    searchReset () {
      this.query = {}
      this.onLoad(this.page)
    },
    searchChange (params, done) {
      this.query = params
      this.page.currentPage = 1
      this.onLoad(this.page, params)
      done()
    },
    selectionChange (list) {
      this.selectionList = list
    },
    selectionClear () {
      this.selectionList = []
      this.$refs.crud.toggleSelection()
    },
    currentChange (currentPage) {
      this.page.currentPage = currentPage
    },
    sizeChange (pageSize) {
      this.page.pageSize = pageSize
    },
    refreshChange () {
      this.onLoad(this.page, this.query)
    },
    onLoad (page, params = {}) {
      this.loading = true
      //如果当前角色为物业管理员,则默认筛选该物业公司
      if (this.userInfo.role_name.indexOf("wygly")>-1){
        let column = this.findObject(this.option.column, "propertyId")
        column.disabled = true
        column.search = false
        this.form.propertyId = this.userInfo.dept_id
        params.propertyId = this.userInfo.dept_id
      }
      getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
        const data = res.data.data
        this.page.total = data.total
        this.data = data.records
        this.loading = false
        this.selectionClear()
      })
    }
  },
}
</script>
<style scoped>
</style>
src/views/property/propertyChargeRecord.vue
New file
@@ -0,0 +1,337 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="form"
               :permission="permissionList" @search-change="searchChange" @search-reset="searchReset"
               @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel"
               :before-open="beforeOpen"
               @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
               @refresh-change="refreshChange" @on-load="onLoad">
    </avue-crud>
  </basic-container>
</template>
<script>
import {mapGetters} from "vuex";
import {getDetail,getList,add,update,remove} from "@/api/property/propertyChargeRecord";
import website from "@/config/website";
import func from "@/util/func";
import {validatePhone} from "@/util/validate";
const searchSpan = 4
const labelWidth=110
export default {
  name: "propertyChargeRecord",
  data () {
    return {
      form: {},
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      datetime: "",
      selectionList: [],
      memberFlag: false,
      option: {
        // menu: false,
        // addBtn: false,
        border: true,
        index: true,
        selection: false,
        height: "auto",
        calcHeight: 54,
        dialogWidth: 950,
        tip: false,
        searchShow: true,
        searchMenuSpan: 3,
        //stripe:true,
        viewBtn: true,
        excelBtn: true,
        dialogClickModal: false,
        addBtn:false,
        editBtn:false,
        column: [
          {
            label: "物业公司",
            labelWidth:labelWidth,
            prop: "propertyId",
            checkStrictly: true,
            dicUrl: "/api/blade-propertyCompany/propertyCompany/getPropertyCompanyList",
            props: {
              label: "name",
              value: "deptId",
            },
            search:true,
            disabled:false,
            type: "select",
            rules: [{
              required: true,
              message: "请选择物业公司",
              trigger: ["blur","change"]
            }, ],
          },
          {
            label: "付款人",
            labelWidth:labelWidth,
            prop: "payUser",
            searchSpan: searchSpan,
            searchLabelWidth: labelWidth,
            search: true,
            rules: [{
              required: true,
              message: "请输入收费项名称",
              trigger: ["blur","change"]
            },],
          },
          {
            label: "付款时间",
            labelWidth:labelWidth,
            prop: "payTime",
            rules: [{
              required: true,
              message: "请选择计算方式",
              trigger: ["blur","change"]
            }, ],
          },
          {
            label: "付款金额(元)",
            labelWidth:labelWidth,
            prop: "payPrice",
            type:'number',
            precision:2,
            rules: [{
              required: true,
              message: "请输入单价",
              trigger: ["blur","change"]
            }]
          },
          {
            label: "付款方式",
            labelWidth:labelWidth,
            prop: "payFunc",
            checkStrictly: true,
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=payPeriod",
            props: {
              label: "dictValue",
              value: "dictKey",
            },
            type: "select",
            rules: [{
              required: true,
              message: "请选择缴费周期",
              trigger: ["blur","change"]
            }, ],
          },
        ],
      },
      data: [],
    }
  },
  watch: {},
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    permissionList () {
      return {
        addBtn: this.vaildData(this.permission.gridWorkLog_add, true),
        viewBtn: this.vaildData(this.permission.gridWorkLog_view, true),
        delBtn: this.vaildData(this.permission.gridWorkLog_delete, true),
        editBtn: this.vaildData(this.permission.gridWorkLog_edit, true),
      }
    },
    ids () {
      let ids = []
      this.selectionList.forEach((ele) => {
        ids.push(ele.id)
      })
      return ids.join(",")
    },
    textDispose () {
      return (row, flag, type) => {
        if (row[flag] || row[type] == null) {
          return row[type]
        } else {
          if (type == 'idCard') {
            return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
          } else {
            return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
          }
        }
      }
    },
  },
  methods: {
    showStringDispose (row, type) {
      row[type] = !row[type]
    },
    manageMember (row) {
      this.memberFlag = true
      var that = this
      this.$nextTick(() => {
        that.$refs.partyOrganizationMember.init(row)
      })
    },
    rowSave (row, done, loading) {
      add(row).then(
        () => {
          this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          })
          done()
        },
        (error) => {
          window.console.log(error)
          loading()
        }
      )
    },
    rowUpdate (row, index, done, loading) {
      if (row.urls.length > 0) {
        var urls = []
        var split = row.urls.split(",")
        split.forEach(url => {
          var names = url.split("jczz/")
          urls.push(names[1])
        })
        row.urls = urls.join(",")
      }
      update(row).then(
        () => {
          this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          })
          done()
        },
        (error) => {
          window.console.log(error)
          loading()
        }
      )
    },
    rowDel (row) {
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          return remove(row.id)
        })
        .then(() => {
          this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          })
        })
    },
    // handleDelete() {
    //   if (this.selectionList.length === 0) {
    //     this.$message.warning("请选择至少一条数据");
    //     return;
    //   }
    //   this.$confirm("确定将选择数据删除?", {
    //       confirmButtonText: "确定",
    //       cancelButtonText: "取消",
    //       type: "warning",
    //     })
    //     .then(() => {
    //       return remove(this.ids);
    //     })
    //     .then(() => {
    //       this.onLoad(this.page);
    //       this.$message({
    //         type: "success",
    //         message: "操作成功!",
    //       });
    //       this.$refs.crud.toggleSelection();
    //     });
    // },
    beforeOpen (done, type) {
      if (["edit", "view"].includes(type)) {
        getDetail(this.form.id).then((res) => {
          this.form = res.data.data
          const column = this.findObject(this.option.column, "principalId")
          let arr = []
          arr.push(this.form.areaId)
          column.defaultExpandedKeys = arr
        })
      }
      // //如果当前角色为物业管理员,则默认物业公司为该用户的物业公司
      // if (this.userInfo.role_name.indexOf("wygly")>-1){
      //   let column = this.findObject(this.option.column, "propertyId")
      //   column.disabled = true
      //   column.search = false
      //   this.form.propertyId = this.userInfo.dept_id
      // }
      done()
    },
    searchReset () {
      this.query = {}
      this.onLoad(this.page)
    },
    searchChange (params, done) {
      this.query = params
      this.page.currentPage = 1
      this.onLoad(this.page, params)
      done()
    },
    selectionChange (list) {
      this.selectionList = list
    },
    selectionClear () {
      this.selectionList = []
      this.$refs.crud.toggleSelection()
    },
    currentChange (currentPage) {
      this.page.currentPage = currentPage
    },
    sizeChange (pageSize) {
      this.page.pageSize = pageSize
    },
    refreshChange () {
      this.onLoad(this.page, this.query)
    },
    onLoad (page, params = {}) {
      this.loading = true
      //如果当前角色为物业管理员,则默认筛选该物业公司
      if (this.userInfo.role_name.indexOf("wygly")>-1){
        let column = this.findObject(this.option.column, "propertyId")
        column.disabled = true
        column.search = false
        this.form.propertyId = this.userInfo.dept_id
        params.propertyId = this.userInfo.dept_id
      }
      getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
        const data = res.data.data
        this.page.total = data.total
        this.data = data.records
        this.loading = false
        this.selectionClear()
      })
    }
  },
}
</script>
<style scoped>
</style>
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,
      };