detail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. <template>
  2. <view class="container mine clearfix">
  3. <!-- <cu-custom :navbar-data='nvabarData' @navigateBack="hanldNavigateBack"></cu-custom> -->
  4. <view
  5. class="tui-header-box first"
  6. :style="{ height: isCmcustomClass == 'fiexd' ? CustomBar + 10 + 'px' : CustomBar + 30 + 'px' }"
  7. :class="isCmcustomClass"
  8. >
  9. <view class="header-top" :style="{ paddingTop: top + 'px', lineHeight: CustomBar + 30 + 'px' }"></view>
  10. <view class="header-sit">
  11. <text class="iconfont icon-fanhui" @click.stop="this.$api.navigateBack(1)"></text>
  12. <text class="header-sit-text">订单详情</text>
  13. </view>
  14. </view>
  15. <view
  16. class="tui-header-box"
  17. :style="{
  18. height: CustomBar + 30 + 'px',
  19. backgroundImage: 'url(https://static.caimei365.com/app/crm/image/statistic_bg1.png)'
  20. }"
  21. >
  22. </view>
  23. <view class="distinguish-section" :style="{ top: CustomBar - 4 + 'px', left: 0 + 'px' }">
  24. <view class="distinguish-section-conten">
  25. <view class="section-top">
  26. <view class="section-badges">
  27. <view class="list-title-tip">
  28. <text class="badges">{{ order.orderType | formatOrderType }}</text>
  29. </view>
  30. <view class="list-title-tag" v-if="order.organizeId == 3">
  31. <text class="badges">维沙</text>
  32. </view>
  33. <view class="list-title-num">{{ order.status | stateExpFormat }}</view>
  34. </view>
  35. <view class="button" @click="toNoSms('/pages/collection/list')">
  36. <text class="iconfont icon-wodedingdan"></text> 收款列表
  37. </view>
  38. </view>
  39. <view class="section-mid">
  40. <view class="list-title">
  41. <view class="list-title-b">
  42. 客户名称:<text class="text">{{ order.userName ? order.userName : '无' }}</text>
  43. </view>
  44. <view class="list-title-b">
  45. 订单编号:<text class="text">{{ order.orderNo }} ( {{ order.orderId }} )</text>
  46. </view>
  47. <view class="list-title-b">
  48. 下单日期:<text class="text">{{ order.orderTime }}</text>
  49. </view>
  50. <view class="list-title-b">
  51. <view class="list-title-b-item ">
  52. 订单金额:<text class="text">¥{{ order.payTotalFee | NumFormat }}</text>
  53. </view>
  54. <view class="list-title-b-item ">
  55. 余额抵扣:<text class="text">¥{{ order.balancePayFee | NumFormat }}</text>
  56. </view>
  57. </view>
  58. <view class="list-title-b">
  59. 经理折扣:
  60. <text class="text" v-if="order.discountFee - order.returnedPurchaseFee > 0">
  61. ¥{{ order.discountFee - order.returnedPurchaseFee }}
  62. <text class="text">
  63. (原¥{{ order.discountFee }} 折扣取消¥{{
  64. order.discountFee - order.returnedPurchaseFee > 0
  65. ? order.returnedPurchaseFee
  66. : order.discountFee
  67. }})
  68. </text>
  69. </text>
  70. <text class="text" v-else>¥0.00(原¥0.00折扣取消¥0.00)</text>
  71. </view>
  72. <view class="list-title-b" v-if="order.returnedPurchaseFee > 0">
  73. 退货退款:
  74. <text class="text">
  75. (原¥{{ order.returnedPurchaseFee }} 折扣取消¥{{
  76. order.discountFee - order.returnedPurchaseFee > 0
  77. ? order.returnedPurchaseFee
  78. : order.discountFee
  79. }})
  80. </text>
  81. </view>
  82. <view class="list-title-b">
  83. <view class="list-title-b-item ">
  84. 应收金额:<text class="text">¥{{ order.payableAmount | NumFormat }}</text>
  85. </view>
  86. <view class="list-title-b-item ">
  87. 已收金额:<text class="text">¥{{ order.paidAmount | NumFormat }}</text>
  88. </view>
  89. </view>
  90. <view class="list-title-b">
  91. <view class="list-title-b-item ">
  92. 剩余应收:<text class="text">¥{{ order.surplusAmount | NumFormat }}</text>
  93. </view>
  94. <view class="list-title-b-item ">
  95. 待审金额:<text class="text">¥{{ order.unCheckAmount | NumFormat }}</text>
  96. </view>
  97. </view>
  98. <view class="list-title-b" v-if="order.discountFee - order.returnedPurchaseFee > 0">
  99. <text class="text">说明:因退货,经理折扣收回,用于抵扣退款。</text>
  100. </view>
  101. </view>
  102. </view>
  103. <view class="section-mid supper clearfix">
  104. <view v-for="(shop, index) in order.shopOrderList" :key="index">
  105. <view class="list-title supper clearfix">
  106. <view class="list-title-b">
  107. 子订单号(标识):<text class="text">{{ shop.orderNo }} ( {{ shop.shopOrderId }} )</text>
  108. </view>
  109. <view class="list-title-b">
  110. 供应商:<text class="text">{{ shop.shopName }}</text>
  111. </view>
  112. <view class="list-title-b">
  113. 订单金额:<text class="text">¥{{ shop.needPayAmount | NumFormat }}</text>
  114. </view>
  115. </view>
  116. <view class="list-goods clearfix">
  117. <view
  118. class="list-goods-item"
  119. v-for="(product, pIndex) in shop.orderProductList"
  120. :key="pIndex"
  121. >
  122. <view class="list-goods-image">
  123. <image class="list-image" :src="product.image" mode=""></image>
  124. <view class="list-tags" v-if="product.productType == 1">赠品</view>
  125. </view>
  126. <view class="list-goods-mains">
  127. <view class="list-name">{{ product.name }}</view>
  128. <view class="list-text">
  129. <view class="list-text-item"
  130. >单价:¥{{
  131. product.productType == 1 ? '0.00' : product.discountPrice | NumFormat
  132. }}</view
  133. >
  134. <view class="list-text-item">数量:{{ product.num }}</view>
  135. </view>
  136. <view class="list-text"
  137. >合计:¥{{
  138. product.productType == 1 ? '0.00' : product.totalFee | NumFormat
  139. }}</view
  140. >
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. </view>
  146. </view>
  147. </view>
  148. <!-- 弹窗提示 -->
  149. <tui-modal
  150. :show="modal"
  151. @click="handleClick"
  152. @cancel="hideMobel"
  153. :title="contentModalTitle"
  154. :content="contentModalText"
  155. :button="modalButton"
  156. color="#333"
  157. :size="32"
  158. shape="circle"
  159. :maskClosable="false"
  160. >
  161. </tui-modal>
  162. </view>
  163. </template>
  164. <script>
  165. import { mapState, mapMutations } from 'vuex'
  166. export default {
  167. data() {
  168. return {
  169. isIphoneX: this.$store.state.isIphoneX,
  170. CustomBar: this.CustomBar, // 顶部导航栏高度
  171. height: 64, //header高度
  172. top: 0, //标题图标距离顶部距离
  173. scrollH: 0, //滚动总高度
  174. opcity: 1,
  175. isCmcustomClass: 'left',
  176. nvabarData: {
  177. //顶部自定义导航
  178. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  179. showSearch: 0,
  180. title: '', // 导航栏 中间的标题
  181. haveBack: false,
  182. home: false,
  183. textLeft: this.$store.state.isIphone,
  184. bgColor: '#D33020',
  185. textColor: '#ffffff'
  186. },
  187. order: {},
  188. orderId: 0
  189. }
  190. },
  191. onLoad(option) {
  192. let obj = {}
  193. // #ifdef MP-WEIXIN
  194. obj = wx.getMenuButtonBoundingClientRect()
  195. // #endif
  196. // #ifdef MP-BAIDU
  197. obj = swan.getMenuButtonBoundingClientRect()
  198. // #endif
  199. // #ifdef MP-ALIPAY
  200. my.hideAddToDesktopMenu()
  201. // #endif
  202. uni.getSystemInfo({
  203. success: res => {
  204. this.width = obj.left || res.windowWidth
  205. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
  206. this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
  207. this.scrollH = res.windowWidth * 0.6
  208. }
  209. })
  210. this.orderId = option.orderId
  211. this.getOrderReceiptOrdersInfo(this.orderId)
  212. },
  213. computed: {
  214. ...mapState(['hasLogin'])
  215. },
  216. methods: {
  217. getOrderReceiptOrdersInfo(orderId) {
  218. // 收款详情
  219. this.OrderService.orderReceiptOrdersInfo({ orderId: orderId })
  220. .then(response => {
  221. this.order = response.data
  222. this.skeletonShow = false
  223. })
  224. .catch(err => {
  225. this.$util.msg(err.msg, 2000)
  226. })
  227. },
  228. toNoSms(url) {
  229. this.$api.navigateTo(url)
  230. },
  231. formatColor(state) {
  232. //设置邀请码状态亚瑟
  233. let stateColor = '',
  234. stateColorObject = {
  235. 1: '#ff7900',
  236. 2: '#4cd964',
  237. 3: '#19be6b',
  238. 4: '#ed3f14',
  239. 5: '#F74D54'
  240. }
  241. Object.keys(stateColorObject).forEach(function(key) {
  242. if (key == state) {
  243. stateColor = stateColorObject[key]
  244. }
  245. })
  246. return stateColor
  247. },
  248. },
  249. onPageScroll(e) {
  250. //实时获取到滚动的值
  251. // if (e.scrollTop > 30) {
  252. // this.isCmcustomClass = 'fiexd'
  253. // } else {
  254. // this.isCmcustomClass = 'left'
  255. // }
  256. },
  257. onPullDownRefresh() {
  258. setTimeout(() => {
  259. this.getOrderReceiptOrdersInfo(this.orderId)
  260. uni.stopPullDownRefresh()
  261. }, 200)
  262. },
  263. onShow() {}
  264. }
  265. </script>
  266. <style lang="scss">
  267. @import '@/uni.scss';
  268. page {
  269. background: #fff;
  270. }
  271. .tui-header-box {
  272. width: 100%;
  273. background: #ffffff;
  274. z-index: 999;
  275. background-size: cover;
  276. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  277. &.fiexd {
  278. position: fixed;
  279. top: 0;
  280. left: 0;
  281. }
  282. }
  283. .header-top {
  284. width: 100%;
  285. font-size: 16px;
  286. font-weight: 500;
  287. height: 32px;
  288. display: flex;
  289. align-items: center;
  290. justify-content: center;
  291. position: relative;
  292. padding: 0 40rpx;
  293. }
  294. .header-sit {
  295. width: 100%;
  296. box-sizing: border-box;
  297. height: 80rpx;
  298. line-height: 80rpx;
  299. box-sizing: border-box;
  300. color: #ffffff;
  301. .header-sit-text {
  302. text-align: left;
  303. font-size: $font-size-40;
  304. font-weight: 600;
  305. font-family: '正楷';
  306. }
  307. .icon-fanhui {
  308. display: block;
  309. width: 80rpx;
  310. height: 80rpx;
  311. float: left;
  312. text-align: center;
  313. line-height: 80rpx;
  314. font-size: 42rpx;
  315. }
  316. }
  317. .mine {
  318. width: 100%;
  319. height: 100%;
  320. position: relative;
  321. }
  322. .distinguish-section {
  323. width: 100%;
  324. position: absolute;
  325. padding: 40rpx 20rpx;
  326. box-sizing: border-box;
  327. }
  328. .distinguish-section-conten {
  329. width: 100%;
  330. height: auto;
  331. position: relative;
  332. background-color: #ffffff;
  333. border-radius: 20rpx;
  334. padding: 20rpx;
  335. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  336. .section-top {
  337. width: 100%;
  338. height: 66rpx;
  339. box-sizing: border-box;
  340. .section-badges {
  341. float: left;
  342. height: 66rpx;
  343. padding: 13rpx 0;
  344. .list-title-tip {
  345. float: left;
  346. .badges {
  347. display: block;
  348. float: left;
  349. padding: 0 15rpx;
  350. height: 40rpx;
  351. line-height: 40rpx;
  352. border-radius: 20rpx;
  353. background: rgba(248, 204, 148, 0.5);
  354. font-size: $font-size-24;
  355. text-align: center;
  356. color: #666666;
  357. }
  358. }
  359. .list-title-tag {
  360. float: left;
  361. margin-left: 20rpx;
  362. .badges {
  363. display: block;
  364. float: left;
  365. padding: 0 15rpx;
  366. height: 40rpx;
  367. line-height: 40rpx;
  368. border-radius: 20rpx;
  369. background: linear-gradient(270deg, #fee9ba 0%, #f0cb72 100%);
  370. font-size: $font-size-24;
  371. text-align: center;
  372. color: #666666;
  373. }
  374. }
  375. .list-title-num {
  376. float: left;
  377. text-align: left;
  378. color: #e15616;
  379. line-height: 40rpx;
  380. margin-left: 20rpx;
  381. }
  382. }
  383. .button {
  384. float: right;
  385. box-sizing: border-box;
  386. padding: 0 24rpx;
  387. height: 100%;
  388. line-height: 66rpx;
  389. background: $btn-confirm;
  390. border-radius: 8rpx;
  391. text-align: center;
  392. color: #ffffff;
  393. }
  394. }
  395. .section-mid {
  396. width: 100%;
  397. height: auto;
  398. display: flex;
  399. flex-direction: column;
  400. padding: 15rpx 0;
  401. position: relative;
  402. border-radius: 0 0 20rpx 20rpx;
  403. &.supper {
  404. padding: 0;
  405. .list-goods {
  406. width: 100%;
  407. height: auto;
  408. margin-top: 20rpx;
  409. .list-goods-item {
  410. width: 100%;
  411. height: 180rpx;
  412. float: left;
  413. margin-bottom: 20rpx;
  414. .list-goods-image {
  415. width: 180rpx;
  416. height: 180rpx;
  417. border-radius: 8rpx;
  418. float: left;
  419. position: relative;
  420. border: 1px solid #E1E1E1;
  421. .list-image {
  422. width: 100%;
  423. height: 100%;
  424. border-radius: 8rpx;
  425. display: block;
  426. }
  427. .list-tags {
  428. padding: 0 15rpx;
  429. height: 40rpx;
  430. text-align: center;
  431. line-height: 40rpx;
  432. font-size: 22rpx;
  433. border-radius: 8rpx 20rpx 0 20rpx;
  434. color: #ffffff;
  435. background-color: #dd524d;
  436. position: absolute;
  437. top: 0;
  438. left: 0;
  439. }
  440. }
  441. .list-goods-mains {
  442. width: 480rpx;
  443. height: 100%;
  444. float: left;
  445. padding: 10rpx 0;
  446. padding-left: 24rpx;
  447. .list-name {
  448. width: 100%;
  449. line-height: 40rpx;
  450. font-size: $font-size-24;
  451. color: #333333;
  452. text-align: left;
  453. text-overflow: ellipsis;
  454. overflow: hidden;
  455. display: -webkit-box;
  456. -webkit-line-clamp: 2;
  457. line-clamp: 2;
  458. -webkit-box-orient: vertical;
  459. }
  460. .list-text {
  461. width: 100%;
  462. height: 40rpx;
  463. float: left;
  464. font-size: $font-size-24;
  465. line-height: 40rpx;
  466. color: #999999;
  467. text-align: left;
  468. .list-text-item {
  469. width: 50%;
  470. height: 100%;
  471. float: left;
  472. }
  473. }
  474. }
  475. }
  476. }
  477. }
  478. .list-title {
  479. width: 100%;
  480. height: auto;
  481. &.supper {
  482. background-color: #f7f7f7;
  483. padding:10rpx;
  484. }
  485. .list-title-b {
  486. width: 100%;
  487. height: 50rpx;
  488. float: left;
  489. font-size: $font-size-24;
  490. line-height: 50rpx;
  491. color: #666666;
  492. text-align: left;
  493. .text {
  494. color: #999999;
  495. }
  496. .list-title-b-item {
  497. width: 50%;
  498. height: 100%;
  499. float: left;
  500. }
  501. }
  502. }
  503. }
  504. }
  505. </style>