大宝管理后台代码
zzzz
2024-04-22 4e4b6e218ad4a875c46661e15634e466d4135171
Merge branch 'ziyouqishi' into api.essencefunds.com

* ziyouqishi:
first
7 files modified
1 files added
421 ■■■■ changed files
.env.development 2 ●●● patch | view | raw | blame | history
src/api/capital.js 69 ●●●●● patch | view | raw | blame | history
src/api/home.js 2 ●●● patch | view | raw | blame | history
src/config/router.config.js 6 ●●●●● patch | view | raw | blame | history
src/views/capital/rechargelist.vue 48 ●●●● patch | view | raw | blame | history
src/views/logmanage/running-log.vue 259 ●●●●● patch | view | raw | blame | history
src/views/newshares/newshareslist.vue 24 ●●●● patch | view | raw | blame | history
src/views/userlist/components/editCapitaluserdialog.vue 11 ●●●●● patch | view | raw | blame | history
.env.development
@@ -2,7 +2,7 @@
VUE_APP_PREVIEW=true
# VUE_APP_API_BASE_URL=http://www.jqydl.com:8091/
#  VUE_APP_API_BASE_URL=https://api.3falcon.com/
 VUE_APP_API_BASE_URL=http://192.168.0.106:8091/
 VUE_APP_API_BASE_URL=https://api.marwadi.online/
# VUE_APP_API_BASE_URL=https://www.rksv.store:8091/
# VUE_APP_API_BASE_URL=http://www.ojwuf.com:8091/
# VUE_APP_API_BASE_URL=https://192.168.0.102:8091/
src/api/capital.js
@@ -1,16 +1,17 @@
import request from '@/utils/request'
import qs from 'qs'
const userApi = {
    rechargelist: '/admin/recharge/list.do', // 充值列表
    rechargedel: '/admin/recharge/del.do', // 充值列表删除
    rechargeupdateState: '/admin/recharge/updateState.do', // 充值列表修改状态
    rechargecreateOrder: '/admin/recharge/createOrder.do', // 新增充值订单
    rechargeexport: '/admin/recharge/export.do', // 充值订单导出
    withdrawlist: '/admin/withdraw/list.do', // 提现列表
    withdrawupdateState: 'admin/withdraw/updateState.do', // 提现列表修改状态
    withdrawexport: '/admin/withdraw/export.do', // 提现列表导出
    cashlist: '/admin/cash/list.do', // 资金记录
    logtransList: '/admin/log/transList.do' // 资金互转记录
  rechargelist: '/admin/recharge/list.do', // 充值列表
  rechargedel: '/admin/recharge/del.do', // 充值列表删除
  rechargeupdateState: '/admin/recharge/updateState.do', // 充值列表修改状态
  rechargecreateOrder: '/admin/recharge/createOrder.do', // 新增充值订单
  rechargeexport: '/admin/recharge/export.do', // 充值订单导出
  withdrawlist: '/admin/withdraw/list.do', // 提现列表
  withdrawupdateState: 'admin/withdraw/updateState.do', // 提现列表修改状态
  withdrawexport: '/admin/withdraw/export.do', // 提现列表导出
  cashlist: '/admin/cash/list.do', // 资金记录
  logtransList: '/admin/log/transList.do', // 资金互转记录
  moneylog: '/admin/moneylog/moneylogAll.do', // 资金互转记录
}
/**
@@ -25,84 +26,92 @@
 * @returns {*}
 */
export function rechargelist (parameter) {
export function rechargelist(parameter) {
  return request({
    url: userApi.rechargelist,
    method: 'post',
    data: qs.stringify(parameter)
    data: qs.stringify(parameter),
  })
}
export function rechargedel (parameter) {
export function rechargedel(parameter) {
  return request({
    url: userApi.rechargedel,
    method: 'post',
    data: qs.stringify(parameter)
    data: qs.stringify(parameter),
  })
}
export function rechargeupdateState (parameter) {
export function rechargeupdateState(parameter) {
  return request({
    url: userApi.rechargeupdateState,
    method: 'post',
    data: qs.stringify(parameter)
    data: qs.stringify(parameter),
  })
}
export function rechargecreateOrder (parameter) {
export function rechargecreateOrder(parameter) {
  return request({
    url: userApi.rechargecreateOrder,
    method: 'post',
    data: qs.stringify(parameter)
    data: qs.stringify(parameter),
  })
}
export function rechargeexport (parameter) {
export function rechargeexport(parameter) {
  return request({
    url: userApi.rechargeexport,
    method: 'post',
    responseType: 'blob',
    data: qs.stringify(parameter)
    data: qs.stringify(parameter),
  })
}
export function withdrawlist (parameter) {
export function withdrawlist(parameter) {
  return request({
    url: userApi.withdrawlist,
    method: 'post',
    data: qs.stringify(parameter)
    data: qs.stringify(parameter),
  })
}
export function withdrawupdateState (parameter) {
export function withdrawupdateState(parameter) {
  return request({
    url: userApi.withdrawupdateState,
    method: 'post',
    data: qs.stringify(parameter)
    data: qs.stringify(parameter),
  })
}
export function withdrawexport (parameter) {
export function withdrawexport(parameter) {
  return request({
    url: userApi.withdrawexport,
    method: 'post',
    responseType: 'blob',
    data: qs.stringify(parameter)
    data: qs.stringify(parameter),
  })
}
export function cashlist (parameter) {
export function cashlist(parameter) {
  return request({
    url: userApi.cashlist,
    method: 'post',
    data: qs.stringify(parameter)
    data: qs.stringify(parameter),
  })
}
export function logtransList (parameter) {
export function logtransList(parameter) {
  return request({
    url: userApi.logtransList,
    method: 'post',
    data: qs.stringify(parameter)
    data: qs.stringify(parameter),
  })
}
export function moneylog(parameter) {
  return request({
    url: userApi.moneylog,
    method: 'post',
    data: qs.stringify(parameter),
  })
}
src/api/home.js
@@ -113,7 +113,7 @@
  })
}
export function updateMoney (parameter) {
  console.log(3333)
  return request({
    url: '/admin/updateMoney.do',
    method: 'post',
src/config/router.config.js
@@ -258,6 +258,12 @@
            component: () => import('@/views/logmanage/loginlog'),
            meta: { title: '登录日志', keepAlive: true, permission: ['loginlog'] },
          },
          {
            path: '/logmanage/running-log',
            name: 'running-log',
            component: () => import('@/views/logmanage/running-log'),
            meta: { title: '流水日志', keepAlive: true, permission: ['loginlog'] },
          },
          // {
          //   path: '/logmanage/smslog',
          //   name: 'smslog',
src/views/capital/rechargelist.vue
@@ -65,9 +65,9 @@
                      @click=";(queryParam.pageNum = 1), getlist()"
                      >查询
                    </a-button>
                    <a-button type="primary" icon="plus" style="margin-left: 8px" @click="addOrderdialog = true"
                    <!-- <a-button type="primary" icon="plus" style="margin-left: 8px" @click="addOrderdialog = true"
                      >创建充值订单
                    </a-button>
                    </a-button> -->
                    <a-button type="primary" icon="vertical-align-bottom" style="margin-left: 8px" @click="getexport"
                      >导出搜索数据
                    </a-button>
@@ -243,28 +243,28 @@
          dataIndex: 'orderSn',
          align: 'center',
        },
        {
          title: '账户类型',
          dataIndex: 'assetsType',
          align: 'center',
          customRender: (text, row, index) => {
            switch (text) {
              case 'US':
                return '美股账户'
              case 'MAS':
                return '马股账户'
              default:
                return '未知账户'
            }
          },
        },
        {
          title: '上传凭证',
          dataIndex: 'img',
          align: 'center',
          width: 180,
          scopedSlots: { customRender: 'img' },
        },
        // {
        //   title: '账户类型',
        //   dataIndex: 'assetsType',
        //   align: 'center',
        //   customRender: (text, row, index) => {
        //     switch (text) {
        //       case 'US':
        //         return '美股账户'
        //       case 'MAS':
        //         return '马股账户'
        //       default:
        //         return '未知账户'
        //     }
        //   },
        // },
        // {
        //   title: '上传凭证',
        //   dataIndex: 'img',
        //   align: 'center',
        //   width: 180,
        //   scopedSlots: { customRender: 'img' },
        // },
        {
          title: '客户电话',
          dataIndex: 'userPhone',
src/views/logmanage/running-log.vue
New file
@@ -0,0 +1,259 @@
<template>
  <page-header-wrapper>
    <a-card :bordered="false">
      <a-card :bordered="false">
        <div class="table-page-search-wrapper">
          <a-form layout="inline">
            <a-row :gutter="48">
              <a-col :md="12" :lg="6" :sm="24">
                <a-form-item label="用户Id">
                  <a-input v-model="queryParam.userId" style="width: 100%" placeholder="请输入用户Id" />
                </a-form-item>
              </a-col>
              <!-- <a-col :md="12" :lg="6" :sm="24">
                <a-form-item label="用户手机号">
                  <a-input v-model="queryParam.phone" style="width: 100%" placeholder="请输入用户手机号" />
                </a-form-item>
              </a-col> -->
              <a-col :md="12" :lg="8" :sm="24">
                <a-form-item>
                  <span class="table-page-search-submitButtons">
                    <a-button @click="getqueryParam" icon="redo"> 重置</a-button>
                    <a-button
                      type="primary"
                      icon="search"
                      style="margin-left: 8px"
                      @click=";(queryParam.pageNum = 1), getlist()"
                      >查询
                    </a-button>
                  </span>
                </a-form-item>
              </a-col>
            </a-row>
          </a-form>
        </div>
      </a-card>
      <a-table
        bordered
        :loading="loading"
        :pagination="pagination"
        :columns="columns"
        :data-source="datalist"
        rowKey="id"
      >
        <span slot="orderStatus" slot-scope="text, record">
          <template>
            <div>
              <a-tag
                :color="
                  record.orderStatus == 0
                    ? 'blue'
                    : record.orderStatus == 1
                    ? 'green'
                    : record.orderStatus == 2
                    ? 'red'
                    : 'orange'
                "
              >
                {{
                  record.orderStatus == 0
                    ? '审核中'
                    : record.orderStatus == 1
                    ? '充值成功'
                    : record.orderStatus == 2
                    ? '充值失败'
                    : '订单取消'
                }}
              </a-tag>
            </div>
          </template>
        </span>
      </a-table>
    </a-card>
  </page-header-wrapper>
</template>
<script>
import { moneylog, rechargedel } from '@/api/capital'
import { nextagent } from '@/api/home'
import pick from 'lodash.pick'
import fileDownload from 'js-file-download'
import moment from 'moment'
export default {
  name: 'Rechargelist',
  data() {
    return {
      columns: [
        {
          title: '帐变ID',
          dataIndex: 'id',
          align: 'center',
        },
        {
          title: '(ID)',
          dataIndex: 'userId',
          align: 'center',
        },
        // {
        //   title: '用户手机号',
        //   dataIndex: 'phone',
        //   align: 'center',
        // },
        {
          title: '帐变前',
          dataIndex: 'after',
          align: 'center',
        },
        {
          title: '帐变数量',
          dataIndex: 'amount',
          align: 'center',
        },
        {
          title: '帐变后',
          dataIndex: 'beFore',
          align: 'center',
        },
        {
          title: '操作时间',
          dataIndex: 'createTime',
          align: 'center',
          customRender: (text, row, index) => {
            return text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : ''
          },
        },
        {
          title: '描述',
          dataIndex: 'descs',
          align: 'center',
        },
      ],
      // 表头
      pagination: {
        total: 0,
        pageSize: 10, // 每页中显示10条数据
        showSizeChanger: true,
        pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据
        onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示
        onChange: (page, pageSize) => this.onPageChange(page, pageSize), // 点击页码事件
        showTotal: (total) => `共有 ${total} 条数据`, // 分页中显示总的数据
      },
      loading: false,
      queryParam: {
        pageNum: 1,
        pageSize: 10,
        agentId: undefined,
        state: undefined,
        userId: '',
        realName: '',
        beginTime: '',
        endTime: '',
      },
      datalist: [],
      agentlist: [],
      agentloading: false,
      times: [],
      editOrderform: this.$form.createForm(this),
      editOrderdialog: false,
      editOrderDialogloading: false,
      fields: ['chargeId', 'state'],
      addOrderform: this.$form.createForm(this),
      addOrderdialog: false,
      addOrderDialogloading: false,
      agentqueryParam: {
        pageNum: 1,
        pageSize: 100,
      },
    }
  },
  created() {
    this.getlist()
  },
  methods: {
    // 删除充值订单
    getDelorder(val) {
      var that = this
      this.$confirm({
        title: '提示',
        content: '确认删除充值订单吗?此操作不可恢复',
        onOk() {
          var data = {
            cId: val,
          }
          rechargedel(data).then((res) => {
            if (res.status == 0) {
              that.$message.success(res.msg)
              that.getlist()
            } else {
              that.$message.error(res.msg)
            }
          })
        },
        onCancel() {
          console.log('Cancel')
        },
      })
    },
    onChangeRangeDate(value, dateString) {
      this.queryParam.beginTime = dateString[0]
      this.queryParam.endTime = dateString[1]
    },
    getqueryParam() {
      this.queryParam = {
        pageNum: 1,
        pageSize: 10,
        agentId: undefined,
        state: undefined,
        userId: '',
        realName: '',
        beginTime: '',
        endTime: '',
      }
      this.times = []
    },
    getagentlist() {
      var that = this
      this.agentloading = true
      nextagent(this.agentqueryParam).then((res) => {
        this.agentlist = res.data.list
        setTimeout(() => {
          that.agentloading = false
        }, 500)
      })
    },
    getlist() {
      var that = this
      this.loading = true
      moneylog(this.queryParam).then((res) => {
        console.log(res.data)
        this.datalist = res.data.records
        this.pagination.total = res.data.total || 0
        setTimeout(() => {
          that.loading = false
        }, 500)
      })
    },
    onPageChange(page) {
      this.queryParam.pageNum = page
      this.getlist()
    },
    onSizeChange(current, pageSize) {
      this.queryParam.pageNum = current
      this.queryParam.pageSize = pageSize
      this.getlist()
    },
  },
}
</script>
<style scoped>
.greens {
  color: #52c41a;
}
.reds {
  color: #f5222d;
}
</style>
src/views/newshares/newshareslist.vue
@@ -185,24 +185,24 @@
        </a-row>
        <a-row :gutter="48">
          <a-col :md="12" :lg="12" :sm="12">
            <a-form-item label="认缴时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
            <a-form-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-date-picker
                show-time
                style="width: 100%"
                @change="getsubscriptionTime"
                v-decorator="['subscriptionTime', { rules: [{ required: true, message: '请填写认缴时间' }] }]"
                v-decorator="['subscriptionTime', { rules: [{ required: true, message: '请填写开始时间' }] }]"
                format="YYYY-MM-DD HH:mm:ss"
              >
              </a-date-picker>
            </a-form-item>
          </a-col>
          <a-col :md="12" :lg="12" :sm="12">
            <a-form-item label="申购时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
            <a-form-item label="结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-date-picker
                show-time
                style="width: 100%"
                @change="getsubscribeTime"
                v-decorator="['subscribeTime', { rules: [{ required: true, message: '请填写申购时间' }] }]"
                v-decorator="['subscribeTime', { rules: [{ required: true, message: '请填写结束时间' }] }]"
                format="YYYY-MM-DD HH:mm:ss"
              >
              </a-date-picker>
@@ -276,15 +276,15 @@
          align: 'center',
          scopedSlots: { customRender: 'type' },
        },
        {
          title: '股票类型',
          dataIndex: 'stockType',
          align: 'center',
          scopedSlots: { customRender: 'stockType' },
        },
        // {
        //   title: '股票类型',
        //   dataIndex: 'stockType',
        //   align: 'center',
        //   scopedSlots: { customRender: 'stockType' },
        // },
        {
          title: '申购时间',
          title: '结束时间',
          dataIndex: 'subscribeTime',
          align: 'center',
          customRender: (text, row, index) => {
@@ -292,7 +292,7 @@
          },
        },
        {
          title: '认缴时间',
          title: '开始时间',
          dataIndex: 'subscriptionTime',
          align: 'center',
          customRender: (text, row, index) => {
src/views/userlist/components/editCapitaluserdialog.vue
@@ -26,7 +26,7 @@
            <a-select-option value="1">扣款</a-select-option>
            <a-select-option value="0">入款</a-select-option>
            <a-select-option value="2">充值</a-select-option>
            <a-select-option value="3">提币</a-select-option>
            <!-- <a-select-option value="3">提币</a-select-option> -->
          </a-select>
        </a-form-item>
        <a-form-item label="账户" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -111,12 +111,15 @@
    OkeditUserdialog() {
      const form = this.$refs.editUserform.form
      form.validateFields((errors, values) => {
        console.log(values, 'from')
        console.log(values, 'from', !errors)
        const arr = this.activeArr.filter((item) => item.accectType === values.accectType)
        const amt = values.direction == '1' ? 0 - Number(values.amt) : Number(values.amt)
        const amt = values.amt
        console.log(arr)
        if (!errors) {
          this.editUserDialogloading = true
          updateMoney({ id: arr[0].id, amt: amt }).then((res) => {
          console.log({ id: arr[0].id, amt: amt, type: this.direction })
          updateMoney({ id: arr[0].id, amt: amt, type: values.direction }).then((res) => {
            if (res.status == 0) {
              this.editUserdialog = false
              this.$message.success(res.msg)