lxf 1 год назад
Родитель
Сommit
a1906dbb49

+ 6 - 3
src/components/byForm/index.vue

@@ -406,10 +406,13 @@ const handleSubmit = async (onSubmit) => {
   }
 };
 const byform = ref(null); // 延迟使用,因为还没有返回跟挂载
+const resetFields = () => {
+  nextTick(() => {
+    proxy.$refs.byForm.resetFields();
+  });
+};
 onMounted(() => {});
-defineExpose({
-  handleSubmit,
-});
+defineExpose({ handleSubmit, resetFields });
 formDataInit();
 loadInit();
 </script>

+ 1 - 2
src/views/production/operation/overclaim/index.vue

@@ -145,10 +145,9 @@ const submitForm = () => {
 };
 const clickCancel = () => {
   formData.data = {
-    orderId: "",
-    exceedReceiveReason: "",
     productionCostList: [],
   };
+  submit.value.resetFields();
 };
 </script>