+ var data={couponType:2,useMinPrice:this.price.payPrice};
+ getMyEnableCouponList(data).then(res => {
+ this.couponVisible=true;
+ that.couponsList = res.data
+ })
+ },
+ integralChange(e){
+ this.form.useIntegral=e?1:0
+ this.computed()
+ },
+ confirm(item){
+ // let data = {type:this.type,cartIds:this.cartIds};
+ confirm(this.confirmParam).then(
+ res => {
+ if(res.code==200){
+
+ this.carts=res.carts.map(item=>({
+ ...item,
+ markinfo: ""
+ }));
+ this.form.orderKey=res.orderKeys;
+ if(res.address!=null){
+ this.form.addressId=res.address.id;
+ this.address=res.address;
+ }
+ this.computed()
+ }else{
+
+ uni.showToast({
+ icon:'none',
+ title: res.msg,
+ });
+ }
+ },
+ rej => {}
+ );
+ },
+ computed(item){
+ let data = {createOrderKey:this.form.createOrderKey,couponUserId:this.couponUserId,orderKeys:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral};
+ data = {createOrderKey:this.form.createOrderKey,orderCreateType:3,tuiUserId:tuiUserId,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:mark,orderKeys:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1};
+ }
+ else{
+ data = {createOrderKey:this.form.createOrderKey,orderCreateType:3,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:mark,orderKeys:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1};
+ data = {orderCreateType:1,tuiUserId:tuiUserId,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:mark,orderKeys:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1};
+ }
+ else{
+ data = {orderCreateType:1,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:mark,orderKeys:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1};
+ var data={packageCateId:this.package.cateId,couponType:1,useMinPrice:this.totalMoney};
+ getMyEnableCouponList(data).then(res => {
+ this.couponVisible=true;
+ that.couponsList = res.data
+ })
+ },
+ confirmPackageOrder(){
+ let data = {packageId:this.packageId,couponUserId:this.couponUserId};
+ confirmPackageOrder(data).then(
+ res => {
+ if(res.code==200){
+ this.form.orderKey=res.orderKey;
+ this.address=res.address;
+ this.package=res.package;
+ if(res.address!=null){
+ this.form.addressId=res.address.id;
+ }
+ this.totalMoney=res.totalMoney;
+
+ }else{
+
+ uni.showToast({
+ icon:'none',
+ title: res.msg,
+ });
+ }
+ },
+ rej => {}
+ );
+ },
+ computedPackageOrder(){
+ let data = {packageId:this.packageId,couponUserId:this.couponUserId};
+ computedPackageOrder(data).then(
+ res => {
+ if(res.code==200){
+ this.totalMoney=res.totalMoney;
+
+ }else{
+
+ uni.showToast({
+ icon:'none',
+ title: res.msg,
+ });
+ }
+ },
+ rej => {}
+ );
+ },
+
+ // 提交订单
+ submitOrder() {
+ var that=this;
+ if(this.form.orderKey==null){
+ uni.showToast({
+ icon:'none',
+ title: '订单KEY不存在',
+ });
+ return;
+ }
+ if(this.form.addressId==null){
+ uni.showToast({
+ icon:'none',
+ title: '收货地址不能为空',
+ });
+ return;
+ }
+
+ uni.requestSubscribeMessage({
+ tmplIds: this.temps,
+ success(res) {
+ that.createPackageOrder();
+ },
+ fail(res) {
+ that.createPackageOrder();
+ }
+ })
+
+
+ },
+ createPackageOrder(){
+ var that=this;
+ uni.showLoading({
+ title: '正在处理中...'
+ });
+ let data = {couponUserId:this.couponUserId,mark:this.form.mark,orderKey:this.form.orderKey,addressId:this.form.addressId,packageId:this.packageId,companyUserId:this.companyUserId};