Commit 4f4d700e authored by Bill's avatar Bill

Merge branch 'dev' of 10.0.0.22:lingxi/lingxi-business-system into dev

parents 4a98e13d f37e90be
......@@ -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>
))
......
......@@ -234,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'}
/>
);
})}
......
......@@ -224,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'}
/>
);
})}
......
......@@ -6,7 +6,7 @@ import SetUpModal from './setUpModal';
interface payWayTableParams {
name?: string,
way?: string,
payWayId?: number,
payParametersList?: any,
payParametersListResponses?: any,
visible?: boolean,
......@@ -23,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, way } = props;
const { name, payParametersListResponses, payParametersList, visible, onType, onGet, onDel, onEdit, id, payWayId } = props;
const columns: ColumnType<any>[] = [
{
title: '参数代码',
......@@ -88,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>
{
way !== '微信' &&
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 : [],
......@@ -100,30 +101,40 @@ const PayWaySetTemplate: React.FC<{}> = () => {
let wayName = '';
try {
payItem.forEach(item => {
if (item.way === '微信' && item.isPitchOn === 1) {
if (item.payWayId === 2 && item.isPitchOn === 1) {
console.log(1)
if(item.payParametersAddListRequests.length > 0) {
if (item.payParametersAddListRequests.length > 0) {
conditions = true
} else {
conditions = false
wayName = item.way
wayName = `${item.way}缺少支付参数配置`
throw new Error
}
} else if (item.way === '支付宝' && item.isPitchOn === 1) {
console.log(2)
if(item.payParametersAddListRequests.length > 0 && item.payParametersList.length > 0) {
} 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
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 = true
}
})
} catch {
message.error(`${wayName}缺少支付参数配置`)
message.error(wayName)
}
if (conditions) {
PublicApi.postPayCollectionParametersAdd({
......@@ -183,10 +194,10 @@ const PayWaySetTemplate: React.FC<{}> = () => {
selectId={payItem[idx].id}
onChange={(value) => onChangeRaido(value, idx)}
/>
{(payItem[idx].way === '微信' || payItem[idx].way === '支付宝') &&
{(payItem[idx].payWayId === 1 || payItem[idx].payWayId === 2) &&
<PayWayTable
id={payItem[idx].id}
way={payItem[idx].way}
payWayId={payItem[idx].payWayId}
onType={payItem[idx].payType}
name={payItem[idx].way}
payParametersList={payItem[idx].payParametersList}
......@@ -198,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<{}> = () => {
......@@ -74,7 +80,7 @@ const PaySetting: React.FC<{}> = () => {
},
{
title: '会员名称',
dataIndex: 'name',
dataIndex: 'memberName',
align: 'center',
key: 'name',
},
......
......@@ -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="确定要执行这个操作?"
......
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();
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();
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="确定要执行这个操作?"
......
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