减免审核

This commit is contained in:
hongchao 2026-01-06 16:22:12 +08:00
parent 639a8e36bf
commit d1e960da35
7 changed files with 326 additions and 60 deletions

View File

@ -24,11 +24,11 @@ export function getAuditingDetailsApi(query) {
params: query
})
}
// 减免申请审核提交接口
export function submitAuditingApi(data) {
return request({
url: '/material/sysWorkflowRecordHistory/update',
url: '/material/sysWorkflowRecordHistory/updateReduction',
method: 'post',
data
})
}

View File

@ -272,7 +272,8 @@ export default {
taskId: '', // taskId
isAccept: '', // 1. 2.
recordId: '',
nextNodeId: '' // ID
nextNodeId: '', // ID
remarkType:1 // 1.PC2APP
}
}
},
@ -364,6 +365,7 @@ export default {
}
this.auditingParams.taskTypeId = 16
this.auditingParams.remarkType = 1
const loading = this.$loading()
const res = await submitAuditingDirectApi(this.auditingParams)

View File

@ -72,7 +72,7 @@
<template v-slot="scope" v-if="column.prop == 'flowStatus'">
<el-tag v-if="scope.row.flowStatus == '0'" type="warning" size="mini">待审核</el-tag>
<el-tag v-else-if="scope.row.flowStatus == '1'" size="mini">审核中</el-tag>
<el-tag v-else-if="scope.row.flowStatus == '2'" type="success" size="mini">通过</el-tag>
<el-tag v-else-if="scope.row.flowStatus == '2'" type="success" size="mini">完成</el-tag>
<el-tag v-else-if="scope.row.flowStatus == '3'" type="danger" size="mini">已驳回</el-tag>
</template>
</el-table-column>

View File

@ -7,6 +7,18 @@
<TitleTip :title="`基本信息`" />
<el-form size="small" style="padding: 20px" disabled label-width="120px" :model="detailsInfo">
<el-row>
<el-col :span="12">
<el-form-item label="租赁工程">
<el-input v-model="detailsInfo.projectName" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="租赁单位">
<el-input v-model="detailsInfo.unitName" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="减免开始日期">
@ -34,7 +46,7 @@
<TitleTip :title="`明细信息`" />
<el-table style="margin: 20px 0" :data="detailsList">
<el-table-column prop="num" label="减免数量" align="center" show-overflow-tooltip />
<el-table-column prop="reduceNum" label="减免数量" align="center" show-overflow-tooltip />
<el-table-column prop="maName" label="机具名称" align="center" show-overflow-tooltip />
<el-table-column prop="maModel" label="规格型号" align="center" show-overflow-tooltip />
<el-table-column prop="num" label="领料数量" align="center" show-overflow-tooltip />
@ -73,8 +85,25 @@
<TitleTip :title="`附件信息`" />
<div class="file-box">
<div v-for="img in fileList" :key="img.id">
<el-image style="width: 100%; height: 100%" :src="img.url" fit="cover"></el-image>
<div v-for="(file, index) in fileList" :key="index">
<div v-if="file.type === 'pdf'" style="margin: 10px">
<a :href="file.url" target="_blank">
<el-image
:src="require('@/assets/file.png')"
fit="file"
style="width: 100px; height: 100px"
/>
</a>
</div>
<div v-else-if="file.type === 'image'" style="margin: 10px">
<el-image
:src="file.url"
fit="file"
:preview-src-list="previewList"
@click="handleImg(file)"
style="width: 100px; height: 100px"
/>
</div>
</div>
</div>
</div>
@ -99,6 +128,11 @@
<el-tag size="mini" type="danger" v-if="step.isAccept === 2">已驳回</el-tag>
</div>
<div class="node-info" v-if="step.auditBy">
审核人:
{{ step.auditBy }}
</div>
<div class="node-info" v-if="step.createTime">
审核时间:
{{ step.createTime }}
@ -159,7 +193,8 @@ export default {
},
pagesType: 1,
userId: '',
currentNodeId: ''
currentNodeId: '',
previewList: [],
}
},
created() {
@ -178,8 +213,8 @@ export default {
//
async onHandleAuditing(type) {
//
const currentAuditing = this.auditingList.filter(e => e.configValues.includes(this.userId)) //
const currentIndex = this.auditingList.findIndex(e => e.configValues.includes(this.userId)) //
const currentAuditing = this.auditingList.filter(e => e.nodeId === this.currentNodeId) //
const currentIndex = this.auditingList.findIndex(e => e.nodeId === this.currentNodeId) //
const { recordId, id, typeId, isAccept } = currentAuditing[0]
@ -196,20 +231,32 @@ export default {
if (currentIndex !== this.auditingList.length - 1) {
this.auditingParams.nextNodeId = this.auditingList[currentIndex + 1].id
}
this.auditingParams.taskTypeId = 13
const loading = this.$loading()
const res = await submitAuditingApi(this.auditingParams)
console.log(res, '提交结果')
if (res.code === 200) {
this.$modal.msgSuccess('审核成功')
loading.close()
setTimeout(() => {
const obj = { path: '/business-examine/reduction-apply' }
this.$tab.closeOpenPage(obj)
// const obj = { path: '/business-examine/reduction-apply' }
// this.$tab.closeOpenPage(obj)
this.$tab.closePage()
}, 500)
} else {
loading.close()
this.$modal.msgError(res.message);
}
console.log(this.auditingParams, ' this.auditingParams组装好的参数')
},
handleImg(img) {
console.log('🚀 ~ handleImg ~ img:', img)
this.previewList = this.fileList.filter(file => file.type === 'image').map(file => file.url)
},
//
async getLeaseTaskDetailFun(id, taskId) {
const { data: res } = await getDiscountViewList(id)
@ -217,12 +264,21 @@ export default {
this.detailsInfo = res
this.detailsList = res.detailList
this.fileList = res.bmFileInfos
if (this.fileList.length > 0) {
this.fileList.forEach(item => {
// url .pdf type= pdf
if (item.url.includes('.pdf')) {
item.type = 'pdf'
} else {
item.type = 'image'
}
})
}
this.detailsList.forEach(e => {
this.totalAmount += e.reduceLeaseMoney * 1
})
const { rows: result } = await getAuditingDetailsApi({ taskId })
const { rows: result } = await getAuditingDetailsApi({ taskId,taskType: 13 })
this.auditingList = result
console.log('result审核记录详情', result)
}

View File

@ -69,36 +69,26 @@
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="减免单号" align="center" prop="code" width="100px" />
<el-table-column label="申请时间" align="center" prop="createTime" width="100px" />
<el-table-column label="申请人" align="center" prop="createBy" width="80" />
<el-table-column label="租赁单位" align="center" prop="unitName" />
<el-table-column label="租赁工程" align="center" prop="projectName" />
<el-table-column label="租赁费用(元)" align="center" prop="leasePrice" :show-overflow-tooltip="true">
<!-- <template slot-scope="scope">
{{ scope.row.leasePrice.toFixed(2) }}
</template> -->
<el-table-column label="租赁费用(元)" align="center" prop="leaseMoney" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.leaseMoney.toFixed(2) }}
</template>
</el-table-column>
<el-table-column
label="本次减免费用(元)"
align="center"
prop="leaseMoney"
:show-overflow-tooltip="true"
width="150px"
>
<!-- <template slot-scope="scope">
{{ scope.row.leaseMoney.toFixed(2) }}
</template> -->
</el-table-column>
<el-table-column
label="累计减免费用(元) "
align="center"
prop="leaseMoneyAll"
:show-overflow-tooltip="true"
width="150px"
>
<!-- <template slot-scope="scope">
<template slot-scope="scope">
{{ scope.row.leaseMoneyAll.toFixed(2) }}
</template> -->
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" width="80">
<template slot-scope="{ row }">
@ -108,7 +98,7 @@
<el-tag v-if="row.status == '1'" size="mini">审核中</el-tag>
<el-tag v-if="row.status == '0'" type="warning" size="mini">待审核</el-tag>
<el-tag v-if="row.status == '2'" type="success" size="mini">完成</el-tag>
<el-tag v-if="row.status == '2'" type="success" size="mini">审核</el-tag>
<el-tag v-if="row.status == '3'" type="danger" size="mini">已驳回</el-tag>
</template>
</el-table-column>
@ -127,7 +117,6 @@
审核
</el-button>
<el-button
v-if="scope.row.status == 2 || scope.row.status == 3"
type="text"
size="mini"
icon="el-icon-search"

View File

@ -8,7 +8,84 @@
:inline="true"
label-width="80px"
>
<!-- 分公司 -->
<el-form-item label="分公司" prop="impUnitName">
<el-select
v-model="queryParams.impUnitName"
placeholder="请选择分公司"
clearable
filterable
style="width: 100%"
@change="onImpUnitChange"
>
<el-option
v-for="item in impUnitOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<!-- 项目部 -->
<el-form-item label="项目部" prop="departName">
<el-select
v-model="queryParams.departName"
placeholder="请选择项目部"
clearable
filterable
style="width: 100%"
:disabled="!queryParams.impUnitName"
@change="onDepartChange"
>
<el-option
v-for="item in departOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<!-- 工程 -->
<el-form-item label="结算工程" prop="projectId">
<el-select
v-model="queryParams.projectId"
placeholder="请选择工程"
clearable
filterable
style="width: 100%"
:disabled="!queryParams.departName"
@change="onProjectChange"
>
<el-option
v-for="item in impProOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<!-- 单位树结构 -->
<el-form-item label="结算单位" prop="unitId">
<treeselect
v-model="queryParams.unitId"
:disabled="!queryParams.projectId"
:options="uniteList"
:normalizer="normalizer"
:show-count="true"
style="width: 215px"
:disable-branch-nodes="true"
noChildrenText="没有数据了"
noOptionsText="没有数据"
noResultsText="没有搜索结果"
placeholder="请选择转出单位"
@select="uniteChange"
/>
</el-form-item>
<!-- <el-form-item label="结算单位" prop="unitId">
<treeselect
v-model="queryParams.unitId"
:options="unitList"
@ -38,11 +115,8 @@
placeholder="请选择工程"
@select="proChange"
/>
</el-form-item>
<el-form-item prop="agreementCode">
<el-input v-model="queryParams.agreementCode" placeholder="请输入协议号" clearable disabled />
</el-form-item>
</el-form-item> -->
<div>
<el-form-item label="选择时间范围" prop="startTime" label-width="120px">
<el-date-picker
v-model="queryParams.startTime"
@ -65,8 +139,7 @@
/>
</el-form-item>
<div>
<el-form-item prop="maName">
<el-form-item prop="maName">
<el-input
maxlength="50"
v-model="queryParams.maName"
@ -89,7 +162,7 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button
type="danger"
icon="el-icon-minus"
icon="el-icon-plus"
plain
size="mini"
@click="handleApply"
@ -113,7 +186,7 @@
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope">
<template slot-scope="scope">
<span
style="background-color: #f8f8f9; text-align: center"
v-if="scope.$index == pushReviewList.length - 1"
@ -392,10 +465,19 @@
</template>
<script>
import { getProjectList, getUnitList, getAgreementInfoById } from '@/api/back/index.js'
// import { getAgreementInfoById } from '@/api/back/index.js'
import { getReliefList, addRelief } from '@/api/cost/cost'
import { downloadFile, downloadFileData } from '@/utils/download'
import { getToken } from '@/utils/auth'
import {getImpUnitListApi} from "@/api/materialsStation";
import {
getListProject,
getListUnite,
getAgreement,
getUnitProDepList,
getProjectList,
getDepartNameList
} from '@/api/lease/apply'
import Treeselect from '@riophae/vue-treeselect'
import Decimal from '@/utils/decimal'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
@ -426,6 +508,13 @@ export default {
//
proList: [],
impUnitOptions: [], //
departOptions: [],//
impProOptions: [],//
//
uniteList: [],
//
moneyAll: 0,
//
@ -435,6 +524,8 @@ export default {
queryParams: {
unitId: null,
projectId: null,
impUnitName: '',
departName: '',
agreementId: '',
agreementCode: '',
time: null,
@ -493,8 +584,9 @@ export default {
}
},
created() {
this.GetUnitData()
this.GetProData()
// this.GetUnitData()
// this.GetProData()
this.getImpUnitOptions()
this.getList()
},
computed: {
@ -505,6 +597,128 @@ export default {
},
components: { Treeselect },
methods: {
/** 获取分公司下拉 */
async getImpUnitOptions() {
try {
const res = await getImpUnitListApi()
this.impUnitOptions = res.data.map(item => ({
label: item.impUnitName,
value: item.impUnitName
}))
if (this.impUnitOptions.length === 1) {
this.queryParams.impUnitName = this.impUnitOptions[0].value
await this.onImpUnitChange(this.queryParams.impUnitName)
}
} catch (e) {
console.error('获取分公司下拉失败:', e)
}
},
/** 分公司变化 */
async onImpUnitChange(value) {
this.queryParams.departName = ''
this.queryParams.projectId = ''
this.queryParams.unitId = undefined
this.departOptions = []
this.impProOptions = []
this.uniteList = []
if (!value) return
const res = await getDepartNameList({ impUnitName: value })
this.departOptions = res.data.map(item => ({
label: item.departName,
value: item.departName
}))
if (this.departOptions.length === 1) {
this.queryParams.departName = this.departOptions[0].value
await this.onDepartChange(this.queryParams.departName)
}
},
/** 项目部变化 */
async onDepartChange(value) {
this.queryParams.projectId = ''
this.queryParams.unitId = undefined
this.impProOptions = []
this.uniteList = []
if (!value) return
const res = await getProjectList({ departName: value })
this.impProOptions = res.data.map(item => ({
label: item.proName,
value: item.proId
}))
if (this.impProOptions.length === 1) {
this.queryParams.projectId = this.impProOptions[0].value
await this.onProjectChange(this.queryParams.projectId)
}
},
/** 工程变化 */
async onProjectChange(value) {
//
this.queryParams.unitId = undefined
this.uniteList = []
//
if (!value) return
try {
let edit =true;
const res = await getUnitProDepList({ projectId: value, enableFilter: edit })
this.uniteList = res.data || []
//
const leafNodes = []
const findLeaf = nodes => {
nodes.forEach(n => {
if (!n.children || n.children.length === 0) {
leafNodes.push(n)
} else {
findLeaf(n.children)
}
})
}
findLeaf(this.uniteList)
if (leafNodes.length === 1) {
this.queryParams.unitId = leafNodes[0].id || leafNodes[0].value
await this.getAgreementId()
}
} catch (e) {
console.error('获取单位列表失败:', e)
}
},
uniteChange(val) {
// setTimeout(() => {
// getListProject({ unitId: this.maForm.backUnitId,enableFilter: true }).then(response => {
// this.projectList = response.data
// this.maForm.backProId = null
// })
// }, 500)
setTimeout(() => {
this.getAgreementId()
}, 500);
},
async getAgreementId() {
try {
const params = {
unitId: this.queryParams.unitId,
projectId: this.queryParams.projectId
}
const res = await getAgreement(params)
console.log('🚀 ~ getAgreementId ~ res:', res)
this.queryParams.agreementId = res.data.agreementId
this.queryParams.agreementCode = res.data.agreementCode
// this.getList()
} catch (error) {
console.log('🚀 ~ getAgreementId ~ error:', error)
}
},
getRowClassName({ row, rowIndex }) {
if (this.dialogAppy.reduceStartTime && this.dialogAppy.reduceEndTime) {
if ((!row.reduceStartTime || !row.reduceEndTime) && rowIndex != this.applyList.length - 1) {
@ -603,7 +817,7 @@ export default {
console.log('22222222', this.pushReviewList)
this.leaseAll = this.pushReviewList.reduce((total, item) => {
// return total + Number(item.leaseMoney);
return new Decimal(total).add(new Decimal(item.leaseMoney)).toString()
return new Decimal(total).add(new Decimal(item.leaseMoney || 0)).toString()
}, 0)
let obj = {
id: null,

View File

@ -42,7 +42,7 @@
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
<el-option label="待审核" value="0"></el-option>
<el-option label="审核中" value="1"></el-option>
<el-option label="已审核" value="2"></el-option>
<el-option label="已完成" value="2"></el-option>
<el-option label="已驳回" value="3"></el-option>
</el-select>
</el-form-item>
@ -103,11 +103,15 @@
</template> -->
</el-table-column>
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.status == '0'">待审核</span>
<span v-if="scope.row.status == '1'">审核中</span>
<span v-if="scope.row.status == '2'">已审核</span>
<span v-if="scope.row.status == '3'">已驳回</span>
<template v-slot="scope" >
<el-tag v-if="scope.row.status == '0'" type="warning" size="mini" style="margin-right: 5px">待审核</el-tag>
<el-tag v-else-if="scope.row.status == '1'" size="mini" style="margin-right: 5px">审核中</el-tag>
<el-tag v-else-if="scope.row.status == '2'" type="success" size="mini" style="margin-right: 5px">
已完成
</el-tag>
<el-tag v-else-if="scope.row.status == '3'" type="danger" size="mini" style="margin-right: 5px">
已驳回
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="180">
@ -116,7 +120,7 @@
查看
</el-button>
<el-button
v-if="scope.row.status != '2'"
v-show="scope.row.status == '0'"
type="text"
size="mini"
icon="el-icon-edit"
@ -125,6 +129,7 @@
编辑
</el-button>
<el-button
v-show="scope.row.status == '0'"
type="text"
size="mini"
icon="el-icon-delete"
@ -228,12 +233,12 @@
<span v-else class="el-upload-list__item-preview" @click="picturePreview(file)">
<i class="el-icon-zoom-in" />
</span>
<!-- <span-->
<!-- class="el-upload-list__item-delete"-->
<!-- @click="handleRemoveElectricianImgList(file)"-->
<!-- >-->
<!-- <i class="el-icon-delete" />-->
<!-- </span>-->
<span
class="el-upload-list__item-delete"
@click="handleRemoveElectricianImgList(file)"
>
<i class="el-icon-delete" />
</span>
</span>
</div>
<i class="el-icon-plus avatar-uploader-icon"></i>