Commit a82d1d0f authored by 卢均锐's avatar 卢均锐

feat: 操作日志-售后

parent 403579e1
......@@ -89,7 +89,41 @@ const columns_base_8 = [{ title: '活动/劵ID', dataIndex: 'id', key: 'id' }, {
// 订单外部
export const columns_outer_1 = columns_base_1.concat(base_columns_outer);
// 售后外部
export const columns_outer_2 = columns_base_2.concat(base_columns_outer);
export const columns_outer_2 = [
{
title: '申请单号',
dataIndex: 'applyNo',
key: 'applyNo'
},
{
title: '操作角色',
dataIndex: 'roleName',
key: 'roleName'
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
render: (text) => <StatusTag title={status_3[text].text} type={status_3[text].type} />
},
{
title: '操作',
dataIndex: 'operate',
key: 'operate',
render: (text) => operation_3[text]
},
{
title: '操作时间',
dataIndex: 'operateTime',
key: 'operateTime',
render: (text) => formatTimeString(text, 'YYYY-MM-DD HH:mm')
},
{
title: '备注',
dataIndex: 'opinion',
key: 'opinion'
},
];
// 商品外部
export const columns_outer_3 = [
{
......@@ -243,7 +277,48 @@ export const columns_outer_8 = columns_base_8.concat(base_columns_outer);
// 订单内部
export const columns_inner_1 = columns_base_1.concat(base_columns_inner);
// 售后内部
export const columns_inner_2 = columns_base_2.concat(base_columns_inner);
export const columns_inner_2 = [
{
title: '申请单号',
dataIndex: 'applyNo',
key: 'applyNo'
},
{
title: '操作角色',
dataIndex: 'operator',
key: 'operator'
},
{
title: '部门',
dataIndex: 'department',
key: 'department'
},
{
title: '职位',
dataIndex: 'jobTitle',
key: 'jobTitle'
},
{
title: '状态',
dataIndex: 'status',
key: 'status'
},
{
title: '操作',
dataIndex: 'operate',
key: 'operate'
},
{
title: '操作时间',
dataIndex: 'operateTime',
key: 'operateTime'
},
{
title: '备注',
dataIndex: 'opinion',
key: 'opinion'
},
];
// 商品内部
export const columns_inner_3 = [
{
......
......@@ -7,6 +7,8 @@ import { StandardTable } from 'god';
import { getProductCommodityGetCommodityCheckRecordList } from '@/services/ProductV2Api'
import { getTransactionGetInquiryExternalRecordList, getTransactionGetInquiryInteriorRecordList } from '@/services/TransactionV2Api'
import { getPurchasePurchaseInquiryGetInquiryExternalRecordList, getPurchasePurchaseInquiryGetInquiryInteriorRecordList, getPurchaseTenderOutCheckRecordGetInviteTenderOutCheckRecordList, getPurchaseInviteTenderInCheckRecordGetInviteTenderInCheckRecordList } from '@/services/PurchaseV2Api'
import { getAsOperateLogOuterPage, getAsOperateLogInnerPage } from '@/services/AfterServiceV2Api'
import Search from '@/components/NiceForm/components/Search';
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix';
......@@ -30,8 +32,8 @@ const typeList = [
]
const dataMap_2 = [
{ value: 1, label: '退货' },
{ value: 2, label: '换货' },
{ value: 2, label: '退货' },
{ value: 1, label: '换货' },
{ value: 3, label: '维修' },
]
......@@ -69,6 +71,7 @@ const OperationLog: React.FC = () => {
const _schema = useMemo(() => {
switch (typeState) {
case 1:
case 2:
case 3:
case 5:
case 7:
......@@ -87,6 +90,7 @@ const OperationLog: React.FC = () => {
const _columns = useMemo(() => {
switch (typeState) {
case 1:
case 2:
case 3:
case 4:
case 5:
......@@ -150,7 +154,7 @@ const OperationLog: React.FC = () => {
useEffect(() => {
batchedUpdates(() => {
setStatusState(1);
setExtraState(1);
setExtraState(dataMap[typeState]?.[0].value || 1);
});
}, [typeState])
......@@ -160,9 +164,17 @@ const OperationLog: React.FC = () => {
const fetchTableData = async (params: any) => {
let _fetch: any;
let _params = { ...params };
switch (typeState) {
case 1: break;
case 2: break;
case 2:
_params.afterSaleType = extraState;
if (statusState === 1) {
_fetch = getAsOperateLogOuterPage
} else {
_fetch = getAsOperateLogInnerPage
}
break;
case 3:
if (statusState === 1) {
_fetch = getProductCommodityGetCommodityCheckRecordList;
......@@ -198,7 +210,7 @@ const OperationLog: React.FC = () => {
break;
}
if (_fetch) {
const { data } = await _fetch(params);
const { data } = await _fetch(_params);
return data
}
return { data: [], totalCount: 0 }
......
......@@ -83,18 +83,6 @@ export const schema_2: ISchema = {
},
},
properties: {
type: {
type: 'string',
enum: [
{ label: '所有', value: 0 },
{ label: '退货', value: 1 },
{ label: '换货', value: 2 },
{ label: '维修', value: 3 },
],
'x-component-props': {
placeholder: '请选择售后类型',
},
},
'[startTime,endTime]': {
type: 'array',
'x-component': 'DateRangePickerUnix',
......
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