index.vue 47 KB

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