This commit is contained in:
parent
afc93e38bd
commit
82ce5836ee
|
|
@ -53,5 +53,3 @@
|
|||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
|
|
|
|||
|
|
@ -167,7 +167,6 @@
|
|||
methods: {
|
||||
/* form 查询组件触发的自定义事件 */
|
||||
async queryList(val, reset) {
|
||||
console.log('查询')
|
||||
if (reset) {
|
||||
this.pageParams.pageNum = 1
|
||||
this.pageParams.pageSize = 10
|
||||
|
|
@ -197,7 +196,6 @@
|
|||
|
||||
/* 表格复选框事件 */
|
||||
handleSelectionChange(row) {
|
||||
console.log(row, '列表复选框')
|
||||
this.$emit('getTableSelectionChange', row)
|
||||
},
|
||||
/* 清除表格的选中状态 */
|
||||
|
|
|
|||
|
|
@ -106,7 +106,6 @@
|
|||
}
|
||||
})
|
||||
|
||||
console.log(temp, 'temp')
|
||||
if (temp) {
|
||||
this.$message.error('该单位已选择,不可重复选择')
|
||||
return
|
||||
|
|
@ -145,13 +144,15 @@
|
|||
|
||||
/* 取消按钮 */
|
||||
handelCancel() {
|
||||
this.selDeptList = []
|
||||
this.$emit('closeDepartSel', false)
|
||||
this.selDeptList = []
|
||||
this.selDeptAmount = 0
|
||||
},
|
||||
/* 确定按钮 */
|
||||
handelSubmit() {
|
||||
this.$emit('closeDepartSel', false, this.selDeptList)
|
||||
this.selDeptList = []
|
||||
this.selDeptAmount = 0
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -1,94 +0,0 @@
|
|||
<template>
|
||||
<!-- 退料驳回 -->
|
||||
<div>
|
||||
<TableModel
|
||||
:tableProps="config.returnTableProps"
|
||||
:formLabel="config.returnFormLabel"
|
||||
:exportShow="true"
|
||||
:pageShow="true"
|
||||
:isSelShow="true"
|
||||
:handleWidth="`180px`"
|
||||
@getTableSelectionChange="getTableSelectionChange"
|
||||
>
|
||||
<template slot="submitScrap">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain size="mini"
|
||||
>完成退料</el-button
|
||||
>
|
||||
</el-col>
|
||||
</template>
|
||||
<template slot-scope="{ data }">
|
||||
<el-button
|
||||
v-for="btn in handleBtn"
|
||||
:key="btn.id"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="handleBtnEvent(data, btn.id)"
|
||||
>{{ btn.btn_title }}</el-button
|
||||
>
|
||||
</template>
|
||||
</TableModel>
|
||||
<DialogModel
|
||||
:title="title"
|
||||
:dialogVisible="dialogVisible"
|
||||
:width="dialogWidth"
|
||||
@closeDialog="closeDialog"
|
||||
>
|
||||
<TableModel :tableProps="config.returnPreviewTableProps" />
|
||||
</DialogModel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableModel from '../component/tableModel.vue'
|
||||
import DialogModel from '../component/dialogModel.vue'
|
||||
import SelDepart from '../component/selDepart.vue'
|
||||
import { config } from './index'
|
||||
export default {
|
||||
name: 'auditingReturn',
|
||||
components: {
|
||||
TableModel,
|
||||
DialogModel,
|
||||
SelDepart,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
title: '',
|
||||
dialogVisible: false,
|
||||
dialogWidth: '',
|
||||
handleBtn: [
|
||||
{ btn_title: '查看', id: 1 },
|
||||
{ btn_title: '编辑退料', id: 2 },
|
||||
{ btn_title: '撤回', id: 3 },
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/* 按钮操作 */
|
||||
handleBtnEvent(data, id) {
|
||||
switch (id) {
|
||||
case 1:
|
||||
this.title = '查看'
|
||||
this.dialogWidth = '70%'
|
||||
break
|
||||
case 2:
|
||||
this.title = '编辑退料'
|
||||
this.dialogWidth = '70%'
|
||||
break
|
||||
case 3:
|
||||
this.title = '撤回'
|
||||
|
||||
break
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
getTableSelectionChange() {},
|
||||
closeDialog(val) {
|
||||
this.dialogVisible = val
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
|
|
@ -1,357 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 预报废审核 -->
|
||||
<TableModel
|
||||
:tableProps="config.tableProps"
|
||||
:sendApi="getForecastWasteListApi"
|
||||
:formLabel="config.formLabel"
|
||||
:exportShow="true"
|
||||
:pageShow="true"
|
||||
:isSelShow="true"
|
||||
ref="tableRef"
|
||||
@getTableSelectionChange="getTableSelChangeOuter"
|
||||
>
|
||||
<!-- 报废来源 -->
|
||||
<template slot-scope="{ data }" slot="source">
|
||||
<template v-if="data.scrapSource === 1">退料</template>
|
||||
<template v-if="data.scrapSource === 2">维修审核</template>
|
||||
<template v-if="data.scrapSource === 3">盘点</template>
|
||||
</template>
|
||||
<!-- 单号 1、退料单号 2、维修单号 3、盘点单号 -->
|
||||
<template slot-scope="{ data }" slot="code">
|
||||
<template v-if="data.scrapSource === 1">{{
|
||||
data.repairCode
|
||||
}}</template>
|
||||
<template v-if="data.scrapSource === 2">{{
|
||||
data.scrapNum
|
||||
}}</template>
|
||||
</template>
|
||||
<!--审核状态 -->
|
||||
<template slot-scope="{ data }" slot="type">
|
||||
<el-tag v-if="data.taskStatus === 120" size="mini"
|
||||
>待审核</el-tag
|
||||
>
|
||||
<el-tag
|
||||
type="warning"
|
||||
v-if="data.taskStatus === 121"
|
||||
size="mini"
|
||||
>审核中</el-tag
|
||||
>
|
||||
<el-tag type="danger" v-if="data.taskStatus === 123" size="mini"
|
||||
>已驳回</el-tag
|
||||
>
|
||||
<el-tag
|
||||
type="success"
|
||||
v-if="data.taskStatus === 122"
|
||||
size="mini"
|
||||
>已通过</el-tag
|
||||
>
|
||||
</template>
|
||||
<template slot-scope="{ data }">
|
||||
<el-button type="text" size="mini" @click="handlePreview(data)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="data.taskStatus === 121 || data.taskStatus === 120"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="handleAuditing(data)"
|
||||
>审核</el-button
|
||||
>
|
||||
</template>
|
||||
</TableModel>
|
||||
|
||||
<DialogModel
|
||||
:title="title"
|
||||
:innerTitle="innerTitle"
|
||||
:dialogVisible="dialogVisible"
|
||||
:innerDialogVisible="innerDialogVisible"
|
||||
:width="dialogWidth"
|
||||
:innerWidth="`50%`"
|
||||
@closeDialog="closeDialog"
|
||||
@closeDialogInner="closeDialogInner"
|
||||
>
|
||||
<template slot="preview">
|
||||
<TableModel
|
||||
:tableProps="config.previewTableProps"
|
||||
:sendApi="getDialogListApi"
|
||||
:sendParams="sendParams"
|
||||
:handleColShow="false"
|
||||
:formLabel="config.previewFormLabel"
|
||||
:isSelShow="isSelShow"
|
||||
ref="auditingTableRef"
|
||||
:selectable="
|
||||
(row) => {
|
||||
return row.status == 0
|
||||
}
|
||||
"
|
||||
@getTableSelectionChange="getTableSelChangeInner"
|
||||
>
|
||||
<!--审核状态 -->
|
||||
<template slot-scope="{ data }" slot="t_type">
|
||||
<el-tag v-if="data.status == 0" size="mini"
|
||||
>待审核</el-tag
|
||||
>
|
||||
<el-tag
|
||||
type="success"
|
||||
v-if="data.status == 1"
|
||||
size="mini"
|
||||
>通过</el-tag
|
||||
>
|
||||
<el-tag
|
||||
type="warning"
|
||||
v-if="data.status == 2"
|
||||
size="mini"
|
||||
>驳回</el-tag
|
||||
>
|
||||
</template>
|
||||
</TableModel>
|
||||
</template>
|
||||
<template slot="handleBtn" v-if="handleBtn">
|
||||
<el-row class="handle-btn">
|
||||
<el-button size="mini" type="primary" @click="auditingPass"
|
||||
>通 过</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="auditingReject"
|
||||
>驳 回</el-button
|
||||
>
|
||||
</el-row>
|
||||
</template>
|
||||
<template slot="innerContent">
|
||||
<el-row>
|
||||
<el-col :span="4">请输入驳回原因</el-col>
|
||||
<el-col :span="20">
|
||||
<el-input
|
||||
v-model="rejectReason"
|
||||
type="textarea"
|
||||
:rows="6"
|
||||
ref="rejectReasonRef"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<template slot="innerHandleBtn">
|
||||
<el-row class="handle-btn">
|
||||
<el-button size="mini" plain @click="handleCancelInner"
|
||||
>取 消</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="handleSubmitInner"
|
||||
>保 存</el-button
|
||||
>
|
||||
</el-row>
|
||||
</template>
|
||||
</DialogModel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableModel from '../component/tableModel.vue'
|
||||
import DialogModel from '../component/dialogModel.vue'
|
||||
import { getSelList, config } from './index.js'
|
||||
import {
|
||||
getForecastWasteListApi,
|
||||
getDialogListApi,
|
||||
auditingScrapApi,
|
||||
} from '@/api/scrap/forecastWaste.js'
|
||||
export default {
|
||||
name: 'scrapAuditing',
|
||||
components: {
|
||||
TableModel,
|
||||
DialogModel,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
/* 主页列表接口 */
|
||||
getForecastWasteListApi,
|
||||
/* 弹框内列表接口 */
|
||||
getDialogListApi,
|
||||
/* 弹框标题 */
|
||||
title: '查看',
|
||||
/* 内层弹框标题 */
|
||||
innerTitle: '',
|
||||
/* 弹框显示隐藏 */
|
||||
dialogVisible: false,
|
||||
/* 内层弹框显示隐藏 */
|
||||
innerDialogVisible: false,
|
||||
/* 弹框宽度 */
|
||||
dialogWidth: '70%',
|
||||
/* 弹框内查询条件 */
|
||||
typeName: '',
|
||||
/* 审核通过与驳回按钮的控制显示 */
|
||||
handleBtn: false,
|
||||
/* 驳回原因 */
|
||||
rejectReason: '',
|
||||
/* 表格是否需要复选框 */
|
||||
isSelShow: true,
|
||||
/* 选中的审核数据 */
|
||||
selAuditingList: [],
|
||||
/* 请求参数 */
|
||||
sendParams: {},
|
||||
/* 当前登录的用户id */
|
||||
userId: sessionStorage.getItem('userId'),
|
||||
getSelList,
|
||||
/* 审核参数 */
|
||||
auditingParams: {
|
||||
taskId: '',
|
||||
scrapDetailList: [],
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
/* 获取表单的下拉数据 */
|
||||
this.getSelList()
|
||||
},
|
||||
methods: {
|
||||
/* 查看 */
|
||||
async handlePreview(val) {
|
||||
this.sendParams.taskId = this.auditingParams.taskId = val.taskId
|
||||
this.title = '查看'
|
||||
this.isSelShow = false
|
||||
this.dialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.auditingTableRef.getList()
|
||||
})
|
||||
},
|
||||
/* 审核 */
|
||||
handleAuditing(val) {
|
||||
this.sendParams.taskId = this.auditingParams.taskId = val.taskId
|
||||
this.title = '审核'
|
||||
this.isSelShow = true
|
||||
this.handleBtn = true
|
||||
this.dialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.auditingTableRef.getList()
|
||||
})
|
||||
},
|
||||
/* 自定义事件关闭弹框 (外层) */
|
||||
closeDialog(val) {
|
||||
this.dialogVisible = val
|
||||
},
|
||||
/* 自定义事件关闭弹框 (内层) */
|
||||
closeDialogInner(val) {
|
||||
this.innerDialogVisible = val
|
||||
},
|
||||
/* 审核通过 */
|
||||
async auditingPass() {
|
||||
if (this.selAuditingList.length < 1) {
|
||||
this.$message.error('请勾选审核设备')
|
||||
return
|
||||
}
|
||||
|
||||
this.selAuditingList.map((e) => {
|
||||
/* 获取当前需要审核的设备数据 */
|
||||
let deviceInfo = {
|
||||
id: e.id, // 设备ID
|
||||
auditBy: this.userId, // 审核人 ID
|
||||
status: '1', // 1 通过 2 驳回
|
||||
}
|
||||
|
||||
this.auditingParams.scrapDetailList.push(deviceInfo)
|
||||
})
|
||||
const res = await auditingScrapApi(this.auditingParams)
|
||||
console.log(res, '审核结果')
|
||||
if (res.code == 200) {
|
||||
this.$message.success('审核通过!')
|
||||
this.dialogVisible = false
|
||||
} else {
|
||||
console.log('审核失败--')
|
||||
this.auditingParams.scrapDetailList = []
|
||||
}
|
||||
},
|
||||
/* 审核驳回 */
|
||||
async auditingReject() {
|
||||
if (this.selAuditingList.length < 1) {
|
||||
this.$message.error('请勾选审核设备')
|
||||
return
|
||||
}
|
||||
this.innerTitle = '驳回原因'
|
||||
this.innerDialogVisible = true
|
||||
},
|
||||
|
||||
/* 驳回原因弹框内取消按钮 */
|
||||
handleCancelInner() {
|
||||
/* 关闭内弹框 */
|
||||
this.innerDialogVisible = false
|
||||
},
|
||||
/* 驳回弹框内保存按钮 */
|
||||
async handleSubmitInner() {
|
||||
if (!this.rejectReason) {
|
||||
this.$message.error('驳回原因不能为空!')
|
||||
this.$refs.rejectReasonRef.focus()
|
||||
return
|
||||
} else {
|
||||
this.selAuditingList.map((e) => {
|
||||
/* 获取当前需要审核的设备数据 */
|
||||
let deviceInfo = {
|
||||
id: e.id, // 设备ID
|
||||
auditBy: this.userId, // 审核人 ID
|
||||
status: '2', // 1 通过 2 驳回
|
||||
auditRemark: this.rejectReason, // 驳回原因
|
||||
}
|
||||
|
||||
this.auditingParams.scrapDetailList.push(deviceInfo)
|
||||
})
|
||||
const res = await auditingScrapApi(this.auditingParams)
|
||||
if (res.code == 200) {
|
||||
this.$message.success('已驳回!')
|
||||
this.innerDialogVisible = false
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 主页列表复选框勾选事件 */
|
||||
getTableSelChangeOuter(list) {
|
||||
console.log(list, '主页列表勾选数据')
|
||||
},
|
||||
/* 审核时列表复选框勾选事件 */
|
||||
getTableSelChangeInner(list) {
|
||||
console.log(list, '审核列表勾选数据')
|
||||
this.selAuditingList = list
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
/* 监听驳回原因弹框关闭 清空驳回原因内容 */
|
||||
innerDialogVisible: {
|
||||
handler(newVal) {
|
||||
if (!newVal) {
|
||||
this.rejectReason = ''
|
||||
this.$refs.auditingTableRef.clearSelType()
|
||||
this.$nextTick(() => {
|
||||
this.$refs.auditingTableRef.getList()
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
/* 监听审核弹框关闭 清空列表的复选框选中状态 */
|
||||
dialogVisible: {
|
||||
handler(newVal) {
|
||||
if (!newVal) {
|
||||
this.$refs.auditingTableRef.clearSelType()
|
||||
this.handleBtn = false
|
||||
this.$nextTick(() => {
|
||||
this.$refs.tableRef.getList()
|
||||
})
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.handle-btn {
|
||||
margin-top: 15px;
|
||||
padding-top: 8px;
|
||||
text-align: right;
|
||||
border-top: 1px solid #393737;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,152 +0,0 @@
|
|||
|
||||
import {
|
||||
getUnitInfoSelectApi,
|
||||
listPartTypeApi,
|
||||
} from '@/api/repairTest/repair'
|
||||
import { getProjectList } from '@/api/claimAndRefund/receive'
|
||||
|
||||
let unitList = [] //单位下拉数据
|
||||
let proList = [] //工程下拉数据
|
||||
let typeList = [] //类型下拉数据
|
||||
export const config = {
|
||||
/* 预报废审核主页 列表参数 */
|
||||
tableProps: [
|
||||
{ t_width: '55px', t_props: '', t_label: '序号' },
|
||||
{ t_width: '', t_props: 'scrapNum', t_label: '预报废单号', },
|
||||
{ t_width: '', t_props: '', t_label: '报废来源', t_slot: 'source', },
|
||||
{ t_width: '', t_props: 'repairNum', t_label: '单号', t_slot: 'code', },
|
||||
{ t_width: '', t_props: 'unitName', t_label: '退料单位名称', },
|
||||
{ t_width: '', t_props: 'projectName', t_label: '退料工程名称', },
|
||||
{ t_width: '', t_props: 'itemType', t_label: '设备类型', },
|
||||
{ t_width: '', t_props: 'createBy', t_label: '任务创建人', },
|
||||
{ t_width: '', t_props: 'createTime', t_label: '任务创建时间', },
|
||||
{ t_width: '', t_props: 'taskStatus', t_label: '审核状态', t_slot: 'type', },
|
||||
{ t_width: '', t_props: '', t_label: '不通过原因', },
|
||||
],
|
||||
/* 预报废审核主页表单 查询参数 */
|
||||
formLabel: [
|
||||
{ f_label: '关键字', f_model: 'keywords', f_type: 'ipt' },
|
||||
{ f_label: '单位名称', f_model: 'backUnit', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '工程名称', f_model: 'backPro', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '工机具类型', f_model: 'type', f_type: 'selCas', f_selList: [], optionProps: { value: 'id', } },
|
||||
{ f_label: '报废来源', f_model: 'laiyuan', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '审批状态', f_model: 'taskStatus', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '创建时间', f_model: 'time', f_type: 'date' },
|
||||
],
|
||||
/* 预报废审核弹框内 列表参数 */
|
||||
previewTableProps: [
|
||||
{ t_width: '55px', t_props: '', t_label: '序号' },
|
||||
{ t_width: '', t_props: 'machineTypeName', t_label: '设备类型' },
|
||||
{ t_width: '', t_props: 'specificationType', t_label: '规格型号' },
|
||||
{ t_width: '', t_props: 'maCode', t_label: '设备编码' },
|
||||
{ t_width: '', t_props: 'scrapNum', t_label: '设备数量' },
|
||||
{ t_width: '', t_props: 'status', t_label: '审批状态', t_slot: 't_type' },
|
||||
{ t_width: '', t_props: '', t_label: '报废原因' },
|
||||
{ t_width: '', t_props: '', t_label: '报废图片' },
|
||||
{ t_width: '', t_props: 'remark', t_label: '备注' },
|
||||
],
|
||||
/* 预报废审核弹框表单 查询参数 */
|
||||
previewFormLabel: [
|
||||
{ f_label: '类型名称', f_model: 'keywords', f_type: 'ipt' },
|
||||
],
|
||||
|
||||
/* 预报废列表主页 列表参数 */
|
||||
listingTableProps: [
|
||||
{ t_width: '55px', t_props: '', t_label: '序号' },
|
||||
{ t_width: '', t_props: 'scrapNum', t_label: '报废单号' },
|
||||
{ t_width: '', t_props: '', t_label: '报废类型' },
|
||||
{ t_width: '', t_props: 'repairNum', t_label: '预报废单号' },
|
||||
{ t_width: '', t_props: 'unitName', t_label: '退料单位名称' },
|
||||
{ t_width: '', t_props: 'projectName', t_label: '退料工程名称' },
|
||||
{ t_width: '', t_props: 'itemType', t_label: '机具类型' },
|
||||
{ t_width: '', t_props: 'createBy', t_label: '任务创建人' },
|
||||
{ t_width: '', t_props: 'createTime', t_label: '任务创建时间' },
|
||||
{ t_width: '', t_props: 'taskStatus', t_label: '审核状态', t_slot: 'type' },
|
||||
],
|
||||
/* 预报废列表主页表单 查询参数 */
|
||||
listingFormLabel: [
|
||||
{ f_label: '关键字', f_model: 'keywords', f_type: 'ipt' },
|
||||
{ f_label: '单位名称', f_model: 'backUnit', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '工程名称', f_model: 'backPro', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '工机具类型', f_model: 'type', f_type: 'selCas', f_selList: [], optionProps: { value: 'id', } },
|
||||
{ f_label: '报废单号', f_model: 'laiyuan', f_type: 'ipt', f_selList: [] },
|
||||
{ f_label: '审批状态', f_model: 'shentype', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '创建时间', f_model: 'time', f_type: 'date' },
|
||||
{ f_label: '报废类型', f_model: 'shentype', f_type: 'sel', f_selList: [] },
|
||||
],
|
||||
/* 预报废列表查看弹框内 列表参数 */
|
||||
listingPreviewTableProps: [
|
||||
{ t_width: '55px', t_props: '', t_label: '序号' },
|
||||
{ t_width: '', t_props: 'demo', t_label: '设备类型' },
|
||||
{ t_width: '', t_props: '', t_label: '规格型号' },
|
||||
{ t_width: '', t_props: '', t_label: '设备编码' },
|
||||
{ t_width: '', t_props: '', t_label: '设备数量' },
|
||||
{ t_width: '', t_props: '', t_label: '报废原因' },
|
||||
{ t_width: '', t_props: '', t_label: '报废图片' },
|
||||
{ t_width: '', t_props: '', t_label: '备注' },
|
||||
],
|
||||
/* 预报废列表页面驳回退料 列表参数 */
|
||||
returnTableProps: [
|
||||
{ t_width: '55px', t_props: '', t_label: '序号' },
|
||||
{ t_width: '', t_props: 'demo', t_label: '类型名称' },
|
||||
{ t_width: '', t_props: '', t_label: '规格型号' },
|
||||
{ t_width: '', t_props: '', t_label: '数量' },
|
||||
{ t_width: '', t_props: '', t_label: '合格数量' },
|
||||
{ t_width: '', t_props: '', t_label: '维修数量' },
|
||||
{ t_width: '', t_props: '', t_label: '预报废数量' },
|
||||
{ t_width: '', t_props: '', t_label: '状态' },
|
||||
],
|
||||
/* 预报废页面驳回退料 查询参数 */
|
||||
returnFormLabel: [
|
||||
{ f_label: '关键字', f_model: 'keywords', f_type: 'ipt' },
|
||||
{ f_label: '类型名称', f_model: 'backUnit', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '规格型号', f_model: 'backPro', f_type: 'sel', f_selList: [] },
|
||||
],
|
||||
|
||||
/* 预报废页面驳回退料 查看弹框内列表参数 */
|
||||
returnPreviewTableProps: [
|
||||
{ t_width: '55px', t_props: '', t_label: '序号' },
|
||||
{ t_width: '', t_props: 'demo', t_label: '设备类型' },
|
||||
{ t_width: '', t_props: '', t_label: '规格型号' },
|
||||
{ t_width: '', t_props: '', t_label: '设备编码' },
|
||||
{ t_width: '', t_props: '', t_label: '退料状态' },
|
||||
],
|
||||
}
|
||||
|
||||
export const getSelList = () => {
|
||||
new Promise(async (resolve) => {
|
||||
const { data: unitRes } = await getUnitInfoSelectApi()
|
||||
unitList = unitRes.map((e) => {
|
||||
e.value = e.unitId
|
||||
e.label = e.unitName
|
||||
return e
|
||||
})
|
||||
const { data: proRes } = await getProjectList()
|
||||
proList = proRes.map((e) => {
|
||||
e.value = e.projectId
|
||||
e.label = e.projectName
|
||||
return e
|
||||
})
|
||||
const { data: typeRes } = await listPartTypeApi()
|
||||
typeList = typeRes
|
||||
resolve()
|
||||
}).then(() => {
|
||||
config.formLabel.map((item) => {
|
||||
if (item.f_model === 'backUnit') {
|
||||
item.f_selList = unitList
|
||||
return item
|
||||
}
|
||||
if (item.f_model === 'backPro') {
|
||||
item.f_selList = proList
|
||||
return item
|
||||
}
|
||||
if (item.f_model === 'type') {
|
||||
item.f_selList = typeList
|
||||
return item
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
<TableModel
|
||||
:config="config"
|
||||
:sendApi="getPreScrapListApi"
|
||||
ref="listingTbRef"
|
||||
@getTableSelectionChange="getTableSelectionChange"
|
||||
>
|
||||
<template slot="export">
|
||||
|
|
@ -137,7 +138,7 @@
|
|||
import TableModel from '@/components/TableModel'
|
||||
import DialogModel from '@/components/DialogModel'
|
||||
import SelDepart from '../../component/selDepart.vue'
|
||||
import AuditingReturn from '../auditingReturn.vue' // 退料驳回页面
|
||||
import AuditingReturn from '../auditingReturn/index.vue' // 退料驳回页面
|
||||
import {
|
||||
getPreScrapListApi,
|
||||
getDialogListApi,
|
||||
|
|
@ -158,12 +159,13 @@
|
|||
getPreScrapListApi,
|
||||
getDialogListApi,
|
||||
tableSelList: [],
|
||||
sendParams: {},
|
||||
sendParams: {}, // 列表查看时参数
|
||||
temp: false,
|
||||
getSelList,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
/* 获取表单下拉选数据 */
|
||||
this.getSelList()
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -175,6 +177,7 @@
|
|||
this.dialogConfig.outerVisible = true
|
||||
},
|
||||
handleSubmitScrap(row) {
|
||||
console.log(row, '报废**')
|
||||
this.dialogConfig.outerTitle = '提交报废'
|
||||
this.dialogConfig.outerWidth = '50%'
|
||||
this.dialogConfig.outerVisible = true
|
||||
|
|
@ -189,9 +192,13 @@
|
|||
},
|
||||
|
||||
/* 关闭选择审批部门弹框 */
|
||||
closeDepartSel(val, list) {
|
||||
async closeDepartSel(val, list) {
|
||||
console.log(list, '选择的部门')
|
||||
if (list.length > 1) {
|
||||
console.log('调审核接口')
|
||||
}
|
||||
this.dialogConfig.outerVisible = val
|
||||
this.$refs.listingTbRef.getList()
|
||||
},
|
||||
/* 批量提交报废按钮 */
|
||||
handelSubmitScrap() {
|
||||
|
|
|
|||
|
|
@ -1,263 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 预报废列表 -->
|
||||
<template v-if="!temp">
|
||||
<TableModel
|
||||
:tableProps="config.listingTableProps"
|
||||
:sendApi="getPreScrapListApi"
|
||||
:formLabel="config.listingFormLabel"
|
||||
:exportShow="true"
|
||||
:pageShow="true"
|
||||
:isSelShow="true"
|
||||
:handleWidth="`200px`"
|
||||
@getTableSelectionChange="getTableSelectionChange"
|
||||
>
|
||||
<template slot="submitScrap">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
size="mini"
|
||||
@click="handelSubmitScrap"
|
||||
>提交报废</el-button
|
||||
>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
<template slot-scope="{ data }">
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
@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
|
||||
>
|
||||
</template>
|
||||
</TableModel>
|
||||
|
||||
<!-- 查看弹框 -->
|
||||
<DialogModel
|
||||
:title="title"
|
||||
:dialogVisible="dialogVisible"
|
||||
:width="dialogWidth"
|
||||
@closeDialog="closeDialog"
|
||||
>
|
||||
<!-- 查看内容 -->
|
||||
<template slot="preview" v-if="title === '查看'">
|
||||
<TableModel
|
||||
:tableProps="config.previewTableProps"
|
||||
:handleColShow="false"
|
||||
:formLabel="config.previewFormLabel"
|
||||
>
|
||||
</TableModel
|
||||
></template>
|
||||
|
||||
<!-- 审批详情 -->
|
||||
<template v-if="title === '审批详情'">
|
||||
<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>
|
||||
|
||||
<!-- 部门选择 -->
|
||||
<template v-if="title === '提交报废'">
|
||||
<SelDepart @closeDepartSel="closeDepartSel" />
|
||||
</template>
|
||||
</DialogModel>
|
||||
</template>
|
||||
|
||||
<template v-if="temp">
|
||||
<el-row type="flex" justify="space-between" class="back-text">
|
||||
<span>驳回退料</span>
|
||||
<el-button type="text" @click="handleBack">返回</el-button>
|
||||
</el-row>
|
||||
<AuditingReturn />
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableModel from '../component/tableModel.vue'
|
||||
import DialogModel from '../component/dialogModel.vue'
|
||||
import SelDepart from '../component/selDepart.vue'
|
||||
import AuditingReturn from './auditingReturn.vue' // 退料驳回页面
|
||||
import { getPreScrapListApi } from '@/api/scrap/forecastWaste.js'
|
||||
import { config } from './index'
|
||||
export default {
|
||||
name: 'scrapListing',
|
||||
components: {
|
||||
TableModel,
|
||||
DialogModel,
|
||||
SelDepart,
|
||||
AuditingReturn,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
getPreScrapListApi,
|
||||
title: '',
|
||||
dialogWidth: '70%',
|
||||
dialogVisible: false,
|
||||
|
||||
selDepart: false,
|
||||
tableSelList: [],
|
||||
audDetails: [
|
||||
{ title: '测试部门', result: '通过' },
|
||||
{ title: '施工管理审批', result: '通过' },
|
||||
{ title: '安全检查部门', result: '通过' },
|
||||
],
|
||||
handleBtn: [
|
||||
{ btn_title: '查看', id: 1 },
|
||||
{ btn_title: '提交报废', id: 2 },
|
||||
{ btn_title: '审批详情', id: 3 },
|
||||
{ btn_title: '驳回退料', id: 4 },
|
||||
],
|
||||
temp: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/* 列表按钮操作 */
|
||||
|
||||
handlePreview(row) {
|
||||
this.title = '查看'
|
||||
this.dialogWidth = '70%'
|
||||
this.dialogVisible = true
|
||||
},
|
||||
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
|
||||
// }
|
||||
|
||||
// },
|
||||
|
||||
/* 关闭弹框 */
|
||||
closeDialog(val) {
|
||||
this.dialogVisible =
|
||||
this.previewDetails =
|
||||
this.auditingShow =
|
||||
this.selDepart =
|
||||
val
|
||||
},
|
||||
/* 关闭选择审批部门弹框 */
|
||||
closeDepartSel(val, list) {
|
||||
console.log(list, '选择的部门')
|
||||
this.selDepart = this.dialogVisible = val
|
||||
},
|
||||
/* 批量提交报废按钮 */
|
||||
handelSubmitScrap() {
|
||||
if (this.tableSelList.length < 1) {
|
||||
this.$message.error('请勾选列表数据!')
|
||||
} else {
|
||||
this.dialogWidth = '50%'
|
||||
this.title = '提交报废'
|
||||
this.dialogVisible = true
|
||||
}
|
||||
},
|
||||
/* 表格复选框选中的数据 */
|
||||
getTableSelectionChange(val) {
|
||||
this.tableSelList = val
|
||||
},
|
||||
handleBack() {
|
||||
this.temp = !this.temp
|
||||
this.dialogVisible = false
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
::v-deep .el-page-header__left {
|
||||
display: none;
|
||||
}
|
||||
.back-text {
|
||||
margin-bottom: 8px;
|
||||
padding: 0 5px;
|
||||
box-shadow: 1px 1px #ccc;
|
||||
|
||||
span {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
></TableModel>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-upload>上传</el-upload>
|
||||
<FileUpload />
|
||||
</template>
|
||||
</template>
|
||||
</DialogModel>
|
||||
|
|
|
|||
Loading…
Reference in New Issue