Pārlūkot izejas kodu

订单新增增加主账号判断调整

qymljy 1 gadu atpakaļ
vecāks
revīzija
9cc618b41c

+ 15 - 18
src/SManagement/user/pay-orders/modules/add.vue

@@ -214,17 +214,28 @@ export default {
   components:{tableLayout},
   methods:{
     async onShow(){
+      this.queryInstructions()
+      this.queryCoupon()
+      this.creatOrder()
+    },
+    /*新建订单*/
+    async creatOrder(){
       let params = {
         "id": 20230908131502,
         "content":{}
       }
       const res = await this.$api.requested(params)
       console.log(res.data)
-      if (res.data){
+      if (res.data.isexistaccount){
         this.dialogVisible = true
-        this.queryInstructions()
-        this.queryCoupon()
-        this.creatOrder()
+        const res = await this.$api.requested({
+          "classname": "system.payorder.payorder",
+          "method": "createOrder",
+          "content": {},
+        })
+        this.form.sys_payorderid = res.data.sys_payorderid
+        this.form.orderno = res.data.orderno
+        this.queryVersion()
       }else {
         this.$confirm('您的团队缺少主账号无法使用,请联系客服!', '提示', {
           confirmButtonText: '确定',
@@ -243,22 +254,8 @@ export default {
           this.usAccountNum = 0
           this.isleader = 0
         }).catch(() => {
-
         });
       }
-
-
-    },
-    /*新建订单*/
-    async creatOrder(){
-      const res = await this.$api.requested({
-        "classname": "system.payorder.payorder",
-        "method": "createOrder",
-        "content": {},
-      })
-      this.form.sys_payorderid = res.data.sys_payorderid
-      this.form.orderno = res.data.orderno
-      this.queryVersion()
     },
     /*查询付费说明*/
     async queryInstructions(){

+ 5 - 0
src/components/layout/modules/aside.vue

@@ -138,6 +138,11 @@ export default {
               message: '已提醒负责人付费',
               type: 'success'
             });
+          }else {
+            this.$message({
+              message: res.msg,
+              type: 'warning'
+            });
           }
           console.log("关闭取消")