Commit 26a75089 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

修改新建物流公司接口,修改支付策略授信额度天数为正整数

parent d2f7e982
......@@ -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 defaultValue = 'lucy'
interface parmas {
......@@ -91,6 +85,7 @@ const company: React.FC<parmas> = (props) => {
const [visible, setsVisible] = useState(false) //state hook写法
const [selectRow, setSelectRow] = useState<Item[]>([]) // 模态框选择的行数据
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [excludeList, setExcludeList] = useState<Array<any>>([])
useEffect(() => {
let _title = pageStatus === PageStatus.PREVIEW ? '查看' : id ? '编辑' : '新建'
setHeaderTitle(`${_title}物流公司`)
......@@ -102,10 +97,6 @@ const company: React.FC<parmas> = (props) => {
setCompanyType(type)
})
}
return () => {
}
}, [])
const handleSubmitAllSetting = () => {
......@@ -160,8 +151,8 @@ const company: React.FC<parmas> = (props) => {
} else {
setCodeDisabled(false)
PublicApi.getLogisticsSelectListMemberCompanySelected().then(res => {
if(res.code === 1000) {
console.log(res)
if (res.code === 1000) {
setExcludeList(res.data)
}
})
}
......@@ -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 (
<PageHeaderWrapper
onBack={() => history.goBack()}
......
......@@ -6,7 +6,7 @@
*/
import React, { useState, useEffect } from 'react';
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 { PublicApi } from '@/services/api';
import PayWayRadio from './components/payWayRadio';
......@@ -108,6 +108,7 @@ const PayWaySetTemplate: React.FC<{}> = () => {
/** */
const handleBlur = (e, name, idx) => {
console.log(e)
const data = [...payItem]
const payParametersAddListRequests = data[idx].payParametersAddListRequests;
if(payParametersAddListRequests.length === 0) {
......@@ -116,9 +117,17 @@ const PayWaySetTemplate: React.FC<{}> = () => {
payParametersAddListRequests.map(item => {
for(let key in item) {
if(key === name) {
item[key] = e.target.value
if(name === 'value') {
item[key] = e
} else {
item[key] = e.target.value
}
}else {
item[name] = e.target.value
if(name === 'value') {
item[name] = e
} else {
item[name] = e.target.value
}
}
}
item.type = 6;
......@@ -164,7 +173,7 @@ const PayWaySetTemplate: React.FC<{}> = () => {
<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, '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="%" />
</Space>
</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