Commit 41711913 authored by GuanHua's avatar GuanHua
parents 03621ce4 df797987
...@@ -62,12 +62,6 @@ const columns: ColumnType<any>[] = [ ...@@ -62,12 +62,6 @@ const columns: ColumnType<any>[] = [
} }
] ]
const fetchData = async (params) => {
const res = await PublicApi.getMemberManageLowerPageBynamerole(params)
return res.data
}
const { Option } = Select; const { Option } = Select;
const defaultValue = 'lucy' const defaultValue = 'lucy'
interface parmas { interface parmas {
...@@ -91,6 +85,7 @@ const company: React.FC<parmas> = (props) => { ...@@ -91,6 +85,7 @@ const company: React.FC<parmas> = (props) => {
const [visible, setsVisible] = useState(false) //state hook写法 const [visible, setsVisible] = useState(false) //state hook写法
const [selectRow, setSelectRow] = useState<Item[]>([]) // 模态框选择的行数据 const [selectRow, setSelectRow] = useState<Item[]>([]) // 模态框选择的行数据
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([]) const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [excludeList, setExcludeList] = useState<Array<any>>([])
useEffect(() => { useEffect(() => {
let _title = pageStatus === PageStatus.PREVIEW ? '查看' : id ? '编辑' : '新建' let _title = pageStatus === PageStatus.PREVIEW ? '查看' : id ? '编辑' : '新建'
setHeaderTitle(`${_title}物流公司`) setHeaderTitle(`${_title}物流公司`)
...@@ -102,10 +97,6 @@ const company: React.FC<parmas> = (props) => { ...@@ -102,10 +97,6 @@ const company: React.FC<parmas> = (props) => {
setCompanyType(type) setCompanyType(type)
}) })
} }
return () => {
}
}, []) }, [])
const handleSubmitAllSetting = () => { const handleSubmitAllSetting = () => {
...@@ -160,8 +151,8 @@ const company: React.FC<parmas> = (props) => { ...@@ -160,8 +151,8 @@ const company: React.FC<parmas> = (props) => {
} else { } else {
setCodeDisabled(false) setCodeDisabled(false)
PublicApi.getLogisticsSelectListMemberCompanySelected().then(res => { PublicApi.getLogisticsSelectListMemberCompanySelected().then(res => {
if(res.code === 1000) { if (res.code === 1000) {
console.log(res) setExcludeList(res.data)
} }
}) })
} }
...@@ -199,6 +190,16 @@ const company: React.FC<parmas> = (props) => { ...@@ -199,6 +190,16 @@ const company: React.FC<parmas> = (props) => {
) )
const fetchData = (params) => {
if (visible) {
return new Promise(resolve => {
PublicApi.postMemberManageLogisticsPage({ ...params, excludeList }).then(res => {
resolve(res.data)
})
})
}
}
return ( return (
<PageHeaderWrapper <PageHeaderWrapper
onBack={() => history.goBack()} onBack={() => history.goBack()}
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { history } from 'umi'; import { history } from 'umi';
import { Button, Card, Tabs, Space, Input } from 'antd'; import { Button, Card, Tabs, Space, Input, InputNumber } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import PayWayRadio from './components/payWayRadio'; import PayWayRadio from './components/payWayRadio';
...@@ -108,6 +108,7 @@ const PayWaySetTemplate: React.FC<{}> = () => { ...@@ -108,6 +108,7 @@ const PayWaySetTemplate: React.FC<{}> = () => {
/** */ /** */
const handleBlur = (e, name, idx) => { const handleBlur = (e, name, idx) => {
console.log(e)
const data = [...payItem] const data = [...payItem]
const payParametersAddListRequests = data[idx].payParametersAddListRequests; const payParametersAddListRequests = data[idx].payParametersAddListRequests;
if(payParametersAddListRequests.length === 0) { if(payParametersAddListRequests.length === 0) {
...@@ -116,11 +117,19 @@ const PayWaySetTemplate: React.FC<{}> = () => { ...@@ -116,11 +117,19 @@ const PayWaySetTemplate: React.FC<{}> = () => {
payParametersAddListRequests.map(item => { payParametersAddListRequests.map(item => {
for(let key in item) { for(let key in item) {
if(key === name) { if(key === name) {
if(name === 'value') {
item[key] = e
} else {
item[key] = e.target.value item[key] = e.target.value
}
}else { }else {
if(name === 'value') {
item[name] = e
} else {
item[name] = e.target.value item[name] = e.target.value
} }
} }
}
item.type = 6; item.type = 6;
}) })
data[idx].payParametersAddListRequests = [...payParametersAddListRequests] data[idx].payParametersAddListRequests = [...payParametersAddListRequests]
...@@ -164,7 +173,7 @@ const PayWaySetTemplate: React.FC<{}> = () => { ...@@ -164,7 +173,7 @@ const PayWaySetTemplate: React.FC<{}> = () => {
<Space direction="horizontal" size={16}> <Space direction="horizontal" size={16}>
初始申请额度不超过 初始申请额度不超过
<Input onChange={(e) => handleBlur(e, 'code', idx)} value={payItem[idx].payParametersAddListRequests.length > 0 ? payItem[idx].payParametersAddListRequests[0].code : undefined} addonBefore="¥" /> <Input onChange={(e) => handleBlur(e, 'code', idx)} value={payItem[idx].payParametersAddListRequests.length > 0 ? payItem[idx].payParametersAddListRequests[0].code : undefined} addonBefore="¥" />
允许满<Input onChange={(e) => handleBlur(e, 'value', idx)} value={payItem[idx].payParametersAddListRequests.length > 0 ? payItem[idx].payParametersAddListRequests[0].value : undefined} /> 允许满<InputNumber min={1} onChange={(e) => handleBlur(e, 'value', idx)} value={payItem[idx].payParametersAddListRequests.length > 0 ? payItem[idx].payParametersAddListRequests[0].value : undefined} />
天后申请上调<Input onChange={(e) => handleBlur(e, 'describe', idx)} value={payItem[idx].payParametersAddListRequests.length > 0 ? payItem[idx].payParametersAddListRequests[0].describe : undefined} addonAfter="%" /> 天后申请上调<Input onChange={(e) => handleBlur(e, 'describe', idx)} value={payItem[idx].payParametersAddListRequests.length > 0 ? payItem[idx].payParametersAddListRequests[0].describe : undefined} addonAfter="%" />
</Space> </Space>
</div> </div>
......
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