index.vue 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888
  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. let token = uni.getStorageSync('shopToken')
  662. getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, that, (resPath) => {
  663. uni.showLoading({
  664. title: '上传中'
  665. })
  666. uni.uploadFile({
  667. url: that.config("APIHOST1") + '/admin/new-file/upload',
  668. filePath: resPath,
  669. header: {
  670. token: token
  671. },
  672. name: 'file',
  673. success: (uploadFileRes) => {
  674. if (e == 1) {
  675. if (that.goodsPicture1.length < 2) {
  676. that.goodsPicture1.push(JSON.parse(uploadFileRes.data)
  677. .data)
  678. }
  679. }
  680. uni.hideLoading();
  681. },
  682. fail: () => {
  683. uni.showToast({
  684. title: '上传失败',
  685. icon: 'error'
  686. })
  687. }
  688. })
  689. })
  690. }
  691. }
  692. })
  693. },
  694. // 图片删除
  695. removeImg(index, texts) {
  696. if (texts == 'lb') {
  697. this.goodsPicture1.splice(index, 1)
  698. }
  699. },
  700. config: function(name) {
  701. var info = null;
  702. if (name) {
  703. var name2 = name.split("."); //字符分割
  704. if (name2.length > 1) {
  705. info = configdata[name2[0]][name2[1]] || null;
  706. } else {
  707. info = configdata[name] || null;
  708. }
  709. if (info == null) {
  710. let web_config = cache.get("web_config");
  711. if (web_config) {
  712. if (name2.length > 1) {
  713. info = web_config[name2[0]][name2[1]] || null;
  714. } else {
  715. info = web_config[name] || null;
  716. }
  717. }
  718. }
  719. }
  720. return info;
  721. },
  722. // 监听拍照框关闭
  723. onclose(){
  724. this.alertPhone=false
  725. this.goodsPicture1=[]
  726. },
  727. //确认上传图片
  728. querenduanxin(){
  729. var tupian=this.goodsPicture1.toString()
  730. var orderId=this.orderId
  731. let data = {
  732. img:tupian
  733. }
  734. this.$Request.postT(`/admin/order/add-receive-img/${orderId}`,data).then(res => {
  735. console.log(res,'img')
  736. if (res.code == 0) {
  737. this.alertPhone = false
  738. uni.showToast({
  739. title: '图片上传完成',
  740. icon: "none"
  741. });
  742. } else {
  743. uni.showToast({
  744. title: res.msg,
  745. icon: "none"
  746. });
  747. }
  748. });
  749. },
  750. // 获取确认送达短信模板
  751. querenduanxinList() {
  752. this.$Request.getT('/app/tb-indent-sms/template', {
  753. }).then(res => {
  754. this.duanxin=res.data.list
  755. if (res.code == 0) {
  756. this.page = 1;
  757. this.alertduanxin=true
  758. } else {
  759. uni.showToast({
  760. title: res.msg,
  761. icon: "none"
  762. });
  763. }
  764. });
  765. },
  766. //获取短信价格
  767. getDuanPrice(){
  768. this.$Request.getT('/admin/tb-indent-sms/price-of-sms', {
  769. }).then(res => {
  770. if (res.code == 0) {
  771. this.duanPrice= res.data
  772. } else {
  773. uni.showToast({
  774. title: res.msg,
  775. icon: "none"
  776. });
  777. }
  778. });
  779. },
  780. //发短信并送达
  781. querenSh() {
  782. // #ifdef MP-WEIXIN
  783. if (uni.getStorageSync('sendindexMsg')) {
  784. uni.requestSubscribeMessage({
  785. tmplIds: this.arr,
  786. success(re) {
  787. // console.log(re,'**********')
  788. var datas = JSON.stringify(re);
  789. if (datas.indexOf("accept") != -1) {
  790. console.log(re)
  791. }
  792. },
  793. fail: (res) => {
  794. console.log(res)
  795. }
  796. })
  797. }
  798. // #endif
  799. let that = this
  800. uni.showModal({
  801. title: '提示',
  802. content: '确认发送短信并完成送达吗?',
  803. success: (res)=> {
  804. if (res.confirm) {
  805. uni.showLoading({
  806. title: '加载中',
  807. mask: true, // 是否显示透明蒙层,防止触摸穿透
  808. });
  809. let data = {
  810. orderId: that.orderId,
  811. sendSmsFlag:1,
  812. smsTemplateId:that.duanxin[0].id
  813. }
  814. that.$Request.postT("/admin/order/accomplishOrder", data).then(res => {
  815. if (res.code == 0) {
  816. // console.log(this.activeIndex);
  817. this.orderList.splice(this.activeIndex,1)
  818. this.spliceCount ++
  819. that.alertduanxin=false
  820. that.xuePhone=''
  821. // that.getOrderList()
  822. uni.showToast({
  823. title: '配送成功',
  824. icon: "success"
  825. });
  826. }else{
  827. that.failYuanyin=res.msg
  828. that.alertduanxin=false
  829. that.ifNotduan=true
  830. uni.showToast({
  831. title: res.msg,
  832. icon: "none"
  833. });
  834. }
  835. // 加载提示关闭
  836. uni.hideLoading()
  837. });
  838. } else if (res.cancel) {
  839. console.log('用户点击取消');
  840. }
  841. }
  842. });
  843. },
  844. //联系学生
  845. phoneToxue(e){
  846. uni.makePhoneCall({
  847. phoneNumber: e ,
  848. }) // 传参带入号码即可
  849. },
  850. // 完成送达
  851. succOrder(e){
  852. // #ifdef MP-WEIXIN
  853. if (uni.getStorageSync('sendindexMsg')) {
  854. uni.requestSubscribeMessage({
  855. tmplIds: this.arr,
  856. success(re) {
  857. // console.log(re,'**********')
  858. var datas = JSON.stringify(re);
  859. if (datas.indexOf("accept") != -1) {
  860. console.log(re)
  861. }
  862. },
  863. fail: (res) => {
  864. console.log(res)
  865. }
  866. })
  867. }
  868. // #endif
  869. let that = this
  870. uni.showModal({
  871. title: '提示',
  872. content: '确认完成送达吗?',
  873. success: function(res) {
  874. if (res.confirm) {
  875. uni.showLoading({
  876. title: '加载中',
  877. mask: true, // 是否显示透明蒙层,防止触摸穿透
  878. });
  879. console.log('用户点击确定');
  880. let data = {
  881. orderId: e.orderId,
  882. sendSmsFlag:0
  883. // orderNumber: e.orderNumber,
  884. // shopId: that.shopId,
  885. // addressId: e.addressId,
  886. // status: 3
  887. }
  888. that.$Request.postT("/admin/order/accomplishOrder", data).then(res => {
  889. if (res.code == 0) {
  890. that.getOrderList()
  891. }
  892. // 加载提示关闭
  893. uni.hideLoading()
  894. });
  895. } else if (res.cancel) {
  896. console.log('用户点击取消');
  897. }
  898. }
  899. });
  900. },
  901. //制作完成
  902. finish(e) {
  903. // #ifdef MP-WEIXIN
  904. if (uni.getStorageSync('sendindexMsg')) {
  905. uni.requestSubscribeMessage({
  906. tmplIds: this.arr,
  907. success(re) {
  908. // console.log(re,'**********')
  909. var datas = JSON.stringify(re);
  910. if (datas.indexOf("accept") != -1) {
  911. console.log(re)
  912. }
  913. },
  914. fail: (res) => {
  915. console.log(res)
  916. }
  917. })
  918. }
  919. // #endif
  920. let that = this
  921. uni.showModal({
  922. title: '提示',
  923. content: '确认操作完成吗?',
  924. success: function(res) {
  925. if (res.confirm) {
  926. console.log('用户点击确定');
  927. let data = {
  928. orderId: e.orderId,
  929. orderNumber: e.orderNumber,
  930. shopId: that.shopId,
  931. addressId: e.addressId,
  932. status: 3
  933. }
  934. that.$Request.postJsonA("/admin/order/updateOrder", data).then(res => {
  935. if (res.code == 0) {
  936. that.getOrderList()
  937. }
  938. });
  939. } else if (res.cancel) {
  940. console.log('用户点击取消');
  941. }
  942. }
  943. });
  944. },
  945. //配送完成
  946. finishs(e) {
  947. // #ifdef MP-WEIXIN
  948. if (uni.getStorageSync('sendindexMsg')) {
  949. uni.requestSubscribeMessage({
  950. tmplIds: this.arr,
  951. success(re) {
  952. // console.log(re,'**********')
  953. var datas = JSON.stringify(re);
  954. if (datas.indexOf("accept") != -1) {
  955. console.log(re)
  956. }
  957. },
  958. fail: (res) => {
  959. console.log(res)
  960. }
  961. })
  962. }
  963. // #endif
  964. let that = this
  965. uni.showModal({
  966. title: '提示',
  967. content: '确认操作完成吗?',
  968. success: function(res) {
  969. if (res.confirm) {
  970. console.log('用户点击确定');
  971. let data = {
  972. orderId: e.orderId,
  973. orderNumber: e.orderNumber,
  974. shopId: that.shopId,
  975. addressId: e.addressId,
  976. status: 4
  977. }
  978. that.$Request.postJsonA("/admin/order/updateOrder", data).then(res => {
  979. if (res.code == 0) {
  980. that.getOrderList()
  981. }
  982. });
  983. } else if (res.cancel) {
  984. console.log('用户点击取消');
  985. }
  986. }
  987. });
  988. },
  989. //接单
  990. jiedan(e) {
  991. // #ifdef MP-WEIXIN
  992. if (uni.getStorageSync('sendindexMsg')) {
  993. uni.requestSubscribeMessage({
  994. tmplIds: this.arr,
  995. success(re) {
  996. var datas = JSON.stringify(re);
  997. if (datas.indexOf("accept") != -1) {
  998. console.log(re)
  999. }
  1000. },
  1001. fail: (res) => {
  1002. console.log(res)
  1003. }
  1004. })
  1005. }
  1006. // #endif
  1007. let that = this
  1008. uni.showModal({
  1009. title: '提示',
  1010. content: '确认接单吗?',
  1011. success: function(res) {
  1012. if (res.confirm) {
  1013. console.log('用户点击确定');
  1014. let data = {
  1015. orderId: e.orderId,
  1016. orderNumber: e.orderNumber,
  1017. status: 6
  1018. }
  1019. that.$Request.postJsonA("/admin/order/updateOrder", data).then(res => {
  1020. if (res.code == 0) {
  1021. that.page = 1
  1022. that.getOrderList()
  1023. }else{
  1024. that.$queue.showToast(res.msg)
  1025. }
  1026. });
  1027. } else if (res.cancel) {
  1028. console.log('用户点击取消');
  1029. }
  1030. }
  1031. });
  1032. },
  1033. // 补打小票
  1034. xiaoPiao(e){
  1035. // #ifdef MP-WEIXIN
  1036. if (uni.getStorageSync('sendindexMsg')) {
  1037. uni.requestSubscribeMessage({
  1038. tmplIds: this.arr,
  1039. success(re) {
  1040. // console.log(re,'**********')
  1041. var datas = JSON.stringify(re);
  1042. if (datas.indexOf("accept") != -1) {
  1043. console.log(re)
  1044. }
  1045. },
  1046. fail: (res) => {
  1047. console.log(res)
  1048. }
  1049. })
  1050. }
  1051. // #endif
  1052. let that = this
  1053. uni.showModal({
  1054. title: '提示',
  1055. content: '确认补打小票吗?',
  1056. success: function(re) {
  1057. if (re.confirm) {
  1058. console.log('用户点击确定');
  1059. let data = {
  1060. orderId: e.orderId,
  1061. isAppend:1
  1062. // orderNumber: e.orderNumber,
  1063. // status: 8
  1064. }
  1065. console.log(data,'l')
  1066. that.$Request.post("/admin/order/print", data).then(res => {
  1067. console.log(res,'po')
  1068. if (res.code == 0) {
  1069. // that.page = 1
  1070. // that.getOrderList()
  1071. }else{
  1072. that.$queue.showToast(res.msg)
  1073. }
  1074. });
  1075. } else if (re.cancel) {
  1076. console.log('用户点击取消');
  1077. }
  1078. }
  1079. });
  1080. },
  1081. //拒绝接单
  1082. jiedans(e) {
  1083. // #ifdef MP-WEIXIN
  1084. if (uni.getStorageSync('sendindexMsg')) {
  1085. uni.requestSubscribeMessage({
  1086. tmplIds: this.arr,
  1087. success(re) {
  1088. // console.log(re,'**********')
  1089. var datas = JSON.stringify(re);
  1090. if (datas.indexOf("accept") != -1) {
  1091. console.log(re)
  1092. }
  1093. },
  1094. fail: (res) => {
  1095. console.log(res)
  1096. }
  1097. })
  1098. }
  1099. // #endif
  1100. let that = this
  1101. uni.showModal({
  1102. title: '提示',
  1103. content: '确认拒绝接单吗?',
  1104. success: function(res) {
  1105. if (res.confirm) {
  1106. console.log('用户点击确定');
  1107. let data = {
  1108. orderId: e.orderId,
  1109. orderNumber: e.orderNumber,
  1110. status: 8
  1111. }
  1112. that.$Request.postJsonA("/admin/order/updateOrder", data).then(res => {
  1113. if (res.code == 0) {
  1114. that.page = 1
  1115. that.getOrderList()
  1116. }
  1117. });
  1118. } else if (res.cancel) {
  1119. console.log('用户点击取消');
  1120. }
  1121. }
  1122. });
  1123. },
  1124. switchTab(e) {
  1125. // #ifdef MP-WEIXIN
  1126. if (uni.getStorageSync('sendindexMsg')) {
  1127. uni.requestSubscribeMessage({
  1128. tmplIds: this.arr,
  1129. success(re) {
  1130. // console.log(re,'**********')
  1131. var datas = JSON.stringify(re);
  1132. if (datas.indexOf("accept") != -1) {
  1133. console.log(re)
  1134. }
  1135. },
  1136. fail: (res) => {
  1137. console.log(res)
  1138. }
  1139. })
  1140. }
  1141. // #endif
  1142. this.page = 1
  1143. this.orderType = e
  1144. this.current = 0
  1145. this.current1 = 0
  1146. this.status = ''
  1147. this.spliceCount = 0
  1148. this.getOrderList()
  1149. },
  1150. change(index) {
  1151. // #ifdef MP-WEIXIN
  1152. if (uni.getStorageSync('sendindexMsg')) {
  1153. uni.requestSubscribeMessage({
  1154. tmplIds: this.arr,
  1155. success(re) {
  1156. // console.log(re,'**********')
  1157. var datas = JSON.stringify(re);
  1158. if (datas.indexOf("accept") != -1) {
  1159. console.log(re)
  1160. }
  1161. },
  1162. fail: (res) => {
  1163. console.log(res)
  1164. }
  1165. })
  1166. }
  1167. // #endif
  1168. this.page = 1
  1169. this.current = index;
  1170. this.spliceCount = 0
  1171. switch (index) {
  1172. case 0:
  1173. this.status = '' //全部
  1174. break;
  1175. case 1:
  1176. this.status = 7 //待接单
  1177. break;
  1178. case 2:
  1179. this.status = 6 //制作中
  1180. break;
  1181. case 3:
  1182. this.status = 3 //待取餐
  1183. break;
  1184. case 4:
  1185. this.status = 4 //已完成
  1186. break;
  1187. case 5:
  1188. this.status = 5 //已取消
  1189. break;
  1190. case '2':
  1191. this.status = 6 //制作中
  1192. break;
  1193. case '1':
  1194. this.status = 7 //待接单
  1195. break;
  1196. case '3':
  1197. this.status = 3 //制作中
  1198. break;
  1199. case '4':
  1200. this.status = 4 //制作中
  1201. break;
  1202. case 6:
  1203. this.status = 8 //已退款
  1204. break;
  1205. }
  1206. this.getOrderList()
  1207. },
  1208. change1(index) {
  1209. // #ifdef MP-WEIXIN
  1210. if (uni.getStorageSync('sendindexMsg')) {
  1211. uni.requestSubscribeMessage({
  1212. tmplIds: this.arr,
  1213. success(re) {
  1214. // console.log(re,'**********')
  1215. var datas = JSON.stringify(re);
  1216. if (datas.indexOf("accept") != -1) {
  1217. console.log(re)
  1218. }
  1219. },
  1220. fail: (res) => {
  1221. console.log(res)
  1222. }
  1223. })
  1224. }
  1225. // #endif
  1226. this.page = 1
  1227. this.current1 = index;
  1228. this.spliceCount = 0
  1229. switch (index) {
  1230. case 0:
  1231. this.status = ''
  1232. break;
  1233. case 1:
  1234. this.status = 7 //待接单
  1235. break;
  1236. case 2:
  1237. this.status = 6
  1238. break;
  1239. case 3:
  1240. this.status = 3
  1241. break;
  1242. case 4:
  1243. this.status = 4
  1244. break;
  1245. case 5:
  1246. this.status = 5
  1247. break;
  1248. case 6:
  1249. this.status = 8
  1250. break;
  1251. }
  1252. this.getOrderList()
  1253. },
  1254. goNav(url) {
  1255. // #ifdef MP-WEIXIN
  1256. if (uni.getStorageSync('sendindexMsg')) {
  1257. uni.requestSubscribeMessage({
  1258. tmplIds: this.arr,
  1259. success(re) {
  1260. // console.log(re,'**********')
  1261. var datas = JSON.stringify(re);
  1262. if (datas.indexOf("accept") != -1) {
  1263. console.log(re)
  1264. }
  1265. },
  1266. fail: (res) => {
  1267. console.log(res)
  1268. }
  1269. })
  1270. }
  1271. // #endif
  1272. uni.navigateTo({
  1273. url
  1274. })
  1275. },
  1276. // 获取数据列表
  1277. getOrderList() {
  1278. uni.showLoading({
  1279. title: '加载中···',
  1280. mask: true, // 是否显示透明蒙层,防止触摸穿透
  1281. })
  1282. console.log(this.page);
  1283. let data = {
  1284. page: this.page,
  1285. limit: this.limit,
  1286. phone: this.xuePhone,
  1287. userName: this.userName,
  1288. orderNumber: this.orderNumber,
  1289. shopId: this.shopId,
  1290. status: this.status,
  1291. orderType: this.orderType
  1292. }
  1293. // console.log('查询',data)
  1294. this.$Request.getA("/admin/order/selectAllOrder", data).then(res => {
  1295. uni.stopPullDownRefresh();
  1296. if (res.code == 0) {
  1297. // this.msgData = res.data
  1298. res.data.list.forEach(res => {
  1299. res.orderCode = res.orderCode.substring(res.orderCode.length - 3, res.orderCode
  1300. .length)
  1301. var phone = res.phone;
  1302. // var result = phone.substring(0, 3) + "****" + phone.substring(7, 11);
  1303. // console.log(result);
  1304. res.phone = phone
  1305. })
  1306. if (this.page == 1) {
  1307. this.orderList = res.data.list
  1308. } else {
  1309. this.orderList = [...this.orderList, ...res.data.list]
  1310. }
  1311. console.log(this.orderList,'kk')
  1312. this.totalCount = res.data.totalCount
  1313. this.show1 = true
  1314. }
  1315. // 加载提示关闭
  1316. uni.hideLoading()
  1317. });
  1318. }
  1319. },
  1320. onReachBottom: function() {
  1321. if(this.orderList.length < (this.totalCount-this.spliceCount)){
  1322. this.page ++;
  1323. this.getOrderList();
  1324. }else{
  1325. uni.showToast({
  1326. title: '已经到底了~',
  1327. icon: 'none'
  1328. })
  1329. }
  1330. },
  1331. onPullDownRefresh: function() {
  1332. this.page = 1;
  1333. this.getOrderList();
  1334. },
  1335. }
  1336. </script>
  1337. <style scoped>
  1338. .active {
  1339. width: 82rpx;
  1340. height: 6rpx;
  1341. background: #333333;
  1342. margin-left: 12rpx;
  1343. }
  1344. .bg {
  1345. background-color: #FFFFFF;
  1346. }
  1347. /* 切换选项 */
  1348. .nav {
  1349. display: flex;
  1350. align-items: center;
  1351. justify-content: center;
  1352. background-color: #FFFFFF;
  1353. color: #999999;
  1354. }
  1355. .btn {
  1356. /* padding: 10rpx 20rpx;
  1357. text-align: center;
  1358. background: rgba(255, 19, 10, 0.2);
  1359. font-size: 28rpx;
  1360. border: 2rpx solid #FF130A;
  1361. color: #FF130A;
  1362. opacity: 0.6;
  1363. border-radius: 8rpx; */
  1364. width: 150rpx;
  1365. height: 60rpx;
  1366. line-height: 60rpx;
  1367. text-align: center;
  1368. background: #F5F5F5;
  1369. font-size: 28rpx;
  1370. border: 2rpx solid ##F5F5F5;
  1371. color: #666666;
  1372. border-radius: 50rpx;
  1373. font-weight: 700;
  1374. margin-left: 10rpx;
  1375. }
  1376. .btnCm {
  1377. /* padding: 10rpx 20rpx;
  1378. text-align: center;
  1379. background: #0081FF;
  1380. font-size: 28rpx;
  1381. border: 2rpx solid #0081FF;
  1382. color: #FFFFFF;
  1383. opacity: 0.6;
  1384. border-radius: 8rpx; */
  1385. }
  1386. /* 拍照 */
  1387. .btn_pai{
  1388. width: 150rpx;
  1389. height: 60rpx;
  1390. line-height: 60rpx;
  1391. text-align: center;
  1392. background: rgba(255, 201, 189, 1);
  1393. font-size: 28rpx;
  1394. border: 2rpx solid rgba(255, 201, 189, 1);
  1395. color: #333333;
  1396. border-radius: 50rpx;
  1397. font-weight: 700;
  1398. margin-left: 15rpx;
  1399. }
  1400. .btn_ {
  1401. width: 150rpx;
  1402. height: 60rpx;
  1403. line-height: 60rpx;
  1404. text-align: center;
  1405. background: #FCD202;
  1406. font-size: 28rpx;
  1407. border: 2rpx solid #FCD202;
  1408. color: #333333;
  1409. border-radius: 50rpx;
  1410. font-weight: 700;
  1411. margin-left: 15rpx;
  1412. }
  1413. .tabBtn {
  1414. /* background-color: #f6f6fa; */
  1415. height: 60rpx;
  1416. line-height: 60rpx;
  1417. color: #000000;
  1418. font-size: 31rpx;
  1419. font-weight: bold;
  1420. }
  1421. .shaix {
  1422. width: 30%;
  1423. text-align: center;
  1424. display: flex;
  1425. align-items: center;
  1426. justify-content: center;
  1427. letter-spacing: 4rpx;
  1428. font-size: 27rpx;
  1429. }
  1430. .select {
  1431. color: #000000;
  1432. font-size: 31rpx;
  1433. font-weight: bold;
  1434. background-color: #fff;
  1435. }
  1436. .nav view {
  1437. flex-grow: 1;
  1438. margin: 3% 6.5% 2%;
  1439. text-align: center;
  1440. }
  1441. .nav_btna {
  1442. font-size: 42rpx;
  1443. line-height: 34rpx;
  1444. color: #000000;
  1445. font-weight: bold;
  1446. border-bottom: 14rpx solid #FCD202;
  1447. }
  1448. /* 内容 */
  1449. /* 全部订单 */
  1450. .cont_one {
  1451. /* margin-top: 160rpx; */
  1452. }
  1453. .cont_one image {
  1454. width: 80%;
  1455. height: 353rpx;
  1456. }
  1457. /* 到店取餐 */
  1458. .cont_two {
  1459. display: none;
  1460. width: 94%;
  1461. margin: 3% auto;
  1462. background-color: #FFFFFF;
  1463. border-radius: 18rpx;
  1464. }
  1465. .cont {
  1466. /* display: none; */
  1467. width: 94%;
  1468. margin: 3% auto;
  1469. background-color: #FFFFFF;
  1470. border-radius: 18rpx;
  1471. }
  1472. .order_title{
  1473. width: 90%;
  1474. margin: 0 auto;
  1475. border-radius: 14px 14px, 0px, 0px;
  1476. background: rgba(255, 239, 222, 1);
  1477. height: 40upx;
  1478. color: rgba(255, 141, 26, 1);
  1479. font-size: 24upx;
  1480. line-height: 40upx;
  1481. text-align: center;
  1482. }
  1483. .cont_two_top {
  1484. width: 94%;
  1485. padding: 4% 3% 0;
  1486. margin: 0 auto;
  1487. display: flex;
  1488. justify-content: space-between;
  1489. }
  1490. .cont_two_top_le {
  1491. width: 85%;
  1492. font-size: 30rpx;
  1493. font-weight: 500;
  1494. color: #333333;
  1495. /* line-height: 2; */
  1496. margin: 5rpx 0;
  1497. }
  1498. .cont_two_top_ri {
  1499. /* width: 15%; */
  1500. padding: 6rpx 10rpx;
  1501. text-align: center;
  1502. background: rgba(255, 19, 10, 0.2);
  1503. font-size: 24rpx;
  1504. border: 2rpx solid #FF130A;
  1505. color: #FF130A;
  1506. opacity: 0.6;
  1507. border-radius: 8rpx;
  1508. }
  1509. .cont_two_top_ri1 {
  1510. /* width: 15%; */
  1511. text-align: center;
  1512. /* line-height: 2; */
  1513. padding: 6rpx 10rpx;
  1514. background: #62ba8b;
  1515. font-size: 24rpx;
  1516. border: 2rpx solid #62ba8b;
  1517. color: #fff;
  1518. /* opacity: 0.6; */
  1519. border-radius: 8rpx;
  1520. }
  1521. .cont_two_top_ri2 {
  1522. /* width: 15%; */
  1523. text-align: center;
  1524. /* line-height: 2; */
  1525. padding: 6rpx 10rpx;
  1526. background: #FCD202;
  1527. font-size: 24rpx;
  1528. border: 2rpx solid #FCD202;
  1529. color: #fff;
  1530. /* opacity: 0.6; */
  1531. border-radius: 8rpx;
  1532. }
  1533. .cont_two_text {
  1534. font-size: 58rpx;
  1535. text-align: center;
  1536. font-weight: bold;
  1537. color: red;
  1538. margin: 3% 0;
  1539. line-height: 32rpx;
  1540. }
  1541. .cont_two_text2 {
  1542. font-size: 30rpx;
  1543. width: 100%;
  1544. font-weight: 500;
  1545. color: #333333;
  1546. text-align: center;
  1547. padding-bottom: 3%;
  1548. /* line-height: 32rpx; */
  1549. }
  1550. .cont_two_text2 text {
  1551. color: #FF130A;
  1552. }
  1553. .cont_two_bottom {
  1554. width: 94%;
  1555. padding: 3%;
  1556. margin: 0 auto;
  1557. display: flex;
  1558. border-top: 1rpx solid #E6E6E6;
  1559. }
  1560. .cont_two_bottom_le {
  1561. flex: 1;
  1562. font-size: 24rpx;
  1563. font-weight: 500;
  1564. color: #999999;
  1565. line-height: 32rpx;
  1566. }
  1567. .cont_two_bottom_ri {
  1568. flex: 1;
  1569. text-align: right;
  1570. }
  1571. .cont_two_bottom_ri image {
  1572. width: 14rpx;
  1573. height: 24rpx;
  1574. }
  1575. /* 外卖订单 */
  1576. .cont_three {
  1577. display: none;
  1578. width: 94%;
  1579. margin: 3% auto;
  1580. background-color: #FFFFFF;
  1581. border-radius: 18rpx;
  1582. }
  1583. .cont_three_top {
  1584. width: 94%;
  1585. padding: 4% 3% 0;
  1586. margin: 0 auto;
  1587. display: flex;
  1588. }
  1589. .cont_three_top_le {
  1590. flex: 2;
  1591. font-size: 30rpx;
  1592. font-weight: 500;
  1593. color: #D80204;
  1594. line-height: 32rpx;
  1595. }
  1596. .cont_three_top_ri {
  1597. flex: 1;
  1598. text-align: right;
  1599. font-size: 24rpx;
  1600. font-weight: 500;
  1601. color: #999999;
  1602. line-height: 32rpx;
  1603. }
  1604. .cont_three_text {
  1605. padding: 2% 0 2% 3%;
  1606. font-size: 24rpx;
  1607. font-weight: 500;
  1608. color: #999999;
  1609. line-height: 32rpx;
  1610. }
  1611. .cont_three_cen {
  1612. width: 94%;
  1613. padding: 0.5% 3%;
  1614. margin: 0 auto;
  1615. display: flex;
  1616. }
  1617. .cont_three_cen_le {
  1618. flex: 2;
  1619. font-size: 30rpx;
  1620. font-weight: 500;
  1621. color: #333333;
  1622. line-height: 32rpx;
  1623. }
  1624. .cont_three_cen_ri {
  1625. flex: 1;
  1626. text-align: right;
  1627. font-size: 24rpx;
  1628. font-weight: 500;
  1629. color: #999999;
  1630. line-height: 32rpx;
  1631. }
  1632. .cont_three_text2 {
  1633. font-size: 24rpx;
  1634. font-weight: 500;
  1635. color: #D80204;
  1636. padding: 0 3%;
  1637. line-height: 32rpx;
  1638. }
  1639. .cont_three_bottom {
  1640. width: 94%;
  1641. padding: 3%;
  1642. margin: 3% auto 0;
  1643. display: flex;
  1644. border-top: 1rpx solid #E6E6E6;
  1645. }
  1646. .cont_three_bottom_le {
  1647. flex: 1;
  1648. font-size: 24rpx;
  1649. font-weight: 500;
  1650. color: #999999;
  1651. line-height: 32rpx;
  1652. }
  1653. .cont_three_bottom_ri {
  1654. flex: 1;
  1655. text-align: right;
  1656. }
  1657. .cont_dis {
  1658. display: block;
  1659. }
  1660. .box {
  1661. width: 100%;
  1662. height: 100vh;
  1663. background-color: rgba(0, 0, 0, 0.2);
  1664. /* opacity: 0.2; */
  1665. position: absolute;
  1666. top: 40px;
  1667. z-index: 999
  1668. }
  1669. .popbox {
  1670. width: 749upx;
  1671. /* height: 764upx; */
  1672. background: #FFFFFF;
  1673. padding-bottom: 72rpx;
  1674. z-inde: 999;
  1675. /* #ifdef H5 */
  1676. position: fixed;
  1677. top: 120px;
  1678. left: 0;
  1679. right: 0;
  1680. /* #endif */
  1681. /* #ifndef H5 */
  1682. position: fixed;
  1683. top: 66rpx;
  1684. left: 0;
  1685. right: 0;
  1686. /* #endif */
  1687. }
  1688. .impute {
  1689. background: #F2F2F2;
  1690. height: 80rpx;
  1691. margin: 20rpx 0;
  1692. }
  1693. .btns {
  1694. width: 690upx;
  1695. height: 88upx;
  1696. background: #FF8D1A;
  1697. box-shadow: 0upx 10upx 20upx 0upx #FFD9B3;
  1698. border-radius: 16upx;
  1699. text-align: center;
  1700. line-height: 88rpx;
  1701. font-size: 32rpx;
  1702. font-weight: bold;
  1703. margin: 0 auto;
  1704. }
  1705. .tosend_header_food_le {
  1706. width: 15%;
  1707. }
  1708. .tosend_header_food_le image {
  1709. width: 110rpx;
  1710. height: 110rpx;
  1711. }
  1712. .u-border-top:after {
  1713. border: none !important;
  1714. }
  1715. /* 收货码弹框 */
  1716. .receipt_code {
  1717. width: 90%;
  1718. margin: 0 auto;
  1719. }
  1720. .code_title {
  1721. width: 100%;
  1722. line-height: 100rpx;
  1723. font-size: 31rpx;
  1724. font-weight: bold;
  1725. text-align: center;
  1726. letter-spacing: 2rpx;
  1727. margin-top: 21rpx;
  1728. margin-bottom: 25rpx;
  1729. }
  1730. .u-input--border {
  1731. border: 1px solid #F2F2F2 !important;
  1732. background: #F2F2F2 !important;
  1733. color: #999999 !important;
  1734. font-weight: 500 !important;
  1735. letter-spacing: 2rpx !important;
  1736. }
  1737. .u-input__input {
  1738. font-size: 30rpx;
  1739. font-weight: bold;
  1740. flex: 1;
  1741. color: #999999 !important;
  1742. min-height: 85rpx !important;
  1743. margin-top: 7rpx;
  1744. }
  1745. .sure {
  1746. width: 100%;
  1747. height: 80rpx;
  1748. background: rgba(245, 211, 71, 1);
  1749. color: white;
  1750. border-radius: 46rpx;
  1751. text-align: center;
  1752. line-height: 80rpx;
  1753. margin-top: 30rpx;
  1754. color: rgba(0, 0, 0, 1);
  1755. letter-spacing: 2rpx;
  1756. }
  1757. .sure2{
  1758. text-align: center;
  1759. color: rgba(0, 0, 0, 1);
  1760. line-height: 80rpx;
  1761. margin-top: 30rpx;
  1762. width: 100%;
  1763. height: 80rpx;
  1764. opacity: 1;
  1765. border-radius: 10rpx;
  1766. background: rgba(245, 211, 71, 1);
  1767. }
  1768. /* 确认送达拍照框 */
  1769. .phone_title{
  1770. margin-top: 10px;
  1771. width: 100%;
  1772. height: 40px;
  1773. /* background-color: #FF7F00; */
  1774. text-align: center;
  1775. line-height: 40px;
  1776. /* color:#FFFFFF; */
  1777. }
  1778. .phone_title2{
  1779. margin-top: 10px;
  1780. text-align: center;
  1781. color:#9d9d9d;
  1782. }
  1783. .code_title2 {
  1784. width: 100%;
  1785. line-height: 50rpx;
  1786. text-align: center;
  1787. letter-spacing: 2rpx;
  1788. margin-top: 21rpx;
  1789. margin-bottom: 25rpx;
  1790. }
  1791. .code_title3{
  1792. margin-left: -20px;
  1793. margin-top: 21rpx;
  1794. margin-bottom: 25rpx;
  1795. width: 638rpx;
  1796. height: 66rpx;
  1797. border-radius: 6rpx;
  1798. background: rgba(255, 245, 245, 1);
  1799. font-size: 24rpx;
  1800. line-height: 66rpx;
  1801. color: rgba(212, 48, 48, 1);
  1802. text-align: center;
  1803. }
  1804. </style>