shipeng 1 týždeň pred
rodič
commit
439f2cdf8d

+ 6 - 47
src/views/order/groupBuyingMr/dialog/aduitInvoice.vue

@@ -90,8 +90,6 @@
 <script>
 import { 
   saveAndEdit,
-  getSelectById,
-  getInvoiceInfo
 } from '@/api/order/groupBuyingMr';
 import Editor from "@/components/Editor";
 
@@ -145,64 +143,25 @@ export default {
     };
   },
   methods: {
-    /**
-     * 打开弹框
-     * @date 2023-11-22
-     * @param {any} obj
-     * @returns {any}
-     */
+    // 打开弹框
     openDialog(title, obj, type) {
       this.isShow = true;
-      // this.$set(this.form, 'handlerType', 2);
       // this.reset();
       this.$set(this.aduitForm, 'invoiceAmount', obj.realPrice || obj.invoiceAmount);
       this.$set(this.aduitForm, 'id', type ? obj.orderId: obj.id);
       this.$set(this.aduitForm, 'handlerType', 2);
       this.$nextTick(() => {
         if (this.$refs["aduitForm"]) {
-          console.log('表单已初始化');
+          // console.log('表单已初始化');
+          this.$refs["aduitForm"].clearValidate();
         }
       });
-      // this.$nextTick(() => {
-      //     this.$refs["aduitForm"].clearValidate();
-      // });
-      // if (obj) {
-      //   // this.getSelectByIdApi(obj);
-      // } else {
-      //   this.$nextTick(() => {
-      //     this.$refs["aduitForm"].clearValidate();
-      //   });
-      // }
-    },
-    /** 获取开票信息 */
-    getSelectByIdApi(row) {
-      const id = row.id
-      getInvoiceInfo(id).then(response => {
-        const obj = response.data;
-        this.$nextTick(() => {
-          this.$nextTick(() => {
-            this.$set(this.aduitForm, 'id', obj.id);
-            this.$set(this.aduitForm, 'handlerType', obj.handlerType);
-            this.$set(this.aduitForm, 'name', obj.name);
-            this.$set(this.aduitForm, 'invoiceLine', obj.invoiceLine)
-            this.$set(this.aduitForm, 'email', obj.email);
-            this.$set(this.aduitForm, 'invoiceAmount', obj.invoiceAmount);
-            this.$set(this.aduitForm, 'creditCode', obj.creditCode);
-            this.$nextTick(() => {
-              this.$refs["aduitForm"].clearValidate();
-            });
-          });
-        });
-      });
     },
     // 保存
     submitForm() {
-      console.log(this.formRules,'55555');
-      console.log(this.$refs["aduitForm"], '111'); // 检查表单引用
+      // console.log(this.$refs["aduitForm"], '111'); // 检查表单引用
       this.$refs["aduitForm"].validate((valid) => {
-        console.log('校验结果:', valid); // 检查校验结果
         if (valid) {
-          console.log(3333, '111333'); // 校验通过后的逻辑
           try {
             this.loading = true;
             let params = {
@@ -225,12 +184,12 @@ export default {
               }
             });
           } catch (error) {
-            console.error(error);
+            // console.error(error);
           } finally {
             this.loading = false;
           }
         } else {
-          console.error('表单校验失败');
+          // console.error('表单校验失败');
         }
       });
     },

+ 4 - 6
src/views/order/groupBuyingMr/index.vue

@@ -867,10 +867,9 @@ export default {
               } catch (error) {
                 this.dialogVisible = false
                 this.dialogVisibleLoading = false
-                console.error("error=====",error)
               }
             } else {
-              console.log('error submit!!');
+              // console.log('error submit!!');
               return false;
             }
           });
@@ -1017,7 +1016,7 @@ export default {
                     this.$message.error('授信额度不足')
                     return
                   }
-                  console.log('this.form',this.form);
+                  // console.log('this.form',this.form);
                   res = await creditPay({
                     orderId: this.form.orderId
                   })
@@ -1135,7 +1134,7 @@ export default {
               this.handleExportLoading = false;
             })
             .catch((error) => {
-              console.log("error===",error)
+              // console.log("error===",error)
               this.handleExportLoading = false;
             });
         })
@@ -1187,7 +1186,7 @@ export default {
 
     /**  上传图片 单张  */
   handleAvatarSuccess(response, file, fileList) {
-      console.log("res, file",response, file, fileList)
+      // console.log("res, file",response, file, fileList)
       this.actionUrlLoading = false
       if(response.code == 200) {
         this.form.photoList.push(response.data.url)
@@ -1280,7 +1279,6 @@ export default {
     },
     // 开具发票
     handleOrderInvoice(row) {
-      console.log(row,'row1111');
       if(row.ifInvoice === 1 ) {
         // 已开票
         this.$refs["detailInvoice"].openDialog("开票详情", row);