|
|
|
|
@ -28,7 +28,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="search-item">
|
|
|
|
|
<span>关键词:</span>
|
|
|
|
|
<Input v-model="select.keyword" placeholder="编号/负责人" style="width: 200px" />
|
|
|
|
|
<Input v-model="select.keyword" placeholder="维护物资" style="width: 200px" />
|
|
|
|
|
</div>
|
|
|
|
|
<Button type="primary" style="margin-left: 8px;" @click="getList">查询</Button>
|
|
|
|
|
<Button type="primary" style="margin-left: 8px;" @click="resetSearch">重置</Button>
|
|
|
|
|
@ -76,6 +76,18 @@
|
|
|
|
|
min-width="120"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="inventorys.guigexinghao"
|
|
|
|
|
label="物资型号"
|
|
|
|
|
min-width="120"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="inventorys.wuziguige"
|
|
|
|
|
label="物资规格"
|
|
|
|
|
min-width="120"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="inventorys.rukupici"
|
|
|
|
|
label="入库批次"
|
|
|
|
|
@ -111,7 +123,7 @@
|
|
|
|
|
{{ scope.row.maintenance_date }}
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
|
|
|
|
<div :class="['status-badge', getBadgeClass(scope.row.planned_maintenance_date)]" style="display: inline-block;">
|
|
|
|
|
<div :class="['status-badge', getBadgeClass(scope.row.end_date)]" style="display: inline-block;">
|
|
|
|
|
{{ getBadgeText(scope.row.end_date) }}
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -872,10 +884,16 @@ export default {
|
|
|
|
|
return new Blob([u8arr], { type: mime })
|
|
|
|
|
},
|
|
|
|
|
getBadgeClass(planDate) {
|
|
|
|
|
if(!planDate){
|
|
|
|
|
return 'badge-gray'
|
|
|
|
|
}
|
|
|
|
|
const diffDays = this.getDateDifferenceInDays(planDate)
|
|
|
|
|
return diffDays >= 0 ? 'badge-blue' : 'badge-red'
|
|
|
|
|
},
|
|
|
|
|
getBadgeText(planDate) {
|
|
|
|
|
getBadgeText(planDate) {
|
|
|
|
|
if(!planDate){
|
|
|
|
|
return '-'
|
|
|
|
|
}
|
|
|
|
|
const diffDays = this.getDateDifferenceInDays(planDate)
|
|
|
|
|
return diffDays >= 0 ? `还有 ${diffDays} 天` : `已超期 ${Math.abs(diffDays)} 天`
|
|
|
|
|
},
|
|
|
|
|
|