线上问题修改(卡券管理,营养信息展示,预定餐配送方式)
This commit is contained in:
parent
f01acb5c9d
commit
b77bd5cd49
4
App.vue
4
App.vue
|
|
@ -39,4 +39,8 @@ export default {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
body,html {
|
||||||
|
height: 100vh !important;
|
||||||
|
overflow: auto !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,11 @@ module.exports = {
|
||||||
// baseUrl: '/dev-api',
|
// baseUrl: '/dev-api',
|
||||||
// baseUrl: 'http://10.138.55.104:58080',//测试
|
// baseUrl: 'http://10.138.55.104:58080',//测试
|
||||||
// baseUrl: 'http://192.168.0.244:38380',//测试
|
// baseUrl: 'http://192.168.0.244:38380',//测试
|
||||||
|
// baseUrl: 'http://192.168.0.176:58080',//测试
|
||||||
// baseUrl: 'http://192.168.2.82:58080',//张天强
|
// baseUrl: 'http://192.168.2.82:58080',//张天强
|
||||||
// baseUrl: 'http://192.168.2.69:58080',//董高文
|
// baseUrl: 'http://192.168.2.69:58080',//董高文
|
||||||
// baseUrl: 'http://192.168.0.44:58080',//董高文
|
// baseUrl: 'http://192.168.0.44:58080',//董高文
|
||||||
// baseUrl: 'http://192.168.2.83:58080',//盛旭
|
// baseUrl: 'http://192.168.2.78:58080',//盛旭
|
||||||
// baseUrl: 'http://192.168.1.102:58080',//测试
|
// baseUrl: 'http://192.168.1.102:58080',//测试
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
|
|
|
||||||
|
|
@ -37,17 +37,21 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="tab-content">
|
<view class="tab-content">
|
||||||
<view class="info-box" v-if="hIndex==0">
|
<view class="info-box" v-if="hIndex==0">
|
||||||
<view style="margin-bottom: 20px;">
|
<view style="margin-bottom: 20px;word-break: break-all;">
|
||||||
<text style="color: #959FA4;">菜品简介</text>
|
<text style="color: #959FA4;margin-right: 20px;">菜品简介</text>
|
||||||
<text style="margin-left: 20px;word-break: break-all;">{{dashesData.intro||'-'}}</text>
|
<text style="word-break: break-all;">{{dashesData.intro||'-'}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-bottom: 20px;">
|
<view style="margin-bottom: 20px;word-break: break-all;">
|
||||||
<text style="color: #959FA4;">主料</text>
|
<text style="color: #959FA4;margin-right: 20px;">主料</text>
|
||||||
<text style="margin-left: 20px;word-break: break-all;">-</text>
|
<text>
|
||||||
|
{{dashesData.mainMaterialStr||'-'}}
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-bottom: 20px;">
|
<view style="margin-bottom: 20px;word-break: break-all;">
|
||||||
<text style="color: #959FA4;">辅料</text>
|
<text style="color: #959FA4;margin-right: 20px;">辅料</text>
|
||||||
<text style="margin-left: 20px;word-break: break-all;">-</text>
|
<text>
|
||||||
|
{{dashesData.subMaterialStr||'-'}}
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-bottom: 20px;">
|
<view style="margin-bottom: 20px;">
|
||||||
<text style="color: #959FA4;">口味</text>
|
<text style="color: #959FA4;">口味</text>
|
||||||
|
|
@ -68,25 +72,25 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="nutrition-box-item">
|
<view class="nutrition-box-item">
|
||||||
<view>含量</view>
|
<view>含量</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].calories||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].protein||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].fat||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].carbohydrate||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].dietaryFiber||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].cholesterol||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].calcium||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].sodium||'-'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="nutrition-box-item">
|
<view class="nutrition-box-item">
|
||||||
<view>NRV%</view>
|
<view>NRV%</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].caloriesNrv||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].proteinNrv||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].fatNrv||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].carbohydrateNrv||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].dietaryFiberNrv||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].cholesterolNrv||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].calciumNrv||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].sodiumNrv||'-'}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="evaluate-box" v-if="hIndex==2">
|
<view class="evaluate-box" v-if="hIndex==2">
|
||||||
|
|
@ -282,6 +286,19 @@ export default {
|
||||||
const res = await getMenudishesDetailAPI(param)
|
const res = await getMenudishesDetailAPI(param)
|
||||||
if(res.code==200){
|
if(res.code==200){
|
||||||
this.dashesData = res.data;
|
this.dashesData = res.data;
|
||||||
|
if(this.dashesData.materialList&&this.dashesData.materialList.length>0){
|
||||||
|
let arr1=[]
|
||||||
|
let arr2=[]
|
||||||
|
this.dashesData.materialList.forEach(item=>{
|
||||||
|
if(item.materialType==1){ arr1.push(item.materialName) }
|
||||||
|
if(item.materialType==2){ arr2.push(item.materialName) }
|
||||||
|
})
|
||||||
|
this.dashesData.mainMaterialStr = arr1.join("、")
|
||||||
|
this.dashesData.subMaterialStr = arr2.join("、")
|
||||||
|
}else{
|
||||||
|
this.dashesData.mainMaterialStr = ""
|
||||||
|
this.dashesData.subMaterialStr = ""
|
||||||
|
}
|
||||||
this.$set(this.dashesData, 'quantity', 0)
|
this.$set(this.dashesData, 'quantity', 0)
|
||||||
this.$set(this.dashesData, 'monthlySales', this.dashesData.dishesDetailList[0].monthlySales)
|
this.$set(this.dashesData, 'monthlySales', this.dashesData.dishesDetailList[0].monthlySales)
|
||||||
this.$set(this.dashesData, 'goodProbability', this.dashesData.dishesDetailList[0].goodProbability)
|
this.$set(this.dashesData, 'goodProbability', this.dashesData.dishesDetailList[0].goodProbability)
|
||||||
|
|
@ -416,6 +433,9 @@ export default {
|
||||||
"unitName": null,
|
"unitName": null,
|
||||||
"weightUnit": null
|
"weightUnit": null
|
||||||
}
|
}
|
||||||
|
if(!cartItem.costModelList){
|
||||||
|
this.$set(cartItem, 'costModelList', food.costModelList)
|
||||||
|
}
|
||||||
this.$set(cartItem, 'orderDetailList', [obj])
|
this.$set(cartItem, 'orderDetailList', [obj])
|
||||||
this.$set(cartItem, 'goodsDishesImgUrl', food.dishesImgUrl)
|
this.$set(cartItem, 'goodsDishesImgUrl', food.dishesImgUrl)
|
||||||
this.$set(cartItem, 'monthlySales', food.dishesDetailList[0].monthlySales)
|
this.$set(cartItem, 'monthlySales', food.dishesDetailList[0].monthlySales)
|
||||||
|
|
@ -673,13 +693,14 @@ page {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.nutrition-box-item{
|
.nutrition-box-item{
|
||||||
width: 28%;
|
width: 30%;
|
||||||
margin: 0 2%;
|
margin: 0 2%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
// background-color: #DD7D3C;
|
// background-color: #DD7D3C;
|
||||||
view{
|
view{
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
height: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="typeList.length == 0&&!showLoading" class="flex align-center" style="height: 50vh;margin-left:12%;">
|
<view v-if="typeList.length == 0&&!showLoading" class="flex align-center" style="height: 50vh;margin-left:12%;">
|
||||||
<u-empty icon="../../static/images/not_order.png" text="暂无数据" textColor="#000" />
|
<u-empty icon="../../static/images/not_order.png" text="暂无数据" textColor="#000" />
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -232,12 +232,10 @@ export default {
|
||||||
this.stallName=options.stallName;
|
this.stallName=options.stallName;
|
||||||
this.recipeId=options.recipeId;
|
this.recipeId=options.recipeId;
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
//获取预定日期
|
|
||||||
this.getReserveDate()
|
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
//获取预定餐菜谱
|
//获取预定日期
|
||||||
this.getMenuListData()
|
this.getReserveDate()
|
||||||
},200)
|
},200)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -249,7 +247,9 @@ export default {
|
||||||
}
|
}
|
||||||
const res = await getlistReserveDateAPI(param)
|
const res = await getlistReserveDateAPI(param)
|
||||||
this.getNowFormatDate(res.data[0])
|
this.getNowFormatDate(res.data[0])
|
||||||
this.getNowFormatDate2(res.data[0])
|
this.getNowFormatDate2(res.data[0])
|
||||||
|
//获取预定餐菜谱
|
||||||
|
this.getMenuListData()
|
||||||
},
|
},
|
||||||
// 获取当前时间
|
// 获取当前时间
|
||||||
getNowFormatDate(data) {
|
getNowFormatDate(data) {
|
||||||
|
|
@ -274,7 +274,7 @@ export default {
|
||||||
async getMenuListData() {
|
async getMenuListData() {
|
||||||
let param = {
|
let param = {
|
||||||
"recipeId":this.recipeId,
|
"recipeId":this.recipeId,
|
||||||
"applyDate":this.newDate2,
|
"applyDate":this.newDate2
|
||||||
}
|
}
|
||||||
const res = await getAdvanceDetailListAPI(param)
|
const res = await getAdvanceDetailListAPI(param)
|
||||||
console.log(res, '预订餐菜谱')
|
console.log(res, '预订餐菜谱')
|
||||||
|
|
@ -295,23 +295,22 @@ export default {
|
||||||
this.$set(food, 'dishesId', food.dishesDetailList[0].dishesId)
|
this.$set(food, 'dishesId', food.dishesDetailList[0].dishesId)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
//获取购物车
|
|
||||||
this.getShoppingCartList()
|
|
||||||
this.tabList=[]
|
this.tabList=[]
|
||||||
//处理数据
|
//处理数据
|
||||||
this.menuData.forEach(item=>{//渲染类型
|
this.menuData.forEach(item=>{//渲染类型
|
||||||
this.tabList.push(this.handleRecipeType(item.mealtimeType))
|
this.tabList.push(this.handleRecipeType(item.mealtimeType))
|
||||||
})
|
})
|
||||||
this.changeTab(0)
|
this.changeTab(0)
|
||||||
|
//获取购物车
|
||||||
|
this.getShoppingCartList()
|
||||||
}else{
|
}else{
|
||||||
this.menuData = [];
|
this.menuData = [];
|
||||||
this.tabList=[];
|
this.tabList=[];
|
||||||
this.typeList=[]
|
this.typeList=[]
|
||||||
this.typeNameList=[]
|
this.typeNameList=[]
|
||||||
this.tIndex=0
|
this.tIndex=0
|
||||||
}
|
}
|
||||||
this.showLoading=false
|
|
||||||
}else{
|
}else{
|
||||||
uni.$u.toast(res.msg)
|
uni.$u.toast(res.msg)
|
||||||
this.menuData = [];
|
this.menuData = [];
|
||||||
|
|
@ -319,8 +318,8 @@ export default {
|
||||||
this.typeList=[]
|
this.typeList=[]
|
||||||
this.typeNameList=[]
|
this.typeNameList=[]
|
||||||
this.tIndex=0
|
this.tIndex=0
|
||||||
this.showLoading=false
|
}
|
||||||
}
|
this.showLoading=false
|
||||||
},
|
},
|
||||||
//菜品类型(1-早餐 2-午餐 3-下午茶 4-晚餐 5-夜宵)
|
//菜品类型(1-早餐 2-午餐 3-下午茶 4-晚餐 5-夜宵)
|
||||||
changeTab(index) {
|
changeTab(index) {
|
||||||
|
|
@ -430,6 +429,9 @@ export default {
|
||||||
"unitName": null,
|
"unitName": null,
|
||||||
"weightUnit": null
|
"weightUnit": null
|
||||||
}
|
}
|
||||||
|
if(!cartItem.costModelList){
|
||||||
|
this.$set(cartItem, 'costModelList', food.costModelList)
|
||||||
|
}
|
||||||
this.$set(cartItem, 'orderDetailList', [obj])
|
this.$set(cartItem, 'orderDetailList', [obj])
|
||||||
this.$set(cartItem, 'goodsDishesImgUrl', food.dishesImgUrl)
|
this.$set(cartItem, 'goodsDishesImgUrl', food.dishesImgUrl)
|
||||||
this.$set(cartItem, 'monthlySales', food.dishesDetailList[0].monthlySales)
|
this.$set(cartItem, 'monthlySales', food.dishesDetailList[0].monthlySales)
|
||||||
|
|
@ -451,7 +453,7 @@ export default {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
console.log(this.shoppingCartList)
|
console.log(this.shoppingCartList)
|
||||||
this.isHandle = false
|
this.isHandle = false
|
||||||
//计算总价
|
//计算总价
|
||||||
|
|
@ -689,7 +691,7 @@ page {
|
||||||
// background-color: #DD7D3C;
|
// background-color: #DD7D3C;
|
||||||
}
|
}
|
||||||
.content-left{
|
.content-left{
|
||||||
width: 20%;
|
width: 23%;
|
||||||
height: 74vh;
|
height: 74vh;
|
||||||
}
|
}
|
||||||
.active2 {
|
.active2 {
|
||||||
|
|
@ -699,7 +701,7 @@ page {
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-right{
|
.content-right{
|
||||||
width: 80%;
|
width: 77%;
|
||||||
height: 74vh;
|
height: 74vh;
|
||||||
// height: auto !important;
|
// height: auto !important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,22 @@
|
||||||
<template>
|
<template>
|
||||||
<page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
|
<page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
|
||||||
<view class="page">
|
<view class="page">
|
||||||
<h3>配送方式</h3>
|
<div class="cont" style="margin-bottom: 15px;padding: 10px;">
|
||||||
<div class="appraise" @click="showPicker = true">
|
<h4>配送方式</h4>
|
||||||
<div>{{ detailData.orderState }}</div>
|
<div class="appraise" @click="showPicker = true">
|
||||||
<div class="flex appraise-right">
|
<div>{{ detailData.deliveryName }}</div>
|
||||||
<u-icon name="arrow-right" size="12" />
|
<div class="flex appraise-right">
|
||||||
</div>
|
<u-icon name="arrow-right" size="12" />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="appraise" @click="openCounter" v-if="detailData.deliveryType==3||detailData.deliveryType==4">
|
||||||
|
<div>{{ detailData.counterName }}</div>
|
||||||
|
<div class="flex appraise-right">
|
||||||
|
<u-icon name="arrow-right" size="12" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="cont">
|
<div class="cont">
|
||||||
<div class="flex justify-between m-8">
|
<div class="flex justify-between m-8">
|
||||||
<div class="top-source m-8">订单类型: 预订餐</div>
|
<div class="top-source m-8">订单类型: 预订餐</div>
|
||||||
|
|
@ -85,16 +94,24 @@
|
||||||
<u-picker
|
<u-picker
|
||||||
:show="showPicker"
|
:show="showPicker"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
keyName="label"
|
keyName="deliveryName"
|
||||||
@cancel="showPicker = false"
|
@cancel="showPicker = false"
|
||||||
@confirm="confirm"
|
@confirm="confirm"
|
||||||
></u-picker>
|
></u-picker>
|
||||||
|
<u-picker
|
||||||
|
:show="showPicker2"
|
||||||
|
:columns="columns2"
|
||||||
|
keyName="mchName"
|
||||||
|
@cancel="showPicker2 = false"
|
||||||
|
@confirm="confirm2"
|
||||||
|
></u-picker>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getWalletBalanceAPI } from '@/api/index/index'
|
import { getWalletBalanceAPI } from '@/api/index/index'
|
||||||
import { getListElectronMobileUsableAPI,addReserveMealApi } from '@/api/advanceOrder/index.js'
|
import { getListElectronMobileUsableAPI,addReserveMealApi,getCounterBypageApi } from '@/api/advanceOrder/index.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {},
|
props: {},
|
||||||
|
|
@ -109,39 +126,37 @@ export default {
|
||||||
orderDate:"",
|
orderDate:"",
|
||||||
shoppingCartList:[],
|
shoppingCartList:[],
|
||||||
// 详情页数据
|
// 详情页数据
|
||||||
detailData: {
|
detailData: {
|
||||||
// 订单状态
|
deliveryAmount:'',
|
||||||
orderState: '自取外带',
|
packingFee:'',
|
||||||
// 订单来源
|
deliveryName: '自取堂食',
|
||||||
orderSource: '预订餐',
|
deliveryType:'1',
|
||||||
// 餐厅名称
|
counterId:"",
|
||||||
canteenName: '',
|
counterName:"",
|
||||||
// 餐次
|
remark: '', // 备注
|
||||||
canteenType: '',
|
|
||||||
// 就餐时间
|
|
||||||
diningTime: '',
|
|
||||||
// 菜品
|
|
||||||
addFood: [],
|
|
||||||
remark: '', // 备注
|
|
||||||
// 支付方式
|
|
||||||
payType: '小程序二维码支付'
|
|
||||||
},
|
},
|
||||||
walletBal: 0 ,// 钱包余额
|
walletBal: 0 ,// 钱包余额
|
||||||
sumbitStatus:false,
|
sumbitStatus:false,
|
||||||
showPicker: false, // 是否显示选择器
|
showPicker: false, // 是否显示选择器
|
||||||
|
showPicker2: false, // 是否显示选择器
|
||||||
// 选择器数据
|
// 选择器数据
|
||||||
columns: [
|
columns: [
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
label: '自取外带',
|
deliveryName: '自取堂食',
|
||||||
value: '1'
|
deliveryType: '1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '堂食',
|
deliveryName: '取餐柜配送',
|
||||||
value: '2'
|
deliveryType: '3'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
deliveryName: '生鲜柜配送',
|
||||||
|
deliveryType: '4'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
]
|
],
|
||||||
|
columns2:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
|
@ -151,9 +166,10 @@ export default {
|
||||||
this.stallName = options.stallName
|
this.stallName = options.stallName
|
||||||
this.totalPrice = Number(options.totalPrice).toFixed(2)
|
this.totalPrice = Number(options.totalPrice).toFixed(2)
|
||||||
this.orderDate = options.orderDate;
|
this.orderDate = options.orderDate;
|
||||||
this.shoppingCartList=JSON.parse(options.carList)
|
this.shoppingCartList=JSON.parse(options.carList)
|
||||||
console.log(this.shoppingCartList)
|
console.log(this.shoppingCartList)
|
||||||
this.getListElectronMobileUsable()
|
this.columns[0] = this.shoppingCartList[0].costModelList
|
||||||
|
this.getListElectronMobileUsable()
|
||||||
this.getWalletBalanceData()
|
this.getWalletBalanceData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -180,11 +196,49 @@ export default {
|
||||||
console.log(res, '获取餐卷')
|
console.log(res, '获取餐卷')
|
||||||
|
|
||||||
},
|
},
|
||||||
|
openCounter(){
|
||||||
|
console.log(this.columns2)
|
||||||
|
this.showPicker2=true
|
||||||
|
},
|
||||||
|
//(获取)
|
||||||
|
async getCounterBypage(){
|
||||||
|
let param = {
|
||||||
|
"content":26,
|
||||||
|
}
|
||||||
|
this.detailData.counterName='请选择取餐柜'
|
||||||
|
if(this.detailData.deliveryType==4){
|
||||||
|
param.content=72;
|
||||||
|
this.detailData.counterName='请选择生鲜柜'
|
||||||
|
}
|
||||||
|
const res = await getCounterBypageApi(param)
|
||||||
|
console.log(res, '获取餐柜')
|
||||||
|
this.columns2=[[]]
|
||||||
|
this.detailData.counterId=""
|
||||||
|
if(res.length>0){
|
||||||
|
res.forEach(item=>{
|
||||||
|
let obj = {
|
||||||
|
machineId:item.machineId,
|
||||||
|
mchName:item.mchName
|
||||||
|
}
|
||||||
|
this.columns2[0].push(obj)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
confirm(e) {
|
confirm(e) {
|
||||||
console.log('?? ~ confirm ~ value:', e)
|
console.log('?? ~ confirm ~ value:', e)
|
||||||
this.showPicker = false
|
this.showPicker = false
|
||||||
this.detailData.orderState = e.value[0].label
|
this.detailData.deliveryName = e.value[0].deliveryName
|
||||||
|
this.detailData.deliveryType = e.value[0].deliveryType
|
||||||
|
this.getCounterBypage()
|
||||||
},
|
},
|
||||||
|
confirm2(e) {
|
||||||
|
console.log('?? ~ confirm ~ value:', e)
|
||||||
|
this.showPicker2 = false
|
||||||
|
this.detailData.counterName = e.value[0].mchName
|
||||||
|
this.detailData.counterId = e.value[0].machineId
|
||||||
|
|
||||||
|
},
|
||||||
getNowFormatDate() {
|
getNowFormatDate() {
|
||||||
let date = new Date()
|
let date = new Date()
|
||||||
let year = date.getFullYear()
|
let year = date.getFullYear()
|
||||||
|
|
@ -201,7 +255,17 @@ export default {
|
||||||
let orderDetailList = []
|
let orderDetailList = []
|
||||||
this.shoppingCartList.forEach(item=>{
|
this.shoppingCartList.forEach(item=>{
|
||||||
orderDetailList.push(item.orderDetailList[0])
|
orderDetailList.push(item.orderDetailList[0])
|
||||||
})
|
})
|
||||||
|
if(this.detailData.deliveryType==3||this.detailData.deliveryType==4){
|
||||||
|
if(this.detailData.counterId==""){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择餐柜!',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
this.sumbitStatus = false
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
let param={
|
let param={
|
||||||
"amount": this.totalPrice*100,
|
"amount": this.totalPrice*100,
|
||||||
"couponId": "",
|
"couponId": "",
|
||||||
|
|
@ -218,19 +282,12 @@ export default {
|
||||||
"stallName": this.stallName,
|
"stallName": this.stallName,
|
||||||
"consigneeMobile": "",
|
"consigneeMobile": "",
|
||||||
"consigneeName": "",
|
"consigneeName": "",
|
||||||
"costModelList": [
|
"costModelList": this.shoppingCartList[0].costModelList,
|
||||||
{
|
"counterId": this.detailData.counterId,
|
||||||
"deliveryAmount": null,
|
"deliveryAddr": this.detailData.deliveryName,
|
||||||
"deliveryName": "自取堂食",
|
|
||||||
"deliveryType": 1,
|
|
||||||
"packingFee": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"counterId": "",
|
|
||||||
"deliveryAddr": "自取堂食",
|
|
||||||
"deliveryCosts": null,
|
"deliveryCosts": null,
|
||||||
"deliveryFee": 0,
|
"deliveryFee": 0,
|
||||||
"deliveryType": 1,
|
"deliveryType": this.detailData.deliveryType,
|
||||||
"mealtimeName": this.shoppingCartList[0].mealtimeName,
|
"mealtimeName": this.shoppingCartList[0].mealtimeName,
|
||||||
"mealtimeType": this.shoppingCartList[0].mealtimeType,
|
"mealtimeType": this.shoppingCartList[0].mealtimeType,
|
||||||
"orderDate": this.orderDate,
|
"orderDate": this.orderDate,
|
||||||
|
|
@ -246,6 +303,7 @@ export default {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
console.log(param)
|
||||||
addReserveMealApi(param).then((res)=>{
|
addReserveMealApi(param).then((res)=>{
|
||||||
if(res.code==200){
|
if(res.code==200){
|
||||||
if(res.data.code==10000){
|
if(res.data.code==10000){
|
||||||
|
|
@ -286,19 +344,12 @@ export default {
|
||||||
"stallName": this.stallName,
|
"stallName": this.stallName,
|
||||||
"consigneeMobile": "",
|
"consigneeMobile": "",
|
||||||
"consigneeName": "",
|
"consigneeName": "",
|
||||||
"costModelList": [
|
"costModelList": this.shoppingCartList[0].costModelList,
|
||||||
{
|
|
||||||
"deliveryAmount": null,
|
|
||||||
"deliveryName": "自取堂食",
|
|
||||||
"deliveryType": 1,
|
|
||||||
"packingFee": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"counterId": "",
|
"counterId": "",
|
||||||
"deliveryAddr": "自取堂食",
|
"deliveryAddr": this.detailData.deliveryAddr,
|
||||||
"deliveryCosts": null,
|
"deliveryCosts": null,
|
||||||
"deliveryFee": 0,
|
"deliveryFee": 0,
|
||||||
"deliveryType": 1,
|
"deliveryType": this.detailData.deliveryType,
|
||||||
"mealtimeName": this.shoppingCartList[0].mealtimeName,
|
"mealtimeName": this.shoppingCartList[0].mealtimeName,
|
||||||
"mealtimeType": this.shoppingCartList[0].mealtimeType,
|
"mealtimeType": this.shoppingCartList[0].mealtimeType,
|
||||||
"orderDate": this.orderDate,
|
"orderDate": this.orderDate,
|
||||||
|
|
@ -360,19 +411,12 @@ export default {
|
||||||
"stallName": this.stallName,
|
"stallName": this.stallName,
|
||||||
"consigneeMobile": "",
|
"consigneeMobile": "",
|
||||||
"consigneeName": "",
|
"consigneeName": "",
|
||||||
"costModelList": [
|
"costModelList": this.shoppingCartList[0].costModelList,
|
||||||
{
|
|
||||||
"deliveryAmount": null,
|
|
||||||
"deliveryName": "自取堂食",
|
|
||||||
"deliveryType": 1,
|
|
||||||
"packingFee": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"counterId": "",
|
"counterId": "",
|
||||||
"deliveryAddr": "自取堂食",
|
"deliveryAddr": this.detailData.deliveryAddr,
|
||||||
"deliveryCosts": null,
|
"deliveryCosts": null,
|
||||||
"deliveryFee": 0,
|
"deliveryFee": 0,
|
||||||
"deliveryType": 1,
|
"deliveryType": this.detailData.deliveryType,
|
||||||
"mealtimeName": this.shoppingCartList[0].mealtimeName,
|
"mealtimeName": this.shoppingCartList[0].mealtimeName,
|
||||||
"mealtimeType": this.shoppingCartList[0].mealtimeType,
|
"mealtimeType": this.shoppingCartList[0].mealtimeType,
|
||||||
"orderDate": this.orderDate,
|
"orderDate": this.orderDate,
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<u-popup :show="showNotice" mode="center" bgColor="transparent" @close="close" @open="open">
|
<u-popup :show="showNotice" mode="center" bgColor="transparent" @close="close" @open="open">
|
||||||
<view style="width: 80vw;height: 45vh;background: transparent;background-image: url('../static/images/index/noticeBg.png');background-repeat: no-repeat;background-size: 100% 100%;">
|
<view style="width: 80vw;height: 45vh;background: transparent;background-image: url('./static/images/index/noticeBg.png');background-repeat: no-repeat;background-size: 100% 100%;">
|
||||||
<view style="width: 100%;text-align: center;height: 40px;line-height: 40px;font-size: 30rpx;font-weight: bold;">通知</view>
|
<view style="width: 100%;text-align: center;height: 40px;line-height: 40px;font-size: 30rpx;font-weight: bold;">通知</view>
|
||||||
<view style="width: 90%;margin: 0 auto;height: 33vh;display: flex;justify-content: center;overflow-y: auto;">
|
<view style="width: 90%;margin: 0 auto;height: 33vh;display: flex;justify-content: center;overflow-y: auto;">
|
||||||
{{noticeData.informContent}}
|
{{noticeData.informContent}}
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,9 @@
|
||||||
<image :src="rowData.couponImgUrl" style="width: 100%;height: 100%;" mode="aspectFill"></image>
|
<image :src="rowData.couponImgUrl" style="width: 100%;height: 100%;" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view style="width: 90%;margin: 5px auto;padding: 10px;height: 18vh;display: flex;flex-direction: column;justify-content: center;overflow-y: auto;border-top: 1px solid #ccc;color: #000;">
|
<view style="width: 90%;margin: 5px auto;padding: 10px;height: 18vh;display: flex;flex-direction: column;justify-content: center;overflow-y: auto;border-top: 1px solid #ccc;color: #000;">
|
||||||
<view style="margin-bottom: 10px;">食堂: {{rowData.canteenNameStr}}</view>
|
<view style="margin-bottom: 10px;">食堂: {{rowData.canteenNameStr || '所有食堂可用'}}</view>
|
||||||
<view style="margin-bottom: 10px;">档口: {{rowData.shopstallNameStr}}</view>
|
<view style="margin-bottom: 10px;">档口: {{rowData.shopstallNameStr || '该食堂所有档口'}}</view>
|
||||||
<view style="margin-bottom: 10px;">餐次: {{rowData.intervalNameStr}}</view>
|
<view style="margin-bottom: 10px;">餐次: {{rowData.intervalNameStr || '该食堂档口所有餐次'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="width: 100%;height: 40px;display: flex;align-items: center;justify-content: center;">
|
<view style="width: 100%;height: 40px;display: flex;align-items: center;justify-content: center;">
|
||||||
<view style="width: 80%;height: 40px;line-height:40px;background:#FE7900;border-radius: 10px;text-align: center;color: #FFF;" @click="showDetail=false">关闭</view>
|
<view style="width: 80%;height: 40px;line-height:40px;background:#FE7900;border-radius: 10px;text-align: center;color: #FFF;" @click="showDetail=false">关闭</view>
|
||||||
|
|
|
||||||
|
|
@ -24,17 +24,21 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="tab-content">
|
<view class="tab-content">
|
||||||
<view class="info-box" v-if="hIndex==0">
|
<view class="info-box" v-if="hIndex==0">
|
||||||
<view style="margin-bottom: 20px;">
|
<view style="margin-bottom: 20px;word-break: break-all;">
|
||||||
<text style="color: #959FA4;">菜品简介</text>
|
<text style="color: #959FA4;margin-right: 20px;">菜品简介</text>
|
||||||
<text style="margin-left: 20px;word-break: break-all;">{{dashesData.intro||'-'}}</text>
|
<text style="word-break: break-all;">{{dashesData.intro||'-'}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-bottom: 20px;">
|
<view style="margin-bottom: 20px;word-break: break-all;">
|
||||||
<text style="color: #959FA4;">主料</text>
|
<text style="color: #959FA4;margin-right: 20px;">主料</text>
|
||||||
<text style="margin-left: 20px;word-break: break-all;">-</text>
|
<text>
|
||||||
|
{{dashesData.mainMaterialStr||'-'}}
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-bottom: 20px;">
|
<view style="margin-bottom: 20px;word-break: break-all;">
|
||||||
<text style="color: #959FA4;">辅料</text>
|
<text style="color: #959FA4;margin-right: 20px;">辅料</text>
|
||||||
<text style="margin-left: 20px;word-break: break-all;">-</text>
|
<text>
|
||||||
|
{{dashesData.subMaterialStr||'-'}}
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-bottom: 20px;">
|
<view style="margin-bottom: 20px;">
|
||||||
<text style="color: #959FA4;">口味</text>
|
<text style="color: #959FA4;">口味</text>
|
||||||
|
|
@ -55,25 +59,25 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="nutrition-box-item">
|
<view class="nutrition-box-item">
|
||||||
<view>含量</view>
|
<view>含量</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].calories||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].protein||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].fat||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].carbohydrate||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].dietaryFiber||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].cholesterol||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].calcium||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].sodium||'-'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="nutrition-box-item">
|
<view class="nutrition-box-item">
|
||||||
<view>NRV%</view>
|
<view>NRV%</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].caloriesNrv||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].proteinNrv||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].fatNrv||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].carbohydrateNrv||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].dietaryFiberNrv||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].cholesterolNrv||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].calciumNrv||'-'}}</view>
|
||||||
<view>-</view>
|
<view>{{dashesData.dishesDetailList[0].sodiumNrv||'-'}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="evaluate-box" v-if="hIndex==2">
|
<view class="evaluate-box" v-if="hIndex==2">
|
||||||
|
|
@ -155,6 +159,19 @@ export default {
|
||||||
const res = await getMenudishesDetailAPI(param)
|
const res = await getMenudishesDetailAPI(param)
|
||||||
if(res.code==200){
|
if(res.code==200){
|
||||||
this.dashesData = res.data;
|
this.dashesData = res.data;
|
||||||
|
if(this.dashesData.materialList&&this.dashesData.materialList.length>0){
|
||||||
|
let arr1=[]
|
||||||
|
let arr2=[]
|
||||||
|
this.dashesData.materialList.forEach(item=>{
|
||||||
|
if(item.materialType==1){ arr1.push(item.materialName) }
|
||||||
|
if(item.materialType==2){ arr2.push(item.materialName) }
|
||||||
|
})
|
||||||
|
this.dashesData.mainMaterialStr = arr1.join("、")
|
||||||
|
this.dashesData.subMaterialStr = arr2.join("、")
|
||||||
|
}else{
|
||||||
|
this.dashesData.mainMaterialStr = ""
|
||||||
|
this.dashesData.subMaterialStr = ""
|
||||||
|
}
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
// this.$modal.msgError("收藏成功")
|
// this.$modal.msgError("收藏成功")
|
||||||
}
|
}
|
||||||
|
|
@ -299,15 +316,17 @@ page {
|
||||||
// background-color: #DD7D3C;
|
// background-color: #DD7D3C;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
.nutrition-box-item{
|
.nutrition-box-item{
|
||||||
width: 28%;
|
width: 30%;
|
||||||
margin: 0 2%;
|
margin: 0 2%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
// background-color: #DD7D3C;
|
// background-color: #DD7D3C;
|
||||||
view{
|
view{
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
height: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue