order.vue 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523
  1. <template>
  2. <view>
  3. <view class="order">
  4. <u-tabs :list="list" :is-scroll="false" active-color="#FF7F00" inactive-color=" #666666" :bold="bold" :current="current" @change="change"></u-tabs>
  5. <!-- 全部 -->
  6. <view class="tabs_box" :class="{ dis: current == 0 }">
  7. <view class="order_box" v-for="(item, index) in lists" :key="index" @click="bindorderDetail(item.indentNumber, item.orderId)">
  8. <view class="order_success" v-if="item.indentState == '2'">
  9. <view class="order_name">待支付领取</view>
  10. <view class="order_data">{{ item.receivingTime }}</view>
  11. </view>
  12. <view class="order_success" v-if="item.indentState == '3'">
  13. <view class="order_name">待取货</view>
  14. <view class="order_data">{{ item.receivingTime }}</view>
  15. </view>
  16. <view class="order_success" v-if="item.indentState == '4'">
  17. <view class="order_name">配送中</view>
  18. <view class="order_data">{{ item.receivingTime }}</view>
  19. </view>
  20. <view class="order_success" v-if="item.indentState == '5'">
  21. <view class="order_name">已完成</view>
  22. <view class="order_data">{{ item.receivingTime }}</view>
  23. </view>
  24. <view class="order_success" v-if="item.indentState == '6'">
  25. <view class="order_name">已完成</view>
  26. <view class="order_data">{{ item.receivingTime }}</view>
  27. </view>
  28. <view class="order_success" v-if="item.indentState == '7'">
  29. <view class="order_name">已完成</view>
  30. <view class="order_data">{{ item.receivingTime }}</view>
  31. </view>
  32. <view class="order_success" v-if="item.indentState == '10'">
  33. <view class="order_name">已取消</view>
  34. <view class="order_data">{{ item.receivingTime }}</view>
  35. </view>
  36. <view class="order_success" v-if="item.indentState == '9'">
  37. <view class="order_name">已取消</view>
  38. <view class="order_data">{{ item.receivingTime }}</view>
  39. </view>
  40. <u-line color="#E6E6E6" />
  41. <view class="order_city">
  42. <view class="city_type">
  43. <view class="type_name" v-if="item.indentType == 1">帮我送</view>
  44. <view class="type_name" v-if="item.indentType == 2">帮我取</view>
  45. <view class="type_name" v-if="item.indentType == 3">同城帮买</view>
  46. <view class="type_name" v-if="item.indentType == 4">同城服务</view>
  47. <view class="type_name" v-if="item.indentType == 5">同城外卖</view>
  48. <view class="city_text" v-if="item.itemType">{{ item.itemType }}</view>
  49. </view>
  50. <view style="padding: 0 30rpx; font-size: 20px" v-if="item.orderPaySequence">#{{ item.orderPaySequence }}</view>
  51. <view style="padding: 0 30rpx; color: #ff7f00">{{ item.shopName }}</view>
  52. <view style="padding: 0 30rpx">订单编号:{{ item.indentNumber }}</view>
  53. <view class="city_address" v-if="item.indentType == 1 || item.indentType == 2">
  54. <view class="fh_box">
  55. <view class="fh_image">
  56. <image src="../../static/image/icon_f.png"></image>
  57. </view>
  58. <view class="box">
  59. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  60. <view class="fh_type">
  61. {{ item.shopName }}
  62. <text>{{ item.shopPhone }}</text>
  63. </view>
  64. </view>
  65. </view>
  66. <view class="sh_box">
  67. <view class="sh_image">
  68. <image src="../../static/image/icon_s.png"></image>
  69. </view>
  70. <view class="box">
  71. <view class="sh_name">{{ item.userAddressDetail }}</view>
  72. <view class="sh_type">
  73. {{ item.userName }}
  74. <text>{{ item.userPhone }}</text>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <view class="city_address" v-if="item.indentType == 3">
  80. <view class="fh_box" v-if="item.buy_type == 1">
  81. <view class="fh_image">
  82. <image src="../../static/image/icon_f.png"></image>
  83. </view>
  84. <view class="box">
  85. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  86. <view class="fh_type">
  87. {{ item.shopName }}
  88. <text>{{ item.shopPhone }}</text>
  89. </view>
  90. </view>
  91. </view>
  92. <view class="sh_box">
  93. <view class="sh_image">
  94. <image src="../../static/image/icon_s.png"></image>
  95. </view>
  96. <view class="box">
  97. <view class="sh_name">{{ item.userAddressDetail }}</view>
  98. <view class="sh_type">
  99. {{ item.userName }}
  100. <text>{{ item.userPhone }}</text>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. <view class="city_address" v-if="item.indentType == 4">
  106. <view class="sh_box">
  107. <view class="sh_image">
  108. <image src="../../static/image/icon_s.png"></image>
  109. </view>
  110. <view class="box">
  111. <view class="sh_name">{{ item.userAddressDetail }}</view>
  112. <view class="sh_type">
  113. {{ item.userName }}
  114. <text>{{ item.userPhone }}</text>
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. <view class="city_address" v-if="item.indentType == 5">
  120. <view class="fh_box" v-if="item.buy_type == 1">
  121. <view class="fh_image">
  122. <image src="../../static/image/icon_f.png"></image>
  123. </view>
  124. <view class="box">
  125. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  126. <view class="fh_type">
  127. {{ item.shopName }}
  128. <text>{{ item.shopPhone }}</text>
  129. </view>
  130. </view>
  131. </view>
  132. <view class="sh_box">
  133. <view class="sh_image">
  134. <image src="../../static/image/icon_s.png"></image>
  135. </view>
  136. <view class="box">
  137. <view class="sh_name">{{ item.userAddressDetail }}</view>
  138. <view class="sh_type">
  139. {{ item.userName }}
  140. <text>{{ item.userPhone }}</text>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. </view>
  146. <u-line color="#E6E6E6" />
  147. <view class="order_btn">
  148. <view class="btn1" v-if="item.indentState == '3'" @click.stop="quxiao(item.indentNumber)">取消订单</view>
  149. <!-- <view class="btn1" v-if="item.indentState=='6'">客户待确认</view> -->
  150. <view class="btn2" v-if="item.indentState == '3'" @click.stop="quhuo(item.indentId)">确认取货</view>
  151. <view class="btn2" v-if="item.indentState == '4'" @click.stop="onshow(item)">确认送达</view>
  152. <view class="btn2" v-if="item.indentState == '9'">已取消</view>
  153. <view class="btn2" v-if="item.indentState == '10'">已取消</view>
  154. </view>
  155. </view>
  156. </view>
  157. <!-- 待取货 -->
  158. <view class="tabs_box" :class="{ dis: current == 1 }">
  159. <view class="order_box" v-for="(item, index) in lists" :key="index" @click="bindorderDetail(item.indentNumber, item.orderId)">
  160. <view class="order_success" v-if="item.indentState == '2'">
  161. <view class="order_name">待支付领取</view>
  162. <view class="order_data">{{ item.receivingTime }}</view>
  163. </view>
  164. <view class="order_success" v-if="item.indentState == '3'">
  165. <view class="order_name">待取货</view>
  166. <view class="order_data">{{ item.receivingTime }}</view>
  167. </view>
  168. <u-line color="#E6E6E6" />
  169. <view class="order_city">
  170. <view class="city_type">
  171. <view class="type_name" v-if="item.indentType == 1">帮我送</view>
  172. <view class="type_name" v-if="item.indentType == 2">帮我取</view>
  173. <view class="type_name" v-if="item.indentType == 3">同城帮买</view>
  174. <view class="type_name" v-if="item.indentType == 4">同城服务</view>
  175. <view class="type_name" v-if="item.indentType == 5">同城外卖</view>
  176. <view class="city_text" v-if="item.itemType">{{ item.itemType }}</view>
  177. </view>
  178. <view style="padding: 0 30rpx; color: #ff7f00">{{ item.shopName }}</view>
  179. <view style="padding: 0 30rpx">订单编号:{{ item.indentNumber }}</view>
  180. <view class="city_address" v-if="item.indentType == 1 || item.indentType == 2">
  181. <view class="fh_box">
  182. <view class="fh_image">
  183. <image src="../../static/image/icon_f.png"></image>
  184. </view>
  185. <view class="box">
  186. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  187. <view class="fh_type">
  188. {{ item.shopName }}
  189. <text>{{ item.shopPhone }}</text>
  190. </view>
  191. </view>
  192. </view>
  193. <view class="sh_box">
  194. <view class="sh_image">
  195. <image src="../../static/image/icon_s.png"></image>
  196. </view>
  197. <view class="box">
  198. <view class="sh_name">{{ item.userAddressDetail }}</view>
  199. <view class="sh_type">
  200. {{ item.userName }}
  201. <text>{{ item.userPhone }}</text>
  202. </view>
  203. </view>
  204. </view>
  205. </view>
  206. <view class="city_address" v-if="item.indentType == 3">
  207. <view class="fh_box" v-if="item.buy_type == 1">
  208. <view class="fh_image">
  209. <image src="../../static/image/icon_f.png"></image>
  210. </view>
  211. <view class="box">
  212. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  213. <view class="fh_type">
  214. {{ item.shopName }}
  215. <text>{{ item.shopPhone }}</text>
  216. </view>
  217. </view>
  218. </view>
  219. <view class="sh_box">
  220. <view class="sh_image">
  221. <image src="../../static/image/icon_s.png"></image>
  222. </view>
  223. <view class="box">
  224. <view class="sh_name">{{ item.userAddressDetail }}</view>
  225. <view class="sh_type">
  226. {{ item.userName }}
  227. <text>{{ item.userPhone }}</text>
  228. </view>
  229. </view>
  230. </view>
  231. </view>
  232. <view class="city_address" v-if="item.indentType == 4">
  233. <view class="sh_box">
  234. <view class="sh_image">
  235. <image src="../../static/image/icon_s.png"></image>
  236. </view>
  237. <view class="box">
  238. <view class="sh_name">{{ item.userAddressDetail }}</view>
  239. <view class="sh_type">
  240. {{ item.userName }}
  241. <text>{{ item.userPhone }}</text>
  242. </view>
  243. </view>
  244. </view>
  245. </view>
  246. <view class="city_address" v-if="item.indentType == 5">
  247. <view class="fh_box" v-if="item.buy_type == 1">
  248. <view class="fh_image">
  249. <image src="../../static/image/icon_f.png"></image>
  250. </view>
  251. <view class="box">
  252. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  253. <view class="fh_type">
  254. {{ item.shopName }}
  255. <text>{{ item.shopPhone }}</text>
  256. </view>
  257. </view>
  258. </view>
  259. <view class="sh_box">
  260. <view class="sh_image">
  261. <image src="../../static/image/icon_s.png"></image>
  262. </view>
  263. <view class="box">
  264. <view class="sh_name">{{ item.userAddressDetail }}</view>
  265. <view class="sh_type">
  266. {{ item.userName }}
  267. <text>{{ item.userPhone }}</text>
  268. </view>
  269. </view>
  270. </view>
  271. </view>
  272. </view>
  273. <u-line color="#E6E6E6" />
  274. <view class="order_btn">
  275. <view class="btn1" v-if="item.indentState == '3'" @click.stop="quxiao(item.indentNumber)">取消订单</view>
  276. <view class="btn2" v-if="item.indentState == '3'" @click.stop="quhuo(item.indentId)">确认取货</view>
  277. </view>
  278. </view>
  279. </view>
  280. <!-- 配送中 -->
  281. <view class="tabs_box" :class="{ dis: current == 2 }">
  282. <view class="order_box" v-for="(item, index) in lists" :key="index" @click="bindorderDetail(item.indentNumber, item.orderId)">
  283. <view class="order_success" v-if="item.indentState == '4'">
  284. <view class="order_name">配送中</view>
  285. <view class="order_data">{{ item.receivingTime }}</view>
  286. </view>
  287. <view class="order_success" v-if="item.indentState == '5'">
  288. <view class="order_name">已完成</view>
  289. <view class="order_data">{{ item.receivingTime }}</view>
  290. </view>
  291. <view class="order_success" v-if="item.indentState == '6'">
  292. <view class="order_name">已完成</view>
  293. <view class="order_data">{{ item.receivingTime }}</view>
  294. </view>
  295. <view class="order_success" v-if="item.indentState == '7'">
  296. <view class="order_name">已完成</view>
  297. <view class="order_data">{{ item.receivingTime }}</view>
  298. </view>
  299. <u-line color="#E6E6E6" />
  300. <view class="order_city">
  301. <view class="city_type">
  302. <view class="type_name" v-if="item.indentType == 1">帮我送</view>
  303. <view class="type_name" v-if="item.indentType == 2">帮我取</view>
  304. <view class="type_name" v-if="item.indentType == 3">同城帮买</view>
  305. <view class="type_name" v-if="item.indentType == 4">同城服务</view>
  306. <view class="type_name" v-if="item.indentType == 5">同城外卖</view>
  307. <view class="city_text" v-if="item.itemType">{{ item.itemType }}</view>
  308. </view>
  309. <view style="padding: 0 30rpx; color: #ff7f00">{{ item.shopName }}</view>
  310. <view style="padding: 0 30rpx">订单编号:{{ item.indentNumber }}</view>
  311. <view class="city_address" v-if="item.indentType == 1 || item.indentType == 2">
  312. <view class="fh_box">
  313. <view class="fh_image">
  314. <image src="../../static/image/icon_f.png"></image>
  315. </view>
  316. <view class="box">
  317. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  318. <view class="fh_type">
  319. {{ item.shopName }}
  320. <text>{{ item.shopPhone }}</text>
  321. </view>
  322. </view>
  323. </view>
  324. <view class="sh_box">
  325. <view class="sh_image">
  326. <image src="../../static/image/icon_s.png"></image>
  327. </view>
  328. <view class="box">
  329. <view class="sh_name">{{ item.userAddressDetail }}</view>
  330. <view class="sh_type">
  331. {{ item.userName }}
  332. <text>{{ item.userPhone }}</text>
  333. </view>
  334. </view>
  335. </view>
  336. </view>
  337. <view class="city_address" v-if="item.indentType == 3">
  338. <view class="fh_box" v-if="item.buy_type == 1">
  339. <view class="fh_image">
  340. <image src="../../static/image/icon_f.png"></image>
  341. </view>
  342. <view class="box">
  343. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  344. <view class="fh_type">
  345. {{ item.shopName }}
  346. <text>{{ item.shopPhone }}</text>
  347. </view>
  348. </view>
  349. </view>
  350. <view class="sh_box">
  351. <view class="sh_image">
  352. <image src="../../static/image/icon_s.png"></image>
  353. </view>
  354. <view class="box">
  355. <view class="sh_name">{{ item.userAddressDetail }}</view>
  356. <view class="sh_type">
  357. {{ item.userName }}
  358. <text>{{ item.userPhone }}</text>
  359. </view>
  360. </view>
  361. </view>
  362. </view>
  363. <view class="city_address" v-if="item.indentType == 4">
  364. <view class="sh_box">
  365. <view class="sh_image">
  366. <image src="../../static/image/icon_s.png"></image>
  367. </view>
  368. <view class="box">
  369. <view class="sh_name">{{ item.userAddressDetail }}</view>
  370. <view class="sh_type">
  371. {{ item.userName }}
  372. <text>{{ item.userPhone }}</text>
  373. </view>
  374. </view>
  375. </view>
  376. </view>
  377. <view class="city_address" v-if="item.indentType == 5">
  378. <view class="fh_box" v-if="item.buy_type == 1">
  379. <view class="fh_image">
  380. <image src="../../static/image/icon_f.png"></image>
  381. </view>
  382. <view class="box">
  383. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  384. <view class="fh_type">
  385. {{ item.shopName }}
  386. <text>{{ item.shopPhone }}</text>
  387. </view>
  388. </view>
  389. </view>
  390. <view class="sh_box">
  391. <view class="sh_image">
  392. <image src="../../static/image/icon_s.png"></image>
  393. </view>
  394. <view class="box">
  395. <view class="sh_name">{{ item.userAddressDetail }}</view>
  396. <view class="sh_type">
  397. {{ item.userName }}
  398. <text>{{ item.userPhone }}</text>
  399. </view>
  400. </view>
  401. </view>
  402. </view>
  403. </view>
  404. <u-line color="#E6E6E6" />
  405. <view class="order_btn">
  406. <view class="btn1" v-if="item.indentState == '3'">取消订单</view>
  407. <!-- <view class="btn1" v-if="item.indentState=='6'">客户待确认</view> -->
  408. <view class="btn2" v-if="item.indentState == '3'" @click.stop="quhuo(item.indentId)">确认取货</view>
  409. <view class="btn2" v-if="item.indentState == '4'" @click.stop="onshow(item)">确认送达</view>
  410. <view class="btn2" v-if="item.indentState == '9'">已取消</view>
  411. </view>
  412. </view>
  413. </view>
  414. <!-- 配送完 -->
  415. <view class="tabs_box" :class="{ dis: current == 3 }">
  416. <view class="order_box" v-for="(item, index) in lists" :key="index" @click="bindorderDetail(item.indentNumber, item.orderId)">
  417. <!-- <view class="order_success" v-if="item.indentState=='4'">
  418. <view class="order_name">配送中</view>
  419. <view class="order_data">{{item.receivingTime}}</view>
  420. </view> -->
  421. <view class="order_success" v-if="item.indentState == '5'">
  422. <view class="order_name">已完成</view>
  423. <view class="order_data">{{ item.receivingTime }}</view>
  424. </view>
  425. <view class="order_success" v-if="item.indentState == '6'">
  426. <view class="order_name">已完成</view>
  427. <view class="order_data">{{ item.receivingTime }}</view>
  428. </view>
  429. <view class="order_success" v-if="item.indentState == '7'">
  430. <view class="order_name">已完成</view>
  431. <view class="order_data">{{ item.receivingTime }}</view>
  432. </view>
  433. <u-line color="#E6E6E6" />
  434. <view class="order_city">
  435. <view class="city_type">
  436. <view class="type_name" v-if="item.indentType == 1">帮我送</view>
  437. <view class="type_name" v-if="item.indentType == 2">帮我取</view>
  438. <view class="type_name" v-if="item.indentType == 3">同城帮买</view>
  439. <view class="type_name" v-if="item.indentType == 4">同城服务</view>
  440. <view class="type_name" v-if="item.indentType == 5">同城外卖</view>
  441. <view class="city_text" v-if="item.itemType">{{ item.itemType }}</view>
  442. </view>
  443. <view style="padding: 0 30rpx; color: #ff7f00">{{ item.shopName }}</view>
  444. <view style="padding: 0 30rpx">订单编号:{{ item.indentNumber }}</view>
  445. <view class="city_address" v-if="item.indentType == 1 || item.indentType == 2">
  446. <view class="fh_box">
  447. <view class="fh_image">
  448. <image src="../../static/image/icon_f.png"></image>
  449. </view>
  450. <view class="box">
  451. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  452. <view class="fh_type">
  453. {{ item.shopName }}
  454. <text>{{ item.shopPhone }}</text>
  455. </view>
  456. </view>
  457. </view>
  458. <view class="sh_box">
  459. <view class="sh_image">
  460. <image src="../../static/image/icon_s.png"></image>
  461. </view>
  462. <view class="box">
  463. <view class="sh_name">{{ item.userAddressDetail }}</view>
  464. <view class="sh_type">
  465. {{ item.userName }}
  466. <text>{{ item.userPhone }}</text>
  467. </view>
  468. </view>
  469. </view>
  470. </view>
  471. <view class="city_address" v-if="item.indentType == 3">
  472. <view class="fh_box" v-if="item.buy_type == 1">
  473. <view class="fh_image">
  474. <image src="../../static/image/icon_f.png"></image>
  475. </view>
  476. <view class="box">
  477. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  478. <view class="fh_type">
  479. {{ item.shopName }}
  480. <text>{{ item.shopPhone }}</text>
  481. </view>
  482. </view>
  483. </view>
  484. <view class="sh_box">
  485. <view class="sh_image">
  486. <image src="../../static/image/icon_s.png"></image>
  487. </view>
  488. <view class="box">
  489. <view class="sh_name">{{ item.userAddressDetail }}</view>
  490. <view class="sh_type">
  491. {{ item.userName }}
  492. <text>{{ item.userPhone }}</text>
  493. </view>
  494. </view>
  495. </view>
  496. </view>
  497. <view class="city_address" v-if="item.indentType == 4">
  498. <view class="sh_box">
  499. <view class="sh_image">
  500. <image src="../../static/image/icon_s.png"></image>
  501. </view>
  502. <view class="box">
  503. <view class="sh_name">{{ item.userAddressDetail }}</view>
  504. <view class="sh_type">
  505. {{ item.userName }}
  506. <text>{{ item.userPhone }}</text>
  507. </view>
  508. </view>
  509. </view>
  510. </view>
  511. <view class="city_address" v-if="item.indentType == 5">
  512. <view class="fh_box" v-if="item.buy_type == 1">
  513. <view class="fh_image">
  514. <image src="../../static/image/icon_f.png"></image>
  515. </view>
  516. <view class="box">
  517. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  518. <view class="fh_type">
  519. {{ item.shopName }}
  520. <text>{{ item.shopPhone }}</text>
  521. </view>
  522. </view>
  523. </view>
  524. <view class="sh_box">
  525. <view class="sh_image">
  526. <image src="../../static/image/icon_s.png"></image>
  527. </view>
  528. <view class="box">
  529. <view class="sh_name">{{ item.userAddressDetail }}</view>
  530. <view class="sh_type">
  531. {{ item.userName }}
  532. <text>{{ item.userPhone }}</text>
  533. </view>
  534. </view>
  535. </view>
  536. </view>
  537. </view>
  538. <u-line color="#E6E6E6" />
  539. <view class="order_btn">
  540. <view class="btn1" v-if="item.indentState == '3'">取消订单</view>
  541. <!-- <view class="btn1" v-if="item.indentState=='6'">客户待确认</view> -->
  542. <view class="btn2" v-if="item.indentState == '3'" @click="quhuo(item.indentId)">确认取货</view>
  543. <view class="btn2" v-if="item.indentState == '4'" @click="onshow(item)">确认送达</view>
  544. <view class="btn2" v-if="item.indentState == '9'">已取消</view>
  545. </view>
  546. </view>
  547. </view>
  548. <!-- 已完成 -->
  549. <view class="tabs_box" :class="{ dis: current == 4 }">
  550. <view class="order_box" v-for="(item, index) in lists" :key="index" @click="bindorderDetail(item.indentNumber, item.orderId)">
  551. <view class="order_success" v-if="item.indentState == '4'">
  552. <view class="order_name">配送中</view>
  553. <view class="order_data">{{ item.receivingTime }}</view>
  554. </view>
  555. <view class="order_success" v-if="item.indentState == '5'">
  556. <view class="order_name">已完成</view>
  557. <view class="order_data">{{ item.receivingTime }}</view>
  558. </view>
  559. <view class="order_success" v-if="item.indentState == '6'">
  560. <view class="order_name">已完成</view>
  561. <view class="order_data">{{ item.receivingTime }}</view>
  562. </view>
  563. <view class="order_success" v-if="item.indentState == '7'">
  564. <view class="order_name">已完成</view>
  565. <view class="order_data">{{ item.receivingTime }}</view>
  566. </view>
  567. <u-line color="#E6E6E6" />
  568. <view class="order_city">
  569. <view class="city_type">
  570. <view class="type_name" v-if="item.indentType == 1">帮我送</view>
  571. <view class="type_name" v-if="item.indentType == 2">帮我取</view>
  572. <view class="type_name" v-if="item.indentType == 3">同城帮买</view>
  573. <view class="type_name" v-if="item.indentType == 4">同城服务</view>
  574. <view class="type_name" v-if="item.indentType == 5">同城外卖</view>
  575. <view class="city_text" v-if="item.itemType">{{ item.itemType }}</view>
  576. </view>
  577. <view style="padding: 0 30rpx; color: #ff7f00">{{ item.shopName }}</view>
  578. <view style="padding: 0 30rpx">订单编号:{{ item.indentNumber }}</view>
  579. <view class="city_address" v-if="item.indentType == 1 || item.indentType == 2">
  580. <view class="fh_box">
  581. <view class="fh_image">
  582. <image src="../../static/image/icon_f.png"></image>
  583. </view>
  584. <view class="box">
  585. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  586. <view class="fh_type">
  587. {{ item.shopName }}
  588. <text>{{ item.shopPhone }}</text>
  589. </view>
  590. </view>
  591. </view>
  592. <view class="sh_box">
  593. <view class="sh_image">
  594. <image src="../../static/image/icon_s.png"></image>
  595. </view>
  596. <view class="box">
  597. <view class="sh_name">{{ item.userAddressDetail }}</view>
  598. <view class="sh_type">
  599. {{ item.userName }}
  600. <text>{{ item.userPhone }}</text>
  601. </view>
  602. </view>
  603. </view>
  604. </view>
  605. <view class="city_address" v-if="item.indentType == 3">
  606. <view class="fh_box" v-if="item.buy_type == 1">
  607. <view class="fh_image">
  608. <image src="../../static/image/icon_f.png"></image>
  609. </view>
  610. <view class="box">
  611. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  612. <view class="fh_type">
  613. {{ item.shopName }}
  614. <text>{{ item.shopPhone }}</text>
  615. </view>
  616. </view>
  617. </view>
  618. <view class="sh_box">
  619. <view class="sh_image">
  620. <image src="../../static/image/icon_s.png"></image>
  621. </view>
  622. <view class="box">
  623. <view class="sh_name">{{ item.userAddressDetail }}</view>
  624. <view class="sh_type">
  625. {{ item.userName }}
  626. <text>{{ item.userPhone }}</text>
  627. </view>
  628. </view>
  629. </view>
  630. </view>
  631. <view class="city_address" v-if="item.indentType == 4">
  632. <view class="sh_box">
  633. <view class="sh_image">
  634. <image src="../../static/image/icon_s.png"></image>
  635. </view>
  636. <view class="box">
  637. <view class="sh_name">{{ item.userAddressDetail }}</view>
  638. <view class="sh_type">
  639. {{ item.userName }}
  640. <text>{{ item.userPhone }}</text>
  641. </view>
  642. </view>
  643. </view>
  644. </view>
  645. <view class="city_address" v-if="item.indentType == 5">
  646. <view class="fh_box" v-if="item.buy_type == 1">
  647. <view class="fh_image">
  648. <image src="../../static/image/icon_f.png"></image>
  649. </view>
  650. <view class="box">
  651. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  652. <view class="fh_type">
  653. {{ item.shopName }}
  654. <text>{{ item.shopPhone }}</text>
  655. </view>
  656. </view>
  657. </view>
  658. <view class="sh_box">
  659. <view class="sh_image">
  660. <image src="../../static/image/icon_s.png"></image>
  661. </view>
  662. <view class="box">
  663. <view class="sh_name">{{ item.userAddressDetail }}</view>
  664. <view class="sh_type">
  665. {{ item.userName }}
  666. <text>{{ item.userPhone }}</text>
  667. </view>
  668. </view>
  669. </view>
  670. </view>
  671. </view>
  672. <u-line color="#E6E6E6" />
  673. <view class="order_btn">
  674. <view class="btn1" v-if="item.indentState == '3'">取消订单</view>
  675. <!-- <view class="btn1" v-if="item.indentState=='6'">客户待确认</view> -->
  676. <view class="btn2" v-if="item.indentState == '3'" @click="quhuo(item.indentId)">确认取货</view>
  677. <view class="btn2" v-if="item.indentState == '4'" @click="onshow(item)">确认送达</view>
  678. <view class="btn2" v-if="item.indentState == '9'">已取消</view>
  679. </view>
  680. </view>
  681. </view>
  682. <!-- 已取消 -->
  683. <view class="tabs_box" :class="{ dis: current == 5 }">
  684. <view class="order_box" v-for="(item, index) in lists" :key="index" @click="bindorderDetail(item.indentNumber, item.orderId)">
  685. <view class="order_success" v-if="item.indentState == '4'">
  686. <view class="order_name">配送中</view>
  687. <view class="order_data">{{ item.receivingTime }}</view>
  688. </view>
  689. <view class="order_success" v-if="item.indentState == '5'">
  690. <view class="order_name">已完成</view>
  691. <view class="order_data">{{ item.receivingTime }}</view>
  692. </view>
  693. <view class="order_success" v-if="item.indentState == '6'">
  694. <view class="order_name">已完成</view>
  695. <view class="order_data">{{ item.receivingTime }}</view>
  696. </view>
  697. <view class="order_success" v-if="item.indentState == '9'">
  698. <view class="order_name">已取消</view>
  699. <view class="order_data">{{ item.receivingTime }}</view>
  700. </view>
  701. <u-line color="#E6E6E6" />
  702. <view class="order_city">
  703. <view class="city_type">
  704. <view class="type_name" v-if="item.indentType == 1">帮我送</view>
  705. <view class="type_name" v-if="item.indentType == 2">帮我取</view>
  706. <view class="type_name" v-if="item.indentType == 3">同城帮买</view>
  707. <view class="type_name" v-if="item.indentType == 4">同城服务</view>
  708. <view class="type_name" v-if="item.indentType == 5">同城外卖</view>
  709. <view class="city_text" v-if="item.itemType">{{ item.itemType }}</view>
  710. </view>
  711. <view style="padding: 0 30rpx; color: #ff7f00">{{ item.shopName }}</view>
  712. <view style="padding: 0 30rpx">订单编号:{{ item.indentNumber }}</view>
  713. <view class="city_address" v-if="item.indentType == 1 || item.indentType == 2">
  714. <view class="fh_box">
  715. <view class="fh_image">
  716. <image src="../../static/image/icon_f.png"></image>
  717. </view>
  718. <view class="box">
  719. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  720. <view class="fh_type">
  721. {{ item.shopName }}
  722. <text>{{ item.shopPhone }}</text>
  723. </view>
  724. </view>
  725. </view>
  726. <view class="sh_box">
  727. <view class="sh_image">
  728. <image src="../../static/image/icon_s.png"></image>
  729. </view>
  730. <view class="box">
  731. <view class="sh_name">{{ item.userAddressDetail }}</view>
  732. <view class="sh_type">
  733. {{ item.userName }}
  734. <text>{{ item.userPhone }}</text>
  735. </view>
  736. </view>
  737. </view>
  738. </view>
  739. <view class="city_address" v-if="item.indentType == 3">
  740. <view class="fh_box" v-if="item.buy_type == 1">
  741. <view class="fh_image">
  742. <image src="../../static/image/icon_f.png"></image>
  743. </view>
  744. <view class="box">
  745. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  746. <view class="fh_type">
  747. {{ item.shopName }}
  748. <text>{{ item.shopPhone }}</text>
  749. </view>
  750. </view>
  751. </view>
  752. <view class="sh_box">
  753. <view class="sh_image">
  754. <image src="../../static/image/icon_s.png"></image>
  755. </view>
  756. <view class="box">
  757. <view class="sh_name">{{ item.userAddressDetail }}</view>
  758. <view class="sh_type">
  759. {{ item.userName }}
  760. <text>{{ item.userPhone }}</text>
  761. </view>
  762. </view>
  763. </view>
  764. </view>
  765. <view class="city_address" v-if="item.indentType == 4">
  766. <view class="sh_box">
  767. <view class="sh_image">
  768. <image src="../../static/image/icon_s.png"></image>
  769. </view>
  770. <view class="box">
  771. <view class="sh_name">{{ item.userAddressDetail }}</view>
  772. <view class="sh_type">
  773. {{ item.userName }}
  774. <text>{{ item.userPhone }}</text>
  775. </view>
  776. </view>
  777. </view>
  778. </view>
  779. <view class="city_address" v-if="item.indentType == 5">
  780. <view class="fh_box" v-if="item.buy_type == 1">
  781. <view class="fh_image">
  782. <image src="../../static/image/icon_f.png"></image>
  783. </view>
  784. <view class="box">
  785. <view class="fh_name">{{ item.shopAddressDetail }}</view>
  786. <view class="fh_type">
  787. {{ item.shopName }}
  788. <text>{{ item.shopPhone }}</text>
  789. </view>
  790. </view>
  791. </view>
  792. <view class="sh_box">
  793. <view class="sh_image">
  794. <image src="../../static/image/icon_s.png"></image>
  795. </view>
  796. <view class="box">
  797. <view class="sh_name">{{ item.userAddressDetail }}</view>
  798. <view class="sh_type">
  799. {{ item.userName }}
  800. <text>{{ item.userPhone }}</text>
  801. </view>
  802. </view>
  803. </view>
  804. </view>
  805. </view>
  806. <u-line color="#E6E6E6" />
  807. <view class="order_btn">
  808. <view class="btn2" v-if="item.indentState == '9'">已取消</view>
  809. </view>
  810. </view>
  811. </view>
  812. <empty v-if="lists.length == 0"></empty>
  813. <!-- 收货码弹框 -->
  814. <u-popup v-model="shows" mode="center" border-radius="18" :closeable="closeable" close-icon="close-circle" close-icon-size="45" width="580rpx" height="400rpx">
  815. <view class="receipt_code">
  816. <view class="code_title">填写收货码</view>
  817. <u-input v-model="shouhuoma" type="text" placeholder="请输入收货码" :border="true" />
  818. <view class="sure" @click="querenSh">确定</view>
  819. </view>
  820. </u-popup>
  821. <!-- 确认收货拍照弹出框 -->
  822. <u-popup
  823. v-model="alertPhone"
  824. mode="center"
  825. border-radius="18"
  826. :closeable="closeable"
  827. close-icon="close-circle"
  828. close-icon-size="45"
  829. width="680rpx"
  830. height="900rpx"
  831. @close="onclose"
  832. >
  833. <view class="receipt_code">
  834. <view class="phone_title">图片凭证</view>
  835. <view class="phone_title2">请在确认外卖送达后、通过拍照,进行现场还原</view>
  836. <view>
  837. <view class="flex" style="overflow: hidden; flex-wrap: wrap">
  838. <view v-if="goodsPicture.length">
  839. <view class="margin-top flex margin-right-sm flex-wrap">
  840. <view
  841. class="flex"
  842. style="width: 200rpx; height: 200rpx; margin-right: 2rpx; position: relative"
  843. v-for="(image, index) in goodsPicture"
  844. :key="index"
  845. >
  846. <image :src="image" style="width: 100%; height: 100%"></image>
  847. <view style="z-index: 9; position: absolute; top: -15rpx; right: -15rpx" @click="removeImg(index, 'lb')">
  848. <u-icon name="close-circle-fill" color="#FCD202" size="50rpx"></u-icon>
  849. </view>
  850. </view>
  851. </view>
  852. </view>
  853. <view class="margin-top" @click="addImages(1)" v-if="goodsPicture.length <= 1">
  854. <view style="width: 200rpx; height: 200rpx; background: #f4f5f6" class="flex justify-center align-center">
  855. <view>
  856. <view class="text-center">
  857. <image src="../../static/addimg.png" style="width: 65rpx; height: 55rpx"></image>
  858. </view>
  859. <view class="text-center text-black">添加图片</view>
  860. </view>
  861. </view>
  862. </view>
  863. </view>
  864. </view>
  865. <view class="receipt_code" v-if="alertduan">
  866. <view class="code_title">是否确认送达</view>
  867. <view class="code_title2">已选订单:1单</view>
  868. <view class="code_title2">通知形式:短信</view>
  869. <view class="code_title2">通知内容:{{ duanxin[0].templateContent.substring(0, 21) }}{{ qiPhone }}</view>
  870. <view class="sure" @click="querenSh">确认送达</view>
  871. </view>
  872. <!-- <view class="sure" @click="querenduanxin">确认拍照</view> -->
  873. </view>
  874. </u-popup>
  875. <!-- 确认收货选择短信框 -->
  876. <!-- <u-popup v-model="alertduan" mode="center" border-radius="18" :closeable="closeable" close-icon="close-circle"
  877. close-icon-size="45" width="680rpx" height="600rpx">
  878. <view class="receipt_code">
  879. <view class="code_title">是否确认送达</view>
  880. <view class="code_title2">已选订单:1单</view>
  881. <view class="code_title2">通知形式:短信</view>
  882. <view class="code_title2">通知内容:{{duanxin[0].templateContent.substring(0, 21)}}{{qiPhone}}</view>
  883. <view class="sure" @click="querenSh">确认送达</view>
  884. </view>
  885. </u-popup> -->
  886. </view>
  887. <!-- 用于图片压缩的canvas画布 -->
  888. <canvas
  889. :style="{
  890. width: cw + 'px',
  891. height: cw + 'px',
  892. position: 'absolute',
  893. zIndex: -1,
  894. left: '-10000rpx',
  895. top: '-10000rpx'
  896. }"
  897. canvas-id="zipCanvas"
  898. ></canvas>
  899. <!--画布结束-->
  900. </view>
  901. </template>
  902. <script>
  903. import empty from '@/components/empty'
  904. import configdata from '@/common/config.js'
  905. import getLessLimitSizeImage from '@/utils/imageCompress.js'
  906. export default {
  907. components: {
  908. empty
  909. },
  910. data() {
  911. return {
  912. shows: false,
  913. alertPhone: false, //确认收货拍照弹出框
  914. alertduan: false, //确认收货选择短信框
  915. closeable: true,
  916. shouhuoma: '',
  917. list: [
  918. {
  919. name: '全部'
  920. },
  921. {
  922. name: '待取货'
  923. },
  924. {
  925. name: '配送中'
  926. },
  927. {
  928. name: '已完成'
  929. }
  930. ],
  931. current: 0,
  932. bold: false,
  933. page: 1,
  934. limit: 5,
  935. order: [],
  936. lists: [],
  937. totalCount: 0,
  938. longitude: '', //经度
  939. latitude: '', //纬度
  940. indentState: '', //订单状态
  941. indentNumber: '', //订单号
  942. goodsPicture: [],
  943. count: 3,
  944. duanxin: [], //发送的短信
  945. qiPhone: '', //骑手电话
  946. //画板边长默认是屏幕宽度,正方形画布
  947. cw: uni.getSystemInfoSync().windowWidth
  948. }
  949. },
  950. onLoad() {
  951. this.qiPhone = uni.getStorageSync('phone')
  952. var that = this
  953. uni.getLocation({
  954. type: 'wgs84',
  955. success: function (res) {
  956. console.log('当前位置的经度:' + res.longitude)
  957. console.log('当前位置的纬度:' + res.latitude)
  958. that.longitude = res.longitude
  959. that.latitude = res.latitude
  960. that.taskData()
  961. }
  962. })
  963. },
  964. onShow() {
  965. let zhuandan = this.$queue.getData('zhuandan')
  966. if (zhuandan) {
  967. this.$queue.remove('zhuandan')
  968. this.page = 1
  969. this.taskData()
  970. }
  971. },
  972. methods: {
  973. change(index) {
  974. uni.showLoading({
  975. title: '加载中......',
  976. mask: true, // 是否显示透明蒙层,防止触摸穿透
  977. icon: 'none'
  978. })
  979. this.current = index
  980. this.lists = []
  981. this.page = 1
  982. if (index == 0) {
  983. this.indentState = ''
  984. }
  985. if (index == 1) {
  986. this.indentState = 3
  987. }
  988. if (index == 2) {
  989. this.indentState = 4
  990. }
  991. if (index == 3) {
  992. this.indentState = 6
  993. }
  994. if (index == 4) {
  995. this.indentState = 9
  996. }
  997. this.taskData()
  998. },
  999. // 订单获取
  1000. taskData() {
  1001. uni.showLoading({
  1002. title: '加载中......',
  1003. mask: true, // 是否显示透明蒙层,防止触摸穿透
  1004. icon: 'none'
  1005. })
  1006. this.$Request
  1007. .getT('/app/tbindent/findRiderIndent', {
  1008. page: this.page,
  1009. limit: 10,
  1010. indentState: this.indentState
  1011. })
  1012. .then((res) => {
  1013. uni.hideLoading()
  1014. if (this.page == 1) {
  1015. this.lists = res.data.list
  1016. } else {
  1017. this.lists = this.lists.concat(res.data.list)
  1018. }
  1019. for (var i in this.lists) {
  1020. if (this.lists[i].distanceInitial > 1000) {
  1021. this.lists[i].distanceInitials = (Number(this.lists[i].distanceInitial) / 100).toFixed(2)
  1022. }
  1023. if (this.lists[i].distance > 1000) {
  1024. this.lists[i].distances = (Number(this.lists[i].distance) / 100).toFixed(2)
  1025. }
  1026. }
  1027. console.log('lists', this.lists)
  1028. this.totalCount = res.data.totalCount
  1029. uni.stopPullDownRefresh()
  1030. })
  1031. },
  1032. // 订单详情
  1033. bindorderDetail(indentNumber, orderId) {
  1034. console.log(indentNumber, orderId)
  1035. uni.navigateTo({
  1036. url: '/pages/index/orderdetail/orderdetail?id=' + indentNumber + '&orderId=' + orderId
  1037. })
  1038. },
  1039. // 取消订单
  1040. quxiao(indentNumber) {
  1041. let that = this
  1042. console.log('indentNumber', indentNumber)
  1043. uni.showModal({
  1044. title: '取消订单将会被扣保证金',
  1045. content: '',
  1046. cancelText: '取消',
  1047. confirmText: '确认'
  1048. })
  1049. .then((res) => {
  1050. that.$Request
  1051. .postT('/app/tbindent/riderCancleIndent', {
  1052. indentNumber: indentNumber
  1053. })
  1054. .then((res) => {
  1055. console.log(res)
  1056. if (res.code == 0) {
  1057. that.page = 1
  1058. that.taskData()
  1059. uni.showToast({
  1060. title: '订单已取消',
  1061. icon: 'none'
  1062. })
  1063. } else {
  1064. uni.showToast({
  1065. title: res.msg,
  1066. icon: 'none'
  1067. })
  1068. }
  1069. })
  1070. })
  1071. .catch((err) => {})
  1072. },
  1073. quhuo(indentId) {
  1074. let that = this
  1075. uni.showModal({
  1076. title: '提示',
  1077. content: '确认取到货吗',
  1078. success: function (res) {
  1079. if (res.confirm) {
  1080. that.$Request
  1081. .postJson('/app/tbindent/riderBuyGoods', {
  1082. indentId: indentId,
  1083. indentState: 4
  1084. })
  1085. .then((res) => {
  1086. if (res.code == 0) {
  1087. that.page = 1
  1088. that.taskData()
  1089. uni.showToast({
  1090. title: '确认取货成功',
  1091. icon: 'none'
  1092. })
  1093. } else {
  1094. uni.showToast({
  1095. title: res.msg,
  1096. icon: 'none'
  1097. })
  1098. }
  1099. })
  1100. }
  1101. }
  1102. })
  1103. },
  1104. onshow(e) {
  1105. this.indentNumber = e.indentNumber
  1106. if (e.itemCodeFlag == 0) {
  1107. this.shows = true
  1108. } else {
  1109. //需拍照的弹出框
  1110. this.alertPhone = true
  1111. // this.querenSh()
  1112. }
  1113. },
  1114. // 图片上传
  1115. addImages(e) {
  1116. if (e == 1) {
  1117. var num = this.goodsPicture.length
  1118. this.count = 2 - num
  1119. }
  1120. let that = this
  1121. uni.chooseImage({
  1122. count: this.count,
  1123. sourceType: ['camera'],
  1124. success: (res) => {
  1125. for (let i = 0; i < res.tempFiles.length; i++) {
  1126. //这里的id和页面中写的html代码的canvas的id要一致
  1127. let canvasId = 'zipCanvas'
  1128. //原图的路径
  1129. let imagePath = res.tempFiles[i].path
  1130. //大小限制
  1131. let limitSize = 1024 * 2
  1132. //初始绘画区域是画布自身的宽度也就是屏幕宽度
  1133. let drawWidth = uni.getSystemInfoSync().windowWidth
  1134. let that = this
  1135. getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, that, (resPath) => {
  1136. uni.showLoading({
  1137. title: '上传中'
  1138. })
  1139. uni.uploadFile({
  1140. url: that.config('APIHOST1') + '/alioss/upload',
  1141. filePath: resPath,
  1142. name: 'file',
  1143. success: (uploadFileRes) => {
  1144. if (e == 1) {
  1145. if (that.goodsPicture.length < 2) {
  1146. that.goodsPicture.push(JSON.parse(uploadFileRes.data).data)
  1147. }
  1148. }
  1149. uni.hideLoading()
  1150. this.querenduanxin()
  1151. },
  1152. fail: () => {
  1153. uni.showToast({
  1154. title: '上传失败',
  1155. icon: 'error'
  1156. })
  1157. }
  1158. })
  1159. })
  1160. }
  1161. }
  1162. })
  1163. },
  1164. // 图片删除
  1165. removeImg(index, texts) {
  1166. if (texts == 'lb') {
  1167. this.goodsPicture.splice(index, 1)
  1168. }
  1169. },
  1170. config: function (name) {
  1171. var info = null
  1172. if (name) {
  1173. var name2 = name.split('.') //字符分割
  1174. if (name2.length > 1) {
  1175. info = configdata[name2[0]][name2[1]] || null
  1176. } else {
  1177. info = configdata[name] || null
  1178. }
  1179. if (info == null) {
  1180. let web_config = cache.get('web_config')
  1181. if (web_config) {
  1182. if (name2.length > 1) {
  1183. info = web_config[name2[0]][name2[1]] || null
  1184. } else {
  1185. info = web_config[name] || null
  1186. }
  1187. }
  1188. }
  1189. }
  1190. return info
  1191. },
  1192. // 监听拍照框关闭
  1193. onclose() {
  1194. this.alertPhone = false
  1195. this.alertduan = false
  1196. this.goodsPicture = []
  1197. },
  1198. // 获取确认送达短信模板
  1199. querenduanxin() {
  1200. // this.$Request.postT('/app/tb-indent-sms/template', {
  1201. this.$Request
  1202. .getT('/app/tb-indent-sms/template', {
  1203. // indentNumber: this.indentNumber,
  1204. // itemCode: this.shouhuoma
  1205. })
  1206. .then((res) => {
  1207. console.log(res)
  1208. this.duanxin = res.data.list
  1209. if (res.code == 0) {
  1210. this.page = 1
  1211. // this.alertPhone = false
  1212. this.alertduan = true
  1213. } else {
  1214. uni.showToast({
  1215. title: res.msg,
  1216. icon: 'none'
  1217. })
  1218. }
  1219. })
  1220. },
  1221. querenSh() {
  1222. var tupian = this.goodsPicture.toString()
  1223. console.log(this.goodsPicture.toString())
  1224. // this.$Request.postT('/app/tbindent/riderDelivery', {
  1225. this.$Request
  1226. .postJson('/app/tbindent/riderDelivery', {
  1227. imgs: tupian,
  1228. smsTemplateId: this.duanxin[0].id,
  1229. indentNumber: this.indentNumber,
  1230. itemCode: this.shouhuoma
  1231. })
  1232. .then((res) => {
  1233. console.log(res)
  1234. if (res.code == 0) {
  1235. this.page = 1
  1236. this.taskData()
  1237. uni.showToast({
  1238. title: '订单完成',
  1239. icon: 'none'
  1240. })
  1241. this.alertPhone = false
  1242. // this.alertduan = false
  1243. this.shows = false
  1244. } else {
  1245. uni.showToast({
  1246. title: res.msg,
  1247. icon: 'none'
  1248. })
  1249. }
  1250. })
  1251. }
  1252. },
  1253. onReachBottom: function () {
  1254. if (this.page < this.totalCount) {
  1255. this.page += 1
  1256. this.taskData()
  1257. }
  1258. },
  1259. onPullDownRefresh: function () {
  1260. this.page = 1
  1261. this.taskData()
  1262. }
  1263. }
  1264. </script>
  1265. <style>
  1266. body {
  1267. background: #f5f5f5;
  1268. }
  1269. .tabs_box {
  1270. display: none;
  1271. }
  1272. .dis {
  1273. display: block;
  1274. width: 100%;
  1275. }
  1276. .u-tab-item {
  1277. font-size: 26upx !important;
  1278. /* color: #666666 !important; */
  1279. }
  1280. .success_box {
  1281. width: 100%;
  1282. }
  1283. .order_box {
  1284. width: 90%;
  1285. margin: 0 auto;
  1286. /* height: 390rpx; */
  1287. background: #ffffff;
  1288. margin-top: 20rpx;
  1289. border-radius: 16px;
  1290. padding-bottom: 16rpx;
  1291. }
  1292. .order_success {
  1293. width: 90%;
  1294. margin: 0 auto;
  1295. display: flex;
  1296. height: 80upx;
  1297. }
  1298. .order_name {
  1299. flex: 1;
  1300. display: flex;
  1301. justify-content: left;
  1302. align-items: center;
  1303. font-weight: bold;
  1304. font-size: 26rpx;
  1305. letter-spacing: 1upx;
  1306. }
  1307. .order_data {
  1308. flex: 1;
  1309. color: #999999;
  1310. display: flex;
  1311. justify-content: flex-end;
  1312. align-items: center;
  1313. font-size: 24rpx;
  1314. }
  1315. .city_type {
  1316. width: 90%;
  1317. margin: 0 auto;
  1318. height: 60upx;
  1319. line-height: 60upx;
  1320. display: flex;
  1321. justify-content: left;
  1322. align-items: center;
  1323. }
  1324. .type_name {
  1325. font-size: 27rpx;
  1326. }
  1327. .city_text {
  1328. width: 70rpx;
  1329. line-height: 36rpx;
  1330. color: #49a5ff;
  1331. background: #c4e2ff;
  1332. text-align: center;
  1333. font-size: 19rpx;
  1334. margin-left: 20rpx;
  1335. }
  1336. .city_address {
  1337. width: 85%;
  1338. margin: 0 auto;
  1339. margin-top: -10rpx;
  1340. }
  1341. /* 发货地址 */
  1342. .fh_box {
  1343. display: flex;
  1344. /* height: 80upx; */
  1345. margin-top: 20upx;
  1346. }
  1347. .fh_image {
  1348. flex: 1;
  1349. }
  1350. .box {
  1351. flex: 11;
  1352. }
  1353. .fh_name {
  1354. font-size: 26rpx;
  1355. font-weight: 600;
  1356. letter-spacing: 2upx;
  1357. }
  1358. .fh_type {
  1359. color: #999999;
  1360. font-size: 22upx;
  1361. }
  1362. .fh_type text {
  1363. margin-left: 20upx;
  1364. }
  1365. /* 送货地址 */
  1366. .sh_box {
  1367. display: flex;
  1368. margin-bottom: 14upx;
  1369. margin-top: 14rpx;
  1370. }
  1371. .sh_image {
  1372. flex: 1;
  1373. }
  1374. .sh_name {
  1375. font-size: 26rpx;
  1376. font-weight: 600;
  1377. letter-spacing: 2upx;
  1378. }
  1379. .sh_type {
  1380. color: #999999;
  1381. font-size: 22upx;
  1382. }
  1383. .sh_type text {
  1384. margin-left: 20upx;
  1385. }
  1386. .fh_image image {
  1387. width: 30upx;
  1388. height: 30upx;
  1389. }
  1390. .sh_image image {
  1391. width: 30upx;
  1392. height: 30upx;
  1393. }
  1394. .order_btn {
  1395. display: flex;
  1396. justify-content: flex-end;
  1397. align-items: center;
  1398. /* height: 80upx; */
  1399. margin-top: 8upx;
  1400. }
  1401. .btn1 {
  1402. width: 170upx;
  1403. font-size: 22upx;
  1404. line-height: 60upx;
  1405. text-align: center;
  1406. border: 1upx solid #9c9c9c;
  1407. border-radius: 20upx;
  1408. color: #9c9c9c;
  1409. margin-right: 30upx;
  1410. }
  1411. .btn2 {
  1412. width: 170upx;
  1413. line-height: 60upx;
  1414. color: white;
  1415. background: #ff6a04;
  1416. font-size: 22upx;
  1417. text-align: center;
  1418. margin-right: 30upx;
  1419. border-radius: 20upx;
  1420. }
  1421. /* 收货码弹框 */
  1422. .receipt_code {
  1423. width: 90%;
  1424. margin: 0 auto;
  1425. }
  1426. .code_title {
  1427. width: 100%;
  1428. line-height: 100rpx;
  1429. font-size: 31rpx;
  1430. font-weight: bold;
  1431. text-align: center;
  1432. letter-spacing: 2rpx;
  1433. margin-top: 21rpx;
  1434. margin-bottom: 25rpx;
  1435. }
  1436. .u-input--border {
  1437. border: 1px solid #f2f2f2 !important;
  1438. background: #f2f2f2 !important;
  1439. color: #999999 !important;
  1440. font-weight: 500 !important;
  1441. letter-spacing: 2rpx !important;
  1442. }
  1443. .u-input__input {
  1444. font-size: 30rpx;
  1445. font-weight: bold;
  1446. flex: 1;
  1447. color: #999999 !important;
  1448. min-height: 85rpx !important;
  1449. margin-top: 7rpx;
  1450. }
  1451. .sure {
  1452. width: 100%;
  1453. height: 80rpx;
  1454. background: #ff7f00;
  1455. color: white;
  1456. border-radius: 46rpx;
  1457. text-align: center;
  1458. line-height: 80rpx;
  1459. margin-top: 30rpx;
  1460. letter-spacing: 2rpx;
  1461. }
  1462. /* 确认送达拍照框 */
  1463. .phone_title {
  1464. margin-top: 10px;
  1465. width: 100%;
  1466. height: 40px;
  1467. /* background-color: #FF7F00; */
  1468. text-align: center;
  1469. line-height: 40px;
  1470. /* color:#FFFFFF; */
  1471. }
  1472. .phone_title2 {
  1473. margin-top: 10px;
  1474. text-align: center;
  1475. color: #9d9d9d;
  1476. }
  1477. .code_title2 {
  1478. width: 100%;
  1479. line-height: 50rpx;
  1480. text-align: center;
  1481. letter-spacing: 2rpx;
  1482. margin-top: 21rpx;
  1483. margin-bottom: 25rpx;
  1484. }
  1485. </style>