Commit e971aacd authored by Bill's avatar Bill

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

parents 4d30cea4 a6fd8a0b
......@@ -56,6 +56,12 @@ const router = {
name: 'platformArg',
hidePageHeader: true,
component: '@/pages/systemManage/platformArg',
},{
// 平台参数列表
path: '/system/platformArg/edit',
name: 'platformArgEdit',
hidePageHeader: true,
component: '@/pages/systemManage/platformArg/template',
}]
}
export default router
......@@ -35,13 +35,6 @@ const axios = Axios.create({
})
const serviceConfig = {
// 用于注册页
userRegister: {
useType: {
url: '/member/menu/register/type',
method: 'get'
}
},
//初始化会员支付策略配置
payConfig: {
payInitializeConfig: {
......
export interface BusinessType {
businessTypeId: number;
businessTypeName: string;
}
export interface UseType {
memberTypeId: number;
memberTypeName: string;
businessTypes: BusinessType[];
}
export interface UserRegister {
useType: UseType[];
}
export interface RuleConfiguration {
value: number;
label: string;
......@@ -88,7 +73,6 @@ export interface Global {
}
export interface RootObject {
userRegister: UserRegister;
payConfig: PayConfig;
web: Web;
global: Global;
......
......@@ -221,6 +221,7 @@ export default {
'menu.system.unitAdd': '新建单位',
'menu.system.unitEdit': '编辑单位',
'menu.system.platformArg': '平台参数',
'menu.system.platformArgEdit': '平台参数修改',
'menu.productionNotice': '生产通知单管理',
'menu.productionNotice.query': '生产通知单查询',
......
......@@ -44,6 +44,12 @@ const tableListSchema: ISchema = {
"supplyMembersName": {
type: 'string',
"x-component-props": {
placeholder: '请输入采购会员名称'
}
},
"memberName": {
type: 'string',
"x-component-props": {
placeholder: '请输入供应会员名称'
}
},
......
......@@ -4,9 +4,8 @@ import { usePageStatus } from '@/hooks/usePageStatus'
import { OrderDetailContext } from '../../context'
import { PayOutWorkState } from '@/constants'
import { PublicApi } from '@/services/api'
import { history, Link } from 'umi'
import { history } from 'umi'
import OverflowText from '@/components/OverflowText'
import { useHttpRequest } from '@/hooks/useHttpRequest'
export interface OrderPayResultModalProps {
type: 'default' | 'preview',
......@@ -17,9 +16,8 @@ const OrderPayResultModal:React.FC<OrderPayResultModalProps> = ({type, currentRe
const { data } = useContext(OrderDetailContext)
const { id } = usePageStatus()
const [visible, setVisible] = useState(false)
const [isReady, setIsReady] = useState()
const [isReady, setIsReady] = useState<any>()
const canCtlData = data.paymentInformationResponses.find(v => v.externalState === PayOutWorkState.READY_CONFIRM_RESULT) || {}
const { run, loading } = useHttpRequest(PublicApi.postOrderPlatformConfirmedPaymentResultsOrder)
const transData = canCtlData.payOrderUrls?.split(',') || []
useEffect(() => {
......@@ -35,7 +33,7 @@ const OrderPayResultModal:React.FC<OrderPayResultModalProps> = ({type, currentRe
setVisible(false)
}
const handleConfirm = async (isReady) => {
const handleConfirm = (isReady) => {
setIsReady(isReady)
const params = {
state: isReady,
......@@ -43,10 +41,15 @@ const OrderPayResultModal:React.FC<OrderPayResultModalProps> = ({type, currentRe
paymentInformationId: canCtlData.id
}
const res = await run(params)
if (res && res.code === 1000) {
PublicApi.postOrderPlatformConfirmedPaymentResultsOrder(params).then(res => {
if (res.code === 1000) {
setTimeout(() => {
history.goBack()
}, 1000)
} else {
setIsReady(null)
}
})
}
return (
......@@ -56,8 +59,8 @@ const OrderPayResultModal:React.FC<OrderPayResultModalProps> = ({type, currentRe
onCancel={handleCancel}
footer={(type === 'default' && transData) ? <Space>
<Button onClick={handleCancel}>取消</Button>
<Button loading={isReady === 0 && loading} onClick={() => handleConfirm(0)} type='dashed'>确认未到账</Button>
<Button loading={isReady === 1 && loading} onClick={() => handleConfirm(1)} type='primary'>确认到账</Button>
<Button loading={isReady === 0} onClick={() => handleConfirm(0)} type='dashed'>确认未到账</Button>
<Button loading={isReady === 1} onClick={() => handleConfirm(1)} type='primary'>确认到账</Button>
</Space> : null}
>
<List
......
import React, { useRef } from 'react';
import { Card, Row, Col, Space, Button } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
import { Card, Button } from 'antd';
import { history } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
import { PublicApi } from '@/services/api';
import StatusSwitch from '@/components/StatusSwitch';
const SensitiveWords: React.FC<{}> = () => {
const ref = useRef<any>({});
const columns: ColumnType<any>[] = [
{
title: '参数编号',
key: 'id',
dataIndex: 'id',
key: 'code',
dataIndex: 'code',
}, {
title: '参数名称',
key: 'name',
dataIndex: 'name',
}, {
title: '参数描述',
key: 'remarks',
dataIndex: 'remarks',
key: 'details',
dataIndex: 'details',
},{
title: '参数值',
key: 'zhi',
dataIndex: 'zhi',
key: 'parameterValue',
dataIndex: 'parameterValue',
},{
title: '状态',
key: 'status',
dataIndex: 'status',
key: 'state',
dataIndex: 'state',
render: (text: any, record: any) => (
<StatusSwitch fieldNames="status" handleConfirm={() => handleChangeStatus(record.id, record.status)} record={record} />
)
},{
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text:any, record: any) => <Button type='link' onClick={() => history.push(`/system/platformArg/edit?id=${record.id}&parameterValue=${record.parameterValue}`)}>修改</Button>
}
]
const controllerBtns = <Row>
<Col span={24}>
<Space direction="horizontal" size={16}>
<Button type="primary" icon={<PlusOutlined />}>新建</Button>
</Space>
</Col>
</Row>
/**切换状态 */
const handleChangeStatus = async (id: any, status: any) => {
let _status = status === 1 ? 0 : 1
await PublicApi.postManageParameterManageUpdateState({ id: id, status: _status })
ref.current.reload()
}
/**获取单位列表数据 */
const fetchdata = (params: any) => {
return new Promise(resolve => {
PublicApi.getManageParameterManagePage({ ...params }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
})
})
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
currentRef={ref}
columns={columns}
tableProps={{ rowKew: 'id' }}
tableProps={{ rowKey: 'id' }}
fetchTableData={params => fetchdata(params)}
/>
</Card>
</PageHeaderWrapper>
......
import React, { useEffect } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import ReutrnEle from '@/components/ReturnEle';
import { Card, Form, Input, Button, Space, Popconfirm, message } from 'antd';
import { PublicApi } from '@/services/api';
const layout: any = {
colon: false,
labelCol: { style: { width: '174px' } },
wrapperCol: { span: 9 },
labelAlign: "left"
};
const tailLayout = {
wrapperCol: { style: { marginLeft: '174px' } },
};
const Template: React.FC<{}> = () => {
const [form] = Form.useForm();
const { query } = history.location;
const onFinish = (values: any) => {
values.id = query.id;
PublicApi.postManageParameterManageUpdate(values).then(res => {
if (res.code === 1000) {
history.goBack();
message.success('修改敏感词成功')
}
})
}
const confirmCancel = () => {
history.goBack()
}
useEffect(() => {
form.setFieldsValue({
parameterValue: query.parameterValue
})
}, [])
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
>
<Card>
<Form
{...layout}
form={form}
onFinish={onFinish}
>
<Form.Item label='参数值' name='parameterValue' rules={[{ required: true, message: '请输入参数值' }]}>
<Input />
</Form.Item>
<Form.Item {...tailLayout}>
<Space size={24}>
<Button type='primary' htmlType="submit">保存</Button>
<Popconfirm
onConfirm={confirmCancel}
title="确定要执行这个操作?"
okText="确定"
cancelText="取消"
>
<Button>取消</Button>
</Popconfirm>
</Space>
</Form.Item>
</Form>
</Card>
</PageHeaderWrapper>
)
}
export default Template;
......@@ -28,7 +28,6 @@ const SensitiveWords: React.FC<{}> = () => {
} else {
message.error('请选择要操作的数据')
}
}
const columns: ColumnType<any>[] = [
{
......@@ -102,7 +101,7 @@ const SensitiveWords: React.FC<{}> = () => {
<StandardTable
currentRef={ref}
columns={columns}
tableProps={{ rowKew: 'id' }}
tableProps={{ rowKey: 'id' }}
rowSelection={rowSelection}
fetchTableData={(params) => fetchdata(params)}
formilyLayouts={{
......
import React, { useRef } from 'react';
import { Card, Row, Col, Space, Button } from 'antd';
import { Card, Row, Col, Space, Button, Popconfirm, message } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
import { PublicApi } from '@/services/api';
import { history } from 'umi';
import StatusSwitch from '@/components/StatusSwitch';
const SensitiveWords: React.FC<{}> = () => {
const ref = useRef<any>({});
/**切换状态 */
const handleChangeStatus = async (id: any, status: any) => {
let _status = status === true ? 'false' : 'true'
await PublicApi.getManageUnitUpdateUnitStatus({ id: id, status: _status })
ref.current.reload()
}
const confirmCancel = (id: number) => {
PublicApi.postManageSensitiveWordDelete({ id }).then(res => {
if (res.code === 1000) {
message.success('删除成功')
ref.current.Reload()
}
})
}
const columns: ColumnType<any>[] = [
{
title: 'ID',
......@@ -18,36 +35,60 @@ const SensitiveWords: React.FC<{}> = () => {
dataIndex: 'name',
}, {
title: '英文简称',
key: 'remarks',
dataIndex: 'remarks',
key: 'englishShortName',
dataIndex: 'englishShortName',
},{
title: '状态',
key: 'status',
dataIndex: 'status',
render: (text: any, record: any) => (
<StatusSwitch fieldNames="status" handleConfirm={() => handleChangeStatus(record.id, record.status)} record={record} />
)
},{
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => {
return (
<>
<Button
type='link'
href={`/system/sensitiveWords/edit?id=${record.id}}`}
>修改</Button>
<Popconfirm
onConfirm={() => confirmCancel(record.id)}
title="确定要执行这个操作?"
okText="确定"
cancelText="取消"
>
<Button type='link'>删除</Button>
</Popconfirm>
</>
)
}
},
]
const controllerBtns = <Row>
<Col span={24}>
<Space direction="horizontal" size={16}>
<Button type="primary" icon={<PlusOutlined />}>新建</Button>
<Button type="primary"
icon={<PlusOutlined />}
onClick={() => history.push(`/system/unit/add`)}
>新建</Button>
</Space>
</Col>
</Row>
/**获取单位列表数据 */
// const fetchdata = (params: any) => {
// return new Promise(resolve => {
// PublicApi.getManageUnitGetUnitList({ ...params }).then(res => {
// if (res.code === 1000) {
// resolve(res.data)
// }
// })
// })
// }
const fetchdata = (params: any) => {
return new Promise(resolve => {
PublicApi.getManageUnitGetUnitList({ ...params }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
})
})
}
return (
<PageHeaderWrapper>
......@@ -55,7 +96,8 @@ const SensitiveWords: React.FC<{}> = () => {
<StandardTable
currentRef={ref}
columns={columns}
tableProps={{ rowKew: 'id' }}
tableProps={{ rowKey: 'id' }}
fetchTableData={(params) => fetchdata(params)}
formilyLayouts={{
justify: 'space-between'
}}
......
......@@ -2,7 +2,8 @@ import React from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import ReutrnEle from '@/components/ReturnEle';
import { Card, Form, Input, Button, Space } from 'antd';
import { Card, Form, Input, Button, Space, message, Popconfirm } from 'antd';
import { PublicApi } from '@/services/api';
const layout: any = {
colon: false,
labelCol: { style: { width: '174px' } },
......@@ -12,26 +13,63 @@ const layout: any = {
const tailLayout = {
wrapperCol: { style: { marginLeft: '174px' } },
};
const Template:React.FC<{}> = () => {
return(
const [form] = Form.useForm();
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 => {
if (res.code === 1000) {
history.goBack();
message.success('新增单位成功')
}
})
}
else {
values.id = query.id;
PublicApi.postManageUnitSaveOrUpdateUnit(values).then(res => {
if (res.code === 1000) {
history.goBack();
message.success('修改单位成功')
}
})
}
}
const confirmCancel = () => {
history.goBack()
}
const Template: React.FC<{}> = () => {
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
>
<Card>
<Form
form={form}
{...layout}
onFinish={onFinish}
>
<Form.Item label='单位名称' name='name' rules={[{ required: true, message: '请输入单位名称' }]}>
<Input />
</Form.Item>
<Form.Item label='英文简称' name='enName' rules={[{ required: true, message: '请输入英文简称' }]}>
<Form.Item label='英文简称' name='englishShortName' rules={[{ required: true, message: '请输入英文简称' }]}>
<Input />
</Form.Item>
<Form.Item {...tailLayout}>
<Space size={24}>
<Button type='primary'>保存</Button>
<Button type='primary' htmlType="submit">保存</Button>
<Popconfirm
onConfirm={confirmCancel}
title="确定要执行这个操作?"
okText="确定"
cancelText="取消"
>
<Button>取消</Button>
</Popconfirm>
</Space>
</Form.Item>
</Form>
......
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