DishOrderDetail.vue 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615
  1. <template>
  2. <view class="dish-order-detail">
  3. <view class="order-header">
  4. <view class="header-row">
  5. <view class="room-info">
  6. <view class="room-name">{{ currentRoom.roomName || '-' }}</view>
  7. <view class="room-no-chip">包房号 {{ currentRoom.roomNo || '-' }}</view>
  8. </view>
  9. <view class="header-actions">
  10. <button v-if="hasCurrentOrder" class="mini-btn success" @click="goAddDish">加菜</button>
  11. <button v-if="hasCurrentOrder" class="mini-btn warning" @click="openReturnDishDialog">退菜</button>
  12. <button class="mini-btn ghost" @click="backRoomList">返回包房</button>
  13. </view>
  14. </view>
  15. <view v-if="!hasCurrentOrder" class="dish-search">
  16. <input class="search-input" v-model="dishSearchName" placeholder="搜索菜品名称" confirm-type="search"
  17. @confirm="searchDish" />
  18. <button class="search-btn" @click="searchDish">搜索</button>
  19. </view>
  20. </view>
  21. <view class="order-main">
  22. <view v-if="!hasCurrentOrder" class="dish-panel">
  23. <scroll-view scroll-x class="category-bar" :show-scrollbar="false">
  24. <view v-for="item in categoryList" :key="item.id" class="category-pill"
  25. :class="{ active: activeTypeId === item.id }" @click="changeType(item)">
  26. {{ item.name }}
  27. </view>
  28. </scroll-view>
  29. <scroll-view scroll-y class="dish-list">
  30. <view v-if="dishLoading" class="empty-box">加载中...</view>
  31. <view v-else-if="dishList.length === 0" class="empty-box">暂无菜品</view>
  32. <view v-else class="dish-grid">
  33. <view v-for="item in dishList" :key="item.id" class="dish-card">
  34. <image v-if="item.previewImageUrl" class="dish-image" :src="item.previewImageUrl"
  35. mode="aspectFill" @click="previewDishImage(item)"></image>
  36. <view v-else class="dish-image dish-image-empty">暂无图片</view>
  37. <view class="dish-info">
  38. <view class="dish-name" @click="openDishDetail(item)">{{ item.dishName }}</view>
  39. <view class="dish-desc">{{ item.spec || item.taste || item.remarks || '暂无说明' }}</view>
  40. <view class="dish-bottom">
  41. <text class="dish-price">¥{{ formatMoney(item.salePrice) }}</text>
  42. <view v-if="orderedRow(item)" class="card-stepper">
  43. <button class="step-btn" @click="reduceDish(orderedRow(item))">-</button>
  44. <text class="step-qty">{{ orderedRow(item).quantity }}</text>
  45. <button class="step-btn plus" @click="increaseOrderedDish(orderedRow(item))">+</button>
  46. </view>
  47. <button v-else class="plain-btn" @click="addDish(item)">点菜</button>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </scroll-view>
  53. </view>
  54. <view class="ordered-panel" :class="{ full: hasCurrentOrder }">
  55. <view class="ordered-title">
  56. <text>已点菜</text>
  57. <view v-if="hasCurrentOrder" class="ordered-title-actions">
  58. <button class="text-btn" @click="openOrderInfoDialog">订单详情</button>
  59. <button class="text-btn danger" @click="confirmCancelOrder">取消订单</button>
  60. </view>
  61. </view>
  62. <scroll-view scroll-y class="ordered-list">
  63. <view v-if="orderLoading" class="ordered-empty">加载中...</view>
  64. <view v-else-if="orderedList.length === 0" class="ordered-empty">
  65. <view class="ordered-empty-title">暂未点菜</view>
  66. <view class="ordered-empty-sub">从左侧选择菜品后会显示在这里</view>
  67. </view>
  68. <view v-else>
  69. <view class="ordered-head">
  70. <text>菜品</text>
  71. <text>单价</text>
  72. <text>总价</text>
  73. <text>数量</text>
  74. </view>
  75. <view v-for="item in orderedList" :key="item.dishId" class="ordered-item"
  76. :class="{ pending: item.pendingQuantity !== 0 }">
  77. <view class="ordered-dish">
  78. <view class="ordered-dish-name">{{ item.dishName }}</view>
  79. </view>
  80. <view class="ordered-price">¥{{ formatMoney(item.salePrice) }}</view>
  81. <view class="ordered-total">¥{{ formatMoney(itemTotal(item)) }}</view>
  82. <view class="ordered-qty">
  83. <button v-if="!hasCurrentOrder" class="qty-btn" @click="reduceDish(item)">-</button>
  84. <text>{{ item.quantity }}</text>
  85. <button v-if="!hasCurrentOrder" class="qty-btn plus" @click="increaseOrderedDish(item)">+</button>
  86. </view>
  87. </view>
  88. </view>
  89. </scroll-view>
  90. <view class="ordered-footer">
  91. <view class="ordered-summary">
  92. <text>共 {{ orderedList.length }} 项,总价</text>
  93. <strong>¥{{ formatMoney(orderTotal) }}</strong>
  94. </view>
  95. <view class="ordered-actions" :class="{ one: hasCurrentOrder && !hasChangedDish }">
  96. <button v-if="hasCurrentOrder && !hasChangedDish" class="footer-btn success" :disabled="submitting"
  97. @click="openSettleDialog">结账</button>
  98. <button v-if="!hasCurrentOrder || hasChangedDish" class="footer-btn primary" :disabled="submitting"
  99. @click="confirmSubmitOrder">下单</button>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. <view v-if="!hasCurrentOrder" class="cart-bar">
  105. <view class="cart-bar-left" @click="cartSheetVisible = true">
  106. <view class="cart-badge">{{ orderQuantity }}</view>
  107. <view class="cart-bar-text">
  108. <text class="cart-bar-count">共 {{ orderedList.length }} 项</text>
  109. <text class="cart-bar-total">¥{{ formatMoney(orderTotal) }}</text>
  110. </view>
  111. </view>
  112. <view class="cart-bar-actions">
  113. <button class="bar-btn ghost" @click="cartSheetVisible = true">查看购物车</button>
  114. <button class="bar-btn primary" :disabled="submitting" @click="confirmSubmitOrder">下单</button>
  115. </view>
  116. </view>
  117. <view v-if="cartSheetVisible" class="modal-mask sheet-mask" @click="cartSheetVisible = false">
  118. <view class="cart-sheet" @click.stop>
  119. <view class="sheet-head">
  120. <text>已点菜({{ orderedList.length }} 项)</text>
  121. <text class="sheet-close" @click="cartSheetVisible = false">收起</text>
  122. </view>
  123. <scroll-view scroll-y class="sheet-list">
  124. <view v-if="orderedList.length === 0" class="ordered-empty">
  125. <view class="ordered-empty-title">暂未点菜</view>
  126. <view class="ordered-empty-sub">从上方选择菜品后会显示在这里</view>
  127. </view>
  128. <view v-for="item in orderedList" :key="item.dishId" class="sheet-item"
  129. :class="{ pending: item.pendingQuantity !== 0 }">
  130. <view class="sheet-item-main">
  131. <view class="ordered-dish-name">{{ item.dishName }}</view>
  132. <view class="sheet-item-price">¥{{ formatMoney(item.salePrice) }} / 份</view>
  133. </view>
  134. <view class="ordered-qty">
  135. <button class="qty-btn" @click="reduceDish(item)">-</button>
  136. <text>{{ item.quantity }}</text>
  137. <button class="qty-btn plus" @click="increaseOrderedDish(item)">+</button>
  138. </view>
  139. </view>
  140. </scroll-view>
  141. <view class="sheet-foot">
  142. <text>总价 <strong>¥{{ formatMoney(orderTotal) }}</strong></text>
  143. <button class="bar-btn primary" :disabled="submitting" @click="confirmSubmitOrder">下单</button>
  144. </view>
  145. </view>
  146. </view>
  147. <view v-if="dishDetailVisible" class="modal-mask" @click="dishDetailVisible = false">
  148. <view class="modal-card dish-detail-card" @click.stop>
  149. <view class="detail-head">
  150. <text class="detail-title">菜品详情</text>
  151. <text class="detail-close" @click="dishDetailVisible = false">✕</text>
  152. </view>
  153. <scroll-view scroll-y class="dish-detail-body">
  154. <view class="detail-name-row">
  155. <text class="detail-name">{{ currentDish.dishName || '-' }}</text>
  156. <view v-if="currentDish.typeName" class="detail-type-chip">{{ currentDish.typeName }}</view>
  157. </view>
  158. <view class="detail-grid">
  159. <view class="detail-cell">
  160. <text class="detail-label">单位</text>
  161. <text class="detail-value">{{ currentDish.unit || '-' }}</text>
  162. </view>
  163. <view class="detail-cell">
  164. <text class="detail-label">规格</text>
  165. <text class="detail-value">{{ currentDish.spec || '-' }}</text>
  166. </view>
  167. <view class="detail-cell wide">
  168. <text class="detail-label">口味</text>
  169. <text class="detail-value">{{ currentDish.taste || '-' }}</text>
  170. </view>
  171. <view class="detail-cell wide">
  172. <text class="detail-label">备注</text>
  173. <text class="detail-value">{{ currentDish.remarks || '-' }}</text>
  174. </view>
  175. <view class="detail-cell wide">
  176. <text class="detail-label">菜品图片</text>
  177. <view v-if="!currentDish.previewImageList || currentDish.previewImageList.length === 0"
  178. class="detail-value">暂无图片</view>
  179. <view v-else class="detail-image-list">
  180. <image v-for="(url, index) in currentDish.previewImageList" :key="index"
  181. class="detail-image" :src="url" mode="aspectFill"
  182. @click="previewDetailImage(url)"></image>
  183. </view>
  184. </view>
  185. </view>
  186. </scroll-view>
  187. </view>
  188. </view>
  189. <view v-if="settleDialogVisible" class="modal-mask" @click="settleDialogVisible = false">
  190. <view class="modal-card settle-card" @click.stop>
  191. <view class="detail-head">
  192. <text class="detail-title">订单结账</text>
  193. <text class="detail-close" @click="settleDialogVisible = false">✕</text>
  194. </view>
  195. <view class="settle-body">
  196. <view class="settle-tabs">
  197. <view class="settle-tab" :class="{ active: settleForm.settleType === '0' }"
  198. @click="settleForm.settleType = '0'">结账</view>
  199. <view class="settle-tab" :class="{ active: settleForm.settleType === '1' }"
  200. @click="settleForm.settleType = '1'">折扣结账</view>
  201. <view class="settle-tab" :class="{ active: settleForm.settleType === '2' }"
  202. @click="settleForm.settleType = '2'">优惠结账</view>
  203. </view>
  204. <view v-if="settleForm.settleType === '0'" class="settle-normal">
  205. <text>订单金额</text>
  206. <strong>¥{{ formatMoney(orderTotal) }}</strong>
  207. </view>
  208. <view v-else class="settle-preview">
  209. <view>
  210. <text>账单原金额</text>
  211. <strong>¥{{ formatMoney(orderTotal) }}</strong>
  212. </view>
  213. <view v-if="settleForm.settleType === '1'">
  214. <text>折扣比例</text>
  215. <strong>{{ formatMoney(settleForm.discountRate) }}%</strong>
  216. </view>
  217. <view v-else>
  218. <text>优惠金额</text>
  219. <strong>¥{{ formatMoney(settleDiscountAmount) }}</strong>
  220. </view>
  221. <view>
  222. <text>应收金额</text>
  223. <strong class="danger-text">¥{{ formatMoney(settlePayableAmount) }}</strong>
  224. </view>
  225. </view>
  226. <view v-if="settleForm.settleType === '1'" class="form-row">
  227. <text>折扣比例</text>
  228. <input type="number" v-model="settleForm.discountRate" placeholder="请输入折扣比例" />
  229. </view>
  230. <view v-if="settleForm.settleType === '2'" class="form-row">
  231. <text>优惠金额</text>
  232. <input type="number" v-model="settleForm.discountAmount" placeholder="请输入优惠金额" />
  233. </view>
  234. <view class="confirm-actions">
  235. <button class="confirm-btn" @click="settleDialogVisible = false">取消</button>
  236. <button class="confirm-btn primary" :disabled="submitting" @click="handleSettleConfirm">确认结账</button>
  237. </view>
  238. </view>
  239. </view>
  240. </view>
  241. <view v-if="confirmOrderDialogVisible" class="modal-mask" @click="continueOrderDish">
  242. <view class="modal-card confirm-card" @click.stop>
  243. <view class="detail-head">
  244. <text class="detail-title">确认订单</text>
  245. <text class="detail-close" @click="continueOrderDish">✕</text>
  246. </view>
  247. <view class="confirm-body">
  248. <view class="confirm-summary">
  249. <view><text>包间名</text><strong>{{ currentRoom.roomName || '-' }}</strong></view>
  250. <view><text>下单时间</text><strong>{{ confirmOrderTime || '-' }}</strong></view>
  251. <view class="wide"><text>菜品合计</text><strong>共 {{ orderedList.length }} 项 {{ orderQuantity }} 份 / ¥{{ formatMoney(orderTotal) }}</strong></view>
  252. </view>
  253. <view class="textarea-row">
  254. <text>备注</text>
  255. <textarea v-model="confirmOrderForm.tasteRemark" maxlength="500" placeholder="请输入备注"></textarea>
  256. </view>
  257. <view class="special-requirement-row">
  258. <text>特殊要求</text>
  259. <view class="req-chips">
  260. <view v-for="(item, index) in $dictUtils.getDictList('special_requirement')" :key="index"
  261. class="req-chip" :class="{ active: selectedSpecialRequirementValues.includes(String(item.value)) }"
  262. @click="toggleSpecialRequirement(String(item.value))">{{ item.label || item.value }}</view>
  263. </view>
  264. </view>
  265. <view class="confirm-actions">
  266. <button class="confirm-btn" @click="continueOrderDish">继续点菜</button>
  267. <button class="confirm-btn primary" :disabled="submitting" @click="handleConfirmOrderSubmit">确认下单</button>
  268. </view>
  269. </view>
  270. </view>
  271. </view>
  272. <view v-if="returnDishDialogVisible" class="modal-mask" @click="returnDishDialogVisible = false">
  273. <view class="modal-card return-card" @click.stop>
  274. <view class="detail-head">
  275. <text class="detail-title">退菜</text>
  276. <text class="detail-close" @click="returnDishDialogVisible = false">✕</text>
  277. </view>
  278. <view class="return-body">
  279. <view class="confirm-summary">
  280. <view><text>包房名</text><strong>{{ currentRoom.roomName || '-' }}</strong></view>
  281. <view><text>下单时间</text><strong>{{ currentOrder && currentOrder.createTime ? currentOrder.createTime : '-' }}</strong></view>
  282. </view>
  283. <scroll-view scroll-y class="return-list">
  284. <view class="return-head">
  285. <text>序号</text><text>菜品名</text><text>剩余数量</text><text>退菜数</text>
  286. </view>
  287. <view v-for="(item, index) in returnDishList" :key="item.dishId" class="return-row"
  288. :class="{ active: item.returnQuantity > 0 }">
  289. <text>{{ index + 1 }}</text>
  290. <text class="return-name">{{ item.dishName }}</text>
  291. <view class="ordered-qty">
  292. <button class="qty-btn" :disabled="item.returnQuantity >= item.quantity"
  293. @click="reduceReturnDish(item)">-</button>
  294. <text>{{ item.quantity - item.returnQuantity }}</text>
  295. <button class="qty-btn plus" :disabled="item.returnQuantity <= 0"
  296. @click="increaseReturnDish(item)">+</button>
  297. </view>
  298. <text class="return-count" :class="{ on: item.returnQuantity > 0 }">{{ item.returnQuantity }}</text>
  299. </view>
  300. </scroll-view>
  301. <view class="textarea-row">
  302. <text>退菜原因</text>
  303. <textarea v-model="returnDishForm.reason" maxlength="500" placeholder="请输入退菜原因"></textarea>
  304. </view>
  305. <view class="confirm-actions">
  306. <button class="confirm-btn" @click="returnDishDialogVisible = false">取消</button>
  307. <button class="confirm-btn primary" :disabled="submitting" @click="handleReturnDishConfirm">确认退菜</button>
  308. </view>
  309. </view>
  310. </view>
  311. </view>
  312. <view v-if="orderInfoDialogVisible" class="modal-mask">
  313. <view class="modal-card info-card">
  314. <view class="modal-title">订单详情</view>
  315. <view class="info-summary">
  316. <view><text>订单编号</text><strong>{{ currentOrder.orderNo || '-' }}</strong></view>
  317. <view><text>结账方式</text><strong>{{ settleTypeName(currentOrder.settleType) }}</strong></view>
  318. <view><text>账单原金额</text><strong>¥{{ formatMoney(currentOrder.totalAmount) }}</strong></view>
  319. <view><text>实收金额</text><strong>¥{{ formatMoney(currentOrder.payableAmount) }}</strong></view>
  320. <view class="wide"><text>备注</text><strong>{{ currentOrder.tasteRemark || '-' }}</strong></view>
  321. </view>
  322. <view class="settle-tabs">
  323. <view class="settle-tab" :class="{ active: infoTab === 'actual' }" @click="infoTab = 'actual'">实际菜单</view>
  324. <view class="settle-tab" :class="{ active: infoTab === 'add' }" @click="infoTab = 'add'">加菜</view>
  325. <view class="settle-tab" :class="{ active: infoTab === 'reduce' }" @click="infoTab = 'reduce'">退菜</view>
  326. </view>
  327. <scroll-view scroll-y class="info-list">
  328. <view v-if="infoDetailList.length === 0" class="empty-box">暂无菜品</view>
  329. <view v-for="(item, index) in infoDetailList" :key="item.id || index" class="info-row">
  330. <view>
  331. <view class="info-dish-name">{{ item.dishName || '-' }}</view>
  332. <view class="info-dish-sub">单价 ¥{{ formatMoney(item.salePrice) }} / 数量 {{ displayQuantity(item) }}</view>
  333. <view v-if="infoTab === 'reduce' && item.reason" class="info-dish-sub">退菜原因:{{ item.reason }}</view>
  334. </view>
  335. <strong>¥{{ formatMoney(displayAmount(item)) }}</strong>
  336. </view>
  337. </scroll-view>
  338. <view class="info-total">共 {{ infoDetailList.length }} 项 / {{ infoQuantity }} 份,总价 ¥{{ formatMoney(infoAmount) }}</view>
  339. <view class="modal-actions">
  340. <button class="modal-btn primary" @click="orderInfoDialogVisible = false">关闭</button>
  341. </view>
  342. </view>
  343. </view>
  344. </view>
  345. </template>
  346. <script>
  347. import DishOrderService from '@/api/psi/DishOrderService'
  348. import OSSSerivce from '@/api/sys/OSSService'
  349. export default {
  350. data() {
  351. return {
  352. roomId: '',
  353. currentRoom: {},
  354. currentOrder: null,
  355. categoryList: [],
  356. activeTypeId: 'all',
  357. dishSearchName: '',
  358. dishList: [],
  359. orderedList: [],
  360. dishLoading: false,
  361. orderLoading: false,
  362. submitting: false,
  363. settleDialogVisible: false,
  364. confirmOrderDialogVisible: false,
  365. returnDishDialogVisible: false,
  366. orderInfoDialogVisible: false,
  367. cartSheetVisible: false,
  368. dishDetailVisible: false,
  369. currentDish: {},
  370. infoTab: 'actual',
  371. pendingOrderSubmit: null,
  372. confirmOrderTime: '',
  373. confirmOrderForm: {
  374. tasteRemark: ''
  375. },
  376. selectedSpecialRequirementValues: [],
  377. lastSpecialRequirementValues: [],
  378. settleForm: {
  379. settleType: '0',
  380. discountRate: 100,
  381. discountAmount: 0
  382. },
  383. returnDishForm: {
  384. reason: ''
  385. },
  386. returnDishList: [],
  387. dishOrderService: null,
  388. ossService: null
  389. }
  390. },
  391. computed: {
  392. orderTotal() {
  393. return this.orderedList.reduce((total, item) => total + this.itemTotal(item), 0)
  394. },
  395. orderQuantity() {
  396. return this.orderedList.reduce((total, item) => total + Number(item.quantity || 0), 0)
  397. },
  398. changedDetailList() {
  399. return this.orderedList.filter(item => item.pendingQuantity !== 0)
  400. },
  401. hasChangedDish() {
  402. return this.changedDetailList.length > 0
  403. },
  404. hasCurrentOrder() {
  405. return !!(this.currentOrder && this.currentOrder.id)
  406. },
  407. submitDetailList() {
  408. return this.orderedList.map((item, index) => ({
  409. dishId: item.dishId,
  410. dishName: item.dishName,
  411. quantity: item.pendingQuantity,
  412. dishSort: index + 1
  413. }))
  414. },
  415. settleDiscountAmount() {
  416. if (this.settleForm.settleType === '1') {
  417. return this.orderTotal - this.settlePayableAmount
  418. }
  419. if (this.settleForm.settleType === '2') {
  420. return Math.min(Number(this.settleForm.discountAmount || 0), this.orderTotal)
  421. }
  422. return 0
  423. },
  424. settlePayableAmount() {
  425. if (this.settleForm.settleType === '1') {
  426. const rate = Math.min(Math.max(Number(this.settleForm.discountRate || 0), 0), 100)
  427. return this.orderTotal * rate / 100
  428. }
  429. if (this.settleForm.settleType === '2') {
  430. return Math.max(this.orderTotal - Number(this.settleForm.discountAmount || 0), 0)
  431. }
  432. return this.orderTotal
  433. },
  434. infoDetailList() {
  435. const order = this.currentOrder || {}
  436. if (this.infoTab === 'add') {
  437. return Array.isArray(order.addDishList) ? order.addDishList : []
  438. }
  439. if (this.infoTab === 'reduce') {
  440. return Array.isArray(order.reduceDishList) ? order.reduceDishList : []
  441. }
  442. return Array.isArray(order.detailList) ? order.detailList : []
  443. },
  444. infoQuantity() {
  445. return this.infoDetailList.reduce((total, item) => total + this.displayQuantity(item), 0)
  446. },
  447. infoAmount() {
  448. return this.infoDetailList.reduce((total, item) => total + this.displayAmount(item), 0)
  449. }
  450. },
  451. onLoad(option) {
  452. this.roomId = option && option.roomId ? option.roomId : ''
  453. uni.setNavigationBarTitle({ title: '点菜' })
  454. this.dishOrderService = new DishOrderService()
  455. this.ossService = new OSSSerivce()
  456. this.initPage()
  457. },
  458. onShow() {
  459. if (this.roomId && this.dishOrderService) {
  460. this.loadRoom(this.roomId)
  461. this.loadCurrentOrder(this.roomId)
  462. }
  463. },
  464. methods: {
  465. initPage() {
  466. if (!this.roomId) {
  467. this.backRoomList()
  468. return
  469. }
  470. this.loadRoom(this.roomId)
  471. this.loadCurrentOrder(this.roomId)
  472. this.activeTypeId = 'all'
  473. this.dishSearchName = ''
  474. this.loadCategoryList()
  475. this.loadDishList()
  476. },
  477. loadRoom(roomId) {
  478. this.dishOrderService.findRoomById(roomId).then((data) => {
  479. this.currentRoom = data || {}
  480. })
  481. },
  482. loadCurrentOrder(roomId) {
  483. this.orderLoading = true
  484. this.dishOrderService.currentOrder(roomId).then((data) => {
  485. this.currentOrder = data || null
  486. const detailList = data && data.detailList ? data.detailList : []
  487. const orderedDetailList = [...detailList].sort((a, b) => Number(a.dishSort || 999999) - Number(b.dishSort || 999999))
  488. this.orderedList = orderedDetailList.map(item => this.toOrderedItem(item, item.quantity || 0, 0))
  489. }).finally(() => {
  490. this.orderLoading = false
  491. })
  492. },
  493. loadCategoryList() {
  494. this.dishOrderService.typeList().then((data) => {
  495. this.categoryList = [
  496. { id: 'all', name: '所有菜品' },
  497. ...(Array.isArray(data) ? data.map(item => ({ id: item.id, name: item.name })) : [])
  498. ]
  499. })
  500. },
  501. changeType(item) {
  502. this.activeTypeId = item.id
  503. this.dishSearchName = ''
  504. this.loadDishList()
  505. },
  506. searchDish() {
  507. this.activeTypeId = 'all'
  508. this.loadDishList()
  509. },
  510. loadDishList() {
  511. this.dishLoading = true
  512. this.dishOrderService.dishList({
  513. typeId: this.activeTypeId === 'all' ? '' : this.activeTypeId,
  514. dishName: this.dishSearchName
  515. }).then((data) => {
  516. this.dishList = Array.isArray(data) ? data : []
  517. this.loadDishImagePreview()
  518. }).finally(() => {
  519. this.dishLoading = false
  520. })
  521. },
  522. addDish(dish) {
  523. const row = this.orderedList.find(item => item.dishId === dish.id)
  524. if (row) {
  525. row.quantity += 1
  526. row.pendingQuantity += 1
  527. return
  528. }
  529. this.orderedList.push(this.toOrderedItem(dish, 1, 1))
  530. },
  531. increaseOrderedDish(item) {
  532. item.quantity += 1
  533. item.pendingQuantity += 1
  534. },
  535. reduceDish(item) {
  536. if (item.quantity <= 0) {
  537. return
  538. }
  539. item.quantity -= 1
  540. item.pendingQuantity -= 1
  541. if (item.quantity === 0 && item.baseQuantity === 0) {
  542. this.orderedList = this.orderedList.filter(row => row.dishId !== item.dishId)
  543. }
  544. },
  545. orderedRow(dish) {
  546. return this.orderedList.find(item => item.dishId === dish.id) || null
  547. },
  548. openSettleDialog() {
  549. if (!this.hasCurrentOrder && this.changedDetailList.length === 0) {
  550. uni.showToast({ title: '请先选择菜品', icon: 'none' })
  551. return
  552. }
  553. this.settleForm = {
  554. settleType: '0',
  555. discountRate: 100,
  556. discountAmount: 0
  557. }
  558. this.settleDialogVisible = true
  559. },
  560. handleSettleConfirm() {
  561. const settleInfo = {
  562. settleType: this.settleForm.settleType,
  563. discountRate: this.settleForm.settleType === '1' ? this.settleForm.discountRate : 100,
  564. discountAmount: this.settleForm.settleType === '2' ? this.settleForm.discountAmount : this.settleDiscountAmount
  565. }
  566. if (!this.hasCurrentOrder) {
  567. this.settleDialogVisible = false
  568. this.openConfirmOrderDialog('1', settleInfo, false)
  569. return
  570. }
  571. this.submitOrder('1', settleInfo, false)
  572. },
  573. confirmSubmitOrder() {
  574. if (this.changedDetailList.length === 0) {
  575. uni.showToast({ title: '请先选择菜品', icon: 'none' })
  576. return
  577. }
  578. if (!this.hasCurrentOrder) {
  579. this.openConfirmOrderDialog('0', {}, true)
  580. return
  581. }
  582. uni.showModal({
  583. title: '提示',
  584. content: '是否确认下单?',
  585. success: (res) => {
  586. if (res.confirm) {
  587. this.submitOrder('0', {}, true)
  588. }
  589. }
  590. })
  591. },
  592. openConfirmOrderDialog(settleFlag, settleInfo = {}, requireChanged = false) {
  593. this.confirmOrderTime = this.formatDateTime(new Date())
  594. this.confirmOrderForm = {
  595. tasteRemark: ''
  596. }
  597. this.selectedSpecialRequirementValues = []
  598. this.lastSpecialRequirementValues = []
  599. this.pendingOrderSubmit = { settleFlag, settleInfo, requireChanged }
  600. this.confirmOrderDialogVisible = true
  601. },
  602. continueOrderDish() {
  603. this.confirmOrderDialogVisible = false
  604. },
  605. handleConfirmOrderSubmit() {
  606. const pending = this.pendingOrderSubmit || {}
  607. this.submitOrder(pending.settleFlag || '0', pending.settleInfo || {}, pending.requireChanged, {
  608. tasteRemark: this.confirmOrderForm.tasteRemark,
  609. specialRequirements: ''
  610. })
  611. },
  612. toggleSpecialRequirement(value) {
  613. const current = [...this.selectedSpecialRequirementValues]
  614. const index = current.indexOf(value)
  615. if (index > -1) {
  616. current.splice(index, 1)
  617. } else {
  618. current.push(value)
  619. }
  620. this.selectedSpecialRequirementValues = current
  621. this.handleSpecialRequirementChange(current)
  622. },
  623. handleSpecialRequirementChange(value) {
  624. const current = Array.isArray(value) ? value.map(item => String(item)) : []
  625. const previous = this.lastSpecialRequirementValues || []
  626. current.filter(item => !previous.includes(item)).forEach(item => this.appendRemarkText(this.getSpecialRequirementLabel(item)))
  627. previous.filter(item => !current.includes(item)).forEach(item => this.removeRemarkText(this.getSpecialRequirementLabel(item)))
  628. this.lastSpecialRequirementValues = [...current]
  629. },
  630. getSpecialRequirementLabel(value) {
  631. const list = this.$dictUtils.getDictList('special_requirement') || []
  632. const row = list.find(item => String(item.value) === String(value))
  633. return row ? (row.label || row.value) : value
  634. },
  635. appendRemarkText(text) {
  636. if (!text) {
  637. return
  638. }
  639. const items = this.getRemarkItems()
  640. if (!items.includes(text)) {
  641. items.push(text)
  642. }
  643. this.confirmOrderForm.tasteRemark = items.join(',')
  644. },
  645. removeRemarkText(text) {
  646. if (!text) {
  647. return
  648. }
  649. let value = this.confirmOrderForm.tasteRemark || ''
  650. if (value.indexOf(`,${text}`) > -1) {
  651. value = value.split(`,${text}`).join('')
  652. } else if (value.indexOf(`${text},`) > -1) {
  653. value = value.split(`${text},`).join('')
  654. } else {
  655. value = value.split(text).join('')
  656. }
  657. this.confirmOrderForm.tasteRemark = this.cleanupRemarkText(value)
  658. },
  659. cleanupRemarkText(value) {
  660. return (value || '').split(',').map(item => item.trim()).filter(item => item).join(',')
  661. },
  662. getRemarkItems() {
  663. return (this.confirmOrderForm.tasteRemark || '').split(',').map(item => item.trim()).filter(item => item)
  664. },
  665. openReturnDishDialog() {
  666. if (!this.hasCurrentOrder) {
  667. return
  668. }
  669. this.returnDishForm = { reason: '' }
  670. this.returnDishList = this.orderedList.map(item => ({
  671. dishId: item.dishId,
  672. dishName: item.dishName,
  673. quantity: item.quantity,
  674. dishSort: item.dishSort,
  675. returnQuantity: 0
  676. }))
  677. this.returnDishDialogVisible = true
  678. },
  679. reduceReturnDish(item) {
  680. if (item.returnQuantity >= item.quantity) {
  681. return
  682. }
  683. item.returnQuantity += 1
  684. },
  685. increaseReturnDish(item) {
  686. if (item.returnQuantity <= 0) {
  687. return
  688. }
  689. item.returnQuantity -= 1
  690. },
  691. handleReturnDishConfirm() {
  692. const detailList = this.returnDishList
  693. .filter(item => Number(item.returnQuantity || 0) > 0)
  694. .map(item => ({
  695. dishId: item.dishId,
  696. dishName: item.dishName,
  697. quantity: -Number(item.returnQuantity || 0),
  698. dishSort: item.dishSort,
  699. reason: this.returnDishForm.reason
  700. }))
  701. if (detailList.length === 0) {
  702. uni.showToast({ title: '请填写退菜数量', icon: 'none' })
  703. return
  704. }
  705. this.submitting = true
  706. this.dishOrderService.submit({
  707. id: this.currentOrder.id,
  708. roomId: this.roomId,
  709. settleFlag: '0',
  710. detailList
  711. }).then((data) => {
  712. uni.showToast({ title: data || '退菜成功', icon: 'none' })
  713. this.returnDishDialogVisible = false
  714. this.loadRoom(this.roomId)
  715. this.loadCurrentOrder(this.roomId)
  716. }).finally(() => {
  717. this.submitting = false
  718. })
  719. },
  720. confirmCancelOrder() {
  721. if (!this.hasCurrentOrder) {
  722. uni.showToast({ title: '暂无可取消的订单', icon: 'none' })
  723. return
  724. }
  725. uni.showModal({
  726. title: '提示',
  727. content: '确定取消当前订单吗?取消后包房将释放。',
  728. success: (res) => {
  729. if (!res.confirm) {
  730. return
  731. }
  732. this.submitting = true
  733. this.dishOrderService.cancelOrder(this.currentOrder.id).then((data) => {
  734. uni.showToast({ title: data || '取消成功', icon: 'none' })
  735. this.backRoomList()
  736. }).finally(() => {
  737. this.submitting = false
  738. })
  739. }
  740. })
  741. },
  742. submitOrder(settleFlag, settleInfo = {}, requireChanged = false, orderInfo = {}) {
  743. const changedList = this.changedDetailList
  744. const detailList = settleFlag === '1' && changedList.length === 0 ? [] : this.submitDetailList
  745. if (requireChanged && changedList.length === 0) {
  746. uni.showToast({ title: '请先选择菜品', icon: 'none' })
  747. return
  748. }
  749. if (settleFlag === '1' && !this.hasCurrentOrder && changedList.length === 0) {
  750. uni.showToast({ title: '请先选择菜品', icon: 'none' })
  751. return
  752. }
  753. if (settleFlag !== '1' && detailList.length === 0) {
  754. uni.showToast({ title: '请先选择菜品', icon: 'none' })
  755. return
  756. }
  757. this.submitting = true
  758. this.dishOrderService.submit({
  759. id: this.hasCurrentOrder ? this.currentOrder.id : '',
  760. roomId: this.roomId,
  761. settleFlag,
  762. ...settleInfo,
  763. ...orderInfo,
  764. detailList
  765. }).then((data) => {
  766. uni.showToast({ title: data || '操作成功', icon: 'none' })
  767. this.settleDialogVisible = false
  768. this.confirmOrderDialogVisible = false
  769. this.loadRoom(this.roomId)
  770. this.loadCurrentOrder(this.roomId)
  771. }).finally(() => {
  772. this.submitting = false
  773. })
  774. },
  775. goAddDish() {
  776. if (!this.hasCurrentOrder) {
  777. return
  778. }
  779. uni.navigateTo({
  780. url: `/pages/psiManagement/dishManage/DishOrderAdd?roomId=${this.roomId}&orderId=${this.currentOrder.id}`
  781. })
  782. },
  783. openOrderInfoDialog() {
  784. this.infoTab = 'actual'
  785. this.orderInfoDialogVisible = true
  786. },
  787. backRoomList() {
  788. uni.navigateBack({
  789. fail: () => {
  790. uni.redirectTo({ url: '/pages/psiManagement/dishManage/DishOrder' })
  791. }
  792. })
  793. },
  794. toOrderedItem(item, quantity, pendingQuantity) {
  795. const salePrice = Number(item.salePrice || 0)
  796. return {
  797. dishId: item.dishId || item.id,
  798. dishName: item.dishName,
  799. salePrice,
  800. quantity,
  801. baseQuantity: quantity - pendingQuantity,
  802. pendingQuantity,
  803. dishSort: item.dishSort || 0
  804. }
  805. },
  806. itemTotal(item) {
  807. return Number(item.salePrice || 0) * Number(item.quantity || 0)
  808. },
  809. loadDishImagePreview() {
  810. this.dishList.forEach((row) => {
  811. const urls = this.getImageUrls(row.imageUrl)
  812. if (urls.length === 0) {
  813. this.$set ? this.$set(row, 'previewImageUrl', '') : row.previewImageUrl = ''
  814. this.$set ? this.$set(row, 'previewImageList', []) : row.previewImageList = []
  815. return
  816. }
  817. this.$set ? this.$set(row, 'previewImageUrl', urls[0]) : row.previewImageUrl = urls[0]
  818. this.$set ? this.$set(row, 'previewImageList', urls) : row.previewImageList = urls
  819. Promise.all(urls.map(url => this.getPreviewUrl(url))).then((list) => {
  820. row.previewImageUrl = list[0]
  821. row.previewImageList = list
  822. })
  823. })
  824. },
  825. getImageUrls(value) {
  826. if (!value) {
  827. return []
  828. }
  829. return value.split(',').map(item => item.trim()).filter(item => item)
  830. },
  831. getPreviewUrl(url) {
  832. if (!url) {
  833. return Promise.resolve('')
  834. }
  835. if (url.indexOf('http') === 0) {
  836. return Promise.resolve(url)
  837. }
  838. return this.ossService.getTemporaryUrl(url).catch(() => url)
  839. },
  840. previewDishImage(item) {
  841. if (!item.previewImageList || item.previewImageList.length === 0) {
  842. return
  843. }
  844. uni.previewImage({
  845. urls: item.previewImageList,
  846. current: item.previewImageUrl
  847. })
  848. },
  849. openDishDetail(item) {
  850. this.currentDish = item || {}
  851. this.dishDetailVisible = true
  852. },
  853. previewDetailImage(url) {
  854. const urls = this.currentDish.previewImageList || []
  855. if (urls.length === 0) {
  856. return
  857. }
  858. uni.previewImage({
  859. urls,
  860. current: url
  861. })
  862. },
  863. formatMoney(value) {
  864. return Number(value || 0).toFixed(2)
  865. },
  866. formatDateTime(value) {
  867. const date = value ? new Date(value) : new Date()
  868. const pad = (num) => String(num).padStart(2, '0')
  869. return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`
  870. },
  871. settleTypeName(value) {
  872. if (value === '1') return '折扣结账'
  873. if (value === '2') return '优惠结账'
  874. if (value === '0') return '结账'
  875. return '-'
  876. },
  877. displayQuantity(item) {
  878. return Math.abs(Number(item.quantity || 0))
  879. },
  880. displayAmount(item) {
  881. return Math.abs(Number(item.amount || 0))
  882. }
  883. }
  884. }
  885. </script>
  886. <style scoped>
  887. .dish-order-detail {
  888. height: calc(100vh - var(--window-top, 0px));
  889. box-sizing: border-box;
  890. display: flex;
  891. flex-direction: column;
  892. overflow: hidden;
  893. padding: 20rpx;
  894. background: #f5f6fa;
  895. }
  896. .order-header {
  897. flex: none;
  898. box-sizing: border-box;
  899. margin-bottom: 18rpx;
  900. padding: 20rpx 24rpx;
  901. border-radius: 12rpx;
  902. background: #fff;
  903. box-shadow: 0 2rpx 10rpx rgba(31, 45, 61, 0.06);
  904. }
  905. .header-row {
  906. display: flex;
  907. align-items: center;
  908. justify-content: space-between;
  909. gap: 12rpx;
  910. }
  911. .room-info {
  912. display: flex;
  913. align-items: center;
  914. min-width: 0;
  915. }
  916. .room-name {
  917. overflow: hidden;
  918. white-space: nowrap;
  919. text-overflow: ellipsis;
  920. font-size: 34rpx;
  921. font-weight: 700;
  922. color: #303133;
  923. line-height: 44rpx;
  924. }
  925. .room-no-chip {
  926. flex: none;
  927. margin-left: 12rpx;
  928. padding: 2rpx 16rpx;
  929. border-radius: 999rpx;
  930. background: #ecf5ff;
  931. font-size: 24rpx;
  932. color: #2979ff;
  933. }
  934. .header-actions {
  935. flex: none;
  936. display: flex;
  937. gap: 12rpx;
  938. }
  939. .mini-btn,
  940. .plain-btn,
  941. .text-btn,
  942. .footer-btn,
  943. .modal-btn {
  944. margin: 0;
  945. padding: 0;
  946. border-radius: 8rpx;
  947. font-size: 26rpx;
  948. line-height: 64rpx;
  949. }
  950. .mini-btn {
  951. width: 150rpx;
  952. height: 64rpx;
  953. color: #fff;
  954. }
  955. .mini-btn.ghost {
  956. color: #2979ff;
  957. background: #ecf5ff;
  958. }
  959. .primary,
  960. .footer-btn.primary,
  961. .modal-btn.primary {
  962. color: #fff;
  963. background: #2979ff;
  964. }
  965. .success,
  966. .footer-btn.success {
  967. color: #fff;
  968. background: #19be6b;
  969. }
  970. .warning {
  971. color: #fff;
  972. background: #f9ae3d;
  973. }
  974. .order-main {
  975. flex: 1;
  976. min-height: 0;
  977. display: flex;
  978. gap: 18rpx;
  979. }
  980. .dish-panel,
  981. .ordered-panel {
  982. min-width: 0;
  983. min-height: 0;
  984. display: flex;
  985. flex-direction: column;
  986. border: 1rpx solid #ebeef5;
  987. border-radius: 10rpx;
  988. background: #fff;
  989. overflow: hidden;
  990. }
  991. .dish-panel {
  992. flex: 1;
  993. }
  994. /* 窄屏不展示已点菜面板,改用底部购物车条 + 半屏弹窗 */
  995. .ordered-panel:not(.full) {
  996. display: none;
  997. }
  998. .ordered-panel.full {
  999. flex: 1;
  1000. }
  1001. .dish-search {
  1002. display: grid;
  1003. grid-template-columns: minmax(0, 1fr) 120rpx;
  1004. gap: 12rpx;
  1005. margin-top: 16rpx;
  1006. }
  1007. .search-input,
  1008. .form-row input,
  1009. .return-row input {
  1010. height: 64rpx;
  1011. box-sizing: border-box;
  1012. padding: 0 18rpx;
  1013. border: 1rpx solid #dcdfe6;
  1014. border-radius: 8rpx;
  1015. font-size: 26rpx;
  1016. color: #303133;
  1017. }
  1018. .search-btn {
  1019. height: 64rpx;
  1020. margin: 0;
  1021. padding: 0;
  1022. border-radius: 8rpx;
  1023. font-size: 26rpx;
  1024. line-height: 64rpx;
  1025. color: #fff;
  1026. background: #2979ff;
  1027. }
  1028. .category-bar {
  1029. flex: none;
  1030. white-space: nowrap;
  1031. box-sizing: border-box;
  1032. padding: 14rpx 16rpx;
  1033. border-bottom: 1rpx solid #ebeef5;
  1034. }
  1035. .category-pill {
  1036. display: inline-block;
  1037. margin-right: 12rpx;
  1038. padding: 10rpx 28rpx;
  1039. border-radius: 999rpx;
  1040. background: #f2f4f7;
  1041. font-size: 26rpx;
  1042. color: #606266;
  1043. }
  1044. .category-pill.active {
  1045. color: #fff;
  1046. background: #2979ff;
  1047. font-weight: 700;
  1048. }
  1049. .dish-list {
  1050. flex: 1;
  1051. min-height: 0;
  1052. box-sizing: border-box;
  1053. padding: 16rpx;
  1054. }
  1055. .dish-grid {
  1056. display: grid;
  1057. grid-template-columns: repeat(auto-fill, minmax(240rpx, 1fr));
  1058. gap: 16rpx;
  1059. }
  1060. .dish-card {
  1061. min-width: 0;
  1062. border: 1rpx solid #ebeef5;
  1063. border-radius: 10rpx;
  1064. overflow: hidden;
  1065. background: #fff;
  1066. }
  1067. .dish-image {
  1068. width: 100%;
  1069. height: 200rpx;
  1070. background: #f2f3f5;
  1071. }
  1072. .dish-image-empty {
  1073. display: flex;
  1074. align-items: center;
  1075. justify-content: center;
  1076. font-size: 24rpx;
  1077. color: #909399;
  1078. }
  1079. .dish-info {
  1080. padding: 12rpx;
  1081. }
  1082. .dish-name,
  1083. .ordered-dish-name,
  1084. .info-dish-name {
  1085. overflow: hidden;
  1086. white-space: nowrap;
  1087. text-overflow: ellipsis;
  1088. }
  1089. .dish-name {
  1090. font-size: 28rpx;
  1091. font-weight: 700;
  1092. color: #303133;
  1093. line-height: 38rpx;
  1094. }
  1095. .dish-desc {
  1096. height: 42rpx;
  1097. margin-top: 8rpx;
  1098. font-size: 24rpx;
  1099. color: #606266;
  1100. line-height: 32rpx;
  1101. overflow: hidden;
  1102. }
  1103. .dish-bottom {
  1104. display: flex;
  1105. align-items: center;
  1106. justify-content: space-between;
  1107. gap: 10rpx;
  1108. margin-top: 12rpx;
  1109. }
  1110. .dish-price,
  1111. .ordered-total,
  1112. .danger-text {
  1113. color: #fa3534;
  1114. }
  1115. .dish-price {
  1116. font-size: 30rpx;
  1117. font-weight: 700;
  1118. }
  1119. .plain-btn {
  1120. width: 96rpx;
  1121. height: 54rpx;
  1122. line-height: 54rpx;
  1123. color: #2979ff;
  1124. background: #ecf5ff;
  1125. }
  1126. .card-stepper {
  1127. display: flex;
  1128. align-items: center;
  1129. gap: 10rpx;
  1130. }
  1131. .step-btn {
  1132. width: 48rpx;
  1133. height: 48rpx;
  1134. margin: 0;
  1135. padding: 0;
  1136. border-radius: 10rpx;
  1137. font-size: 30rpx;
  1138. line-height: 48rpx;
  1139. text-align: center;
  1140. color: #2979ff;
  1141. background: #ecf5ff;
  1142. }
  1143. .step-btn.plus {
  1144. color: #fff;
  1145. background: #2979ff;
  1146. }
  1147. .step-qty {
  1148. min-width: 40rpx;
  1149. text-align: center;
  1150. font-size: 28rpx;
  1151. font-weight: 700;
  1152. color: #303133;
  1153. }
  1154. .ordered-title {
  1155. height: 76rpx;
  1156. display: flex;
  1157. align-items: center;
  1158. justify-content: space-between;
  1159. box-sizing: border-box;
  1160. padding: 0 18rpx;
  1161. border-bottom: 1rpx solid #ebeef5;
  1162. font-size: 30rpx;
  1163. font-weight: 700;
  1164. color: #303133;
  1165. }
  1166. .ordered-title-actions {
  1167. display: flex;
  1168. gap: 10rpx;
  1169. }
  1170. .text-btn {
  1171. width: 140rpx;
  1172. height: 52rpx;
  1173. line-height: 52rpx;
  1174. color: #2979ff;
  1175. background: #ecf5ff;
  1176. }
  1177. .text-btn.danger {
  1178. color: #fa3534;
  1179. background: #fff1f0;
  1180. }
  1181. .ordered-list {
  1182. flex: 1;
  1183. min-height: 0;
  1184. box-sizing: border-box;
  1185. padding: 14rpx;
  1186. }
  1187. .ordered-head,
  1188. .ordered-item {
  1189. display: grid;
  1190. grid-template-columns: minmax(180rpx, 1fr) 110rpx 120rpx 150rpx;
  1191. gap: 10rpx;
  1192. align-items: center;
  1193. text-align: center;
  1194. }
  1195. .ordered-head {
  1196. height: 50rpx;
  1197. padding: 0 10rpx;
  1198. border-radius: 8rpx;
  1199. background: #f7f9fb;
  1200. font-size: 24rpx;
  1201. color: #909399;
  1202. }
  1203. .ordered-item {
  1204. min-height: 86rpx;
  1205. box-sizing: border-box;
  1206. padding: 12rpx 10rpx;
  1207. border-bottom: 1rpx solid #ebeef5;
  1208. font-size: 24rpx;
  1209. color: #606266;
  1210. }
  1211. .ordered-item.pending {
  1212. background: rgba(45, 140, 240, 0.12);
  1213. }
  1214. .ordered-dish-name {
  1215. font-size: 26rpx;
  1216. font-weight: 700;
  1217. color: #303133;
  1218. }
  1219. .ordered-total {
  1220. font-weight: 700;
  1221. }
  1222. .ordered-qty {
  1223. display: flex;
  1224. align-items: center;
  1225. justify-content: center;
  1226. gap: 10rpx;
  1227. }
  1228. .ordered-qty text {
  1229. min-width: 36rpx;
  1230. text-align: center;
  1231. font-size: 26rpx;
  1232. font-weight: 700;
  1233. color: #303133;
  1234. }
  1235. .qty-btn {
  1236. width: 44rpx;
  1237. height: 44rpx;
  1238. margin: 0;
  1239. padding: 0;
  1240. border-radius: 10rpx;
  1241. font-size: 28rpx;
  1242. font-weight: 700;
  1243. line-height: 44rpx;
  1244. text-align: center;
  1245. color: #2979ff;
  1246. background: #ecf5ff;
  1247. }
  1248. .qty-btn.plus {
  1249. color: #fff;
  1250. background: #2979ff;
  1251. }
  1252. .ordered-footer {
  1253. padding: 16rpx;
  1254. border-top: 1rpx solid #ebeef5;
  1255. }
  1256. .ordered-summary {
  1257. display: flex;
  1258. align-items: center;
  1259. justify-content: space-between;
  1260. margin-bottom: 14rpx;
  1261. font-size: 26rpx;
  1262. color: #606266;
  1263. }
  1264. .ordered-summary strong {
  1265. font-size: 36rpx;
  1266. color: #fa3534;
  1267. }
  1268. .ordered-actions {
  1269. display: flex;
  1270. justify-content: flex-end;
  1271. }
  1272. .ordered-actions.one {
  1273. justify-content: flex-end;
  1274. }
  1275. .footer-btn {
  1276. width: 220rpx;
  1277. height: 72rpx;
  1278. line-height: 72rpx;
  1279. }
  1280. .ordered-empty,
  1281. .empty-box {
  1282. min-height: 240rpx;
  1283. display: flex;
  1284. flex-direction: column;
  1285. align-items: center;
  1286. justify-content: center;
  1287. color: #909399;
  1288. font-size: 26rpx;
  1289. }
  1290. .ordered-empty-title {
  1291. font-size: 30rpx;
  1292. color: #606266;
  1293. }
  1294. .ordered-empty-sub {
  1295. margin-top: 8rpx;
  1296. font-size: 24rpx;
  1297. }
  1298. .modal-mask {
  1299. position: fixed;
  1300. left: 0;
  1301. right: 0;
  1302. top: 0;
  1303. bottom: 0;
  1304. z-index: 999;
  1305. display: flex;
  1306. align-items: center;
  1307. justify-content: center;
  1308. padding: 36rpx;
  1309. box-sizing: border-box;
  1310. background: rgba(0, 0, 0, 0.45);
  1311. }
  1312. .modal-card {
  1313. width: 680rpx;
  1314. max-height: 90vh;
  1315. box-sizing: border-box;
  1316. padding: 26rpx;
  1317. border-radius: 12rpx;
  1318. background: #fff;
  1319. overflow: auto;
  1320. }
  1321. .settle-card {
  1322. width: 640rpx;
  1323. padding: 0;
  1324. overflow: hidden;
  1325. }
  1326. .settle-body {
  1327. box-sizing: border-box;
  1328. padding: 24rpx 26rpx;
  1329. }
  1330. .settle-normal text {
  1331. font-size: 26rpx;
  1332. color: #606266;
  1333. }
  1334. .info-card {
  1335. width: 920rpx;
  1336. }
  1337. .modal-title {
  1338. margin-bottom: 20rpx;
  1339. font-size: 34rpx;
  1340. font-weight: 700;
  1341. color: #303133;
  1342. }
  1343. .settle-tabs {
  1344. display: flex;
  1345. gap: 10rpx;
  1346. margin-bottom: 18rpx;
  1347. padding: 8rpx;
  1348. border-radius: 10rpx;
  1349. background: #f7f8fa;
  1350. }
  1351. .settle-tab {
  1352. flex: 1;
  1353. height: 58rpx;
  1354. border-radius: 8rpx;
  1355. text-align: center;
  1356. font-size: 26rpx;
  1357. line-height: 58rpx;
  1358. color: #606266;
  1359. }
  1360. .settle-tab.active {
  1361. color: #fff;
  1362. background: #2979ff;
  1363. font-weight: 700;
  1364. }
  1365. .settle-normal,
  1366. .settle-preview,
  1367. .confirm-summary,
  1368. .info-summary {
  1369. display: grid;
  1370. grid-template-columns: repeat(2, minmax(0, 1fr));
  1371. gap: 12rpx;
  1372. margin-bottom: 18rpx;
  1373. padding: 16rpx;
  1374. border-radius: 8rpx;
  1375. background: #f7f8fa;
  1376. }
  1377. .settle-normal {
  1378. grid-template-columns: 1fr 1fr;
  1379. align-items: center;
  1380. }
  1381. .settle-normal strong {
  1382. text-align: right;
  1383. font-size: 40rpx;
  1384. color: #fa3534;
  1385. }
  1386. .settle-preview text,
  1387. .confirm-summary text,
  1388. .info-summary text {
  1389. display: block;
  1390. font-size: 24rpx;
  1391. color: #909399;
  1392. line-height: 32rpx;
  1393. }
  1394. .settle-preview strong,
  1395. .confirm-summary strong,
  1396. .info-summary strong {
  1397. display: block;
  1398. margin-top: 6rpx;
  1399. font-size: 28rpx;
  1400. color: #303133;
  1401. line-height: 38rpx;
  1402. word-break: break-all;
  1403. }
  1404. .info-summary {
  1405. grid-template-columns: repeat(4, minmax(0, 1fr));
  1406. }
  1407. .info-summary .wide {
  1408. grid-column: span 4;
  1409. }
  1410. .form-row,
  1411. .textarea-row,
  1412. .special-requirement-row {
  1413. margin-bottom: 16rpx;
  1414. }
  1415. .form-row text,
  1416. .textarea-row text,
  1417. .special-requirement-row text {
  1418. display: block;
  1419. margin-bottom: 8rpx;
  1420. font-size: 26rpx;
  1421. color: #606266;
  1422. }
  1423. .form-row input {
  1424. width: 100%;
  1425. }
  1426. .textarea-row textarea {
  1427. width: 100%;
  1428. height: 130rpx;
  1429. box-sizing: border-box;
  1430. padding: 14rpx;
  1431. border: 1rpx solid #dcdfe6;
  1432. border-radius: 8rpx;
  1433. font-size: 26rpx;
  1434. color: #303133;
  1435. }
  1436. .confirm-card {
  1437. width: 640rpx;
  1438. padding: 0;
  1439. overflow: hidden;
  1440. }
  1441. .confirm-body {
  1442. box-sizing: border-box;
  1443. padding: 24rpx 26rpx;
  1444. }
  1445. .confirm-summary .wide {
  1446. grid-column: span 2;
  1447. }
  1448. .req-chips {
  1449. display: flex;
  1450. flex-wrap: wrap;
  1451. gap: 12rpx;
  1452. }
  1453. .req-chip {
  1454. padding: 10rpx 26rpx;
  1455. border: 1rpx solid #dcdfe6;
  1456. border-radius: 999rpx;
  1457. font-size: 24rpx;
  1458. color: #606266;
  1459. background: #fff;
  1460. }
  1461. .req-chip.active {
  1462. border-color: #2979ff;
  1463. background: #ecf5ff;
  1464. color: #2979ff;
  1465. font-weight: 700;
  1466. }
  1467. .confirm-actions {
  1468. display: flex;
  1469. justify-content: flex-end;
  1470. gap: 14rpx;
  1471. margin-top: 22rpx;
  1472. }
  1473. .confirm-btn {
  1474. width: 190rpx;
  1475. height: 64rpx;
  1476. margin: 0;
  1477. padding: 0;
  1478. border-radius: 10rpx;
  1479. font-size: 26rpx;
  1480. line-height: 64rpx;
  1481. color: #606266;
  1482. background: #f7f8fa;
  1483. }
  1484. .confirm-btn.primary {
  1485. color: #fff;
  1486. background: #2979ff;
  1487. }
  1488. .modal-actions {
  1489. display: grid;
  1490. grid-template-columns: 1fr 1fr;
  1491. gap: 14rpx;
  1492. margin-top: 18rpx;
  1493. }
  1494. .modal-btn {
  1495. height: 72rpx;
  1496. line-height: 72rpx;
  1497. color: #606266;
  1498. background: #f7f8fa;
  1499. }
  1500. .return-list,
  1501. .info-list {
  1502. max-height: 380rpx;
  1503. }
  1504. .return-card {
  1505. width: 640rpx;
  1506. padding: 0;
  1507. overflow: hidden;
  1508. }
  1509. .return-body {
  1510. box-sizing: border-box;
  1511. padding: 24rpx 26rpx;
  1512. }
  1513. .return-head,
  1514. .return-row {
  1515. display: grid;
  1516. grid-template-columns: 60rpx minmax(0, 1fr) 200rpx 90rpx;
  1517. gap: 10rpx;
  1518. align-items: center;
  1519. text-align: center;
  1520. }
  1521. .return-row.active {
  1522. background: rgba(45, 140, 240, 0.08);
  1523. }
  1524. .return-count {
  1525. font-weight: 700;
  1526. color: #909399;
  1527. }
  1528. .return-count.on {
  1529. color: #fa3534;
  1530. }
  1531. .qty-btn[disabled] {
  1532. opacity: 0.4;
  1533. }
  1534. .return-head {
  1535. height: 52rpx;
  1536. padding: 0 12rpx;
  1537. border-radius: 8rpx;
  1538. background: #f7f9fb;
  1539. font-size: 24rpx;
  1540. color: #909399;
  1541. }
  1542. .return-row {
  1543. min-height: 70rpx;
  1544. padding: 10rpx 12rpx;
  1545. border-bottom: 1rpx solid #ebeef5;
  1546. font-size: 26rpx;
  1547. color: #606266;
  1548. }
  1549. .return-name {
  1550. overflow: hidden;
  1551. white-space: nowrap;
  1552. text-overflow: ellipsis;
  1553. font-weight: 700;
  1554. color: #303133;
  1555. }
  1556. .info-row {
  1557. display: flex;
  1558. align-items: center;
  1559. justify-content: space-between;
  1560. gap: 18rpx;
  1561. min-height: 88rpx;
  1562. padding: 12rpx 0;
  1563. border-bottom: 1rpx solid #ebeef5;
  1564. }
  1565. .info-row strong {
  1566. font-size: 28rpx;
  1567. color: #fa3534;
  1568. }
  1569. .info-dish-name {
  1570. font-size: 28rpx;
  1571. font-weight: 700;
  1572. color: #303133;
  1573. }
  1574. .info-dish-sub {
  1575. margin-top: 6rpx;
  1576. font-size: 24rpx;
  1577. color: #909399;
  1578. }
  1579. .info-total {
  1580. margin-top: 14rpx;
  1581. text-align: right;
  1582. font-size: 26rpx;
  1583. color: #606266;
  1584. }
  1585. .cart-bar {
  1586. flex: none;
  1587. display: flex;
  1588. align-items: center;
  1589. justify-content: space-between;
  1590. gap: 16rpx;
  1591. margin-top: 16rpx;
  1592. padding: 14rpx 22rpx;
  1593. border: 1rpx solid #ebeef5;
  1594. border-radius: 12rpx;
  1595. background: #fff;
  1596. box-shadow: 0 4rpx 16rpx rgba(31, 45, 61, 0.08);
  1597. }
  1598. .cart-bar-left {
  1599. display: flex;
  1600. align-items: center;
  1601. gap: 16rpx;
  1602. }
  1603. .cart-badge {
  1604. min-width: 40rpx;
  1605. height: 40rpx;
  1606. padding: 0 10rpx;
  1607. box-sizing: border-box;
  1608. display: flex;
  1609. align-items: center;
  1610. justify-content: center;
  1611. border-radius: 999rpx;
  1612. background: #fa3534;
  1613. font-size: 24rpx;
  1614. color: #fff;
  1615. }
  1616. .cart-bar-text {
  1617. display: flex;
  1618. flex-direction: column;
  1619. }
  1620. .cart-bar-count {
  1621. font-size: 22rpx;
  1622. color: #909399;
  1623. }
  1624. .cart-bar-total {
  1625. font-size: 34rpx;
  1626. font-weight: 700;
  1627. color: #fa3534;
  1628. }
  1629. .cart-bar-actions {
  1630. display: flex;
  1631. gap: 12rpx;
  1632. }
  1633. .bar-btn {
  1634. height: 68rpx;
  1635. margin: 0;
  1636. padding: 0 30rpx;
  1637. border-radius: 10rpx;
  1638. font-size: 28rpx;
  1639. line-height: 68rpx;
  1640. }
  1641. .bar-btn.ghost {
  1642. color: #2979ff;
  1643. background: #ecf5ff;
  1644. }
  1645. .bar-btn.primary {
  1646. color: #fff;
  1647. background: #2979ff;
  1648. }
  1649. .sheet-mask {
  1650. align-items: flex-end;
  1651. padding: 0;
  1652. }
  1653. .cart-sheet {
  1654. width: 100%;
  1655. max-height: 70vh;
  1656. display: flex;
  1657. flex-direction: column;
  1658. border-radius: 20rpx 20rpx 0 0;
  1659. background: #fff;
  1660. }
  1661. .sheet-head {
  1662. flex: none;
  1663. display: flex;
  1664. align-items: center;
  1665. justify-content: space-between;
  1666. height: 88rpx;
  1667. padding: 0 26rpx;
  1668. box-sizing: border-box;
  1669. border-bottom: 1rpx solid #ebeef5;
  1670. font-size: 30rpx;
  1671. font-weight: 700;
  1672. color: #303133;
  1673. }
  1674. .sheet-close {
  1675. font-size: 28rpx;
  1676. font-weight: 400;
  1677. color: #2979ff;
  1678. }
  1679. .sheet-list {
  1680. flex: 1;
  1681. min-height: 0;
  1682. box-sizing: border-box;
  1683. padding: 10rpx 26rpx;
  1684. }
  1685. .sheet-item {
  1686. display: flex;
  1687. align-items: center;
  1688. justify-content: space-between;
  1689. gap: 16rpx;
  1690. min-height: 96rpx;
  1691. padding: 12rpx 10rpx;
  1692. box-sizing: border-box;
  1693. border-bottom: 1rpx solid #ebeef5;
  1694. }
  1695. .sheet-item.pending {
  1696. background: rgba(45, 140, 240, 0.12);
  1697. }
  1698. .sheet-item-main {
  1699. flex: 1;
  1700. min-width: 0;
  1701. }
  1702. .sheet-item-price {
  1703. margin-top: 6rpx;
  1704. font-size: 24rpx;
  1705. color: #909399;
  1706. }
  1707. .sheet-foot {
  1708. flex: none;
  1709. display: flex;
  1710. align-items: center;
  1711. justify-content: space-between;
  1712. padding: 18rpx 26rpx;
  1713. border-top: 1rpx solid #ebeef5;
  1714. font-size: 28rpx;
  1715. color: #606266;
  1716. }
  1717. .sheet-foot strong {
  1718. font-size: 36rpx;
  1719. color: #fa3534;
  1720. }
  1721. .dish-detail-card {
  1722. width: 640rpx;
  1723. display: flex;
  1724. flex-direction: column;
  1725. padding: 0;
  1726. overflow: hidden;
  1727. }
  1728. .detail-head {
  1729. flex: none;
  1730. display: flex;
  1731. align-items: center;
  1732. justify-content: space-between;
  1733. gap: 16rpx;
  1734. padding: 24rpx 26rpx;
  1735. border-bottom: 1rpx solid #ebeef5;
  1736. }
  1737. .detail-title {
  1738. font-size: 32rpx;
  1739. font-weight: 700;
  1740. color: #303133;
  1741. }
  1742. .detail-close {
  1743. padding: 6rpx 10rpx;
  1744. font-size: 30rpx;
  1745. color: #909399;
  1746. }
  1747. .dish-detail-body {
  1748. flex: 1;
  1749. min-height: 0;
  1750. box-sizing: border-box;
  1751. padding: 24rpx 26rpx;
  1752. }
  1753. .detail-name-row {
  1754. display: flex;
  1755. align-items: center;
  1756. justify-content: space-between;
  1757. gap: 16rpx;
  1758. margin-bottom: 20rpx;
  1759. }
  1760. .detail-name {
  1761. flex: 1;
  1762. min-width: 0;
  1763. font-size: 36rpx;
  1764. font-weight: 700;
  1765. color: #303133;
  1766. }
  1767. .detail-type-chip {
  1768. flex: none;
  1769. padding: 4rpx 18rpx;
  1770. border-radius: 999rpx;
  1771. background: #ecf5ff;
  1772. font-size: 24rpx;
  1773. color: #2979ff;
  1774. }
  1775. .detail-grid {
  1776. display: grid;
  1777. grid-template-columns: repeat(2, minmax(0, 1fr));
  1778. gap: 16rpx;
  1779. }
  1780. .detail-cell {
  1781. min-width: 0;
  1782. padding: 14rpx 18rpx;
  1783. border-radius: 10rpx;
  1784. background: #f7f8fa;
  1785. }
  1786. .detail-cell.wide {
  1787. grid-column: span 2;
  1788. }
  1789. .detail-label {
  1790. display: block;
  1791. font-size: 22rpx;
  1792. color: #909399;
  1793. line-height: 30rpx;
  1794. }
  1795. .detail-value {
  1796. display: block;
  1797. margin-top: 6rpx;
  1798. font-size: 26rpx;
  1799. color: #303133;
  1800. line-height: 36rpx;
  1801. word-break: break-all;
  1802. }
  1803. .detail-image-list {
  1804. display: flex;
  1805. flex-wrap: wrap;
  1806. gap: 12rpx;
  1807. margin-top: 10rpx;
  1808. }
  1809. .detail-image {
  1810. width: 180rpx;
  1811. height: 180rpx;
  1812. border-radius: 10rpx;
  1813. background: #eceef1;
  1814. }
  1815. @media (min-width: 768px) {
  1816. .room-name {
  1817. font-size: 22px;
  1818. line-height: 30px;
  1819. }
  1820. .order-header {
  1821. margin-bottom: 12px;
  1822. padding: 14px 18px;
  1823. border-radius: 10px;
  1824. }
  1825. .room-no-chip {
  1826. margin-left: 10px;
  1827. padding: 2px 12px;
  1828. font-size: 14px;
  1829. }
  1830. .mini-btn {
  1831. width: 96px;
  1832. height: 40px;
  1833. font-size: 15px;
  1834. line-height: 40px;
  1835. }
  1836. .dish-search {
  1837. grid-template-columns: minmax(0, 1fr) 88px;
  1838. margin-top: 12px;
  1839. }
  1840. .search-input,
  1841. .form-row input,
  1842. .return-row input {
  1843. height: 40px;
  1844. font-size: 15px;
  1845. }
  1846. .search-btn {
  1847. height: 40px;
  1848. font-size: 15px;
  1849. line-height: 40px;
  1850. }
  1851. .category-bar {
  1852. padding: 10px 12px;
  1853. }
  1854. .category-pill {
  1855. margin-right: 8px;
  1856. padding: 7px 18px;
  1857. font-size: 15px;
  1858. }
  1859. .dish-list {
  1860. padding: 12px;
  1861. }
  1862. .dish-grid {
  1863. grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  1864. gap: 12px;
  1865. }
  1866. .dish-image {
  1867. height: 140px;
  1868. }
  1869. .dish-info {
  1870. padding: 10px;
  1871. }
  1872. .dish-name {
  1873. font-size: 16px;
  1874. line-height: 22px;
  1875. }
  1876. .dish-desc {
  1877. height: 20px;
  1878. margin-top: 4px;
  1879. font-size: 13px;
  1880. line-height: 20px;
  1881. }
  1882. .dish-price {
  1883. font-size: 18px;
  1884. }
  1885. .plain-btn {
  1886. width: 60px;
  1887. height: 32px;
  1888. font-size: 14px;
  1889. line-height: 32px;
  1890. }
  1891. .card-stepper {
  1892. gap: 8px;
  1893. }
  1894. .step-btn {
  1895. width: 32px;
  1896. height: 32px;
  1897. border-radius: 8px;
  1898. font-size: 18px;
  1899. line-height: 32px;
  1900. }
  1901. .step-qty {
  1902. min-width: 26px;
  1903. font-size: 16px;
  1904. }
  1905. .ordered-title {
  1906. height: 48px;
  1907. padding: 0 12px;
  1908. font-size: 17px;
  1909. }
  1910. .text-btn {
  1911. width: 84px;
  1912. height: 32px;
  1913. font-size: 13px;
  1914. line-height: 32px;
  1915. }
  1916. .ordered-head {
  1917. height: 34px;
  1918. font-size: 13px;
  1919. }
  1920. .ordered-item {
  1921. min-height: 52px;
  1922. font-size: 14px;
  1923. }
  1924. .ordered-dish-name {
  1925. font-size: 15px;
  1926. }
  1927. .qty-btn {
  1928. width: 30px;
  1929. height: 30px;
  1930. border-radius: 8px;
  1931. font-size: 17px;
  1932. font-weight: 700;
  1933. line-height: 30px;
  1934. }
  1935. .ordered-qty text {
  1936. min-width: 24px;
  1937. font-size: 15px;
  1938. }
  1939. .ordered-summary {
  1940. font-size: 14px;
  1941. }
  1942. .ordered-summary strong {
  1943. font-size: 22px;
  1944. }
  1945. .footer-btn {
  1946. width: 140px;
  1947. height: 44px;
  1948. font-size: 16px;
  1949. line-height: 44px;
  1950. }
  1951. .cart-bar {
  1952. margin-top: 12px;
  1953. padding: 10px 16px;
  1954. border-radius: 10px;
  1955. }
  1956. .cart-badge {
  1957. min-width: 24px;
  1958. height: 24px;
  1959. font-size: 13px;
  1960. }
  1961. .cart-bar-count {
  1962. font-size: 12px;
  1963. }
  1964. .cart-bar-total {
  1965. font-size: 20px;
  1966. }
  1967. .bar-btn {
  1968. height: 40px;
  1969. padding: 0 20px;
  1970. font-size: 15px;
  1971. line-height: 40px;
  1972. border-radius: 8px;
  1973. }
  1974. .sheet-head {
  1975. height: 50px;
  1976. font-size: 16px;
  1977. }
  1978. .sheet-close {
  1979. font-size: 14px;
  1980. }
  1981. .sheet-item {
  1982. min-height: 56px;
  1983. }
  1984. .sheet-item-price {
  1985. font-size: 13px;
  1986. }
  1987. .sheet-foot {
  1988. padding: 12px 16px;
  1989. font-size: 14px;
  1990. }
  1991. .sheet-foot strong {
  1992. font-size: 20px;
  1993. }
  1994. .dish-detail-card {
  1995. width: 460px;
  1996. }
  1997. .detail-head {
  1998. padding: 14px 18px;
  1999. }
  2000. .detail-title {
  2001. font-size: 17px;
  2002. }
  2003. .detail-close {
  2004. padding: 4px 6px;
  2005. font-size: 18px;
  2006. }
  2007. .dish-detail-body {
  2008. padding: 16px 18px;
  2009. }
  2010. .detail-name {
  2011. font-size: 20px;
  2012. line-height: 28px;
  2013. }
  2014. .detail-type-chip {
  2015. padding: 3px 12px;
  2016. font-size: 13px;
  2017. }
  2018. .detail-grid {
  2019. gap: 10px;
  2020. }
  2021. .detail-cell {
  2022. padding: 10px 12px;
  2023. border-radius: 8px;
  2024. }
  2025. .detail-label {
  2026. font-size: 12px;
  2027. line-height: 18px;
  2028. }
  2029. .detail-value {
  2030. margin-top: 4px;
  2031. font-size: 15px;
  2032. line-height: 22px;
  2033. }
  2034. .detail-image {
  2035. width: 110px;
  2036. height: 110px;
  2037. border-radius: 8px;
  2038. }
  2039. .confirm-card {
  2040. width: 460px;
  2041. }
  2042. .confirm-body {
  2043. padding: 16px 18px;
  2044. }
  2045. .confirm-summary text {
  2046. font-size: 12px;
  2047. line-height: 18px;
  2048. }
  2049. .confirm-summary strong {
  2050. margin-top: 4px;
  2051. font-size: 15px;
  2052. line-height: 22px;
  2053. }
  2054. .textarea-row text,
  2055. .special-requirement-row text {
  2056. margin-bottom: 6px;
  2057. font-size: 14px;
  2058. }
  2059. .textarea-row textarea {
  2060. height: 84px;
  2061. padding: 10px;
  2062. font-size: 14px;
  2063. }
  2064. .req-chips {
  2065. gap: 8px;
  2066. }
  2067. .req-chip {
  2068. padding: 6px 14px;
  2069. font-size: 13px;
  2070. }
  2071. .confirm-actions {
  2072. gap: 10px;
  2073. margin-top: 16px;
  2074. }
  2075. .confirm-btn {
  2076. width: 110px;
  2077. height: 40px;
  2078. font-size: 15px;
  2079. line-height: 40px;
  2080. border-radius: 8px;
  2081. }
  2082. .return-card {
  2083. width: 460px;
  2084. }
  2085. .return-body {
  2086. padding: 16px 18px;
  2087. }
  2088. .return-head {
  2089. height: 34px;
  2090. font-size: 13px;
  2091. }
  2092. .return-row {
  2093. min-height: 48px;
  2094. font-size: 14px;
  2095. }
  2096. .settle-card {
  2097. width: 460px;
  2098. }
  2099. .settle-body {
  2100. padding: 16px 18px;
  2101. }
  2102. .settle-tabs {
  2103. gap: 6px;
  2104. margin-bottom: 12px;
  2105. padding: 4px;
  2106. border-radius: 8px;
  2107. }
  2108. .settle-tab {
  2109. height: 36px;
  2110. font-size: 14px;
  2111. line-height: 36px;
  2112. }
  2113. .settle-normal text {
  2114. font-size: 14px;
  2115. }
  2116. .settle-normal strong {
  2117. font-size: 22px;
  2118. }
  2119. .settle-preview text {
  2120. font-size: 12px;
  2121. line-height: 18px;
  2122. }
  2123. .settle-preview strong {
  2124. margin-top: 4px;
  2125. font-size: 15px;
  2126. line-height: 22px;
  2127. }
  2128. .form-row {
  2129. margin-bottom: 12px;
  2130. }
  2131. .form-row text {
  2132. margin-bottom: 6px;
  2133. font-size: 14px;
  2134. }
  2135. .form-row input {
  2136. height: 40px;
  2137. font-size: 14px;
  2138. }
  2139. }
  2140. @media (min-width: 1024px) and (orientation: landscape) {
  2141. .dish-grid {
  2142. grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  2143. }
  2144. .dish-image {
  2145. height: 160px;
  2146. }
  2147. .dish-name {
  2148. font-size: 17px;
  2149. }
  2150. .dish-price {
  2151. font-size: 20px;
  2152. }
  2153. .plain-btn {
  2154. width: 68px;
  2155. height: 36px;
  2156. font-size: 15px;
  2157. line-height: 36px;
  2158. }
  2159. .ordered-head,
  2160. .ordered-item {
  2161. grid-template-columns: minmax(0, 1fr) 72px 84px 100px;
  2162. }
  2163. }
  2164. /* 大屏竖屏(如 1032×1376):放大卡片与字号,避免版面稀疏 */
  2165. @media (min-width: 1024px) and (orientation: portrait) {
  2166. .dish-detail-card {
  2167. width: 520px;
  2168. }
  2169. .detail-image {
  2170. width: 130px;
  2171. height: 130px;
  2172. }
  2173. .confirm-card {
  2174. width: 520px;
  2175. }
  2176. .confirm-summary strong {
  2177. font-size: 16px;
  2178. }
  2179. .req-chip {
  2180. padding: 7px 16px;
  2181. font-size: 14px;
  2182. }
  2183. .confirm-btn {
  2184. width: 120px;
  2185. height: 44px;
  2186. font-size: 16px;
  2187. line-height: 44px;
  2188. }
  2189. .return-card {
  2190. width: 520px;
  2191. }
  2192. .return-row {
  2193. min-height: 52px;
  2194. font-size: 15px;
  2195. }
  2196. .settle-card {
  2197. width: 520px;
  2198. }
  2199. .settle-tab {
  2200. height: 40px;
  2201. font-size: 15px;
  2202. line-height: 40px;
  2203. }
  2204. .settle-normal strong {
  2205. font-size: 24px;
  2206. }
  2207. .room-name {
  2208. font-size: 26px;
  2209. line-height: 34px;
  2210. }
  2211. .room-no-chip {
  2212. font-size: 15px;
  2213. }
  2214. .mini-btn {
  2215. width: 110px;
  2216. height: 44px;
  2217. font-size: 16px;
  2218. line-height: 44px;
  2219. }
  2220. .search-input {
  2221. height: 44px;
  2222. font-size: 16px;
  2223. }
  2224. .search-btn {
  2225. height: 44px;
  2226. font-size: 16px;
  2227. line-height: 44px;
  2228. }
  2229. .category-pill {
  2230. padding: 8px 22px;
  2231. font-size: 16px;
  2232. }
  2233. .dish-grid {
  2234. grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  2235. gap: 16px;
  2236. }
  2237. .dish-image {
  2238. height: 220px;
  2239. }
  2240. .dish-info {
  2241. padding: 14px;
  2242. }
  2243. .dish-name {
  2244. font-size: 18px;
  2245. line-height: 26px;
  2246. }
  2247. .dish-desc {
  2248. height: 22px;
  2249. font-size: 14px;
  2250. line-height: 22px;
  2251. }
  2252. .dish-price {
  2253. font-size: 22px;
  2254. }
  2255. .plain-btn {
  2256. width: 76px;
  2257. height: 38px;
  2258. font-size: 16px;
  2259. line-height: 38px;
  2260. }
  2261. .step-btn {
  2262. width: 38px;
  2263. height: 38px;
  2264. font-size: 20px;
  2265. line-height: 38px;
  2266. }
  2267. .step-qty {
  2268. min-width: 30px;
  2269. font-size: 17px;
  2270. }
  2271. .ordered-title {
  2272. height: 52px;
  2273. font-size: 18px;
  2274. }
  2275. .ordered-head,
  2276. .ordered-item {
  2277. grid-template-columns: minmax(0, 1fr) 80px 92px 110px;
  2278. }
  2279. .ordered-item {
  2280. font-size: 15px;
  2281. }
  2282. .ordered-dish-name {
  2283. font-size: 16px;
  2284. }
  2285. .qty-btn {
  2286. width: 34px;
  2287. height: 34px;
  2288. font-size: 19px;
  2289. line-height: 34px;
  2290. }
  2291. .ordered-qty text {
  2292. min-width: 26px;
  2293. font-size: 16px;
  2294. }
  2295. .footer-btn {
  2296. width: 160px;
  2297. height: 48px;
  2298. font-size: 17px;
  2299. line-height: 48px;
  2300. }
  2301. .cart-bar {
  2302. padding: 12px 20px;
  2303. }
  2304. .cart-bar-count {
  2305. font-size: 13px;
  2306. }
  2307. .cart-bar-total {
  2308. font-size: 22px;
  2309. }
  2310. .bar-btn {
  2311. height: 44px;
  2312. padding: 0 24px;
  2313. font-size: 16px;
  2314. line-height: 44px;
  2315. }
  2316. .sheet-head {
  2317. height: 54px;
  2318. font-size: 17px;
  2319. }
  2320. .sheet-item {
  2321. min-height: 64px;
  2322. }
  2323. .sheet-foot {
  2324. font-size: 15px;
  2325. }
  2326. .sheet-foot strong {
  2327. font-size: 22px;
  2328. }
  2329. }
  2330. </style>