Commit 93c23566 authored by 卢均锐's avatar 卢均锐

feat: 操作日志-采购

parent bc885812
...@@ -163,8 +163,77 @@ export const columns_outer_5 = [ ...@@ -163,8 +163,77 @@ export const columns_outer_5 = [
key: 'auditOpinion' key: 'auditOpinion'
}, },
]; ];
// 采购外部 // 采购-采购询价外部
export const columns_outer_6 = columns_base_6.concat(base_columns_outer); export const columns_outer_6_1 = [
{
title: '单号',
dataIndex: 'purchaseInquiryId',
key: 'purchaseInquiryId'
},
{
title: '操作角色',
dataIndex: 'roleName',
key: 'roleName'
},
{
title: '状态',
dataIndex: 'state',
key: 'state',
render: (text, record) => <StatusTag title={record.stateName || state_external_5[text].text} type={state_external_5[text].type} />
},
{
title: '操作',
dataIndex: 'operation',
key: 'operation',
},
{
title: '操作时间',
dataIndex: 'createTime',
key: 'createTime',
render: (text) => formatTimeString(text, 'YYYY-MM-DD HH:mm')
},
{
title: '备注',
dataIndex: 'auditOpinion',
key: 'auditOpinion'
},
];
// 采购-招投标外部
export const columns_outer_6_2 = [
{
title: '单号',
dataIndex: 'inviteTenderId',
key: 'inviteTenderId'
},
{
title: '操作角色',
dataIndex: 'memberRoleName',
key: 'memberRoleName'
},
{
title: '状态',
dataIndex: 'statusValue',
key: 'statusValue',
render: (text, record) => <StatusTag title={text} type={'default'} />
},
{
title: '操作',
dataIndex: 'operationValue',
key: 'operationValue',
},
{
title: '操作时间',
dataIndex: 'createTime',
key: 'createTime',
render: (text) => formatTimeString(text, 'YYYY-MM-DD HH:mm')
},
{
title: '备注',
dataIndex: 'checkRemark',
key: 'checkRemark'
},
];
// 合同外部 // 合同外部
export const columns_outer_7 = columns_base_7.concat(base_columns_outer); export const columns_outer_7 = columns_base_7.concat(base_columns_outer);
// 营销外部 // 营销外部
...@@ -265,8 +334,96 @@ export const columns_inner_5 = [ ...@@ -265,8 +334,96 @@ export const columns_inner_5 = [
key: 'auditOpinion' key: 'auditOpinion'
}, },
]; ];
// 采购内部 // 采购-采购询价内部
export const columns_inner_6 = columns_base_6.concat(base_columns_inner); export const columns_inner_6_1 = [
{
title: '单号',
dataIndex: 'purchaseInquiryId',
key: 'purchaseInquiryId'
},
{
title: '操作角色',
dataIndex: 'roleName',
key: 'roleName'
},
{
title: '部门',
dataIndex: 'department',
key: 'department'
},
{
title: '职位',
dataIndex: 'position',
key: 'position'
},
{
title: '状态',
dataIndex: 'state',
key: 'state',
render: (text, record) => <StatusTag title={record.stateName || state_interior_5[text].text} type={state_interior_5[text].type} />
},
{
title: '操作',
dataIndex: 'operation',
key: 'operation'
},
{
title: '操作时间',
dataIndex: 'createTime',
key: 'createTime',
render: (text) => formatTimeString(text, 'YYYY-MM-DD HH:mm')
},
{
title: '备注',
dataIndex: 'auditOpinion',
key: 'auditOpinion'
},
];
// 采购-采购询价内部
export const columns_inner_6_2 = [
{
title: '单号',
dataIndex: 'inviteTenderId',
key: 'inviteTenderId'
},
{
title: '操作角色',
dataIndex: 'userName',
key: 'userName'
},
{
title: '部门',
dataIndex: 'userOrgName',
key: 'userOrgName'
},
{
title: '职位',
dataIndex: 'userJobTitle',
key: 'userJobTitle'
},
{
title: '状态',
dataIndex: 'statusValue',
key: 'statusValue',
render: (text, record) => <StatusTag title={text} type={'default'} />
},
{
title: '操作',
dataIndex: 'operationValue',
key: 'operationValue'
},
{
title: '操作时间',
dataIndex: 'createTime',
key: 'createTime',
render: (text) => formatTimeString(text, 'YYYY-MM-DD HH:mm')
},
{
title: '备注',
dataIndex: 'checkRemark',
key: 'checkRemark'
},
];
// 合同内部 // 合同内部
export const columns_inner_7 = columns_base_7.concat(base_columns_inner); export const columns_inner_7 = columns_base_7.concat(base_columns_inner);
// 营销内部 // 营销内部
......
...@@ -6,6 +6,7 @@ import { StandardTable } from 'god'; ...@@ -6,6 +6,7 @@ import { StandardTable } from 'god';
import { getProductCommodityGetCommodityCheckRecordList } from '@/services/ProductV2Api' import { getProductCommodityGetCommodityCheckRecordList } from '@/services/ProductV2Api'
import { getTransactionGetInquiryExternalRecordList, getTransactionGetInquiryInteriorRecordList } from '@/services/TransactionV2Api' import { getTransactionGetInquiryExternalRecordList, getTransactionGetInquiryInteriorRecordList } from '@/services/TransactionV2Api'
import { getPurchasePurchaseInquiryGetInquiryExternalRecordList, getPurchasePurchaseInquiryGetInquiryInteriorRecordList, getPurchaseTenderOutCheckRecordGetInviteTenderOutCheckRecordList, getPurchaseInviteTenderInCheckRecordGetInviteTenderInCheckRecordList } from '@/services/PurchaseV2Api'
import Search from '@/components/NiceForm/components/Search'; import Search from '@/components/NiceForm/components/Search';
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'; import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix';
...@@ -42,7 +43,7 @@ const dataMap_4 = [ ...@@ -42,7 +43,7 @@ const dataMap_4 = [
const dataMap_6 = [ const dataMap_6 = [
{ value: 1, label: '采购询价' }, { value: 1, label: '采购询价' },
{ value: 2, label: '招投标' }, { value: 2, label: '招投标' },
{ value: 3, label: '采购竞价' }, // { value: 3, label: '采购竞价' },
] ]
const dataMap_8 = [ const dataMap_8 = [
...@@ -66,12 +67,34 @@ const OperationLog: React.FC = () => { ...@@ -66,12 +67,34 @@ const OperationLog: React.FC = () => {
const ref = useRef<any>({}); const ref = useRef<any>({});
const _schema = useMemo(() => { const _schema = useMemo(() => {
return tableSchemas[`schema_${typeState}`]; switch (typeState) {
}, [typeState]); case 1:
case 3:
case 5:
case 6:
return tableSchemas[`schema_${typeState}`];
case 6:
if (extraState === 1) {
return tableSchemas[`schema_${typeState}`]('purchaseInquiryId');
} else if (extraState === 2) {
return tableSchemas[`schema_${typeState}`]('inviteTenderId');
}
default:
break;
}
}, [typeState, extraState]);
const _columns = useMemo(() => { const _columns = useMemo(() => {
return tableColumns[`columns_${statusState === 1 ? 'outer' : 'inner'}_${typeState}`]; switch (typeState) {
}, [typeState, statusState]); case 1:
case 3:
case 4:
case 5:
return tableColumns[`columns_${statusState === 1 ? 'outer' : 'inner'}_${typeState}`];
default:
return tableColumns[`columns_${statusState === 1 ? 'outer' : 'inner'}_${typeState}_${extraState}`]
}
}, [typeState, statusState, extraState]);
const _actionKey = useMemo(() => { const _actionKey = useMemo(() => {
let _type = ''; let _type = '';
...@@ -81,14 +104,27 @@ const OperationLog: React.FC = () => { ...@@ -81,14 +104,27 @@ const OperationLog: React.FC = () => {
case 3: _type = 'commodityId'; break; case 3: _type = 'commodityId'; break;
case 4: _type = 'memberId'; break; case 4: _type = 'memberId'; break;
case 5: _type = 'inquiryListId'; break; case 5: _type = 'inquiryListId'; break;
case 6: _type = 'no'; break; case 6:
if (extraState === 1) {
_type = 'purchaseInquiryId';
} else if (extraState === 2) {
_type = 'inviteTenderId';
}
break;
case 7: _type = 'contractNo'; break; case 7: _type = 'contractNo'; break;
case 8: _type = 'id'; break; case 8: _type = 'id'; break;
default: default:
break; break;
} }
return _type; return _type;
}, [typeState]) }, [typeState, extraState])
const setExtraStateFunc = (type) => {
batchedUpdates(() => {
setStatusState(1);
setExtraState(type);
});
}
const _extraDom = useMemo(() => { const _extraDom = useMemo(() => {
switch (typeState) { switch (typeState) {
...@@ -102,7 +138,7 @@ const OperationLog: React.FC = () => { ...@@ -102,7 +138,7 @@ const OperationLog: React.FC = () => {
<ButtonRadio <ButtonRadio
data={_data} data={_data}
actValue={extraState} actValue={extraState}
onTab={setExtraState} onTab={setExtraStateFunc}
/> />
</div> </div>
) )
...@@ -136,11 +172,25 @@ const OperationLog: React.FC = () => { ...@@ -136,11 +172,25 @@ const OperationLog: React.FC = () => {
case 5: case 5:
if (statusState === 1) { if (statusState === 1) {
_fetch = getTransactionGetInquiryExternalRecordList _fetch = getTransactionGetInquiryExternalRecordList
}else { } else {
_fetch = getTransactionGetInquiryInteriorRecordList _fetch = getTransactionGetInquiryInteriorRecordList
} }
break; break;
case 6: break; case 6:
if (extraState === 1) {
if (statusState === 1) {
_fetch = getPurchasePurchaseInquiryGetInquiryExternalRecordList
} else {
_fetch = getPurchasePurchaseInquiryGetInquiryInteriorRecordList
}
} else if (extraState === 2) {
if (statusState === 1) {
_fetch = getPurchaseTenderOutCheckRecordGetInviteTenderOutCheckRecordList
} else {
_fetch = getPurchaseInviteTenderInCheckRecordGetInviteTenderInCheckRecordList
}
}
break;
case 7: break; case 7: break;
case 8: break; case 8: break;
......
...@@ -290,68 +290,58 @@ export const schema_5: ISchema = { ...@@ -290,68 +290,58 @@ export const schema_5: ISchema = {
}; };
// 采购 // 采购
export const schema_6: ISchema = { export const schema_6 = searchName => {
type: 'object', return {
properties: { type: 'object',
megaLayout: { properties: {
type: 'object', megaLayout: {
'x-component': 'mega-layout', type: 'object',
properties: { 'x-component': 'mega-layout',
no: { properties: {
type: 'string', [searchName]: {
'x-component': 'ModalSearch', type: 'string',
'x-component-props': { 'x-component': 'ModalSearch',
placeholder: '搜索', 'x-component-props': {
align: 'flex-left', placeholder: '搜索',
}, align: 'flex-left',
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
justifyContent: 'flex-start',
},
colStyle: {
marginRight: 20,
}, },
}, },
properties: { [FORM_FILTER_PATH]: {
type: { type: 'object',
type: 'string', 'x-component': 'flex-layout',
enum: [ 'x-component-props': {
{ label: '所有', value: 0 }, rowStyle: {
{ label: '采购询价', value: 1 }, flexWrap: 'nowrap',
{ label: '招投标', value: 2 }, justifyContent: 'flex-start',
{ label: '采购竞价', value: 3 },
],
'x-component-props': {
placeholder: '请选择询源类型',
}, },
}, colStyle: {
'[startTime,endTime]': { marginRight: 20,
type: 'array',
'x-component': 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间', '结束时间'],
allowClear: true,
}, },
}, },
sumbit: { properties: {
'x-component': 'Submit', '[startTime,endTime]': {
'x-mega-props': { type: 'array',
span: 1, 'x-component': 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间', '结束时间'],
allowClear: true,
},
}, },
'x-component-props': { sumbit: {
children: '查询', 'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
}, },
}, },
}, },
}, },
}, },
}, },
}, };
}; };
// 合同 // 合同
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment