ly 1 ano atrás
pai
commit
111402cdb1

+ 27 - 4
src/views/business/entrust/workOrder/currentMonth/index.vue

@@ -113,6 +113,15 @@
     <set-entrust-dialog ref="setEntrustDialogRef" :get-list="getList" @submit="handleAddEntrust" />
 
     <exports ref="exportRef" :get-list="getList"></exports>
+    <el-dialog title="取消委托" v-model="cancelEntrust" width="720px" append-to-body size="small" draggable
+      :close-on-click-modal="false">
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" icon="Finished" size="small" @click="handleQuery">确 定</el-button>
+          <el-button icon="close" size="small" @click="cancelEntrust = false">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
   </div>
 </template>
 
@@ -153,7 +162,7 @@
   const setEntrustDialogRef = ref(null);
 
   const showInitMonth = ref(false);
-
+  const cancelEntrust = ref(false);
   const { contract_verify_status } = proxy.useDict("contract_verify_status");
   const { contract_status } = proxy.useDict("contract_status");
   /** 查询对象 */
@@ -280,12 +289,26 @@
     const entrust = {
       workMonth: currentMonth.value,
       workOrderIds: ids.value,
+
     };
     proxy.$modal.confirm("是否确认取消委托?").then(() => {
+      loading.value = true; // 
       delEntrust(entrust).then((res) => {
-        proxy.$modal.msgSuccess("取消成功");
-        getList();
-      });
+        if (res.data != null) {
+          console.log(res.data.companyName);
+          res.data.companyName
+          res.data.com
+          cancelEntrust.value = true;
+        } else {
+          proxy.$modal.msgSuccess("取消成功");
+          getList();
+        }
+        loading.value = false;
+      }).catch(() => {
+       
+      }).finally(() => {
+        loading.value = false; // 确保在请求完成时也关闭加载状态
+      })
     });
   }
 

+ 1 - 1
src/views/business/production/archiveTicket/index.vue

@@ -213,7 +213,7 @@
     pageSize: 20,
     orderByColumn: "create_time",
     year: proxy.moment().format("YYYY"),
-    month: proxy.moment().format("MM"),
+    month: proxy.moment().format("MM")-1,
     principal: tenant.versionId !== '4' && !flag.value ? useUserStore().user.userId : null,
   });