Procházet zdrojové kódy

feat:基础版升级更新加锁,加接口在升级完成后调用sys接口跟新tenant,非匹配工单修改查询sql跟完成升级时的sql验证一致

ly před 11 měsíci
rodič
revize
2dc6a45633

+ 10 - 10
src/views/business/upgrade/noContractWorkOrder/index.vue

@@ -3,7 +3,7 @@
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
 
-    <div id="listbutton">
+    <div class="listbutton">
         <el-button type="primary" size="small"
                    icon="Download" @click="handleExport"
                    v-hasPermi="['business:upgrade:workOrder:export']">导出
@@ -377,7 +377,7 @@
   }
 
   function Upgrade() {
-
+    fullscreenLoading.value = true;
 
     //这个是检查是否有未匹配工单
     checkMatchWorkOrder();
@@ -390,8 +390,10 @@
     const promise = checkWorkOrder();
     promise.then((res)=>{
       if(res.msg === "true"){
+        fullscreenLoading.value = false;
         return Promise.reject("您尚未完成工单匹配,还有工单缺少合同,请先去补全合同");
       }else{
+        fullscreenLoading.value = false;
       return ElMessageBox.confirm("升级后,您的账套将会切换成为标准版,您确定完成吗").then(()=>{
           fullscreenLoading.value = true;
           return completeUpgrade()
@@ -402,13 +404,11 @@
     })
       .then((res) => {
       fullscreenLoading.value = false;
-      proxy.$alert(
-          "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
-          res.msg +
-          "</div>"
-          ,
-          {dangerouslyUseHTMLString: true}
-      );
+        ElMessageBox.alert(res.msg, '消息', {
+          confirmButtonText: '确认',
+          callback: (action) => {
+          },
+        })
     })
       .catch((e) => {
         fullscreenLoading.value = false;
@@ -426,7 +426,7 @@
   getList();
 </script>
 <style>
-  #listbutton{
+  .listbutton{
     display: flex;
     justify-content: space-between;
   }

+ 1 - 7
src/views/business/upgrade/order/form.vue

@@ -256,13 +256,7 @@
                               item.timeVo.endTime.substr(0,item.timeVo.endTime.length - 3) }}</div>
                           </el-form-item>
                         </el-col>
-                        <el-col :span="4" style="padding-top: 18px">
-                          <el-form-item label="工单编号" >
-                            <div>{{item.id}}</div>
-                            <div><el-button link type="primary" size="small" @click="workOrderIdUpdate(item.id)"
-                                            v-hasPermi="['business:upgrade:order:edit']">更换</el-button></div>
-                          </el-form-item>
-                        </el-col>
+
                         <el-col :span="4" style="padding-top: 18px" v-if="item.taskTypeId ==4">
 
                         </el-col>

+ 5 - 9
src/views/business/upgrade/order/importExcelDialog.vue

@@ -77,7 +77,7 @@
     <template #footer>
       <div class="dialog-footer">
         <el-button
-          v-loading.fullscreen.lock="fullscreenLoading"
+          v-loading.fullscreen.lock="fullLoading"
           type="primary"
           icon="Finished"
           size="small"
@@ -115,7 +115,7 @@ const { getList } = toRefs(props);
 /** 表单抽屉 页变量 */
 const fileList = ref([]);
 const visible = ref(false);
-const fullscreenLoading = ref(false);
+const fullLoading = ref(false);
 const addType = ref(1);
 const webHost = import.meta.env.VITE_APP_BASE_API;
 
@@ -245,6 +245,7 @@ function cancel() {
 }
 
 function submitForm() {
+  fullLoading.value = true;
   submitFileForm();
 }
 
@@ -281,6 +282,7 @@ const handleFileUploadProgress = (event, file, fileList) => {
 };
 /** 文件上传成功处理 */
 const handleFileSuccess = (response, file, fileList) => {
+  fullLoading.value = false;
   if (addType === 1) {
     uploadLoop.open = false;
     uploadLoop.isUploading = false;
@@ -309,13 +311,7 @@ const handleFileSuccess = (response, file, fileList) => {
 };
 /** 提交上传文件 */
 function submitFileForm() {
-  fullscreenLoading.value = true;
-  const promise = Promise.resolve(proxy.$refs["uploadRef"].submit());
-  promise.then((result) => {
-    fullscreenLoading.value = false;
-  }).catch((err) => {
-    fullscreenLoading.value = false;
-  })
+  proxy.$refs["uploadRef"].submit();
 }
 
 // 暴露给父组件的方法