Browse Source

获取表单 项目名称

dev
巴林闲侠 2 years ago
parent
commit
bab113b5e3
  1. 31
      web/client/src/sections/workOrder/containers/aboutMe.jsx
  2. 29
      web/client/src/sections/workOrder/containers/initiated.jsx
  3. 29
      web/client/src/sections/workOrder/containers/receipt.jsx
  4. 31
      web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx
  5. 5
      web/client/src/utils/parseProcessData.js

31
web/client/src/sections/workOrder/containers/aboutMe.jsx

@ -74,19 +74,28 @@ const Rest = (props) => {
render: (text, record, index) => {
return record?.pomsNeedData?.title?.value || ''
}
}, {
title: '关联项目',
},
// {
// title: '',
// dataIndex: 'pomsProject',
// render: (text, record, index) => {
// const pomsProjectId = record?.pomsNeedData?.pomsProjectId?.value
// if (pomsProjectId) {
// const corProject = pomsProjectBasicAll.find(p => p.value == pomsProjectId)
// return corProject?.label || ''
// } else {
// return ''
// }
// }
// },
{
title: '项目名称',
dataIndex: 'pomsProject',
render: (text, record, index) => {
const pomsProjectId = record?.pomsNeedData?.pomsProjectId?.value
if (pomsProjectId) {
const corProject = pomsProjectBasicAll.find(p => p.value == pomsProjectId)
return corProject?.label || ''
} else {
return ''
}
return record?.pomsNeedData?.projectName?.value || ''
}
}, {
},
{
title: '申请人',
dataIndex: 'applyerName',
}, {
@ -132,7 +141,7 @@ const Rest = (props) => {
layout="horizontal"
style={{ position: "relative", width: "100%", flex: 1 }}
onSubmit={(values) => {
if (values?.applyTimes?.length) {
if (values?.applyTimes?.length) {
values.applyTimes = [moment(values?.applyTimes[0]).format('YYYY-MM-DD HH:mm:ss'), moment(values?.applyTimes[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss')]
}
backlogData({ ...values, limit: 10, page: 0 })

29
web/client/src/sections/workOrder/containers/initiated.jsx

@ -66,19 +66,28 @@ const Rest = (props) => {
render: (text, record, index) => {
return record?.pomsNeedData?.title?.value || ''
}
}, {
title: '关联项目',
},
// {
// title: '',
// dataIndex: 'pomsProject',
// render: (text, record, index) => {
// const pomsProjectId = record?.pomsNeedData?.pomsProjectId?.value
// if (pomsProjectId) {
// const corProject = pomsProjectBasicAll.find(p => p.value == pomsProjectId)
// return corProject?.label || ''
// } else {
// return ''
// }
// }
// },
{
title: '项目名称',
dataIndex: 'pomsProject',
render: (text, record, index) => {
const pomsProjectId = record?.pomsNeedData?.pomsProjectId?.value
if (pomsProjectId) {
const corProject = pomsProjectBasicAll.find(p => p.value == pomsProjectId)
return corProject?.label || ''
} else {
return ''
}
return record?.pomsNeedData?.projectName?.value || ''
}
}, {
},
{
title: '申请人',
dataIndex: 'applyerName',
}, {

29
web/client/src/sections/workOrder/containers/receipt.jsx

@ -77,19 +77,28 @@ const Rest = (props) => {
render: (text, record, index) => {
return record?.pomsNeedData?.title?.value || ''
}
}, {
title: '关联项目',
},
// {
// title: '',
// dataIndex: 'pomsProject',
// render: (text, record, index) => {
// const pomsProjectId = record?.pomsNeedData?.pomsProjectId?.value
// if (pomsProjectId) {
// const corProject = pomsProjectBasicAll.find(p => p.value == pomsProjectId)
// return corProject?.label || ''
// } else {
// return ''
// }
// }
// },
{
title: '项目名称',
dataIndex: 'pomsProject',
render: (text, record, index) => {
const pomsProjectId = record?.pomsNeedData?.pomsProjectId?.value
if (pomsProjectId) {
const corProject = pomsProjectBasicAll.find(p => p.value == pomsProjectId)
return corProject?.label || ''
} else {
return ''
}
return record?.pomsNeedData?.projectName?.value || ''
}
}, {
},
{
title: '申请人',
dataIndex: 'application',
}, {

31
web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx

@ -65,19 +65,28 @@ const Rest = (props) => {
render: (text, record, index) => {
return record?.pomsNeedData?.title?.value || ''
}
}, {
title: '关联项目',
},
// {
// title: '',
// dataIndex: 'pomsProject',
// render: (text, record, index) => {
// const pomsProjectId = record?.pomsNeedData?.pomsProjectId?.value
// if (pomsProjectId) {
// const corProject = pomsProjectBasicAll.find(p => p.value == pomsProjectId)
// return corProject?.label || ''
// } else {
// return ''
// }
// }
// },
{
title: '项目名称',
dataIndex: 'pomsProject',
render: (text, record, index) => {
const pomsProjectId = record?.pomsNeedData?.pomsProjectId?.value
if (pomsProjectId) {
const corProject = pomsProjectBasicAll.find(p => p.value == pomsProjectId)
return corProject?.label || ''
} else {
return ''
}
return record?.pomsNeedData?.projectName?.value || ''
}
}, {
},
{
title: '申请人',
dataIndex: 'applyerName',
}, {
@ -117,7 +126,7 @@ const Rest = (props) => {
layout="horizontal"
style={{ position: "relative", width: "100%", flex: 1 }}
onSubmit={(values) => {
if (values?.applyTimes?.length) {
if (values?.applyTimes?.length) {
values.applyTimes = [moment(values?.applyTimes[0]).format('YYYY-MM-DD HH:mm:ss'), moment(values?.applyTimes[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss')]
}
backlogData(values)

5
web/client/src/utils/parseProcessData.js

@ -43,7 +43,7 @@ const dataRecursionObj = (dataObj, index, needData, lastKeyObj, nd) => {
const keyObj = needData[nd].schemaPath[index]
if (dataObj.hasOwnProperty(keyObj.prKey)) {
if (lastKeyObj.prKey == keyObj.prKey) {
let gotValue = dataObj[keyObj.prKey]
let gotValue = dataObj[keyObj.prKey]
if (keyObj.enum && !needData[nd].fromDataSource) {
let vIndex = keyObj.enum.findIndex(ke => ke == gotValue)
gotValue = keyObj.enumNames[vIndex]
@ -89,6 +89,9 @@ export const parseProcessData = (applyDetail, pomsNeedData = {
keyWord: '关联项目',
fromDataSource: true
},
projectName: {
keyWord: '项目名称',
},
expectTime: {
keyWord: '期望完成时间'
}

Loading…
Cancel
Save