devicesmgt/sgzb-ui/src/views/scrapManage/forecastWaste/listingcss.vue

264 lines
8.9 KiB
Vue
Raw Normal View History

2024-04-18 17:58:05 +08:00
<template>
<div class="app-container">
<!-- 预报废列表 -->
2024-04-20 17:03:23 +08:00
<template v-if="!temp">
2024-04-20 15:01:00 +08:00
<TableModel
:tableProps="config.listingTableProps"
2024-04-22 18:15:42 +08:00
:sendApi="getPreScrapListApi"
2024-04-20 15:01:00 +08:00
:formLabel="config.listingFormLabel"
:exportShow="true"
:pageShow="true"
:isSelShow="true"
2024-04-23 10:21:21 +08:00
:handleWidth="`200px`"
2024-04-20 15:01:00 +08:00
@getTableSelectionChange="getTableSelectionChange"
>
<template slot="submitScrap">
<el-col :span="1.5">
<el-button
type="warning"
plain
size="mini"
2024-04-20 17:03:23 +08:00
@click="handelSubmitScrap"
2024-04-20 15:01:00 +08:00
>提交报废</el-button
>
</el-col>
</template>
<template slot-scope="{ data }">
2024-04-18 17:58:05 +08:00
<el-button
2024-04-20 15:01:00 +08:00
type="text"
2024-04-18 17:58:05 +08:00
size="mini"
2024-04-23 10:21:21 +08:00
@click="handlePreview(data)"
>查看</el-button
>
<el-button
type="text"
size="mini"
v-if="data.taskStatus == 124"
@click="handleSubmitScrap(data)"
>提交报废</el-button
>
<el-button
type="text"
size="mini"
@click="handleAuditing(data)"
>审批详情</el-button
>
<el-button
type="text"
size="mini"
v-if="data.taskStatus == 61"
@click="handleReject(data)"
>驳回退料</el-button
>
</template>
<template slot-scope="{ data }" slot="type">
<el-tag size="mini" v-if="data.taskStatus == 124"
>待提交</el-tag
>
<el-tag
size="mini"
type="warning"
v-if="data.taskStatus == 58"
>审核中</el-tag
>
<el-tag
size="mini"
type="danger"
v-if="data.taskStatus == 61"
>已驳回</el-tag
>
<el-tag
size="mini"
type="success"
v-if="data.taskStatus == 59"
>已通过</el-tag
2024-04-18 17:58:05 +08:00
>
2024-04-20 15:01:00 +08:00
</template>
</TableModel>
2024-04-18 17:58:05 +08:00
2024-04-20 15:01:00 +08:00
<!-- 查看弹框 -->
<DialogModel
:title="title"
:dialogVisible="dialogVisible"
:width="dialogWidth"
@closeDialog="closeDialog"
>
<!-- 查看内容 -->
2024-04-23 10:21:21 +08:00
<template slot="preview" v-if="title === '查看'">
2024-04-20 15:01:00 +08:00
<TableModel
:tableProps="config.previewTableProps"
:handleColShow="false"
:formLabel="config.previewFormLabel"
>
</TableModel
></template>
2024-04-18 17:58:05 +08:00
2024-04-20 15:01:00 +08:00
<!-- 审批详情 -->
2024-04-23 10:21:21 +08:00
<template v-if="title === '审批详情'">
2024-04-20 15:01:00 +08:00
<el-table :data="audDetails">
<el-table-column
prop="title"
align="center"
label="审批部门"
/>
<el-table-column
prop="result"
align="center"
label="审批状态"
/>
<el-table-column align="center" label="审批意见" />
</el-table>
</template>
2024-04-18 17:58:05 +08:00
2024-04-20 15:01:00 +08:00
<!-- 部门选择 -->
2024-04-23 10:21:21 +08:00
<template v-if="title === '提交报废'">
2024-04-20 15:01:00 +08:00
<SelDepart @closeDepartSel="closeDepartSel" />
</template>
</DialogModel>
</template>
2024-04-20 17:03:23 +08:00
<template v-if="temp">
2024-04-22 13:47:05 +08:00
<el-row type="flex" justify="space-between" class="back-text">
<span>驳回退料</span>
<el-button type="text" @click="handleBack">返回</el-button>
</el-row>
2024-04-20 17:03:23 +08:00
<AuditingReturn />
2024-04-20 15:01:00 +08:00
</template>
2024-04-18 17:58:05 +08:00
</div>
</template>
<script>
import TableModel from '../component/tableModel.vue'
import DialogModel from '../component/dialogModel.vue'
import SelDepart from '../component/selDepart.vue'
2024-04-20 17:03:23 +08:00
import AuditingReturn from './auditingReturn.vue' // 退料驳回页面
2024-04-22 18:15:42 +08:00
import { getPreScrapListApi } from '@/api/scrap/forecastWaste.js'
2024-04-20 17:03:23 +08:00
import { config } from './index'
2024-04-18 17:58:05 +08:00
export default {
name: 'scrapListing',
components: {
TableModel,
DialogModel,
SelDepart,
2024-04-20 17:03:23 +08:00
AuditingReturn,
2024-04-18 17:58:05 +08:00
},
data() {
return {
config,
2024-04-22 18:15:42 +08:00
getPreScrapListApi,
2024-04-18 17:58:05 +08:00
title: '',
dialogWidth: '70%',
dialogVisible: false,
2024-04-23 10:21:21 +08:00
2024-04-18 17:58:05 +08:00
selDepart: false,
tableSelList: [],
audDetails: [
{ title: '测试部门', result: '通过' },
{ title: '施工管理审批', result: '通过' },
{ title: '安全检查部门', result: '通过' },
],
handleBtn: [
{ btn_title: '查看', id: 1 },
{ btn_title: '提交报废', id: 2 },
{ btn_title: '审批详情', id: 3 },
2024-04-22 13:47:05 +08:00
{ btn_title: '驳回退料', id: 4 },
2024-04-18 17:58:05 +08:00
],
2024-04-20 17:03:23 +08:00
temp: false,
2024-04-18 17:58:05 +08:00
}
},
methods: {
/* 列表按钮操作 */
2024-04-23 10:21:21 +08:00
handlePreview(row) {
this.title = '查看'
this.dialogWidth = '70%'
2024-04-18 17:58:05 +08:00
this.dialogVisible = true
},
2024-04-23 10:21:21 +08:00
handleSubmitScrap(row) {
this.title = '提交报废'
this.dialogWidth = '50%'
this.dialogVisible = true
},
handleAuditing(row) {
this.title = '审批详情'
this.dialogWidth = '50%'
this.dialogVisible = true
},
handleReject(row) {
this.temp = !this.temp
},
// handleBtnEvent(val, id) {
// switch (id) {
// case 1:
// this.previewDetails = true
// break
// case 2:
// this.title = '提交报废'
// this.dialogWidth = '50%'
// this.selDepart = true
// break
// case 3:
// this.title = '审批详情'
// this.dialogWidth = '50%'
// this.auditingShow = true
// break
// case 4:
// this.temp = !this.temp
// break
// }
// },
2024-04-18 17:58:05 +08:00
/* 关闭弹框 */
closeDialog(val) {
this.dialogVisible =
this.previewDetails =
this.auditingShow =
this.selDepart =
val
},
/* 关闭选择审批部门弹框 */
closeDepartSel(val, list) {
console.log(list, '选择的部门')
this.selDepart = this.dialogVisible = val
},
/* 批量提交报废按钮 */
2024-04-20 17:03:23 +08:00
handelSubmitScrap() {
2024-04-18 17:58:05 +08:00
if (this.tableSelList.length < 1) {
this.$message.error('请勾选列表数据!')
} else {
this.dialogWidth = '50%'
2024-04-24 08:46:24 +08:00
this.title = '提交报废'
2024-04-18 17:58:05 +08:00
this.dialogVisible = true
}
},
/* 表格复选框选中的数据 */
getTableSelectionChange(val) {
this.tableSelList = val
},
2024-04-22 13:47:05 +08:00
handleBack() {
this.temp = !this.temp
this.dialogVisible = false
},
2024-04-18 17:58:05 +08:00
},
}
</script>
2024-04-20 15:01:00 +08:00
<style scoped lang="scss">
::v-deep .el-page-header__left {
display: none;
}
2024-04-22 13:47:05 +08:00
.back-text {
margin-bottom: 8px;
padding: 0 5px;
box-shadow: 1px 1px #ccc;
span {
font-weight: bold;
}
}
2024-04-20 15:01:00 +08:00
</style>