Commit 10a15fe9 authored by Bill's avatar Bill

fix: 修改装修bug以及添加api

parent 0499bcd8
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Descriptions, Spin, Divider, Progress } from 'antd'; import { Descriptions, Spin, Divider, Progress } from 'antd';
// import { PublicApi } from '@/services/api';
import { priceFormat } from '@/utils/numberFomat'; import { priceFormat } from '@/utils/numberFomat';
import styles from './index.less'; import styles from './index.less';
import { getPayCreditGetMemberCredit } from '@/services/PayV2Api';
interface Credit { interface Credit {
quota: number, quota: number,
......
...@@ -74,23 +74,13 @@ const EditPanel = () => { ...@@ -74,23 +74,13 @@ const EditPanel = () => {
* 但当一级类型没有被选择的时候,那么必须选择一级导航类型 * 但当一级类型没有被选择的时候,那么必须选择一级导航类型
*/ */
useEffect(() => { useEffect(() => {
if (activeKey === null && previousActiveKey !== activeKey) { if (selectedInfo === null) {
if (activeKey === null) { setVisible(false);
message.info("请先选择一级导航类型");
}
const dom = pageConfig[domKey!];
if (!dom) {
handleOnClose();
return; return;
} }
if (activeKey === null && selectedInfo !== null) {
message.info("请先选择一级导航类型");
const primaryTabProps = pageConfig[domKey!].props; const primaryTabProps = pageConfig[domKey!].props;
/** 是否可以编辑一级品类导航页, 因为如果已经创建了品类导航页,他下面的内容都基于一级品类,所以没有必要修改品类导航页,只能删除 */
if (primaryTabProps && primaryTabProps.id) {
// formActions.setFieldState('layout.primary', (fieldState) => {
// FormPath.setIn(fieldState, 'editable', false);
// });
return;
}
setFormValue({ setFormValue({
primary: primaryTabProps?.id, primary: primaryTabProps?.id,
title: primaryTabProps?.name, title: primaryTabProps?.name,
......
...@@ -3,7 +3,7 @@ import { history } from 'umi'; ...@@ -3,7 +3,7 @@ import { history } from 'umi';
import { Card, Form, Input, Button, Space, Popconfirm } from 'antd'; import { Card, Form, Input, Button, Space, Popconfirm } from 'antd';
import ReutrnEle from '@/components/ReturnEle'; import ReutrnEle from '@/components/ReturnEle';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
// import { PublicApi } from '@/services/api'; import { postManageAppDownloadLinkUpdate } from '@/services/ManageV2Api';
const layout: any = { const layout: any = {
colon: false, colon: false,
......
...@@ -4,9 +4,8 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout'; ...@@ -4,9 +4,8 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god'; import { StandardTable } from 'god';
import StatusSwitch from '@/components/StatusSwitch'; import StatusSwitch from '@/components/StatusSwitch';
// import { PublicApi } from '@/services/api';
import { useEffect } from 'react'; import { useEffect } from 'react';
import { getManageAppDownloadLinkFind } from '@/services/ManageV2Api'; import { getManageAppDownloadLinkFind, postManageAppDownloadLinkUpdate } from '@/services/ManageV2Api';
const AppLink = () => { const AppLink = () => {
const ref = useRef<any>({}); const ref = useRef<any>({});
......
...@@ -4,8 +4,8 @@ import { history } from 'umi'; ...@@ -4,8 +4,8 @@ import { history } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god'; import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
// import { PublicApi } from '@/services/api';
import StatusSwitch from '@/components/StatusSwitch'; import StatusSwitch from '@/components/StatusSwitch';
import { getManageParameterManagePage, postManageParameterManageUpdateState } from '@/services/ManageV2Api';
const SensitiveWords: React.FC<{}> = () => { const SensitiveWords: React.FC<{}> = () => {
const ref = useRef<any>({}); const ref = useRef<any>({});
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
......
...@@ -3,7 +3,7 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout'; ...@@ -3,7 +3,7 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi'; import { history } from 'umi';
import ReutrnEle from '@/components/ReturnEle'; import ReutrnEle from '@/components/ReturnEle';
import { Card, Form, Input, Button, Space, Popconfirm, message } from 'antd'; import { Card, Form, Input, Button, Space, Popconfirm, message } from 'antd';
// import { PublicApi } from '@/services/api'; import { postManageParameterManageUpdate } from '@/services/ManageV2Api';
const layout: any = { const layout: any = {
colon: false, colon: false,
labelCol: { style: { width: '174px' } }, labelCol: { style: { width: '174px' } },
......
import React, { Component, useState, useEffect } from 'react';
import { Modal, Button, Form,Radio } from 'antd'
import {
SchemaForm, SchemaMarkupField as Field,
createFormActions,
FormEffectHooks
} from '@formily/antd'
import { Input, FormMegaLayout, Select } from '@formily/antd-components'
// import { PublicApi } from '@/services/api'
export interface Params {
id?: any,
mode:number,
type?: number|string,
dialogVisible: boolean;
onCancel: Function;
onOK?: Function;
initialValues?: any;
dontReceive?: boolean; //默认展示
}
const actions = createFormActions()
const { onFieldChange$ } = FormEffectHooks
const comfirmDialog: React.FC<Params> = (props) => {
const [payWayCode, setPayWayCode] = useState<any>([]);
const handletOk = (values: any) => {
let value = { ...values }
if(props.type){
value.type = props.type
}
props.onOK(value)
}
useEffect(() => {
getPayGetPayWayCodeTypeEnum().then(res => {
if(res.code === 1000) {
const { data } = res;
const arr: any = [];
data.forEach(item => {
arr.push({
label: item.name,
value: item.type
})
})
setPayWayCode(arr)
}
})
}, [])
const useFormEffects = () => {
const { setFieldState } = createFormActions()
}
return (
<>
<Modal
title={ props.mode === 0 ?'新增参数配置':'编辑参数配置'}
width={800}
visible={props.dialogVisible}
onOk={() => actions.submit()}
onCancel={() => props.onCancel()}
destroyOnClose
afterClose={() => actions.reset()}
okText={`确定`}
cancelText='取消'
>
<SchemaForm
labelCol={3}
components={{
Input, Radio: Radio.Group, TextArea: Input.TextArea, Select
}}
actions={actions}
effects={() => useFormEffects()}
onSubmit={(values) => handletOk(values)}
initialValues={
props.initialValues
}
>
<Field
name='code'
title='参数代码'
required
enum={payWayCode}
x-component-props={{
placeholder: ''
}}
x-component="Select"
/>
<>
<Field
title='参数值'
name="value"
x-component="Input"
required
x-component-props={{
placeholder: '',
// addonBefore: ' '
}}
x-rules={{
message: ''
}}
/>
{/* <FormMegaLayout name='remarkOption' label='不接受原因' full required labelCol={2} labelAlign="top"> */}
<Field
title='参数描述'
name="describe"
x-component="TextArea"
x-component-props={{
placeholder: '最长128个字符'
}}
x-rules={{
max: 128,
// maximum:10,//最大数值
// message: '参数描述最多128个汉字'
}}
/>
</>
</SchemaForm>
</Modal>
</>
)
}
comfirmDialog.defaultProps = {
dontReceive: true,
type:1 //1.支付宝 2.支付宝转账到银行卡参数配置 3.微信
}
export default comfirmDialog
...@@ -20,12 +20,12 @@ import { FORM_FILTER_PATH } from '@/formSchema/const'; ...@@ -20,12 +20,12 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'; import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import SettleMethod from '../../components/SettleMethod'; import SettleMethod from '../../components/SettleMethod';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'; import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
// import { PublicApi } from '@/services/api';
import { usePageStatus } from '@/hooks/usePageStatus'; import { usePageStatus } from '@/hooks/usePageStatus';
import { history, Prompt } from 'umi' import { history, Prompt } from 'umi'
import { useLinkageUtils } from '@/utils/formEffectUtils' import { useLinkageUtils } from '@/utils/formEffectUtils'
import { getMemberManageAllProviderPage, getMemberManagePageitems } from '@/services/MemberV2Api'; import { getMemberManageAllProviderPage, getMemberManagePageitems } from '@/services/MemberV2Api';
import { getSettleAccountsCommonGetPlatformStrategySettlementOrderType, getSettleAccountsPlatformConfigGetPlatformSettlementStrategyDetail, postSettleAccountsPlatformConfigAddPlatformSettlementStrategy, postSettleAccountsPlatformConfigUpdatePlatformSettlementStrategy } from '@/services/SettleV2Api'; import { getSettleAccountsCommonGetPlatformStrategySettlementOrderType, getSettleAccountsPlatformConfigGetPlatformSettlementStrategyDetail, postSettleAccountsPlatformConfigAddPlatformSettlementStrategy, postSettleAccountsPlatformConfigUpdatePlatformSettlementStrategy } from '@/services/SettleV2Api';
import { getManageRuleConfigurationList } from '@/services/ManageV2Api';
const { onFormInit$, onFieldValueChange$ } = FormEffectHooks const { onFormInit$, onFieldValueChange$ } = FormEffectHooks
export const fetchOptions = (service) => { export const fetchOptions = (service) => {
......
...@@ -5,8 +5,8 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout'; ...@@ -5,8 +5,8 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god'; import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { history } from 'umi'; import { history } from 'umi';
// import { PublicApi } from '@/services/api';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'; import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { postManageSensitiveWordDelete } from '@/services/ManageV2Api';
const SensitiveWords: React.FC<{}> = () => { const SensitiveWords: React.FC<{}> = () => {
const ref = useRef<any>({}); const ref = useRef<any>({});
......
...@@ -3,7 +3,7 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout'; ...@@ -3,7 +3,7 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi'; import { history } from 'umi';
import ReutrnEle from '@/components/ReturnEle'; import ReutrnEle from '@/components/ReturnEle';
import { Card, Form, Input, Button, Space, Popconfirm, message } from 'antd'; import { Card, Form, Input, Button, Space, Popconfirm, message } from 'antd';
// import { PublicApi } from '@/services/api'; import { postManageSensitiveWordAdd, postManageSensitiveWordUpdate } from '@/services/ManageV2Api';
const layout: any = { const layout: any = {
colon: false, colon: false,
labelCol: { style: { width: '174px' } }, labelCol: { style: { width: '174px' } },
......
...@@ -4,9 +4,9 @@ import { PlusOutlined } from '@ant-design/icons'; ...@@ -4,9 +4,9 @@ import { PlusOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god'; import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
// import { PublicApi } from '@/services/api';
import { history } from 'umi'; import { history } from 'umi';
import StatusSwitch from '@/components/StatusSwitch'; import StatusSwitch from '@/components/StatusSwitch';
import { getManageUnitDeleteUnit, getManageUnitUpdateUnitStatus } from '@/services/ManageV2Api';
const SensitiveWords: React.FC<{}> = () => { const SensitiveWords: React.FC<{}> = () => {
const ref = useRef<any>({}); const ref = useRef<any>({});
......
...@@ -3,7 +3,7 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout'; ...@@ -3,7 +3,7 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi'; import { history } from 'umi';
import ReutrnEle from '@/components/ReturnEle'; import ReutrnEle from '@/components/ReturnEle';
import { Card, Form, Input, Button, Space, message, Popconfirm } from 'antd'; import { Card, Form, Input, Button, Space, message, Popconfirm } from 'antd';
// import { PublicApi } from '@/services/api'; import { postManageUnitSaveOrUpdateUnit } from '@/services/ManageV2Api';
const layout: any = { const layout: any = {
colon: false, colon: false,
labelCol: { style: { width: '174px' } }, labelCol: { style: { width: '174px' } },
......
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