|
@@ -5,6 +5,7 @@
|
|
|
:title="title"
|
|
|
@visible-change="handleVisibleChange"
|
|
|
@cancel="resetFields"
|
|
|
+ minHeight="900px"
|
|
|
@ok="handleConfirm"
|
|
|
>
|
|
|
<div class="pt-2px pr-3px zdysrk">
|
|
@@ -256,18 +257,7 @@
|
|
|
{
|
|
|
field: 'useType',
|
|
|
componentProps: {
|
|
|
- onChange: (value) => {
|
|
|
- updateSchema([
|
|
|
- { field: 'projectNum', ifShow: value == '4' },
|
|
|
- { field: 'companyName', ifShow: value != '3' },
|
|
|
- { field: 'businessDept', ifShow: value != '3' },
|
|
|
- { field: 'businessName', ifShow: value != '3' },
|
|
|
- { field: 'customerPayTime', ifShow: value != '3' },
|
|
|
- { field: 'customerName', ifShow: value != '3' },
|
|
|
- { field: 'customerType', ifShow: value != '3' },
|
|
|
- { field: 'endCustomer', ifShow: value != '3' },
|
|
|
- ]);
|
|
|
- },
|
|
|
+ onChange: useTypeChange,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -296,6 +286,7 @@
|
|
|
},
|
|
|
},
|
|
|
]);
|
|
|
+ useTypeChange(data.useType || 0);
|
|
|
});
|
|
|
async function onDataReceive(data) {
|
|
|
let incrementEndTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
|
@@ -311,6 +302,9 @@
|
|
|
resetFields();
|
|
|
fileFlow.type = data.type;
|
|
|
fileFlow.id = data.id;
|
|
|
+ if(data.id){
|
|
|
+ delete data.customerPayTime
|
|
|
+ }
|
|
|
setFieldsValue({
|
|
|
...data,
|
|
|
incrementEndTime,
|
|
@@ -352,6 +346,18 @@
|
|
|
},
|
|
|
});
|
|
|
}
|
|
|
+ const useTypeChange = (value) => {
|
|
|
+ updateSchema([
|
|
|
+ { field: 'projectNum', ifShow: value == '4' },
|
|
|
+ { field: 'companyName', ifShow: value != '3' },
|
|
|
+ { field: 'businessDept', ifShow: value != '3' },
|
|
|
+ { field: 'businessName', ifShow: value != '3' },
|
|
|
+ { field: 'customerPayTime', ifShow: value != '3' },
|
|
|
+ { field: 'customerName', ifShow: value != '3' },
|
|
|
+ { field: 'customerType', ifShow: value != '3' },
|
|
|
+ { field: 'endCustomer', ifShow: value != '3' },
|
|
|
+ ]);
|
|
|
+ };
|
|
|
const handleSubmit = async () => {
|
|
|
const submitUrl = AddUserIncrementApi;
|
|
|
try {
|