Kaynağa Gözat

fix: 修改信息

刘秀芳 2 hafta önce
ebeveyn
işleme
6e3b78db41
1 değiştirilmiş dosya ile 4 ekleme ve 5 silme
  1. 4 5
      src/views/old_mini/modify_work/index.vue

+ 4 - 5
src/views/old_mini/modify_work/index.vue

@@ -505,8 +505,8 @@ const showPriceSheetPopup = () => {
 };
 
 const detailData = ref({});
-const getDetail = (id) => {
-    VE_API.z_farm_work_record.getDetail({ id }).then(({ data }) => {
+const getDetail = async (id) => {
+    const { data } = await VE_API.z_farm_work_record.getDetail({ id });
         const res = data[0];
         detailData.value = res;
         dynamicValidateForm.executeDate = res.executeDate;
@@ -521,7 +521,6 @@ const getDetail = (id) => {
         dynamicValidateForm.prescriptionList = res.prescriptionList;
 
         getFarmWorkArrangeDetail(res.farmWorkArrangeId);
-    });
 };
 
 
@@ -895,11 +894,11 @@ const submit = () => {
         id: route.query.id,
         ...dynamicValidateForm,
     };
-    VE_API.z_farm_work_record.issueFarmWorkRecord(data).then((res) => {
+    VE_API.z_farm_work_record.issueFarmWorkRecord(data).then(async (res) => {
         if (res.code === 0) {
             // taskPopupType.value = 'success';
             // showTaskPopup.value = true;
-            
+            await getDetail(route.query.id);
             showPriceSheetPopup()
         }
     })