Prechádzať zdrojové kódy

feat uni 修改了价格的引用字段

GaoRunQi 7 mesiacov pred
rodič
commit
a7dea46971

+ 2 - 2
yudao-ui-admin-uniapp/pages/order/detail.vue

@@ -78,7 +78,7 @@
 								<view class="foodPrice">
 									<view class="priceflex">
 										<text class="zero">¥</text>
-										{{i.goodsPrice}}
+										{{i.priceVisable}}
 									</view>
 									<view class="shopCar iconfont-themeColor-write" v-show="i.num == 0" @tap="addcart(i)">
 										<text class="lg text-white cuIcon-add"  ></text>
@@ -97,7 +97,7 @@
       <view class="notice-item ss-flex ss-row-between">
         <text class="title">商品总额</text>
         <view class="ss-flex">
-          <text class="detail">¥{{ state.orderInfo.price }}</text>
+          <text class="detail">¥{{ state.orderInfo.priceVisable }}</text>
         </view>
       </view>
       <!-- <view class="notice-item all-rpice-item ss-flex ss-m-t-20">

+ 2 - 2
yudao-ui-admin-uniapp/pages/order/list.vue

@@ -17,7 +17,7 @@
             <!-- {{ order.updateTime}} -->
 			<!-- <uni-dateformat :date="order.updateTime" ></uni-dateformat> -->
 			<view class="discounts-money pay-color">
-							总金额:¥{{order.price }}
+							总金额:¥{{order.priceVisable }}
             </view>
           </view>
 				</view>
@@ -26,7 +26,7 @@
             :img="item.picUrl"
             :title="item.spuName"
 						:skuText="item.properties.map((property) => property.valueName).join(' ')"
-						:price="item.price"
+						:price="item.priceVisable"
             :num="item.count"
           />
 				</view>

+ 15 - 12
yudao-ui-admin-uniapp/pages/restaurant/confirmOrder.vue

@@ -1,12 +1,12 @@
 <template>
-    <view style="margin-top: 40px;">
+    <s-layout style="margin-top: 40px;">
         <view style="background-color: #fff;">
-           <view class="cu-bar bg-white ">
+           <!-- <view class="cu-bar bg-white ">
                <view class="action">
                    <text class="cuIcon-titles text-orange"></text> 配送方式
                </view>
-           </view>
-            <scroll-view scroll-x class="bg-white nav">
+           </view> -->
+            <!-- <scroll-view scroll-x class="bg-white nav">
 			<view class="flex text-center">
 				<view class="cu-item flex-sub" :class="TabCur=='1'?'text-orange cur':''"  @tap="tabSelect" :data-id="1">
 					配送
@@ -15,11 +15,10 @@
 					到店
 				</view>
 			</view>
-		</scroll-view>
+		</scroll-view> -->
 		<uni-datetime-picker  type="datetime" v-model="datetimesingle" placeholder="预计时间" />
         </view>
-        <view style="background-color: #fff;">
-            <!-- <view style="font-size: 25px;padding:10px; border-bottom: 1px solid black;width: 100%;">收货地址</view><br /> -->
+        <!-- <view style="background-color: #fff;">
             <view class="cu-bar bg-white ">
                 <view class="action">
                     <text class="cuIcon-titles text-orange"></text> 收货地址
@@ -32,14 +31,14 @@
             <view style="width: 100%;padding:10px;">{{ addressList.address }}</view>
             <button style="margin: 20px;" type="primary"
                 @tap="sheep.$router.go('/pages/user/address/edit')">修改地址</button>
-        </view>
-        <view style="height: 50vh;">
+        </view> -->
+        <view style="height: 90vh;">
             <view class="cu-bar bg-white ">
                 <view class="action">
                     <text class="cuIcon-titles text-orange"></text> 购物车
                 </view>
             </view>
-            <view style="height: 50vh;overflow-y: auto;background-color: #fff;">
+            <view style="height: 80vh;overflow-y: auto;background-color: #fff;">
                 <view v-for="(i, j) in nowCartList" :key="j" class="minmi" style="width: 100vw;">
                     <image class="imgPic" :src="i.url" mode=""></image>
                     <view class="rightContainer">
@@ -49,7 +48,7 @@
                         <view class="foodPrice">
                             <view class="priceflex">
                                 <text class="zero">¥</text>
-                                {{ i.price }}
+                                {{ i.priceVisable }}
                             </view>
                             <view class="shopCar iconfont-themeColor-write" v-show="i.num == 0" @tap="addcart(i)">
                                 <text class="lg text-white cuIcon-add"></text>
@@ -66,7 +65,7 @@
             </view>
             <button class="bg-red submit" @click="handleOk()">立即支付</button>
         </view>
-    </view>
+    </s-layout>
 </template>
 
 <script setup>
@@ -85,6 +84,10 @@ const addressList = computed(() => {
 			return addressList
 	})
 const handleOk= async () =>{
+	if(datetimesingle.value ==''){
+		sheep.$helper.toast('请选择用餐时间')
+		return
+	}
 	let pamser = {
 		name: addressList.value.name,
         phone: addressList.value.phone,

+ 9 - 8
yudao-ui-admin-uniapp/pages/restaurant/order.vue

@@ -1,21 +1,21 @@
 <template>
-	<view>
+	<s-layout>
         <!-- <view > -->
             <!-- <swiper class="screen-swiper round-dot" :indicator-dots="true" :circular="true" :autoplay="true" interval="5000"
 		 duration="500"> -->
 			<!-- <swiper-item v-for="(item,index) in 4" :key="index"> -->
-				<image src="./top.png" mode="aspectFit" style="height: 20vh; width: 100%;margin-top: 2vh;"></image>
+				<image src="./top.png" mode="aspectFit" style="height: 15vh; width: 100%;"></image>
 			<!-- </swiper-item> -->
 		<!-- </swiper> -->
         <!-- </view> -->
 		<view class="aside-main" >
-			<scroll-view scroll-y class="scroll-Y1" style="max-height: 71vh;" scroll-with-animation>
+			<scroll-view scroll-y class="scroll-Y1" style="max-height: 66vh;" scroll-with-animation>
 				<view :class="num==index?'active':'active2'" v-for="(item,index) in asideList" :key="index"
 					@click="asid(index)">{{item.title}}
 				</view>
 			</scroll-view>
 			<!-- 右侧滑动区 -->
-			<scroll-view scroll-y class="scroll-Y2"  style="max-height: 71vh;background-color: whitesmoke;" :scroll-into-view="rightview"
+			<scroll-view scroll-y class="scroll-Y2"  style="max-height: 66vh;background-color: whitesmoke;" :scroll-into-view="rightview"
 				scroll-with-animation @scroll="scrollright" @scrolltoupper="scrolltop" @scrolltolower="scrollbuttom">
 			
 				<!-- 功能区节点 -->
@@ -30,7 +30,7 @@
 							<view class="foodPrice">
 								<view class="priceflex">
 									<text class="zero">¥</text>
-									{{i.price}}
+									{{i.priceVisable}}
 								</view>
 								<view class="shopCar iconfont-themeColor-write" v-show="i.num == 0" @tap="addcart(i)">
                                     <text class="lg text-white cuIcon-add"  ></text>
@@ -78,7 +78,7 @@
 								<view class="foodPrice">
 									<view class="priceflex">
 										<text class="zero">¥</text>
-										{{i.price}}
+										{{i.priceVisable}}
 									</view>
 									<view class="shopCar iconfont-themeColor-write" v-show="i.num == 0" @tap="addcart(i)">
 										<text class="lg text-white cuIcon-add"  ></text>
@@ -96,7 +96,7 @@
 				<button class="bg-red submit" @click="handleOk()">立即下单</button>
 			</view>
 		</uni-popup>
-	</view>
+	</s-layout>
 </template>
 
 <script setup>
@@ -151,6 +151,7 @@
                 {   url:item.goodsIcon,
                     name: item.goodsName,
                     price: item.goodsPrice,
+					priceVisable:item.priceVisable,
                     goodsId: item.id,
                     num : 0
                 });
@@ -189,7 +190,7 @@
 	const countprice = ()=>{
 		let totalprice = 0
 		nowCartList.value.forEach(element => {
-			totalprice = totalprice +element.price*element.num
+			totalprice = totalprice +element.priceVisable*element.num
 		});
 		nowCartPrice.value = totalprice
 		// console.log('nowCartList',nowCartList.value);