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