lxf 1 سال پیش
والد
کامیت
a1906dbb49
2فایلهای تغییر یافته به همراه7 افزوده شده و 5 حذف شده
  1. 6 3
      src/components/byForm/index.vue
  2. 1 2
      src/views/production/operation/overclaim/index.vue

+ 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>