|
@@ -235,21 +235,42 @@ const Statistic = () => {
|
|
|
/>
|
|
|
)}
|
|
|
</ProFormDependency>
|
|
|
+
|
|
|
<ProFormDependency name={['showProduct']}>
|
|
|
{({ showProduct }) => (
|
|
|
<ProFormCheckbox.Group
|
|
|
- name="customer-additions"
|
|
|
- label="客户新增"
|
|
|
+ name="invoice-receivables"
|
|
|
+ label="应收款统计"
|
|
|
options={[{ value: 'access', label: '查看', disabled: !showProduct }]}
|
|
|
/>
|
|
|
)}
|
|
|
</ProFormDependency>
|
|
|
- <ProFormDependency name={['showProduct']}>
|
|
|
- {({ showProduct }) => (
|
|
|
+ </div>
|
|
|
+ <ProFormSwitch
|
|
|
+ fieldProps={{
|
|
|
+ onChange(checked) {
|
|
|
+ if (!checked) {
|
|
|
+ formRef.current?.setFieldsValue({
|
|
|
+ 'customer-additions': []
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ name="showCustomer"
|
|
|
+ label={
|
|
|
+ <span className="flex items-center">
|
|
|
+ <PieChartOutlined theme="outline" className="flex items-baseline mr-1" />
|
|
|
+ 客户数据
|
|
|
+ </span>
|
|
|
+ }
|
|
|
+ />
|
|
|
+ <div className="ml-25px">
|
|
|
+ <ProFormDependency name={['showCustomer']}>
|
|
|
+ {({ showCustomer }) => (
|
|
|
<ProFormCheckbox.Group
|
|
|
- name="invoice-receivables"
|
|
|
- label="应收款统计"
|
|
|
- options={[{ value: 'access', label: '查看', disabled: !showProduct }]}
|
|
|
+ name="customer-additions"
|
|
|
+ label="客户新增"
|
|
|
+ options={[{ value: 'access', label: '查看', disabled: !showCustomer }]}
|
|
|
/>
|
|
|
)}
|
|
|
</ProFormDependency>
|