Commit 7d8a2f06 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents 4e498ad0 f37e90be
......@@ -177,7 +177,7 @@ const Home: React.FC<{}> = () => {
<Badge status={PROCESS_STATUS[key]} text={item.name}></Badge>
</div>
</div>
<div><Link to={item.url}>查看&nbsp;<RightOutlined /></Link></div>
<div><Link to={item.link}>查看&nbsp;<RightOutlined /></Link></div>
</div>
</Col>
)
......
......@@ -36,7 +36,7 @@ const Message: React.FC<{}> = () => {
}
const handleRead = (id, url: string) => {
PublicApi.postReportMessagePlatformRead({id: id})
PublicApi.postReportMessagePlatformRead({id: id}, {ctlType: 'none'})
.then((data) => {
if(url) {
if(/http/.test(url)) {
......
......@@ -213,7 +213,7 @@ const BrandSetting: React.FC<ShopSettingPropsType> = (props) => {
<Col>
<Form.Item
className={styles.mar_bot_0}
name="shopName"
name="brandName"
>
<Input.Search
style={{ width: 240 }}
......
......@@ -157,7 +157,7 @@ const CategoryRecommendSetting: React.FC<CategoryRecommendSettingPropsType> = (p
<Row>
{
categoryResponseList.map((item, index) => (
<Col span={4} className={styles.category_item} key={`category_item_${index}`}>
<Col span={6} className={styles.category_item} key={`category_item_${index}`}>
<Checkbox value={item.categoryId}>{item.categoryName}</Checkbox>
</Col>
))
......
......@@ -139,6 +139,7 @@ const Details: React.FC<{}> = (props) => {
title: '序号',
key: 'inquiryListId',
dataIndex: 'inquiryListId',
render: (text: any, record: any, index: number) => <>{index + 1}</>
}, {
title: '操作角色',
key: 'roleName',
......@@ -233,12 +234,13 @@ const Details: React.FC<{}> = (props) => {
progressDot
current={Number(data.externalState - 1)}
>
{detailData.externalStateStep.items.map((item, index) => {
{Object.keys(data).length > 0 && data.externalInquiryListStateResponses.map((item, index) => {
return (
<Step
key={index}
title={item.title}
description={item.desc}
title={item.roleName}
description={item.operationalProcess}
status={item.isExecute ? 'finish' : 'wait'}
/>
);
})}
......@@ -323,4 +325,4 @@ const Details: React.FC<{}> = (props) => {
)
}
export default Details
\ No newline at end of file
export default Details
......@@ -112,6 +112,7 @@ const Details: React.FC<{}> = (props) => {
title: '序号',
key: 'inquiryListId',
dataIndex: 'inquiryListId',
render: (text: any, record: any, index: number) => <>{index + 1}</>
}, {
title: '操作角色',
key: 'roleName',
......@@ -223,12 +224,13 @@ const Details: React.FC<{}> = (props) => {
progressDot
current={Number(data.externalState - 1)}
>
{detailData.externalStateStep.items.map((item, index) => {
{Object.keys(data).length > 0 && data.externalRequisitionFormResponses.map((item, index) => {
return (
<Step
key={index}
title={item.title}
description={item.desc}
title={item.roleName}
description={item.operationalProcess}
status={item.isExecute ? 'finish' : 'wait'}
/>
);
})}
......@@ -236,7 +238,7 @@ const Details: React.FC<{}> = (props) => {
</div>
<div className={style.item_wrap}>
<div className={style.mainCol_title} style={view === 2 ? { paddingBottom: '0px' } : { paddingBottom: '24px' }}>报价商品</div>
<StandardTable
<StandardTable
currentRef={ref}
columns={inquiryGoods}
tableProps={{ rowKew: 'id' }}
......@@ -319,4 +321,4 @@ const Details: React.FC<{}> = (props) => {
)
}
export default Details
\ No newline at end of file
export default Details
......@@ -6,6 +6,7 @@ import SetUpModal from './setUpModal';
interface payWayTableParams {
name?: string,
payWayId?: number,
payParametersList?: any,
payParametersListResponses?: any,
visible?: boolean,
......@@ -22,7 +23,7 @@ const PayWayTable: React.FC<payWayTableParams> = (props) => {
const [edit, setedit] = useState<any>({});
const [modifyIndex, setModifyIndex] = useState<any>(0)
const [modify, setmodify] = useState<boolean>(false);
const { name, payParametersListResponses, payParametersList, visible, onType, onGet, onDel, onEdit, id } = props;
const { name, payParametersListResponses, payParametersList, visible, onType, onGet, onDel, onEdit, id, payWayId } = props;
const columns: ColumnType<any>[] = [
{
title: '参数代码',
......@@ -87,7 +88,7 @@ const PayWayTable: React.FC<payWayTableParams> = (props) => {
<Button style={{ marginBottom: 16, marginTop: 24 }} block icon={<PlusOutlined />} onClick={() => { setmodalvisible(true); setType(id); setmodify(false) }} type='dashed'>新增参数配置</Button>
{
id !== 2 &&
payWayId !== 2 &&
<>
<div style={{ borderLeft: '2px solid #00B37A', margin: '41px 0 8px', padding: '1px 5px' }}>{name}转账到银行卡参数配置</div>
<Table
......
......@@ -6,7 +6,7 @@
*/
import React, { useState, useEffect } from 'react';
import { history } from 'umi';
import { Button, Card, Tabs, Space, Input, InputNumber,message } from 'antd';
import { Button, Card, Tabs, Space, Input, InputNumber, message } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { PublicApi } from '@/services/api';
import PayWayRadio from './components/payWayRadio';
......@@ -38,6 +38,7 @@ const PayWaySetTemplate: React.FC<{}> = () => {
arr.push({
id: item.id,
way: item.way,
payWayId: item.payWayId,
isPitchOn: item.isPitchOn ? item.isPitchOn : 0,
payType: item.payType,
payParametersList: item.payParametersList ? item.payParametersList : [],
......@@ -98,27 +99,43 @@ const PayWaySetTemplate: React.FC<{}> = () => {
const onHnadleSubmit = () => {
let conditions = false;
let wayName = '';
payItem.forEach(item => {
if (item.id === 2 && item.isPitchOn === 1) {
if(item.payParametersAddListRequests.length > 0) {
conditions = true
try {
payItem.forEach(item => {
if (item.payWayId === 2 && item.isPitchOn === 1) {
console.log(1)
if (item.payParametersAddListRequests.length > 0) {
conditions = true
} else {
conditions = false
wayName = `${item.way}缺少支付参数配置`
throw new Error
}
} else if (item.payWayId === 1 && item.isPitchOn === 1) {
if (item.payParametersAddListRequests.length > 0 && item.payParametersList.length > 0) {
conditions = true
} else {
conditions = false
wayName = `${item.way}缺少支付参数配置`
throw new Error
}
} else if (item.payWayId === 6 && item.isPitchOn === 1) {
if (item.payParametersAddListRequests.length > 0) {
const data = item.payParametersAddListRequests[0]
if (data.code && data.value && data.describe) {
conditions = true
} else {
conditions = false
wayName = `请配置${item.way}的参数`
throw new Error
}
}
} else {
conditions = false
wayName = item.way
return
}
} else if (item.id === 1 && item.isPitchOn === 1) {
if(item.payParametersAddListRequests.length > 0 && item.payParametersList.length > 0) {
conditions = true
} else {
conditions = false
wayName = item.way
return
}
} else {
conditions = true
}
})
})
} catch {
message.error(wayName)
}
if (conditions) {
PublicApi.postPayCollectionParametersAdd({
platformPayWays: payItem
......@@ -127,8 +144,6 @@ const PayWaySetTemplate: React.FC<{}> = () => {
history.push('/ruleSettingManager/paySetting')
}
})
} else {
message.error(`请新增${wayName}的支付参数配置`)
}
}
......@@ -179,9 +194,10 @@ const PayWaySetTemplate: React.FC<{}> = () => {
selectId={payItem[idx].id}
onChange={(value) => onChangeRaido(value, idx)}
/>
{(payItem[idx].id === 1 || payItem[idx].id === 2) &&
{(payItem[idx].payWayId === 1 || payItem[idx].payWayId === 2) &&
<PayWayTable
id={payItem[idx].id}
payWayId={payItem[idx].payWayId}
onType={payItem[idx].payType}
name={payItem[idx].way}
payParametersList={payItem[idx].payParametersList}
......@@ -193,7 +209,7 @@ const PayWaySetTemplate: React.FC<{}> = () => {
/>
}
{
(payItem[idx].id === 6 && !!payItem[idx].isPitchOn) &&
(payItem[idx].payWayId === 6 && !!payItem[idx].isPitchOn) &&
<div style={{ marginTop: 42 }}>
<Space direction="horizontal" size={16}>
初始申请额度不超过
......
......@@ -45,8 +45,14 @@ const payActions = createFormActions()
* @return {type}
*/
const fetchMemberList = async (params) => {
const res = await PublicApi.getMemberManageAllProviderPage(params)
return res.data
return new Promise(resolve => {
PublicApi.getPayGetMembers(params).then(res => {
res.data.data.forEach((item:any) => {
item.name = item.memberName
})
resolve(res.data)
})
})
}
const PaySetting: React.FC<{}> = () => {
......@@ -61,20 +67,20 @@ const PaySetting: React.FC<{}> = () => {
levelList: [],
roleList: []
})
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'memberId' })
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'id' })
const [optionType, setoptionType] = useState(0)
const { preview, pageStatus } = usePageStatus()
// const initValue = useInitValue(PublicApi.getPayPayMemberTacticsDetails)
const columnsSetMember: ColumnType<any>[] = [
{
title: 'ID',
dataIndex: 'memberId',
dataIndex: 'id',
align: 'center',
key: 'memberId',
key: 'id',
},
{
title: '会员名称',
dataIndex: 'name',
dataIndex: 'memberName',
align: 'center',
key: 'name',
},
......@@ -130,7 +136,7 @@ const PaySetting: React.FC<{}> = () => {
// 弹出会员
const handleAddMemberBtn = () => {
const checkBoxs = payActions.getFieldValue('applyMember')
memberRowCtl.setSelectedRowKeys(checkBoxs.map(v => v.memberId))
memberRowCtl.setSelectedRowKeys(checkBoxs.map(v => v.id))
memberRowCtl.setSelectRow(checkBoxs)
setvisible(true)
console.log(visibleChannelMember)
......@@ -191,7 +197,7 @@ const PaySetting: React.FC<{}> = () => {
}).then(res => {
if (res.code === 1000) {
let { data } = res.data
memberRowCtl.setSelectedRowKeys(data.map(v => v.memberId))
memberRowCtl.setSelectedRowKeys(data.map(v => v.id))
memberRowCtl.setSelectRow(data)
payActions.setFieldValue('applyMember', data)
}
......@@ -417,7 +423,6 @@ const PaySetting: React.FC<{}> = () => {
}
}
//新增
console.log(param, 10086)
if (param.memberIdRoleIds.length === 0 && values.isSelected === 0) {
message.error('请选择指定的会员');
return
......@@ -495,7 +500,7 @@ const PaySetting: React.FC<{}> = () => {
}
}
tableProps={{
rowKey: 'memberId'
rowKey: 'id'
}}
/>
</PageHeaderWrapper>
......
......@@ -140,7 +140,7 @@ export const memberSchema: ISchema = {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '商品名称',
placeholder: '搜索会员名称',
align: 'flex-left',
},
},
......@@ -172,7 +172,7 @@ export const memberSchema: ISchema = {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '选择会员角色',
placeholder: '选择会员类型',
style: {width: '200px'},
allowClear: true,
}
......@@ -181,7 +181,7 @@ export const memberSchema: ISchema = {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '选择会员角色',
placeholder: '选择会员等级',
style: {width: '200px'},
allowClear: true,
}
......
......@@ -4,7 +4,7 @@
*/
import React, { useRef } from 'react';
import { Card, Button, Space } from 'antd';
import { Card, Button, Space, Popconfirm } from 'antd';
import NiceForm from '@/components/NiceForm';
import { StandardTable } from 'god';
import { PublicApi } from '@/services/api';
......@@ -77,7 +77,14 @@ const MemberSettle: React.FC<{}> = () => {
return (
<Space>
<Link to={`/ruleSettingManager/platformSettlementStrategy/edit?id=${record.id}`}>修改</Link>
<Button type="link" onClick={() => handleRemove({id: record.id})}>删除</Button>
<Popconfirm
title="确定删除?"
onConfirm={() => handleRemove({id: record.id})}
okText="是"
cancelText="否"
>
<Button type="link" >删除</Button>
</Popconfirm>
</Space>
)
}
......
......@@ -22,13 +22,13 @@ const schema: ISchema = {
},
},
name: {
type: 'string',
'x-component': 'Search',
type: 'string',
'x-component': 'Search',
"x-mega-props": {
"span": 2
},
'x-component-props': {
placeholder: '搜索',
placeholder: '搜索策略名称',
advanced: false,
},
},
......@@ -37,4 +37,4 @@ const schema: ISchema = {
}
}
export default schema
\ No newline at end of file
export default schema
......@@ -55,7 +55,7 @@ export const strategyDetailTab = (props: any, usePageStatus: any) => {
"x-component": 'checkbox',
'x-component-props': {
},
required: false,
required: true,
}
}
}
......
......@@ -17,24 +17,35 @@ const tailLayout = {
const { TextArea } = Input;
const Template:React.FC<{}> = () => {
const [form] = Form.useForm();
const [lodaing, setLodaing] = useState<boolean>(false);
const { pathname, query } = history.location;
const type = pathname.split('/')[pathname.split('/').length - 1];
const onFinish = (values: any) => {
if(type === 'add') {
PublicApi.postManageSensitiveWordAdd(values).then(res => {
if(res.code === 1000) {
history.goBack();
PublicApi.postManageSensitiveWordAdd({...values}, {ctlType: 'none'}).then(res => {
if (res.code === 1000) {
setTimeout(() => {
history.goBack();
}, 2000)
message.success('新增敏感词成功')
setLodaing(true)
}
}).catch(() => {
setLodaing(false)
})
}
else {
values.id = query.id;
PublicApi.postManageSensitiveWordUpdate(values).then(res => {
if(res.code === 1000) {
history.goBack();
PublicApi.postManageSensitiveWordUpdate({...values}, {ctlType: 'none'}).then(res => {
if (res.code === 1000) {
setTimeout(() => {
history.goBack();
}, 2000)
message.success('修改敏感词成功')
setLodaing(true)
}
}).catch(() => {
setLodaing(false)
})
}
}
......@@ -76,7 +87,7 @@ const Template:React.FC<{}> = () => {
</Form.Item>
<Form.Item {...tailLayout}>
<Space size={24}>
<Button type='primary' htmlType="submit">保存</Button>
<Button type='primary' loading={lodaing} htmlType="submit">保存</Button>
<Popconfirm
onConfirm={confirmCancel}
title="确定要执行这个操作?"
......
......@@ -16,8 +16,8 @@ const SensitiveWords: React.FC<{}> = () => {
await PublicApi.getManageUnitUpdateUnitStatus({ id: id, status: _status })
ref.current.reload()
}
const confirmCancel = (id: number) => {
PublicApi.postManageSensitiveWordDelete({ ids: [id] }).then(res => {
const confirmCancel = (id: any) => {
PublicApi.getManageUnitDeleteUnit({ id }).then(res => {
if (res.code === 1000) {
message.success('删除成功')
ref.current.reload()
......@@ -132,7 +132,7 @@ const SensitiveWords: React.FC<{}> = () => {
name: {
type: 'string',
'x-component-props': {
placeholder: '属性名称',
placeholder: '单位名称',
},
'x-component': 'Search'
}
......
import React, { useEffect } from 'react';
import React, { useEffect, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import ReutrnEle from '@/components/ReturnEle';
......@@ -16,24 +16,35 @@ const tailLayout = {
const Template: React.FC<{}> = () => {
const [form] = Form.useForm();
const [lodaing, setLodaing] = useState<boolean>(false);
const { pathname, query } = history.location;
const type = pathname.split('/')[pathname.split('/').length - 1];
const onFinish = (values: any) => {
if (type === 'add') {
PublicApi.postManageUnitSaveOrUpdateUnit(values).then(res => {
PublicApi.postManageUnitSaveOrUpdateUnit({...values}, {ctlType: 'none'}).then(res => {
if (res.code === 1000) {
history.goBack();
// message.success('新增单位成功')
setTimeout(() => {
history.goBack();
}, 2000)
message.success('新增单位成功')
setLodaing(true)
}
}).catch(() => {
setLodaing(false)
})
}
else {
values.id = query.id;
PublicApi.postManageUnitSaveOrUpdateUnit(values).then(res => {
PublicApi.postManageUnitSaveOrUpdateUnit({...values}, {ctlType: 'none'}).then(res => {
if (res.code === 1000) {
history.goBack();
// message.success('修改单位成功')
setTimeout(() => {
history.goBack();
}, 2000)
message.success('修改单位成功')
setLodaing(true)
}
}).catch(() => {
setLodaing(false)
})
}
}
......@@ -76,7 +87,7 @@ const Template: React.FC<{}> = () => {
</Form.Item>
<Form.Item {...tailLayout}>
<Space size={24}>
<Button type='primary' htmlType="submit">保存</Button>
<Button type='primary' loading={lodaing} htmlType="submit">保存</Button>
<Popconfirm
onConfirm={confirmCancel}
title="确定要执行这个操作?"
......
This diff is collapsed.
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