index.vue 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883
  1. <template>
  2. <view class="pages" style="position: relative;">
  3. <!-- #ifndef H5 -->
  4. <view style="position: fixed;top: 0;left: 0;right: 0;z-index: 9999;" class="bg">
  5. <!-- #endif -->
  6. <!-- #ifdef H5 -->
  7. <view style="position: fixed;top:44px;left: 0;right: 0;z-index:9;" class="bg">
  8. <!-- #endif -->
  9. <view class="flex bg justify-between">
  10. <view class="flex justify-around" style="width: 50%;">
  11. <view @click="switchTab(2)" :class="orderType==2? 'select':''" class="tabBtn">
  12. 外卖配送
  13. <view :class="orderType==2? 'active':''"></view>
  14. </view>
  15. <view @click="switchTab(1)" :class="orderType==1? 'select':''" class="tabBtn">
  16. 到店取餐
  17. <view :class="orderType==1? 'active':''"></view>
  18. </view>
  19. </view>
  20. <view class="shaix" @click="bindopen()">
  21. 条件筛选
  22. <image src="../../static/images/order/down.png" style="width:15upx;height:9upx;"></image>
  23. </view>
  24. </view>
  25. <view class="padding-bottom-sm">
  26. <u-tabs v-if="orderType == 1" active-color="#FF8D1A" :list="qucanList" :is-scroll="false"
  27. :current="current" @change="change"></u-tabs>
  28. <u-tabs v-if="orderType == 2" active-color="#FF8D1A" :list="waimaiList" :is-scroll="false"
  29. :current="current1" @change="change1">
  30. </u-tabs>
  31. </view>
  32. </view>
  33. <!-- 全部订单 -->
  34. <view class="cont_one">
  35. <!-- #ifdef MP-WEIXIN -->
  36. <view style="margin-top: 90px">
  37. <!-- #endif -->
  38. <!-- #ifndef MP-WEIXIN -->
  39. <view style="margin-top: 90px">
  40. <!-- #endif -->
  41. <view v-for="(item,index) in orderList" :key='index'
  42. @click="goNav('/pages/order/orderDet?orderNumber='+item.orderNumber+'&orderId='+item.orderId)">
  43. <view class="cont">
  44. <view class="order_title" v-if="item.expectDeliveryTime">预约订单:{{item.expectDeliveryTime}}送达</view>
  45. <view class="flex justify-between padding align-center">
  46. <view class="text-green text-lg" v-if="item.status == 3 && item.indentState == 2">待骑手接单</view>
  47. <view class="text-red text-lg" v-if="item.status == 6 && item.indentState == 2">制作中</view>
  48. <view class="text-green text-lg" v-if="(item.status == 3 || item.status == 6) && item.indentState == 3">骑手已接单</view>
  49. <view class="text-green text-lg" v-if="(item.status == 3 || item.status == 6) && item.indentState == 4">骑手配送中</view>
  50. <view class="text-red text-lg" v-if="item.status == 7">待接单</view>
  51. <view class="text-green text-lg" v-if="item.status == 3&&item.orderType==1">待取餐
  52. </view>
  53. <view class="text-green text-lg"
  54. v-if="item.status == 3&&item.orderType==2&&item.riderUserId==null">待配送</view>
  55. <view class="text-green text-lg"
  56. v-if="item.status == 3&&item.orderType==2&&item.riderUserId">配送中</view>
  57. <view class="text-grey text-lg" v-if="item.status == 4">已完成</view>
  58. <view class="text-gray text-lg" v-if="item.status == 5">已取消</view>
  59. <view class="text-gray text-lg" v-if="item.status == 8">已退款</view>
  60. <view class="text-gray text-sm">{{item.payTime}}</view>
  61. </view>
  62. <u-line color="#f2f2f2" />
  63. <view style="padding:0 30rpx;font-size: 20px;" v-if="item.orderSequence">#{{item.orderSequence}}</view>
  64. <view class="text-red text-xl padding-lr padding-top" v-if="item.orderType==1"><text
  65. style="font-size: 30upx;">取餐号:</text>{{item.orderCode}}</view>
  66. <view class="padding-bottom padding-lr margin-top-sm flex"
  67. v-for="(ite,ind) in item.orderGoodsList" :key='ind'>
  68. <view class="tosend_header_food_le">
  69. <image :src="ite.goodsPicture" alt="加载失败" style="border-radius: 10rpx;" mode="">
  70. </image>
  71. </view>
  72. <view class="margin-left-sm">
  73. <view class="text-black text-lg">{{ite.goodsName}}</view>
  74. <view class="flex align-center text-gray text-sm margin-top-xs">
  75. <view v-if="ite.skuMessage">{{ite.skuMessage}}</view>
  76. <view class="text-gray text-sm" style="margin-left: 5px;margin-top: 4px;">
  77. X{{ite.goodsNum}}</view>
  78. </view>
  79. </view>
  80. </view>
  81. <u-line color="#f2f2f2" />
  82. <view class="padding-bottom padding-lr margin-top-sm text-gray">
  83. <view style="font-size: 18px;z-index: 3;" v-if="item.orderType==1" @click.stop="onPhone(item.phone)">手机号:{{item.phone}}</view>
  84. <view style="font-size: 18px;z-index: 3;" v-else @click.stop="onPhone(JSON.parse(item.address).userPhone)">手机号:{{JSON.parse(item.address).userPhone}}</view>
  85. <view>订单号:{{item.orderNumber}}</view>
  86. </view>
  87. <u-line color="#f2f2f2" />
  88. <view class="padding-bottom padding-lr margin-top-sm text-gray" style="margin-left: 120px;display: flex;">
  89. <view class="flex"
  90. v-if="item.status == 3&&item.orderType==2&&item.autoSendOrder ==1">
  91. <view class="btn_" @click.stop="duanxinOrder(item,index)" style="width: 90px;">送达并发短信</view>
  92. </view>
  93. <view class="flex"
  94. v-if="item.status == 3&&item.orderType==2&&item.autoSendOrder ==1 &&item.deliveryImgs==null">
  95. <view class="btn_pai" @click.stop="paiOrder(item)">拍照</view>
  96. </view>
  97. </view>
  98. <view class="flex align-center justify-between padding-tb">
  99. <view class="flex align-center padding-lr-sm">
  100. <view class="text-gray text-sm">实收:</view>
  101. <view class="text-sm text-black text-bold">¥<text
  102. class="text-xl">{{item.payMoney}}</text>
  103. </view>
  104. </view>
  105. <view class=" flex margin-right">
  106. <view class="flex"
  107. v-if="item.status == 6||item.status == 3">
  108. <view class="btn_" @click.stop="refund(item)" v-if="show1">退款</view>
  109. <view class="btn_" v-if="!show1"
  110. style="background:#FAB6B6;color: #F15B6C;opacity: 0.1;">退款</view>
  111. </view>
  112. <view class="flex" v-if="item.status == 6">
  113. <view class="btn_" @click.stop="finish(item)">制作完成</view>
  114. </view>
  115. <view class="flex"
  116. v-if="item.status == 3&&item.autoSendOrder==2">
  117. <view class="btn_" @click.stop="finishs(item)">配送完成</view>
  118. </view>
  119. <view class="flex" v-if="item.status == 7">
  120. <view class="btn_" @click.stop="jiedan(item)">接单</view>
  121. </view>
  122. <view class="flex" v-if="item.status == 7">
  123. <view class="btn_" @click.stop="jiedans(item)">拒绝接单</view>
  124. </view>
  125. <view class="flex"
  126. v-if="item.status == 4&&item.orderType==2 &&item.deliveryImgs==null">
  127. <view class="btn_pai" @click.stop="paiOrder(item)">拍照</view>
  128. </view>
  129. <view class="flex" v-if="item.status == 6||item.status == 3||item.status == 4">
  130. <view class="btn_" @click.stop="xiaoPiao(item)">补打小票</view>
  131. </view>
  132. <view class="flex"
  133. v-if="item.status == 3&&item.orderType==1">
  134. <view class="btn_" @click.stop="peisong(item,1)">待取餐</view>
  135. </view>
  136. <view class="flex"
  137. v-if="item.status == 3&&item.orderType==2&&item.autoSendOrder ==1">
  138. <view class="btn_" @click.stop="succOrder(item)">完成送达</view>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. </view>
  146. <!-- 确认收货拍照弹出框 -->
  147. <u-popup v-model="alertPhone" mode="center" border-radius="18" :closeable="closeable" close-icon="close-circle"
  148. close-icon-size="45" width="680rpx" height="540rpx" @close="onclose">
  149. <view class="receipt_code">
  150. <view class="phone_title">图片凭证</view>
  151. <view class="phone_title2">请上传外卖送达情况</view>
  152. <view>
  153. <view class="flex" style="overflow: hidden;flex-wrap: wrap;">
  154. <view v-if="goodsPicture1.length">
  155. <view class="margin-top flex margin-right-sm flex-wrap">
  156. <view class="flex"
  157. style="width: 200rpx;height: 200rpx;margin-right: 2rpx;position: relative;"
  158. v-for="(image,index) in goodsPicture1" :key="index">
  159. <image :src="image" style="width: 100%;height: 100%;"></image>
  160. <view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
  161. @click="removeImg(index,'lb')">
  162. <u-icon name="close-circle-fill" color="#FCD202" size="50rpx"></u-icon>
  163. </view>
  164. </view>
  165. </view>
  166. </view>
  167. <view class="margin-top" @click="addImages(1)" v-if="goodsPicture1.length<=1">
  168. <view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
  169. class="flex justify-center align-center">
  170. <view>
  171. <view class="text-center">
  172. <image :src="Tupian('/duanxin/addimg.png')" style="width: 65rpx;height: 55rpx;">
  173. </image>
  174. </view>
  175. <view class="text-center text-black">添加图片</view>
  176. </view>
  177. </view>
  178. </view>
  179. </view>
  180. </view>
  181. <view class="sure" @click="querenduanxin">确认拍照</view>
  182. </view>
  183. </u-popup>
  184. <!-- 确认收货短信弹出框 -->
  185. <u-popup v-model="alertduanxin" v-if="alertduanxin" mode="center" border-radius="18" :closeable="closeable" close-icon="close-circle"
  186. close-icon-size="45" width="680rpx" height="700rpx" @close="onclose2">
  187. <view class="receipt_code">
  188. <view class="receipt_code">
  189. <view class="code_title">是否确认送达</view>
  190. <view class="code_title2">已选订单:1单</view>
  191. <view class="code_title2">通知形式:短信</view>
  192. <view class="code_title2">通知内容:{{duanxin[0].templateContent.substring(0, 21)}}{{qiPhone}}</view>
  193. <view class="code_title3">注:发送短信需要收费,每条{{duanPrice}}元</view>
  194. <view class="sure" @click="querenSh">确认送达</view>
  195. </view>
  196. </view>
  197. </u-popup>
  198. <!-- 发送短信出错弹框 -->
  199. <u-popup v-model="ifNotduan" mode="center" border-radius="18" :closeable="closeable" close-icon="close-circle"
  200. close-icon-size="45" width="680rpx" height="700rpx">
  201. <view class="receipt_code">
  202. <view class="receipt_code">
  203. <view class="code_title">是否确认送达</view>
  204. <view class="text-center">
  205. <image :src="Tupian('/duanxin/%E7%94%BB%E6%9D%BF%202.png')" style="width: 33px;height: 33px;">
  206. </image>
  207. </view>
  208. <view class="code_title2">发送失败</view>
  209. <view class="code_title2">原因:{{failYuanyin}},短信发送失败,请点击拨号联系学生</view>
  210. <view class="sure2" @click="phoneToxue(xuePhone)">
  211. <image :src="Tupian('/duanxin/%E7%94%BB%E6%9D%BF%201.png')" style="width: 33rpx;height: 33rpx;">
  212. </image>
  213. {{xuePhone}}
  214. </view>
  215. </view>
  216. </view>
  217. </u-popup>
  218. <!-- 筛选弹框 -->
  219. <view class="box" v-if="show">
  220. <view class="popbox" @click.stop="shop = false">
  221. <view class="padding">
  222. <view>
  223. <view>订单号</view>
  224. <view>
  225. <input type="number" v-model="orderNumber" class="impute padding-lr"
  226. placeholder="请输入订单号" />
  227. </view>
  228. </view>
  229. <view>
  230. <view>手机号</view>
  231. <view>
  232. <input type="number" v-model="xuePhone" class="impute padding-lr"
  233. placeholder="请输入手机号码" />
  234. </view>
  235. </view>
  236. <view>
  237. <view>昵称</view>
  238. <view>
  239. <input type="text" v-model="userName" class="impute padding-lr"
  240. placeholder="请输入昵称" />
  241. </view>
  242. </view>
  243. </view>
  244. <view class="btns" @click.stop="bindx()">查询</view>
  245. </view>
  246. </view>
  247. <empty v-if="!orderList.length" style="z-index:0;position: relative;top: -20px;"></empty>
  248. <!-- 用于图片压缩的canvas画布 -->
  249. <canvas
  250. :style="{
  251. width: cw + 'px',
  252. height: cw + 'px',
  253. position: 'absolute',
  254. zIndex: -1,
  255. left: '-10000rpx',
  256. top: '-10000rpx'
  257. }"
  258. canvas-id="zipCanvas"
  259. ></canvas>
  260. <!--画布结束-->
  261. </view>
  262. </template>
  263. <script>
  264. import empty from '@/components/empty.vue'
  265. import configdata from '@/common/config.js';
  266. import getLessLimitSizeImage from '@/utils/imageCompress.js'
  267. export default {
  268. components: {
  269. empty
  270. },
  271. data() {
  272. return {
  273. show: false,
  274. page: 1,
  275. limit: 10,
  276. phone: '',
  277. userName: '',
  278. orderNumber: '',
  279. shopId: '',
  280. orderType: 2,
  281. orderList: [],
  282. status: '',
  283. xcxSelect: '',
  284. current: 0,
  285. current1: 0,
  286. qucanList: [{
  287. name: '全部'
  288. },
  289. {
  290. name: '待接单'
  291. },
  292. {
  293. name: '制作中'
  294. },
  295. {
  296. name: '待取餐'
  297. },
  298. {
  299. name: '已完成'
  300. },
  301. {
  302. name: '已取消'
  303. },
  304. {
  305. name: '已退款'
  306. }
  307. ],
  308. waimaiList: [{
  309. name: '全部'
  310. }, {
  311. name: '待接单'
  312. },
  313. {
  314. name: '制作中'
  315. },
  316. {
  317. name: '配送中'
  318. },
  319. {
  320. name: '已完成'
  321. },
  322. {
  323. name: '已取消'
  324. },
  325. {
  326. name: '已退款'
  327. }
  328. ],
  329. arr:[],
  330. closeable: true,
  331. show1: true,
  332. alertPhone:false,
  333. alertduanxin:false,
  334. goodsPicture1: [],//拍照图片
  335. count: 3,
  336. orderId:'',
  337. duanxin:[],//发送的短信
  338. duanPrice:'',//短信费用
  339. qiPhone:'',//骑手电话
  340. ifNotduan:false,//发送短信出错
  341. failYuanyin:'',//短信发送失败原因
  342. xuePhone:'',//当前用户
  343. //画板边长默认是屏幕宽度,正方形画布
  344. cw: uni.getSystemInfoSync().windowWidth,
  345. messageConfiguration:'',
  346. timer:null,
  347. errCount:0,
  348. activeIndex:null,
  349. spliceCount:0
  350. };
  351. },
  352. onLoad(option) {
  353. uni.showLoading({
  354. title: '加载中...',
  355. mask: true, // 是否显示透明蒙层,防止触摸穿透
  356. })
  357. this.$Request.getT('/app/common/type/354').then(res => { //订单取消通知
  358. if (res.code == 0) {
  359. if (res.data && res.data.value) {
  360. this.arr.push(res.data.value)
  361. }
  362. }
  363. })
  364. this.$Request.getT('/app/common/type/353').then(res => { //订单取消通知
  365. if (res.code == 0) {
  366. if (res.data && res.data.value) {
  367. this.arr.push(res.data.value)
  368. }
  369. }
  370. })
  371. this.$Request.getT('/app/common/type/352').then(res => { //新订单通知
  372. if (res.code == 0) {
  373. if (res.data && res.data.value) {
  374. this.arr.push(res.data.value)
  375. }
  376. }
  377. })
  378. // this.shopId = option.shopId
  379. if (option.status) {
  380. this.change(option.status)
  381. }
  382. },
  383. onShow() {
  384. this.shopId = uni.getStorageSync('shopId');
  385. if(this.shopId){
  386. this.getPhone(this.shopId)
  387. }
  388. let userId = uni.getStorageSync('userId')
  389. if(userId){
  390. this.getSetData()
  391. }
  392. this.getOrderList();
  393. this.clearOrderMsg();
  394. },
  395. onHide() {
  396. if (this.timer) {
  397. clearInterval(this.timer)
  398. }
  399. },
  400. methods: {
  401. getSetData() {
  402. // 获取订阅消息配置
  403. let data = {
  404. shopId: uni.getStorageSync('shopId')
  405. }
  406. this.$Request.getT('/app/goods/selectGoodShop', data).then((res) => {
  407. // console.log(res, '888')
  408. if (res.code == 0) {
  409. this.messageConfiguration = res.data.messageConfiguration
  410. if (this.messageConfiguration == 0) {
  411. this.timer = setInterval(() => {
  412. // 订单消息提醒
  413. let data = {
  414. shopIds: this.$queue.getData('shopId')
  415. }
  416. this.$Request.post('/admin/ordermessage/selectReadFlagCount', data).then((res) => {
  417. console.log(res, '999')
  418. if (res.code === 0) {
  419. if (res.data > 0) {
  420. if (this.errCount != res.data) {
  421. this.errCount = res.data
  422. this.aplayAudio()
  423. uni.showModal({
  424. title: '消息',
  425. content: '有' + res.data + '条订单,请前往订单中心处理。',
  426. success: (ret) => {
  427. if (ret.confirm) {
  428. uni.switchTab({
  429. url: '/pages/order/index'
  430. })
  431. } else {
  432. console.log('else', ret)
  433. this.defineCallBack()
  434. }
  435. }
  436. })
  437. // this.chatNum = data.data
  438. }
  439. } else {
  440. this.errCount = 0
  441. }
  442. }
  443. })
  444. }, 10000)
  445. }
  446. }
  447. })
  448. },
  449. aplayAudio() {
  450. const innerAudioContext = uni.createInnerAudioContext()
  451. innerAudioContext.autoplay = true
  452. innerAudioContext.src = 'https://pw.xianmxkj.com/file/uploadPath/2022/01/19/0753211f78d718d44ee6372e33eae9ee.mp3'
  453. innerAudioContext.onPlay(() => {
  454. console.log('开始播放')
  455. })
  456. innerAudioContext.onError((res) => {
  457. console.log(res.errMsg)
  458. console.log(res.errCode)
  459. })
  460. },
  461. defineCallBack() {
  462. let data = {
  463. shopIds: this.$queue.getData('shopId')
  464. }
  465. this.$Request.post('/admin/ordermessage/allcheckOrderMessage', data).then((res) => {
  466. if (res.code === 0) {
  467. this.errCount = 0
  468. }
  469. })
  470. },
  471. getPhone(shopId){
  472. let data = {
  473. shopId
  474. }
  475. this.$Request.postT("/user/selectShopPhoneByShopId", data).then((res)=>{
  476. // console.log(res,"res");
  477. if(res.code == 0){
  478. this.qiPhone = res.data
  479. }
  480. })
  481. },
  482. //联系用户
  483. onPhone(phone){
  484. uni.makePhoneCall({
  485. phoneNumber: phone
  486. });
  487. },
  488. //聊天室
  489. chat(e) {
  490. // #ifdef MP-WEIXIN
  491. if (uni.getStorageSync('sendindexMsg')) {
  492. uni.requestSubscribeMessage({
  493. tmplIds: this.arr,
  494. success(re) {
  495. // console.log(re,'**********')
  496. var datas = JSON.stringify(re);
  497. if (datas.indexOf("accept") != -1) {
  498. console.log(re)
  499. }
  500. },
  501. fail: (res) => {
  502. console.log(res)
  503. }
  504. })
  505. }
  506. // #endif
  507. // console.log(e)
  508. uni.navigateTo({
  509. url: '/pages/my/im?orderId=' + e.orderId
  510. })
  511. },
  512. peisong(e, index) {
  513. // #ifdef MP-WEIXIN
  514. if (uni.getStorageSync('sendindexMsg')) {
  515. uni.requestSubscribeMessage({
  516. tmplIds: this.arr,
  517. success(re) {
  518. // console.log(re,'**********')
  519. var datas = JSON.stringify(re);
  520. if (datas.indexOf("accept") != -1) {
  521. console.log(re)
  522. }
  523. },
  524. fail: (res) => {
  525. console.log(res)
  526. }
  527. })
  528. }
  529. // #endif
  530. let that = this
  531. if (index == 1) {
  532. var texts = '确认要取餐吗?'
  533. }
  534. if (index == 2) {
  535. var texts = '确认开始配送吗?'
  536. }
  537. uni.showModal({
  538. title: '提示',
  539. content: texts,
  540. success: function(res) {
  541. if (res.confirm) {
  542. console.log('用户点击确定');
  543. let data = {
  544. orderId: e.orderId,
  545. orderNumber: e.orderNumber,
  546. shopId: that.shopId,
  547. status: 4
  548. }
  549. that.$Request.postJsonA("/admin/order/updateOrder", data).then(res => {
  550. if (res.code == 0) {
  551. that.getOrderList()
  552. }
  553. });
  554. } else if (res.cancel) {
  555. console.log('用户点击取消');
  556. }
  557. }
  558. });
  559. },
  560. // 清除订单未读消息
  561. clearOrderMsg() {
  562. let data = {
  563. shopIds: this.shopId
  564. }
  565. this.$Request.postA("/admin/ordermessage/allcheckOrderMessage", data).then(res => {
  566. if (res.code == 0 && res.data > 0) {
  567. }
  568. });
  569. },
  570. bindopen() {
  571. this.show = !this.show
  572. },
  573. bindx() {
  574. this.show = false
  575. this.getOrderList()
  576. this.phone = ''
  577. this.userName = ''
  578. this.orderNumber = ''
  579. },
  580. refund(e) {
  581. // #ifdef MP-WEIXIN
  582. if (uni.getStorageSync('sendindexMsg')) {
  583. uni.requestSubscribeMessage({
  584. tmplIds: this.arr,
  585. success(re) {
  586. // console.log(re,'**********')
  587. var datas = JSON.stringify(re);
  588. if (datas.indexOf("accept") != -1) {
  589. console.log(re)
  590. }
  591. },
  592. fail: (res) => {
  593. console.log(res)
  594. }
  595. })
  596. }
  597. // #endif
  598. let that = this
  599. uni.showModal({
  600. title: '提示',
  601. content: '确认退款吗?',
  602. success: function(res) {
  603. if (res.confirm) {
  604. console.log('用户点击确定');
  605. that.show1 = false
  606. let data = {
  607. orderId: e.orderId
  608. }
  609. that.$Request.postA("/admin/order/adminCancelOrder", data).then(res => {
  610. // console.log(res);
  611. if (res.code == 0) {
  612. that.getOrderList()
  613. }else{
  614. uni.showToast({
  615. title:res.msg,
  616. icon:'none'
  617. })
  618. }
  619. });
  620. } else if (res.cancel) {
  621. console.log('用户点击取消');
  622. }
  623. }
  624. });
  625. },
  626. //发短信送达
  627. duanxinOrder(e,index){
  628. console.log(e);
  629. this.activeIndex = index
  630. this.orderId=e.orderId
  631. this.xuePhone=e.phone
  632. this.querenduanxinList()
  633. this.getDuanPrice()
  634. },
  635. //拍照
  636. paiOrder(e){
  637. this.orderId=e.orderId
  638. this.alertPhone=true
  639. },
  640. // 图片上传
  641. addImages(e) {
  642. if (e == 1) {
  643. var num = this.goodsPicture1.length
  644. this.count = 2 - num
  645. }
  646. let that = this
  647. uni.chooseImage({
  648. count: this.count,
  649. sourceType: [ 'camera','album'],
  650. success: res => {
  651. for (let i = 0; i < res.tempFiles.length; i++) {
  652. //这里的id和页面中写的html代码的canvas的id要一致
  653. let canvasId = 'zipCanvas'
  654. //原图的路径
  655. let imagePath = res.tempFiles[i].path
  656. //大小限制
  657. let limitSize = 1024 * 2
  658. //初始绘画区域是画布自身的宽度也就是屏幕宽度
  659. let drawWidth = uni.getSystemInfoSync().windowWidth
  660. let that = this
  661. getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, that, (resPath) => {
  662. uni.showLoading({
  663. title: '上传中'
  664. })
  665. uni.uploadFile({
  666. url: that.config("APIHOST1") + '/alioss/upload',
  667. filePath: resPath,
  668. name: 'file',
  669. success: (uploadFileRes) => {
  670. if (e == 1) {
  671. if (that.goodsPicture1.length < 2) {
  672. that.goodsPicture1.push(JSON.parse(uploadFileRes.data)
  673. .data)
  674. }
  675. }
  676. uni.hideLoading();
  677. },
  678. fail: () => {
  679. uni.showToast({
  680. title: '上传失败',
  681. icon: 'error'
  682. })
  683. }
  684. })
  685. })
  686. }
  687. }
  688. })
  689. },
  690. // 图片删除
  691. removeImg(index, texts) {
  692. if (texts == 'lb') {
  693. this.goodsPicture1.splice(index, 1)
  694. }
  695. },
  696. config: function(name) {
  697. var info = null;
  698. if (name) {
  699. var name2 = name.split("."); //字符分割
  700. if (name2.length > 1) {
  701. info = configdata[name2[0]][name2[1]] || null;
  702. } else {
  703. info = configdata[name] || null;
  704. }
  705. if (info == null) {
  706. let web_config = cache.get("web_config");
  707. if (web_config) {
  708. if (name2.length > 1) {
  709. info = web_config[name2[0]][name2[1]] || null;
  710. } else {
  711. info = web_config[name] || null;
  712. }
  713. }
  714. }
  715. }
  716. return info;
  717. },
  718. // 监听拍照框关闭
  719. onclose(){
  720. this.alertPhone=false
  721. this.goodsPicture1=[]
  722. },
  723. //确认上传图片
  724. querenduanxin(){
  725. var tupian=this.goodsPicture1.toString()
  726. var orderId=this.orderId
  727. let data = {
  728. img:tupian
  729. }
  730. this.$Request.postT(`/admin/order/add-receive-img/${orderId}`,data).then(res => {
  731. console.log(res,'img')
  732. if (res.code == 0) {
  733. this.alertPhone = false
  734. uni.showToast({
  735. title: '图片上传完成',
  736. icon: "none"
  737. });
  738. } else {
  739. uni.showToast({
  740. title: res.msg,
  741. icon: "none"
  742. });
  743. }
  744. });
  745. },
  746. // 获取确认送达短信模板
  747. querenduanxinList() {
  748. this.$Request.getT('/app/tb-indent-sms/template', {
  749. }).then(res => {
  750. this.duanxin=res.data.list
  751. if (res.code == 0) {
  752. this.page = 1;
  753. this.alertduanxin=true
  754. } else {
  755. uni.showToast({
  756. title: res.msg,
  757. icon: "none"
  758. });
  759. }
  760. });
  761. },
  762. //获取短信价格
  763. getDuanPrice(){
  764. this.$Request.getT('/admin/tb-indent-sms/price-of-sms', {
  765. }).then(res => {
  766. if (res.code == 0) {
  767. this.duanPrice= res.data
  768. } else {
  769. uni.showToast({
  770. title: res.msg,
  771. icon: "none"
  772. });
  773. }
  774. });
  775. },
  776. //发短信并送达
  777. querenSh() {
  778. // #ifdef MP-WEIXIN
  779. if (uni.getStorageSync('sendindexMsg')) {
  780. uni.requestSubscribeMessage({
  781. tmplIds: this.arr,
  782. success(re) {
  783. // console.log(re,'**********')
  784. var datas = JSON.stringify(re);
  785. if (datas.indexOf("accept") != -1) {
  786. console.log(re)
  787. }
  788. },
  789. fail: (res) => {
  790. console.log(res)
  791. }
  792. })
  793. }
  794. // #endif
  795. let that = this
  796. uni.showModal({
  797. title: '提示',
  798. content: '确认发送短信并完成送达吗?',
  799. success: (res)=> {
  800. if (res.confirm) {
  801. uni.showLoading({
  802. title: '加载中',
  803. mask: true, // 是否显示透明蒙层,防止触摸穿透
  804. });
  805. let data = {
  806. orderId: that.orderId,
  807. sendSmsFlag:1,
  808. smsTemplateId:that.duanxin[0].id
  809. }
  810. that.$Request.postT("/admin/order/accomplishOrder", data).then(res => {
  811. if (res.code == 0) {
  812. // console.log(this.activeIndex);
  813. this.orderList.splice(this.activeIndex,1)
  814. this.spliceCount ++
  815. that.alertduanxin=false
  816. that.xuePhone=''
  817. // that.getOrderList()
  818. uni.showToast({
  819. title: '配送成功',
  820. icon: "success"
  821. });
  822. }else{
  823. that.failYuanyin=res.msg
  824. that.alertduanxin=false
  825. that.ifNotduan=true
  826. uni.showToast({
  827. title: res.msg,
  828. icon: "none"
  829. });
  830. }
  831. // 加载提示关闭
  832. uni.hideLoading()
  833. });
  834. } else if (res.cancel) {
  835. console.log('用户点击取消');
  836. }
  837. }
  838. });
  839. },
  840. //联系学生
  841. phoneToxue(e){
  842. uni.makePhoneCall({
  843. phoneNumber: e ,
  844. }) // 传参带入号码即可
  845. },
  846. // 完成送达
  847. succOrder(e){
  848. // #ifdef MP-WEIXIN
  849. if (uni.getStorageSync('sendindexMsg')) {
  850. uni.requestSubscribeMessage({
  851. tmplIds: this.arr,
  852. success(re) {
  853. // console.log(re,'**********')
  854. var datas = JSON.stringify(re);
  855. if (datas.indexOf("accept") != -1) {
  856. console.log(re)
  857. }
  858. },
  859. fail: (res) => {
  860. console.log(res)
  861. }
  862. })
  863. }
  864. // #endif
  865. let that = this
  866. uni.showModal({
  867. title: '提示',
  868. content: '确认完成送达吗?',
  869. success: function(res) {
  870. if (res.confirm) {
  871. uni.showLoading({
  872. title: '加载中',
  873. mask: true, // 是否显示透明蒙层,防止触摸穿透
  874. });
  875. console.log('用户点击确定');
  876. let data = {
  877. orderId: e.orderId,
  878. sendSmsFlag:0
  879. // orderNumber: e.orderNumber,
  880. // shopId: that.shopId,
  881. // addressId: e.addressId,
  882. // status: 3
  883. }
  884. that.$Request.postT("/admin/order/accomplishOrder", data).then(res => {
  885. if (res.code == 0) {
  886. that.getOrderList()
  887. }
  888. // 加载提示关闭
  889. uni.hideLoading()
  890. });
  891. } else if (res.cancel) {
  892. console.log('用户点击取消');
  893. }
  894. }
  895. });
  896. },
  897. //制作完成
  898. finish(e) {
  899. // #ifdef MP-WEIXIN
  900. if (uni.getStorageSync('sendindexMsg')) {
  901. uni.requestSubscribeMessage({
  902. tmplIds: this.arr,
  903. success(re) {
  904. // console.log(re,'**********')
  905. var datas = JSON.stringify(re);
  906. if (datas.indexOf("accept") != -1) {
  907. console.log(re)
  908. }
  909. },
  910. fail: (res) => {
  911. console.log(res)
  912. }
  913. })
  914. }
  915. // #endif
  916. let that = this
  917. uni.showModal({
  918. title: '提示',
  919. content: '确认操作完成吗?',
  920. success: function(res) {
  921. if (res.confirm) {
  922. console.log('用户点击确定');
  923. let data = {
  924. orderId: e.orderId,
  925. orderNumber: e.orderNumber,
  926. shopId: that.shopId,
  927. addressId: e.addressId,
  928. status: 3
  929. }
  930. that.$Request.postJsonA("/admin/order/updateOrder", data).then(res => {
  931. if (res.code == 0) {
  932. that.getOrderList()
  933. }
  934. });
  935. } else if (res.cancel) {
  936. console.log('用户点击取消');
  937. }
  938. }
  939. });
  940. },
  941. //配送完成
  942. finishs(e) {
  943. // #ifdef MP-WEIXIN
  944. if (uni.getStorageSync('sendindexMsg')) {
  945. uni.requestSubscribeMessage({
  946. tmplIds: this.arr,
  947. success(re) {
  948. // console.log(re,'**********')
  949. var datas = JSON.stringify(re);
  950. if (datas.indexOf("accept") != -1) {
  951. console.log(re)
  952. }
  953. },
  954. fail: (res) => {
  955. console.log(res)
  956. }
  957. })
  958. }
  959. // #endif
  960. let that = this
  961. uni.showModal({
  962. title: '提示',
  963. content: '确认操作完成吗?',
  964. success: function(res) {
  965. if (res.confirm) {
  966. console.log('用户点击确定');
  967. let data = {
  968. orderId: e.orderId,
  969. orderNumber: e.orderNumber,
  970. shopId: that.shopId,
  971. addressId: e.addressId,
  972. status: 4
  973. }
  974. that.$Request.postJsonA("/admin/order/updateOrder", data).then(res => {
  975. if (res.code == 0) {
  976. that.getOrderList()
  977. }
  978. });
  979. } else if (res.cancel) {
  980. console.log('用户点击取消');
  981. }
  982. }
  983. });
  984. },
  985. //接单
  986. jiedan(e) {
  987. // #ifdef MP-WEIXIN
  988. if (uni.getStorageSync('sendindexMsg')) {
  989. uni.requestSubscribeMessage({
  990. tmplIds: this.arr,
  991. success(re) {
  992. var datas = JSON.stringify(re);
  993. if (datas.indexOf("accept") != -1) {
  994. console.log(re)
  995. }
  996. },
  997. fail: (res) => {
  998. console.log(res)
  999. }
  1000. })
  1001. }
  1002. // #endif
  1003. let that = this
  1004. uni.showModal({
  1005. title: '提示',
  1006. content: '确认接单吗?',
  1007. success: function(res) {
  1008. if (res.confirm) {
  1009. console.log('用户点击确定');
  1010. let data = {
  1011. orderId: e.orderId,
  1012. orderNumber: e.orderNumber,
  1013. status: 6
  1014. }
  1015. that.$Request.postJsonA("/admin/order/updateOrder", data).then(res => {
  1016. if (res.code == 0) {
  1017. that.page = 1
  1018. that.getOrderList()
  1019. }else{
  1020. that.$queue.showToast(res.msg)
  1021. }
  1022. });
  1023. } else if (res.cancel) {
  1024. console.log('用户点击取消');
  1025. }
  1026. }
  1027. });
  1028. },
  1029. // 补打小票
  1030. xiaoPiao(e){
  1031. // #ifdef MP-WEIXIN
  1032. if (uni.getStorageSync('sendindexMsg')) {
  1033. uni.requestSubscribeMessage({
  1034. tmplIds: this.arr,
  1035. success(re) {
  1036. // console.log(re,'**********')
  1037. var datas = JSON.stringify(re);
  1038. if (datas.indexOf("accept") != -1) {
  1039. console.log(re)
  1040. }
  1041. },
  1042. fail: (res) => {
  1043. console.log(res)
  1044. }
  1045. })
  1046. }
  1047. // #endif
  1048. let that = this
  1049. uni.showModal({
  1050. title: '提示',
  1051. content: '确认补打小票吗?',
  1052. success: function(re) {
  1053. if (re.confirm) {
  1054. console.log('用户点击确定');
  1055. let data = {
  1056. orderId: e.orderId,
  1057. isAppend:1
  1058. // orderNumber: e.orderNumber,
  1059. // status: 8
  1060. }
  1061. console.log(data,'l')
  1062. that.$Request.post("/admin/order/print", data).then(res => {
  1063. console.log(res,'po')
  1064. if (res.code == 0) {
  1065. // that.page = 1
  1066. // that.getOrderList()
  1067. }else{
  1068. that.$queue.showToast(res.msg)
  1069. }
  1070. });
  1071. } else if (re.cancel) {
  1072. console.log('用户点击取消');
  1073. }
  1074. }
  1075. });
  1076. },
  1077. //拒绝接单
  1078. jiedans(e) {
  1079. // #ifdef MP-WEIXIN
  1080. if (uni.getStorageSync('sendindexMsg')) {
  1081. uni.requestSubscribeMessage({
  1082. tmplIds: this.arr,
  1083. success(re) {
  1084. // console.log(re,'**********')
  1085. var datas = JSON.stringify(re);
  1086. if (datas.indexOf("accept") != -1) {
  1087. console.log(re)
  1088. }
  1089. },
  1090. fail: (res) => {
  1091. console.log(res)
  1092. }
  1093. })
  1094. }
  1095. // #endif
  1096. let that = this
  1097. uni.showModal({
  1098. title: '提示',
  1099. content: '确认拒绝接单吗?',
  1100. success: function(res) {
  1101. if (res.confirm) {
  1102. console.log('用户点击确定');
  1103. let data = {
  1104. orderId: e.orderId,
  1105. orderNumber: e.orderNumber,
  1106. status: 8
  1107. }
  1108. that.$Request.postJsonA("/admin/order/updateOrder", data).then(res => {
  1109. if (res.code == 0) {
  1110. that.page = 1
  1111. that.getOrderList()
  1112. }
  1113. });
  1114. } else if (res.cancel) {
  1115. console.log('用户点击取消');
  1116. }
  1117. }
  1118. });
  1119. },
  1120. switchTab(e) {
  1121. // #ifdef MP-WEIXIN
  1122. if (uni.getStorageSync('sendindexMsg')) {
  1123. uni.requestSubscribeMessage({
  1124. tmplIds: this.arr,
  1125. success(re) {
  1126. // console.log(re,'**********')
  1127. var datas = JSON.stringify(re);
  1128. if (datas.indexOf("accept") != -1) {
  1129. console.log(re)
  1130. }
  1131. },
  1132. fail: (res) => {
  1133. console.log(res)
  1134. }
  1135. })
  1136. }
  1137. // #endif
  1138. this.page = 1
  1139. this.orderType = e
  1140. this.current = 0
  1141. this.current1 = 0
  1142. this.status = ''
  1143. this.spliceCount = 0
  1144. this.getOrderList()
  1145. },
  1146. change(index) {
  1147. // #ifdef MP-WEIXIN
  1148. if (uni.getStorageSync('sendindexMsg')) {
  1149. uni.requestSubscribeMessage({
  1150. tmplIds: this.arr,
  1151. success(re) {
  1152. // console.log(re,'**********')
  1153. var datas = JSON.stringify(re);
  1154. if (datas.indexOf("accept") != -1) {
  1155. console.log(re)
  1156. }
  1157. },
  1158. fail: (res) => {
  1159. console.log(res)
  1160. }
  1161. })
  1162. }
  1163. // #endif
  1164. this.page = 1
  1165. this.current = index;
  1166. this.spliceCount = 0
  1167. switch (index) {
  1168. case 0:
  1169. this.status = '' //全部
  1170. break;
  1171. case 1:
  1172. this.status = 7 //待接单
  1173. break;
  1174. case 2:
  1175. this.status = 6 //制作中
  1176. break;
  1177. case 3:
  1178. this.status = 3 //待取餐
  1179. break;
  1180. case 4:
  1181. this.status = 4 //已完成
  1182. break;
  1183. case 5:
  1184. this.status = 5 //已取消
  1185. break;
  1186. case '2':
  1187. this.status = 6 //制作中
  1188. break;
  1189. case '1':
  1190. this.status = 7 //待接单
  1191. break;
  1192. case '3':
  1193. this.status = 3 //制作中
  1194. break;
  1195. case '4':
  1196. this.status = 4 //制作中
  1197. break;
  1198. case 6:
  1199. this.status = 8 //已退款
  1200. break;
  1201. }
  1202. this.getOrderList()
  1203. },
  1204. change1(index) {
  1205. // #ifdef MP-WEIXIN
  1206. if (uni.getStorageSync('sendindexMsg')) {
  1207. uni.requestSubscribeMessage({
  1208. tmplIds: this.arr,
  1209. success(re) {
  1210. // console.log(re,'**********')
  1211. var datas = JSON.stringify(re);
  1212. if (datas.indexOf("accept") != -1) {
  1213. console.log(re)
  1214. }
  1215. },
  1216. fail: (res) => {
  1217. console.log(res)
  1218. }
  1219. })
  1220. }
  1221. // #endif
  1222. this.page = 1
  1223. this.current1 = index;
  1224. this.spliceCount = 0
  1225. switch (index) {
  1226. case 0:
  1227. this.status = ''
  1228. break;
  1229. case 1:
  1230. this.status = 7 //待接单
  1231. break;
  1232. case 2:
  1233. this.status = 6
  1234. break;
  1235. case 3:
  1236. this.status = 3
  1237. break;
  1238. case 4:
  1239. this.status = 4
  1240. break;
  1241. case 5:
  1242. this.status = 5
  1243. break;
  1244. case 6:
  1245. this.status = 8
  1246. break;
  1247. }
  1248. this.getOrderList()
  1249. },
  1250. goNav(url) {
  1251. // #ifdef MP-WEIXIN
  1252. if (uni.getStorageSync('sendindexMsg')) {
  1253. uni.requestSubscribeMessage({
  1254. tmplIds: this.arr,
  1255. success(re) {
  1256. // console.log(re,'**********')
  1257. var datas = JSON.stringify(re);
  1258. if (datas.indexOf("accept") != -1) {
  1259. console.log(re)
  1260. }
  1261. },
  1262. fail: (res) => {
  1263. console.log(res)
  1264. }
  1265. })
  1266. }
  1267. // #endif
  1268. uni.navigateTo({
  1269. url
  1270. })
  1271. },
  1272. // 获取数据列表
  1273. getOrderList() {
  1274. uni.showLoading({
  1275. title: '加载中···',
  1276. mask: true, // 是否显示透明蒙层,防止触摸穿透
  1277. })
  1278. console.log(this.page);
  1279. let data = {
  1280. page: this.page,
  1281. limit: this.limit,
  1282. phone: this.phone,
  1283. userName: this.userName,
  1284. orderNumber: this.orderNumber,
  1285. shopId: this.shopId,
  1286. status: this.status,
  1287. orderType: this.orderType
  1288. }
  1289. this.$Request.getA("/admin/order/selectAllOrder", data).then(res => {
  1290. uni.stopPullDownRefresh();
  1291. if (res.code == 0) {
  1292. // this.msgData = res.data
  1293. res.data.list.forEach(res => {
  1294. res.orderCode = res.orderCode.substring(res.orderCode.length - 3, res.orderCode
  1295. .length)
  1296. var phone = res.phone;
  1297. // var result = phone.substring(0, 3) + "****" + phone.substring(7, 11);
  1298. // console.log(result);
  1299. res.phone = phone
  1300. })
  1301. if (this.page == 1) {
  1302. this.orderList = res.data.list
  1303. } else {
  1304. this.orderList = [...this.orderList, ...res.data.list]
  1305. }
  1306. console.log(this.orderList,'kk')
  1307. this.totalCount = res.data.totalCount
  1308. this.show1 = true
  1309. }
  1310. // 加载提示关闭
  1311. uni.hideLoading()
  1312. });
  1313. }
  1314. },
  1315. onReachBottom: function() {
  1316. if(this.orderList.length < (this.totalCount-this.spliceCount)){
  1317. this.page ++;
  1318. this.getOrderList();
  1319. }else{
  1320. uni.showToast({
  1321. title: '已经到底了~',
  1322. icon: 'none'
  1323. })
  1324. }
  1325. },
  1326. onPullDownRefresh: function() {
  1327. this.page = 1;
  1328. this.getOrderList();
  1329. },
  1330. }
  1331. </script>
  1332. <style scoped>
  1333. .active {
  1334. width: 82rpx;
  1335. height: 6rpx;
  1336. background: #333333;
  1337. margin-left: 12rpx;
  1338. }
  1339. .bg {
  1340. background-color: #FFFFFF;
  1341. }
  1342. /* 切换选项 */
  1343. .nav {
  1344. display: flex;
  1345. align-items: center;
  1346. justify-content: center;
  1347. background-color: #FFFFFF;
  1348. color: #999999;
  1349. }
  1350. .btn {
  1351. /* padding: 10rpx 20rpx;
  1352. text-align: center;
  1353. background: rgba(255, 19, 10, 0.2);
  1354. font-size: 28rpx;
  1355. border: 2rpx solid #FF130A;
  1356. color: #FF130A;
  1357. opacity: 0.6;
  1358. border-radius: 8rpx; */
  1359. width: 150rpx;
  1360. height: 60rpx;
  1361. line-height: 60rpx;
  1362. text-align: center;
  1363. background: #F5F5F5;
  1364. font-size: 28rpx;
  1365. border: 2rpx solid ##F5F5F5;
  1366. color: #666666;
  1367. border-radius: 50rpx;
  1368. font-weight: 700;
  1369. margin-left: 10rpx;
  1370. }
  1371. .btnCm {
  1372. /* padding: 10rpx 20rpx;
  1373. text-align: center;
  1374. background: #0081FF;
  1375. font-size: 28rpx;
  1376. border: 2rpx solid #0081FF;
  1377. color: #FFFFFF;
  1378. opacity: 0.6;
  1379. border-radius: 8rpx; */
  1380. }
  1381. /* 拍照 */
  1382. .btn_pai{
  1383. width: 150rpx;
  1384. height: 60rpx;
  1385. line-height: 60rpx;
  1386. text-align: center;
  1387. background: rgba(255, 201, 189, 1);
  1388. font-size: 28rpx;
  1389. border: 2rpx solid rgba(255, 201, 189, 1);
  1390. color: #333333;
  1391. border-radius: 50rpx;
  1392. font-weight: 700;
  1393. margin-left: 15rpx;
  1394. }
  1395. .btn_ {
  1396. width: 150rpx;
  1397. height: 60rpx;
  1398. line-height: 60rpx;
  1399. text-align: center;
  1400. background: #FCD202;
  1401. font-size: 28rpx;
  1402. border: 2rpx solid #FCD202;
  1403. color: #333333;
  1404. border-radius: 50rpx;
  1405. font-weight: 700;
  1406. margin-left: 15rpx;
  1407. }
  1408. .tabBtn {
  1409. /* background-color: #f6f6fa; */
  1410. height: 60rpx;
  1411. line-height: 60rpx;
  1412. color: #000000;
  1413. font-size: 31rpx;
  1414. font-weight: bold;
  1415. }
  1416. .shaix {
  1417. width: 30%;
  1418. text-align: center;
  1419. display: flex;
  1420. align-items: center;
  1421. justify-content: center;
  1422. letter-spacing: 4rpx;
  1423. font-size: 27rpx;
  1424. }
  1425. .select {
  1426. color: #000000;
  1427. font-size: 31rpx;
  1428. font-weight: bold;
  1429. background-color: #fff;
  1430. }
  1431. .nav view {
  1432. flex-grow: 1;
  1433. margin: 3% 6.5% 2%;
  1434. text-align: center;
  1435. }
  1436. .nav_btna {
  1437. font-size: 42rpx;
  1438. line-height: 34rpx;
  1439. color: #000000;
  1440. font-weight: bold;
  1441. border-bottom: 14rpx solid #FCD202;
  1442. }
  1443. /* 内容 */
  1444. /* 全部订单 */
  1445. .cont_one {
  1446. /* margin-top: 160rpx; */
  1447. }
  1448. .cont_one image {
  1449. width: 80%;
  1450. height: 353rpx;
  1451. }
  1452. /* 到店取餐 */
  1453. .cont_two {
  1454. display: none;
  1455. width: 94%;
  1456. margin: 3% auto;
  1457. background-color: #FFFFFF;
  1458. border-radius: 18rpx;
  1459. }
  1460. .cont {
  1461. /* display: none; */
  1462. width: 94%;
  1463. margin: 3% auto;
  1464. background-color: #FFFFFF;
  1465. border-radius: 18rpx;
  1466. }
  1467. .order_title{
  1468. width: 90%;
  1469. margin: 0 auto;
  1470. border-radius: 14px 14px, 0px, 0px;
  1471. background: rgba(255, 239, 222, 1);
  1472. height: 40upx;
  1473. color: rgba(255, 141, 26, 1);
  1474. font-size: 24upx;
  1475. line-height: 40upx;
  1476. text-align: center;
  1477. }
  1478. .cont_two_top {
  1479. width: 94%;
  1480. padding: 4% 3% 0;
  1481. margin: 0 auto;
  1482. display: flex;
  1483. justify-content: space-between;
  1484. }
  1485. .cont_two_top_le {
  1486. width: 85%;
  1487. font-size: 30rpx;
  1488. font-weight: 500;
  1489. color: #333333;
  1490. /* line-height: 2; */
  1491. margin: 5rpx 0;
  1492. }
  1493. .cont_two_top_ri {
  1494. /* width: 15%; */
  1495. padding: 6rpx 10rpx;
  1496. text-align: center;
  1497. background: rgba(255, 19, 10, 0.2);
  1498. font-size: 24rpx;
  1499. border: 2rpx solid #FF130A;
  1500. color: #FF130A;
  1501. opacity: 0.6;
  1502. border-radius: 8rpx;
  1503. }
  1504. .cont_two_top_ri1 {
  1505. /* width: 15%; */
  1506. text-align: center;
  1507. /* line-height: 2; */
  1508. padding: 6rpx 10rpx;
  1509. background: #62ba8b;
  1510. font-size: 24rpx;
  1511. border: 2rpx solid #62ba8b;
  1512. color: #fff;
  1513. /* opacity: 0.6; */
  1514. border-radius: 8rpx;
  1515. }
  1516. .cont_two_top_ri2 {
  1517. /* width: 15%; */
  1518. text-align: center;
  1519. /* line-height: 2; */
  1520. padding: 6rpx 10rpx;
  1521. background: #FCD202;
  1522. font-size: 24rpx;
  1523. border: 2rpx solid #FCD202;
  1524. color: #fff;
  1525. /* opacity: 0.6; */
  1526. border-radius: 8rpx;
  1527. }
  1528. .cont_two_text {
  1529. font-size: 58rpx;
  1530. text-align: center;
  1531. font-weight: bold;
  1532. color: red;
  1533. margin: 3% 0;
  1534. line-height: 32rpx;
  1535. }
  1536. .cont_two_text2 {
  1537. font-size: 30rpx;
  1538. width: 100%;
  1539. font-weight: 500;
  1540. color: #333333;
  1541. text-align: center;
  1542. padding-bottom: 3%;
  1543. /* line-height: 32rpx; */
  1544. }
  1545. .cont_two_text2 text {
  1546. color: #FF130A;
  1547. }
  1548. .cont_two_bottom {
  1549. width: 94%;
  1550. padding: 3%;
  1551. margin: 0 auto;
  1552. display: flex;
  1553. border-top: 1rpx solid #E6E6E6;
  1554. }
  1555. .cont_two_bottom_le {
  1556. flex: 1;
  1557. font-size: 24rpx;
  1558. font-weight: 500;
  1559. color: #999999;
  1560. line-height: 32rpx;
  1561. }
  1562. .cont_two_bottom_ri {
  1563. flex: 1;
  1564. text-align: right;
  1565. }
  1566. .cont_two_bottom_ri image {
  1567. width: 14rpx;
  1568. height: 24rpx;
  1569. }
  1570. /* 外卖订单 */
  1571. .cont_three {
  1572. display: none;
  1573. width: 94%;
  1574. margin: 3% auto;
  1575. background-color: #FFFFFF;
  1576. border-radius: 18rpx;
  1577. }
  1578. .cont_three_top {
  1579. width: 94%;
  1580. padding: 4% 3% 0;
  1581. margin: 0 auto;
  1582. display: flex;
  1583. }
  1584. .cont_three_top_le {
  1585. flex: 2;
  1586. font-size: 30rpx;
  1587. font-weight: 500;
  1588. color: #D80204;
  1589. line-height: 32rpx;
  1590. }
  1591. .cont_three_top_ri {
  1592. flex: 1;
  1593. text-align: right;
  1594. font-size: 24rpx;
  1595. font-weight: 500;
  1596. color: #999999;
  1597. line-height: 32rpx;
  1598. }
  1599. .cont_three_text {
  1600. padding: 2% 0 2% 3%;
  1601. font-size: 24rpx;
  1602. font-weight: 500;
  1603. color: #999999;
  1604. line-height: 32rpx;
  1605. }
  1606. .cont_three_cen {
  1607. width: 94%;
  1608. padding: 0.5% 3%;
  1609. margin: 0 auto;
  1610. display: flex;
  1611. }
  1612. .cont_three_cen_le {
  1613. flex: 2;
  1614. font-size: 30rpx;
  1615. font-weight: 500;
  1616. color: #333333;
  1617. line-height: 32rpx;
  1618. }
  1619. .cont_three_cen_ri {
  1620. flex: 1;
  1621. text-align: right;
  1622. font-size: 24rpx;
  1623. font-weight: 500;
  1624. color: #999999;
  1625. line-height: 32rpx;
  1626. }
  1627. .cont_three_text2 {
  1628. font-size: 24rpx;
  1629. font-weight: 500;
  1630. color: #D80204;
  1631. padding: 0 3%;
  1632. line-height: 32rpx;
  1633. }
  1634. .cont_three_bottom {
  1635. width: 94%;
  1636. padding: 3%;
  1637. margin: 3% auto 0;
  1638. display: flex;
  1639. border-top: 1rpx solid #E6E6E6;
  1640. }
  1641. .cont_three_bottom_le {
  1642. flex: 1;
  1643. font-size: 24rpx;
  1644. font-weight: 500;
  1645. color: #999999;
  1646. line-height: 32rpx;
  1647. }
  1648. .cont_three_bottom_ri {
  1649. flex: 1;
  1650. text-align: right;
  1651. }
  1652. .cont_dis {
  1653. display: block;
  1654. }
  1655. .box {
  1656. width: 100%;
  1657. height: 100vh;
  1658. background-color: rgba(0, 0, 0, 0.2);
  1659. /* opacity: 0.2; */
  1660. position: absolute;
  1661. top: 40px;
  1662. z-index: 999
  1663. }
  1664. .popbox {
  1665. width: 749upx;
  1666. /* height: 764upx; */
  1667. background: #FFFFFF;
  1668. padding-bottom: 72rpx;
  1669. z-inde: 999;
  1670. /* #ifdef H5 */
  1671. position: fixed;
  1672. top: 120px;
  1673. left: 0;
  1674. right: 0;
  1675. /* #endif */
  1676. /* #ifndef H5 */
  1677. position: fixed;
  1678. top: 66rpx;
  1679. left: 0;
  1680. right: 0;
  1681. /* #endif */
  1682. }
  1683. .impute {
  1684. background: #F2F2F2;
  1685. height: 80rpx;
  1686. margin: 20rpx 0;
  1687. }
  1688. .btns {
  1689. width: 690upx;
  1690. height: 88upx;
  1691. background: #FF8D1A;
  1692. box-shadow: 0upx 10upx 20upx 0upx #FFD9B3;
  1693. border-radius: 16upx;
  1694. text-align: center;
  1695. line-height: 88rpx;
  1696. font-size: 32rpx;
  1697. font-weight: bold;
  1698. margin: 0 auto;
  1699. }
  1700. .tosend_header_food_le {
  1701. width: 15%;
  1702. }
  1703. .tosend_header_food_le image {
  1704. width: 110rpx;
  1705. height: 110rpx;
  1706. }
  1707. .u-border-top:after {
  1708. border: none !important;
  1709. }
  1710. /* 收货码弹框 */
  1711. .receipt_code {
  1712. width: 90%;
  1713. margin: 0 auto;
  1714. }
  1715. .code_title {
  1716. width: 100%;
  1717. line-height: 100rpx;
  1718. font-size: 31rpx;
  1719. font-weight: bold;
  1720. text-align: center;
  1721. letter-spacing: 2rpx;
  1722. margin-top: 21rpx;
  1723. margin-bottom: 25rpx;
  1724. }
  1725. .u-input--border {
  1726. border: 1px solid #F2F2F2 !important;
  1727. background: #F2F2F2 !important;
  1728. color: #999999 !important;
  1729. font-weight: 500 !important;
  1730. letter-spacing: 2rpx !important;
  1731. }
  1732. .u-input__input {
  1733. font-size: 30rpx;
  1734. font-weight: bold;
  1735. flex: 1;
  1736. color: #999999 !important;
  1737. min-height: 85rpx !important;
  1738. margin-top: 7rpx;
  1739. }
  1740. .sure {
  1741. width: 100%;
  1742. height: 80rpx;
  1743. background: rgba(245, 211, 71, 1);
  1744. color: white;
  1745. border-radius: 46rpx;
  1746. text-align: center;
  1747. line-height: 80rpx;
  1748. margin-top: 30rpx;
  1749. color: rgba(0, 0, 0, 1);
  1750. letter-spacing: 2rpx;
  1751. }
  1752. .sure2{
  1753. text-align: center;
  1754. color: rgba(0, 0, 0, 1);
  1755. line-height: 80rpx;
  1756. margin-top: 30rpx;
  1757. width: 100%;
  1758. height: 80rpx;
  1759. opacity: 1;
  1760. border-radius: 10rpx;
  1761. background: rgba(245, 211, 71, 1);
  1762. }
  1763. /* 确认送达拍照框 */
  1764. .phone_title{
  1765. margin-top: 10px;
  1766. width: 100%;
  1767. height: 40px;
  1768. /* background-color: #FF7F00; */
  1769. text-align: center;
  1770. line-height: 40px;
  1771. /* color:#FFFFFF; */
  1772. }
  1773. .phone_title2{
  1774. margin-top: 10px;
  1775. text-align: center;
  1776. color:#9d9d9d;
  1777. }
  1778. .code_title2 {
  1779. width: 100%;
  1780. line-height: 50rpx;
  1781. text-align: center;
  1782. letter-spacing: 2rpx;
  1783. margin-top: 21rpx;
  1784. margin-bottom: 25rpx;
  1785. }
  1786. .code_title3{
  1787. margin-left: -20px;
  1788. margin-top: 21rpx;
  1789. margin-bottom: 25rpx;
  1790. width: 638rpx;
  1791. height: 66rpx;
  1792. border-radius: 6rpx;
  1793. background: rgba(255, 245, 245, 1);
  1794. font-size: 24rpx;
  1795. line-height: 66rpx;
  1796. color: rgba(212, 48, 48, 1);
  1797. text-align: center;
  1798. }
  1799. </style>