doum
2026-06-17 ea689dd91eaa72425dc01759042c3b4eb2186512
admin/src/views/business/ywcustomerrecharge.vue
@@ -65,14 +65,14 @@
        <el-table-column prop="createDate" label="创建时间" min-width="160" align="center"/>
        <el-table-column label="操作" min-width="180" align="center" fixed="right">
          <template slot-scope="{ row }">
            <el-button type="text" v-permissions="['business:ywcustomerrecharge:bindDevice']" @click="openDevice(row)">关联设备</el-button>
            <el-button type="text" v-permissions="['business:ywcustomerrecharge:query']" @click="openDevice(row)">关联设备</el-button>
            <el-button type="text" v-permissions="['business:ywcustomerrecharge:recharge']" @click="openRecharge(row)">充值</el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination"/>
    </template>
    <YwCustomerDeviceWindow ref="deviceWindow" @success="search"/>
    <YwCustomerDeviceWindow ref="deviceWindow"/>
    <YwCustomerRechargeWindow ref="rechargeWindow" @success="search"/>
  </TableLayout>
</template>
@@ -113,14 +113,20 @@
        capacity: this.tableData.pagination.pageSize,
        model: this.buildSearchModel()
      }).then(data => {
        this.tableData.list = data.records
        this.tableData.pagination.total = data.total
      }).catch(() => {}).finally(() => { this.isWorking.search = false })
        this.tableData.list = (data && data.records) || []
        this.tableData.pagination.total = (data && data.total) || 0
      }).catch(e => {
        this.$tip.apiFailed(e)
      }).finally(() => { this.isWorking.search = false })
    },
    search () {
      this.tableData.pagination.pageIndex = 1
      this.loadList()
    },
    handleSizeChange (size) {
      this.tableData.pagination.pageSize = size
      this.loadList()
    },
    buildSearchModel () {
      const model = {}
      if (this.searchForm.nameKeyword) model.nameKeyword = this.searchForm.nameKeyword