代码优化
This commit is contained in:
parent
0511da6b4e
commit
8be2a24957
|
|
@ -5,10 +5,10 @@
|
|||
<template slot="export">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="el-icon-download"
|
||||
>导出数据</el-button
|
||||
>
|
||||
</el-row>
|
||||
|
|
@ -18,8 +18,8 @@
|
|||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-for="btn in config.handleBtn"
|
||||
:key="btn.id"
|
||||
v-for="btn in config.handleBtn"
|
||||
@click="handleBtn(data, btn.id)"
|
||||
>
|
||||
{{ btn.btn_title }}
|
||||
|
|
@ -30,22 +30,22 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import TableModel from '@/components/TableModel'
|
||||
import { config } from './config'
|
||||
export default {
|
||||
name: 'Inventory',
|
||||
components: {
|
||||
TableModel,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleBtn() {},
|
||||
},
|
||||
}
|
||||
import { config } from './config'
|
||||
import TableModel from '@/components/TableModel'
|
||||
export default {
|
||||
name: 'Inventory',
|
||||
components: {
|
||||
TableModel,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleBtn() {},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@
|
|||
<template slot="export" slot-scope="{ pageParams }">
|
||||
<el-row class="mb8">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="el-icon-download"
|
||||
@click="handleExport(pageParams)"
|
||||
>导出数据</el-button
|
||||
>
|
||||
|
|
@ -44,9 +44,9 @@
|
|||
>审核中</el-tag
|
||||
>
|
||||
<el-tag
|
||||
size="mini"
|
||||
type="success"
|
||||
v-if="data.taskStatus === 123 || data.taskStatus === 122"
|
||||
size="mini"
|
||||
>已完成</el-tag
|
||||
>
|
||||
<!-- <el-tag
|
||||
|
|
@ -59,18 +59,18 @@
|
|||
<!-- 列表操作栏 -->
|
||||
<template slot="handle" slot-scope="{ data }">
|
||||
<el-button
|
||||
icon="el-icon-zoom-in"
|
||||
type="text"
|
||||
icon="el-icon-zoom-in"
|
||||
@click="handlePreview(data)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-edit-outline"
|
||||
style="color: #e6a23c"
|
||||
v-if="data.taskStatus === 121 || data.taskStatus === 120"
|
||||
icon="el-icon-edit-outline"
|
||||
@click="handleAuditing(data)"
|
||||
v-hasPermi="['forecast:waste:auditing']"
|
||||
v-if="data.taskStatus === 121 || data.taskStatus === 120"
|
||||
>审核</el-button
|
||||
>
|
||||
</template>
|
||||
|
|
@ -84,9 +84,11 @@
|
|||
>
|
||||
<template slot="outerContent">
|
||||
<TableModel
|
||||
ref="dialogTbRef"
|
||||
:config="dialogConfig"
|
||||
:sendParams="sendParams"
|
||||
:sendApi="getDialogListApi"
|
||||
@getTableSelectionChange="getDialogTbSelList"
|
||||
:selectable="
|
||||
(row) => {
|
||||
if (row != 0) {
|
||||
|
|
@ -97,8 +99,6 @@
|
|||
return row.status == 0
|
||||
}
|
||||
"
|
||||
ref="dialogTbRef"
|
||||
@getTableSelectionChange="getDialogTbSelList"
|
||||
>
|
||||
<!--审核状态 -->
|
||||
<template slot-scope="{ data }" slot="t_type">
|
||||
|
|
@ -156,10 +156,10 @@
|
|||
<el-col :span="4">请输入驳回原因</el-col>
|
||||
<el-col :span="20">
|
||||
<el-input
|
||||
v-model="rejectReason"
|
||||
type="textarea"
|
||||
:rows="6"
|
||||
type="textarea"
|
||||
ref="rejectReasonRef"
|
||||
v-model="rejectReason"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -183,8 +183,8 @@
|
|||
<script>
|
||||
import TableModel from '@/components/TableModel'
|
||||
import DialogModel from '@/components/DialogModel'
|
||||
import ScrapSource from '../../component/scrapSource.vue'
|
||||
import ScrapImg from '../../component/scrapImg.vue'
|
||||
import ScrapSource from '../../component/scrapSource.vue'
|
||||
import {
|
||||
getForecastWasteListApi,
|
||||
getDialogListApi,
|
||||
|
|
|
|||
|
|
@ -2,18 +2,18 @@
|
|||
<!-- 报废驳回 -->
|
||||
<div>
|
||||
<TableModel
|
||||
:config="configReturn"
|
||||
:sendApi="getScrapReturnDetailsApi"
|
||||
:sendParams="sendParams"
|
||||
ref="homeTbRef"
|
||||
:config="configReturn"
|
||||
:sendParams="sendParams"
|
||||
:sendApi="getScrapReturnDetailsApi"
|
||||
>
|
||||
<template slot="export">
|
||||
<el-row class="mb8">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="handleComplete"
|
||||
type="primary"
|
||||
v-if="isDetails == 0"
|
||||
@click="handleComplete"
|
||||
>完成退料</el-button
|
||||
>
|
||||
</el-row>
|
||||
|
|
@ -38,18 +38,18 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEditReturn(data)"
|
||||
style="color: #e6a23c"
|
||||
icon="el-icon-edit-outline"
|
||||
@click="handleEditReturn(data)"
|
||||
v-if="data.num > 0 && isDetails == 0"
|
||||
>
|
||||
编辑退料
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
style="color: #de3115"
|
||||
@click="handleRevoke(data)"
|
||||
icon="el-icon-circle-close"
|
||||
style="color: #de3115"
|
||||
v-if="data.num == 0 && isDetails == 0"
|
||||
>
|
||||
撤回
|
||||
|
|
@ -73,29 +73,29 @@
|
|||
v-if="isQuery"
|
||||
ref="dialogTbRef"
|
||||
:config="dialogConfigReturn"
|
||||
@getTableSelectionChange="getTableSelList"
|
||||
:sendApi="getScrapEditReturnApi"
|
||||
:sendParams="sendParamsReturn"
|
||||
:sendApi="getScrapEditReturnApi"
|
||||
@getTableSelectionChange="getTableSelList"
|
||||
>
|
||||
<template
|
||||
slot="export"
|
||||
v-if="dialogConfigReturn.outerTitle === '编码退料'"
|
||||
><el-row class="mb8">
|
||||
<el-button
|
||||
type="success"
|
||||
size="mini"
|
||||
type="success"
|
||||
@click="handleBatch(1)"
|
||||
>批量合格</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleBatch(2)"
|
||||
>批量维修</el-button
|
||||
>
|
||||
<el-button
|
||||
type="warning"
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="handleBatch(3)"
|
||||
>批量报废</el-button
|
||||
>
|
||||
|
|
@ -136,21 +136,21 @@
|
|||
>
|
||||
<template slot="type" slot-scope="{ data }">
|
||||
<el-tag
|
||||
v-if="data.backStatus == 1"
|
||||
size="mini"
|
||||
type="success"
|
||||
v-if="data.backStatus == 1"
|
||||
>合格</el-tag
|
||||
>
|
||||
<el-tag
|
||||
v-if="data.backStatus == 2"
|
||||
size="mini"
|
||||
type="warning"
|
||||
v-if="data.backStatus == 2"
|
||||
>维修</el-tag
|
||||
>
|
||||
<el-tag
|
||||
v-if="data.backStatus == 3"
|
||||
size="mini"
|
||||
type="danger"
|
||||
v-if="data.backStatus == 3"
|
||||
>报废</el-tag
|
||||
>
|
||||
</template>
|
||||
|
|
@ -172,8 +172,8 @@
|
|||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleSave()"
|
||||
v-if="codeDetails"
|
||||
@click="handleSave()"
|
||||
>
|
||||
保存
|
||||
</el-button></el-row
|
||||
|
|
@ -199,9 +199,9 @@
|
|||
<template slot-scope="{ row }">
|
||||
<el-input
|
||||
style="width: 100px"
|
||||
placeholder="请输入数量"
|
||||
v-model="row.hgNum"
|
||||
v-if="!row.isQuery"
|
||||
placeholder="请输入数量"
|
||||
/>
|
||||
<template v-else>
|
||||
{{ row.hgNum }}
|
||||
|
|
@ -212,9 +212,9 @@
|
|||
<template slot-scope="{ row }">
|
||||
<el-input
|
||||
style="width: 100px"
|
||||
placeholder="请输入数量"
|
||||
v-model="row.wxNum"
|
||||
v-if="!row.isQuery"
|
||||
placeholder="请输入数量"
|
||||
/>
|
||||
<template v-else>
|
||||
{{ row.wxNum }}
|
||||
|
|
@ -225,9 +225,9 @@
|
|||
<template slot-scope="{ row }">
|
||||
<el-input
|
||||
style="width: 100px"
|
||||
placeholder="请输入数量"
|
||||
v-model="row.bfNum"
|
||||
v-if="!row.isQuery"
|
||||
placeholder="请输入数量"
|
||||
/>
|
||||
<template v-else>
|
||||
{{ row.bfNum }}
|
||||
|
|
@ -242,10 +242,10 @@
|
|||
>
|
||||
<template slot-scope="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="editScrapInfo(row)"
|
||||
type="primary"
|
||||
:disabled="row.bfNum <= 0"
|
||||
@click="editScrapInfo(row)"
|
||||
>编 辑</el-button
|
||||
>
|
||||
</template>
|
||||
|
|
@ -263,11 +263,11 @@
|
|||
>
|
||||
<el-form-item label="报废原因:">
|
||||
<el-input
|
||||
v-model="scrapInfoParams.scrapReason"
|
||||
placeholder="请输入报废原因"
|
||||
size="small"
|
||||
maxlength="50"
|
||||
style="width: 350px"
|
||||
placeholder="请输入报废原因"
|
||||
v-model="scrapInfoParams.scrapReason"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="损坏原因:" prop="scrapType">
|
||||
|
|
@ -288,13 +288,13 @@
|
|||
>
|
||||
<!-- 报废图片 -->
|
||||
<Upload
|
||||
style="width: 350px"
|
||||
:file-list="scrapInfoParams.fileList"
|
||||
:action-url="actionUrl"
|
||||
:limit="3"
|
||||
:multiple="true"
|
||||
style="width: 350px"
|
||||
@remove="handleRemove"
|
||||
:action-url="actionUrl"
|
||||
@success="handleSuccess"
|
||||
:file-list="scrapInfoParams.fileList"
|
||||
>
|
||||
<template>
|
||||
<el-row class="Upload-tip">
|
||||
|
|
@ -329,10 +329,10 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Upload from './upload.vue'
|
||||
import TableModel from '@/components/TableModel'
|
||||
import DialogModel from '@/components/DialogModel'
|
||||
import SelDepart from '../../component/selDepart.vue'
|
||||
import Upload from './upload.vue'
|
||||
import {
|
||||
configReturn,
|
||||
dialogConfigReturn,
|
||||
|
|
@ -340,14 +340,14 @@ import {
|
|||
} from './config.js'
|
||||
import { receiveView } from '@/api/claimAndRefund/return.js'
|
||||
import {
|
||||
getScrapReturnDetailsApi,
|
||||
getScrapEditReturnApi,
|
||||
getScrapReturnSaveApi,
|
||||
getScrapReturnCodeDetailsApi, // 编码退料后详情查询
|
||||
getScrapReturnNumDetailsApi, // 数量退料退款后详情查询
|
||||
getScrapReturnRevokeApi,
|
||||
getScrapReturnOverQueryApi,
|
||||
getScrapReturnDetailsApi,
|
||||
getScrapReturnCompleteApi,
|
||||
getScrapReturnOverQueryApi,
|
||||
getScrapReturnNumDetailsApi, // 数量退料退款后详情查询
|
||||
getScrapReturnCodeDetailsApi, // 编码退料后详情查询
|
||||
} from '@/api/scrap/forecastWaste.js'
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -371,26 +371,26 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
pageContent: '驳回退料',
|
||||
receiveView,
|
||||
configReturn,
|
||||
dialogConfigReturn,
|
||||
dialogConfigReturnDet,
|
||||
receiveView,
|
||||
getScrapReturnDetailsApi,
|
||||
getScrapEditReturnApi,
|
||||
dialogConfigReturnDet,
|
||||
getScrapReturnDetailsApi,
|
||||
getScrapReturnCodeDetailsApi,
|
||||
parentId: '',
|
||||
isQuery: true,
|
||||
isHandle: false,
|
||||
scrapAll: false, // 批量报废时 设置为true
|
||||
currentRows: null, // 选择单条数据报废时 设置为当前行的row
|
||||
codeDetails: true,
|
||||
isNumReturn: false,
|
||||
isNumDetails: true,
|
||||
pageContent: '驳回退料',
|
||||
taSelList: [],
|
||||
fileList: [],
|
||||
imgUrlList: [],
|
||||
actionUrl: process.env.VUE_APP_BASE_API + '/system/sys/file/upload',
|
||||
numReturnList: [],
|
||||
|
||||
codeDetails: true,
|
||||
isQuery: true,
|
||||
isNumDetails: true,
|
||||
currentRows: null, // 选择单条数据报废时 设置为当前行的row
|
||||
scrapAll: false, // 批量报废时 设置为true
|
||||
parentId: '',
|
||||
// 主列表列表查询参数
|
||||
sendParams: {
|
||||
taskId: '',
|
||||
|
|
@ -436,8 +436,7 @@ export default {
|
|||
scrapType: '', // 损坏原因
|
||||
fileUrl: '',
|
||||
},
|
||||
isNumReturn: false,
|
||||
isHandle: false,
|
||||
actionUrl: process.env.VUE_APP_BASE_API + '/system/sys/file/upload',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
<template>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
:action="actionUrl"
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="handleRemove"
|
||||
:before-remove="beforeRemove"
|
||||
:multiple="multiple"
|
||||
:limit="limit"
|
||||
:on-exceed="handleExceed"
|
||||
:file-list="fileList"
|
||||
:headers="headers"
|
||||
:on-success="handleSuccess"
|
||||
:data="uploadData"
|
||||
:action="actionUrl"
|
||||
:headers="headers"
|
||||
class="upload-demo"
|
||||
:multiple="multiple"
|
||||
:file-list="fileList"
|
||||
:on-exceed="handleExceed"
|
||||
:on-remove="handleRemove"
|
||||
:on-success="handleSuccess"
|
||||
:on-preview="handlePreview"
|
||||
:before-remove="beforeRemove"
|
||||
:before-upload="beforeUpload"
|
||||
>
|
||||
<slot name="default">
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
|
||||
import {
|
||||
getUnitInfoSelectApi,
|
||||
listPartTypeApi,
|
||||
} from '@/api/repairTest/repair'
|
||||
import { listPartTypeApi, getUnitInfoSelectApi } from '@/api/repairTest/repair'
|
||||
import { getProjectList } from '@/api/claimAndRefund/receive'
|
||||
import { getTypeList } from '@/api/store/warehousing'
|
||||
|
||||
|
|
@ -10,34 +6,60 @@ let unitList = []
|
|||
let proList = []
|
||||
let typeList = []
|
||||
|
||||
|
||||
export const config = {
|
||||
handleColShow: true, // 是否显示操作列
|
||||
pageShow: true, // 是否显示分页组件
|
||||
isSelShow: true,// 表格是否需要复选框
|
||||
pageShow: true, // 是否显示分页组件
|
||||
isSelShow: true, // 表格是否需要复选框
|
||||
isFormShow: true, // 是否显示表单查询组件
|
||||
handleWidth: '240px', // 操作列宽度
|
||||
formLabel: [
|
||||
{ f_label: '关键字', f_model: 'keyword', 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: 'scrapCode', f_type: 'ipt', f_selList: [] },
|
||||
{
|
||||
f_label: '审批状态', f_model: 'taskStatus', f_type: 'sel', f_selList: [
|
||||
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: 'scrapCode',
|
||||
f_type: 'ipt',
|
||||
f_selList: [],
|
||||
},
|
||||
{
|
||||
f_label: '审批状态',
|
||||
f_model: 'taskStatus',
|
||||
f_type: 'sel',
|
||||
f_selList: [
|
||||
// { label: '待审核', value: 120 },
|
||||
{ label: '审核中', value: 58 },
|
||||
{ label: '已驳回', value: 61 },
|
||||
{ label: '已通过', value: 59 },
|
||||
]
|
||||
],
|
||||
},
|
||||
{ f_label: '创建时间', f_model: 'time', f_type: 'date' },
|
||||
{
|
||||
f_label: '报废来源', f_model: 'scrapSource', f_type: 'sel', f_selList: [
|
||||
f_label: '报废来源',
|
||||
f_model: 'scrapSource',
|
||||
f_type: 'sel',
|
||||
f_selList: [
|
||||
{ label: '退料', value: 1 },
|
||||
{ label: '维修', value: 2 },
|
||||
{ label: '盘点', value: 3 },
|
||||
]
|
||||
],
|
||||
},
|
||||
],
|
||||
columnsList: [
|
||||
|
|
@ -50,12 +72,16 @@ export const config = {
|
|||
{ 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: 'taskStatus',
|
||||
t_label: '审核状态',
|
||||
t_slot: 'type',
|
||||
},
|
||||
],
|
||||
handleBtn: [
|
||||
{ btn_title: '查看', id: 1 },
|
||||
{ btn_title: '审核', id: 2 },
|
||||
|
||||
],
|
||||
}
|
||||
|
||||
|
|
@ -67,11 +93,16 @@ export const dialogConfig = {
|
|||
innerTitle: '',
|
||||
innerVisible: false,
|
||||
handleColShow: false, // 是否显示操作列
|
||||
pageShow: false, // 是否显示分页组件
|
||||
isSelShow: false,// 表格是否需要复选框
|
||||
pageShow: false, // 是否显示分页组件
|
||||
isSelShow: false, // 表格是否需要复选框
|
||||
isFormShow: true, // 是否显示表单查询组件
|
||||
formLabel: [
|
||||
{ f_label: '类型名称', f_model: 'backUnit', f_type: 'sel', f_selList: [] },
|
||||
{
|
||||
f_label: '类型名称',
|
||||
f_model: 'backUnit',
|
||||
f_type: 'sel',
|
||||
f_selList: [],
|
||||
},
|
||||
],
|
||||
|
||||
columnsList: [
|
||||
|
|
@ -81,9 +112,13 @@ export const dialogConfig = {
|
|||
{ t_width: '', t_props: 'maCode', t_label: '设备编码' },
|
||||
{ t_width: '', t_props: 'scrapNum', t_label: '设备数量' },
|
||||
{ t_width: '', t_props: '', t_label: '损坏原因', t_slot: 't_damage' },
|
||||
{ t_width: '', t_props: 'fileUrl', t_label: '报废图片', t_slot: 'imgPreview' },
|
||||
{
|
||||
t_width: '',
|
||||
t_props: 'fileUrl',
|
||||
t_label: '报废图片',
|
||||
t_slot: 'imgPreview',
|
||||
},
|
||||
],
|
||||
|
||||
}
|
||||
|
||||
export const getSelList = () => {
|
||||
|
|
@ -103,24 +138,24 @@ export const getSelList = () => {
|
|||
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(() => {
|
||||
|
||||
})
|
||||
.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(() => {})
|
||||
}
|
||||
|
||||
export const getTypeListSel = async () => {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
<template v-if="!temp">
|
||||
<TableModel
|
||||
:config="config"
|
||||
:sendApi="getPreScrapListApi"
|
||||
ref="listingTbRef"
|
||||
:sendApi="getPreScrapListApi"
|
||||
@getTableSelectionChange="getTableSelectionChange"
|
||||
:selectable="
|
||||
(row) => {
|
||||
|
|
@ -16,21 +16,21 @@
|
|||
<template slot="export" slot-scope="{ pageParams }">
|
||||
<el-row class="mb8">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-circle-check"
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handelSubmitScrap"
|
||||
icon="el-icon-circle-check"
|
||||
v-hasPermi="['submit:batch:scrap']"
|
||||
>提交报废</el-button
|
||||
>
|
||||
|
||||
<!-- 批量提交报废 -->
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="el-icon-download"
|
||||
@click="handelExportData(pageParams)"
|
||||
>导出数据</el-button
|
||||
>
|
||||
|
|
@ -75,17 +75,17 @@
|
|||
>
|
||||
<el-button
|
||||
type="text"
|
||||
v-if="data.taskStatus == 124"
|
||||
v-hasPermi="['submit:scrap']"
|
||||
icon="el-icon-finished"
|
||||
style="color: #f56c6c"
|
||||
icon="el-icon-finished"
|
||||
v-hasPermi="['submit:scrap']"
|
||||
v-if="data.taskStatus == 124"
|
||||
@click="handleSubmitScrap(data)"
|
||||
>提交报废</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
v-if="data.taskStatus == 61"
|
||||
@click="handleReject(data)"
|
||||
v-if="data.taskStatus == 61"
|
||||
:style="
|
||||
data.commit == 0
|
||||
? 'color: #e6a23c'
|
||||
|
|
@ -102,9 +102,9 @@
|
|||
>
|
||||
<el-button
|
||||
type="text"
|
||||
style="color: #67c23a"
|
||||
@click="handleAuditing(data)"
|
||||
v-if="data.taskStatus != 124"
|
||||
style="color: #67c23a"
|
||||
icon="el-icon-chat-line-square"
|
||||
>审批详情</el-button
|
||||
>
|
||||
|
|
@ -162,8 +162,8 @@
|
|||
<template v-if="temp">
|
||||
<PageHeader :pageContent="pageContent" @goBack="goBack" />
|
||||
<AuditingReturn
|
||||
:sendTbParams="sendParamsAuditing"
|
||||
:isDetails="isDetails"
|
||||
:sendTbParams="sendParamsAuditing"
|
||||
@closeReturnPage="closeReturnPage"
|
||||
/>
|
||||
</template>
|
||||
|
|
@ -171,18 +171,18 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import PageHeader from '@/components/pageHeader'
|
||||
import TableModel from '@/components/TableModel'
|
||||
import DialogModel from '@/components/DialogModel'
|
||||
import PageHeader from '@/components/pageHeader'
|
||||
import SelDepart from '../../component/selDepart.vue'
|
||||
import ScrapSource from '../../component/scrapSource.vue'
|
||||
import AuditingReturn from '../auditingReturn/index.vue' // 退料驳回页面
|
||||
import AuditingDetails from '../../component/auditingDetails.vue'
|
||||
import ScrapImg from '../../component/scrapImg.vue'
|
||||
import SelDepart from '../../component/selDepart.vue'
|
||||
import AuditingReturn from '../auditingReturn/index.vue' // 退料驳回页面
|
||||
import ScrapSource from '../../component/scrapSource.vue'
|
||||
import AuditingDetails from '../../component/auditingDetails.vue'
|
||||
import {
|
||||
getPreScrapListApi,
|
||||
getDialogListApi,
|
||||
submitScrapApi,
|
||||
getDialogListApi,
|
||||
getPreScrapListApi,
|
||||
} from '@/api/scrap/forecastWaste.js'
|
||||
import { config, dialogConfig, getSelList, getTypeListSel } from './config'
|
||||
export default {
|
||||
|
|
@ -191,24 +191,23 @@ export default {
|
|||
TableModel,
|
||||
DialogModel,
|
||||
PageHeader,
|
||||
ScrapImg,
|
||||
SelDepart,
|
||||
ScrapSource,
|
||||
AuditingReturn,
|
||||
AuditingDetails,
|
||||
ScrapImg,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
dialogConfig,
|
||||
getPreScrapListApi,
|
||||
getDialogListApi,
|
||||
tableSelList: [],
|
||||
getPreScrapListApi,
|
||||
temp: false,
|
||||
getSelList,
|
||||
getTypeListSel,
|
||||
imgCommonUrl: process.env.VUE_APP_BASE_API + '/system',
|
||||
auditingList: [],
|
||||
tableSelList: [],
|
||||
pageContent: '驳回退料',
|
||||
parentId: '',
|
||||
// 提交报废申请参数
|
||||
|
|
@ -226,6 +225,7 @@ export default {
|
|||
sendParams: {
|
||||
taskId: '',
|
||||
},
|
||||
imgCommonUrl: process.env.VUE_APP_BASE_API + '/system',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
|
|||
|
|
@ -2,15 +2,15 @@
|
|||
<div class="app-container">
|
||||
<!-- 报废审核 -->
|
||||
<TableModel
|
||||
ref="tbRef"
|
||||
:config="config"
|
||||
:sendApi="getDispositionListApi"
|
||||
@getTableSelectionChange="getSelectionList"
|
||||
:selectable="
|
||||
(row) => {
|
||||
return row.disposition == 0
|
||||
}
|
||||
"
|
||||
@getTableSelectionChange="getSelectionList"
|
||||
ref="tbRef"
|
||||
>
|
||||
<template slot="export" slot-scope="{ pageParams }">
|
||||
<el-row class="mb8">
|
||||
|
|
@ -22,10 +22,10 @@
|
|||
>批量处置</el-button
|
||||
>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="el-icon-download"
|
||||
@click="handelExportData(pageParams)"
|
||||
>导出数据</el-button
|
||||
>
|
||||
|
|
@ -63,18 +63,18 @@
|
|||
<!-- 列表操作栏 -->
|
||||
<template slot="handle" slot-scope="{ data }">
|
||||
<el-button
|
||||
icon="el-icon-zoom-in"
|
||||
type="text"
|
||||
icon="el-icon-zoom-in"
|
||||
@click="handlePreview(data)"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="el-icon-edit-outline"
|
||||
style="color: #e6a23c"
|
||||
type="text"
|
||||
@click="handleDisposition(data)"
|
||||
style="color: #e6a23c"
|
||||
icon="el-icon-edit-outline"
|
||||
v-if="data.disposition == 0"
|
||||
@click="handleDisposition(data)"
|
||||
v-hasPermi="['scrap:disposition']"
|
||||
>
|
||||
处置
|
||||
|
|
@ -122,16 +122,16 @@
|
|||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<a
|
||||
:href="filePreviewUrl + row.fileUrl"
|
||||
target="_blank"
|
||||
:download="row.fileName"
|
||||
v-if="fileTypeJudge(row.fileName)"
|
||||
:href="filePreviewUrl + row.fileUrl"
|
||||
>查看</a
|
||||
>
|
||||
<a
|
||||
:href="filePreviewUrl + row.fileUrl"
|
||||
target="_blank"
|
||||
v-else
|
||||
target="_blank"
|
||||
:href="filePreviewUrl + row.fileUrl"
|
||||
>查看</a
|
||||
>
|
||||
</template>
|
||||
|
|
@ -150,15 +150,15 @@
|
|||
/>
|
||||
</el-col> -->
|
||||
<AnnexUpload
|
||||
:fileType="fileType"
|
||||
:limit="5"
|
||||
:fileSize="5"
|
||||
:fileList="fileList"
|
||||
:uploadUrl="uploadUrl"
|
||||
:multiple="false"
|
||||
:fileList="fileList"
|
||||
:fileType="fileType"
|
||||
:uploadUrl="uploadUrl"
|
||||
:uploadParams="uploadParams"
|
||||
@handleSuccess="handleSuccess"
|
||||
@handleRemove="handleRemove"
|
||||
@handleSuccess="handleSuccess"
|
||||
/>
|
||||
</el-row>
|
||||
<el-row class="dialog-common-btn">
|
||||
|
|
@ -181,13 +181,13 @@
|
|||
import TableModel from '@/components/TableModel'
|
||||
import DialogModel from '@/components/DialogModel'
|
||||
import AnnexUpload from '@/components/AnnexUpload'
|
||||
import ScrapSource from '../../component/scrapSource.vue'
|
||||
import ScrapImg from '../../component/scrapImg.vue'
|
||||
import ScrapSource from '../../component/scrapSource.vue'
|
||||
import { config, dialogConfig, getSelList } from './config.js'
|
||||
import {
|
||||
getDispositionListApi,
|
||||
submitDispositionApi,
|
||||
getDialogListApi,
|
||||
submitDispositionApi,
|
||||
getDispositionListApi,
|
||||
} from '@/api/scrap/forecastWaste.js'
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -278,6 +278,7 @@ export default {
|
|||
/* 确定 */
|
||||
async handleSubmitInner() {
|
||||
if (this.fileList.length < 1) {
|
||||
this.$message.closeAll()
|
||||
this.$message.error('请先上传文件!')
|
||||
return
|
||||
}
|
||||
|
|
@ -292,14 +293,14 @@ export default {
|
|||
e.fileName = fileName.substring(fileUrl.length - 1, ',')
|
||||
})
|
||||
const res = await submitDispositionApi(this.dispositionParams)
|
||||
if (res.code == 200) {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('处置成功!')
|
||||
this.dialogConfig.outerVisible = false
|
||||
this.$refs.tbRef.getList()
|
||||
}
|
||||
},
|
||||
|
||||
// 文件上传成功
|
||||
/* 文件上传成功 */
|
||||
handleSuccess(file) {
|
||||
const { fileName, fileUrl, id } = file
|
||||
const fileObj = {
|
||||
|
|
@ -309,7 +310,7 @@ export default {
|
|||
}
|
||||
this.fileList.push(fileObj)
|
||||
},
|
||||
// 文件移除
|
||||
/* 文件移除 */
|
||||
handleRemove(file) {
|
||||
this.fileList = this.fileList.filter((e) => e.id !== file.id)
|
||||
},
|
||||
|
|
@ -359,5 +360,17 @@ export default {
|
|||
return docList.some((e) => e === file)
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
dialogConfig: {
|
||||
handler(newVal) {
|
||||
if (!newVal.outerVisible) {
|
||||
// 监听弹框关闭 清空文件数据源 解决关闭弹框再次打开时显示上次上传成功的文件
|
||||
this.fileList = []
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
<template slot="export" slot-scope="{ pageParams }">
|
||||
<el-row class="mb8">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="el-icon-download"
|
||||
@click="handelExportData(pageParams)"
|
||||
>导出数据</el-button
|
||||
>
|
||||
|
|
@ -40,15 +40,15 @@
|
|||
<template slot="handle" slot-scope="{ data }">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handlePreview(data)"
|
||||
icon="el-icon-zoom-in"
|
||||
@click="handlePreview(data)"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="el-icon-edit-outline"
|
||||
style="color: #e6a23c"
|
||||
type="text"
|
||||
style="color: #e6a23c"
|
||||
icon="el-icon-edit-outline"
|
||||
v-if="auditingIsShow(data)"
|
||||
v-hasPermi="['scrap:auditing']"
|
||||
@click="handleAuditing(data)"
|
||||
|
|
@ -57,9 +57,9 @@
|
|||
审核
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="el-icon-chat-line-square"
|
||||
style="color: #67c23a"
|
||||
type="text"
|
||||
style="color: #67c23a"
|
||||
icon="el-icon-chat-line-square"
|
||||
@click="handleAuditingDetails(data)"
|
||||
>
|
||||
审批详情
|
||||
|
|
@ -78,9 +78,9 @@
|
|||
<!-- 查看内容 -->
|
||||
<template v-if="dialogConfig.outerTitle === '查看'">
|
||||
<TableModel
|
||||
:config="dialogConfig"
|
||||
:sendParams="sendParams"
|
||||
:sendApi="getDialogListApi"
|
||||
:config="dialogConfig"
|
||||
>
|
||||
<!-- 损坏原因 -->
|
||||
<template slot-scope="{ data }" slot="t_damage">
|
||||
|
|
@ -99,10 +99,10 @@
|
|||
</template>
|
||||
<template v-if="dialogConfig.outerTitle === '审核'">
|
||||
<TableModel
|
||||
ref="dialogTbRef"
|
||||
:config="dialogConfig"
|
||||
:sendParams="sendParams"
|
||||
:sendApi="getDialogListApi"
|
||||
ref="dialogTbRef"
|
||||
@getTableSelectionChange="getDialogTbChange"
|
||||
>
|
||||
<!-- 损坏原因 -->
|
||||
|
|
@ -147,11 +147,11 @@
|
|||
<el-col :span="4">请输入驳回原因</el-col>
|
||||
<el-col :span="20">
|
||||
<el-input
|
||||
v-model="rejectReason"
|
||||
maxlength="100"
|
||||
type="textarea"
|
||||
:rows="6"
|
||||
type="textarea"
|
||||
maxlength="100"
|
||||
ref="rejectReasonRef"
|
||||
v-model="rejectReason"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -175,9 +175,9 @@
|
|||
<script>
|
||||
import TableModel from '@/components/TableModel'
|
||||
import DialogModel from '@/components/DialogModel'
|
||||
import ScrapImg from '../../component/scrapImg.vue'
|
||||
import ScrapSource from '../../component/scrapSource.vue'
|
||||
import AuditingDetails from '../../component/auditingDetails.vue'
|
||||
import ScrapImg from '../../component/scrapImg.vue'
|
||||
import { config, dialogConfig, getSelList } from './config'
|
||||
import {
|
||||
getScrapListApi,
|
||||
|
|
@ -188,9 +188,9 @@ export default {
|
|||
components: {
|
||||
TableModel,
|
||||
DialogModel,
|
||||
ScrapImg,
|
||||
ScrapSource,
|
||||
AuditingDetails,
|
||||
ScrapImg,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -198,11 +198,10 @@ export default {
|
|||
dialogConfig,
|
||||
getScrapListApi,
|
||||
getDialogListApi,
|
||||
selectionList: [], // 选中的列表数据
|
||||
rejectReason: '', // 驳回原因
|
||||
deptId: sessionStorage.getItem('deptId'),
|
||||
sendParams: {}, // 弹框内列表查看时参数
|
||||
auditingList: [], // 审批详情的列表
|
||||
getSelList,
|
||||
selectionList: [], // 选中的列表数据
|
||||
/* 审核参数 */
|
||||
auditingParams: {
|
||||
deptId: parseInt(sessionStorage.getItem('deptId')),
|
||||
|
|
@ -211,7 +210,8 @@ export default {
|
|||
status: '',
|
||||
reasonRejection: '',
|
||||
},
|
||||
sendParams: {}, // 弹框内列表查看时参数
|
||||
deptId: sessionStorage.getItem('deptId'),
|
||||
getSelList,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -284,7 +284,7 @@ export default {
|
|||
this.auditingParams.status = '2'
|
||||
this.auditingParams.reasonRejection = this.rejectReason
|
||||
const res = await auditingScrapApi(this.auditingParams)
|
||||
if (res.code == 200) {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('已驳回')
|
||||
this.dialogConfig.innerVisible = false
|
||||
this.dialogConfig.outerVisible = false
|
||||
|
|
|
|||
|
|
@ -405,6 +405,9 @@ export default {
|
|||
this.getList()
|
||||
})
|
||||
} else {
|
||||
if (!this.form.currentId) {
|
||||
this.form.level = 1
|
||||
}
|
||||
addMaPartType(this.form).then((response) => {
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
this.open = false
|
||||
|
|
|
|||
Loading…
Reference in New Issue