detail.vue 13 KB

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