This commit is contained in:
parent
f1cfbef49b
commit
df24cb9922
|
|
@ -7,6 +7,11 @@
|
||||||
:sendApi="getPreScrapListApi"
|
:sendApi="getPreScrapListApi"
|
||||||
ref="listingTbRef"
|
ref="listingTbRef"
|
||||||
@getTableSelectionChange="getTableSelectionChange"
|
@getTableSelectionChange="getTableSelectionChange"
|
||||||
|
:selectable="
|
||||||
|
(row) => {
|
||||||
|
return row.taskStatus == 124
|
||||||
|
}
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<template slot="export">
|
<template slot="export">
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
|
|
@ -226,7 +231,11 @@
|
||||||
},
|
},
|
||||||
/* 表格复选框选中的数据 */
|
/* 表格复选框选中的数据 */
|
||||||
getTableSelectionChange(val) {
|
getTableSelectionChange(val) {
|
||||||
|
this.tableSelList = []
|
||||||
this.tableSelList = val
|
this.tableSelList = val
|
||||||
|
this.tableSelList.map((e) => {
|
||||||
|
this.submitScrapParams.taskIdList.push(e.taskId)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleBack() {
|
handleBack() {
|
||||||
this.temp = !this.temp
|
this.temp = !this.temp
|
||||||
|
|
|
||||||
|
|
@ -44,13 +44,12 @@ export const dialogConfig = {
|
||||||
],
|
],
|
||||||
columnsList: [
|
columnsList: [
|
||||||
{ t_width: '55px', t_props: '', t_label: '序号' },
|
{ t_width: '55px', t_props: '', t_label: '序号' },
|
||||||
{ t_props: '', t_label: '设备类型' },
|
{ t_width: '', t_props: 'machineTypeName', t_label: '设备类型' },
|
||||||
{ t_props: '', t_label: '规格型号' },
|
{ t_width: '', t_props: 'specificationType', t_label: '规格型号' },
|
||||||
{ t_props: '', t_label: '设备编码' },
|
{ t_width: '', t_props: 'maCode', t_label: '设备编码' },
|
||||||
{ t_props: '', t_label: '设备数量' },
|
{ t_width: '', t_props: 'scrapNum', t_label: '设备数量' },
|
||||||
{ t_props: '', t_label: '报废原因' },
|
{ t_width: '', t_props: 'remark', t_label: '报废原因' },
|
||||||
{ t_props: '', t_label: '报废图片' },
|
{ t_width: '', t_props: 'fileUrl', t_label: '报废图片', t_slot: 'imgPreview' },
|
||||||
{ t_props: '', t_label: '备注' },
|
|
||||||
],
|
],
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,12 @@
|
||||||
<TableModel
|
<TableModel
|
||||||
:config="config"
|
:config="config"
|
||||||
:sendApi="getDispositionListApi"
|
:sendApi="getDispositionListApi"
|
||||||
|
:selectable="
|
||||||
|
(row) => {
|
||||||
|
return row.disposition == 0
|
||||||
|
}
|
||||||
|
"
|
||||||
|
@getTableSelectionChange="getSelectionList"
|
||||||
ref="tbRef"
|
ref="tbRef"
|
||||||
>
|
>
|
||||||
<template slot="export">
|
<template slot="export">
|
||||||
|
|
@ -63,7 +69,7 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@click="handleDisposition(data)"
|
@click="handleDisposition(data)"
|
||||||
v-if="data.disposition === 0"
|
v-if="data.disposition == 0"
|
||||||
>
|
>
|
||||||
处置
|
处置
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -77,9 +83,21 @@
|
||||||
>
|
>
|
||||||
<!-- 弹框内容 查看 处置-->
|
<!-- 弹框内容 查看 处置-->
|
||||||
<template slot="outerContent">
|
<template slot="outerContent">
|
||||||
|
<!-- 查看内容 -->
|
||||||
<template v-if="dialogConfig.outerTitle === '查看'">
|
<template v-if="dialogConfig.outerTitle === '查看'">
|
||||||
<TableModel :config="dialogConfig"></TableModel>
|
<TableModel
|
||||||
</template>
|
:sendParams="sendParams"
|
||||||
|
:sendApi="getDialogListApi"
|
||||||
|
:config="dialogConfig"
|
||||||
|
>
|
||||||
|
<template slot="imgPreview" slot-scope="{ data }">
|
||||||
|
<ImagePreview
|
||||||
|
:src="`https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg`"
|
||||||
|
:width="`60px`"
|
||||||
|
:height="`60px`"
|
||||||
|
/>
|
||||||
|
</template> </TableModel
|
||||||
|
></template>
|
||||||
|
|
||||||
<template v-else-if="dialogConfig.outerTitle === '附件信息'">
|
<template v-else-if="dialogConfig.outerTitle === '附件信息'">
|
||||||
<el-table :data="fileList" border>
|
<el-table :data="fileList" border>
|
||||||
|
|
@ -90,7 +108,11 @@
|
||||||
/>
|
/>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<a :href="row.fileUrl" target="_blank">查看</a>
|
<a
|
||||||
|
:href="filePreviewUrl + row.fileUrl"
|
||||||
|
target="_blank"
|
||||||
|
>查看</a
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -128,6 +150,7 @@
|
||||||
import {
|
import {
|
||||||
getDispositionListApi,
|
getDispositionListApi,
|
||||||
submitDispositionApi,
|
submitDispositionApi,
|
||||||
|
getDialogListApi,
|
||||||
} from '@/api/scrap/forecastWaste.js'
|
} from '@/api/scrap/forecastWaste.js'
|
||||||
import TableModel from '@/components/TableModel'
|
import TableModel from '@/components/TableModel'
|
||||||
import DialogModel from '@/components/DialogModel'
|
import DialogModel from '@/components/DialogModel'
|
||||||
|
|
@ -142,27 +165,35 @@
|
||||||
config,
|
config,
|
||||||
dialogConfig,
|
dialogConfig,
|
||||||
getDispositionListApi,
|
getDispositionListApi,
|
||||||
|
getDialogListApi,
|
||||||
/* 选中的列表数据 */
|
/* 选中的列表数据 */
|
||||||
selectionList: [],
|
selectionList: [],
|
||||||
/* 驳回原因 */
|
/* 驳回原因 */
|
||||||
rejectReason: '',
|
rejectReason: '',
|
||||||
fileType: ['png', 'jpg', 'jpeg', 'pdf', 'doc', 'xls', 'docx'],
|
fileType: ['png', 'jpg', 'jpeg', 'pdf', 'doc', 'xls', 'docx'],
|
||||||
uploadFileList: [],
|
uploadFileList: [],
|
||||||
|
sendParams: {},
|
||||||
fileList: [],
|
fileList: [],
|
||||||
|
tbSelectList: [],
|
||||||
/* 处置提交参数 */
|
/* 处置提交参数 */
|
||||||
dispositionParams: {
|
|
||||||
taskId: '',
|
dispositionParams: [],
|
||||||
fileUrl: '', // 附件url
|
// dispositionParams: {
|
||||||
fileName: '', // 附件名称
|
// taskId: '',
|
||||||
disposition: 1, // 处置状态 0、未通过 1、通过
|
// fileUrl: '', // 附件url
|
||||||
},
|
// fileName: '', // 附件名称
|
||||||
|
// disposition: 1, // 处置状态 0、未通过 1、通过
|
||||||
|
// },
|
||||||
|
/* 附件预览地址 */
|
||||||
|
filePreviewUrl: process.env.VUE_APP_BASE_API + '/system',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
/* 按钮操作 */
|
/* 按钮操作 */
|
||||||
handlePreview(row) {
|
handlePreview(row) {
|
||||||
this.dispositionParams.taskId = row.taskId
|
this.dispositionParams.taskId = this.sendParams.taskId =
|
||||||
|
row.taskId
|
||||||
this.dialogConfig.outerTitle = '查看'
|
this.dialogConfig.outerTitle = '查看'
|
||||||
this.dialogConfig.outerWidth = '70%'
|
this.dialogConfig.outerWidth = '70%'
|
||||||
this.dialogConfig.outerVisible = true
|
this.dialogConfig.outerVisible = true
|
||||||
|
|
@ -175,7 +206,7 @@
|
||||||
|
|
||||||
/* 查看附件 */
|
/* 查看附件 */
|
||||||
handlePreviewFile(data) {
|
handlePreviewFile(data) {
|
||||||
dialogConfig.outerTitle = '附件信息'
|
this.fileList = []
|
||||||
data.dispositionFileName.split(',').map((e) => {
|
data.dispositionFileName.split(',').map((e) => {
|
||||||
let fileObj = {
|
let fileObj = {
|
||||||
fileName: e,
|
fileName: e,
|
||||||
|
|
@ -188,6 +219,7 @@
|
||||||
data.dispositionFileUrl.split(',').map((e, index) => {
|
data.dispositionFileUrl.split(',').map((e, index) => {
|
||||||
this.fileList[index].fileUrl = e
|
this.fileList[index].fileUrl = e
|
||||||
})
|
})
|
||||||
|
this.dialogConfig.outerTitle = '附件信息'
|
||||||
this.dialogConfig.outerWidth = '40%'
|
this.dialogConfig.outerWidth = '40%'
|
||||||
this.dialogConfig.outerVisible = true
|
this.dialogConfig.outerVisible = true
|
||||||
},
|
},
|
||||||
|
|
@ -223,9 +255,11 @@
|
||||||
',',
|
',',
|
||||||
)
|
)
|
||||||
|
|
||||||
const { data: res } = await submitDispositionApi([
|
this.dispositionParams.map((e) => {
|
||||||
this.dispositionParams,
|
e.fileUrl = fileUrl.substring(fileUrl.length - 1, ',')
|
||||||
])
|
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.$message.success('处置成功!')
|
||||||
|
|
@ -239,7 +273,33 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
/* 批量处置 */
|
/* 批量处置 */
|
||||||
handleBatchDisposition() {},
|
handleBatchDisposition() {
|
||||||
|
this.dispositionParams = []
|
||||||
|
if (this.tbSelectList.length < 1) {
|
||||||
|
this.$message.error('请选择需处置的数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.tbSelectList.map((e) => {
|
||||||
|
let prams = {
|
||||||
|
taskId: e.taskId,
|
||||||
|
fileUrl: '', // 附件url
|
||||||
|
fileName: '', // 附件名称
|
||||||
|
disposition: 1, // 处置状态 0、未通过 1、通过
|
||||||
|
}
|
||||||
|
|
||||||
|
this.dispositionParams.push(prams)
|
||||||
|
})
|
||||||
|
|
||||||
|
this.dialogConfig.outerTitle = '处置'
|
||||||
|
this.dialogConfig.outerWidth = '60%'
|
||||||
|
this.dialogConfig.outerVisible = true
|
||||||
|
},
|
||||||
|
|
||||||
|
/* 获取列表下拉勾选数据 */
|
||||||
|
getSelectionList(selList) {
|
||||||
|
console.log(selList, '选择的数据')
|
||||||
|
this.tbSelectList = selList
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -44,12 +44,12 @@ export const dialogConfig = {
|
||||||
],
|
],
|
||||||
columnsList: [
|
columnsList: [
|
||||||
{ t_width: '55px', t_props: '', t_label: '序号' },
|
{ t_width: '55px', t_props: '', t_label: '序号' },
|
||||||
{ t_props: 'machineTypeName', t_label: '设备类型' },
|
{ t_width: '', t_props: 'machineTypeName', t_label: '设备类型' },
|
||||||
{ t_props: 'specificationType', t_label: '规格型号' },
|
{ t_width: '', t_props: 'specificationType', t_label: '规格型号' },
|
||||||
{ t_props: 'maCode', t_label: '设备编码' },
|
{ t_width: '', t_props: 'maCode', t_label: '设备编码' },
|
||||||
{ t_props: 'scrapNum', t_label: '设备数量' },
|
{ t_width: '', t_props: 'scrapNum', t_label: '设备数量' },
|
||||||
{ t_props: 'remark', t_label: '报废原因' },
|
{ t_width: '', t_props: 'remark', t_label: '报废原因' },
|
||||||
{ t_props: 'fileUrl', t_label: '报废图片' },
|
{ t_width: '', t_props: 'fileUrl', t_label: '报废图片', t_slot: 'imgPreview' },
|
||||||
],
|
],
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,21 @@
|
||||||
>
|
>
|
||||||
<!-- 弹框外层内容 查看 审核 审核详情-->
|
<!-- 弹框外层内容 查看 审核 审核详情-->
|
||||||
<template slot="outerContent">
|
<template slot="outerContent">
|
||||||
|
<!-- 查看内容 -->
|
||||||
|
<template v-if="dialogConfig.outerTitle === '查看'">
|
||||||
|
<TableModel
|
||||||
|
:sendParams="sendParams"
|
||||||
|
:sendApi="getDialogListApi"
|
||||||
|
:config="dialogConfig"
|
||||||
|
>
|
||||||
|
<template slot="imgPreview" slot-scope="{ data }">
|
||||||
|
<ImagePreview
|
||||||
|
:src="`https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg`"
|
||||||
|
:width="`60px`"
|
||||||
|
:height="`60px`"
|
||||||
|
/>
|
||||||
|
</template> </TableModel
|
||||||
|
></template>
|
||||||
<template v-if="dialogConfig.outerTitle != '审批详情'">
|
<template v-if="dialogConfig.outerTitle != '审批详情'">
|
||||||
<TableModel
|
<TableModel
|
||||||
:config="dialogConfig"
|
:config="dialogConfig"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue