This commit is contained in:
parent
3a4473a387
commit
04816a4b00
|
|
@ -79,7 +79,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="资产原值(万元)" prop="originalValue">
|
<el-form-item label="资产原值(元)" prop="originalValue">
|
||||||
<el-input
|
<el-input
|
||||||
@input="handlePriceInput"
|
@input="handlePriceInput"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" >
|
<el-col :span="5" >
|
||||||
<el-form-item label="装备厂家" prop="manufacturerId" label-width="70px">
|
<el-form-item label="生产厂家" prop="manufacturerId" label-width="70px">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.manufacturerId"
|
v-model="queryParams.manufacturerId"
|
||||||
placeholder="请选择生产厂家"
|
placeholder="请选择生产厂家"
|
||||||
|
|
@ -115,16 +115,17 @@
|
||||||
align="center"
|
align="center"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
prop="workingHours"
|
prop="workingHours"
|
||||||
label="标准使用到期时间(年限)"
|
label="最大使用年限"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ formatDate(scope.row.expirationTime) }} ({{ scope.row.expirationYears }}年)
|
<!-- {{ formatDate(scope.row.expirationTime) }} ({{ scope.row.expirationYears }}年) -->
|
||||||
|
{{ scope.row.expirationYears }}年
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" show-overflow-tooltip prop=" remainingYears" label="实际使用天数(天数)">
|
<el-table-column align="center" show-overflow-tooltip prop=" remainingYears" label="实际使用年限">
|
||||||
<template slot-scope="scope"> {{ scope.row.daysDiff }}天 ({{ scope.row.yearsDiff }}年)</template>
|
<template slot-scope="scope"> {{ scope.row.daysDiff }}天 ({{ scope.row.yearsDiff }}年)</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" show-overflow-tooltip prop="remainingDays" label="实际使用天数(年限)">
|
<el-table-column align="center" show-overflow-tooltip prop="remainingDays" label="剩余使用年限">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.remainingDays }}天 ({{ scope.row.remainingYears }}年)
|
{{ scope.row.remainingDays }}天 ({{ scope.row.remainingYears }}年)
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
<el-table-column align="center" show-overflow-tooltip prop="toolNum" label="退役工具数" />
|
<el-table-column align="center" show-overflow-tooltip prop="toolNum" label="退役工具数" />
|
||||||
<el-table-column align="center" show-overflow-tooltip prop="reviewStatus" label="任务状态">
|
<el-table-column align="center" show-overflow-tooltip prop="reviewStatus" label="任务状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag :type="getStatusType(scope.row.reviewStatus)">
|
<el-tag :type="getStatusType(scope.row.reviewStatus)" @click="openDialog(scope.row)" style="cursor: pointer">
|
||||||
{{ getStatusLabel(scope.row.reviewStatus) }}
|
{{ getStatusLabel(scope.row.reviewStatus) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -80,16 +80,20 @@
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<ApproveDialog ref="approveDialog" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getRetireApplyListAPI } from '@/api/EquipmentRetireApply/index.js'
|
import { getRetireApplyListAPI } from '@/api/EquipmentRetireApply/index.js'
|
||||||
import pagination from '@/components/Pagination'
|
import pagination from '@/components/Pagination'
|
||||||
|
import ApproveDialog from '@/views/business/components/ApproveDialog'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
pagination
|
pagination,
|
||||||
|
ApproveDialog
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -173,6 +177,9 @@ export default {
|
||||||
'3': 'danger'
|
'3': 'danger'
|
||||||
}
|
}
|
||||||
return typeMap[status] || 'info'
|
return typeMap[status] || 'info'
|
||||||
|
},
|
||||||
|
openDialog(row) {
|
||||||
|
this.$refs.approveDialog.openDialog(row.id, 'EQUIPMENT_SCRAP')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,7 @@
|
||||||
<el-table
|
<el-table
|
||||||
ref="itemTable"
|
ref="itemTable"
|
||||||
:data="itemList"
|
:data="itemList"
|
||||||
|
row-key="id"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
border
|
border
|
||||||
stripe
|
stripe
|
||||||
|
|
@ -91,7 +92,7 @@
|
||||||
height="546"
|
height="546"
|
||||||
@selection-change="onSelectionChange"
|
@selection-change="onSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="50" />
|
<el-table-column type="selection" width="50" :selectable="selectable" :reserve-selection="true"/>
|
||||||
<el-table-column align="center" type="index" label="序号" width="100" />
|
<el-table-column align="center" type="index" label="序号" width="100" />
|
||||||
<el-table-column align="center" prop="devType" label="分类" min-width="70" >
|
<el-table-column align="center" prop="devType" label="分类" min-width="70" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -105,7 +106,7 @@
|
||||||
<el-table-column align="center" prop="manageMode" label="管理模式" min-width="80" />
|
<el-table-column align="center" prop="manageMode" label="管理模式" min-width="80" />
|
||||||
<el-table-column align="center" prop="devCode" label="设备编码" min-width="100" />
|
<el-table-column align="center" prop="devCode" label="设备编码" min-width="100" />
|
||||||
<el-table-column align="center" prop="inStockNum" label="在库数量" width="100" />
|
<el-table-column align="center" prop="inStockNum" label="在库数量" width="100" />
|
||||||
<el-table-column align="center" prop="scrapQuantity" label="申请报废数量" width="150">
|
<el-table-column align="center" prop="scrapQuantity" label="申请退役数量" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="scope.row.scrapQuantity"
|
v-model="scope.row.scrapQuantity"
|
||||||
|
|
@ -270,7 +271,9 @@ export default {
|
||||||
}
|
}
|
||||||
this.getItemList()
|
this.getItemList()
|
||||||
},
|
},
|
||||||
|
selectable(row) {
|
||||||
|
return !this.existingItems.some(item => item.keyId === row.keyId)
|
||||||
|
},
|
||||||
onSelectionChange(selection) {
|
onSelectionChange(selection) {
|
||||||
this.selectedItems = selection
|
this.selectedItems = selection
|
||||||
// 更新所有选中项:移除当前页未选中的,添加当前页新选中的
|
// 更新所有选中项:移除当前页未选中的,添加当前页新选中的
|
||||||
|
|
@ -282,13 +285,14 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
onHandleConfirm() {
|
onHandleConfirm() {
|
||||||
if (this.allSelectedItems.length === 0) {
|
if (this.selectedItems.length === 0) {
|
||||||
this.$message.warning('请选择至少一项')
|
this.$message.warning('请选择至少一项')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查申请报废数量是否有效
|
// 检查申请报废数量是否有效
|
||||||
const invalidItems = this.allSelectedItems.filter(item => !item.scrapQuantity || item.scrapQuantity < 1)
|
// const invalidItems = this.allSelectedItems.filter(item => !item.scrapQuantity || item.scrapQuantity < 1)
|
||||||
|
const invalidItems = this.selectedItems.filter(item => !item.scrapQuantity || item.scrapQuantity < 1)
|
||||||
if (invalidItems.length > 0) {
|
if (invalidItems.length > 0) {
|
||||||
const invalidNames = invalidItems.map(item => item.typeModelName).join('、')
|
const invalidNames = invalidItems.map(item => item.typeModelName).join('、')
|
||||||
this.$message.warning(`以下项目的申请报废数量必须大于0:${invalidNames}`)
|
this.$message.warning(`以下项目的申请报废数量必须大于0:${invalidNames}`)
|
||||||
|
|
@ -296,16 +300,17 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查是否有重复的keyId
|
// 检查是否有重复的keyId
|
||||||
const existingKeyIds = this.existingItems.map(item => item.keyId)
|
// const existingKeyIds = this.existingItems.map(item => item.keyId)
|
||||||
const duplicates = this.allSelectedItems.filter(item => existingKeyIds.includes(item.keyId))
|
// const duplicates = this.allSelectedItems.filter(item => existingKeyIds.includes(item.keyId))
|
||||||
|
|
||||||
if (duplicates.length > 0) {
|
// if (duplicates.length > 0) {
|
||||||
const duplicateNames = duplicates.map(item => item.typeModelName).join('、')
|
// const duplicateNames = duplicates.map(item => item.typeModelName).join('、')
|
||||||
this.$message.warning(`以下项目已存在,不能重复添加:${duplicateNames}`)
|
// this.$message.warning(`以下项目已存在,不能重复添加:${duplicateNames}`)
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.$emit('confirm', this.allSelectedItems)
|
|
||||||
|
this.$emit('confirm', this.selectedItems)
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.selectedItems = []
|
this.selectedItems = []
|
||||||
this.allSelectedItems = []
|
this.allSelectedItems = []
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table :data="detailList" style="width: 100%" border stripe size="small" fit height="546">
|
<el-table :data="detailList" row-key="id" style="width: 100%" border stripe size="small" fit height="546">
|
||||||
<el-table-column align="center" type="index" label="序号" width="70" />
|
<el-table-column align="center" type="index" label="序号" width="70" />
|
||||||
<el-table-column align="center" prop="type" label="分类" width="90" />
|
<el-table-column align="center" prop="type" label="分类" width="90" />
|
||||||
<el-table-column align="center" prop="typeName" label="类目" width="180" />
|
<el-table-column align="center" prop="typeName" label="类目" width="180" />
|
||||||
|
|
@ -143,7 +143,8 @@ export default {
|
||||||
upload: {
|
upload: {
|
||||||
headers: { Authorization: 'Bearer ' + getToken() },
|
headers: { Authorization: 'Bearer ' + getToken() },
|
||||||
url: process.env.VUE_APP_BASE_API + '/file/upload'
|
url: process.env.VUE_APP_BASE_API + '/file/upload'
|
||||||
}
|
},
|
||||||
|
selectedRow: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -214,7 +215,12 @@ export default {
|
||||||
...item,
|
...item,
|
||||||
bmFileInfos: item.bmFileInfos || []
|
bmFileInfos: item.bmFileInfos || []
|
||||||
}))
|
}))
|
||||||
this.detailList.push(...itemsWithFileInfo)
|
// this.detailList.push(...itemsWithFileInfo)
|
||||||
|
// this.detailList = [...itemsWithFileInfo]
|
||||||
|
// 去重后添加
|
||||||
|
const existingTypeIds = new Set(this.detailList.map(item => item.id))
|
||||||
|
const newItems = itemsWithFileInfo.filter(item => !existingTypeIds.has(item.id))
|
||||||
|
this.detailList.push(...newItems)
|
||||||
},
|
},
|
||||||
|
|
||||||
onHandleDeleteItem(row) {
|
onHandleDeleteItem(row) {
|
||||||
|
|
@ -242,6 +248,7 @@ export default {
|
||||||
...this.baseInfo,
|
...this.baseInfo,
|
||||||
operationType: this.isNew ? 'add' : 'edit', // ✅ 区分新增或编辑
|
operationType: this.isNew ? 'add' : 'edit', // ✅ 区分新增或编辑
|
||||||
toBeScrapList: this.detailList.map(item => ({
|
toBeScrapList: this.detailList.map(item => ({
|
||||||
|
...item,
|
||||||
keyId: item.keyId,
|
keyId: item.keyId,
|
||||||
devCode: item.devCode,
|
devCode: item.devCode,
|
||||||
type: item.type,
|
type: item.type,
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@
|
||||||
<el-table-column align="center" show-overflow-tooltip prop="toolNum" label="退役工具数" />
|
<el-table-column align="center" show-overflow-tooltip prop="toolNum" label="退役工具数" />
|
||||||
<el-table-column align="center" show-overflow-tooltip prop="reviewStatus" label="任务状态">
|
<el-table-column align="center" show-overflow-tooltip prop="reviewStatus" label="任务状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag :type="getStatusType(scope.row.reviewStatus)">
|
<el-tag :type="getStatusType(scope.row.reviewStatus)" @click="openDialog(scope.row)" style="cursor: pointer">
|
||||||
{{ getStatusLabel(scope.row.reviewStatus) }}
|
{{ getStatusLabel(scope.row.reviewStatus) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -89,16 +89,20 @@
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<ApproveDialog ref="approveDialog" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getRetireApplyListAPI, deleteRetireApplyTaskAPI } from '@/api/EquipmentRetireApply/index.js'
|
import { getRetireApplyListAPI, deleteRetireApplyTaskAPI } from '@/api/EquipmentRetireApply/index.js'
|
||||||
import pagination from '@/components/Pagination'
|
import pagination from '@/components/Pagination'
|
||||||
|
import ApproveDialog from '@/views/business/components/ApproveDialog'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
pagination
|
pagination,
|
||||||
|
ApproveDialog
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -208,6 +212,9 @@ export default {
|
||||||
'3': 'danger'
|
'3': 'danger'
|
||||||
}
|
}
|
||||||
return typeMap[status] || 'info'
|
return typeMap[status] || 'info'
|
||||||
|
},
|
||||||
|
openDialog(row) {
|
||||||
|
this.$refs.approveDialog.openDialog(row.id, 'EQUIPMENT_SCRAP')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
<!-- 基础页面 -->
|
<!-- 基础页面 -->
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card v-show="showSearch" style="margin-bottom: 20px">
|
<el-card v-show="showSearch" style="margin-bottom: 20px">
|
||||||
<el-form :model="queryParams" ref="queryForm" :rules="outFormRules" inline label-width="110px">
|
<el-form :model="queryParams" ref="queryForm" :rules="outFormRules" inline label-width="120px">
|
||||||
|
|
||||||
<el-form-item label="需求单位" prop="useUnit">
|
<el-form-item label="需求单位" prop="useUnit">
|
||||||
<el-input style="width: 200px" v-model="queryParams.useUnit" placeholder="请输入需求单位"
|
<el-input style="width: 240px" v-model="queryParams.useUnit" placeholder="请输入需求单位"
|
||||||
:disabled="queryParams.status=='0'" clearable
|
:disabled="queryParams.status=='0'" clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
<el-select
|
<el-select
|
||||||
clearable
|
clearable
|
||||||
:disabled="!routerParams.isEdit"
|
:disabled="!routerParams.isEdit"
|
||||||
style="width: 200px"
|
style="width: 240px"
|
||||||
placeholder="请选择使用项目"
|
placeholder="请选择使用项目"
|
||||||
v-model="queryParams.proCode"
|
v-model="queryParams.proCode"
|
||||||
@change="onChangeProCode"
|
@change="onChangeProCode"
|
||||||
|
|
@ -29,19 +29,19 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="项目类型" prop="proType">
|
<el-form-item label="项目类型" prop="proType">
|
||||||
<el-input style="width: 200px" disabled v-model="queryParams.proType"/>
|
<el-input style="width: 240px" disabled v-model="queryParams.proType"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="电压等级" prop="voltageLevel">
|
<el-form-item label="电压等级" prop="voltageLevel">
|
||||||
<el-input style="width: 200px" disabled v-model="queryParams.voltageLevel"/>
|
<el-input style="width: 240px" disabled v-model="queryParams.voltageLevel"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目所在省" prop="proProvince">
|
<el-form-item label="项目所在省" prop="proProvince">
|
||||||
<el-input style="width: 200px" disabled v-model="queryParams.proProvince"/>
|
<el-input style="width: 240px" disabled v-model="queryParams.proProvince"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目所在市" prop="proCity">
|
<el-form-item label="项目所在市" prop="proCity">
|
||||||
<el-input style="width: 200px" disabled v-model="queryParams.proCity"/>
|
<el-input style="width: 240px" disabled v-model="queryParams.proCity"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目所在区/县" prop="proCounty">
|
<el-form-item label="项目所在区/县" prop="proCounty">
|
||||||
<el-input style="width: 200px" disabled v-model="queryParams.proCounty"/>
|
<el-input style="width: 240px" disabled v-model="queryParams.proCounty"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="使用到期日期" prop="useTimeRange">
|
<el-form-item label="使用到期日期" prop="useTimeRange">
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
style="width: 200px"
|
style="width: 240px"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -252,8 +252,8 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 设备列表表格 -->
|
<!-- 设备列表表格 -->
|
||||||
<el-table ref="addTable" :data="addList" height="546" @selection-change="handleSelectionChange" border stripe>
|
<el-table ref="addTable" :data="addList" row-key="id" height="546" @selection-change="handleSelectionChange" border stripe>
|
||||||
<el-table-column type="selection" width="55" align="center" :selectable="selectable"/>
|
<el-table-column type="selection" width="55" align="center" :selectable="selectable" :reserve-selection="true"/>
|
||||||
<el-table-column label="序号" align="center" width="80" type="index">
|
<el-table-column label="序号" align="center" width="80" type="index">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{
|
<span>{{
|
||||||
|
|
@ -411,7 +411,8 @@ export default {
|
||||||
multiple: false, // 多选标识
|
multiple: false, // 多选标识
|
||||||
// 新增:当前选中的类目名称(用于显示)
|
// 新增:当前选中的类目名称(用于显示)
|
||||||
currentCategoryName: '',
|
currentCategoryName: '',
|
||||||
currentToolCategoryName: ''
|
currentToolCategoryName: '',
|
||||||
|
selectedRow: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -797,6 +798,7 @@ export default {
|
||||||
console.log(selection)
|
console.log(selection)
|
||||||
this.addTempList = []
|
this.addTempList = []
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.selectedRow = selection
|
||||||
selection.forEach(item => {
|
selection.forEach(item => {
|
||||||
this.addTempList.push({
|
this.addTempList.push({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
|
|
@ -851,15 +853,15 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const itemsToAdd = this.addList.filter(item => this.ids.includes(item.id))
|
// const itemsToAdd = this.addList.filter(item => this.ids.includes(item.id))
|
||||||
const invalidItem = itemsToAdd.find(item => item.manageType === '1' && (item.num == 0 || !item.num))
|
const invalidItem = this.selectedRow.find(item => item.manageType === '1' && (item.num == 0 || !item.num))
|
||||||
if (invalidItem) {
|
if (invalidItem) {
|
||||||
this.$message.error('请为数量管理的设备填写申请数量。')
|
this.$message.error('请为数量管理的设备填写申请数量。')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关键修改:新增设备时,初始化 useTimeRange 为 Date 对象数组
|
// 关键修改:新增设备时,初始化 useTimeRange 为 Date 对象数组
|
||||||
itemsToAdd.forEach(item => {
|
this.selectedRow.forEach(item => {
|
||||||
this.tableList.push({
|
this.tableList.push({
|
||||||
...item,
|
...item,
|
||||||
// 逻辑:主表单有日期则用主表单日期,无则为空数组
|
// 逻辑:主表单有日期则用主表单日期,无则为空数组
|
||||||
|
|
|
||||||
|
|
@ -101,10 +101,10 @@
|
||||||
<el-table-column label="申请工具数" align="center" prop="toolNum" :show-overflow-tooltip="true" />
|
<el-table-column label="申请工具数" align="center" prop="toolNum" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="任务状态" align="center" prop="taskStatus" :show-overflow-tooltip="true" >
|
<el-table-column label="任务状态" align="center" prop="taskStatus" :show-overflow-tooltip="true" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.taskStatus == '0'" type="info">待审批</el-tag>
|
<el-tag v-if="scope.row.taskStatus == '0'" type="info" @click="openDialog(scope.row)" style="cursor: pointer">待审批</el-tag>
|
||||||
<el-tag v-if="scope.row.taskStatus == '1'" type="warning">审批中</el-tag>
|
<el-tag v-if="scope.row.taskStatus == '1'" type="warning" @click="openDialog(scope.row)" style="cursor: pointer">审批中</el-tag>
|
||||||
<el-tag v-if="scope.row.taskStatus == '2'" type="success">已审批</el-tag>
|
<el-tag v-if="scope.row.taskStatus == '2'" type="success" @click="openDialog(scope.row)" style="cursor: pointer">已审批</el-tag>
|
||||||
<el-tag v-if="scope.row.taskStatus == '3'" type="danger">审批驳回</el-tag>
|
<el-tag v-if="scope.row.taskStatus == '3'" type="danger" @click="openDialog(scope.row)" style="cursor: pointer">审批驳回</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="申请人" align="center" prop="createBy" :show-overflow-tooltip="true" width="140px"/>
|
<el-table-column label="申请人" align="center" prop="createBy" :show-overflow-tooltip="true" width="140px"/>
|
||||||
|
|
@ -129,17 +129,23 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
<ApproveDialog ref="approveDialog" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getToolApplyListApi, deleteToolApplyApi } from '@/api/toolsManage'
|
import { getToolApplyListApi, deleteToolApplyApi } from '@/api/toolsManage'
|
||||||
import { getListApi,deleteApplyApi } from '@/api/business'
|
import { getListApi,deleteApplyApi } from '@/api/business'
|
||||||
|
import ApproveDialog from '@/views/business/components/ApproveDialog'
|
||||||
import {
|
import {
|
||||||
getUseProjectListAPI,
|
getUseProjectListAPI,
|
||||||
} from '@/api/EquipmentLedger/equ-out'
|
} from '@/api/EquipmentLedger/equ-out'
|
||||||
export default {
|
export default {
|
||||||
name: 'ApplyList',
|
name: 'ApplyList',
|
||||||
|
components: {
|
||||||
|
ApproveDialog,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
|
@ -246,6 +252,9 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
openDialog(row) {
|
||||||
|
this.$refs.approveDialog.openDialog(row.id, 'EQUIPMENT_OUT')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -95,10 +95,10 @@
|
||||||
<el-table-column label="申请工具数" align="center" prop="toolNum" :show-overflow-tooltip="true" />
|
<el-table-column label="申请工具数" align="center" prop="toolNum" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="任务状态" align="center" prop="taskStatus" :show-overflow-tooltip="true" >
|
<el-table-column label="任务状态" align="center" prop="taskStatus" :show-overflow-tooltip="true" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.taskStatus == '0'" type="info">待审批</el-tag>
|
<el-tag v-if="scope.row.taskStatus == '0'" type="info" @click="openDialog(scope.row)" style="cursor: pointer">待审批</el-tag>
|
||||||
<el-tag v-if="scope.row.taskStatus == '1'" type="warning">审批中</el-tag>
|
<el-tag v-if="scope.row.taskStatus == '1'" type="warning" @click="openDialog(scope.row)" style="cursor: pointer">审批中</el-tag>
|
||||||
<el-tag v-if="scope.row.taskStatus == '2'" type="success">已审批</el-tag>
|
<el-tag v-if="scope.row.taskStatus == '2'" type="success" @click="openDialog(scope.row)" style="cursor: pointer">已审批</el-tag>
|
||||||
<el-tag v-if="scope.row.taskStatus == '3'" type="danger">审批驳回</el-tag>
|
<el-tag v-if="scope.row.taskStatus == '3'" type="danger" @click="openDialog(scope.row)" style="cursor: pointer">审批驳回</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="申请人" align="center" prop="createBy" :show-overflow-tooltip="true" width="140px"/>
|
<el-table-column label="申请人" align="center" prop="createBy" :show-overflow-tooltip="true" width="140px"/>
|
||||||
|
|
@ -120,6 +120,8 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
<ApproveDialog ref="approveDialog" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -128,8 +130,13 @@ import { getListApi, } from '@/api/business'
|
||||||
import {
|
import {
|
||||||
getUseProjectListAPI,
|
getUseProjectListAPI,
|
||||||
} from '@/api/EquipmentLedger/equ-out'
|
} from '@/api/EquipmentLedger/equ-out'
|
||||||
|
import ApproveDialog from '@/views/business/components/ApproveDialog'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AuditList',
|
name: 'AuditList',
|
||||||
|
components: {
|
||||||
|
ApproveDialog,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
|
@ -211,6 +218,9 @@ export default {
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
this.$router.push({ path: '/business/addAudit', query: { id: row.id, isEdit: true } })
|
this.$router.push({ path: '/business/addAudit', query: { id: row.id, isEdit: true } })
|
||||||
},
|
},
|
||||||
|
openDialog(row) {
|
||||||
|
this.$refs.approveDialog.openDialog(row.id, 'EQUIPMENT_OUT')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,110 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-dialog :title="title" :visible.sync="visible" width="800px">
|
||||||
|
<div v-if="processConfig && processConfig.nodeList" style="margin-top: 30px" v-loading="loading">
|
||||||
|
<div style="margin-bottom: 15px; font-weight: bold">审批进度</div>
|
||||||
|
<el-timeline>
|
||||||
|
<el-timeline-item
|
||||||
|
v-for="node in processConfig.nodeList"
|
||||||
|
:key="node.id"
|
||||||
|
:timestamp="getNodeRecord(node) ? getNodeRecord(node).approveTime : ''"
|
||||||
|
placement="top"
|
||||||
|
:type="getNodeTagType(node)"
|
||||||
|
>
|
||||||
|
<p>
|
||||||
|
<strong>{{ node.nodeName }}</strong>
|
||||||
|
<span style="margin-left: 20px">{{ getNodeStatusLabel(node) }}</span>
|
||||||
|
</p>
|
||||||
|
<p v-if="getNodeRecord(node)"> 审批人:{{ getNodeRecord(node).approverName }} </p>
|
||||||
|
<p v-if="getNodeRecord(node)"> 审批意见:{{ getNodeRecord(node).approveOpinion }} </p>
|
||||||
|
</el-timeline-item>
|
||||||
|
</el-timeline>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getApprovalInstanceByBusiness, getApprovalDetail, getProcessConfig } from '@/api/approval'
|
||||||
|
export default {
|
||||||
|
name: 'ApproveDialog',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
title: '审批详情',
|
||||||
|
loading: false,
|
||||||
|
approvalInstance: {},
|
||||||
|
processConfig: { nodeList: [] },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取节点标签类型
|
||||||
|
getNodeTagType(node) {
|
||||||
|
const record = this.getNodeRecord(node)
|
||||||
|
if (record) {
|
||||||
|
return record.approveResult === '1' ? 'success' : 'danger'
|
||||||
|
}
|
||||||
|
if (node.id === this.approvalInstance.currentNodeId) {
|
||||||
|
return 'warning'
|
||||||
|
}
|
||||||
|
return 'info'
|
||||||
|
},
|
||||||
|
// 获取节点记录
|
||||||
|
getNodeRecord(node) {
|
||||||
|
if (!this.approvalInstance.recordList) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
return this.approvalInstance.recordList.find((record) => record.nodeId === node.id)
|
||||||
|
},
|
||||||
|
// 获取节点状态标签
|
||||||
|
getNodeStatusLabel(node) {
|
||||||
|
const record = this.getNodeRecord(node)
|
||||||
|
if (record) {
|
||||||
|
return record.approveResult === '1' ? '已通过' : '已驳回'
|
||||||
|
}
|
||||||
|
if (node.id === this.approvalInstance.currentNodeId) {
|
||||||
|
return '审批中'
|
||||||
|
}
|
||||||
|
return '未开始'
|
||||||
|
},
|
||||||
|
async getInfo(id, type) {
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
const businessId = id
|
||||||
|
|
||||||
|
if (!businessId) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const instanceRes = await getApprovalInstanceByBusiness(type, businessId)
|
||||||
|
|
||||||
|
if (!instanceRes || !instanceRes.data) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const instanceId = instanceRes.data.id
|
||||||
|
const processId = instanceRes.data.processId
|
||||||
|
|
||||||
|
if (!instanceId || !processId) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const approvalRes = await getApprovalDetail(instanceId)
|
||||||
|
this.approvalInstance = approvalRes.data || {}
|
||||||
|
if (!approvalRes.data) return
|
||||||
|
const res = await getProcessConfig(processId)
|
||||||
|
this.processConfig = res.data || { nodeList: [] }
|
||||||
|
} catch (error) {
|
||||||
|
console.log('🚀 ~ error:', error)
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
openDialog(id, type) {
|
||||||
|
this.getInfo(id, type)
|
||||||
|
this.visible = true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
|
|
@ -112,10 +112,10 @@
|
||||||
<el-table-column label="退库工具数" align="center" prop="toolNum" :show-overflow-tooltip="true"/>
|
<el-table-column label="退库工具数" align="center" prop="toolNum" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="任务状态" align="center" prop="taskStatus" :show-overflow-tooltip="true">
|
<el-table-column label="任务状态" align="center" prop="taskStatus" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.taskStatus == '0'" type="info">待审批</el-tag>
|
<el-tag v-if="scope.row.taskStatus == '0'" type="info" @click="openDialog(scope.row)" style="cursor: pointer">待审批</el-tag>
|
||||||
<el-tag v-if="scope.row.taskStatus == '1'" type="warning">审批中</el-tag>
|
<el-tag v-if="scope.row.taskStatus == '1'" type="warning" @click="openDialog(scope.row)" style="cursor: pointer">审批中</el-tag>
|
||||||
<el-tag v-if="scope.row.taskStatus == '2'" type="success">已审批</el-tag>
|
<el-tag v-if="scope.row.taskStatus == '2'" type="success" @click="openDialog(scope.row)" style="cursor: pointer">已审批</el-tag>
|
||||||
<el-tag v-if="scope.row.taskStatus == '3'" type="danger">审批驳回</el-tag>
|
<el-tag v-if="scope.row.taskStatus == '3'" type="danger" @click="openDialog(scope.row)" style="cursor: pointer">审批驳回</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="申请人" align="center" prop="createBy" :show-overflow-tooltip="true" width="140px"/>
|
<el-table-column label="申请人" align="center" prop="createBy" :show-overflow-tooltip="true" width="140px"/>
|
||||||
|
|
@ -139,6 +139,8 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
<ApproveDialog ref="approveDialog" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -148,9 +150,13 @@ import {
|
||||||
getUseProjectListAPI
|
getUseProjectListAPI
|
||||||
} from '@/api/EquipmentLedger/equ-out'
|
} from '@/api/EquipmentLedger/equ-out'
|
||||||
import { deptTreeSelect } from '@/api/system/user'
|
import { deptTreeSelect } from '@/api/system/user'
|
||||||
|
import ApproveDialog from '@/views/business/components/ApproveDialog'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AuditList',
|
name: 'AuditList',
|
||||||
|
components: {
|
||||||
|
ApproveDialog
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
propertyUnitList: [],
|
propertyUnitList: [],
|
||||||
|
|
@ -249,6 +255,9 @@ export default {
|
||||||
// 审核
|
// 审核
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
this.$router.push({ path: '/business/warehouse/auditDetails', query: { id: row.id, isEdit: true } })
|
this.$router.push({ path: '/business/warehouse/auditDetails', query: { id: row.id, isEdit: true } })
|
||||||
|
},
|
||||||
|
openDialog(row) {
|
||||||
|
this.$refs.approveDialog.openDialog(row.id, 'EQUIPMENT_RETURN')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,19 +54,18 @@
|
||||||
<el-input style="width: 200px" disabled v-model="queryParams.proCounty"/>
|
<el-input style="width: 200px" disabled v-model="queryParams.proCounty"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- <el-form-item label="退库日期" prop="useTime">-->
|
<el-form-item label="退库日期" prop="useTime">
|
||||||
<!-- <el-date-picker-->
|
<el-date-picker
|
||||||
<!-- v-model="queryParams.useTime"-->
|
v-model="queryParams.useTime"
|
||||||
<!-- :disabled="!routerParams.isEdit"-->
|
style="width: 200px"
|
||||||
<!-- style="width: 200px"-->
|
type="date"
|
||||||
<!-- type="date"-->
|
format="yyyy-MM-dd"
|
||||||
<!-- format="yyyy-MM-dd"-->
|
value-format="yyyy-MM-dd"
|
||||||
<!-- value-format="yyyy-MM-dd"-->
|
placeholder="选择日期"
|
||||||
<!-- placeholder="选择日期"-->
|
@change="useTimeChange"
|
||||||
<!-- @change="useTimeChange"-->
|
>
|
||||||
<!-- >-->
|
</el-date-picker>
|
||||||
<!-- </el-date-picker>-->
|
</el-form-item>
|
||||||
<!-- </el-form-item>-->
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
@ -530,6 +529,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
useTimeChange(val) {
|
useTimeChange(val) {
|
||||||
|
console.log('🚀 ~ val:', val)
|
||||||
this.tableList.forEach(item => {
|
this.tableList.forEach(item => {
|
||||||
item.useTime = val
|
item.useTime = val
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -117,10 +117,10 @@
|
||||||
<el-table-column label="退库工具数" align="center" prop="toolNum" :show-overflow-tooltip="true"/>
|
<el-table-column label="退库工具数" align="center" prop="toolNum" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="任务状态" align="center" prop="taskStatus" :show-overflow-tooltip="true">
|
<el-table-column label="任务状态" align="center" prop="taskStatus" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.taskStatus == '0'" type="info">待审批</el-tag>
|
<el-tag v-if="scope.row.taskStatus == '0'" type="info" @click="openDialog(scope.row)" style="cursor: pointer">待审批</el-tag>
|
||||||
<el-tag v-if="scope.row.taskStatus == '1'" type="warning">审批中</el-tag>
|
<el-tag v-if="scope.row.taskStatus == '1'" type="warning" @click="openDialog(scope.row)" style="cursor: pointer">审批中</el-tag>
|
||||||
<el-tag v-if="scope.row.taskStatus == '2'" type="success">已审批</el-tag>
|
<el-tag v-if="scope.row.taskStatus == '2'" type="success" @click="openDialog(scope.row)" style="cursor: pointer">已审批</el-tag>
|
||||||
<el-tag v-if="scope.row.taskStatus == '3'" type="danger">审批驳回</el-tag>
|
<el-tag v-if="scope.row.taskStatus == '3'" type="danger" @click="openDialog(scope.row)" style="cursor: pointer">审批驳回</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="申请人" align="center" prop="createBy" :show-overflow-tooltip="true" width="140px"/>
|
<el-table-column label="申请人" align="center" prop="createBy" :show-overflow-tooltip="true" width="140px"/>
|
||||||
|
|
@ -149,6 +149,8 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
<ApproveDialog ref="approveDialog" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -159,9 +161,13 @@ import {
|
||||||
} from '@/api/EquipmentLedger/equ-out'
|
} from '@/api/EquipmentLedger/equ-out'
|
||||||
import { deptTreeSelect } from '@/api/system/user'
|
import { deptTreeSelect } from '@/api/system/user'
|
||||||
import { deleteApplyApi } from '@/api/business'
|
import { deleteApplyApi } from '@/api/business'
|
||||||
|
import ApproveDialog from '@/views/business/components/ApproveDialog'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ApplyList',
|
name: 'ApplyList',
|
||||||
|
components: {
|
||||||
|
ApproveDialog
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
propertyUnitList: [],
|
propertyUnitList: [],
|
||||||
|
|
@ -285,6 +291,9 @@ export default {
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
openDialog(row) {
|
||||||
|
this.$refs.approveDialog.openDialog(row.id, 'EQUIPMENT_RETURN')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,10 @@
|
||||||
<!-- <el-tag :type="getStatusType(scope.row.status)">
|
<!-- <el-tag :type="getStatusType(scope.row.status)">
|
||||||
{{ getStatusLabel(scope.row.status) }}
|
{{ getStatusLabel(scope.row.status) }}
|
||||||
</el-tag> -->
|
</el-tag> -->
|
||||||
<el-tag v-if="scope.row.status == '0'" type="info">待审批</el-tag>
|
<el-tag v-if="scope.row.status == '0'" type="info" @click="openDialog(scope.row)" style="cursor: pointer">待审批</el-tag>
|
||||||
<el-tag v-if="scope.row.status == '1'" type="warning">审批中</el-tag>
|
<el-tag v-if="scope.row.status == '1'" type="warning" @click="openDialog(scope.row)" style="cursor: pointer">审批中</el-tag>
|
||||||
<el-tag v-if="scope.row.status == '2'" type="success">已审批</el-tag>
|
<el-tag v-if="scope.row.status == '2'" type="success" @click="openDialog(scope.row)" style="cursor: pointer">已审批</el-tag>
|
||||||
<el-tag v-if="scope.row.status == '3'" type="danger">审批驳回</el-tag>
|
<el-tag v-if="scope.row.status == '3'" type="danger" @click="openDialog(scope.row)" style="cursor: pointer">审批驳回</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
@ -110,15 +110,21 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
<ApproveDialog ref="approveDialog" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getToolApplyListApi, deleteToolApplyApi } from '@/api/toolsManage'
|
import { getToolApplyListApi, deleteToolApplyApi } from '@/api/toolsManage'
|
||||||
import {deleteRepairList, getRepairList} from "@/api/equipmentRepair";
|
import {deleteRepairList, getRepairList} from "@/api/equipmentRepair";
|
||||||
|
import ApproveDialog from '@/views/business/components/ApproveDialog'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ApplicantList',
|
name: 'ApplicantList',
|
||||||
|
components: {
|
||||||
|
ApproveDialog,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
|
@ -270,6 +276,9 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
openDialog(row) {
|
||||||
|
this.$refs.approveDialog.openDialog(row.id, 'EQUIPMENT_REPAIR')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -80,10 +80,10 @@
|
||||||
<!-- <el-tag :type="getStatusType(scope.row.status)">
|
<!-- <el-tag :type="getStatusType(scope.row.status)">
|
||||||
{{ getStatusLabel(scope.row.status) }}
|
{{ getStatusLabel(scope.row.status) }}
|
||||||
</el-tag> -->
|
</el-tag> -->
|
||||||
<el-tag v-if="scope.row.status == '0'" type="info">待审批</el-tag>
|
<el-tag v-if="scope.row.status == '0'" type="info" @click="openDialog(scope.row)" style="cursor: pointer">待审批</el-tag>
|
||||||
<el-tag v-if="scope.row.status == '1'" type="warning">审批中</el-tag>
|
<el-tag v-if="scope.row.status == '1'" type="warning" @click="openDialog(scope.row)" style="cursor: pointer">审批中</el-tag>
|
||||||
<el-tag v-if="scope.row.status == '2'" type="success">已审批</el-tag>
|
<el-tag v-if="scope.row.status == '2'" type="success" @click="openDialog(scope.row)" style="cursor: pointer">已审批</el-tag>
|
||||||
<el-tag v-if="scope.row.status == '3'" type="danger">审批驳回</el-tag>
|
<el-tag v-if="scope.row.status == '3'" type="danger" @click="openDialog(scope.row)" style="cursor: pointer">审批驳回</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
|
|
@ -103,15 +103,21 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
<ApproveDialog ref="approveDialog" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getToolApplyListApi, deleteToolApplyApi } from '@/api/toolsManage'
|
import { getToolApplyListApi, deleteToolApplyApi } from '@/api/toolsManage'
|
||||||
import {deleteRepairList, getRepairList} from "@/api/equipmentRepair";
|
import {deleteRepairList, getRepairList} from "@/api/equipmentRepair";
|
||||||
|
import ApproveDialog from '@/views/business/components/ApproveDialog'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ApplicantList',
|
name: 'ApplicantList',
|
||||||
|
components: {
|
||||||
|
ApproveDialog,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
|
@ -258,6 +264,9 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
openDialog(row) {
|
||||||
|
this.$refs.approveDialog.openDialog(row.id, 'EQUIPMENT_REPAIR')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue