serviceOrderDetail.vue 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119
  1. <template>
  2. <view class="container">
  3. <navbar :config="config" backColor="#666"></navbar>
  4. <view class="top-state u-font24 u-00321E">
  5. <!--待付款-->
  6. <view class="obligation" v-if="payment_status == 0">
  7. <view class="u-flex-center u-flex1">
  8. <image class="timeImg" :src="imgUrl+'/time.png'"></image>
  9. <view class="u-flex1">
  10. <view class="u-font32 u-bold">{{
  11. close_mode == 0 ? "待付款" : "订单已关闭"
  12. }}</view>
  13. <view class="u-flex u-font26" v-if="close_mode == 0"
  14. >请在{{
  15. $mUtil.patTime(expired_pay_time)
  16. }}内完成支付,超时订单将自动关闭</view
  17. >
  18. <view class="u-flex u-font26" v-if="close_mode == 1"
  19. >原因:主动取消</view
  20. >
  21. <view class="u-flex u-font26" v-if="close_mode == 2"
  22. >原因:商家撤销关闭</view
  23. >
  24. <view class="u-flex u-font26" v-if="close_mode == 3"
  25. >原因:支付过期关闭</view
  26. >
  27. </view>
  28. </view>
  29. </view>
  30. <!--等待确认提货-->
  31. <view class="refund-underway obligation" v-if="payment_status == 3">
  32. <view class="u-flex-center u-flex1">
  33. <image class="timeImg" :src="imgUrl+'/time.png'"></image>
  34. <view class="u-flex1">
  35. <view class="u-font32 u-bold">待使用</view>
  36. <view class="u-flex u-font26" v-if="service_expire_time > 0"
  37. >您的商品,还剩{{
  38. $mUtil.patTime(service_expire_time)
  39. }}过期</view
  40. >
  41. </view>
  42. </view>
  43. </view>
  44. <!--交易成功-->
  45. <!-- <view class="refund-underway" v-if="payment_status==4">
  46. <view class="u-font28">交易成功</view>
  47. </view> -->
  48. <view class="obligation" v-if="payment_status == 4 && !end">
  49. <view class="u-flex-center u-flex1">
  50. <image class="timeImg" :src="imgUrl+'/time.png'"></image>
  51. <view class="u-flex1">
  52. <view class="u-font32 u-bold">待评价</view>
  53. <view class="u-flex u-font26"
  54. >您的订单已签收,请评价一下商品,剩{{
  55. $mUtil.patTime(last_comment_time)
  56. }}自动评价</view
  57. >
  58. </view>
  59. </view>
  60. </view>
  61. <!--待评价-->
  62. <view
  63. class="refund-underway obligation"
  64. v-if="payment_status == 4 && end"
  65. >
  66. <view class="u-flex-center u-flex1">
  67. <image class="timeImg" :src="imgUrl+'/time.png'"></image>
  68. <view class="u-flex1">
  69. <view class="u-font32 u-bold">已完成</view>
  70. <view class="u-flex u-font26">您的订单已完成,祝你购物愉快</view>
  71. </view>
  72. </view>
  73. </view>
  74. <view class="refund-underway obligation" v-if="payment_status == 5">
  75. <view class="u-flex-center u-flex1">
  76. <image class="timeImg" :src="imgUrl+'/time.png'"></image>
  77. <view class="u-flex1">
  78. <view class="u-font32 u-bold">已完成</view>
  79. <view class="u-flex u-font26">您的订单已完成,祝你购物愉快</view>
  80. </view>
  81. </view>
  82. </view>
  83. <view class="refund-underway obligation" v-if="payment_status == -1">
  84. <view class="u-flex-center u-flex1">
  85. <image class="timeImg" :src="imgUrl+'/time.png'"></image>
  86. <view class="u-flex1">
  87. <view class="u-font32 u-bold">退款中</view>
  88. <view class="u-flex u-font26">您的订单在退款中</view>
  89. </view>
  90. </view>
  91. </view>
  92. <view class="refund-underway obligation" v-if="payment_status == -2">
  93. <view class="u-flex-center u-flex1">
  94. <image class="timeImg" :src="imgUrl+'/time.png'"></image>
  95. <view class="u-flex1">
  96. <view class="u-font32 u-bold">退款完成</view>
  97. <view class="u-flex u-font26"
  98. >您的订单已完成退款,祝您生活愉快</view
  99. >
  100. </view>
  101. </view>
  102. </view>
  103. <view class="refund-underway obligation" v-if="payment_status == -3">
  104. <view class="u-flex-center u-flex1">
  105. <image class="timeImg" :src="imgUrl+'/time.png'"></image>
  106. <view class="u-flex1">
  107. <view class="u-font32 u-bold">退款退货维权中</view>
  108. <view class="u-flex u-font26">您的订单在退款退货维权中</view>
  109. </view>
  110. </view>
  111. </view>
  112. <view class="refund-underway obligation" v-if="payment_status == -4">
  113. <view class="u-flex-center u-flex1">
  114. <image class="timeImg" :src="imgUrl+'/time.png'"></image>
  115. <view class="u-flex1">
  116. <view class="u-font32 u-bold">退款退货完成</view>
  117. <view class="u-flex u-font26"
  118. >您的订单已完成退款退货完成,祝您生活愉快</view
  119. >
  120. </view>
  121. </view>
  122. </view>
  123. </view>
  124. <view class="u-flex-column-center u-bg-fff" v-if="payment_status == 3">
  125. <text class="u-font22 u-999 u-mt15">出示数字码向店长核销</text>
  126. <view class="u-flex-center u-ptb30">
  127. <text class="u-font40 u-333 u-bold">{{ pickCode }}</text>
  128. <text class="u-font28 u-666 u-ml20" @click="copy(pickCode)">复制</text>
  129. </view>
  130. </view>
  131. <view v-if="orderListPay.length > 0">
  132. <view class="pabox" v-for="item in orderListPay" :key="item.id">
  133. <ldshop
  134. :shopStatus="shopStatus"
  135. :value="item.source_shop_name"
  136. :proxy="item.proxy"
  137. ></ldshop>
  138. <view class="u-mt20"></view>
  139. <view v-for="items in item.child_order_list" :key="items.id">
  140. <ldgoods :value="items"></ldgoods>
  141. </view>
  142. <view class="u-font28 u-1A1A1A u-mt30 bg-fff">
  143. <view class="u-flex-center-sb u-border-one pt-pb25">
  144. <view>商品金额</view>
  145. <view class="u-999 u-font3"
  146. >¥ {{ item.original_goods_amount }}</view
  147. >
  148. </view>
  149. <view class="u-flex-center-sb u-border-one pt-pb25">
  150. <view>运费</view>
  151. <view class="u-999 u-font30">+¥{{ item.real_freight }} </view>
  152. </view>
  153. <view
  154. class="u-flex-center-sb u-border-one pt-pb25"
  155. v-if="item.first_order_reduced > 0"
  156. >
  157. <view>首单优惠 <text class="u-999 u-font24"></text> </view>
  158. <view class="u-999 u-font30"
  159. >-¥ {{ item.first_order_reduced }}</view
  160. >
  161. </view>
  162. <view class="u-flex-center-sb u-border-one pt-pb25">
  163. <view>服务商品优惠</view>
  164. <!-- {{ item.user_role_name }} -->
  165. <view class="u-999 u-font30">-¥ {{ item.discount_amount }}</view>
  166. </view>
  167. <view
  168. class="u-flex-center u-border-one pt-pb25"
  169. style="justify-content: flex-end"
  170. >
  171. <view class="">共{{ item.goods_number }}件商品,小计</view>
  172. <view class="u-bold u-FF0000"
  173. ><rich-text
  174. :nodes="$mUtil.priceBigSmall(item.total_amount)"
  175. ></rich-text
  176. ></view>
  177. </view>
  178. <view class="u-flex-column-start">
  179. <view style="margin-top: 20rpx;">购买备注</view>
  180. <view class="boxTextarea">{{
  181. item.user_remark ? item.user_remark : "无"
  182. }}</view>
  183. </view>
  184. </view>
  185. </view></view
  186. >
  187. <view class="pabox" v-if="orderList.length > 0 && service_card">
  188. <ldshop :shopStatus="shopStatus" :value="source_shop_name"></ldshop>
  189. <view class="u-mt20"></view>
  190. <view v-for="(item, index) in orderList" :key="item.id">
  191. <ldgoods
  192. :value="item"
  193. @parentevaluation="parentevaluation"
  194. :keys="index"
  195. ></ldgoods>
  196. </view>
  197. <view class="u-font28 u-1A1A1A u-mt30 bg-fff">
  198. <view class="u-flex-center-sb u-border-one pt-pb25">
  199. <view>商品金额</view>
  200. <view class="u-999 u-font3">¥ {{ original_goods_amount }}</view>
  201. </view>
  202. <view class="u-flex-center-sb u-border-one pt-pb25">
  203. <view>运费</view>
  204. <view class="u-999 u-font30">+¥{{ real_freight }} </view>
  205. </view>
  206. <view class="u-flex-center-sb u-border-one pt-pb25">
  207. <view v-if="marketing_type == 1">秒杀活动折扣</view>
  208. <view v-else>服务商品优惠</view>
  209. <view class="u-999 u-font30">-¥ {{ discount_amount }}</view>
  210. </view>
  211. <view
  212. class="u-flex-center-sb u-border-one pt-pb25"
  213. v-if="first_order_reduced > 0"
  214. >
  215. <view>首单优惠 <text class="u-999 u-font24"></text> </view>
  216. <view class="u-999 u-font30">-¥ {{ first_order_reduced }}</view>
  217. </view>
  218. <view
  219. class="u-flex-center u-border-one pt-pb25"
  220. style="justify-content: flex-end"
  221. >
  222. <view class="">共{{ goodNum }}件商品,小计</view>
  223. <view class="u-bold u-FF0000"
  224. ><rich-text :nodes="$mUtil.priceBigSmall(total_amount)"></rich-text
  225. ></view>
  226. </view>
  227. <view class="u-flex-column-start" style="padding-bottom: 20rpx">
  228. <view style="margin-top: 20rpx;">购买备注</view>
  229. <view class="boxTextarea">{{
  230. user_remark ? user_remark : "无"
  231. }}</view>
  232. </view>
  233. </view>
  234. </view>
  235. <view class="upb120">
  236. <view class="u-font28 u-1A1A1A u-mt30 bg-fff">
  237. <view class="u-flex-center-sb u-plr30 pt-pb25">
  238. <view>支付金额</view>
  239. <view class="u-FF0000 u-font32 u-bold"
  240. ><rich-text :nodes="$mUtil.priceBigSmall(total_amount)"></rich-text
  241. ></view>
  242. </view>
  243. </view>
  244. <view class="u-font28 u-1A1A1A u-mt30 bg-fff" v-if="service_card">
  245. <view class="u-plr30 pt-pb25">
  246. <view class="u-flex-center-sb w100 pt-pb25">套餐内容</view></view
  247. >
  248. <view
  249. class="u-flex-center-sb u-plr30 pt-pb25"
  250. v-for="item in service_card.service_item_list"
  251. :key="item.id"
  252. >
  253. <view style="flex: 1;padding-right: 20rpx;">{{ item.item_name }}</view>
  254. <view class="u-999 u-font3"
  255. >¥ {{ item.item_price }} x {{ item.num }}</view
  256. >
  257. </view>
  258. </view>
  259. <view class="u-font28 u-1A1A1A u-mt30 bg-fff" v-if="service_card">
  260. <view class="u-flex-center-sb u-plr30 pt-pb25">
  261. <view >福利</view>
  262. <view class="u-999 u-font3" style="flex: 1;margin-left: 20rpx;">{{ service_card.welfare_items }}</view>
  263. </view>
  264. <view class="u-flex-center-sb u-plr30 pt-pb25">
  265. <view>服务次数</view>
  266. <view class="u-999 u-font3">{{ service_card.service_count }}次</view>
  267. </view>
  268. <view class="u-flex-center-sb u-plr30 pt-pb25">
  269. <view>已使用</view>
  270. <view class="u-999 u-font3">{{ service_card.use_count }} 次</view>
  271. </view>
  272. <view
  273. class="u-flex-center-sb u-plr30 pt-pb25"
  274. v-if="service_order_contacts"
  275. >
  276. <view>联系人</view>
  277. <view class="u-999 u-font3"
  278. >{{ service_order_contacts.contacts }}</view
  279. >
  280. </view>
  281. <view
  282. class="u-flex-center-sb u-plr30 pt-pb25"
  283. v-if="service_order_contacts"
  284. >
  285. <view>联系电话</view>
  286. <view class="u-999 u-font3">{{ service_order_contacts.mobile }}</view>
  287. </view>
  288. </view>
  289. <view
  290. class="u-font28 u-1A1A1A u-mt30 bg-fff"
  291. @click="goWriteOff"
  292. >
  293. <view class="u-flex-center-sb u-plr30 pt-pb25">
  294. <view>核销记录</view>
  295. <view class="u-999">查看</view>
  296. </view>
  297. </view>
  298. <view class="u-font28 u-1A1A1A u-mt30 bg-fff">
  299. <view class="u-plr30">
  300. <div class="u-border-one u-flex-center-sb pt-pb25">
  301. <view>订单编号</view>
  302. <view class="u-999 u-font3">{{ order_code }} </view>
  303. </div>
  304. </view>
  305. <view class="u-plr30 ">
  306. <div class="u-flex-center-sb u-border-one pt-pb25">
  307. <view>下单时间</view>
  308. <view class="u-999">{{ format_order_time }}</view>
  309. </div>
  310. </view>
  311. <view
  312. class="u-flex-center-sb u-plr30 pt-pb25"
  313. v-if="payment_status >= 1 || payment_status < 0"
  314. >
  315. <div class="u-flex-center-sb w100 u-border-one pt-pb25">
  316. <view>支付时间</view>
  317. <view class="u-999">{{ format_pay_time }}</view>
  318. </div>
  319. </view>
  320. <view
  321. class="u-flex-center-sb u-plr30 pt-pb25"
  322. v-if="payment_status >= 1 || payment_status < 0"
  323. >
  324. <div class="u-flex-center-sb w100 u-border-one pt-pb25">
  325. <view>支付方式</view>
  326. <view class="u-999" v-if="pay_mode == 0">余额 </view>
  327. <view class="u-999" v-if="pay_mode == 1">微信 </view>
  328. <view class="u-999" v-if="pay_mode == 2">支付宝 </view>
  329. </div>
  330. </view>
  331. <view
  332. class="u-flex-center-sb u-plr30 pt-pb25"
  333. v-if="payment_status >= 2 && address"
  334. >
  335. <view>配送方式</view>
  336. <view class="u-999">{{ freighMoney }}</view>
  337. </view>
  338. <!-- <view class="u-flex-center-sb u-plr30 pt-pb25" v-if="payment_status>=2">
  339. <view>发货时间</view>
  340. <view class="u-999">{{format_last_ship_time}}</view>
  341. </view> -->
  342. <!-- <view class="u-flex-center-sb u-plr30 pt-pb25" v-if="payment_status>=4">
  343. <view>收货时间</view>
  344. <view class="u-999">{{format_last_receipt_time}}</view>
  345. </view> -->
  346. <!-- <view
  347. class="u-flex-center-sb u-plr30 pt-pb25"
  348. v-if="payment_status >= 4"
  349. >
  350. <view>获得积分</view>
  351. <view class="u-999">可获得{{ final_give_back_point }}积分</view>
  352. </view> -->
  353. </view>
  354. </view>
  355. <!--待付款-->
  356. <view
  357. class="bg-fff u-mt30 btn u-flex"
  358. v-if="payment_status == 0 && close_mode == 0 && !end"
  359. >
  360. <button class="cancel-btn u-br-999 u-999" @click="cancelOrder">
  361. 取消订单
  362. </button>
  363. <button
  364. class="pay-btn bg-00321e u-FFF"
  365. @click="goPay(orderid, total_amount, expired_pay_time)"
  366. >
  367. 去付款
  368. </button>
  369. </view>
  370. <!--待使用 已使用-->
  371. <view
  372. class="bg-fff u-mt30 u-plr30 ptb22 btn u-flex-column-end"
  373. v-if="payment_status == 3"
  374. >
  375. <view class="u-flex-center u-mr25">
  376. <button class="u-order-btn u-br-999 u-999" @click="goRefundType(1)">
  377. 申请售后
  378. </button>
  379. <button class="u-order-btn u-br-999 u-999" @click="goPhone(mobile)">
  380. 联系客服
  381. </button>
  382. </view>
  383. </view>
  384. <!--弹窗评价-->
  385. <uniPopup type="bottom" ref="uniPopup">
  386. <view class="popup">
  387. <view class="u-flex-sb u-plr30">
  388. <view class="u-flex">
  389. <image class="pic" :src="choseGoods.goods_img"></image>
  390. <view class="u-ml30 wt378">
  391. <view class="u-1A1A1A u-font28">{{
  392. choseGoods.goods_title
  393. }}</view>
  394. <view class="u-999 u-font22 u-mt10" v-if="choseGoods.sku_set_name"
  395. >规格:{{ choseGoods.sku_set_name }}</view
  396. >
  397. <view class="u-mt10 u-flex-center">
  398. <view class="u-FF0000 u-font32"
  399. ><rich-text
  400. :nodes="$mUtil.priceBigSmall(choseGoods.sale_price)"
  401. ></rich-text
  402. ></view>
  403. <text class="u-ml10 u-999 u-font24"
  404. >x {{ choseGoods.number }}</text
  405. >
  406. </view>
  407. </view>
  408. </view>
  409. <view class="iconfont u-999 closeIcon" @click="close">&#xe612;</view>
  410. </view>
  411. <view class="u-bg-fff u-plr30 u-mt5">
  412. <view class="pt-pb25 u-font28 u-flex-center">
  413. <text>总体评价:</text>
  414. <view>
  415. <text
  416. v-for="(item, index) in 5"
  417. :key="index"
  418. @click="startNum(index)"
  419. class="iconfont u-font34"
  420. :class="gradeNum >= item ? 'grade-active' : 'u-B3B3B3'"
  421. >&#xe624;</text
  422. >
  423. </view>
  424. </view>
  425. <view class="u-font26">
  426. <textarea
  427. class="u-font26"
  428. @input="textareaInput"
  429. :value="textareaVal"
  430. placeholder="请输入文字评价"
  431. placeholder-class="cccfont"
  432. ></textarea>
  433. </view>
  434. <view class="u-mt25 u-font30">添加图片</view>
  435. <view class="u-mt25">
  436. <uploadImg
  437. imgCount="6"
  438. :type="upimgtype"
  439. :imgArr="imgArray"
  440. url=""
  441. @result="resultUrl"
  442. @delImg="delImg"
  443. ></uploadImg>
  444. </view>
  445. <view class="evaluate-submit" @click="submitCom">
  446. <button class="u-btn-two">确认提交</button>
  447. </view>
  448. </view>
  449. </view>
  450. </uniPopup>
  451. <!--页面加载动画-->
  452. <ldLoading isFullScreen :active="loading"></ldLoading>
  453. </view>
  454. </template>
  455. <script>
  456. import ldgoods from "../../../components/ld-goods/ld-goods.vue";
  457. import ldAddress from "../../../components/ld-address/ld-address.vue";
  458. import ldAddresszt from "../../../components/ld-address/ld-addresszt.vue";
  459. import uniPopup from "../../../components/uni-popup/uni-popup.vue";
  460. import uploadImg from "../../../components/uploadImg/imgUpload.vue";
  461. import ldshop from "../../../components/ld-shop/ld-shop.vue";
  462. export default {
  463. components: {
  464. ldAddress,
  465. ldAddresszt,
  466. uniPopup,
  467. uploadImg,
  468. ldgoods,
  469. ldshop,
  470. },
  471. data() {
  472. return {
  473. upimgtype: "comment",
  474. final_give_back_point: 0,
  475. payment_status: null, //0:待付款,1:待发货
  476. expired_pay_time: null, //订单剩余支付时间
  477. total_amount: null, //总金额
  478. orderid: null,
  479. goods_amount: null, //商品价格
  480. first_order_reduced: 0, //首单优惠多少
  481. real_freight: null, //配送费
  482. discount_amount: null, //商品会员折扣
  483. pay_mode: null, //(0余额,1微信,2支付宝)
  484. order_code: null, //订单编号
  485. format_order_time: null, //下单时间
  486. format_pay_time: null, //支付时间
  487. format_last_ship_time: null, //发货时间
  488. format_last_receipt_time: null, //收货时间
  489. receipt_expire_time: "", //自提包裹时间
  490. freighMoney: null, //物流公司
  491. goodNum: null, //数量
  492. shipment_mode: 0,
  493. pickCode: "", //核销码
  494. original_goods_amount: null, //原价
  495. total_reduced: null, //vip优惠
  496. vipcode: "",
  497. shopStatus: false,
  498. loading: true,
  499. config: {
  500. back: true, //false是tolbar页面 是则不写
  501. title: '订单详情',
  502. color: '#1A1A1A',
  503. //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
  504. backgroundColor: [1, "#FFFFFF"],
  505. statusBarFontColor: '#1A1A1A'
  506. },
  507. isSubmit: false,
  508. index: 0,
  509. mobile: "",
  510. end: false,
  511. logImg: "", //物流图片
  512. address: null,
  513. addresszt: null,
  514. last_ship_time: 0, //发货时间
  515. last_receipt_time: 0, //收货时间
  516. orderList: [],
  517. orderListPay: [],
  518. source_shop_name: "",
  519. user_remark: "", //备注
  520. payStatus: "",
  521. goodsid: null, //评价商品的id
  522. choseGoods: {},
  523. textareaVal: "",
  524. upimg: [],
  525. imgArray: [],
  526. gradeNum: 0,
  527. close_mode: 0, //0未关闭,1用户撤销关闭,2商家撤销关闭,3支付过期关闭,4退货成功,5退款成功,6支付成功,但条件已经不允许购买,发生自动退款关闭,7自提过期
  528. marketing_type: null, //折扣类型
  529. service_card: null, //服务卡
  530. service_expire_time: null,
  531. service_order_contacts: null,
  532. imgUrl: this.$mConfig.staticUrl
  533. };
  534. },
  535. onLoad(options) {
  536. if (options.id) {
  537. this.orderid = options.id;
  538. this.payStatus = options.status;
  539. if (options.status == "pay") {
  540. this.orderDetail(options.id);
  541. }
  542. if (options.status == "waitpay") {
  543. this.orderDetailPay(options.id);
  544. }
  545. }
  546. //
  547. },
  548. methods: {
  549. goWriteOff() {
  550. uni.navigateTo({
  551. url: "./log?id=" + this.orderid + "&childId=" + this.orderList[0].id,
  552. });
  553. },
  554. //复制
  555. copy(code) {
  556. uni.setClipboardData({
  557. data: code,
  558. success: () => {
  559. uni.showToast({
  560. title: "复制成功",
  561. });
  562. },
  563. });
  564. },
  565. goPhone(phone) {
  566. if (phone) {
  567. uni.makePhoneCall({
  568. phoneNumber: phone, //仅为示例
  569. });
  570. }
  571. },
  572. restCom() {
  573. this.textareaVal = "";
  574. this.gradeNum = 0;
  575. },
  576. //提交评价
  577. submitCom() {
  578. if (this.gradeNum == 0) {
  579. this.$mUtil.toast("请评价星星");
  580. } else if (this.textareaVal == "") {
  581. this.$mUtil.toast("请输入文字评价");
  582. } else {
  583. let imgs = "";
  584. if (this.upimg.length > 0) {
  585. imgs = this.upimg.join(",");
  586. } else {
  587. imgs = "";
  588. }
  589. let data = {
  590. chlid_order_id: this.goodsid,
  591. order_id: this.orderid,
  592. level: this.gradeNum,
  593. content: this.textareaVal,
  594. img: imgs,
  595. };
  596. this.$http
  597. .post("/comment/orderGoods/saveservicegoods", data)
  598. .then((res) => {
  599. if (res && res.code == 200) {
  600. this.$mUtil.toast("评价成功");
  601. this.$refs.uniPopup.close();
  602. setTimeout(() => {
  603. uni.reLaunch({
  604. url: "/pages/order/orderList/serviceOrder",
  605. });
  606. }, 1000);
  607. }
  608. });
  609. }
  610. },
  611. textareaInput(e) {
  612. this.textareaVal = e.detail.value;
  613. },
  614. resultUrl(e) {
  615. if (e) {
  616. this.upimg = e;
  617. }
  618. },
  619. delImg(e) {
  620. if (e) {
  621. this.upimg = e;
  622. }
  623. },
  624. startNum(index) {
  625. this.gradeNum = index * 1 + 1;
  626. },
  627. //评价
  628. parentevaluation(data) {
  629. this.choseGoods = this.orderList[data.keys];
  630. this.goodsid = data.id;
  631. this.$refs.uniPopup.open();
  632. },
  633. //确认收货
  634. sureGetOrder() {
  635. uni.showModal({
  636. title: "提示",
  637. content: "确定已经收到了该商品?",
  638. success: (res) => {
  639. if (res.confirm) {
  640. this.$http
  641. .post("/order/receipt", { order_id: this.orderid })
  642. .then((res) => {
  643. if (res && res.code == 200) {
  644. this.$mUtil.toast("收货成功");
  645. setTimeout(() => {
  646. uni.reLaunch({
  647. url: "/pages/order/orderList/orderList",
  648. });
  649. }, 1000);
  650. }
  651. });
  652. } else if (res.cancel) {
  653. }
  654. },
  655. });
  656. },
  657. //选完地址回选
  658. otherFun(object) {
  659. if (!!object) {
  660. console.log(object.addressid);
  661. this.$http
  662. .put("/order/update-receipt/" + this.orderid + "/" + object.addressid)
  663. .then((res) => {
  664. if (res && res.code == 200) {
  665. this.$mUtil.toast("修改成功");
  666. this.orderDetail(this.orderid);
  667. }
  668. });
  669. }
  670. },
  671. //取消订单
  672. cancelOrder() {
  673. uni.showModal({
  674. title: "提示",
  675. content: "确定取消该订单吗?",
  676. success: (res) => {
  677. if (res.confirm) {
  678. this.$http.post("/order/cancel-pay/" + this.orderid).then((res) => {
  679. if (res && res.code == 200) {
  680. this.$mUtil.toast("取消成功");
  681. setTimeout(() => {
  682. uni.reLaunch({
  683. url: "/pages/order/orderList/orderList",
  684. });
  685. }, 1000);
  686. }
  687. });
  688. } else if (res.cancel) {
  689. }
  690. },
  691. });
  692. },
  693. orderDetail(id) {
  694. this.$http.get("/order/info/" + id).then((res) => {
  695. this.loading = false;
  696. if (res && res.code == 200) {
  697. let target = res.data;
  698. this.mobile = target.shop.customer_service_phone;
  699. this.final_give_back_point = target.final_give_back_point;
  700. this.address = target.receipt;
  701. this.addresszt = target.shop;
  702. this.orderList = target.child_order_list;
  703. this.source_shop_name = target.source_shop_name;
  704. this.user_remark = target.user_remark;
  705. this.total_amount = target.total_amount;
  706. this.vipcode = target.user_role_name; //vipcode
  707. this.goods_amount = target.goods_amount; //商品价格
  708. this.original_goods_amount = target.original_goods_amount; //商品原价价格
  709. this.total_reduced = target.total_reduced; //vip优惠
  710. this.first_order_reduced = target.first_order_reduced; //首单优惠多少
  711. this.real_freight = target.real_freight; //配送费
  712. this.discount_amount = target.discount_amount; //商品会员折扣
  713. this.pay_mode = target.pay_mode; //(0余额,1微信,2支付宝)
  714. this.order_code = target.order_code; //订单编号
  715. this.format_order_time = target.format_order_time; //下单时间
  716. this.format_pay_time = target.format_pay_time; //支付时间
  717. this.format_last_ship_time = target.format_last_ship_time; //发货时间
  718. this.format_last_receipt_time = target.format_last_receipt_time; //收货时间
  719. this.last_ship_time = target.last_ship_time; //发货时间
  720. this.last_receipt_time = target.last_receipt_time; //收货时间
  721. this.goodNum = target.goods_number; //数量
  722. this.logImg = target.child_order_list[0].goods_img;
  723. this.last_comment_time = target.child_order_list[0].last_comment_time; //评价时间
  724. this.shipment_mode = target.shipment_mode;
  725. this.end = target.end;
  726. this.marketing_type = target.marketing_type;
  727. if (target.child_order_list[0].service_card.verification_code) {
  728. this.service_expire_time =
  729. target.child_order_list[0].service_card.expired_use_time;
  730. this.pickCode =
  731. target.child_order_list[0].service_card.verification_code;
  732. this.service_card = target.child_order_list[0].service_card;
  733. this.service_order_contacts = target.service_order_contacts;
  734. }
  735. if (target.order_package) {
  736. this.receipt_expire_time = target.order_package.receipt_expire_time;
  737. if (target.order_package.express) {
  738. this.freighMoney = target.order_package.express.express_name; //物流公司
  739. }
  740. }
  741. if (target.rights_type == 0 && target.rights_status == 0) {
  742. if (target.use_status == 0 || target.use_status) {
  743. //待使用 部分使用
  744. this.payment_status = 3;
  745. }
  746. if (target.transaction_status == 5 && target.comment_status == 0) {
  747. //交易完成未评价
  748. this.payment_status = 4;
  749. this.service_card = target.child_order_list[0].service_card;
  750. }
  751. if (target.transaction_status == 5 && target.end) {
  752. //交易完成已评价
  753. this.payment_status = 5;
  754. this.service_card = target.child_order_list[0].service_card;
  755. }
  756. }
  757. if (target.transaction_status == 6) {
  758. //关闭
  759. this.payment_status = 6;
  760. }
  761. //rights_type:0没有,1仅退款,2退款退货,rights_status:(0没有,1维权中,2完成)
  762. if (target.rights_type == 1 && target.rights_status == 1) {
  763. //退款维权中
  764. this.payment_status = -1;
  765. }
  766. if (target.rights_type == 1 && target.rights_status == 2) {
  767. //退款完成
  768. this.payment_status = -2;
  769. }
  770. if (target.rights_type == 2 && target.rights_status == 1) {
  771. //退款退货维权中
  772. this.payment_status = -3;
  773. }
  774. if (target.rights_type == 2 && target.rights_status == 2) {
  775. //退款退货完成
  776. this.payment_status = -4;
  777. }
  778. }
  779. });
  780. },
  781. orderDetailPay(id) {
  782. this.$http.get("/pay/order/sale-detail/" + id).then((res) => {
  783. this.loading = false;
  784. if (res && res.code == 200) {
  785. let target = res.page.order_list[0];
  786. this.address = res.page.receipt;
  787. this.addresszt = res.page.self_take_shop;
  788. this.orderListPay = res.page.order_list;
  789. if (res.page.pay_order.payment_status != 5) {
  790. this.payment_status = 0;
  791. } else {
  792. this.payment_status = res.page.pay_order.payment_status;
  793. }
  794. this.expired_pay_time = res.page.pay_order.expired_pay_time;
  795. this.total_amount = res.page.pay_order.total_amount;
  796. this.close_mode = res.page.pay_order.close_mode;
  797. this.user_remark = target.user_remark;
  798. // this.goods_amount=target.goods_amount//商品价格
  799. // this.first_order_reduced=target.first_order_reduced//首单优惠多少
  800. // this.real_freight=target.real_freight//配送费
  801. this.pay_mode = target.pay_mode; //(0余额,1微信,2支付宝)
  802. this.order_code = target.order_code; //订单编号
  803. this.format_order_time = target.format_order_time; //下单时间
  804. this.format_pay_time = target.format_pay_time; //支付时间
  805. this.format_last_ship_time = target.format_last_ship_time; //发货时间
  806. this.format_last_receipt_time = target.format_last_receipt_time; //收货时间
  807. }
  808. });
  809. },
  810. close() {
  811. this.$refs.uniPopup.close();
  812. this.restCom();
  813. },
  814. //支付页
  815. goPay(id, total_amount, expired_pay_time) {
  816. uni.navigateTo({
  817. url:
  818. "../../order/pay?id=" +
  819. id +
  820. "&total_amount=" +
  821. total_amount +
  822. "&expired_pay_time=" +
  823. expired_pay_time +
  824. "&type=service",
  825. });
  826. },
  827. //申请售后
  828. goRefundType(i) {
  829. //i:1未发货,退款,2收到货退款/退货
  830. uni.setStorageSync("blackgoodsList", this.orderList);
  831. if (i == 1) {
  832. uni.navigateTo({
  833. url:
  834. "applicationDrawback?keystatus=" +
  835. i +
  836. "&title=申请退款" +
  837. "&orderid=" +
  838. this.orderid+"&type=service",
  839. });
  840. } else {
  841. uni.navigateTo({
  842. url:
  843. "refundType?order_code=" +
  844. this.order_code +
  845. "&format_order_time=" +
  846. this.format_order_time +
  847. "&keystatus=" +
  848. i +
  849. "&orderid=" +
  850. this.orderid,
  851. });
  852. }
  853. },
  854. //查看物流
  855. goLogistics() {
  856. uni.navigateTo({
  857. url:
  858. "../logistics?id=" +
  859. this.orderid +
  860. "&num=" +
  861. this.goodNum +
  862. "&img=" +
  863. this.logImg +
  864. "&type=1",
  865. });
  866. },
  867. //填写物流信息
  868. logisticsOpen() {
  869. this.$refs.logisticsOpen.open();
  870. },
  871. //选择快递
  872. deliveryPicker(e) {
  873. this.index = e.target.value;
  874. },
  875. //提交表单物流信息
  876. logisticsSubmit(e) {
  877. let target = e.detail.value;
  878. console.log(target);
  879. if (!target.deliveryOdd) {
  880. this.$mUtil.toast("请输入快递单号");
  881. return false;
  882. }
  883. },
  884. },
  885. };
  886. </script>
  887. <style lang="scss">
  888. page {
  889. background-color: #f5f5f5;
  890. }
  891. .cccfont {
  892. font-size: 26rpx;
  893. color: #eee;
  894. }
  895. .grade-active {
  896. color: #ff5112;
  897. }
  898. .u-B3B3B3 {
  899. color: #b3b3b3;
  900. }
  901. .user_remark {
  902. background-color: #fff;
  903. padding: 30rpx;
  904. border-top: 1px solid #eee;
  905. }
  906. .boxTextarea {
  907. width: 686rpx;
  908. border: 1px solid #ededed;
  909. border-radius: 20rpx;
  910. background-color: #fafafa;
  911. padding: 20rpx;
  912. box-sizing: border-box;
  913. margin-top: 20rpx;
  914. }
  915. .pabox {
  916. background-color: #fff;
  917. padding: 0 30rpx 0;
  918. // margin-top: 30rpx;
  919. }
  920. .upb120 {
  921. padding-bottom: 140rpx;
  922. }
  923. .bg-fff {
  924. background-color: #ffffff;
  925. }
  926. .ptb22 {
  927. padding-top: 22rpx;
  928. padding-bottom: 22rpx;
  929. }
  930. .pt-pb25 {
  931. // padding-top: 25rpx;
  932. // padding-bottom: 25rpx;
  933. height: 90rpx;
  934. }
  935. .pt28-pb24 {
  936. padding-top: 28rpx;
  937. padding-bottom: 24rpx;
  938. }
  939. .iconfont58 {
  940. font-size: 58rpx;
  941. }
  942. .mt44 {
  943. margin-top: 44rpx;
  944. }
  945. .ml38 {
  946. margin-left: 38rpx;
  947. }
  948. .ml82 {
  949. margin-left: 82rpx;
  950. }
  951. .wt378 {
  952. width: 378rpx;
  953. }
  954. .wt504 {
  955. width: 504rpx;
  956. }
  957. .u-br-999 {
  958. border: 1px solid #999999;
  959. }
  960. .u-br-f00 {
  961. border: 1px solid #ff0000;
  962. }
  963. .bg-00321e {
  964. background: #0B844A;
  965. }
  966. .account-paid {
  967. padding: 44rpx 0rpx;
  968. }
  969. .account-paid image {
  970. width: 202rpx;
  971. height: 124rpx;
  972. }
  973. .btn {
  974. width: 100%;
  975. position: fixed;
  976. bottom: 0rpx;
  977. padding: 22rpx 0rpx;
  978. }
  979. .cancel-btn {
  980. margin-left: auto;
  981. }
  982. .cancel-btn,
  983. .pay-btn {
  984. width: 202rpx;
  985. height: 70rpx;
  986. line-height: 70rpx;
  987. border-radius: 35px;
  988. font-size: 28rpx;
  989. margin-right: 30rpx;
  990. }
  991. .top-state {
  992. background-color: #d9f9dd;
  993. color: #139145;
  994. padding: 35rpx 30rpx;
  995. // 待支付
  996. .obligation {
  997. display: flex;
  998. justify-content: space-between;
  999. .timeImg {
  1000. display: none;
  1001. width: 70rpx;
  1002. height: 54rpx;
  1003. margin-right: 40rpx;
  1004. }
  1005. }
  1006. }
  1007. .address {
  1008. background-color: #ffffff;
  1009. padding-top: 72rpx;
  1010. .linkman {
  1011. padding-bottom: 34rpx;
  1012. }
  1013. .remark {
  1014. padding: 35rpx 0rpx 35rpx 50rpx;
  1015. }
  1016. }
  1017. //弹窗填写物流信息
  1018. .logisticsPopup {
  1019. background-color: #ffffff;
  1020. width: 100%;
  1021. border-radius: 20rpx;
  1022. .pd {
  1023. padding: 15rpx 98rpx 68rpx;
  1024. }
  1025. input {
  1026. height: 70rpx;
  1027. line-height: 70rpx;
  1028. border: 1rpx solid #cccccc;
  1029. border-radius: 15rpx;
  1030. padding-left: 8rpx;
  1031. color: #999999;
  1032. }
  1033. .icon {
  1034. margin-top: -65rpx;
  1035. }
  1036. .pl-pr {
  1037. padding-left: 74rpx;
  1038. }
  1039. button {
  1040. margin-top: 66rpx;
  1041. background-color: #01331f;
  1042. width: 345rpx;
  1043. }
  1044. }
  1045. // 弹窗评价
  1046. .popup {
  1047. background-color: #f5f5f5;
  1048. width: 100%;
  1049. border-radius: 18rpx 18rpx 0px 0px;
  1050. }
  1051. .u-flex-sb {
  1052. display: flex;
  1053. justify-content: space-between;
  1054. padding-top: 30rpx;
  1055. padding-bottom: 30rpx;
  1056. background-color: #ffffff;
  1057. border-radius: 18rpx 18rpx 0px 0px;
  1058. .pic {
  1059. width: 155rpx;
  1060. height: 155rpx;
  1061. border-radius: 15rpx;
  1062. }
  1063. }
  1064. textarea {
  1065. width: 100%;
  1066. height: 210rpx;
  1067. opacity: 0.66;
  1068. border: 1rpx solid #e6e6e6;
  1069. border-radius: 8rpx;
  1070. padding-left: 22rpx;
  1071. padding-top: 14rpx;
  1072. box-sizing: border-box;
  1073. }
  1074. .evaluate-submit {
  1075. margin-top: 58rpx;
  1076. padding-bottom: 25rpx;
  1077. }
  1078. .evaluate-submit button {
  1079. background-color: #0B844A;
  1080. color: #ffffff;
  1081. }
  1082. .w100 {
  1083. width: 100%;
  1084. }
  1085. </style>