guoyujia il y a 4 mois
Parent
commit
01a627ed89
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      src/views/business/inventoryCheck/index.vue

+ 3 - 1
src/views/business/inventoryCheck/index.vue

@@ -246,6 +246,7 @@
                   link
                   icon="Check"
                   v-if="scope.row.editStatus"
+                  :loading = !canSave
                   type="success"
                   @click="handleSave(scope.row)"
                   >保存</el-button
@@ -341,10 +342,10 @@ function handleAdd() {
     selectDateStatus: true,
   });
   hasAlreadyAddTakeStock.value = true;
+  canSave.value = true
 }
 //保存按钮
 function handleSave(row) {
-  canSave.value = true
   if (row.stockTime == null) {
     proxy.$modal.msgError("请选择盘点时间");
     return;
@@ -353,6 +354,7 @@ function handleSave(row) {
   row.stockMonth = row.stockTime.substring(5, 7);
   console.log(row);
   if(canSave.value){
+    canSave.value = false
   addTakeStockPeriod(row).then((res) => {
     canSave.value = false;
     if (res.code === 200) {