Pārlūkot izejas kodu

feat(pages) feat团餐

clp 3 gadi atpakaļ
vecāks
revīzija
996099c99f

+ 2 - 1
app.json

@@ -48,7 +48,8 @@
     "pages/groupmeallist/submitOrder/submitOrder",
     "pages/groupmeallist/goodsManagement/goodsManagement",
     "pages/groupmeallist/address/address",
-    "pages/groupmeallist/addOrEditaddress/addOrEditaddress"
+    "pages/groupmeallist/addOrEditaddress/addOrEditaddress",
+    "pages/groupmeallist/couponlist/couponlist"
 
 
     

+ 115 - 0
pages/groupmeallist/addinvoices/addinvoices.js

@@ -1,10 +1,20 @@
 // pages/groupmeallist/addinvoices/addinvoices.js
+import invoice from '../../../api/invoice'
+const cache = require('../../../utils/cache.js');
 Page({
 
     /**
      * 页面的初始数据
      */
     data: {
+        mobile: '',
+        invoiceId: '',
+        invoiceTitle: '',
+        invoiceNo: '',
+        companyAddress: '',
+        companyPhone: '',
+        bankName: '',
+        bankAccount: '',
 
     },
 
@@ -12,6 +22,31 @@ Page({
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
+        let type = options.type;
+        let invoiceId = options.invoiceId;
+
+        console.log(type +invoiceId)
+        if (type == 'edit') {
+            invoice.getinvoicebyid({
+                mobile: cache.getMobile(),
+                invoiceId:2
+            }).then(res => {
+                console.log(res.data)
+                
+                this.setData({
+                    mobile:res.data.mobile,
+                    invoiceId:res.data.id,
+                    invoiceTitle:res.data.invoiceTitle,
+                    invoiceNo:res.data.invoiceNo,
+                    companyAddress:res.data.companyAddress,
+                    companyPhone:res.data.companyPhone,
+                    bankName:res.data.bankName,
+                    bankAccount:res.data.bankAccount,
+                })
+            })
+
+        }
+
 
     },
 
@@ -29,6 +64,86 @@ Page({
 
     },
 
+    invoiceTitle: function (e) {
+
+        let invoiceTitle = e.detail.value;
+        this.data.lock = false;
+        this.setData({
+            invoiceTitle,
+        })
+
+    },
+    invoiceNo: function (e) {
+
+        let invoiceNo = e.detail.value;
+        this.data.lock = false;
+        this.setData({
+            invoiceNo,
+        })
+
+    },
+
+    companyAddress: function (e) {
+
+        let companyAddress = e.detail.value;
+        this.data.lock = false;
+        this.setData({
+            companyAddress,
+        })
+
+    },
+
+    companyPhone: function (e) {
+
+        let companyPhone = e.detail.value;
+        this.data.lock = false;
+        this.setData({
+            companyPhone,
+        })
+
+    },
+
+    bankName: function (e) {
+
+        let bankName = e.detail.value;
+        this.data.lock = false;
+        this.setData({
+            bankName,
+        })
+
+    },
+
+
+    bankAccount: function (e) {
+
+        let bankAccount = e.detail.value;
+        this.data.lock = false;
+        this.setData({
+            bankAccount,
+        })
+
+    },
+//保存
+    save(){
+        invoice.addoreditinvoice({
+            mobile:cache.getMobile(),
+            invoiceId:this.data.invoiceId,
+            invoiceTitle:this.data.invoiceTitle,
+            invoiceNo:this.data.invoiceNo,
+            companyAddress:this.data.companyAddress,
+            companyPhone:this.data.companyPhone,
+            bankName:this.data.bankName,
+            bankAccount:this.data.bankAccount,
+
+        }).then(res=>{
+
+            wx.redirectTo({
+              url: '../invoicesList/invoicesList',
+            })
+
+        })
+    },
+
     /**
      * 生命周期函数--监听页面隐藏
      */

+ 7 - 7
pages/groupmeallist/addinvoices/addinvoices.wxml

@@ -5,35 +5,35 @@
 
     <view class="input_style flex-row">
         <view class="mar65">名称</view>
-        <input bindinput="listenInput" class="sosoinput" placeholder="抬头名称" bindblur="soso" focus="{{!openFocus}}" value="{{keyword}}" disabled="{{openFocus}}" />
+        <input bindinput="invoiceTitle" class="sosoinput" placeholder="抬头名称" bindblur="soso" focus="{{!openFocus}}" value="{{invoiceTitle}}" disabled="{{openFocus}}" />
     </view>
 
     <view class="input_style flex-row">
         <view class="mar65">税号</view>
-        <input bindinput="listenInput" class="sosoinput" placeholder="纳税人识别号" bindblur="soso" focus="{{!openFocus}}" value="{{keyword}}" disabled="{{openFocus}}" />
+        <input bindinput="invoiceNo" class="sosoinput" placeholder="纳税人识别号" bindblur="soso" focus="{{!openFocus}}" value="{{invoiceNo}}" disabled="{{openFocus}}" />
     </view>
 
     <view class="input_style flex-row">
         <view class="mar65">单位地址</view>
-        <input bindinput="listenInput" class="sosoinput" style="margin-left: 75rpx;" placeholder="公司地址(选填)" bindblur="soso" focus="{{!openFocus}}" value="{{keyword}}" disabled="{{openFocus}}" />
+        <input bindinput="companyAddress" class="sosoinput" style="margin-left: 75rpx;" placeholder="公司地址(选填)" bindblur="soso" focus="{{!openFocus}}" value="{{companyAddress}}" disabled="{{openFocus}}" />
     </view>
 
     <view class="input_style flex-row">
         <view class="mar65">电话号码</view>
-        <input bindinput="listenInput" class="sosoinput" style="margin-left: 75rpx;" placeholder="公司电话(选填)" bindblur="soso" focus="{{!openFocus}}" value="{{keyword}}" disabled="{{openFocus}}" />
+        <input bindinput="companyPhone" class="sosoinput" style="margin-left: 75rpx;" placeholder="公司电话(选填)" bindblur="soso" focus="{{!openFocus}}" value="{{companyPhone}}" disabled="{{openFocus}}" />
     </view>
 
     <view class="input_style flex-row">
         <view class="mar65">开户银行</view>
-        <input bindinput="listenInput" class="sosoinput"  style="margin-left: 75rpx;" placeholder="开户银行(选填)" bindblur="soso" focus="{{!openFocus}}" value="{{keyword}}" disabled="{{openFocus}}" />
+        <input bindinput="bankName" class="sosoinput"  style="margin-left: 75rpx;" placeholder="开户银行(选填)" bindblur="soso" focus="{{!openFocus}}" value="{{bankName}}" disabled="{{openFocus}}" />
     </view>
 
     <view class="input_style flex-row">
         <view class="mar65">银行账户</view>
-        <input bindinput="listenInput" class="sosoinput" style="margin-left: 75rpx;" placeholder="银行账户(选填)" bindblur="soso" focus="{{!openFocus}}" value="{{keyword}}" disabled="{{openFocus}}" />
+        <input bindinput="bankAccount" class="sosoinput" style="margin-left: 75rpx;" placeholder="银行账户(选填)" bindblur="soso" focus="{{!openFocus}}" value="{{bankAccount}}" disabled="{{openFocus}}" />
     </view>
 
-        <view class="submit">
+        <view class="submit" catchtap="save">
             保存
         </view>
 

+ 169 - 91
pages/groupmeallist/invoicesList/invoicesList.js

@@ -1,103 +1,181 @@
 // pages/listDel/index.js
+
+import invoice from '../../../api/invoice'
+const cache = require('../../../utils/cache.js');
 Page({
- 
-    /**
-    * 页面的初始数据
-    */
-    data: {
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
     // x轴方向的偏移
     x: 0,
     // 当前x的值
-    currentX: 0
-    },
-    
-    handleMovableChange: function(e) {
+    currentX: 0,
+    phone: '',
+    invoiceList: [],
+    way: ''
+  },
+
+  handleMovableChange: function (e) {
     // this.data.currentX = e.detail.x;
     this.data.currentX = e.detail.x;
-    },
-    
-    handleTouchend: function(e) {
+  },
+
+  handleTouchend: function (e) {
     this.isMove = true;
     if (this.data.currentX < -46) {
-     this.data.x = -112;
-     this.setData({
-     x: this.data.x
-     });
+      this.data.x = -112;
+      this.setData({
+        x: this.data.x
+      });
+    } else {
+      this.data.x = 0;
+      this.setData({
+        x: this.data.x
+      });
+    }
+  },
+
+  //添加发票
+  goToAddAinvoice(e) {
+    // wx.navigateTo({
+    //   url: '../../groupmeallist/addinvoices/addinvoices',
+    // })
+
+    let way = e.currentTarget.dataset.way;
+    let invoiceId = e.currentTarget.dataset.index;
+    console.log(invoiceId)
+    if (invoiceId >= 0) {
+      wx.navigateTo({
+        url: '../../groupmeallist/addinvoices/addinvoices?type=' + way + '&invoiceId=' + invoiceId,
+      })
     } else {
-     this.data.x = 0;
-     this.setData({
-     x: this.data.x
-     });
+
+      wx.navigateTo({
+        url: '../../groupmeallist/addinvoices/addinvoices?type=' + way,
+      })
+    }
+  },
+  returncreatesubmit(e) {
+    let value = e.currentTarget.dataset.value;
+    let idx =e.currentTarget.dataset.idx;
+    if(this.data.way == 'order'){
+      wx.redirectTo({
+        url: '../submitOrder/submitOrder?invoiceValue='+value + '&invoiceId=' + idx,
+      })
+     
     }
-    },
-
-    //添加发票
-    goToAddAinvoice(){
-        wx.navigateTo({
-          url: '../../groupmeallist/addinvoices/addinvoices',
-        })
-
-
-
-
-    },
-    handleTouchestart: function(e) {},
-    /**
-    * 生命周期函数--监听页面加载
-    */
-    onLoad: function(options) {
-    // let _this = this;
-    // wx.createSelectorQuery().selectAll('.delBtn ').boundingClientRect(function(rect) {
-    // _this.data.delWidth = rect[0].width;
-    // }).exec();
-    },
-    
-    /**
-    * 生命周期函数--监听页面初次渲染完成
-    */
-    onReady: function() {
-    
-    },
-    
-    /**
-    * 生命周期函数--监听页面显示
-    */
-    onShow: function() {
-    
-    },
-    
-    /**
-    * 生命周期函数--监听页面隐藏
-    */
-    onHide: function() {
-    
-    },
-    
-    /**
-    * 生命周期函数--监听页面卸载
-    */
-    onUnload: function() {
-    
-    },
-    
-    /**
-    * 页面相关事件处理函数--监听用户下拉动作
-    */
-    onPullDownRefresh: function() {
-    
-    },
-    
-    /**
-    * 页面上拉触底事件的处理函数
-    */
-    onReachBottom: function() {
-    
-    },
-    
-    /**
-    * 用户点击右上角分享
-    */
-    onShareAppMessage: function() {
-    
+
+  },
+
+  handleDeleteInvoice(e) {
+    let index = e.currentTarget.dataset.index;
+    console.log(index)
+
+    invoice.delinvoicebyid({
+      mobile: this.data.phone,
+      invoiceId: index
+    }).then(res => {
+      wx.showToast({
+        title: '删除成功',
+        icon: 'none',
+        duration: 3000
+      })
+
+      this.getInvoiceList()
+    })
+  },
+  handleTouchestart: function (e) {},
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    let way = options.way
+    if (way != null) {
+      this.setData({
+        way: way
+      })
     }
-   })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+    let phone = cache.getMobile()
+    this.setData({
+      phone: phone
+    })
+
+    this.getInvoiceList()
+
+  },
+
+
+  //获取发票列表
+  getInvoiceList() {
+    invoice.getinvoicelist({
+      mobile: this.data.phone,
+    }).then(res => {
+      let resdata = res.data
+      resdata.forEach(item => {
+
+
+        item.x = 0;
+        item.currentX = 0;
+
+      });
+
+
+
+      this.setData({
+        invoiceList: res.data
+      })
+
+
+
+    })
+  },
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 8 - 8
pages/groupmeallist/invoicesList/invoicesList.wxml

@@ -1,20 +1,20 @@
-<view class="container">
+<view class="container" wx:for="{{invoiceList}}" wx:for-item="invoice" wx:key="index" wx:for-index="id">
     <view class="main">
         <view class="main_item">
             <movable-area>
-                <movable-view damping="100" out-of-bounds="true" direction="horizontal" x="{{x}}" animation="false" bindchange="handleMovableChange" capture-bind:touchstart="handleTouchestart" capture-bind:touchend="handleTouchend">
-                    <view class="main_item_content flex-row">
-                        <view>
-                            <view class="fontSize-3" style="font-size: 32rpx;">某某某某某某某某某某有限公司</view>
-                            <view style="margin-top: 17rpx;color: #919191;" class="fontSize-28">税号:214125625352</view>
+                <movable-view damping="100" out-of-bounds="true" direction="horizontal" data-x="{{invoice.x}}" animation="false" bindchange="handleMovableChange" capture-bind:touchstart="handleTouchestart" capture-bind:touchend="handleTouchend">
+                    <view class="main_item_content flex-row"  data-value="{{invoice.invoiceTitle}}"  data-idx="{{invoice.id}}" catchtap="returncreatesubmit">
+                        <view style="margin-top: 78rpx;margin-left: 46rpx;">
+                            <view class="fontSize-3" style="font-size: 32rpx;">{{invoice.invoiceTitle}}</view>
+                            <view style="margin-top: 17rpx;color: #919191;" class="fontSize-28">税号:{{invoice.invoiceNo}}</view>
                         </view>
                         <view>
-                            <image style="width: 30rpx; height:30rpx;margin-right: 53rpx;margin-top: 35rpx;" src="/images/groupmeallist/edit.png"></image>
+                            <image data-index="{{invoice.id}} "  data-way="edit" catchtap="goToAddAinvoice" style="width: 30rpx; height:30rpx;margin-right: 53rpx;margin-top: 75rpx;" src="/images/groupmeallist/edit.png"></image>
                         </view>
                     </view>
                 </movable-view>
             </movable-area>
-            <view class="delete_btn " data-productIndex="{{index}} " bindtap="handleDeleteProduct ">删除</view>
+            <view class="delete_btn " data-index="{{invoice.id}} " catchtap="handleDeleteInvoice">删除</view>
         </view>
     </view>
 </view>

+ 2 - 2
pages/groupmeallist/invoicesList/invoicesList.wxss

@@ -36,8 +36,8 @@
     height: 223rpx;
     /* border-radius: 10rpx; */
     color: white;
-    padding-left: 16px;
-    padding-top: 78rpx;
+    /* padding-left: 16px;
+    padding-top: 78rpx; */
     background: white;
     align-items: flex-start;
     justify-content: space-between;

+ 1 - 0
pages/groupmeallist/storeList/storeList.js

@@ -218,6 +218,7 @@ confirmStoreGoToStoreGoods(e){
     let way = e.currentTarget.dataset.way;
     //缓存门店取餐方式
         cache.setStoreWay(way)
+        console.log(this.data.storeList[this.data.idx])
         cache.setCurrStore(this.data.storeList[this.data.idx]);
     wx.switchTab({  
         url:'/pages/groupmeallist/storeGoods/storeGoods'       

+ 232 - 13
pages/groupmeallist/submitOrder/submitOrder.js

@@ -1,6 +1,8 @@
 // pages/groupmeallist/submitOrder/submitOrder.js
 import storeGoods from '../../../api/storeGoods'
 const cache = require('../../../utils/cache.js');
+
+const user = require('../../../utils/user.js');
 import base from '../../../utils/base'
 Page({
 
@@ -12,10 +14,18 @@ Page({
         store: {},
         phone: '',
         storeWay: '',
-        addressvaule:'',
-        addressId:'',
+        addressvaule: '',
+        addressId: '',
+        coupon: '',
+        couponSn: '',
+        hallFood: '',
+        invoiceValue: '',
+        invoiceId: '',
+        hidden: true,
+        inputValue: '',
+        remark: '',
+
 
-        
 
 
         showAllSku: false,
@@ -36,18 +46,87 @@ Page({
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
+        let coupon = options.coupon
+
+
+        if (coupon != null) {
+            let jsoncoupon = JSON.parse(coupon)
+            this.setData({
+                coupon: jsoncoupon,
+                couponSn: jsoncoupon.sn
+            })
+        }
+
+
+        let invoiceValue = options.invoiceValue
+        let invoiceId = options.invoiceId
+        if (invoiceValue != null && invoiceId != null) {
+            this.setData({
+                invoiceValue: invoiceValue,
+                invoiceId: invoiceId
+            })
+
+        }
 
         let addressvaule = options.addressvalue
         let addressId = options.addressId
-       if(addressvaule !=null && addressId!=null ){
+        if (addressvaule != null && addressId != null) {
+            let address = {
+                addressvaule: addressvaule,
+                addressId: addressId
+            }
+            // 设置地址缓存
+            cache.setaddress(address)
+
+            this.setData({
+                addressvaule: addressvaule,
+                addressId: addressId
+
+            })
+
+        }
+
+    },
+
+
+    /**
+     * 取消
+     */
+    cancel: function () {
         this.setData({
-            addressvaule:addressvaule,
-            addressId:addressId
+            hidden: true,
+            inputValue: '',
+            remark: '',
+        });
+    },
 
-        })
 
-       }
+    /**
+     * 提交
+     */
+    confirm: function (e) {
+        let inputValue = e.detail.value
+        this.setData({
+            hidden: true,
+            inputValue: inputValue,
+            remark: inputValue,
+        });
+    },
+    /**
+     * 备注
+     */
+    getReason: function (e) {
+        this.setData({
+            inputValue: e.detail.value
+        })
+    },
 
+    remarkShow() {
+        this.setData({
+            hidden: false,
+            // inputValue: '',
+            // remark: '',
+        });
     },
 
     /**
@@ -56,20 +135,148 @@ Page({
     onReady: function () {
 
     },
+    listenInput(e) {
+        this.setData({
+            phone: e.detail.value
+
+        })
+
+
+    },
+    // 提交订单
+    submitOrder() {
+        console.log("进入创建订单方法")
+        let parms = {}
+        if (!this.data.isValid) {
+            app.showToast("购物车无商品")
+            return
+        }
+
+
+        // parms={
+        //     mobile:cache.getMobile(),
+        //     storeId:cache.getStoreId(),
+        //     couponSn:this.data.couponSn,
+        //     dinnerType:this.data.storeWay,
+        //     addressId:this.data.addressId,
+        //     invoiceId:this.data.invoiceId,
+        //     phone:this.data.phone,
+        //     remark:this.data.remark
+        // }
+        storeGoods.creatOrder({
+            mobile: cache.getMobile(),
+            storeId: cache.getStoreId(),
+            couponSn: this.data.couponSn,
+            dinnerType: this.data.storeWay,
+            addressId: this.data.addressId,
+            invoiceId: this.data.invoiceId,
+            phone: this.data.phone,
+            remark: this.data.remark
+        }).then(res => {
+            if (res.code == 200 && res.data.state != -2) {
+                // 唤起收银台
+                this.goToPay(res.data)
+            } else if (res.data.state != -2) {
+                wx.redirectTo({
+                    url: '/pages/userOrderList/userOrderList',
+                })
+
+            }
+        }).catch(_ => {
+            // this.setData({
+            //     isShowPannel: true
+            // })
+
+            this.tapSex()
+            console.log(_)
+        })
+
+
+    },
+    tapSex:function(res){
+        var that = this
+        wx.showModal({
+          title: '提示',
+          content: '订单创建失败,确认之后返回购物栏',
+          showCancel: false,
+          confirmText:'确认',
+          success(res){
+        if(res.confirm){
+                that.goToStoreGoods()
+            }
+          }
+        })
+    
+    },
+    
+    goToPay(order) {
+        const storeInfo = cache.getCurrStore()
+
+        console.log(user.getUserInfo().openid,)
+        console.log(storeInfo)
+        storeGoods.getPayParams({
+            orderSn: order.orderSn,
+            payCode: storeInfo.payCode,
+            openId: user.getUserInfo().openid,
+            isOrderPayment: true,
+            orderInfoPath: "../orderDetail/orderDetail?sn=" + order.orderSn,
+            productDetailPath: "../storeGoods/storeGoods",   
+        }).then(res => {
+            if (res.code == 200) {
+                this.rousePayment(res.data, order)
+            }
+        }).catch(_ => {
+            console.log(_)
+        })
+
+    },
+    rousePayment(payParam, order) {
+        wx.requestOrderPayment({
+            timeStamp: payParam.wxPrePay.timeStamp,
+            package: payParam.wxPrePay.pack,
+            nonceStr: payParam.wxPrePay.nonceStr,
+            signType: payParam.wxPrePay.signType,
+            paySign: payParam.wxPrePay.paySign,
+            orderInfo:payParam.orderInfo,
+            success: function (res) {
+              //支付成功,跳转领取成功页面
+              console.log("支付成功,跳到订单详情页面")
+              OrderApi.getPayStatus(order.orderSn);
+              app.showToast("支付成功")
+              wx.redirectTo({
+                url: '../orderDetail/orderDetail?sn=' + order.orderSn,
+              })
+            },
+            fail: function (res) {
+                app.showToast("支付失败")
+                wx.redirectTo({
+                    url: '../orderDetail/orderDetail?sn=' + order.orderSn,
+                })
+            }
+          })
+    },
+
 
     /**
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
         let store = cache.getCurrStore();
-        let storeWay = cache.getStoreWay()
-
         console.log(store)
-        console.log(storeWay)
+        let storeWay = cache.getStoreWay();
+
+        let address = cache.getaddress();
+        if (address != null) {
+            this.setData({
+                addressvaule: address.addressvaule,
+                addressId: address.addressId,
+            })
+        }
         if (store != null) {
             this.setData({
                 store: store,
-                storeWay: storeWay
+                storeWay: storeWay,
+                hallFood: store.hallFood
             })
 
         }
@@ -79,7 +286,13 @@ Page({
 
 
     },
+    //发票列表
+    gotoinvoice() {
+        wx.redirectTo({
+            url: '../invoicesList/invoicesList?way=' + 'order',
+        })
 
+    },
     // 自动获取手机号
 
     getPhone() {
@@ -118,13 +331,19 @@ Page({
             console.log(_)
         })
     },
+    //选择卡券
+    gotoselectcoupon() {
+        wx.navigateTo({
+            url: '../couponlist/couponlist',
+        })
 
+    },
 
     /**
      * 加载购物车数据
      */
     loadCartData() {
-        storeGoods.getCartData(cache.getStoreId(), cache.getMobile(), null, null).then(res => {
+        storeGoods.getCartData(cache.getStoreId(), cache.getMobile(), null, this.data.couponSn, ).then(res => {
             if (res.code == 200) {
                 this.cartDataMapToView(res.data)
             }

+ 50 - 35
pages/groupmeallist/submitOrder/submitOrder.wxml

@@ -1,4 +1,4 @@
-<view class="page flex-column">
+<view class="page flex-column" style="background-color: #F5F5F5;">
     <view class="submitadress flex-column">
         <view>
             <view class="fotSize32" style="margin-left: 25rpx;margin-top: 23rpx;">{{store.storeName}}</view>
@@ -9,8 +9,8 @@
             <view class="fontSize24" style="margin-left: 25rpx;margin-top: 16rpx;">{{store.address}}({{store.storeName}})</view>
         </view>
 
-            <!-- 自取 -->
-        <view  wx:if="{{storeWay ==1}}"class="flex-row" style="margin-top: 67rpx;margin-left: 22rpx;justify-content: space-between;">
+        <!-- 自取 -->
+        <view wx:if="{{storeWay ==1}}" class="flex-row" style="margin-top: 67rpx;margin-left: 22rpx;justify-content: space-between;">
             <view class="fontSize-28" style="font-weight: 700;color: #000000;">预留电话</view>
             <view class="flex-row">
                 <span style="margin-right: 23rpx;color: #000000;" class="fontSize-28">
@@ -21,11 +21,11 @@
                 <view class="autoFill" catchtap="getPhone">自动填写</view>
             </view>
         </view>
-<!-- 门店外送 -->
-        <view  wx:if="{{storeWay ==2}}" class="flex-row" style="margin-top: 67rpx;margin-left: 22rpx;justify-content: space-between;" catchtap="chooseAdress">
+        <!-- 门店外送 -->
+        <view wx:if="{{storeWay ==2}}" class="flex-row" style="margin-top: 67rpx;margin-left: 22rpx;justify-content: space-between;" catchtap="chooseAdress">
             <view class="fontSize-28" style="font-weight: 700;color: #000000;">请选择收货地址
-            
-            <span style=" width: 200rpx; margin-left: 50rpx;color: #8B8B8B;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">{{addressvaule}}</span>
+
+                <span style=" width: 200rpx; margin-left: 50rpx;color: #8B8B8B;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">{{addressvaule}}</span>
             </view>
             <view class="flex-row">
                 <span style="margin-right: 23rpx;color: #000000;" class="fontSize-28">
@@ -60,20 +60,20 @@
 
                 </view>
                 <!-- 套餐详情 -->
-                <view class="combo_detail {{skuList[index].show != true ?'hide':''}}" >
+                <view class="combo_detail {{skuList[index].show != true ?'hide':''}}">
                     <!-- 杨枝甘露清爽版 -->
                     <block wx:for="{{item.comboSkuList}}" wx:for-item="combo" wx:key="comboIdx">
-                            <!-- {{combo.setsName}}: -->
-                            <view style="display: inline;" wx:for="{{combo.skuList}}" wx:for-item="skuItem" wx:key="skuItemIdx">
-                                {{skuItem.productName}}
-
-                        <block wx:if="{{skuItem.specList.length>0}}" style="display: inline;" wx:for="{{skuItem.specList}}" wx:for-item="spec" wx:key="specIdx">
-                            <text>({{spec.specValue}})</text>
-                        </block>
-                        x{{skuItem.num}}
+                        <!-- {{combo.setsName}}: -->
+                        <view style="display: inline;" wx:for="{{combo.skuList}}" wx:for-item="skuItem" wx:key="skuItemIdx">
+                            {{skuItem.productName}}
+
+                            <block wx:if="{{skuItem.specList.length>0}}" style="display: inline;" wx:for="{{skuItem.specList}}" wx:for-item="spec" wx:key="specIdx">
+                                <text>({{spec.specValue}})</text>
+                            </block>
+                            x{{skuItem.num}}
                         </view>
-                        
-                        </block>
+
+                    </block>
                     <span style="color:#AFD250;margin-left:10rpx;font-size:22rpx">x1</span>
                 </view>
 
@@ -83,7 +83,7 @@
 
         </view>
 
-        <view catchtap="handleFlodExtend">
+        <view catchtap="handleFlodExtend" wx:if="{{skuList.length >= 2}}">
             <block wx:if="{{showAllSku}}">
                 <view class="exten-flod"> 收起
                     <image style="width:19rpx;height:10rpx;margin-left: 15rpx;" src="/images/groupmeallist/top_icon.png" />
@@ -96,7 +96,7 @@
             </block>
         </view>
 
-        <view class="coupon flex-row-between">
+        <view class="coupon flex-row-between" catchtap="gotoselectcoupon">
             <view class="flex-row" style="align-items: center;">
 
                 <image style="width: 33rpx;height: 33rpx;margin-left: 31rpx;" src="/images/groupmeallist/coupon.png"></image>
@@ -105,36 +105,41 @@
             </view>
 
             <view class="flex-row">
-                <view class="coupon_sum">{{forSelectList.length}}个可用</view>
-
-                <image style="width: 10rpx;height: 19rpx;margin-right: 35rpx;margin-top: 2rpx;" src="/images/groupmeallist/more_than_the.png"></image>
+                <view class="coupon_sum" wx:if="{{coupon == ''}}">{{forSelectList.length}}个可用</view>
+                <view class="coupon_have" wx:if="{{coupon !=null}}">{{coupon.coupon.title}}</view>
+                <image style="width: 10rpx;height: 19rpx;margin-right: 35rpx;margin-top: 0rpx;" src="/images/groupmeallist/more_than_the.png"></image>
             </view>
         </view>
 
         <view style="width: 93%; border-bottom: 1px #e2e2e2 solid; margin: auto;margin-top: 13rpx;"></view>
 
         <view class="all_price flex-row">
-            <view>已优惠 <sapn style="font-size: 28rpx;font-weight: 400;text-align: left;color: #d65065;margin-right: 31rpx;">-¥4</sapn>
-                合计 ¥
-                <sapn style="font-size: 38rpx;font-weight: 400;text-align: left;color: #000000;margin-right: 22rpx;">11</sapn>
+            <view class="flex-row">
+                <span style="display: {{coupon =='' ? 'none' : 'block'}};">已优惠 <sapn style="font-size: 28rpx;font-weight: 400;text-align: left;color: #d65065;margin-right: 31rpx;">-¥{{discountPriceY}}</sapn>
+                </span> 合计 ¥
+                <sapn style="font-size: 38rpx;font-weight: 400;text-align: left;color: #000000;margin-right: 35rpx;">{{totalPriceY}}</sapn>
             </view>
         </view>
     </view>
 
 
-    <view class="invoice flex-row">
-        <view style="margin-left: 22rpx;color: #000000;" class="fontSize-28">是否开发票</view>
+    <view class="invoice flex-row" style="margin-top: 27rpx;" wx:if="{{hallFood.supportInvoice == 1}}" catchtap="gotoinvoice">
+        <view  style="margin-left: 22rpx;color: #000000;" class="fontSize-28">是否开发票</view>
         <view class="fontSize-28">
-            无
+
+            <span style=" width: 300rpx; margin-right: 50rpx;color: #8B8B8B;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">{{invoiceValue}}</span>
+
+            <span wx:if="{{invoiceId == ''}}" style="margin-right: 10rpx;">无</span>
             <image style="width: 10rpx;height: 19rpx;margin-right: 35rpx;margin-top: 2rpx;" src="/images/groupmeallist/more_than_the.png"></image>
         </view>
     </view>
 
 
-    <view class="invoice flex-row">
+    <view class="invoice flex-row" catchtap="remarkShow">
         <view style="margin-left: 22rpx;color: #000000;" class="fontSize-28">备注</view>
-        <view class="fontSize-28">
-            无
+        <view class="fontSize-28 flex-row" >
+            <span wx:if="{{inputValue == ''}}"  style="margin-right: 10rpx;"> 无</span>
+            <view style="margin-right: 10rpx; max-width: 400rpx;overflow:hidden; text-overflow:ellipsis;" wx:if="{{inputValue != ''}}"  >{{inputValue}}</view>
             <image style="width: 10rpx;height: 19rpx;margin-right: 35rpx;margin-top: 2rpx;" src="/images/groupmeallist/more_than_the.png"></image>
         </view>
     </view>
@@ -142,11 +147,21 @@
     <view class="allSum flex-row">
         <view style="margin-left: 32rpx;color: #000000;" class="fontSize-28">合计:
             <span style="font-size: 24rpx;font-weight: 400;text-align: left;color: #afd250;">¥</span>
-            <span style="font-size: 32rpx;font-weight: 700;text-align: left;color: #afd250;margin-left: 12rpx;">235.2</span>
+            <span style="font-size: 32rpx;font-weight: 700;text-align: left;color: #afd250;margin-left: 12rpx;">{{totalPriceY}}</span>
         </view>
 
-        <view class="submit_pay">提交支付</view>
+        <view class="submit_pay" catchtap="submitOrder">提交支付</view>
 
     </view>
-
+    <view class="bg-zindex" hidden="{{hidden}}">
+      <view class="success_window flex-column">
+        <view class="w_title">备注</view>
+        <view class="w_text"><input style="height:40rpx;" bindinput="getReason" type="text" placeholder="请输入备注" value="{{inputValue}}" maxlength="300" /></view>
+        <view class="w_border"></view>
+        <view class="w_button flex-row">
+          <view class="w_go_order" catchtap="cancel">取消</view>
+          <view class="w_go_order" catchtap="confirm">确定</view>
+        </view>
+      </view>
+    </view>
 </view>

+ 76 - 2
pages/groupmeallist/submitOrder/submitOrder.wxss

@@ -1,6 +1,7 @@
 .submitPage{
     width: 100%;
     height: 100%;
+    background-color: #F5F5F5;
 
 
 }
@@ -28,11 +29,12 @@
 
 .detail_center {
     width: 709rpx;
-    min-height: 620rpx;
+    /* min-height: 420rpx; */
     background: #ffffff;
     border-radius: 25rpx;
     margin: auto;
     margin-top: 19rpx;
+    padding-bottom: 35rpx;
 
 }
 .coupon_sum{
@@ -91,7 +93,17 @@
 
 
 }
+.coupon_have{
+    /* color: #979797;
+    font-size: 24rpx; */
 
+    font-size: 24rpx;
+    font-weight: 400;
+    line-height: 0px;
+    color: #AFD250;
+    opacity: 1;
+    margin-right: 20rpx;
+}
 /* 滚动条消失术 */
 .for_detail_good::-webkit-scrollbar {
     display: none;
@@ -167,6 +179,7 @@
     width: 100%;
     height: 33rpx;
     margin-top: 30rpx;
+    padding-bottom: 20rpx;
     
 }
 .all_price{
@@ -210,4 +223,65 @@
     line-height: 81rpx;
     color: #ffffff;
     margin-right: 23rpx;
-}
+}.bg-zindex{
+    position: fixed;
+    width: 100%;
+    height: 100%;
+    top: 0;
+    background: rgba(0, 0, 0, 0.8);
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    flex-direction: column;
+    z-index: 999;
+  }
+  .success_window{
+    width: 328px;
+    height: 227px;
+    background: #FFFFFF;
+    border-radius: 20rpx;
+    position: relative;
+    z-index: 9999;
+    align-items: center;
+  }
+  
+  .w_title{
+    font-size: 36rpx;
+    font-weight: 600;
+    color: #444444;
+    margin-top: 27px;
+  }
+  
+  .w_text{
+    margin-top: 50px;
+    width: 300px;
+    height: 50rpx;
+  }
+  
+  .hsay_text{
+    margin-top: 8px;
+    font-size: 12px;
+    font-weight: 500;
+    color: #444444;
+  }
+  .w_border{
+    width: 300px;
+    height: 1px;
+    background: #A0A0A0;
+    margin-top: 16px;
+  }
+  .w_go_order{
+    font-size: 18px;
+    font-weight: 500;
+    color: #444444;
+    margin-top: 32rpx;
+  }
+  
+  .w_button{
+    width: 300px;
+    height: 70px;
+  }
+  .w_go_order{
+    width: 150px;
+    text-align: center;
+  }

+ 63 - 0
project.private.config.json

@@ -492,6 +492,69 @@
                     "name": "",
                     "pathName": "pages/groupmeallist/submitOrder/submitOrder",
                     "query": "",
+                    "launchMode": "default",
+                    "scene": null
+                },
+                {
+                    "name": "",
+                    "pathName": "pages/groupmeallist/couponlist/couponlist",
+                    "query": "",
+                    "launchMode": "default",
+                    "scene": null
+                },
+                {
+                    "name": "",
+                    "pathName": "pages/groupmeallist/submitOrder/submitOrder",
+                    "query": "",
+                    "launchMode": "default",
+                    "scene": null
+                },
+                {
+                    "name": "",
+                    "pathName": "pages/groupmeallist/couponlist/couponlist",
+                    "query": "",
+                    "launchMode": "default",
+                    "scene": null
+                },
+                {
+                    "name": "",
+                    "pathName": "pages/groupmeallist/storeList/storeList",
+                    "query": "",
+                    "launchMode": "default",
+                    "scene": null
+                },
+                {
+                    "name": "",
+                    "pathName": "pages/groupmeallist/storeList/storeList",
+                    "query": "",
+                    "launchMode": "default",
+                    "scene": null
+                },
+                {
+                    "name": "",
+                    "pathName": "pages/groupmeallist/submitOrder/submitOrder",
+                    "query": "",
+                    "launchMode": "default",
+                    "scene": null
+                },
+                {
+                    "name": "",
+                    "pathName": "pages/groupmeallist/storeList/storeList",
+                    "query": "",
+                    "launchMode": "default",
+                    "scene": null
+                },
+                {
+                    "name": "",
+                    "pathName": "pages/groupmeallist/invoicesList/invoicesList",
+                    "query": "",
+                    "launchMode": "default",
+                    "scene": null
+                },
+                {
+                    "name": "",
+                    "pathName": "pages/groupmeallist/addinvoices/addinvoices",
+                    "query": "",
                     "scene": null,
                     "launchMode": "default"
                 }