SettlementList.vue 4.8 KB
Newer Older
何忠建's avatar
何忠建 committed
1 2 3 4 5 6 7
<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :md="5" :sm="8">
何忠建's avatar
何忠建 committed
8 9
            <a-form-item label="结算单号">
              <j-input placeholder="请输入结算单号" v-model="queryParam.balanceNum"></j-input>
何忠建's avatar
何忠建 committed
10 11 12 13
            </a-form-item>
          </a-col>
          <a-col :md="5" :sm="8">
            <a-form-item label="状态">
何忠建's avatar
何忠建 committed
14 15 16 17
              <a-select style="width: 100%" v-model="queryParam.balanceStatus" placeholder="请选择状态">
                <a-select-option v-for="item in chargeList" :key="item.type"
                  :value="item.type">{{item.name}}</a-select-option>
              </a-select>
何忠建's avatar
何忠建 committed
18 19
            </a-form-item>
          </a-col>
何忠建's avatar
何忠建 committed
20
          <a-col :md="8" :sm="8">
何忠建's avatar
何忠建 committed
21
            <a-form-item label="订单时间">
何忠建's avatar
何忠建 committed
22
              <a-range-picker @change="onChangeData" :value="createTimeValue" />
何忠建's avatar
何忠建 committed
23 24 25 26 27 28 29 30 31 32
            </a-form-item>
          </a-col>
          <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
            <a-col :md="5" :sm="24">
              <a-button type="primary" @click="searchQuery">查询</a-button>
              <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
            </a-col>
          </span>
        </a-row>
      </a-form>
何忠建's avatar
何忠建 committed
33
    </div>
何忠建's avatar
何忠建 committed
34 35
    <!-- 操作按钮区域 -->
    <div class="table-operator">
何忠建's avatar
何忠建 committed
36
      <a-button @click="propertyDetails(1)" type="primary">申请结算</a-button>
何忠建's avatar
何忠建 committed
37 38 39 40 41 42
    </div>
    <!-- table区域-begin -->
    <div>
      <a-table ref="table" size="middle" :scroll="{x:true}" bordered rowKey="id" :columns="columns"
        :dataSource="dataSource" :pagination="ipagination" :loading="loading" class="j-table-force-nowrap"
        @change="handleTableChange">
何忠建's avatar
何忠建 committed
43 44 45 46 47
        <span slot="balanceStatus" slot-scope="text, record">
          <a-tag color="blue" v-if="record.balanceStatus === 2">结算待审核</a-tag>
          <a-tag color="green" v-else-if="record.balanceStatus === 3">已结算</a-tag>
          <a-tag color="red" v-else-if="record.balanceStatus === 4">结算驳回</a-tag>
        </span>
何忠建's avatar
何忠建 committed
48
        <span slot="action" slot-scope="text, record">
何忠建's avatar
何忠建 committed
49
          <a type="primary" @click="propertyDetails(2,record.id)">详情</a>
何忠建's avatar
何忠建 committed
50 51 52 53 54 55 56 57
        </span>
      </a-table>

    </div>
  </a-card>
</template>

<script>
何忠建's avatar
何忠建 committed
58
//import { auditPropertyApi, freezeOrPropertyApi } from '@/api/api'
何忠建's avatar
何忠建 committed
59 60 61 62 63
import { JeecgListMixin } from '@/mixins/JeecgListMixin'

const columns = [
  {
    title: '结算单号',
何忠建's avatar
何忠建 committed
64 65
    dataIndex: 'balanceNum',
    key: 'balanceNum',
何忠建's avatar
何忠建 committed
66 67 68 69
    align: 'center',
  },
  {
    title: '提交时间',
何忠建's avatar
何忠建 committed
70 71
    dataIndex: 'createTime',
    key: 'createTime',
何忠建's avatar
何忠建 committed
72 73 74 75
    align: 'center',
  },
  {
    title: '提交人',
何忠建's avatar
何忠建 committed
76 77
    dataIndex: 'createBy',
    key: 'createBy',
何忠建's avatar
何忠建 committed
78 79 80 81
    align: 'center',
  },
  {
    title: '结算总金额',
何忠建's avatar
何忠建 committed
82 83
    dataIndex: 'balanceMoney',
    key: 'balanceMoney',
何忠建's avatar
何忠建 committed
84 85 86 87
    align: 'center',
  },
  {
    title: '账单数量',
何忠建's avatar
何忠建 committed
88 89
    dataIndex: 'balanceCount',
    key: 'balanceCount',
何忠建's avatar
何忠建 committed
90 91 92 93
    align: 'center',
  },
  {
    title: '结算方式',
何忠建's avatar
何忠建 committed
94 95
    dataIndex: 'balanceWay',
    key: 'balanceWay',
何忠建's avatar
何忠建 committed
96 97 98 99
    align: 'center',
  },
  {
    title: '结算状态',
何忠建's avatar
何忠建 committed
100 101 102
    dataIndex: 'balanceStatus',
    scopedSlots: { customRender: 'balanceStatus' },
    key: 'balanceStatus',
何忠建's avatar
何忠建 committed
103 104 105 106 107 108 109 110 111 112 113 114 115
    align: 'center',
  },
  {
    title: '操作',
    dataIndex: 'action',
    scopedSlots: { customRender: 'action' },
    align: 'center',
    fixed: 'right',
    width: 150,
  },
]

export default {
何忠建's avatar
何忠建 committed
116
  components: {},
何忠建's avatar
何忠建 committed
117
  name: 'SettlementList',
何忠建's avatar
何忠建 committed
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
  mixins: [JeecgListMixin],
  data() {
    return {
      model: {},
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 },
      },
      columns: columns,
      loading: false,
      url: {
何忠建's avatar
何忠建 committed
133
        list: '/property-central/partners/shareBalance/list',
何忠建's avatar
何忠建 committed
134
      },
何忠建's avatar
何忠建 committed
135
      dataSource: [],
何忠建's avatar
何忠建 committed
136
      confirmLoading: false,
何忠建's avatar
何忠建 committed
137 138 139 140 141
      chargeList: [
        { type: 2, name: '结算待审核' },
        { type: 3, name: '已结算' },
        { type: 4, name: '结算驳回' },
      ],
何忠建's avatar
何忠建 committed
142 143 144
    }
  },
  methods: {
何忠建's avatar
何忠建 committed
145 146 147 148 149 150
    onChangeData(date, dateString) {
      if (dateString.length > 0) {
        this.createTimeValue = date
        this.queryParam.createTime_begin = dateString[0]
        this.queryParam.createTime_end = dateString[1]
      }
何忠建's avatar
何忠建 committed
151 152 153 154
    },
    initPageParams(params) {
      params['platformType'] = 'partner'
    },
何忠建's avatar
何忠建 committed
155
    propertyDetails(type, id) {
何忠建's avatar
何忠建 committed
156 157 158 159
      if (type == 1) {
        this.$router.push({
          path: '/benefiting/SettlementDetails?type=add',
        })
何忠建's avatar
何忠建 committed
160
      } else if (type == 2) {
何忠建's avatar
何忠建 committed
161 162 163 164
        this.$router.push({
          path: '/benefiting/SettlementDetails?type=detail&id=' + id,
        })
      }
何忠建's avatar
何忠建 committed
165 166 167 168 169 170 171
    },
  },
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>