ly 1 年間 前
コミット
bfaa856195

+ 1 - 1
src/views/business/production/salary/view.vue

@@ -352,7 +352,7 @@ function loadData() {
     form.value = { ...proxy.deepClone(emptyForm), ...res.data };
     computeTotal();
   }).finally(() => {
-    loading.value = true
+    loading.value = false
   });
 }
 

+ 15 - 3
src/views/business/production/salaryZero/form.vue

@@ -8,6 +8,8 @@
     @close="close"
     :close-on-click-modal = "false"
   >
+
+<div v-loading="loading">
     <!-- <div slot="title" class="dialog-title-container">
       <span class="title-label"><i class="el-icon-document" /> 工资信息</span>
       <i class="el-icon-close" @click="close" />
@@ -419,6 +421,7 @@
     <import-excel-dialog-customer ref="importExcelDialogRef"  :companyId = "companyId" v-bind="$attrs" @loadData ="loadData"/>
     <!-- <feedback-dialog ref="feedbackDialogView" :parent="this" />
     <print-dialog ref="printDialog" :parent="this" /> -->
+  </div>
   </el-dialog>
 </template>
 <script setup>
@@ -442,7 +445,7 @@ const props = defineProps({
     default: () => {},
   },
 });
-
+const loading = ref(false)
 const { getList } = toRefs(props);
 const total = ref(0);
 
@@ -499,6 +502,7 @@ function open(detail) {
 }
 
 function loadData() {
+  loading.value = true
   getDetail(form.value).then((res) => {
     form.value = { ...proxy.deepClone(emptyForm), ...res.data };
     if (form.value.status === 2 || form.value.status === 3) {
@@ -506,7 +510,9 @@ function loadData() {
       close();
     }
     computeTotal();
-  });
+  }).finally(() => {
+    loading.value = false
+  });;
 }
 
 function close() {
@@ -641,18 +647,24 @@ function handleSave(status) {
       const saveValue = proxy.deepClone(form.value);
       saveValue.status = status;
       if (saveValue.id == null) {
+        loading.value = true
         saveDetail(saveValue).then((res) => {
           proxy.$modal.msgSuccess("保存成功");
           reset();
           close();
           getList.value();
-        });
+        }).finally(() => {
+          loading.value = false
+        })
       } else {
+        loading.value = true
         updateDetail(saveValue).then((res) => {
           proxy.$modal.msgSuccess("保存成功");
           reset();
           close();
           getList.value();
+        }).finally(() => {
+          loading.value = false
         });
       }
     })