Commit cb335d0f9086e3e2f6fef65d540fb4ff6896af67

Authored by 谢忠泽
1 parent 0bc2e94e

fix:快递收费标准优化

src/pages/contract/ExpressChargingStandardSetting/components/AddModel/index.tsx
... ... @@ -142,14 +142,14 @@ function AddModel({visible, row, compList, cityList, onCancel, onRefresh}:Props)
142 142 name="firstWeight"
143 143 rules={[{required: true, message: '请填写首重'}]}
144 144 >
145   - <InputNumber placeholder="请填写" addonAfter="kg" max={100000000} min={0} precision={2} />
  145 + <InputNumber placeholder="请填写" addonAfter="元/kg" max={100000000} min={0} precision={2} />
146 146 </Form.Item>
147 147 <Form.Item
148 148 label="续重"
149 149 name="continuedWeight"
150 150 rules={[{required: true, message: '请填写续重'}]}
151 151 >
152   - <InputNumber placeholder="请填写" addonAfter="kg" max={100000000} min={0} precision={2} />
  152 + <InputNumber placeholder="请填写" addonAfter="元/kg" max={100000000} min={0} precision={2} />
153 153 </Form.Item>
154 154 <Form.Item
155 155 label="到达地区"
... ...
src/pages/contract/ExpressChargingStandardSetting/components/Filter/index.tsx
... ... @@ -19,13 +19,13 @@ function Filter({ compList, cityList, setParams, innerParams }:Props) {
19 19 const [searchData, setSearchData] = useState<SearchData>({});
20 20 return (
21 21 <Row style={{flex: 1}}>
22   - <Col span={6}>
  22 + <Col span={8} style={{marginRight: 10}}>
23 23 <Select
24 24 placeholder="请选择往来单位"
25 25 showSearch
26 26 optionFilterProp="children"
27 27 allowClear
28   - style={{ width: 280 }}
  28 + style={{ minWidth: 260, maxWidth: 280 }}
29 29 onChange={(tradeCompId) => {
30 30 setSearchData({...searchData, tradeCompId});
31 31 setParams({...innerParams, ...searchData, tradeCompId}, true);
... ... @@ -40,7 +40,7 @@ function Filter({ compList, cityList, setParams, innerParams }:Props) {
40 40 }
41 41 </Select>
42 42 </Col>
43   - <Col span={4}>
  43 + <Col span={6} style={{marginRight: 10}}>
44 44 <Select
45 45 placeholder="请选择寄件地区"
46 46 showSearch
... ... @@ -61,7 +61,7 @@ function Filter({ compList, cityList, setParams, innerParams }:Props) {
61 61 }
62 62 </Select>
63 63 </Col>
64   - <Col span={4}>
  64 + <Col span={6} style={{marginRight: 10}}>
65 65 <Select
66 66 placeholder="请选择到达地区"
67 67 showSearch
... ...
src/pages/contract/ExpressChargingStandardSetting/index.tsx
1   -import React, { useCallback, useState } from "react";
2   -import { Button, Card, ConfigProvider, Divider, Input, message, Popconfirm, Select, Table } from "antd";
  1 +import React, { useState } from "react";
  2 +import { Button, Card, ConfigProvider, Divider, message, Popconfirm, Table } from "antd";
3 3 import { PageHeaderWrapper } from "@ant-design/pro-layout";
4 4 import zhCN from "antd/lib/locale-provider/zh_CN";
5 5 import usePagination from "@/hooks/usePagination";
... ... @@ -9,7 +9,6 @@ import AddModel from &#39;./components/AddModel&#39;;
9 9 import Filter from './components/Filter';
10 10 import * as API from './api';
11 11 import _ from "lodash";
12   -import moment from 'moment';
13 12 import st from "./style.less";
14 13  
15 14 interface Props {
... ... @@ -28,7 +27,7 @@ function expressChargingStandard(props:Props) {
28 27 setLoading
29 28 } = usePagination<API.Item>(API.getStandardPage, {current: 1, pageSize: 10});
30 29 const { data: cityList, loading: cityLoading } = useInitial(API.getCityLsit, [], {});
31   - const { data: compList, loading: compLoading } = useInitial(API.fetchComps, [], {});
  30 + const { data: compList, loading: compLoading } = useInitial(API.fetchComps, [], {type: '88,138'});
32 31 const [row, setRow] = useState<API.Item>();
33 32 /**
34 33 * @description: 编辑
... ... @@ -96,8 +95,8 @@ function expressChargingStandard(props:Props) {
96 95 <Column title="往来单位" width={200} dataIndex="tradeCompName" render={(t:any) => t || "-"} />
97 96 <Column title="寄件地区" width={200} dataIndex="sendAreaName" render={(t:any) => t || '-'} />
98 97 <Column title="到达地区" width={200} dataIndex="arriveAreaName" render={(t:any) => t || '-'} />
99   - <Column title="首重(kg)" width={200} dataIndex="firstWeight" render={(t:any) => t || '-'} />
100   - <Column title="续重(kg)" width={200} dataIndex="continuedWeight" render={(t:any) => t || '-'} />
  98 + <Column title="首重(kg)" width={200} dataIndex="firstWeight" render={(t:any) => `${(t || t === 0) ? t+'元':'-'}`} />
  99 + <Column title="续重(kg)" width={200} dataIndex="continuedWeight" render={(t:any) => `${(t || t === 0) ? t+'元':'-'}`} />
101 100 <Column
102 101 title="操作"
103 102 width={100}
... ...