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