ReconciliationDetails.vue 7.8 KB
Newer Older
何忠建's avatar
何忠建 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
<template>
  <a-spin :spinning="confirmLoading">
    <div class="title-top">
      <h3>{{title}}</h3>
      <div class="button">
        <a-button @click="toReturn">返回</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">
何忠建's avatar
何忠建 committed
15 16
              <a-form-model-item label="订单编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-input v-model="model.orderNum" placeholder="订单编号"></a-input>
何忠建's avatar
何忠建 committed
17 18
              </a-form-model-item>
            </a-col>
何忠建's avatar
何忠建 committed
19 20 21 22 23
            <a-col :span="12" v-if="model.balanceNum">
              <a-form-model-item label="结算单号" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-input v-model="model.balanceNum" placeholder="结算单号"></a-input>
              </a-form-model-item>
            </a-col>
何忠建's avatar
何忠建 committed
24
            <a-col :span="12">
何忠建's avatar
何忠建 committed
25 26
              <a-form-model-item label="提交时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-input v-model="model.createTime" placeholder="提交时间"></a-input>
何忠建's avatar
何忠建 committed
27 28 29
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
何忠建's avatar
何忠建 committed
30 31
              <a-form-model-item label="买家名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-input v-model="model.buyerName" placeholder="买家名称" />
何忠建's avatar
何忠建 committed
32 33 34
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
何忠建's avatar
何忠建 committed
35 36
              <a-form-model-item label="分利金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-input v-model="model.shareMoney" placeholder="分利金额" />
何忠建's avatar
何忠建 committed
37 38 39
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
何忠建's avatar
何忠建 committed
40 41
              <a-form-model-item label="订单金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-input v-model="model.totalMoney" placeholder="订单金额" />
何忠建's avatar
何忠建 committed
42 43 44
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
何忠建's avatar
何忠建 committed
45
              <a-form-model-item label="支付方式" :labelCol="labelCol" :wrapperCol="wrapperCol">
何忠建's avatar
何忠建 committed
46
                <a-input v-model="model.payWayName" placeholder="支付方式" />
何忠建's avatar
何忠建 committed
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 72 73 74 75 76
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item label="订单来源" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-input v-model="model.orderSourceName" placeholder="订单来源" />
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item label="订单状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-input v-model="model.reconciliationStatusName" placeholder="订单状态" />
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item label="所属平台" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-input v-model="model.propertyName" placeholder="所属平台" />
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item label="所属小区" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-input v-model="model.communityName" placeholder="所属小区" />
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item label="商铺名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-input v-model="model.shopName" placeholder="商铺名称" />
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item label="合作伙伴名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-input v-model="model.partnersName" placeholder="合作伙伴名称" />
何忠建's avatar
何忠建 committed
77 78 79 80 81 82
              </a-form-model-item>
            </a-col>
          </a-row>
        </a-card>
      </a-form-model>
    </j-form-container>
何忠建's avatar
何忠建 committed
83 84 85 86 87 88 89 90 91 92 93 94 95
    <a-card title="操作信息" v-if="recordList.length > 0">
      <a-table ref="table" size="middle" :scroll="{x:true}" bordered rowKey="id" :columns="columns"
        :dataSource="recordList" :pagination="false" :loading="loading" class="j-table-force-nowrap">
        <span slot="payStatus" slot-scope="text, record">
          <template v-if="record"></template>已付款
        </span>
        <span slot="reconciliationStatus" slot-scope="text, record">
          <a-tag v-if="record.reconciliationStatus === 1">未对账</a-tag>
          <a-tag v-else-if="record.reconciliationStatus === 2">对账待审核</a-tag>
          <a-tag v-else-if="record.reconciliationStatus === 3">已对账</a-tag>
          <a-tag v-else-if="record.reconciliationStatus === 4">对账驳回</a-tag>
        </span>
      </a-table>
何忠建's avatar
何忠建 committed
96 97 98 99 100
    </a-card>
  </a-spin>
</template>

<script>
何忠建's avatar
何忠建 committed
101
import { shareBenefitShopByDepId } from '@/api/api'
何忠建's avatar
何忠建 committed
102 103

export default {
何忠建's avatar
何忠建 committed
104 105
  name: 'ReconciliationDetails',
  inject: ['closeCurrent'],
何忠建's avatar
何忠建 committed
106 107 108
  data() {
    return {
      title: '详情',
何忠建's avatar
何忠建 committed
109
      model: {},
何忠建's avatar
何忠建 committed
110 111 112 113 114 115 116 117 118 119 120 121 122
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 },
      },
      confirmLoading: false,
      url: {
        queryById: '/property-central/property/propertySettled/queryById',
      },
      loading: false,
何忠建's avatar
何忠建 committed
123 124 125 126 127 128 129 130
      recordList: [],
      columns: [
        {
          title: '操作人',
          dataIndex: 'createBy',
          key: 'createBy',
          align: 'center',
        },
何忠建's avatar
何忠建 committed
131
        {
何忠建's avatar
何忠建 committed
132 133 134 135
          title: '操作时间',
          dataIndex: 'createTime',
          key: 'createTime',
          align: 'center',
何忠建's avatar
何忠建 committed
136 137
        },
        {
何忠建's avatar
何忠建 committed
138 139 140 141 142
          title: '订单状态',
          dataIndex: 'reconciliationStatus',
          scopedSlots: { customRender: 'reconciliationStatus' },
          key: 'reconciliationStatus',
          align: 'center',
何忠建's avatar
何忠建 committed
143 144
        },
        {
何忠建's avatar
何忠建 committed
145 146 147 148 149
          title: '付款状态',
          dataIndex: 'payStatus',
          scopedSlots: { customRender: 'payStatus' },
          key: 'payStatus',
          align: 'center',
何忠建's avatar
何忠建 committed
150 151
        },
        {
何忠建's avatar
何忠建 committed
152 153 154 155
          title: '备注',
          dataIndex: 'remarks',
          key: 'remarks',
          align: 'center',
何忠建's avatar
何忠建 committed
156 157 158 159 160 161
        },
      ],
    }
  },
  methods: {
    async getPageDetail() {
何忠建's avatar
何忠建 committed
162 163 164 165 166 167 168 169 170 171 172 173 174 175
      let { result } = await shareBenefitShopByDepId({ id: this.$route.query.id })
      this.recordList = result.list
      this.model = result.shareBenefit
      if (this.model.orderSource == 'miniapp') {
        this.model.orderSourceName = '小程序'
      }
      if (this.model.reconciliationStatus == 1) {
        this.model.reconciliationStatusName = '未对账'
      } else if (this.model.reconciliationStatus == 2) {
        this.model.reconciliationStatusName = '对账待审核'
      } else if (this.model.reconciliationStatus == 3) {
        this.model.reconciliationStatusName = '已对账'
      } else if (this.model.reconciliationStatus == 4) {
        this.model.reconciliationStatusName = '对账驳回'
何忠建's avatar
何忠建 committed
176
      }
何忠建's avatar
何忠建 committed
177 178 179 180 181 182 183
      if (this.model.payWay == 'payPropertyFee') {
        this.model.payWayName = '抵扣物业费'
      } else if (this.model.payWay == 'refundOrder') {
        this.model.payWayName = '申请退款'
      } else if (this.model.payWay == 'scanQrCodePay') {
        this.model.payWayName = '扫码支付'
      } 
何忠建's avatar
何忠建 committed
184 185
    },
    toReturn() {
何忠建's avatar
何忠建 committed
186
      this.closeCurrent()
何忠建's avatar
何忠建 committed
187 188 189 190
      this.$router.go(-1)
    },
  },
  mounted() {
何忠建's avatar
何忠建 committed
191 192
    if (this.$route.query.id) {
      this.getPageDetail()
何忠建's avatar
何忠建 committed
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220
    }
  },
}
</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>
<style>
.area-select {
  width: 100% !important;
}
</style>