IntegralDetails.vue 5.8 KB
Newer Older
宋雄's avatar
宋雄 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
<template>
  <a-spin :spinning="confirmLoading">
    <div class="title-top">
      <h3>积分详情</h3>
      <div class="button">
        <a-button @click="onCancel">返回</a-button>
      </div>
    </div>

    <j-form-container :disabled="true">
      <a-form-model ref="form" :model="model" slot="detail">
        <a-card title="基本信息">
          <a-row>
            <a-col :span="12">
              <a-form-model-item label="用户账号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ownerId">
                <a-input v-model="model.ownerId" placeholder="请输入用户账号"></a-input>
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item label="用户昵称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nickName">
                <a-input v-model="model.nickName" placeholder="请输入用户昵称"></a-input>
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item label="所属物业集团" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="propertyName">
                <a-input v-model="model.propertyName" placeholder="请输入所属物业集团"></a-input>
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item label="所属小区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="platformName">
                <a-input v-model="model.platformName" placeholder="请输入所属小区"></a-input>
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item label="可用积分" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="availableIntegral">
                <a-input v-model="model.availableIntegral" placeholder="请输入可用积分"></a-input>
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item label="历史总积分" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="historyIntegral">
                <a-input v-model="model.historyIntegral" placeholder="请输入历史总积分"></a-input>
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item label="系统冻结积分" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="systemFreezeIntegral">
                <a-input v-model="model.systemFreezeIntegral" placeholder="请输入系统冻结积分"></a-input>
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item label="手动冻结积分" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manualFreezeIntegral">
                <a-input v-model="model.manualFreezeIntegral" placeholder="请输入手动冻结积分"></a-input>
              </a-form-model-item>
            </a-col>
          </a-row>
        </a-card>
      </a-form-model>
    </j-form-container>
    <a-card title="数据列表">
      <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"
      >
        <span slot="paymentNo" slot-scope="text, record">
宋雄's avatar
宋雄 committed
72 73
          <span v-if="record.type === 'payPropertyFee'">{{record.paymentNo}}</span>
          <span v-else style="color:blue;cursor:pointer" @click="onPayDetail(record.orderId)">{{record.paymentNo}}</span>
宋雄's avatar
宋雄 committed
74 75 76 77 78 79 80 81 82 83 84 85
        </span>
        <span slot="type" slot-scope="text, record">
          <span>{{record.type === 'scanQrCodePay' ? '扫码支付' : '抵扣物业费'}}</span>              
        </span>
      </a-table>
    </a-card>
  </a-spin>
</template>

<script>
import { queryByIdIntegralDetailApi } from '@/api/api'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
宋雄's avatar
宋雄 committed
86
import { filterDictTextByStatic, PAY_WAY } from '@/assets/static.js'
宋雄's avatar
宋雄 committed
87 88 89 90 91 92 93 94 95 96 97 98 99
const columns = [
  {
    title: '支付订单编号',
    dataIndex: 'paymentNo',
    key: 'paymentNo',
    align: 'center',
    scopedSlots: { customRender: 'paymentNo' }
  },
  {
    title: '操作类型',
    dataIndex: 'type',
    key: 'type',
    align: 'center',
宋雄's avatar
宋雄 committed
100 101 102
    customRender: function (text) {
      return filterDictTextByStatic(PAY_WAY, text)
    }
宋雄's avatar
宋雄 committed
103 104
  },
  {
宋雄's avatar
宋雄 committed
105
    title: '积分变化',
宋雄's avatar
宋雄 committed
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
    dataIndex: 'integralChange',
    key: 'integralChange',
    align: 'center',
  },
  {
    title: '时间',
    dataIndex: 'createTime',
    key: 'createTime',
    align: 'center',
  }
]
export default {
  name: 'PropertySettledForm',
  inject: ['closeCurrent'],
  mixins: [JeecgListMixin],
  data() {
    return {
      model: {},
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 },
      },
      confirmLoading: false,
      columns: columns,
      disableMixinCreated: true,
      url: {
        list: ''
      }
    }
  },
  methods: {
    async getPageDetail() {
      let { result } = await queryByIdIntegralDetailApi({ id: this.$route.query.id })
      this.model = {...result}
    },
宋雄's avatar
宋雄 committed
145 146 147 148
    onPayDetail(id) {
      this.$router.push({
        path: '/refund/RefundDetails?id=' + id +'&type=1'
      })      
宋雄's avatar
宋雄 committed
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
    },
    onCancel() {
      this.closeCurrent()
    }
  },
  mounted() {
    this.getPageDetail()
    this.url.list = `/property-central/integral/integralRecord/ownerIntegralList?phone=${this.$route.query.phone}&platformCode=${this.$route.query.platformCode}`
    this.loadData();
  }
}
</script>
<style lang="less" scoped>
.title-top {
  background: #fff;
  padding: 0 25px;
  line-height: 50px;
  height: 50px;
  margin-bottom: 5px;
  h3 {
    font-weight: bold;
    display: inline-block;
  }
  .button {
    float: right;
    .ant-btn {
      margin-left: 15px;
    }
  }
}
</style>