Commit 390939a7ae1600d77e6ebec5b8f46e8048144ca7

Authored by zhaofeng
1 parent 9308fabe

保证金账户、一般账户不能重复

src/pages/finance/SpecialAccount/FinancingCompany/components/CreateModal.tsx
@@ -10,7 +10,8 @@ const FormItem = Form.Item; @@ -10,7 +10,8 @@ const FormItem = Form.Item;
10 const { Option } = Select; 10 const { Option } = Select;
11 11
12 export default function CreateModal() { 12 export default function CreateModal() {
13 - const { visible, current, setCurrent, setVisible, fcList, accountList, setLoading, dealerId, brandList } = useStore(); 13 + const { visible, current, setCurrent, setVisible, fcList, accountList, setLoading, dealerId, brandList, type } =
  14 + useStore();
14 const [form] = Form.useForm(); 15 const [form] = Form.useForm();
15 16
16 const [saveLoading, setSaveLoading] = useState<boolean>(false); 17 const [saveLoading, setSaveLoading] = useState<boolean>(false);
@@ -76,6 +77,10 @@ export default function CreateModal() { @@ -76,6 +77,10 @@ export default function CreateModal() {
76 } 77 }
77 78
78 function submit(fieldValue: any) { 79 function submit(fieldValue: any) {
  80 + if (fieldValue.depositAccount.value === fieldValue.account.value) {
  81 + message.error("还款保证金账户、一般账户请勿配置为同一一账户", 1.5);
  82 + return;
  83 + }
79 const param = { 84 const param = {
80 dealerId, 85 dealerId,
81 ...fieldValue, 86 ...fieldValue,
@@ -155,7 +160,7 @@ export default function CreateModal() { @@ -155,7 +160,7 @@ export default function CreateModal() {
155 {({ getFieldValue }): any => { 160 {({ getFieldValue }): any => {
156 const category = getFieldValue("compCategory"); 161 const category = getFieldValue("compCategory");
157 return category ? ( 162 return category ? (
158 - <FormItem label="融资公司" name="fcComp" rules={[{ required: true, message: "请选择融资公司" }]}> 163 + <FormItem label="往来银行" name="fcComp" rules={[{ required: true, message: "请选择往来银行" }]}>
159 <Select 164 <Select
160 showSearch 165 showSearch
161 labelInValue 166 labelInValue
@@ -185,7 +190,7 @@ export default function CreateModal() { @@ -185,7 +190,7 @@ export default function CreateModal() {
185 <Radio value={2}>每张票支付</Radio> 190 <Radio value={2}>每张票支付</Radio>
186 </Radio.Group> 191 </Radio.Group>
187 </FormItem> 192 </FormItem>
188 - <FormItem name="depositAccount" label="保证金账户"> 193 + <FormItem name="depositAccount" label="还款保证金账户">
189 <Select labelInValue placeholder="请选择账户" showSearch optionFilterProp="children" allowClear> 194 <Select labelInValue placeholder="请选择账户" showSearch optionFilterProp="children" allowClear>
190 {accountList.map((item) => ( 195 {accountList.map((item) => (
191 <Option key={item.id} value={item.id}> 196 <Option key={item.id} value={item.id}>
src/pages/finance/SpecialAccount/FinancingCompany/components/Filter.tsx
@@ -26,7 +26,6 @@ export default function AccountList() { @@ -26,7 +26,6 @@ export default function AccountList() {
26 }} 26 }}
27 > 27 >
28 <Row style={{ display: "flex", flex: 1, alignItems: 'center' }}> 28 <Row style={{ display: "flex", flex: 1, alignItems: 'center' }}>
29 - <div>商家:</div>  
30 <Col span={6}> 29 <Col span={6}>
31 <Select 30 <Select
32 placeholder="请选择商家" 31 placeholder="请选择商家"
@@ -44,7 +43,6 @@ export default function AccountList() { @@ -44,7 +43,6 @@ export default function AccountList() {
44 ))} 43 ))}
45 </Select> 44 </Select>
46 </Col> 45 </Col>
47 - <div style={{ marginLeft: 20 }}>品牌:</div>  
48 <Col span={6}> 46 <Col span={6}>
49 <Select 47 <Select
50 placeholder="请选择品牌" 48 placeholder="请选择品牌"
src/pages/finance/SpecialAccount/FinancingCompany/components/List.tsx
@@ -39,7 +39,7 @@ export default function SalesFinanceList() { @@ -39,7 +39,7 @@ export default function SalesFinanceList() {
39 } 39 }
40 > 40 >
41 <span> 41 <span>
42 - 保证金&nbsp;&nbsp; 42 + 还款保证金账户&nbsp;&nbsp;
43 <ExclamationCircleFilled style={{ color: "#40a9ff" }} /> 43 <ExclamationCircleFilled style={{ color: "#40a9ff" }} />
44 </span> 44 </span>
45 </Popover> 45 </Popover>