Commit ff3bd285 authored by XieZhiXiong's avatar XieZhiXiong

Merge branch 'dev-srm' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into dev-srm

parents 4fd8c3ba bc1ff7e4
......@@ -5,15 +5,15 @@
* @LastEditTime: 2021-04-21 16:53:13
*/
// import CommodityRoute from './commodityRoute' // 商品能力路由
import MemberRoute from './memberRoute' // 会员能力路由
import ShopRoute from './shopRoute' // 店铺能力路由
import ChannelRoute from './channelRoute' // 渠道能力路由
// import MemberRoute from './memberRoute' // 会员能力路由
// import ShopRoute from './shopRoute' // 店铺能力路由
// import ChannelRoute from './channelRoute' // 渠道能力路由
// import TranactionRoute from './tranactionRoute' // 交易能力路由
// import LogisticsRoute from './logisticsRoutes' // 物流能力路由
// import PayandSettleRoute from './payandSettle' //支付与结算
// import AuthConfigRoute from './authConfigRoute'
// import AfterService from './afterServiceRoute' // 售后
import HandlingRoute from './handlingRoute'; // 加工能力
// import HandlingRoute from './handlingRoute'; // 加工能力
import asyncRoutes from '../router.config.json';
// import ProcurementRoute from './procurementRoute';
// import { callForBidsRoute } from './procurementRoute/callForBids';
......@@ -73,7 +73,6 @@ const memberCenterRoute = {
// ProcurementRoute,
// // 合同能力
// contracRoute,
//...
// AuthConfigRoute,
// MemberRoute,
// HandlingRoute,
......
......@@ -99,7 +99,7 @@ const SuggestAdd = () => {
const formatedValue = useMemo(() => {
if (!initialValue) {
return ;
return { type: 1 };
}
const { name, byUserName, byUserPhone, ...rest } = initialValue;
return {
......
......@@ -50,6 +50,7 @@ const CustomizeQueryList: React.FC<Iprops> = React.forwardRef((props: Iprops, re
const onRresh = (values: any) => {
const data = formatData?.(values) || values;
console.log("format",data);
tableRef.current?.reload(data);
}
......
......@@ -83,7 +83,7 @@ const SuggestAdd = () => {
setMemberModalValue([{
name: upperName,
memberId: memberId,
subRoleId: roleId
roleId: roleId
}])
setUserModalValue([
{
......@@ -99,12 +99,12 @@ const SuggestAdd = () => {
const formatedValue = useMemo(() => {
if (!initialValue) {
return ;
return { type: 1 };
}
const { name, byUserName, byUserPhone, ...rest } = initialValue;
const { upperName, byUserName, byUserPhone, ...rest } = initialValue;
return {
...rest,
memberName: name,
memberName: upperName,
byUserEditName: byUserName,
byUserEditPhone: byUserPhone,
}
......@@ -172,6 +172,7 @@ const SuggestAdd = () => {
userModalToggle(false)
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
......
......@@ -4,6 +4,7 @@ import { useMemo } from "react";
function useGetDetailCommon({ initialValue }) {
const basicInfo = useMemo(() => {
const isUpperMember = typeof initialValue?.upperName !== 'undefined';
return [
{
title: '事件主题',
......@@ -22,8 +23,8 @@ function useGetDetailCommon({ initialValue }) {
value: initialValue?.eventDesc
},
{
title: "会员名称",
value: initialValue?.name
title: isUpperMember ? '上级会员名称' : "会员名称",
value: isUpperMember ? initialValue?.upperName : initialValue?.name
},
{
title: "附件",
......
......@@ -170,7 +170,7 @@ export const complaintAddSchema: ISchema = {
]
},
attachments: {
title: '考察要求附件',
title: '事件附件',
type: 'object',
'x-component': 'FormilyUploadFiles',
}
......
......@@ -29,7 +29,7 @@ export const complaintAndSuggestListSchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
placeholder: '搜索会员名称',
tip: '输入 会员名称 进行搜索',
},
},
......@@ -58,10 +58,10 @@ export const complaintAndSuggestListSchema: ISchema = {
type: 'daterange',
default: undefined,
'x-component-props': {
placeholder: '会员等级(全部)',
placeholder: ['事件时间', "事件时间"],
allowClear: true,
style: {
width: 160,
width: 260,
},
},
},
......
......@@ -11,6 +11,7 @@ import CustomizeQueryList from '../../components/CustomizeQueryList';
import { Link } from 'umi';
import useColumns from '../../memberRectification/common/hooks/useColumns';
import { GetMemberComplaintSubPageRequest, GetMemberComplaintUpperPageRequest } from '@/services/MemberV2Api';
import moment from 'moment';
interface Iprops {};
......@@ -59,10 +60,7 @@ const List: React.FC<Iprops> = (props: Iprops) => {
}
const handleSubmit = async (params: {id: number}, type: "submit" | "delete") => {
const newList = [...currentIdIsInLoading];
newList.push(params.id);
const service = type === 'submit' ? PublicApi.postMemberComplaintSubSubmit : PublicApi.postMemberComplaintSubDelete;
setCurrentIdIsInLoading(newList)
const { data, code } = await service(params);
setCurrentIdIsInLoading((prev) => prev.filter((_item) => _item !== params.id));
if (code === 1000) {
......@@ -70,11 +68,22 @@ const List: React.FC<Iprops> = (props: Iprops) => {
}
}
const formatData = (value) => {
const { eventTimeStart, eventTimeEnd, ...rest } = value;
const newData = {
...rest,
eventTimeStart: eventTimeStart && moment(eventTimeStart, 'YYYY-MM-DD').startOf("day").format('YYYY-MM-DD HH:mm:ss'),
eventTimeEnd: eventTimeEnd && moment(eventTimeEnd, 'YYYY-MM-DD').endOf("day").format('YYYY-MM-DD HH:mm:ss')
}
return newData
}
return (
<Card>
<CustomizeQueryList
ref={ref}
columns={columns}
formatData={formatData}
schema={complaintAndSuggestListSchema}
fetchListData={handleFetch}
expressionScope={{
......
......@@ -36,7 +36,7 @@ const PurchasSeoAdded = () => {
id,
...value,
link: `http://${link}`,
doorType: DOORTYPE.STORE_DOORTYPE,
doorType: DOORTYPE.PROCUREMENT_DOORTYPE,
name: SELECT_NAME[type]
}
setConfirmLoading(true)
......
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