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

feat: 操作日志-采购

parent bc885812
......@@ -163,8 +163,77 @@ export const columns_outer_5 = [
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);
// 营销外部
......@@ -265,8 +334,96 @@ export const columns_inner_5 = [
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);
// 营销内部
......
......@@ -6,6 +6,7 @@ import { StandardTable } from 'god';
import { getProductCommodityGetCommodityCheckRecordList } from '@/services/ProductV2Api'
import { getTransactionGetInquiryExternalRecordList, getTransactionGetInquiryInteriorRecordList } from '@/services/TransactionV2Api'
import { getPurchasePurchaseInquiryGetInquiryExternalRecordList, getPurchasePurchaseInquiryGetInquiryInteriorRecordList, getPurchaseTenderOutCheckRecordGetInviteTenderOutCheckRecordList, getPurchaseInviteTenderInCheckRecordGetInviteTenderInCheckRecordList } from '@/services/PurchaseV2Api'
import Search from '@/components/NiceForm/components/Search';
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix';
......@@ -42,7 +43,7 @@ const dataMap_4 = [
const dataMap_6 = [
{ value: 1, label: '采购询价' },
{ value: 2, label: '招投标' },
{ value: 3, label: '采购竞价' },
// { value: 3, label: '采购竞价' },
]
const dataMap_8 = [
......@@ -66,12 +67,34 @@ const OperationLog: React.FC = () => {
const ref = useRef<any>({});
const _schema = useMemo(() => {
return tableSchemas[`schema_${typeState}`];
}, [typeState]);
switch (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(() => {
return tableColumns[`columns_${statusState === 1 ? 'outer' : 'inner'}_${typeState}`];
}, [typeState, statusState]);
switch (typeState) {
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(() => {
let _type = '';
......@@ -81,14 +104,27 @@ const OperationLog: React.FC = () => {
case 3: _type = 'commodityId'; break;
case 4: _type = 'memberId'; 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 8: _type = 'id'; break;
default:
break;
}
return _type;
}, [typeState])
}, [typeState, extraState])
const setExtraStateFunc = (type) => {
batchedUpdates(() => {
setStatusState(1);
setExtraState(type);
});
}
const _extraDom = useMemo(() => {
switch (typeState) {
......@@ -102,7 +138,7 @@ const OperationLog: React.FC = () => {
<ButtonRadio
data={_data}
actValue={extraState}
onTab={setExtraState}
onTab={setExtraStateFunc}
/>
</div>
)
......@@ -136,11 +172,25 @@ const OperationLog: React.FC = () => {
case 5:
if (statusState === 1) {
_fetch = getTransactionGetInquiryExternalRecordList
}else {
} else {
_fetch = getTransactionGetInquiryInteriorRecordList
}
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 8: break;
......
......@@ -290,68 +290,58 @@ export const schema_5: ISchema = {
};
// 采购
export const schema_6: ISchema = {
type: 'object',
properties: {
megaLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
no: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
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,
export const schema_6 = searchName => {
return {
type: 'object',
properties: {
megaLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
[searchName]: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '搜索',
align: 'flex-left',
},
},
properties: {
type: {
type: 'string',
enum: [
{ label: '所有', value: 0 },
{ label: '采购询价', value: 1 },
{ label: '招投标', value: 2 },
{ label: '采购竞价', value: 3 },
],
'x-component-props': {
placeholder: '请选择询源类型',
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
justifyContent: 'flex-start',
},
},
'[startTime,endTime]': {
type: 'array',
'x-component': 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间', '结束时间'],
allowClear: true,
colStyle: {
marginRight: 20,
},
},
sumbit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
properties: {
'[startTime,endTime]': {
type: 'array',
'x-component': 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间', '结束时间'],
allowClear: true,
},
},
'x-component-props': {
children: '查询',
sumbit: {
'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