Browse Source

2026-10-12

项目信息:主信息列表内容调整;
master
fengyuan_yang 4 weeks ago
parent
commit
6b350c8d7a
  1. 251
      src/views/modules/project/projectInfo/projectInfo.vue

251
src/views/modules/project/projectInfo/projectInfo.vue

@ -551,92 +551,111 @@
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table1ProjectType',
serialNumber: '101002001Table1ProjectName',
tableId: "101002001Table1",
tableName: "项目信息主表",
columnProp: "projectType",
columnProp: "projectName",
headerAlign: "center",
align: "center",
columnLabel: "项目类型",
align: "left",
columnLabel: "项目名称",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
columnWidth: 200
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table1ProjectName',
serialNumber: '101002001Table1IndustryDesc',
tableId: "101002001Table1",
tableName: "项目信息主表",
columnProp: "projectName",
columnProp: "industryDesc",
headerAlign: "center",
align: "left",
columnLabel: "项目名称",
columnLabel: "行业",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 200
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table1Status',
serialNumber: '101002001Table1CustomerName',
tableId: "101002001Table1",
tableName: "项目信息主表",
columnProp: "status",
columnProp: "customerName",
headerAlign: "center",
align: "center",
columnLabel: "单据状态",
align: "left",
columnLabel: "客户名称",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
columnWidth: 150
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table1NodeName',
serialNumber: '101002001Table1ProjectAmount',
tableId: "101002001Table1",
tableName: "项目信息主表",
columnProp: "nodeName",
columnProp: "projectAmount",
headerAlign: "center",
align: "right",
columnLabel: "项目年销售额CNY(K)",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 170
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table1ProductCategory',
tableId: "101002001Table1",
tableName: "项目信息主表",
columnProp: "productCategory",
headerAlign: "center",
align: "left",
columnLabel: "当前节点",
columnLabel: "产品类别",
columnHidden: false,
columnImage: false,
columnSortable: false,
showOverflowTooltip: true,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
columnWidth: 180
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table1CurrentApprover',
serialNumber: '101002001Table1ProjectManagerName',
tableId: "101002001Table1",
tableName: "项目信息主表",
columnProp: "currentApprover",
columnProp: "projectManagerName",
headerAlign: "center",
align: "left",
columnLabel: "当前节点审批人",
columnLabel: "项目经理",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
columnWidth: 120
},
{
userId: this.$store.state.user.name,
@ -659,39 +678,92 @@
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table1ProjectAmount',
serialNumber: '101002001Table1Status',
tableId: "101002001Table1",
tableName: "项目信息主表",
columnProp: "projectAmount",
columnProp: "status",
headerAlign: "center",
align: "right",
columnLabel: "项目年销售额CNY(K)",
align: "center",
columnLabel: "单据状态",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 170
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table1ProductCategory',
serialNumber: '101002001Table1NodeName',
tableId: "101002001Table1",
tableName: "项目信息主表",
columnProp: "productCategory",
columnProp: "nodeName",
headerAlign: "center",
align: "left",
columnLabel: "产品类别",
columnLabel: "当前节点",
columnHidden: false,
columnImage: false,
columnSortable: false,
showOverflowTooltip: true,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 180
columnWidth: 140
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table1CurrentApprover',
tableId: "101002001Table1",
tableName: "项目信息主表",
columnProp: "currentApprover",
headerAlign: "center",
align: "left",
columnLabel: "当前节点审批人",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table1FinalCustomerId',
tableId: "101002001Table1",
tableName: "项目信息主表",
columnProp: "finalCustomerId",
headerAlign: "center",
align: "left",
columnLabel: "直接客户",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table1ProjectType',
tableId: "101002001Table1",
tableName: "项目信息主表",
columnProp: "projectType",
headerAlign: "center",
align: "center",
columnLabel: "项目类型",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
@ -768,20 +840,40 @@
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table1CustomerName',
serialNumber: '101002001Table1ProjectDesc',
tableId: "101002001Table1",
tableName: "项目信息主表",
columnProp: "customerName",
columnProp: "projectDesc",
headerAlign: "center",
align: "left",
columnLabel: "客户名称",
columnLabel: "客户产品",
columnHidden: false,
columnImage: false,
columnSortable: false,
showOverflowTooltip: true,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150
columnWidth: 180
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table1CustomerRemark',
tableId: "101002001Table1",
tableName: "项目信息主表",
columnProp: "customerRemark",
headerAlign: "center",
align: "left",
columnLabel: "客户产品应用",
columnHidden: false,
columnImage: false,
columnSortable: false,
showOverflowTooltip: true,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 180
},
{
userId: this.$store.state.user.name,
@ -2148,39 +2240,37 @@
},
checkField(){
this.ensureProjectListColumns()
if(!this.accessField('10202001')){
this.columnList1=this.columnList1.filter(item => item.columnProp !== 'customerId');
this.columnList1=this.columnList1.filter(item => item.columnProp !== 'customerName');
}
if(!this.accessField('10202002')){
this.columnList1=this.columnList1.filter(item => item.columnProp !== 'projectSource');
this.columnList1=this.columnList1.filter(item => item.columnProp !== 'projectSourceDesc');
}
this.ensureProjectListColumns()
},
ensureProjectListColumns () {
const columns = Array.isArray(this.columnList1) ? this.columnList1.slice() : []
const extras = [
{
columnProp: 'projectAmount',
columnLabel: '项目年销售额CNY(K)',
align: 'right',
columnWidth: 170,
serialNumber: '101002001Table1ProjectAmount'
},
{
columnProp: 'productCategory',
columnLabel: '产品类别',
align: 'left',
columnWidth: 180,
serialNumber: '101002001Table1ProductCategory'
}
{ columnProp: 'industryDesc', columnLabel: '行业', align: 'left', columnWidth: 120, serialNumber: '101002001Table1IndustryDesc' },
{ columnProp: 'projectManagerName', columnLabel: '项目经理', align: 'left', columnWidth: 120, serialNumber: '101002001Table1ProjectManagerName' },
{ columnProp: 'finalCustomerId', columnLabel: '直接客户', align: 'left', columnWidth: 120, serialNumber: '101002001Table1FinalCustomerId' },
{ columnProp: 'projectDesc', columnLabel: '客户产品', align: 'left', columnWidth: 180, serialNumber: '101002001Table1ProjectDesc', showOverflowTooltip: true },
{ columnProp: 'customerRemark', columnLabel: '客户产品应用', align: 'left', columnWidth: 180, serialNumber: '101002001Table1CustomerRemark', showOverflowTooltip: true },
{ columnProp: 'projectAmount', columnLabel: '项目年销售额CNY(K)', align: 'right', columnWidth: 170, serialNumber: '101002001Table1ProjectAmount' },
{ columnProp: 'productCategory', columnLabel: '产品类别', align: 'left', columnWidth: 180, serialNumber: '101002001Table1ProductCategory', showOverflowTooltip: true }
]
let anchor = columns.findIndex(item => item.columnProp === 'customerProjectNo')
extras.forEach(extra => {
if (columns.some(item => item.columnProp === extra.columnProp)) {
const existing = columns.find(item => item.columnProp === extra.columnProp)
if (existing) {
existing.columnLabel = extra.columnLabel
if (extra.showOverflowTooltip) {
existing.showOverflowTooltip = true
}
return
}
const column = {
columns.push({
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: extra.serialNumber,
@ -2193,15 +2283,60 @@
columnHidden: false,
columnImage: false,
columnSortable: false,
showOverflowTooltip: extra.columnProp === 'productCategory',
showOverflowTooltip: extra.showOverflowTooltip || false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: extra.columnWidth
})
})
const labelMap = {
projectDesc: '客户产品',
customerRemark: '客户产品应用'
}
columns.forEach(item => {
if (labelMap[item.columnProp]) {
item.columnLabel = labelMap[item.columnProp]
}
})
const order = [
'projectId',
'projectName',
'industryDesc',
'customerName',
'projectAmount',
'productCategory',
'projectManagerName',
'customerProjectNo',
'status',
'nodeName',
'currentApprover',
'finalCustomerId',
'projectType',
'priorityDesc',
'projectOwnerName',
'projectSourceDesc',
'customerId',
'projectDesc',
'customerRemark',
'createDate',
'createBy',
'updateDate',
'updateBy'
]
columns.sort((a, b) => {
const ia = order.indexOf(a.columnProp)
const ib = order.indexOf(b.columnProp)
if (ia === -1 && ib === -1) {
return 0
}
if (ia === -1) {
return 1
}
if (ib === -1) {
return -1
}
const insertAt = anchor >= 0 ? anchor + 1 : columns.length
columns.splice(insertAt, 0, column)
anchor = insertAt
return ia - ib
})
this.columnList1 = columns
},

Loading…
Cancel
Save