|
|
@ -18,6 +18,7 @@ const RecordReviewModal = (props) => { |
|
|
|
disabledAuditReason = false, |
|
|
|
onCancel, // 关闭弹框 |
|
|
|
onChangeSubmit, // 提交审核 |
|
|
|
buttonLoad = false, // 提交/退回审核加载 |
|
|
|
carOutTimeColor="", // 车辆出场时间样式 |
|
|
|
} = props; |
|
|
|
// 默认数据 |
|
|
@ -93,6 +94,7 @@ const RecordReviewModal = (props) => { |
|
|
|
const [getValueList, setGetValueList] = useState(4); // 变更项下拉框 |
|
|
|
const [adjustmentValue, setAdjustmentValue] = useState(1); // 调整基于选择框值 |
|
|
|
const [plateCalorData, setPlateCalorData] = useState([]); |
|
|
|
const [loading, setLoading] = useState(false); // 提交/退回审核加载 |
|
|
|
|
|
|
|
// 获取车牌颜色数据 |
|
|
|
const $plateColor = () => { |
|
|
@ -103,6 +105,7 @@ const RecordReviewModal = (props) => { |
|
|
|
|
|
|
|
// 关闭模态框 |
|
|
|
const $onCancelModal = () => { |
|
|
|
if(loading) return; |
|
|
|
if (onCancel) onCancel(false); |
|
|
|
setResultData([]); |
|
|
|
setExpandedRowKeys([0]); |
|
|
@ -157,6 +160,10 @@ const RecordReviewModal = (props) => { |
|
|
|
}; |
|
|
|
}, [data]); |
|
|
|
|
|
|
|
useEffect(()=> { |
|
|
|
setLoading(buttonLoad); |
|
|
|
}, [buttonLoad]); |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
$plateColor(); |
|
|
|
}, []); |
|
|
@ -413,17 +420,17 @@ const RecordReviewModal = (props) => { |
|
|
|
: null |
|
|
|
} |
|
|
|
{type == "处理" ? |
|
|
|
<Button type="primary" onClick={() => {if(onChangeSubmit)onChangeSubmit(formData)}}>提交审核</Button> |
|
|
|
<Button type="primary" loading={loading} onClick={() => {if(onChangeSubmit)onChangeSubmit(formData)}}>提交审核</Button> |
|
|
|
: null |
|
|
|
} |
|
|
|
{type== "审核" && !processView ? |
|
|
|
<> |
|
|
|
<Button type="primary" onClick={() => {if(onChangeSubmit)onChangeSubmit({...formData, deal_type: 1, deal_record_id: data?.[0]?.deal_record_id})}}>提交审核</Button> |
|
|
|
<Button type="primary" onClick={() => {if(onChangeSubmit)onChangeSubmit({...formData, deal_type: 2, deal_record_id: data?.[0]?.deal_record_id})}}>退回审核</Button> |
|
|
|
<Button type="primary" loading={loading} onClick={() => {if(onChangeSubmit)onChangeSubmit({...formData, deal_type: 1, deal_record_id: data?.[0]?.deal_record_id})}}>提交审核</Button> |
|
|
|
<Button type="primary" loading={loading} onClick={() => {if(onChangeSubmit)onChangeSubmit({...formData, deal_type: 2, deal_record_id: data?.[0]?.deal_record_id})}}>退回审核</Button> |
|
|
|
</> |
|
|
|
: null |
|
|
|
} |
|
|
|
<Button onClick={$onCancelModal}>关闭窗口</Button> |
|
|
|
<Button disabled={loading} onClick={$onCancelModal}>关闭窗口</Button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</Modal> |
|
|
|