提交 ab8f1149 authored 作者: 钟是志's avatar 钟是志

34123 工作情况考核审核---已处理页面,审核状态搜索不生效

上级 2eb68066
...@@ -14,7 +14,6 @@ class AuditPage extends Component { ...@@ -14,7 +14,6 @@ class AuditPage extends Component {
this.state = {}; this.state = {};
} }
// componentDidMount() { // componentDidMount() {
// console.log(this.context); // console.log(this.context);
// } // }
...@@ -83,13 +82,23 @@ class AuditPage extends Component { ...@@ -83,13 +82,23 @@ class AuditPage extends Component {
console.log(data); console.log(data);
let searcherKeyValue = {}; let searcherKeyValue = {};
for (let item of searchCondition) { for (let item of searchCondition) {
if (typeof data[item.key] !== 'undefined' && item.key !== 'taskDefKey') { if (
typeof data[item.key] !== 'undefined' &&
item.key !== 'taskDefKey' &&
item.key !== 'process_status'
) {
searcherKeyValue[item.base52] = data[item.key]; searcherKeyValue[item.base52] = data[item.key];
} }
} }
if (searcherKeyValue && Object.keys(searcherKeyValue).length) { if (searcherKeyValue && Object.keys(searcherKeyValue).length) {
data.searcherKeyValue = JSON.stringify(searcherKeyValue); data.searcherKeyValue = JSON.stringify(searcherKeyValue);
} }
if (data.process_status) {
data.formStatusId = data.process_status;
delete data.process_status;
}
return data; return data;
}, },
responseCallBack: (response) => { responseCallBack: (response) => {
...@@ -127,13 +136,20 @@ class AuditPage extends Component { ...@@ -127,13 +136,20 @@ class AuditPage extends Component {
let searcherKeyValue = {}; let searcherKeyValue = {};
console.log(data); console.log(data);
for (let item of searchCondition) { for (let item of searchCondition) {
if (typeof data[item.key] !== 'undefined' && item.key !== 'taskDefKey') { if (typeof data[item.key] !== 'undefined'
&& item.key !== 'taskDefKey'
&& item.key !== 'process_status'
) {
searcherKeyValue[item.base52] = data[item.key]; searcherKeyValue[item.base52] = data[item.key];
} }
} }
if (searcherKeyValue && Object.keys(searcherKeyValue).length) { if (searcherKeyValue && Object.keys(searcherKeyValue).length) {
data.searcherKeyValue = JSON.stringify(searcherKeyValue); data.searcherKeyValue = JSON.stringify(searcherKeyValue);
} }
if (data.process_status) {
data.formStatusId = data.process_status;
delete data.process_status;
}
return data; return data;
}, },
condition: searchCondition.filter((g) => { condition: searchCondition.filter((g) => {
...@@ -155,7 +171,6 @@ class AuditPage extends Component { ...@@ -155,7 +171,6 @@ class AuditPage extends Component {
}, },
tableRowKey: 'id', tableRowKey: 'id',
columns, columns,
}; };
return { return {
tab1, tab1,
...@@ -184,5 +199,4 @@ class AuditPage extends Component { ...@@ -184,5 +199,4 @@ class AuditPage extends Component {
AuditPage.contextType = CreateC; AuditPage.contextType = CreateC;
export default AuditPage; export default AuditPage;
...@@ -34,6 +34,41 @@ const text = [ ...@@ -34,6 +34,41 @@ const text = [
'VARCHAR', 'VARCHAR',
]; ];
const optionsStatus = [
{
label: '未提交',
value: 'un_audit',
},
{
label: '审核中',
value: 'in_audit',
},
{
label: '已审核',
value: 'audited',
},
// { label: '已拒绝', value: 'refuse' },
{
label: '已失效',
value: 'invalid',
},
// { label: '已挂起', value: 'hang_up' },
{
label: '已终止',
value: 'termination',
},
// { label: '已驳回', value: 'reject' },
// { label: '已同意', value: 'agree' },
{
label: '重新提交',
value: 're_apply',
},
{
label: '己拒绝',
value: 'bad_audited',
},
];
const number = ['BIGINT', 'DOUBLE', 'FLOAT', 'INT', 'INTEGER', 'NUMERIC', 'SMALLINT', 'TINYINT']; const number = ['BIGINT', 'DOUBLE', 'FLOAT', 'INT', 'INTEGER', 'NUMERIC', 'SMALLINT', 'TINYINT'];
const date = ['DATE', 'DATETIME', 'TIME', 'TIMESTAMP', 'YEAR']; const date = ['DATE', 'DATETIME', 'TIME', 'TIMESTAMP', 'YEAR'];
...@@ -171,64 +206,77 @@ const getSearchCondition = async (id, appId = undefined) => { ...@@ -171,64 +206,77 @@ const getSearchCondition = async (id, appId = undefined) => {
return res.filter((x) => { return res.filter((x) => {
return x.isShowQuery !== false && x.isHidden === false; return x.isShowQuery !== false && x.isHidden === false;
}); });
}else{ } else {
return []; return [];
} }
}); });
// console.log(JSON.stringify(searchHeaders)); // console.log(JSON.stringify(searchHeaders));
for (let item of searchHeaders) { // H:\project\one_stop_front\src\pages\AdminSystem\pages\ddl\formList\index.js for (let item of searchHeaders) {
if(item.referenceObjId && item.id && item.referenceCodeName && item.referenceNameName){ //通过引用去查枚举 // H:\project\one_stop_front\src\pages\AdminSystem\pages\ddl\formList\index.js
if (item.referenceObjId && item.id && item.referenceCodeName && item.referenceNameName) {
//通过引用去查枚举
item.options = await service.getBatchOptions(item.id).then((res) => { item.options = await service.getBatchOptions(item.id).then((res) => {
if(res && res[item.id]){ if (res && res[item.id]) {
return res[item.id].filter((g) => { return res[item.id]
.filter((g) => {
return !!g.name && !!g.row_id; return !!g.name && !!g.row_id;
}).map((y) => { })
.map((y) => {
return { return {
key: y[item.referenceCodeName], key: y[item.referenceCodeName],
name: y[item.referenceNameName], name: y[item.referenceNameName],
}; };
}); });
}else { } else {
return []; return [];
} }
}); });
} }
if (item.isGroupQuery && item.id && (!item.options || !item.options.length)) { if (item.isGroupQuery && item.id && (!item.options || !item.options.length)) {
// 获取下拉搜索条件的枚举项 // 获取下拉搜索条件的枚举项
if(item.name === 'process_status'){ if (item.name === 'process_status') {
/** /**
* 29890 活动发布管理/活动申报审核/通知活动审核,“活动名称”没有显示;筛选输入有误(103123,bdk@2022*$) * 29890 活动发布管理/活动申报审核/通知活动审核,“活动名称”没有显示;筛选输入有误(103123,bdk@2022*$)
* 2022年9月26日 * 2022年9月26日
* 钟是志
* 可能需要修改 流程审核状态的枚举 * 可能需要修改 流程审核状态的枚举
*
* 2023-04-17 和雅职2.0的枚举 保持一致!!
* 解决禅道 34123
* */ * */
item.options = [ // item.name = 'formStatusId';
{ item.options = optionsStatus.map((x) => {
key: '0', return {
name: '已通过', key: x.value,
}, name: x.label,
{ };
key: '1', });
name: '已拒绝', // item.options = [
}, // {
{ // key: '0',
key: '2', // name: '已通过',
name: '已驳回', // },
}, // {
{ // key: '1',
key: '-1', // name: '已拒绝',
name: '审核中', // },
}, // {
]; // key: '2',
}else{ // name: '已驳回',
item.options = await service.getGroupList({ // },
// {
// key: '-1',
// name: '审核中',
// },
// ];
} else {
item.options = await service
.getGroupList({
columnId: item.id, columnId: item.id,
appId, appId,
}).then((res) => { })
.then((res) => {
if (res && Array.isArray(res)) { if (res && Array.isArray(res)) {
return res return res
.filter((x) => { .filter((x) => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论