MONSTER-ygh 1 سال پیش
والد
کامیت
6c87ce4183

+ 10 - 0
src/api/team/accountDetails.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 分页查询
+export const pageList = (query) => {
+  return request({
+    url: '/member/marketTeam/balancePageList',
+    method: 'get',
+    params: query
+  })
+}

+ 28 - 0
src/api/team/teamMr.js

@@ -51,3 +51,31 @@ export function getSelectById(id) {
     method: 'get'
   })
 }
+
+// 新增/修改
+export const creditGrantingApi = (data) => {
+  return request({
+    url: '/member/marketTeam/quotaRecharge',
+    method: 'post',
+    data: data
+  })
+}
+
+
+// 新增/修改
+export const rechargeBoxApi = (data) => {
+  return request({
+    url: '/member/marketTeam/balanceRecharge',
+    method: 'post',
+    data: data
+  })
+}
+
+// 身份证校验
+export const marketTeamAudit = (query) => {
+  return request({
+    url: '/member/marketTeam/audit',
+    method: 'post',
+    data: query
+  })
+}

+ 9 - 4
src/api/windowTicketSales/ticketingSales.js

@@ -45,6 +45,15 @@ export const gotoMicroPay = (query) => {
       data: query
     })
   }
+  // 对公支付
+  export const gotoCorporatePay = (query) => {
+    return request({
+      url: '/order/orderInfo/gotoCorporatePay',
+      method: 'post',
+      data: query
+    })
+  }
+
   // 支付查询
 
   export const payQuery = (query) => {
@@ -97,8 +106,6 @@ export const goodsPageList = (query) => {
 }
 
 // 取消订单
-
-
 export const orderInfoCancel = (query) => {
   return request({
     url: '/order/orderInfo/cancel',
@@ -108,8 +115,6 @@ export const orderInfoCancel = (query) => {
 }
 
 // 身份证校验
-
-
 export const factorAuth = (query) => {
   return request({
     url: '/thirdapi/identity/factorAuth',

+ 8 - 4
src/views/distribution/personnelMr/index.vue

@@ -420,9 +420,13 @@ export default {
     /** 获取推广码 */
     getRetailQrcodeApi(row) {
       getRetailQrcode({personsId: row.id}).then(response => {
-        const obj = response.data;
-        this.newObj = obj;
-        this.newObj.name = row.name;
+        if(response.code == 200) {
+          const obj = response.data;
+          this.newObj = obj;
+          this.newObj.name = row.name;
+          this.visibleStatus = true
+        }
+        
       });
     },
 
@@ -502,7 +506,7 @@ export default {
     /** 推广码按钮操作 */
     handleCode(obj, type) {
       this.getRetailQrcodeApi(obj);
-      this.visibleStatus = true
+      
     },
     // 推广码下载
     codeDownload(row) {

+ 27 - 1
src/views/order/groupBuyingMr/index.vue

@@ -107,6 +107,17 @@
           />
         </el-select>
       </el-form-item>
+      <el-form-item label="开票时间">
+        <el-date-picker
+          style="width: 230px;"
+          v-model="queryParams.invoiceTime"
+          type="daterange"
+          value-format="yyyy-MM-dd"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -487,6 +498,13 @@ export default {
         this.queryParams.beginTime = null
         this.queryParams.endTime = null
       }
+      if(this.queryParams.invoiceTime&&this.queryParams.invoiceTime.length==2){
+       this.queryParams.invoiceBeginTime =this.queryParams.invoiceTime[0];
+       this.queryParams.invoiceEndTime =this.queryParams.invoiceTime[1];
+      }else {
+       this.queryParams.invoiceBeginTime = null
+       this.queryParams.invoiceEndTime = null
+      }
       this.getList();
     },
     /** 重置按钮操作 */
@@ -502,6 +520,7 @@ export default {
       this.$set(this.queryParams, 'time', '');
       this.$set(this.queryParams, 'performDate', '');
       this.$set(this.queryParams, 'performTimeId', '');
+      this.$set(this.queryParams, 'invoiceTime', '');
       this.queryParams.pageNum = 1;
       this.handleQuery();
     },
@@ -708,9 +727,16 @@ export default {
             this.queryParams.performDateStart = null
             this.queryParams.performDateEnd =null
           }
+          if(this.queryParams.invoiceTime&&this.queryParams.invoiceTime.length==2){
+            this.queryParams.invoiceBeginTime =this.queryParams.invoiceTime[0];
+            this.queryParams.invoiceEndTime =this.queryParams.invoiceTime[1];
+          }else {
+            this.queryParams.invoiceBeginTime = null
+            this.queryParams.invoiceEndTime = null
+          }
           let params = JSON.parse(JSON.stringify(this.queryParams))
           for (let key in params) {
-            if(key != 'pageNum' && key != 'pageSize' && key != 'time' && key != 'performDate'){
+            if(key != 'pageNum' && key != 'pageSize' && key != 'time' && key != 'performDate' && key != 'invoiceTime'){
               postMap[key] = params[key]
             }
           }

+ 148 - 0
src/views/team/accountDetails/index.vue

@@ -0,0 +1,148 @@
+<template>
+    <div class="app-container">
+      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
+        <el-form-item label="团队名称" label-width="70px">
+          <el-input
+            v-model="queryParams.teamName"
+            placeholder="请输入团队名称"
+            clearable
+            style="width: 140px;"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item label="变动类型">
+          <el-select
+            v-model="queryParams.type"
+            placeholder="变动类型"
+            clearable
+            style="width: 240px"
+          >
+            <el-option
+              v-for="dict in dict.type.accountDetails_type"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
+  
+      <el-row :gutter="10" class="mb8">
+        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      </el-row>
+  
+      <el-table ref="tables" v-loading="loading" :data="dataList" border>
+        <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
+        <el-table-column label="团队名称" align="center" prop="teamName" />
+        <el-table-column label="变动类型" align="center" prop="type">
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.accountDetails_type" :value="scope.row.type"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="变动金额(元)" align="center" prop="num" />
+        <el-table-column label="操作描述" align="center" prop="remark" />
+        <el-table-column label="操作人" align="center" prop="updateBy" />
+        <el-table-column label="账号余额" align="center" prop="total" />
+        <el-table-column label="变动时间" align="center" prop="createTime" width="160" />
+      </el-table>
+  
+      <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+  </template>
+  
+  <script>
+  
+  import { pageList } from '@/api/team/accountDetails'
+
+  export default {
+    name: "agreement",
+    dicts: ['accountDetails_type'],
+    components: {  },
+    data() {
+      return {
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 用户表格数据
+        dataList: null,
+        // 弹出层标题
+        title: "",
+  
+        // 是否显示弹出层
+        open: false,
+        // 日期范围
+        dateRange: [],
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          type: undefined
+        },
+        statusList: [
+          {id: 1, name: '未发布', value: 0},
+          {id: 2, name: '发布', value: 1},
+          {id: 3, name: '下架', value: 2},
+        ],
+        visibleStatus: false,
+        newObj: {},
+        visibleType: ''
+      };
+    },
+    created() {
+      this.getList();
+    },
+    methods: {
+      /** 查询列表 */
+      getList() {
+        this.loading = true;
+        pageList(this.addDateRange(this.queryParams, this.dateRange))
+        .then(response => {
+            this.dataList = response.data.rows;
+            this.dataList.forEach(item =>{
+              item.switchValue = item.status;
+            })
+            this.total = response.data.total;
+            this.loading = false;
+          }
+        );
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.dateRange = [];
+        this.$set(this.queryParams, 'teamName', '');
+        this.$set(this.queryParams, 'type', '');
+        this.queryParams.pageNum = 1;
+        this.handleQuery();
+      },
+    }
+  };
+  </script>
+  

+ 9 - 0
src/views/team/teamMr/dialog/addAndEdit.vue

@@ -18,6 +18,9 @@
   >
     <div class="dialog">
       <el-form :model="form" ref="form" :rules="rules" label-width="150px">
+        <el-form-item v-if="form.checkRemark" label="驳回原因:">
+          <span>{{ form.checkRemark }}</span>
+        </el-form-item>
         <el-form-item label="团队名称:" prop="name">
           <el-input
             v-model="form.name"
@@ -191,6 +194,9 @@ export default {
             this.$set(this.form, 'contact', obj.contact);
             this.$set(this.form, 'password', "");
             this.$set(this.form, 'mobile', obj.mobile);
+            this.$set(this.form, 'salerPerson', obj.salerPerson);
+            this.$set(this.form, 'salerMobile', obj.salerMobile);
+            this.$set(this.form, 'checkRemark', obj.checkRemark);
             if(obj.contractImg){
               if(obj.contractImg.indexOf(',') > -1){
                 let img_list = obj.contractImg.split(',');
@@ -255,6 +261,9 @@ export default {
       this.$set(this.form, 'password', "");
       this.$set(this.form, 'mobile', "");
       this.$set(this.form, 'photoList', []);
+      this.$set(this.form, 'salerPerson', '');
+      this.$set(this.form, 'salerMobile', '');
+      this.$set(this.form, 'checkRemark', '');
     },
     /**
      * 关闭弹框

+ 320 - 0
src/views/team/teamMr/dialog/auditBox.vue

@@ -0,0 +1,320 @@
+<!--
+ * @Description: 新增/编辑弹框
+ * @Author: Sugar.
+ * @Date: 2023-11-24 13:55:00
+ * @LastEditors: Sugar.
+ * @LastEditTime: 22023-11-24 13:55:00
+ * @FilePath: \cattle_webui\src\views\team\teamMr\AddOrEditDialog.vue
+ * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
+-->
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="60%"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="dialog">
+      <el-form :model="form" ref="form" :rules="rules" label-width="150px">
+        <div style="display: flex;">
+          <el-form-item label="团队名称:" prop="name">
+            <span style="display: flex ; min-width: 300px;">{{ form.name }}</span>
+          </el-form-item>
+          <el-form-item label="团队类型:" prop="type">
+            <dict-tag :options="dict.type.team_type" :value="form.type"/>
+          </el-form-item>
+        </div>
+        <div style="display: flex;">
+          <el-form-item label="销售员:" prop="salerPerson">
+            <span style="display: flex ; min-width: 300px;">{{ form.salerPerson }}</span>
+          </el-form-item>
+          <el-form-item label="销售员联系电话:" prop="salerMobile">
+            <span style="display: flex ; min-width: 300px;">{{ form.salerMobile }}</span>
+          </el-form-item>
+        </div>
+        <div style="display: flex;">
+          <el-form-item label="客户负责人:" prop="contact">
+            <span style="display: flex ; min-width: 300px;">{{ form.contact }}</span>
+          </el-form-item>
+          <el-form-item label="客户账号/联系电话:" prop="mobile">
+            <span style="display: flex ; min-width: 300px;">{{ form.mobile }}</span>
+          </el-form-item>
+        </div>
+        
+        <el-form-item label="密码">
+          <span>{{ form.password }}</span>
+        </el-form-item>
+        <el-form-item label="合约信息:">
+          <div 
+            v-for="(item,index) in form.photoList" 
+              :key="index"
+              style="width: 100px; height: 100px;position: relative;border: 1px solid #999;border-radius: 5px;margin-right: 20px;">
+                <el-image 
+                  style="width: 100%; height: 100%"
+                  :src="item" 
+                  :preview-src-list="form.photoList">
+                </el-image>
+          </div>
+        </el-form-item>
+        <el-form-item label="审核备注:">
+          <span style="color: #ccc;">(注意:驳回时请填写备注)</span>
+        </el-form-item>
+        <el-form-item label="" :error="errorText" prop="checkRemark">
+          <el-input
+            v-model="form.checkRemark"
+            type="textarea"
+            placeholder="审核备注"
+            clearable
+            style="width: 100%;"
+            @input="checkRemarkFun"
+          />
+        </el-form-item>
+      </el-form>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <div style="display: flex;justify-content: center;">
+        <el-button
+          type="danger"
+          @click="submitForm(2)"
+          v-loading.fullscreen.lock="loading"
+          element-loading-text="提交中..."
+          element-loading-spinner="el-icon-loading"
+          element-loading-background="rgba(0, 0, 0, 0.8)"
+        >
+          <span v-if="loading">提交中...</span>
+          <span v-else>驳回</span>
+        </el-button>
+        <el-button
+          type="primary"
+          @click="submitForm(1)"
+          v-loading.fullscreen.lock="loading"
+          element-loading-text="提交中..."
+          element-loading-spinner="el-icon-loading"
+          element-loading-background="rgba(0, 0, 0, 0.8)"
+        >
+          <span v-if="loading">提交中...</span>
+          <span v-else>通过</span>
+        </el-button>
+      </div>
+      
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { marketTeamAudit, getSelectById } from "@/api/team/teamMr";
+import Editor from "@/components/Editor";
+import { getToken } from "@/utils/auth";
+export default {
+  name: "addAndEdit",
+  props: {
+    dict: {
+      type: Object,
+      default: () => [],
+    },
+  },
+  components: {
+    Editor,
+  },
+  data() {
+    return {
+      title: "编辑",
+      model: "EDIT",
+      activeName: '01',
+      open: false,
+      loading: false,
+      form: {
+        id: undefined,
+        type: "",
+      },
+      rules: {
+        name: [{ required: true, message: "请输入团队名称", trigger: ["change","blur"] }],
+        type: [{ required: true, message: "请选择团队类型", trigger: ["change","blur"] }],
+        contact: [{ required: true, message: "请输入客户负责人", trigger: ["change","blur"] }],
+        mobile: [{ required: true, message: "请输入客户账号/联系电话", trigger: ["change","blur"] }],
+        salerPerson: [{ required: true, message: "请输入销售员", trigger: ["change","blur"] }],
+        salerMobile: [{ required: true, message: "请输入销售员联系电话", trigger: ["change","blur"] }],
+      },
+      uploadObj: {
+        url: process.env.VUE_APP_UPLOAD_FILE_API + "/upload/single/minio",
+        Headers: { Authorization: "Bearer " + getToken() },
+      },
+      errorText: ''
+    };
+  },
+  methods: {
+    /**
+     * 打开弹框
+     * @date 2023-11-22
+     * @param {any} obj
+     * @returns {any}
+     */
+    openDialog(title, obj) {
+      this.open = true;
+      this.errorText = ''
+      this.reset();
+      if (obj){
+        this.title = "编辑团队";
+        this.getSelectByIdApi(obj);
+      }else{
+        this.title = "添加团队";
+        this.$nextTick(() => {
+          this.$refs["form"].clearValidate();
+        });
+      }
+    },
+    /** 获取详情 */
+    getSelectByIdApi(row) {
+      const id = row.id
+      getSelectById(id).then(response => {
+        const obj = response.data;
+        this.$nextTick(() => {
+          this.$nextTick(() => {
+            this.form = {
+              ...obj,
+              photoList: obj.contractImg?obj.contractImg.split(','):[]
+            }
+          });
+        });
+      });
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    async submitForm(type) {
+      try {
+            if(type==2 && !this.form.checkRemark){
+              this.errorText = '驳货请填写备注'
+              return
+            }else {
+              this.errorText = ''
+            }
+            this.loading = true;
+            const { code } = await marketTeamAudit({ 
+              teamId: this.form.id,
+              checkStatus: type,
+              checkRemark: this.form.checkRemark,
+            });
+            if (code === 200) {
+              this.$message.success("操作成功!");
+              this.$emit("getList");
+              this.cancel();
+            }
+          } catch (error) {
+            console.error("errpr==",error)
+          } finally {
+            this.loading = false;
+          }
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      this.form = {}
+      if(this.$refs["form"]) {
+        this.$refs["form"].clearValidate();
+      }
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+    /**
+     * 上传成功
+     * @date 2023-11-22
+     * @param {any} res
+     * @returns {any}
+     */
+    handleAvatarSuccess(res) {
+      if (res.code === 200) {
+        // this.form.mainImg = res?.data?.url;
+        this.$set(this.form, 'mainImg', res?.data?.url)
+      }
+    },
+    /**
+     * 上传文件之前之前
+     * @date 2023-11-22
+     * @param {any} file
+     * @returns {any}
+     */
+    beforeAvatarUpload(file) {
+      const isJPG = file.type === "image/jpeg" || "image/png";
+      if (!isJPG) {
+        this.$message.error("上传头像图片只能是jpg或png格式!");
+      }
+      return isJPG;
+    },
+    /**
+     * 剧目海报上传成功
+     * @date 2023-11-22
+     * @param {any} res
+     * @returns {any}
+     */
+    handlePhotoListSuccess(res) {
+      if (res.code === 200) {
+        let photo = {
+          imageUrl: res?.data?.url,
+          url: res?.data?.url,
+          photoType: '2'
+        }
+        if(!this.form.photoList){
+          this.form.photoList = []
+        }
+        // this.form.photoList.push(photo);
+        this.$set(this.form.photoList, this.form.photoList.length, photo);
+      }
+    },
+    handleRemove(file, fileList) {
+      this.form.photoList.forEach((item, index) => {
+        if(item.uid == file.uid){
+          this.form.photoList.splice(index, 1)
+        }
+      })
+    },
+    checkRemarkFun(value) {
+      if(value) {
+        this.errorText = ''
+      }
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dialog {
+  padding: 0 30px;
+  max-height: 65vh;
+  overflow-y: auto;
+}
+.dialog {
+  padding: 0 30px;
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+</style>

+ 286 - 0
src/views/team/teamMr/dialog/creditGranting.vue

@@ -0,0 +1,286 @@
+<!--
+ * @Description: 新增/编辑弹框
+ * @Author: Sugar.
+ * @Date: 2023-11-24 13:55:00
+ * @LastEditors: Sugar.
+ * @LastEditTime: 22023-11-24 13:55:00
+ * @FilePath: \cattle_webui\src\views\team\teamMr\AddOrEditDialog.vue
+ * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
+-->
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="700px"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="dialog">
+      <el-form :model="form" ref="form" :rules="rules" label-width="150px">
+        <el-form-item label="授信余额:" prop="grantSurplus">
+          <span>{{ form.grantSurplus }}元</span>
+        </el-form-item>
+        <el-form-item label="授信欠款:" prop="grantUsed">
+          <span>{{ form.grantUsed }}元</span>
+        </el-form-item>
+        <el-form-item label="重置授信额度:" prop="balanceValue">
+          <div style="display: flex;">
+            <el-input-number v-model="form.balanceValue" controls-position="right" placeholder="请输入重置授信额度"></el-input-number>
+            <span>元</span> 
+          </div>
+        </el-form-item>
+        <el-form-item label="重置凭证" prop="voucherUrl">
+            <div style="display: flex;">
+              <div 
+              v-for="(item,index) in form.voucherUrl" 
+              :key="index"
+              style="width: 100px; height: 100px;position: relative;border: 1px solid #999;border-radius: 5px;margin-right: 20px;">
+                <el-image 
+                  style="width: 100%; height: 100%"
+                  :src="item" 
+                  :preview-src-list="form.voucherUrl">
+                </el-image>
+                <span @click="handleRemove(index)" style="position: absolute;top: -15px;right: -15px;color: red;font-size: 24px;z-index: 999;cursor: pointer;">
+                  <i class="el-icon-error"></i>
+                </span>
+              </div>
+              <div 
+              style="width: 100px; height: 100px;" 
+              v-if="!form.voucherUrl||form.voucherUrl.length<1"
+              v-loading="actionUrlLoading"
+              element-loading-text="上传中..."
+              element-loading-spinner="el-icon-loading"
+              element-loading-background="rgba(0, 0, 0, 0.8)"
+              >
+                <el-upload
+                  class="avatar-uploader"
+                  :action="uploadObj.url"
+                  :headers="uploadObj.headers"
+                  :show-file-list="false"
+                  :before-upload="beforeAvatarUpload"
+                  :on-success="handleAvatarSuccess"
+                  :on-progress="handleAvatarProgress"
+                  :disabled="actionUrlLoading"
+                  :on-error="handleAvatarError"
+                  >
+                  <i class="el-icon-plus avatar-uploader-icon"></i>
+                </el-upload>
+              </div>
+              
+            </div>
+            <span><span>支持jpg、png的图片上传</span></span>
+          </el-form-item>
+      </el-form>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="cancel">取消</el-button>
+      <el-button
+        type="primary"
+        @click="submitForm"
+        v-loading.fullscreen.lock="loading"
+        element-loading-text="提交中..."
+        element-loading-spinner="el-icon-loading"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+      >
+        <span v-if="loading">提交中...</span>
+        <span v-else>保存</span>
+      </el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+// import { updateNoticeMgr } from "@/api/system/noticeMgr";
+import { creditGrantingApi, getSelectById } from "@/api/team/teamMr";
+import Editor from "@/components/Editor";
+import { getToken } from "@/utils/auth";
+export default {
+  name: "addAndEdit",
+  components: {
+    Editor,
+  },
+  data() {
+    return {
+      title: "编辑",
+      model: "EDIT",
+      activeName: '01',
+      open: false,
+      loading: false,
+      form: {
+        id: undefined,
+        type: "",
+      },
+      rules: {
+        balanceValue: [{ required: true, message: "请输入重置授信额度", trigger: ["change","blur"] }],
+        voucherUrl: [{ required: true, message: "请输入重置凭证图片", trigger: ["change","blur"] }],
+      },
+      uploadObj: {
+        url: process.env.VUE_APP_UPLOAD_FILE_API + "/upload/single/minio",
+        Headers: { Authorization: "Bearer " + getToken() },
+      },
+      actionUrlLoading: false,
+    };
+  },
+  methods: {
+    /**
+     * 打开弹框
+     * @date 2023-11-22
+     * @param {any} obj
+     * @returns {any}
+     */
+    openDialog(title, obj) {
+      this.open = true;
+      this.title = title;
+      this.reset();
+      if (obj){
+        this.getSelectByIdApi(obj);
+      }else{
+        this.$nextTick(() => {
+          this.$refs["form"].clearValidate();
+        });
+      }
+    },
+    /** 获取详情 */
+    getSelectByIdApi(row) {
+      const id = row.id
+      getSelectById(id).then(response => {
+        const obj = {
+          ...response.data,
+          voucherUrl: [],
+        }
+        this.form = obj
+      });
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    submitForm() {
+      this.$refs["form"].validate(async (valid) => {
+        if (valid) {
+          try {
+            this.loading = true;
+            const { code } = await creditGrantingApi({ 
+              id: this.form.id,
+              balanceValue: this.form.balanceValue,
+              voucherUrl: this.form.voucherUrl ? this.form.voucherUrl.join(','):''
+             });
+            if (code === 200) {
+              this.$message.success("操作成功!");
+              this.$emit("getList");
+              this.cancel();
+            }
+          } catch (error) {
+          } finally {
+            this.loading = false;
+          }
+        }
+      });
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      this.form = {}
+      if(this.$refs["form"]) {
+        this.$refs["form"].clearValidate();
+      }
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+     /**  上传图片 单张  */
+     handleAvatarSuccess(response, file, fileList) {
+      console.log("res, file",response, file, fileList)
+      this.actionUrlLoading = false
+      if(response.code == 200) {
+        this.form.voucherUrl.push(response.data.url)
+      }
+    },
+    beforeAvatarUpload(file) {
+      const isLt2M = file.size / 1024 / 1024 < 100;
+      let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
+      let typeList = ['png','jepg','jpg']
+      const isJPG = typeList.includes(testmsg);
+      if (!isJPG) {
+        this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
+      }
+      if (!isLt2M) {
+        this.$message.error('上传图片图片大小不能超过 100MB!');
+      }
+      return isJPG && isLt2M;
+    },
+    handleAvatarProgress(){
+      this.actionUrlLoading = true
+    },
+    handleAvatarError() {
+      this.actionUrlLoading = false
+    },
+    handleRemove(index) {
+      this.form.voucherUrl.splice(index,1)
+    },
+
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dialog {
+  padding: 0 30px;
+  max-height: 65vh;
+  overflow-y: auto;
+}
+.dialog {
+  padding: 0 30px;
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+::v-deep .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  ::v-deep .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  ::v-deep .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 100px;
+    height: 100px;
+    line-height: 100px;
+    text-align: center;
+  }
+  ::v-deep .avatar {
+    width: 100px;
+    height: 100px;
+    display: block;
+  }
+</style>

+ 283 - 0
src/views/team/teamMr/dialog/rechargeBox.vue

@@ -0,0 +1,283 @@
+<!--
+ * @Description: 新增/编辑弹框
+ * @Author: Sugar.
+ * @Date: 2023-11-24 13:55:00
+ * @LastEditors: Sugar.
+ * @LastEditTime: 22023-11-24 13:55:00
+ * @FilePath: \cattle_webui\src\views\team\teamMr\AddOrEditDialog.vue
+ * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
+-->
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="700px"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="dialog">
+      <el-form :model="form" ref="form" :rules="rules" label-width="150px">
+        <el-form-item label="账户余额:" prop="balance">
+          <span>{{ form.balance }}元</span>
+        </el-form-item>
+        <el-form-item label="充值金额:" prop="balanceValue">
+          <div style="display: flex;">
+            <el-input-number v-model="form.balanceValue" controls-position="right" placeholder="请输入充值金额"></el-input-number>
+            <span>元</span> 
+          </div>
+        </el-form-item>
+        <el-form-item label="充值凭证" prop="voucherUrl">
+            <div style="display: flex;">
+              <div 
+              v-for="(item,index) in form.voucherUrl" 
+              :key="index"
+              style="width: 100px; height: 100px;position: relative;border: 1px solid #999;border-radius: 5px;margin-right: 20px;">
+                <el-image 
+                  style="width: 100%; height: 100%"
+                  :src="item" 
+                  :preview-src-list="form.voucherUrl">
+                </el-image>
+                <span @click="handleRemove(index)" style="position: absolute;top: -15px;right: -15px;color: red;font-size: 24px;z-index: 999;cursor: pointer;">
+                  <i class="el-icon-error"></i>
+                </span>
+              </div>
+              <div 
+              style="width: 100px; height: 100px;" 
+              v-if="!form.voucherUrl||form.voucherUrl.length<1"
+              v-loading="actionUrlLoading"
+              element-loading-text="上传中..."
+              element-loading-spinner="el-icon-loading"
+              element-loading-background="rgba(0, 0, 0, 0.8)"
+              >
+                <el-upload
+                  class="avatar-uploader"
+                  :action="uploadObj.url"
+                  :headers="uploadObj.headers"
+                  :show-file-list="false"
+                  :before-upload="beforeAvatarUpload"
+                  :on-success="handleAvatarSuccess"
+                  :on-progress="handleAvatarProgress"
+                  :disabled="actionUrlLoading"
+                  :on-error="handleAvatarError"
+                  >
+                  <i class="el-icon-plus avatar-uploader-icon"></i>
+                </el-upload>
+              </div>
+              
+            </div>
+            <span>支持jpg、png的图片上传</span>
+          </el-form-item>
+      </el-form>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="cancel">取消</el-button>
+      <el-button
+        type="primary"
+        @click="submitForm"
+        v-loading.fullscreen.lock="loading"
+        element-loading-text="提交中..."
+        element-loading-spinner="el-icon-loading"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+      >
+        <span v-if="loading">提交中...</span>
+        <span v-else>保存</span>
+      </el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+// import { updateNoticeMgr } from "@/api/system/noticeMgr";
+import { rechargeBoxApi, getSelectById } from "@/api/team/teamMr";
+import Editor from "@/components/Editor";
+import { getToken } from "@/utils/auth";
+export default {
+  name: "addAndEdit",
+  components: {
+    Editor,
+  },
+  data() {
+    return {
+      title: "编辑",
+      model: "EDIT",
+      activeName: '01',
+      open: false,
+      loading: false,
+      form: {
+        id: undefined,
+        type: "",
+      },
+      rules: {
+        balanceValue: [{ required: true, message: "请输入充值金额", trigger: ["change","blur"] }],
+        voucherUrl: [{ required: true, message: "请输入重置凭证图片", trigger: ["change","blur"] }],
+      },
+      uploadObj: {
+        url: process.env.VUE_APP_UPLOAD_FILE_API + "/upload/single/minio",
+        Headers: { Authorization: "Bearer " + getToken() },
+      },
+      actionUrlLoading: false,
+    };
+  },
+  methods: {
+    /**
+     * 打开弹框
+     * @date 2023-11-22
+     * @param {any} obj
+     * @returns {any}
+     */
+    openDialog(title, obj) {
+      this.open = true;
+      this.title = title;
+      this.reset();
+      if (obj){
+        this.getSelectByIdApi(obj);
+      }else{
+        this.$nextTick(() => {
+          this.$refs["form"].clearValidate();
+        });
+      }
+    },
+    /** 获取详情 */
+    getSelectByIdApi(row) {
+      const id = row.id
+      getSelectById(id).then(response => {
+        const obj = {
+          ...response.data,
+          voucherUrl: [],
+        }
+        this.form = obj
+      });
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    submitForm() {
+      this.$refs["form"].validate(async (valid) => {
+        if (valid) {
+          try {
+            this.loading = true;
+            const { code } = await rechargeBoxApi({ 
+              id: this.form.id,
+              balanceValue: this.form.balanceValue,
+              voucherUrl: this.form.voucherUrl ? this.form.voucherUrl.join(','):''
+             });
+            if (code === 200) {
+              this.$message.success("操作成功!");
+              this.$emit("getList");
+              this.cancel();
+            }
+          } catch (error) {
+          } finally {
+            this.loading = false;
+          }
+        }
+      });
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      this.form = {}
+      if(this.$refs["form"]) {
+        this.$refs["form"].clearValidate();
+      }
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+     /**  上传图片 单张  */
+     handleAvatarSuccess(response, file, fileList) {
+      console.log("res, file",response, file, fileList)
+      this.actionUrlLoading = false
+      if(response.code == 200) {
+        this.form.voucherUrl.push(response.data.url)
+      }
+    },
+    beforeAvatarUpload(file) {
+      const isLt2M = file.size / 1024 / 1024 < 100;
+      let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
+      let typeList = ['png','jepg','jpg']
+      const isJPG = typeList.includes(testmsg);
+      if (!isJPG) {
+        this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
+      }
+      if (!isLt2M) {
+        this.$message.error('上传图片图片大小不能超过 100MB!');
+      }
+      return isJPG && isLt2M;
+    },
+    handleAvatarProgress(){
+      this.actionUrlLoading = true
+    },
+    handleAvatarError() {
+      this.actionUrlLoading = false
+    },
+    handleRemove(index) {
+      this.form.voucherUrl.splice(index,1)
+    },
+
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dialog {
+  padding: 0 30px;
+  max-height: 65vh;
+  overflow-y: auto;
+}
+.dialog {
+  padding: 0 30px;
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+::v-deep .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  ::v-deep .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  ::v-deep .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 100px;
+    height: 100px;
+    line-height: 100px;
+    text-align: center;
+  }
+  ::v-deep .avatar {
+    width: 100px;
+    height: 100px;
+    display: block;
+  }
+</style>

+ 76 - 9
src/views/team/teamMr/index.vue

@@ -62,7 +62,11 @@
           <el-button type="text" @click="seeCenter(scope.row, 'img')">查看</el-button>
         </template>
       </el-table-column>
-      <el-table-column label="状态" align="center" prop="status">
+      <el-table-column label="账户余额" align="center" prop="balance" />
+      <el-table-column label="授信额度" align="center" prop="grantQuota" />
+      <el-table-column label="授信余额" align="center" prop="grantSurplus" />
+      <el-table-column label="授信欠款" align="center" prop="grantUsed" />
+      <el-table-column label="账户状态" align="center" prop="status">
         <template slot-scope="scope">
           <el-switch
             @change="updateStatusApi(scope.row)"
@@ -73,31 +77,53 @@
           </el-switch>
         </template>
       </el-table-column>
-      <el-table-column label="添加时间" align="center" prop="createTime" width="160">
+      <el-table-column label="创建时间" align="center" prop="createTime">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime) }}</span>
         </template>
       </el-table-column>
+      <el-table-column label="审核状态" align="center" prop="checkStatus">
+        <template slot-scope="scope">
+          <el-tag type="info" v-if="scope.row.checkStatus == 0">待审核</el-tag>
+          <el-tag type="success" v-if="scope.row.checkStatus == 1">审核成功</el-tag>
+          <el-tag type="danger" v-if="scope.row.checkStatus == 2">审核不通过</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="审核时间" align="center" prop="checkTime" />
+      <el-table-column label="审核人" align="center" prop="checkBy" />
       <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
             type="text"
-            @click="handleUpdate(scope.row)"
+            @click="handleAudit(scope.row)"
             v-hasPermi="['teamMr:teamMr:edit']"
-          >修改</el-button>
+            v-if="scope.row.checkStatus == 0"
+          >审核</el-button>
           <el-button
             size="mini"
             type="text"
-            @click="resettingApi(scope.row)"
-            v-hasPermi="['teamMr:teamMr:resetting']"
-          >重置密码</el-button>
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['teamMr:teamMr:edit']"
+            v-if="scope.row.checkStatus == 2"
+          >修改重新提交</el-button>
           <el-button
             size="mini"
             type="text"
             @click="handleDelete(scope.row,scope.index)"
             v-hasPermi="['teamMr:teamMr:delete']"
           >删除</el-button>
+          <el-dropdown v-if="scope.row.checkStatus == 1" size="mini" @command="(command) => handleCommand(command, scope.row,scope.index)">
+            <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item command="handleResetPwd" icon="el-icon-key"
+                v-hasPermi="['teamMr:teamMr:resetting']">重置密码</el-dropdown-item>
+              <el-dropdown-item command="rechargeBox" icon="el-icon-key"
+                >账户充值</el-dropdown-item>
+              <el-dropdown-item command="creditGranting" icon="el-icon-circle-check"
+              >账户授信</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
         </template>
       </el-table-column>
     </el-table>
@@ -117,7 +143,20 @@
       @getList="getList"
     />
 
+    <!-- 账户充值 -->
+    <rechargeBox
+      ref="rechargeBox"
+      @getList="getList"
+    />
 
+    <!-- 账户授信 -->
+    <creditGranting
+      ref="creditGranting"
+      @getList="getList"
+    />
+
+    <!-- 详情 / 审核 -->
+    <auditBox ref="auditBox" :dict="dict" @getList="getList" />
     <el-dialog
       title="查看"
       :visible.sync="visibleStatus"
@@ -148,11 +187,13 @@
 
 import { pageList, deleteById, updateStatus } from '@/api/team/teamMr'
 import addAndEdit from "./dialog/addAndEdit.vue";
-
+import creditGranting from './dialog/creditGranting.vue';
+import rechargeBox from './dialog/rechargeBox.vue';
+import auditBox from './dialog/auditBox.vue';
 export default {
   name: "agreement",
   dicts: ['team_type'],
-  components: { addAndEdit },
+  components: { addAndEdit, creditGranting, rechargeBox, auditBox },
   data() {
     return {
       // 遮罩层
@@ -235,6 +276,10 @@ export default {
     handleUpdate(row) {
       this.$refs["addAndEdit"].openDialog("修改数据", row);
     },
+    /** 详情 或 审核  */
+    handleAudit(row) {
+      this.$refs["auditBox"].openDialog("审核数据", row);
+    },
     /** 启用或者禁用按钮操作 */
     updateStatusApi(row) {
       this.$confirm("是否对团队名称为" + row.name + "的数据进行" + (row.status == 1 ? '禁用?' : '启用?'), '提示', {
@@ -288,6 +333,28 @@ export default {
       if(obj.contractImg){
         this.newObj.contractImgList = obj.contractImg.split(',')
       }
+    },
+    // 更多操作触发
+    handleCommand(command, row,index) {
+      switch (command) {
+        case "handleResetPwd": // 重置密码
+            this.resettingApi(row);
+            break;
+        case "rechargeBox":
+            this.rechargeBoxFun(row);
+            break;
+        case "creditGranting":
+            this.creditGrantingFun(row);
+            break;
+        default:
+            break;
+        }
+    },
+    creditGrantingFun(row) {
+      this.$refs["creditGranting"].openDialog("账户授信", row);
+    },
+    rechargeBoxFun(row) {
+      this.$refs["rechargeBox"].openDialog("账户充值", row);
     }
   }
 };

+ 6 - 6
src/views/ticket/ticketMr/dialog/addAndEdit.vue

@@ -33,14 +33,14 @@
             </el-form-item>
             <el-form-item label="散客是否实名:" prop="ifRealUser">
               <el-radio-group v-model="form.ifRealUser">
-                <el-radio label="0">否</el-radio>
-                <el-radio label="1">是</el-radio>
+                <el-radio :label="0">否</el-radio>
+                <el-radio :label="1">是</el-radio>
               </el-radio-group>
             </el-form-item>
             <el-form-item label="团购是否实名:" prop="ifRealTeam">
               <el-radio-group v-model="form.ifRealTeam">
-                <el-radio label="0">否</el-radio>
-                <el-radio label="1">是</el-radio>
+                <el-radio :label="0">否</el-radio>
+                <el-radio :label="1">是</el-radio>
               </el-radio-group>
             </el-form-item>
             <el-form-item label="停止售卖时间:" prop="stopSaleTime">
@@ -437,8 +437,8 @@ export default {
             this.$set(this.form, 'saleTimeAll', [obj.goodsPerform.saleBeginTime,obj.goodsPerform.saleEndTime]);
           }
 
-          this.$set(this.form, 'ifRealUser', obj.goodsPerform.ifRealUser?obj.goodsPerform.ifRealUser:null);  
-          this.$set(this.form, 'ifRealTeam', obj.goodsPerform.ifRealTeam?obj.goodsPerform.ifRealUser:null);  
+          this.$set(this.form, 'ifRealUser', obj.goodsPerform.ifRealUser);  
+          this.$set(this.form, 'ifRealTeam', obj.goodsPerform.ifRealTeam);  
         });
       });
     },

+ 33 - 2
src/views/windowTicketSales/model/increaseViewers.vue

@@ -173,12 +173,13 @@
                     <el-radio-group v-model="ruleForm.paymentType">
                         <el-radio label="1">扫码</el-radio>
                         <el-radio label="2">现金</el-radio>
+                        <el-radio label="3">对公支付</el-radio>
                     </el-radio-group>
                 </el-form-item>
                 <el-form-item label="应付金额 :">
                     ¥{{ moneyAll }}元
                 </el-form-item>
-                <el-form-item v-if="ruleForm.paymentType == 2" label="实付金额 :" prop="realPrice">
+                <el-form-item v-if="ruleForm.paymentType == 2 || ruleForm.paymentType == 3" label="实付金额 :" prop="realPrice">
                     <el-input @input="setRealPrice" style="width: 200px;" v-model="ruleForm.realPrice"></el-input>
                 </el-form-item>
                 <el-form-item label="找零金额 :" v-if="ruleForm.paymentType == 2">
@@ -245,6 +246,7 @@ import {
   orderInfoSubmit,
   gotoMicroPay,
   gotoCashPay,
+  gotoCorporatePay,
   payQuery,
   selectRegion,
   orderInfoCancel,
@@ -629,6 +631,8 @@ import {
                     this.orderId = res.data.orderId
                     if(this.ruleForm.paymentType == 2) {
                         this.gotoCashPayFun(this.orderId)
+                    }else if(this.ruleForm.paymentType == 3) { // 对公支付
+                        this.gotoCorporatePayFun(this.orderId)
                     }else {
                         // 扫码支付
                         this.loading = false
@@ -677,7 +681,34 @@ import {
                 this.payStatus = 6
             }
         },
-
+        /**  对公支付  */
+        async gotoCorporatePayFun(orderId) {
+            this.loading = true
+            try {
+                this.loadingText = "订单入库中..."
+                let res = await gotoCorporatePay({
+                    "orderId": orderId, // 订单编号-提交订单返回
+                    "payAmount": this.ruleForm.realPrice
+                })
+                if(res.code == 200){
+                    if(this.payTime){
+                        clearInterval(this.payTime)
+                    }
+                    this.payTimeNum = 0
+                    this.payTime = setInterval(()=>{
+                        this.payQueryFun(this.orderId)
+                    },1000)
+                }else{
+                    this.$message.error('订单入库中失败!!!');
+                    this.loading = false
+                    this.payStatus = 3
+                }
+            } catch (error) {
+                this.$message.error('订单入库中失败!!!');
+                this.loading = false
+                this.payStatus = 3
+            }
+        },
          /**  订单现金支付  */
          async gotoCashPayFun(orderId){
             this.loading = true