2024-04-24 08:46:24 +08:00
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
getUnitInfoSelectApi,
|
|
|
|
|
listPartTypeApi,
|
|
|
|
|
} from '@/api/repairTest/repair'
|
|
|
|
|
import { getProjectList } from '@/api/claimAndRefund/receive'
|
|
|
|
|
|
2024-05-16 14:16:49 +08:00
|
|
|
import { getTypeList } from '@/api/store/warehousing'
|
|
|
|
|
|
2024-04-24 08:46:24 +08:00
|
|
|
let unitList = []
|
|
|
|
|
let proList = []
|
|
|
|
|
let typeList = []
|
|
|
|
|
export const config = {
|
|
|
|
|
handleColShow: true, // 是否显示操作列
|
|
|
|
|
pageShow: true, // 是否显示分页组件
|
|
|
|
|
isSelShow: true,// 表格是否需要复选框
|
|
|
|
|
isFormShow: true, // 是否显示表单查询组件
|
2024-06-27 11:54:43 +08:00
|
|
|
handleWidth: '160px', // 操作列宽度
|
2024-04-24 08:46:24 +08:00
|
|
|
formLabel: [
|
2024-05-15 12:09:37 +08:00
|
|
|
{ f_label: '关键字', f_model: 'keyword', f_type: 'ipt' },
|
2024-04-24 08:46:24 +08:00
|
|
|
{ f_label: '单位名称', f_model: 'backUnit', f_type: 'sel', f_selList: [] },
|
|
|
|
|
{ f_label: '工程名称', f_model: 'backPro', f_type: 'sel', f_selList: [] },
|
2024-06-25 17:36:11 +08:00
|
|
|
{
|
|
|
|
|
f_label: '工机具类型', f_model: 'type', f_type: 'selCas', f_selList: [], optionProps: {
|
|
|
|
|
multiple: false,
|
|
|
|
|
value: 'id',
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-04-24 08:46:24 +08:00
|
|
|
{
|
|
|
|
|
f_label: '报废来源', f_model: 'scrapSource', f_type: 'sel', f_selList: [
|
|
|
|
|
{ label: '退料', value: 1 },
|
|
|
|
|
{ label: '维修', value: 2 },
|
|
|
|
|
{ label: '盘点', value: 3 },
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
f_label: '审批状态', f_model: 'taskStatus', f_type: 'sel', f_selList: [
|
|
|
|
|
{ label: '待审核', value: 120 },
|
|
|
|
|
{ label: '审核中', value: 121 },
|
|
|
|
|
{ label: '已驳回', value: 123 },
|
|
|
|
|
{ label: '已通过', value: 122 },
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{ f_label: '创建时间', f_model: 'time', f_type: 'date' },
|
|
|
|
|
],
|
|
|
|
|
columnsList: [
|
2024-05-28 16:54:30 +08:00
|
|
|
// { t_width: '55px', t_props: '', t_label: '序号' },
|
2024-04-24 08:46:24 +08:00
|
|
|
{ t_width: '', t_props: 'scrapNum', t_label: '预报废单号', },
|
2024-06-27 11:54:43 +08:00
|
|
|
{ t_width: '85px', t_props: '', t_label: '报废来源', t_slot: 'source', },
|
2024-04-24 08:46:24 +08:00
|
|
|
{ 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', },
|
2024-06-27 11:54:43 +08:00
|
|
|
// { t_width: '', t_props: '', t_label: '不通过原因', },
|
2024-04-24 08:46:24 +08:00
|
|
|
],
|
|
|
|
|
handleBtn: [
|
|
|
|
|
{ btn_title: '查看', id: 1 },
|
|
|
|
|
{ btn_title: '审核', id: 2 },
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const dialogConfig = {
|
|
|
|
|
outerWidth: '70%',
|
|
|
|
|
outerTitle: '',
|
|
|
|
|
outerVisible: false,
|
|
|
|
|
innerWidth: '50%',
|
|
|
|
|
innerTitle: '',
|
|
|
|
|
innerVisible: false,
|
|
|
|
|
handleColShow: false, // 是否显示操作列
|
2024-04-28 16:55:12 +08:00
|
|
|
pageShow: true, // 是否显示分页组件
|
2024-04-24 08:46:24 +08:00
|
|
|
isSelShow: false,// 表格是否需要复选框
|
|
|
|
|
isFormShow: true, // 是否显示表单查询组件
|
|
|
|
|
formLabel: [
|
2024-05-16 14:16:49 +08:00
|
|
|
{ f_label: '类型名称', f_model: 'keywords', f_type: 'sel', f_selList: [], selLabel: 'typeName', selValue: 'typeId' },
|
2024-04-24 08:46:24 +08:00
|
|
|
],
|
|
|
|
|
|
|
|
|
|
columnsList: [
|
2024-05-28 16:54:30 +08:00
|
|
|
// { t_width: '55px', t_props: '', t_label: '序号' },
|
2024-04-24 08:46:24 +08:00
|
|
|
{ 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' },
|
2024-06-27 17:23:45 +08:00
|
|
|
{ t_width: '', t_props: 'remark', t_label: '报废原因' },
|
|
|
|
|
{ t_width: '', t_props: 'auditRemark', t_label: '驳回原因' },
|
2024-06-12 16:16:08 +08:00
|
|
|
{ t_width: '', t_props: '', t_label: '损坏原因', t_slot: 't_damage' },
|
|
|
|
|
{ t_width: '', t_props: '', t_label: '报废图片', t_slot: 't_img' },
|
2024-04-24 08:46:24 +08:00
|
|
|
{ t_width: '', t_props: 'remark', 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(() => {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-05-16 14:16:49 +08:00
|
|
|
|
|
|
|
|
export const getTypeListSel = async () => {
|
|
|
|
|
const { data: res } = await getTypeList({ level: '3' })
|
|
|
|
|
dialogConfig.formLabel[0].f_selList = res.map((e) => {
|
|
|
|
|
e.value = e.typeId
|
|
|
|
|
e.label = e.typeName
|
|
|
|
|
return e
|
|
|
|
|
})
|
|
|
|
|
}
|