报备丢失申请,审核

This commit is contained in:
hongchao 2025-11-27 15:52:26 +08:00
parent e120bd14d7
commit 39ddcb68af
11 changed files with 2653 additions and 15 deletions

View File

@ -234,4 +234,68 @@ export function revokeApi(data) {
method: 'get',
params: data
})
}
// 根据协议id查编码在用列表
export function getUseringLoseData(query) {
return request({
url: '/material/LossAssign/getUseData',
method: 'get',
params: query
})
}
// 报备丢失物资类型-3级tree
export function getEquipmentLoseThreeTypes(query) {
return request({
url: '/material/LossAssign/equipmentThreeTypes',
method: 'get',
params: query
})
}
// 报备丢失申请提交-新增
export function receiveLoseSubmitTwo(data) {
return request({
url: '/material/LossAssign/add',
method: 'post',
data
})
}
// 报备丢失审核-列表
export function getLoseAuditListApi(query) {
return request({
url: '/material/LossAssign/list',
method: 'get',
params: query
})
}
// 报备丢失申请提交-详情
export function getLoseDetail(query) {
return request({
url: '/material/LossAssign/getInfo',
method: 'get',
params: query
})
}
// 报备丢失申请提交-编辑
export function receiveLoseEdit(data) {
return request({
url: '/material/LossAssign/edit',
method: 'post',
data
})
}
// 报备丢失申请提交-删除
export function receiveLoseDelete(data) {
return request({
url: '/material/LossAssign/delete',
method: 'post',
data
})
}

View File

@ -346,3 +346,20 @@ export function getAssestsReportList(query) {
})
}
// 导出zip进行导出
export function getExportZipUnsettled(data) {
return request({
url: '/material/slt_agreement_info/exportUnsettled',
method: 'post',
data: data,
})
}
// 导出zip获取进度
export function getExportZipProgress(data) {
return request({
url: '/material/slt_agreement_info/exportProgress',
method: 'post',
data: data,
})
}

View File

@ -50,3 +50,13 @@ export function getNodeAuditStatusAPI(query) {
params: query
})
}
// 报备丢失审核提交接口
export function submitAuditingLoseApi(data) {
return request({
url: '/material/LossAssign/directUpdate',
method: 'post',
data
})
}

View File

@ -242,6 +242,22 @@ export const dynamicRoutes = [
}
]
},
// 报备丢失审核 业务详情
{
path: '/business-details/lose-apply',
component: Layout, // 后续单独拎出来时 要取消layout 直接是独立页面 类似于404页面配置即可
hidden: true,
permissions: ['lose-apply:list'], // 权限字符
children: [
{
path: 'index',
name: 'lose-apply',
meta: { title: '报备丢失详情', activeMenu: '/business-examine/lose-apply' },
component: () => import('@/views/business-examine/lose-apply/business-details.vue')
}
]
},
// 减免审核 业务详情
{
path: '/business-details/reduction-apply',

View File

@ -0,0 +1,483 @@
<template>
<div class="business-details-container">
<el-row>
<el-col :span="18">
<div class="left-container">
<div class="pages-title">报备丢失申请详情</div>
<TitleTip :title="`基本信息`" />
<el-form
:model="maForm"
ref="maForm"
size="small"
label-width="100px"
disabled
style="margin-top: 20px"
>
<el-row :gutter="20" style="margin-bottom: 20px">
<el-col :span="8" :offset="0">
<el-card shadow="always" :body-style="{ padding: '20px' }" style="min-width: 400px">
<!-- card body -->
<el-form-item label="报备丢失单位" prop="lossUnitId">
<el-input
v-model="maForm.lossUnitName"
placeholder="请输入单位"
clearable
maxlength="50"
style="width: 240px"
/>
</el-form-item>
<el-form-item label="报备丢失工程" prop="lossProId">
<el-input
v-model="maForm.lossProName"
placeholder="请输入工程"
clearable
maxlength="50"
style="width: 240px"
/>
</el-form-item>
<el-form-item label="报备丢失人" prop="lossMan">
<el-input
v-model="maForm.lossMan"
placeholder="请输入报备丢失人"
clearable
maxlength="50"
style="width: 240px"
/>
</el-form-item>
<el-form-item label="联系电话" prop="lossPhone">
<el-input
v-model="maForm.lossPhone"
placeholder="请输入联系电话"
clearable
maxlength="11"
style="width: 240px"
/>
</el-form-item>
</el-card>
</el-col>
</el-row>
</el-form>
<TitleTip :title="`明细信息`" />
<el-table ref="equipmentList" :data="equipmentList">
<el-table-column align="center" label="序号" type="index" width="55" />
<el-table-column
v-for="(column, index) in tableColumns"
:key="column.prop"
:label="column.label"
:prop="column.prop"
align="center"
show-overflow-tooltip
></el-table-column>
</el-table>
<TitleTip :title="`附件信息`" />
<div class="file-box">
<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>
</el-col>
<el-col :span="6">
<div class="right-container">
<div class="right-title">
<div></div>
<div></div>
<div>流程记录</div>
</div>
<div class="process-record">
<el-steps :space="120" direction="vertical">
<el-step v-for="(step, index) in auditingList" :key="index" :title="step.nodeName">
<!-- <template slot="description">
<div class="custom-description">
{{ step.nodeName }}
<el-tag
size="mini"
type="primary"
v-if="step.isAccept == 0 || step.isAccept == null"
>
待审批
</el-tag>
<el-tag size="mini" type="success" v-if="step.isAccept == 1">已通过</el-tag>
<el-tag size="mini" type="danger" v-if="step.isAccept == 2">已驳回</el-tag>
<div>{{ step.creator }}</div>
<div>{{ step.createTime }}</div>
<div>{{ step.remark }}</div>
</div>
</template> -->
<template slot="description">
<div class="custom-description">
审核结果:
<el-tag size="mini" type="primary" v-if="step.isAccept === 0">待审批</el-tag>
<el-tag size="mini" type="success" v-if="step.isAccept === 1">已通过</el-tag>
<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 }}
</div>
<div class="node-info" v-if="step.remark">
审核意见:
{{ step.remark }}
</div>
</template>
</el-step>
</el-steps>
</div>
<div class="auditing-container" v-if="isEdit">
<el-input
type="textarea"
v-model="auditingParams.remark"
placeholder="请输入审核意见"
:autosize="{ minRows: 2, maxRows: 6 }"
/>
<el-row class="btn-container">
<el-button type="success" size="mini" @click="onSubmitPass">通过</el-button>
<el-button type="danger" size="mini" @click="onSubmitReject">驳回</el-button>
</el-row>
</div>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import TitleTip from './components/title-tip.vue'
import { getLeaseTaskDetail,getLoseDetail, getInfoById, getAuditInfo, auditDir } from '@/api/business/index'
import { getAuditingDetailsApi, submitAuditingLoseApi } from '@/api/receive-apply/index.js'
export default {
components: {
TitleTip
},
data() {
return {
id: '',
flowId: '',
isEdit: false, //
isDetail: false, //
isAccept: '',
remark: '',
maForm: {},
auditingList: [], //
equipmentList: [], //
//
tableColumns: [
{ label: '报备丢失数量', prop: 'lossNum' },
{ label: '类型名称', prop: 'typeName' },
{ label: '规格型号', prop: 'typeModelName' },
{ label: '机具编号', prop: 'maCode' },
{ label: '计量单位', prop: 'unitName' },
{ label: '在用数量', prop: 'useNum' },
{ label: '领料人', prop: 'leasePerson' },
{ label: '领料日期', prop: 'startTime' }
],
fileList: [
{ name: '文件1', url: 'https://s5.aconvert.com/convert/p3r68-cdx67/vqm2g-dwr99.pdf', type: 'pdf' },
{
name: '文件2',
url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
type: 'image'
}
],
previewList: [],
auditingParams: {
id: '', // ID
remark: '', //
taskId: '', // taskId
isAccept: '', // 1. 2.
}
}
},
created() {
//
// if (this.$route.query) {
// const { id, taskId } = this.$route.query
// this.getLeaseTaskDetailFun(id, taskId)
// }
if (this.$route.query.type == 'edit') {
this.isEdit = true
this.isDetail = false
this.id = this.$route.query.id
this.flowId = this.$route.query.flowId
const obj = Object.assign({}, this.$route, { title: '报备丢失申请审核' })
this.$tab.updatePage(obj)
} else if (this.$route.query.type == 'detail') {
this.isEdit = false
this.isDetail = true
this.id = this.$route.query.id
this.flowId = this.$route.query.flowId
const obj = Object.assign({}, this.$route, { title: '报备丢失申请详情' })
this.$tab.updatePage(obj)
}
this.getTaskInfo()
// this.getAuditInfo()
if (this.$route.query) {
const { nodeId, id } = this.$route.query
this.auditingParams.id = id
this.currentNodeId = nodeId
this.getLeaseTaskDetailFun(id)
}
},
methods: {
//
onSubmitPass() {
//
this.$confirm('是否确认通过审核?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
// this.isAccept = 1
this.auditingParams.isAccept = 1
this.submitAuditing()
})
.catch(() => {
this.$message.info('已取消')
})
},
//
onSubmitReject() {
//
this.$confirm('是否确认驳回审核?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.auditingParams.isAccept = 2
this.submitAuditing()
})
.catch(() => {
this.$message.info('已取消')
})
},
//
async submitAuditing() {
//
const loading = this.$loading()
const res = await submitAuditingLoseApi(this.auditingParams)
if (res.code === 200) {
this.$modal.msgSuccess('审核成功')
loading.close()
setTimeout(() => {
// const obj = { path: '/business-examine/receive-apply' }
// this.$tab.closeOpenPage(obj)
this.$tab.closePage()
}, 500)
} else {
this.$modal.msgError(res.message);
loading.close()
}
// const params = {
// flowId: this.flowId,
// nodeId: this.auditingList[this.auditingList.length - 1].nodeId,
// isAccept: this.isAccept,
// remark: this.remark
// }
// try {
// const res = await auditDir(params)
// console.log('🚀 ~ submitAuditing ~ res:', res)
// this.$message.success('')
// this.$tab.closePage()
// } catch (error) {
// console.log('🚀 ~ submitAuditing ~ error:', error)
// }
},
//
async getTaskInfo() {
const loading = this.$loading()
try {
const res = await getLoseDetail({ id: this.id })
console.log('🚀 ~ getTaskInfo ~ res:', res)
this.maForm = res.data.lossAssignInfo
this.equipmentList = res.data.lossAssignDetails
this.fileList = res.data.lossAssignInfo.dirUrls
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'
}
})
}
console.log('🚀 ~ getTaskInfo ~ fileList:', this.fileList)
console.log('🚀 ~ getTaskInfo ~ this.equipmentList:', this.equipmentList)
loading.close()
} catch (error) {
console.log('🚀 ~ error:', error)
loading.close()
}
},
//
async getAuditInfo() {
try {
const params = {
id: this.id,
flowId: this.flowId
}
const res = await getAuditInfo(params)
console.log('🚀 ~ getAuditInfo ~ res:', res)
this.auditingList = res.data
console.log('🚀 ~ getAuditInfo ~ this.auditingList:', this.auditingList)
} catch (error) {
console.log('🚀 ~ getAuditInfo ~ error:', error)
}
},
handleImg(img) {
console.log('🚀 ~ handleImg ~ img:', img)
this.previewList = this.fileList.filter(file => file.type === 'image').map(file => file.url)
},
//
async getLeaseTaskDetailFun(taskId) {
const taskType = 26
const result = await getAuditingDetailsApi({ taskId, taskType })
console.log('result', result)
this.auditingList = result.rows
}
}
}
</script>
<style scoped lang="scss">
.business-details-container {
padding: 20px;
}
.pages-title {
padding: 10px 0 30px 0;
font-size: 20px;
font-weight: bold;
letter-spacing: 2px;
text-align: center;
color: #19a4a0;
}
.file-box {
padding: 10px;
display: flex;
flex-wrap: wrap;
box-sizing: border-box;
/* div {
width: calc((100% - 110px) / 12);
height: 60px;
margin-right: 10px;
margin-top: 10px;
text-align: center;
line-height: 60px;
background-color: #19a4a0;
}
& div:nth-child(12n) {
margin-right: 0;
} */
}
.right-container {
padding: 0 20px;
}
.right-title {
display: flex;
align-items: center;
font-size: 14px;
& div:first-child {
width: 16px;
height: 16px;
border-radius: 50%;
background-color: #19a4a0;
z-index: 9;
}
& div:nth-child(2) {
width: 16px;
height: 16px;
border-radius: 50%;
background-color: #b2e1e0;
transform: translateX(-50%);
}
}
.process-record {
margin-top: 20px;
// height: 60vh;
}
.btn-container {
margin-top: 10px;
display: flex;
justify-content: space-around;
}
::v-deep .el-step__icon.is-text {
background-color: #19a4a0;
color: #19a4a0;
border: none;
width: 16px;
height: 16px;
}
::v-deep .el-step.is-vertical .el-step__line {
width: 2px;
top: 26px;
bottom: 8px;
left: 7px;
}
::v-deep .el-step__title.is-finish {
font-weight: bold;
color: #303133;
font-size: 16px;
}
::v-deep .el-step__title.is-wait {
font-weight: bold;
color: #303133;
font-size: 16px;
}
//
.cont-center {
display: flex;
justify-content: center;
align-items: center;
}
</style>

View File

@ -0,0 +1,37 @@
<template>
<div class="title-tip">
<div class="is-green"></div>
<div class="title-child">{{ title }}</div>
</div>
</template>
<script>
export default {
props: {
title: {
type: String,
default: () => '基本信息'
}
}
}
</script>
<style scoped>
.title-tip {
display: flex;
align-items: center;
background-color: #ebeaea;
}
.is-green {
margin: 0 6px;
width: 5px;
height: 20px;
background-color: #19a4a0;
}
.title-child {
font-weight: bold;
letter-spacing: 1px;
font-size: 18px;
}
</style>

View File

@ -0,0 +1,233 @@
<template>
<!-- 报备丢失审核页面 -->
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" inline>
<el-form-item label="申请日期" prop="startTime">
<el-date-picker
v-model="queryParams.startTime"
value-format="yyyy-MM-dd"
type="date"
placeholder="开始日期"
@change="() => queryParams.endTime = ''"
style="width: 130px"
/>
</el-form-item>
<el-form-item>-</el-form-item>
<el-form-item prop="endTime">
<el-date-picker
v-model="queryParams.endTime"
value-format="yyyy-MM-dd"
type="date"
placeholder="结束日期"
:picker-options="{ disabledDate: (t) => t.getTime() < new Date(queryParams.startTime).getTime() - 86400000}"
style="width: 130px"
/>
</el-form-item>
<el-form-item label="关键字" prop="keyWord">
<el-input
clearable
placeholder="请输入关键字"
v-model="queryParams.keyWord"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择审核状态" clearable>
<el-option
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in statusOptions"
/>
</el-select>
</el-form-item>
<!-- 表单按钮 -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
<el-table :data="tableList" fit highlight-current-row style="width: 100%" :max-height="650">
<!-- 多选 -->
<!-- <el-table-column type="selection" width="55" align="center" @selection-change="selectionChange" /> -->
<el-table-column
type="index"
width="55"
label="序号"
align="center"
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
/>
<el-table-column
v-for="column in tableColumns"
:show-overflow-tooltip="column.showTooltip"
:key="column.prop"
:label="column.label"
:prop="column.prop"
:width="column.width"
align="center"
>
<!-- 插槽 -->
<template v-slot="scope" v-if="column.prop == 'status'">
<el-tag v-if="scope.row.status == '0'" type="warning" size="mini">待审核</el-tag>
<el-tag v-else-if="scope.row.status == '1'" size="mini">审核中</el-tag>
<el-tag v-else-if="scope.row.status == '2'" type="success" size="mini">已通过</el-tag>
<el-tag v-else-if="scope.row.status == '3'" type="danger" size="mini">已驳回</el-tag>
</template>
</el-table-column>
<!-- 操作 -->
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
type="text"
size="mini"
icon="el-icon-edit"
v-if="auditingShow(scope.row)"
@click="handleEdit(scope.row, 2)"
>
审核
</el-button>
<el-button
type="text"
size="mini"
icon="el-icon-search"
@click="handleEdit(scope.row, 1)"
>
查看
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<pagination
:total="total"
v-show="total > 0"
@pagination="getList"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
/>
</div>
</template>
<script>
import { getLoseAuditListApi } from '@/api/business/index'
export default {
name: 'Lose-apply',
data() {
return {
userId: '',
timeRange: [],
//
tableList: [],
queryParams: {
pageNum: 1,
pageSize: 10,
keyWord: '', //
status: '1', //
startTime: '', //
endTime: '' //
},
//
statusOptions: [
{ label: '待审核', value: '0' },
{ label: '审核中', value: '1' },
{ label: '已完成', value: '2' },
{ label: '已驳回', value: '3' }
],
total: 0, //
//
tableColumns: [
{ label: '申请时间', prop: 'createTime', showToolTip: true, width: '100' },
{ label: '申请人', prop: 'createBy', showToolTip: true, },
{ label: '报备丢失单号', prop: 'code', showToolTip: true },
{ label: '报备丢失单位', prop: 'lossUnitName', showToolTip: false },
{ label: '报备丢失工程', prop: 'lossProName', showToolTip: false },
{ label: '状态', prop: 'status', showToolTip: true, width: '80' }
]
}
},
created() {
const end = new Date()
let start = new Date()
start.setMonth(start.getMonth() - 1)
this.timeRange = [this.format(start), this.format(end)]
this.userId = sessionStorage.getItem('userId')
this.queryParams.startTime = this.format(start)
this.queryParams.endTime = this.format(end)
// //
// if (this.statusOptions.length > 1) {
// this.queryParams.status = this.statusOptions[1].value
// }
this.getList()
},
methods: {
format(date) {
const y = date.getFullYear()
const m = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
return `${y}-${m}-${day}`
},
//
handleQuery() {
this.getList()
},
//
handleReset() {
const end = new Date()
let start = new Date()
start.setMonth(start.getMonth() - 1)
this.timeRange = [this.format(start), this.format(end)]
this.queryParams.startTime = this.format(start)
this.queryParams.endTime = this.format(end)
this.queryParams.pageNum = 1
this.queryParams.pageSize = 10
this.$refs.queryForm.resetFields()
this.getList()
},
//
async getList() {
try {
const params = {
...this.queryParams,
// startTime: this.timeRange ? this.timeRange[0] : '',
// endTime: this.timeRange ? this.timeRange[1] : ''
}
const res = await getLoseAuditListApi(params)
console.log('resxxxxxxxxxxxxxxxxx', res)
this.tableList = res.data.rows
this.total = res.data.total || 0
} catch (error) {
this.tableList = []
this.total = 0
}
},
//
selectionChange(val) {},
//
handleEdit(row, type) {
// ----type---- 1. 2.
//
this.$router.push({
name: 'lose-apply',
query: {
id: row.id,
flowId: row.flowId,
taskId: row.taskId,
type: type === 1 ? 'detail' : 'edit',
nodeId: row.nodeId
}
})
},
//
auditingShow(row) {
if (row.directUserIds) {
return (row.status == 1 || row.status == 0) && row.directUserIds.includes(this.userId)
}
}
}
}
</script>

View File

@ -0,0 +1,274 @@
<template>
<!-- 基础页面 -->
<div class="app-container">
<el-form v-show="showSearch" :model="queryParams" ref="queryForm" size="small" inline>
<el-form-item label="申请日期" prop="startTime">
<el-date-picker
v-model="queryParams.startTime"
value-format="yyyy-MM-dd"
type="date"
placeholder="开始日期"
@change="() => queryParams.endTime = ''"
style="width: 130px"
/>
</el-form-item>
<el-form-item>-</el-form-item>
<el-form-item prop="endTime">
<el-date-picker
v-model="queryParams.endTime"
value-format="yyyy-MM-dd"
type="date"
placeholder="结束日期"
:picker-options="{ disabledDate: (t) => t.getTime() < new Date(queryParams.startTime).getTime() - 86400000}"
style="width: 130px"
/>
</el-form-item>
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择审核状态" clearable>
<el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<!-- 表单按钮 -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5" v-hasPermi="['direct:info:add']">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">直转申请</el-button>
</el-col> -->
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出数据</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table :data="tableList" fit highlight-current-row style="width: 100%" :max-height="650">
<!-- 多选 -->
<el-table-column type="selection" width="55" align="center" @selection-change="selectionChange" />
<el-table-column
type="index"
width="55"
label="序号"
align="center"
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
/>
<el-table-column
v-for="(column, index) in tableColumns"
:show-overflow-tooltip="column.showTooltip"
:key="column.prop"
:label="column.label"
:prop="column.prop"
:width="column.width"
align="center"
>
<!-- 插槽 -->
<template v-slot="scope" v-if="column.prop == 'status'">
<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">
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-search" @click="handleEdit(scope.row, 1)">查看</el-button>
<el-button
v-show="scope.row.status == '0'"
v-hasPermi="['direct:info:edit']"
type="text"
size="mini"
icon="el-icon-edit"
@click="handleEdit(scope.row, 2)"
>
编辑
</el-button>
<el-button
v-show="scope.row.status == '0'"
v-hasPermi="['direct:info:delete']"
type="text"
size="mini"
icon="el-icon-delete"
style="color: #f56c6c"
@click="handleDelete(scope.row)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { getLoseAuditListApi, receiveLoseDelete } from '@/api/business/index'
export default {
name: 'LoseHandlingRecord',
data() {
return {
showSearch: true,
queryParams: {
pageNum: 1,
pageSize: 10,
keyWord: '', //
status: '', //
timeRange: [], //
startTime: '', //
endTime: '' //
},
//
statusOptions: [
{ label: '待审核', value: '0' },
{ label: '审核中', value: '1' },
{ label: '已完成', value: '2' },
{ label: '已驳回', value: '3' }
],
total: 0, //
//
tableColumns: [
{ label: '申请时间', prop: 'createTime', showToolTip: true, width: '100' },
{ label: '申请人', prop: 'createBy', showToolTip: true, },
{ label: '报备丢失单号', prop: 'code', showToolTip: true },
{ label: '报备丢失单位', prop: 'lossUnitName', showToolTip: false },
{ label: '报备丢失工程', prop: 'lossProName', showToolTip: false },
{ label: '状态', prop: 'status', showToolTip: true, width: '80' }
],
//
tableList: []
}
},
created() {
this.getList()
},
methods: {
//
handleQuery() {
this.getList()
},
//
handleReset() {
this.queryParams.pageNum = 1
this.queryParams.pageSize = 10
this.$refs.queryForm.resetFields()
this.getList()
},
//
async getList() {
console.log('列表-查询', this.queryParams)
try {
const params = {
...this.queryParams,
// startTime: this.queryParams.timeRange[0] || '',
// endTime: this.queryParams.timeRange[1] || ''
}
const res = await getLoseAuditListApi(params)
console.log('🚀 ~ 获取列表 ~ res:', res)
this.tableList = res.data.rows
this.total = res.data.total || 0
} catch (error) {
console.log('🚀 ~ 获取列表 ~ error:', error)
this.tableList = []
this.total = 0
}
},
//
selectionChange(val) {
console.log('selectionChange', val)
},
handleAdd() {
console.log('报备丢失申请')
this.$router.push({ path: '/business/loseHandling/index' })
},
//
handleEdit(row, type) {
console.log('编辑', row)
let params = {}
if (type === 1) {
// params = { type: 'detail', id: row.id }
// this.$router.push({ path: '/transition/groundDirect', query: params })
this.$router.push({
name: 'lose-apply',
query: {
id: row.id,
flowId: row.flowId,
taskId: row.id,
type: 'detail',
nodeId: row.nodeId
}
})
} else {
params = { type: 'edit', id: row.id }
this.$router.push({ path: '/business/businessHandling/loseHandling', query: params })
}
},
//
handleDelete(row) {
console.log('删除', row)
this.$confirm('是否删除该数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const res = await receiveLoseDelete({id:row.id})
console.log('🚀 ~ 删除 ~ res:', res)
this.getList()
this.$message({
type: 'success',
message: '删除成功!'
})
})
},
//
handleExport() {
try {
const formatTime = date => {
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
const hours = String(date.getHours()).padStart(2, '0')
const minutes = String(date.getMinutes()).padStart(2, '0')
const seconds = String(date.getSeconds()).padStart(2, '0')
return `${year}${month}${day}_${hours}${minutes}${seconds}`
}
const currentTime = formatTime(new Date())
let fileName = `直转记录_${currentTime}.xLsx`
let url = '/material/directRotation/export'
const params = { ...this.queryParams }
console.log('🚀 ~ 导出 ~ params:', params)
this.download(url, params, fileName)
} catch (error) {
console.log('导出数据失败', error)
}
}
}
}
</script>
<style lang="scss" scoped></style>

File diff suppressed because it is too large Load Diff

View File

@ -569,14 +569,17 @@ import {
getUnitList,
getAgreementInfoById, getUnitListFilterTeam,
} from '@/api/back/index.js'
import {getSltList, costExamine, getSltReportedList, getSltReportList, getHistoryReportList, getHistoryLeaseCostDetails, getHistoryRepairCostDetails, getHistoryLoseCostDetails, getHistoryScrapCostDetails} from '@/api/cost/cost'
import {getSltList, costExamine, getSltReportedList, getSltReportList, getHistoryReportList,
getHistoryLeaseCostDetails, getHistoryRepairCostDetails, getHistoryLoseCostDetails, getHistoryScrapCostDetails,
getExportZipUnsettled,getExportZipProgress
} from '@/api/cost/cost'
import { toChineseAmount } from '@/utils/bonus.js'
import vueEasyPrint from "vue-easy-print";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import * as XLSX from 'xlsx';
import request from '@/utils/request'
import { download,downloadJson,downloadZip } from '@/utils/request'
export default {
name: 'UnreportHome',
@ -879,12 +882,7 @@ export default {
this.statusText = '开始导出...'
const response = await request({
url: '/material/slt_agreement_info/exportUnsettled',
method: 'post',
data: JSON.stringify(param),
timeout: 60000 // 10
})
const response = await getExportZipUnsettled(param)
const result = response
this.taskId = result.taskId
this.totalZip = result.total
@ -903,12 +901,9 @@ export default {
startPolling() {
this.pollInterval = setInterval(async () => {
try {
const response = await request({
url: `/material/slt_agreement_info/exportProgress/${this.taskId}`,
method: 'get'
})
const param = { taskId: this.taskId }
const response = await getExportZipProgress(param)
const progress = response
this.progress = progress.percentage
this.current = progress.current
@ -930,7 +925,7 @@ export default {
this.statusText = '查询进度失败'
this.exportFlag = false
}
}, 1000)
}, 5000)
},
downloadFile() {

View File

@ -281,7 +281,7 @@
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="预出库数量" align="center" prop="preNum" :show-overflow-tooltip="true" v-if="checkShowPreButton()">
<template slot-scope="scope">
<template v-if="scope.row.outNum > 0">
<template v-if="scope.row.alNum == 0">
<el-input
v-model.number="scope.row.preNum"
controls-position="right"