index.vue 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884
  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.xuePhone = ''
  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.xuePhone,
  1283. userName: this.userName,
  1284. orderNumber: this.orderNumber,
  1285. shopId: this.shopId,
  1286. status: this.status,
  1287. orderType: this.orderType
  1288. }
  1289. // console.log('查询',data)
  1290. this.$Request.getA("/admin/order/selectAllOrder", data).then(res => {
  1291. uni.stopPullDownRefresh();
  1292. if (res.code == 0) {
  1293. // this.msgData = res.data
  1294. res.data.list.forEach(res => {
  1295. res.orderCode = res.orderCode.substring(res.orderCode.length - 3, res.orderCode
  1296. .length)
  1297. var phone = res.phone;
  1298. // var result = phone.substring(0, 3) + "****" + phone.substring(7, 11);
  1299. // console.log(result);
  1300. res.phone = phone
  1301. })
  1302. if (this.page == 1) {
  1303. this.orderList = res.data.list
  1304. } else {
  1305. this.orderList = [...this.orderList, ...res.data.list]
  1306. }
  1307. console.log(this.orderList,'kk')
  1308. this.totalCount = res.data.totalCount
  1309. this.show1 = true
  1310. }
  1311. // 加载提示关闭
  1312. uni.hideLoading()
  1313. });
  1314. }
  1315. },
  1316. onReachBottom: function() {
  1317. if(this.orderList.length < (this.totalCount-this.spliceCount)){
  1318. this.page ++;
  1319. this.getOrderList();
  1320. }else{
  1321. uni.showToast({
  1322. title: '已经到底了~',
  1323. icon: 'none'
  1324. })
  1325. }
  1326. },
  1327. onPullDownRefresh: function() {
  1328. this.page = 1;
  1329. this.getOrderList();
  1330. },
  1331. }
  1332. </script>
  1333. <style scoped>
  1334. .active {
  1335. width: 82rpx;
  1336. height: 6rpx;
  1337. background: #333333;
  1338. margin-left: 12rpx;
  1339. }
  1340. .bg {
  1341. background-color: #FFFFFF;
  1342. }
  1343. /* 切换选项 */
  1344. .nav {
  1345. display: flex;
  1346. align-items: center;
  1347. justify-content: center;
  1348. background-color: #FFFFFF;
  1349. color: #999999;
  1350. }
  1351. .btn {
  1352. /* padding: 10rpx 20rpx;
  1353. text-align: center;
  1354. background: rgba(255, 19, 10, 0.2);
  1355. font-size: 28rpx;
  1356. border: 2rpx solid #FF130A;
  1357. color: #FF130A;
  1358. opacity: 0.6;
  1359. border-radius: 8rpx; */
  1360. width: 150rpx;
  1361. height: 60rpx;
  1362. line-height: 60rpx;
  1363. text-align: center;
  1364. background: #F5F5F5;
  1365. font-size: 28rpx;
  1366. border: 2rpx solid ##F5F5F5;
  1367. color: #666666;
  1368. border-radius: 50rpx;
  1369. font-weight: 700;
  1370. margin-left: 10rpx;
  1371. }
  1372. .btnCm {
  1373. /* padding: 10rpx 20rpx;
  1374. text-align: center;
  1375. background: #0081FF;
  1376. font-size: 28rpx;
  1377. border: 2rpx solid #0081FF;
  1378. color: #FFFFFF;
  1379. opacity: 0.6;
  1380. border-radius: 8rpx; */
  1381. }
  1382. /* 拍照 */
  1383. .btn_pai{
  1384. width: 150rpx;
  1385. height: 60rpx;
  1386. line-height: 60rpx;
  1387. text-align: center;
  1388. background: rgba(255, 201, 189, 1);
  1389. font-size: 28rpx;
  1390. border: 2rpx solid rgba(255, 201, 189, 1);
  1391. color: #333333;
  1392. border-radius: 50rpx;
  1393. font-weight: 700;
  1394. margin-left: 15rpx;
  1395. }
  1396. .btn_ {
  1397. width: 150rpx;
  1398. height: 60rpx;
  1399. line-height: 60rpx;
  1400. text-align: center;
  1401. background: #FCD202;
  1402. font-size: 28rpx;
  1403. border: 2rpx solid #FCD202;
  1404. color: #333333;
  1405. border-radius: 50rpx;
  1406. font-weight: 700;
  1407. margin-left: 15rpx;
  1408. }
  1409. .tabBtn {
  1410. /* background-color: #f6f6fa; */
  1411. height: 60rpx;
  1412. line-height: 60rpx;
  1413. color: #000000;
  1414. font-size: 31rpx;
  1415. font-weight: bold;
  1416. }
  1417. .shaix {
  1418. width: 30%;
  1419. text-align: center;
  1420. display: flex;
  1421. align-items: center;
  1422. justify-content: center;
  1423. letter-spacing: 4rpx;
  1424. font-size: 27rpx;
  1425. }
  1426. .select {
  1427. color: #000000;
  1428. font-size: 31rpx;
  1429. font-weight: bold;
  1430. background-color: #fff;
  1431. }
  1432. .nav view {
  1433. flex-grow: 1;
  1434. margin: 3% 6.5% 2%;
  1435. text-align: center;
  1436. }
  1437. .nav_btna {
  1438. font-size: 42rpx;
  1439. line-height: 34rpx;
  1440. color: #000000;
  1441. font-weight: bold;
  1442. border-bottom: 14rpx solid #FCD202;
  1443. }
  1444. /* 内容 */
  1445. /* 全部订单 */
  1446. .cont_one {
  1447. /* margin-top: 160rpx; */
  1448. }
  1449. .cont_one image {
  1450. width: 80%;
  1451. height: 353rpx;
  1452. }
  1453. /* 到店取餐 */
  1454. .cont_two {
  1455. display: none;
  1456. width: 94%;
  1457. margin: 3% auto;
  1458. background-color: #FFFFFF;
  1459. border-radius: 18rpx;
  1460. }
  1461. .cont {
  1462. /* display: none; */
  1463. width: 94%;
  1464. margin: 3% auto;
  1465. background-color: #FFFFFF;
  1466. border-radius: 18rpx;
  1467. }
  1468. .order_title{
  1469. width: 90%;
  1470. margin: 0 auto;
  1471. border-radius: 14px 14px, 0px, 0px;
  1472. background: rgba(255, 239, 222, 1);
  1473. height: 40upx;
  1474. color: rgba(255, 141, 26, 1);
  1475. font-size: 24upx;
  1476. line-height: 40upx;
  1477. text-align: center;
  1478. }
  1479. .cont_two_top {
  1480. width: 94%;
  1481. padding: 4% 3% 0;
  1482. margin: 0 auto;
  1483. display: flex;
  1484. justify-content: space-between;
  1485. }
  1486. .cont_two_top_le {
  1487. width: 85%;
  1488. font-size: 30rpx;
  1489. font-weight: 500;
  1490. color: #333333;
  1491. /* line-height: 2; */
  1492. margin: 5rpx 0;
  1493. }
  1494. .cont_two_top_ri {
  1495. /* width: 15%; */
  1496. padding: 6rpx 10rpx;
  1497. text-align: center;
  1498. background: rgba(255, 19, 10, 0.2);
  1499. font-size: 24rpx;
  1500. border: 2rpx solid #FF130A;
  1501. color: #FF130A;
  1502. opacity: 0.6;
  1503. border-radius: 8rpx;
  1504. }
  1505. .cont_two_top_ri1 {
  1506. /* width: 15%; */
  1507. text-align: center;
  1508. /* line-height: 2; */
  1509. padding: 6rpx 10rpx;
  1510. background: #62ba8b;
  1511. font-size: 24rpx;
  1512. border: 2rpx solid #62ba8b;
  1513. color: #fff;
  1514. /* opacity: 0.6; */
  1515. border-radius: 8rpx;
  1516. }
  1517. .cont_two_top_ri2 {
  1518. /* width: 15%; */
  1519. text-align: center;
  1520. /* line-height: 2; */
  1521. padding: 6rpx 10rpx;
  1522. background: #FCD202;
  1523. font-size: 24rpx;
  1524. border: 2rpx solid #FCD202;
  1525. color: #fff;
  1526. /* opacity: 0.6; */
  1527. border-radius: 8rpx;
  1528. }
  1529. .cont_two_text {
  1530. font-size: 58rpx;
  1531. text-align: center;
  1532. font-weight: bold;
  1533. color: red;
  1534. margin: 3% 0;
  1535. line-height: 32rpx;
  1536. }
  1537. .cont_two_text2 {
  1538. font-size: 30rpx;
  1539. width: 100%;
  1540. font-weight: 500;
  1541. color: #333333;
  1542. text-align: center;
  1543. padding-bottom: 3%;
  1544. /* line-height: 32rpx; */
  1545. }
  1546. .cont_two_text2 text {
  1547. color: #FF130A;
  1548. }
  1549. .cont_two_bottom {
  1550. width: 94%;
  1551. padding: 3%;
  1552. margin: 0 auto;
  1553. display: flex;
  1554. border-top: 1rpx solid #E6E6E6;
  1555. }
  1556. .cont_two_bottom_le {
  1557. flex: 1;
  1558. font-size: 24rpx;
  1559. font-weight: 500;
  1560. color: #999999;
  1561. line-height: 32rpx;
  1562. }
  1563. .cont_two_bottom_ri {
  1564. flex: 1;
  1565. text-align: right;
  1566. }
  1567. .cont_two_bottom_ri image {
  1568. width: 14rpx;
  1569. height: 24rpx;
  1570. }
  1571. /* 外卖订单 */
  1572. .cont_three {
  1573. display: none;
  1574. width: 94%;
  1575. margin: 3% auto;
  1576. background-color: #FFFFFF;
  1577. border-radius: 18rpx;
  1578. }
  1579. .cont_three_top {
  1580. width: 94%;
  1581. padding: 4% 3% 0;
  1582. margin: 0 auto;
  1583. display: flex;
  1584. }
  1585. .cont_three_top_le {
  1586. flex: 2;
  1587. font-size: 30rpx;
  1588. font-weight: 500;
  1589. color: #D80204;
  1590. line-height: 32rpx;
  1591. }
  1592. .cont_three_top_ri {
  1593. flex: 1;
  1594. text-align: right;
  1595. font-size: 24rpx;
  1596. font-weight: 500;
  1597. color: #999999;
  1598. line-height: 32rpx;
  1599. }
  1600. .cont_three_text {
  1601. padding: 2% 0 2% 3%;
  1602. font-size: 24rpx;
  1603. font-weight: 500;
  1604. color: #999999;
  1605. line-height: 32rpx;
  1606. }
  1607. .cont_three_cen {
  1608. width: 94%;
  1609. padding: 0.5% 3%;
  1610. margin: 0 auto;
  1611. display: flex;
  1612. }
  1613. .cont_three_cen_le {
  1614. flex: 2;
  1615. font-size: 30rpx;
  1616. font-weight: 500;
  1617. color: #333333;
  1618. line-height: 32rpx;
  1619. }
  1620. .cont_three_cen_ri {
  1621. flex: 1;
  1622. text-align: right;
  1623. font-size: 24rpx;
  1624. font-weight: 500;
  1625. color: #999999;
  1626. line-height: 32rpx;
  1627. }
  1628. .cont_three_text2 {
  1629. font-size: 24rpx;
  1630. font-weight: 500;
  1631. color: #D80204;
  1632. padding: 0 3%;
  1633. line-height: 32rpx;
  1634. }
  1635. .cont_three_bottom {
  1636. width: 94%;
  1637. padding: 3%;
  1638. margin: 3% auto 0;
  1639. display: flex;
  1640. border-top: 1rpx solid #E6E6E6;
  1641. }
  1642. .cont_three_bottom_le {
  1643. flex: 1;
  1644. font-size: 24rpx;
  1645. font-weight: 500;
  1646. color: #999999;
  1647. line-height: 32rpx;
  1648. }
  1649. .cont_three_bottom_ri {
  1650. flex: 1;
  1651. text-align: right;
  1652. }
  1653. .cont_dis {
  1654. display: block;
  1655. }
  1656. .box {
  1657. width: 100%;
  1658. height: 100vh;
  1659. background-color: rgba(0, 0, 0, 0.2);
  1660. /* opacity: 0.2; */
  1661. position: absolute;
  1662. top: 40px;
  1663. z-index: 999
  1664. }
  1665. .popbox {
  1666. width: 749upx;
  1667. /* height: 764upx; */
  1668. background: #FFFFFF;
  1669. padding-bottom: 72rpx;
  1670. z-inde: 999;
  1671. /* #ifdef H5 */
  1672. position: fixed;
  1673. top: 120px;
  1674. left: 0;
  1675. right: 0;
  1676. /* #endif */
  1677. /* #ifndef H5 */
  1678. position: fixed;
  1679. top: 66rpx;
  1680. left: 0;
  1681. right: 0;
  1682. /* #endif */
  1683. }
  1684. .impute {
  1685. background: #F2F2F2;
  1686. height: 80rpx;
  1687. margin: 20rpx 0;
  1688. }
  1689. .btns {
  1690. width: 690upx;
  1691. height: 88upx;
  1692. background: #FF8D1A;
  1693. box-shadow: 0upx 10upx 20upx 0upx #FFD9B3;
  1694. border-radius: 16upx;
  1695. text-align: center;
  1696. line-height: 88rpx;
  1697. font-size: 32rpx;
  1698. font-weight: bold;
  1699. margin: 0 auto;
  1700. }
  1701. .tosend_header_food_le {
  1702. width: 15%;
  1703. }
  1704. .tosend_header_food_le image {
  1705. width: 110rpx;
  1706. height: 110rpx;
  1707. }
  1708. .u-border-top:after {
  1709. border: none !important;
  1710. }
  1711. /* 收货码弹框 */
  1712. .receipt_code {
  1713. width: 90%;
  1714. margin: 0 auto;
  1715. }
  1716. .code_title {
  1717. width: 100%;
  1718. line-height: 100rpx;
  1719. font-size: 31rpx;
  1720. font-weight: bold;
  1721. text-align: center;
  1722. letter-spacing: 2rpx;
  1723. margin-top: 21rpx;
  1724. margin-bottom: 25rpx;
  1725. }
  1726. .u-input--border {
  1727. border: 1px solid #F2F2F2 !important;
  1728. background: #F2F2F2 !important;
  1729. color: #999999 !important;
  1730. font-weight: 500 !important;
  1731. letter-spacing: 2rpx !important;
  1732. }
  1733. .u-input__input {
  1734. font-size: 30rpx;
  1735. font-weight: bold;
  1736. flex: 1;
  1737. color: #999999 !important;
  1738. min-height: 85rpx !important;
  1739. margin-top: 7rpx;
  1740. }
  1741. .sure {
  1742. width: 100%;
  1743. height: 80rpx;
  1744. background: rgba(245, 211, 71, 1);
  1745. color: white;
  1746. border-radius: 46rpx;
  1747. text-align: center;
  1748. line-height: 80rpx;
  1749. margin-top: 30rpx;
  1750. color: rgba(0, 0, 0, 1);
  1751. letter-spacing: 2rpx;
  1752. }
  1753. .sure2{
  1754. text-align: center;
  1755. color: rgba(0, 0, 0, 1);
  1756. line-height: 80rpx;
  1757. margin-top: 30rpx;
  1758. width: 100%;
  1759. height: 80rpx;
  1760. opacity: 1;
  1761. border-radius: 10rpx;
  1762. background: rgba(245, 211, 71, 1);
  1763. }
  1764. /* 确认送达拍照框 */
  1765. .phone_title{
  1766. margin-top: 10px;
  1767. width: 100%;
  1768. height: 40px;
  1769. /* background-color: #FF7F00; */
  1770. text-align: center;
  1771. line-height: 40px;
  1772. /* color:#FFFFFF; */
  1773. }
  1774. .phone_title2{
  1775. margin-top: 10px;
  1776. text-align: center;
  1777. color:#9d9d9d;
  1778. }
  1779. .code_title2 {
  1780. width: 100%;
  1781. line-height: 50rpx;
  1782. text-align: center;
  1783. letter-spacing: 2rpx;
  1784. margin-top: 21rpx;
  1785. margin-bottom: 25rpx;
  1786. }
  1787. .code_title3{
  1788. margin-left: -20px;
  1789. margin-top: 21rpx;
  1790. margin-bottom: 25rpx;
  1791. width: 638rpx;
  1792. height: 66rpx;
  1793. border-radius: 6rpx;
  1794. background: rgba(255, 245, 245, 1);
  1795. font-size: 24rpx;
  1796. line-height: 66rpx;
  1797. color: rgba(212, 48, 48, 1);
  1798. text-align: center;
  1799. }
  1800. </style>