|
@@ -105,31 +105,35 @@
|
|
</template>
|
|
</template>
|
|
<!-- 废旧衣物 -->
|
|
<!-- 废旧衣物 -->
|
|
<template slot="clothes" slot-scope="text,record">
|
|
<template slot="clothes" slot-scope="text,record">
|
|
- <span :style="{ color: record.maxVal==record.clothes ? 'red' : '' }">{{ (record.clothes/1000).toFixed(2) || 0 }}</span>
|
|
|
|
|
|
+ <span :style="{ color: record.maxVal==record.clothes ? 'red' : '' }">{{ record.clothes ? (record.clothes/1000).toFixed(2) : '0.00' }}</span>
|
|
</template>
|
|
</template>
|
|
<!-- 废旧纸张 -->
|
|
<!-- 废旧纸张 -->
|
|
<template slot="paper" slot-scope="text,record">
|
|
<template slot="paper" slot-scope="text,record">
|
|
- <span :style="{ color: record.maxVal==record.paper ? 'red' : '' }">{{ (record.paper/1000).toFixed(2) || 0 }}</span>
|
|
|
|
|
|
+ <span :style="{ color: record.maxVal==record.paper ? 'red' : '' }">{{ record.paper ? (record.paper/1000).toFixed(2) : '0.00' }}</span>
|
|
</template>
|
|
</template>
|
|
<!-- 废旧塑料 -->
|
|
<!-- 废旧塑料 -->
|
|
<template slot="plastic" slot-scope="text,record">
|
|
<template slot="plastic" slot-scope="text,record">
|
|
- <span :style="{ color: record.maxVal==record.plastic ? 'red' : '' }">{{ (record.plastic/1000).toFixed(2) || 0 }}</span>
|
|
|
|
|
|
+ <span :style="{ color: record.maxVal==record.plastic ? 'red' : '' }">{{ record.plastic ? (record.plastic/1000).toFixed(2) : '0.00' }}</span>
|
|
</template>
|
|
</template>
|
|
<!-- 废旧金属 -->
|
|
<!-- 废旧金属 -->
|
|
<template slot="metal" slot-scope="text,record">
|
|
<template slot="metal" slot-scope="text,record">
|
|
- <span :style="{ color: record.maxVal==record.metal ? 'red' : '' }">{{ (record.metal/1000).toFixed(2) || 0 }}</span>
|
|
|
|
|
|
+ <span :style="{ color: record.maxVal==record.metal ? 'red' : '' }">{{ record.metal ? (record.metal/1000).toFixed(2) : '0.00' }}</span>
|
|
</template>
|
|
</template>
|
|
<!-- 废旧金属/塑料 -->
|
|
<!-- 废旧金属/塑料 -->
|
|
- <template slot="metPla" slot-scope="text,record">
|
|
|
|
- <span :style="{ color: record.maxVal==record.metPla ? 'red' : '' }">{{ (record.metPla/1000).toFixed(2) || 0 }}</span>
|
|
|
|
|
|
+ <template slot="plaMet" slot-scope="text,record">
|
|
|
|
+ <span :style="{ color: record.maxVal==record.plaMet ? 'red' : '' }">{{ record.plaMet ? (record.plaMet/1000).toFixed(2) : '0.00' }}</span>
|
|
</template>
|
|
</template>
|
|
<!-- 废旧玻璃 -->
|
|
<!-- 废旧玻璃 -->
|
|
<template slot="glass" slot-scope="text,record">
|
|
<template slot="glass" slot-scope="text,record">
|
|
- <span :style="{ color: record.maxVal==record.glass ? 'red' : '' }">{{ (record.glass/1000).toFixed(2) || 0 }}</span>
|
|
|
|
|
|
+ <span :style="{ color: record.maxVal==record.glass ? 'red' : '' }">{{ record.glass ? (record.glass/1000).toFixed(2) : '0.00' }}</span>
|
|
</template>
|
|
</template>
|
|
<!-- 可回收物 -->
|
|
<!-- 可回收物 -->
|
|
<template slot="recycling" slot-scope="text,record">
|
|
<template slot="recycling" slot-scope="text,record">
|
|
- <span :style="{ color: record.maxVal==record.recycling ? 'red' : '' }">{{ (record.recycling/1000).toFixed(2) || 0 }}</span>
|
|
|
|
|
|
+ <span :style="{ color: record.maxVal==record.recycling ? 'red' : '' }">{{ record.recycling ? (record.recycling/1000).toFixed(2) : '0.00' }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- 可回收物小计 -->
|
|
|
|
+ <template slot="totalWeight" slot-scope="text,record">
|
|
|
|
+ <span >{{ record.totalWeight ? (record.totalWeight/1000).toFixed(2) : '0.00' }}</span>
|
|
</template>
|
|
</template>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<span slot="action" slot-scope="text,record">
|
|
<span slot="action" slot-scope="text,record">
|
|
@@ -139,8 +143,8 @@
|
|
</s-table>
|
|
</s-table>
|
|
<!-- 清运弹窗 -->
|
|
<!-- 清运弹窗 -->
|
|
<cleanModal
|
|
<cleanModal
|
|
- :stationNo="itemStationNo"
|
|
|
|
- :deviceNo="itemDeviceNo"
|
|
|
|
|
|
+ :cleanStationDeviceNo="itemCleanStationDeviceNo"
|
|
|
|
+ :dirverUserId="itemDirverUserId"
|
|
:openModal="isOpenModal"
|
|
:openModal="isOpenModal"
|
|
@refresh="refreshTable"
|
|
@refresh="refreshTable"
|
|
@close="closeCleanModal"></cleanModal>
|
|
@close="closeCleanModal"></cleanModal>
|
|
@@ -171,8 +175,8 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
isOpenModal: false, // 默认弹窗关闭
|
|
isOpenModal: false, // 默认弹窗关闭
|
|
- itemStationNo: null, // 当前待清运记录id
|
|
|
|
- itemDeviceNo: null,
|
|
|
|
|
|
+ itemCleanStationDeviceNo: null, // 当前待清运记录司机id
|
|
|
|
+ itemDirverUserId: null,
|
|
orderTotal: '', // 总计条数
|
|
orderTotal: '', // 总计条数
|
|
recyclableWasteTotal: '', // 可回收垃圾总计
|
|
recyclableWasteTotal: '', // 可回收垃圾总计
|
|
wasteClothes: '', // 废旧衣物总计
|
|
wasteClothes: '', // 废旧衣物总计
|
|
@@ -207,11 +211,11 @@ export default {
|
|
{ title: '废旧纸张', scopedSlots: { customRender: 'paper' }, width: 100, align: 'center' },
|
|
{ title: '废旧纸张', scopedSlots: { customRender: 'paper' }, width: 100, align: 'center' },
|
|
{ title: '废旧塑料', scopedSlots: { customRender: 'plastic' }, width: 100, align: 'center' },
|
|
{ title: '废旧塑料', scopedSlots: { customRender: 'plastic' }, width: 100, align: 'center' },
|
|
{ title: '废旧金属', scopedSlots: { customRender: 'metal' }, width: 100, align: 'center' },
|
|
{ title: '废旧金属', scopedSlots: { customRender: 'metal' }, width: 100, align: 'center' },
|
|
- { title: '废旧金属/塑料', scopedSlots: { customRender: 'metPla' }, width: 100, align: 'center' },
|
|
|
|
|
|
+ { title: '废旧金属/塑料', scopedSlots: { customRender: 'plaMet' }, width: 100, align: 'center' },
|
|
{ title: '废旧玻璃', scopedSlots: { customRender: 'glass' }, width: 100, align: 'center' },
|
|
{ title: '废旧玻璃', scopedSlots: { customRender: 'glass' }, width: 100, align: 'center' },
|
|
{ title: '可回收物', scopedSlots: { customRender: 'recycling' }, width: 100, align: 'center' }]
|
|
{ title: '可回收物', scopedSlots: { customRender: 'recycling' }, width: 100, align: 'center' }]
|
|
},
|
|
},
|
|
- { title: '可回收垃圾小计(kg)', dataIndex: 'totalWeight', width: 100, align: 'center', customRender: (text) => { return (text / 1000).toFixed(2) || 0 } },
|
|
|
|
|
|
+ { title: '可回收垃圾小计(kg)', dataIndex: 'totalWeight', width: 100, align: 'center', scopedSlots: { customRender: 'totalWeight' } },
|
|
{ title: '最后清运时间', dataIndex: 'lastCleanDate', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
|
|
{ title: '最后清运时间', dataIndex: 'lastCleanDate', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
|
|
{ title: '操作', dataIndex: 'action', width: 100, align: 'center', scopedSlots: { customRender: 'action' } }
|
|
{ title: '操作', dataIndex: 'action', width: 100, align: 'center', scopedSlots: { customRender: 'action' } }
|
|
],
|
|
],
|
|
@@ -230,7 +234,7 @@ export default {
|
|
for (let i = 0; i < res.data.list.length; i++) {
|
|
for (let i = 0; i < res.data.list.length; i++) {
|
|
const _item = res.data.list[i]
|
|
const _item = res.data.list[i]
|
|
// 找出可回收垃圾库存量最大的值
|
|
// 找出可回收垃圾库存量最大的值
|
|
- const arr = [_item.clothes, _item.paper, _item.plastic, _item.metal, _item.metPla, _item.glass, _item.recycling]
|
|
|
|
|
|
+ const arr = [_item.clothes, _item.paper, _item.plastic, _item.metal, _item.plaMet, _item.glass, _item.recycling]
|
|
const maxVal = Math.max(...arr)
|
|
const maxVal = Math.max(...arr)
|
|
if (maxVal == 0) {
|
|
if (maxVal == 0) {
|
|
_item.maxVal = null
|
|
_item.maxVal = null
|
|
@@ -387,10 +391,10 @@ export default {
|
|
this.time = []
|
|
this.time = []
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
- // 查看清运详情
|
|
|
|
|
|
+ // 立即清运
|
|
handleDetail (record) {
|
|
handleDetail (record) {
|
|
- this.itemStationNo = record.stationNo
|
|
|
|
- this.itemDeviceNo = record.deviceNo
|
|
|
|
|
|
+ this.itemCleanStationDeviceNo = record.cleanStationDeviceNo
|
|
|
|
+ this.itemDirverUserId = record.dirverUserId
|
|
this.isOpenModal = true
|
|
this.isOpenModal = true
|
|
}
|
|
}
|
|
}
|
|
}
|