doum
10 天以前 0201c32312f6478b2bde706607c8c6338e9e1d06
admin/src/views/business/ywelectricalcharge.vue
@@ -31,6 +31,7 @@
        <el-table-column prop="roomNames" label="绑定房间" min-width="150" align="center" show-overflow-tooltip/>
        <el-table-column prop="money" label="充值金额(元)" min-width="110" align="center"/>
        <el-table-column prop="banlance" label="充值前余额" min-width="110" align="center"/>
        <el-table-column prop="balanceAfter" label="充值后余额" min-width="110" align="center"/>
        <el-table-column label="状态" min-width="100" align="center">
          <template slot-scope="{ row }">
            <span v-if="row.status === 0">充值中</span>
@@ -44,6 +45,11 @@
        <el-table-column prop="statusInfo" label="状态说明" min-width="140" align="center" show-overflow-tooltip/>
        <el-table-column prop="createDate" label="提交时间" min-width="160" align="center"/>
        <el-table-column prop="statusTime" label="状态更新时间" min-width="160" align="center"/>
        <el-table-column label="操作" min-width="100" align="center" fixed="right">
          <template slot-scope="{ row }">
            <el-button v-if="row.status === 0" type="text" v-permissions="['business:ywelectricalcharge:syncStatus']" @click="handleSync(row)">手动同步</el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination"/>
    </template>
@@ -103,6 +109,14 @@
    reset () {
      this.searchForm = { meterKeyword: '', status: '', oprId: '' }
      this.search()
    },
    handleSync (row) {
      chargeApi.syncStatus(row.id)
        .then(msg => {
          this.$tip.success(msg || '同步完成')
          this.handlePageChange(this.tableData.pagination.pageIndex)
        })
        .catch(e => this.$tip.apiFailed(e))
    }
  }
}