|
|
@@ -31,7 +31,7 @@
|
|
|
</el-row>
|
|
|
<div style="text-align:right;position:relative;z-index:1000">
|
|
|
<el-date-picker
|
|
|
- v-model="time"
|
|
|
+ v-model="dateValue"
|
|
|
clearable
|
|
|
value-format="yyyy-MM-dd HH:MM:SS"
|
|
|
type="daterange"
|
|
|
@@ -46,41 +46,10 @@
|
|
|
<b-table
|
|
|
ref="tableRef"
|
|
|
:args="{ 'highlight-current-row': true }"
|
|
|
- :data="rechargercdList"
|
|
|
- :columns="columns"
|
|
|
+ :data="cardusercdList"
|
|
|
+ :columns="columns1"
|
|
|
isShowIndex
|
|
|
- :showPagination="!rechargercdList.length"
|
|
|
>
|
|
|
- <template #styleImg="scope">
|
|
|
- <el-image
|
|
|
- :src="scope.row.imgPreview"
|
|
|
- :preview-src-list="[scope.row.imgPreview]"
|
|
|
- slot="error"
|
|
|
- class="image-slot"
|
|
|
- style="width: 100px; height: 50px"
|
|
|
- >
|
|
|
- <div slot="error" class="image-slot"></div>
|
|
|
- </el-image>
|
|
|
- </template>
|
|
|
- <template #codeNo="scope">
|
|
|
- <el-link
|
|
|
- type="primary"
|
|
|
- :underline="false"
|
|
|
- @click="goDetail(scope.row)"
|
|
|
- >{{ scope.row.traceCodeApplyConcat }}</el-link
|
|
|
- >
|
|
|
- </template>
|
|
|
- <template #status="scope">
|
|
|
- <span style="display:flex;align-items:center;justify-content:center">
|
|
|
- {{ scope.row.name }}
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- <template #useNumber="scope">
|
|
|
- {{ scope.row.useNumber + '/' + scope.row.totalNumber }}
|
|
|
- </template>
|
|
|
- <template #finishGoodName="scope">
|
|
|
- {{ scope.row.finishGoodName&&scope.row.finishgoodNo?scope.row.finishGoodName + '-' + scope.row.finishgoodNo:'' }}
|
|
|
- </template>
|
|
|
</b-table>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="充值记录">
|
|
|
@@ -88,20 +57,9 @@
|
|
|
ref="tableRechargercd"
|
|
|
:args="{ 'highlight-current-row': true }"
|
|
|
:data="rechargercdList"
|
|
|
- :columns="columns"
|
|
|
+ :columns="columns2"
|
|
|
isShowIndex
|
|
|
>
|
|
|
- <template #styleImg="scope">
|
|
|
- <el-image
|
|
|
- :src="scope.row.imgPreview"
|
|
|
- :preview-src-list="[scope.row.imgPreview]"
|
|
|
- slot="error"
|
|
|
- class="image-slot"
|
|
|
- style="width: 100px; height: 50px"
|
|
|
- >
|
|
|
- <div slot="error" class="image-slot"></div>
|
|
|
- </el-image>
|
|
|
- </template>
|
|
|
<template #ICCard="scope">
|
|
|
{{ scope }}
|
|
|
<b-table
|
|
|
@@ -113,14 +71,6 @@
|
|
|
>
|
|
|
</b-table>
|
|
|
</template>
|
|
|
- <template #codeNo="scope">
|
|
|
- <el-link
|
|
|
- type="primary"
|
|
|
- :underline="false"
|
|
|
- @click="goDetail(scope.row)"
|
|
|
- >{{ scope.row.traceCodeApplyConcat }}</el-link
|
|
|
- >
|
|
|
- </template>
|
|
|
<template #rechargercdRechargeamount="scope">
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
@@ -131,17 +81,6 @@
|
|
|
<template #cardAmount="scope">
|
|
|
{{ Number(scope.row.cardAmount).toFixed(2) }}
|
|
|
</template>
|
|
|
- <template #status="scope">
|
|
|
- <span style="display:flex;align-items:center;justify-content:center">
|
|
|
- {{ scope.row.name }}
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- <template #useNumber="scope">
|
|
|
- {{ scope.row.useNumber + '/' + scope.row.totalNumber }}
|
|
|
- </template>
|
|
|
- <template #finishGoodName="scope">
|
|
|
- {{ scope.row.finishGoodName&&scope.row.finishgoodNo?scope.row.finishGoodName + '-' + scope.row.finishgoodNo:'' }}
|
|
|
- </template>
|
|
|
</b-table>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
@@ -150,7 +89,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getCardDetail,getRechargercdList } from '@/api/card/index.js'
|
|
|
+import { getCardDetail,getRechargercdList, getCardusercdList } from '@/api/card/index.js'
|
|
|
import BTable from '@/components/Table/index.vue';
|
|
|
export default {
|
|
|
name: 'dataDetail',
|
|
|
@@ -165,8 +104,70 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
baseForm: {},
|
|
|
- time:'',
|
|
|
- columns: [
|
|
|
+ dateValue: '',
|
|
|
+ columns1: [
|
|
|
+ {
|
|
|
+ label: '水源编号',
|
|
|
+ prop: 'waterNum',
|
|
|
+ customRender: '',
|
|
|
+ align: 'center',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '水源名称',
|
|
|
+ prop: 'waterName',
|
|
|
+ customRender: '',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '本次耗水量(m³)',
|
|
|
+ prop: 'cardusercdWaternum',
|
|
|
+ customRender: '',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '本次用水量(°)',
|
|
|
+ prop: 'cardusercdWaternum',
|
|
|
+ customRender: '',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '开始时间',
|
|
|
+ prop: 'cardusercdStarttime',
|
|
|
+ customRender: '',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '结束时间',
|
|
|
+ prop: 'cardusercdEndtime',
|
|
|
+ customRender: '',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '使用时长',
|
|
|
+ prop: 'cardusercdDuration',
|
|
|
+ customRender: '',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '计费方式',
|
|
|
+ prop: 'cardusercdBillingtype',
|
|
|
+ customRender: '',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '计费标准',
|
|
|
+ prop: 'cardusercdPriceinfo',
|
|
|
+ customRender: '',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '扣除金额',
|
|
|
+ prop: 'cardusercdUsemoney',
|
|
|
+ customRender: '',
|
|
|
+ align: 'center'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ columns2: [
|
|
|
{
|
|
|
label: 'IC卡号',
|
|
|
prop: 'cardNo',
|
|
|
@@ -203,10 +204,25 @@ export default {
|
|
|
this.baseForm = res.data
|
|
|
return this.getRechargercdData(res.data);
|
|
|
},
|
|
|
+ async cardusercdList() {
|
|
|
+ const res = await getCardDetail({
|
|
|
+ cardId: this.detailCardId
|
|
|
+ })
|
|
|
+ this.baseForm = res.data
|
|
|
+ return this.getCardusercdListHandler(res.data)
|
|
|
+ },
|
|
|
+ getCardusercdListHandler(payload) {
|
|
|
+ const { cardId } = payload
|
|
|
+ const [startTime, endTime] = this.dateValue ??= []
|
|
|
+ return getCardusercdList({
|
|
|
+ cardId,
|
|
|
+ startTime,
|
|
|
+ endTime
|
|
|
+ })
|
|
|
+ },
|
|
|
getRechargercdData(payload) {
|
|
|
const {farmerId,cardNo,cardId} = payload
|
|
|
- const startTime = this.time[0] || ''
|
|
|
- const endTime = this.time[1] || ''
|
|
|
+ const [startTime, endTime] = this.dateValue ??= []
|
|
|
return getRechargercdList({
|
|
|
farmerId,
|
|
|
cardNo,
|
|
|
@@ -218,29 +234,6 @@ export default {
|
|
|
backPage() {
|
|
|
this.$emit("backPage")
|
|
|
},
|
|
|
- goProductsPage() {
|
|
|
- this.handleClose();
|
|
|
- this.$router.push({
|
|
|
- path: '/Products',
|
|
|
- query: {}
|
|
|
- });
|
|
|
- },
|
|
|
- goSourceInfoPage() {
|
|
|
- this.handleClose();
|
|
|
- this.$router.push({
|
|
|
- path: '/sourceInfo',
|
|
|
- query: {
|
|
|
- type: 'add'
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- goProcessPage() {
|
|
|
- this.handleClose();
|
|
|
- this.$router.push({
|
|
|
- path: '/basicsettings/process',
|
|
|
- query: {}
|
|
|
- });
|
|
|
- },
|
|
|
resetForm(formName) {
|
|
|
this.$refs[formName].resetFields();
|
|
|
this.resetFormData();
|