|
|
|
|
@ -974,29 +974,19 @@ export default {
|
|
|
|
|
{
|
|
|
|
|
label: '一级分类',
|
|
|
|
|
width: 120,
|
|
|
|
|
prop: 'wuzibianma_material_infos_wuzibianma_relation.material_info_type',
|
|
|
|
|
prop: 'wuzibianma_material_infos_wuzibianma_relation.first_level_category.name',
|
|
|
|
|
align: 'center',
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
return value ? value.split('-')[0] : ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '二级分类',
|
|
|
|
|
width: 120,
|
|
|
|
|
prop: 'wuzibianma_material_infos_wuzibianma_relation.material_info_type',
|
|
|
|
|
align: 'center',
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
return value
|
|
|
|
|
? value.split('-').length > 1
|
|
|
|
|
? value.split('-')[1]
|
|
|
|
|
: value.split('-')[0]
|
|
|
|
|
: ''
|
|
|
|
|
}
|
|
|
|
|
prop: 'wuzibianma_material_infos_wuzibianma_relation.second_level_category.name',
|
|
|
|
|
align: 'center'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '所属种类',
|
|
|
|
|
width: 120,
|
|
|
|
|
prop: 'wuzibianma_material_infos_wuzibianma_relation.fenlei_detail.name',
|
|
|
|
|
prop: 'wuzibianma_material_infos_wuzibianma_relation.category_type.name',
|
|
|
|
|
align: 'center'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
@ -1210,48 +1200,29 @@ export default {
|
|
|
|
|
outsideListColumns: [
|
|
|
|
|
{
|
|
|
|
|
title: '一级分类',
|
|
|
|
|
key: 'yijifenlei',
|
|
|
|
|
key: 'first_level_category.name',
|
|
|
|
|
width: 120,
|
|
|
|
|
align: 'center',
|
|
|
|
|
render: (h, params) => {
|
|
|
|
|
if (!params.row.inventory || !params.row.inventory.wuzibianma_material_infos_wuzibianma_relation) {
|
|
|
|
|
return h('span', '-')
|
|
|
|
|
}
|
|
|
|
|
const materialInfoType = params.row.inventory.wuzibianma_material_infos_wuzibianma_relation.material_info_type
|
|
|
|
|
const value = materialInfoType ? materialInfoType.split('-')[0] : ''
|
|
|
|
|
return h('span', value || '-')
|
|
|
|
|
return h('span', params.row.inventory ? params.row.inventory.wuzibianma_material_infos_wuzibianma_relation.first_level_category.name : '-')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '二级分类',
|
|
|
|
|
key: 'erjifenlei',
|
|
|
|
|
key: 'second_level_category.name',
|
|
|
|
|
width: 120,
|
|
|
|
|
align: 'center',
|
|
|
|
|
render: (h, params) => {
|
|
|
|
|
if (!params.row.inventory || !params.row.inventory.wuzibianma_material_infos_wuzibianma_relation) {
|
|
|
|
|
return h('span', '-')
|
|
|
|
|
}
|
|
|
|
|
const materialInfoType = params.row.inventory.wuzibianma_material_infos_wuzibianma_relation.material_info_type
|
|
|
|
|
let value = ''
|
|
|
|
|
if (materialInfoType) {
|
|
|
|
|
const parts = materialInfoType.split('-')
|
|
|
|
|
value = parts.length > 1 ? parts[1] : parts[0]
|
|
|
|
|
}
|
|
|
|
|
return h('span', value || '-')
|
|
|
|
|
return h('span', params.row.inventory ? params.row.inventory.wuzibianma_material_infos_wuzibianma_relation.second_level_category.name : '-')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '所属种类',
|
|
|
|
|
key: 'suoshuzhonglei',
|
|
|
|
|
key: 'category_type.name',
|
|
|
|
|
width: 120,
|
|
|
|
|
align: 'center',
|
|
|
|
|
render: (h, params) => {
|
|
|
|
|
if (!params.row.inventory || !params.row.inventory.wuzibianma_material_infos_wuzibianma_relation) {
|
|
|
|
|
return h('span', '-')
|
|
|
|
|
}
|
|
|
|
|
const fenleiDetail = params.row.inventory.wuzibianma_material_infos_wuzibianma_relation.fenlei_detail
|
|
|
|
|
const value = fenleiDetail ? fenleiDetail.name : ''
|
|
|
|
|
return h('span', value || '-')
|
|
|
|
|
return h('span', params.row.inventory ? params.row.inventory.wuzibianma_material_infos_wuzibianma_relation.category_type.name : '-')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
@ -1364,49 +1335,28 @@ export default {
|
|
|
|
|
// width: 100,
|
|
|
|
|
// align: 'center'
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
title: '一级分类',
|
|
|
|
|
key: 'first_level_category.name',
|
|
|
|
|
width: 120,
|
|
|
|
|
render: (h, params) => {
|
|
|
|
|
return h('span', params.row.inventory ? params.row.inventory.wuzibianma_material_infos_wuzibianma_relation.first_level_category.name : '-')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '二级分类',
|
|
|
|
|
key: 'second_level_category.name',
|
|
|
|
|
width: 120,
|
|
|
|
|
render: (h, params) => {
|
|
|
|
|
return h('span', params.row.inventory ? params.row.inventory.wuzibianma_material_infos_wuzibianma_relation.second_level_category.name : '-')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '所属种类',
|
|
|
|
|
key: 'suoshuzhonglei',
|
|
|
|
|
key: 'category_type.name',
|
|
|
|
|
width: 140,
|
|
|
|
|
render: (h, params) => {
|
|
|
|
|
if (!params.row.inventory || !params.row.inventory.wuzibianma_material_infos_wuzibianma_relation) {
|
|
|
|
|
return h('span', '-')
|
|
|
|
|
}
|
|
|
|
|
const relation = params.row.inventory.wuzibianma_material_infos_wuzibianma_relation
|
|
|
|
|
const materialInfoType = relation.material_info_type
|
|
|
|
|
const fenleiDetail = relation.fenlei_detail
|
|
|
|
|
|
|
|
|
|
// 获取一级分类
|
|
|
|
|
let yiji = ''
|
|
|
|
|
if (materialInfoType) {
|
|
|
|
|
yiji = materialInfoType.split('-')[0] || ''
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取二级分类
|
|
|
|
|
let erji = ''
|
|
|
|
|
if (materialInfoType) {
|
|
|
|
|
const parts = materialInfoType.split('-')
|
|
|
|
|
erji = parts.length > 1 ? parts[1] : ''
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取所属种类
|
|
|
|
|
const suoshu = fenleiDetail ? fenleiDetail.name : ''
|
|
|
|
|
|
|
|
|
|
// 组合显示:一级分类-二级分类/所属种类
|
|
|
|
|
const parts = []
|
|
|
|
|
if (yiji) parts.push(yiji)
|
|
|
|
|
if (erji) parts.push(erji)
|
|
|
|
|
const fenci = parts.length > 0 ? parts.join('-') : ''
|
|
|
|
|
|
|
|
|
|
if (fenci && suoshu) {
|
|
|
|
|
return h('span', `${fenci}/${suoshu}`)
|
|
|
|
|
} else if (fenci) {
|
|
|
|
|
return h('span', fenci)
|
|
|
|
|
} else if (suoshu) {
|
|
|
|
|
return h('span', suoshu)
|
|
|
|
|
} else {
|
|
|
|
|
return h('span', '-')
|
|
|
|
|
}
|
|
|
|
|
return h('span', params.row.inventory ? params.row.inventory.wuzibianma_material_infos_wuzibianma_relation.category_type.name : '-')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
@ -2461,8 +2411,9 @@ export default {
|
|
|
|
|
'filter[0][key]': 'material_infos_plan_id',
|
|
|
|
|
'filter[0][op]': 'eq',
|
|
|
|
|
'filter[0][value]': targetPlanId,
|
|
|
|
|
'export_fields[inventory.wuzibianma_material_infos_wuzibianma_relation.material_info_type]': '分类',
|
|
|
|
|
'export_fields[inventory.wuzibianma_material_infos_wuzibianma_relation.fenlei_detail.name]': '所属种类',
|
|
|
|
|
'export_fields[inventory.wuzibianma_material_infos_wuzibianma_relation.first_level_category.name]': '一级分类',
|
|
|
|
|
'export_fields[inventory.wuzibianma_material_infos_wuzibianma_relation.second_level_category.name]': '二级分类',
|
|
|
|
|
'export_fields[inventory.wuzibianma_material_infos_wuzibianma_relation.category_type.name]': '所属种类',
|
|
|
|
|
'export_fields[inventory.zichanmingcheng]': '物资名称',
|
|
|
|
|
'export_fields[inventory.rukupici]': '入库批次',
|
|
|
|
|
'export_fields[inventory.shunxuhao]': '顺序号',
|
|
|
|
|
|