shish 2 лет назад
Родитель
Сommit
435ae971a8
2 измененных файлов с 18 добавлено и 4 удалено
  1. 16 3
      ghsApp/src/admin/billing/affirm.vue
  2. 2 1
      ghsApp/src/admin/billing/index.vue

+ 16 - 3
ghsApp/src/admin/billing/affirm.vue

@@ -548,12 +548,24 @@ export default {
       }
 
       let Fn = createOrder
-      let params = {...formData,modifyPrice: this.modifyPrice,newVersion:1};
+      let book = this.option.book ? this.option.book : 0
+      let params = {...formData,modifyPrice: this.modifyPrice,newVersion:1,book:book};
       if(this.option.orderId && this.option.orderId > 0){
         Fn = updateOrder
         params = {...params,id:this.option.orderId}
       }
 
+      if(book == 1){
+        if(this.form.hasPay != 2){
+          this.$msg('预订单只能选择赊账');
+          return false
+        }
+        if(Number(this.form.sendCost)>0){
+          this.$msg('预订单不能填写运费')
+          return false
+        }
+      }
+
       //多颜色
       let xj = uni.getStorageSync("xj"+this.option.customId)
       params = {...params,xj:JSON.stringify(xj)}
@@ -588,10 +600,11 @@ export default {
       this.$refs.diffPriceRef.close()
     },
     gobackEvent () {
-      this.$util.pageTo({url: '/admin/billing/index',type:2,query: {customId: this.option.customId}})
+      let book = this.option.book ? this.option.book : 0
+      this.$util.pageTo({url: '/admin/billing/index?customId='+this.option+'&book='+book.customId,type:2})
     },
     pageToItemList() {
-      this.$util.pageTo({url: '/admin/billing/index',type:2,query: {customId: this.option.customId}})
+      this.$util.pageTo({url: '/admin/billing/index?customId='+this.option.customId,type:2})
     }
   }
 };

+ 2 - 1
ghsApp/src/admin/billing/index.vue

@@ -240,7 +240,8 @@ export default {
 			}
 			let customName = this.option.customName ? this.option.customName : '';
 			let orderId = this.option.orderId  ? this.option.orderId : 0
-			this.$util.pageTo({ url: '/admin/billing/affirm',type:2,query: {customId:this.option.customId,customName:customName,orderId:orderId}})
+			let book = this.option.book ? this.option.book : 0
+			this.$util.pageTo({ url: '/admin/billing/affirm',type:2,query: {customId:this.option.customId,customName:customName,orderId:orderId,book:book}})
 		}
 	}
 };