order.vue 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527
  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. let token = uni.getStorageSync('token')
  1136. getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, that, (resPath) => {
  1137. uni.showLoading({
  1138. title: '上传中'
  1139. })
  1140. uni.uploadFile({
  1141. url: that.config('APIHOST1') + '/app/new-file/upload',
  1142. filePath: resPath,
  1143. header: {
  1144. token: token
  1145. },
  1146. name: 'file',
  1147. success: (uploadFileRes) => {
  1148. if (e == 1) {
  1149. if (that.goodsPicture.length < 2) {
  1150. that.goodsPicture.push(JSON.parse(uploadFileRes.data).data)
  1151. }
  1152. }
  1153. uni.hideLoading()
  1154. this.querenduanxin()
  1155. },
  1156. fail: () => {
  1157. uni.showToast({
  1158. title: '上传失败',
  1159. icon: 'error'
  1160. })
  1161. }
  1162. })
  1163. })
  1164. }
  1165. }
  1166. })
  1167. },
  1168. // 图片删除
  1169. removeImg(index, texts) {
  1170. if (texts == 'lb') {
  1171. this.goodsPicture.splice(index, 1)
  1172. }
  1173. },
  1174. config: function (name) {
  1175. var info = null
  1176. if (name) {
  1177. var name2 = name.split('.') //字符分割
  1178. if (name2.length > 1) {
  1179. info = configdata[name2[0]][name2[1]] || null
  1180. } else {
  1181. info = configdata[name] || null
  1182. }
  1183. if (info == null) {
  1184. let web_config = cache.get('web_config')
  1185. if (web_config) {
  1186. if (name2.length > 1) {
  1187. info = web_config[name2[0]][name2[1]] || null
  1188. } else {
  1189. info = web_config[name] || null
  1190. }
  1191. }
  1192. }
  1193. }
  1194. return info
  1195. },
  1196. // 监听拍照框关闭
  1197. onclose() {
  1198. this.alertPhone = false
  1199. this.alertduan = false
  1200. this.goodsPicture = []
  1201. },
  1202. // 获取确认送达短信模板
  1203. querenduanxin() {
  1204. // this.$Request.postT('/app/tb-indent-sms/template', {
  1205. this.$Request
  1206. .getT('/app/tb-indent-sms/template', {
  1207. // indentNumber: this.indentNumber,
  1208. // itemCode: this.shouhuoma
  1209. })
  1210. .then((res) => {
  1211. console.log(res)
  1212. this.duanxin = res.data.list
  1213. if (res.code == 0) {
  1214. this.page = 1
  1215. // this.alertPhone = false
  1216. this.alertduan = true
  1217. } else {
  1218. uni.showToast({
  1219. title: res.msg,
  1220. icon: 'none'
  1221. })
  1222. }
  1223. })
  1224. },
  1225. querenSh() {
  1226. var tupian = this.goodsPicture.toString()
  1227. console.log(this.goodsPicture.toString())
  1228. // this.$Request.postT('/app/tbindent/riderDelivery', {
  1229. this.$Request
  1230. .postJson('/app/tbindent/riderDelivery', {
  1231. imgs: tupian,
  1232. smsTemplateId: this.duanxin[0].id,
  1233. indentNumber: this.indentNumber,
  1234. itemCode: this.shouhuoma
  1235. })
  1236. .then((res) => {
  1237. console.log(res)
  1238. if (res.code == 0) {
  1239. this.page = 1
  1240. this.taskData()
  1241. uni.showToast({
  1242. title: '订单完成',
  1243. icon: 'none'
  1244. })
  1245. this.alertPhone = false
  1246. // this.alertduan = false
  1247. this.shows = false
  1248. } else {
  1249. uni.showToast({
  1250. title: res.msg,
  1251. icon: 'none'
  1252. })
  1253. }
  1254. })
  1255. }
  1256. },
  1257. onReachBottom: function () {
  1258. if (this.page < this.totalCount) {
  1259. this.page += 1
  1260. this.taskData()
  1261. }
  1262. },
  1263. onPullDownRefresh: function () {
  1264. this.page = 1
  1265. this.taskData()
  1266. }
  1267. }
  1268. </script>
  1269. <style>
  1270. body {
  1271. background: #f5f5f5;
  1272. }
  1273. .tabs_box {
  1274. display: none;
  1275. }
  1276. .dis {
  1277. display: block;
  1278. width: 100%;
  1279. }
  1280. .u-tab-item {
  1281. font-size: 26upx !important;
  1282. /* color: #666666 !important; */
  1283. }
  1284. .success_box {
  1285. width: 100%;
  1286. }
  1287. .order_box {
  1288. width: 90%;
  1289. margin: 0 auto;
  1290. /* height: 390rpx; */
  1291. background: #ffffff;
  1292. margin-top: 20rpx;
  1293. border-radius: 16px;
  1294. padding-bottom: 16rpx;
  1295. }
  1296. .order_success {
  1297. width: 90%;
  1298. margin: 0 auto;
  1299. display: flex;
  1300. height: 80upx;
  1301. }
  1302. .order_name {
  1303. flex: 1;
  1304. display: flex;
  1305. justify-content: left;
  1306. align-items: center;
  1307. font-weight: bold;
  1308. font-size: 26rpx;
  1309. letter-spacing: 1upx;
  1310. }
  1311. .order_data {
  1312. flex: 1;
  1313. color: #999999;
  1314. display: flex;
  1315. justify-content: flex-end;
  1316. align-items: center;
  1317. font-size: 24rpx;
  1318. }
  1319. .city_type {
  1320. width: 90%;
  1321. margin: 0 auto;
  1322. height: 60upx;
  1323. line-height: 60upx;
  1324. display: flex;
  1325. justify-content: left;
  1326. align-items: center;
  1327. }
  1328. .type_name {
  1329. font-size: 27rpx;
  1330. }
  1331. .city_text {
  1332. width: 70rpx;
  1333. line-height: 36rpx;
  1334. color: #49a5ff;
  1335. background: #c4e2ff;
  1336. text-align: center;
  1337. font-size: 19rpx;
  1338. margin-left: 20rpx;
  1339. }
  1340. .city_address {
  1341. width: 85%;
  1342. margin: 0 auto;
  1343. margin-top: -10rpx;
  1344. }
  1345. /* 发货地址 */
  1346. .fh_box {
  1347. display: flex;
  1348. /* height: 80upx; */
  1349. margin-top: 20upx;
  1350. }
  1351. .fh_image {
  1352. flex: 1;
  1353. }
  1354. .box {
  1355. flex: 11;
  1356. }
  1357. .fh_name {
  1358. font-size: 26rpx;
  1359. font-weight: 600;
  1360. letter-spacing: 2upx;
  1361. }
  1362. .fh_type {
  1363. color: #999999;
  1364. font-size: 22upx;
  1365. }
  1366. .fh_type text {
  1367. margin-left: 20upx;
  1368. }
  1369. /* 送货地址 */
  1370. .sh_box {
  1371. display: flex;
  1372. margin-bottom: 14upx;
  1373. margin-top: 14rpx;
  1374. }
  1375. .sh_image {
  1376. flex: 1;
  1377. }
  1378. .sh_name {
  1379. font-size: 26rpx;
  1380. font-weight: 600;
  1381. letter-spacing: 2upx;
  1382. }
  1383. .sh_type {
  1384. color: #999999;
  1385. font-size: 22upx;
  1386. }
  1387. .sh_type text {
  1388. margin-left: 20upx;
  1389. }
  1390. .fh_image image {
  1391. width: 30upx;
  1392. height: 30upx;
  1393. }
  1394. .sh_image image {
  1395. width: 30upx;
  1396. height: 30upx;
  1397. }
  1398. .order_btn {
  1399. display: flex;
  1400. justify-content: flex-end;
  1401. align-items: center;
  1402. /* height: 80upx; */
  1403. margin-top: 8upx;
  1404. }
  1405. .btn1 {
  1406. width: 170upx;
  1407. font-size: 22upx;
  1408. line-height: 60upx;
  1409. text-align: center;
  1410. border: 1upx solid #9c9c9c;
  1411. border-radius: 20upx;
  1412. color: #9c9c9c;
  1413. margin-right: 30upx;
  1414. }
  1415. .btn2 {
  1416. width: 170upx;
  1417. line-height: 60upx;
  1418. color: white;
  1419. background: #ff6a04;
  1420. font-size: 22upx;
  1421. text-align: center;
  1422. margin-right: 30upx;
  1423. border-radius: 20upx;
  1424. }
  1425. /* 收货码弹框 */
  1426. .receipt_code {
  1427. width: 90%;
  1428. margin: 0 auto;
  1429. }
  1430. .code_title {
  1431. width: 100%;
  1432. line-height: 100rpx;
  1433. font-size: 31rpx;
  1434. font-weight: bold;
  1435. text-align: center;
  1436. letter-spacing: 2rpx;
  1437. margin-top: 21rpx;
  1438. margin-bottom: 25rpx;
  1439. }
  1440. .u-input--border {
  1441. border: 1px solid #f2f2f2 !important;
  1442. background: #f2f2f2 !important;
  1443. color: #999999 !important;
  1444. font-weight: 500 !important;
  1445. letter-spacing: 2rpx !important;
  1446. }
  1447. .u-input__input {
  1448. font-size: 30rpx;
  1449. font-weight: bold;
  1450. flex: 1;
  1451. color: #999999 !important;
  1452. min-height: 85rpx !important;
  1453. margin-top: 7rpx;
  1454. }
  1455. .sure {
  1456. width: 100%;
  1457. height: 80rpx;
  1458. background: #ff7f00;
  1459. color: white;
  1460. border-radius: 46rpx;
  1461. text-align: center;
  1462. line-height: 80rpx;
  1463. margin-top: 30rpx;
  1464. letter-spacing: 2rpx;
  1465. }
  1466. /* 确认送达拍照框 */
  1467. .phone_title {
  1468. margin-top: 10px;
  1469. width: 100%;
  1470. height: 40px;
  1471. /* background-color: #FF7F00; */
  1472. text-align: center;
  1473. line-height: 40px;
  1474. /* color:#FFFFFF; */
  1475. }
  1476. .phone_title2 {
  1477. margin-top: 10px;
  1478. text-align: center;
  1479. color: #9d9d9d;
  1480. }
  1481. .code_title2 {
  1482. width: 100%;
  1483. line-height: 50rpx;
  1484. text-align: center;
  1485. letter-spacing: 2rpx;
  1486. margin-top: 21rpx;
  1487. margin-bottom: 25rpx;
  1488. }
  1489. </style>