detail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  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. />
  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
  36. class="badges"
  37. :class="{
  38. success: order.orderType === 1,
  39. warning: order.orderType === 0
  40. }"
  41. >{{ order.orderType | formatOrderType }}</text
  42. >
  43. </view>
  44. <view class="list-title-tag">
  45. <text class="badges">{{ order.organizeId | organizeName }}</text>
  46. </view>
  47. <view class="list-title-num">{{ order.status | stateExpFormat }}</view>
  48. </view>
  49. <view class="button" @click="toNoSms('/pages/collection/list')">
  50. <text class="iconfont icon-wodedingdan"></text> 收款列表
  51. </view>
  52. </view>
  53. <view class="section-mid">
  54. <view class="list-title">
  55. <view class="list-title-b">
  56. 客户名称:<text class="text">{{ order.userName ? order.userName : '无' }}</text>
  57. </view>
  58. <view class="list-title-b">
  59. 子订单编号:<text class="text">{{ order.shopOrderNo }} ( {{ order.shopOrderId }} )</text>
  60. </view>
  61. <view class="list-title-b">
  62. 下单日期:<text class="text">{{ order.orderTime }}</text>
  63. </view>
  64. <view class="list-title-b">
  65. <view class="list-title-b-item ">
  66. 子订单金额:<text class="text">¥{{ order.totalAmount | NumFormat }}</text>
  67. </view>
  68. <view class="list-title-b-item ">
  69. 余额抵扣:<text class="text">¥{{ order.accountAmount | NumFormat }}</text>
  70. </view>
  71. </view>
  72. <view class="list-title-b">
  73. <view class="list-title-b-item ">
  74. 应收金额:<text class="text">¥{{ order.realPay | NumFormat }}</text>
  75. </view>
  76. <view class="list-title-b-item ">
  77. 已收金额:<text class="text">¥{{ order.receiptAmount | NumFormat }}</text>
  78. </view>
  79. </view>
  80. <view class="list-title-b">
  81. <view class="list-title-b-item ">
  82. 剩余应收:<text class="text">¥{{ order.surplusAmount | NumFormat }}</text>
  83. </view>
  84. <view class="list-title-b-item ">
  85. 待审金额:<text class="text">¥{{ order.unCheckAmount | NumFormat }}</text>
  86. </view>
  87. </view>
  88. <view class="list-title-b">
  89. 经理折扣:
  90. <text class="text" v-if="order.discountFee - order.returnedPurchaseFee > 0">
  91. ¥{{ order.discountFee - order.returnedPurchaseFee }}
  92. <text class="text">
  93. (原¥{{ order.discountFee }} 折扣取消¥{{
  94. order.discountFee - order.returnedPurchaseFee > 0
  95. ? order.returnedPurchaseFee
  96. : order.discountFee
  97. }})
  98. </text>
  99. </text>
  100. <text class="text" v-else>¥0.00(原¥0.00折扣取消¥0.00)</text>
  101. </view>
  102. <view class="list-title-b" v-if="order.returnedPurchaseFee > 0">
  103. 退货退款:
  104. <text class="text">
  105. (原¥{{ order.returnedPurchaseFee }} 折扣取消¥{{
  106. order.discountFee - order.returnedPurchaseFee > 0
  107. ? order.returnedPurchaseFee
  108. : order.discountFee
  109. }})
  110. </text>
  111. </view>
  112. <view class="list-title-b" v-if="order.discountFee - order.returnedPurchaseFee > 0">
  113. <text class="text">说明:因退货,经理折扣收回,用于抵扣退款。</text>
  114. </view>
  115. </view>
  116. </view>
  117. <view class="section-mid supper clearfix">
  118. <view class="list-title supper clearfix">
  119. <view class="list-title-b">
  120. 供应商:<text class="text">{{ order.shopName }}</text>
  121. </view>
  122. </view>
  123. <view class="list-goods clearfix">
  124. <view class="list-goods-item" v-for="(product, pIndex) in order.orderProductList" :key="pIndex">
  125. <view class="list-goods-image">
  126. <image class="list-image" :src="product.image" mode=""></image>
  127. <view class="list-tags" v-if="product.giftType == 1">赠品</view>
  128. </view>
  129. <view class="list-goods-mains">
  130. <view class="list-name">{{ product.name }}</view>
  131. <view class="list-text">
  132. <view class="list-text-item"
  133. >单价:¥{{
  134. product.giftType == 1 ? '0.00' : product.discountPrice | NumFormat
  135. }}</view
  136. >
  137. <view class="list-text-item">数量:{{ product.num }}</view>
  138. </view>
  139. <view class="list-text"
  140. >合计:¥{{ product.giftType == 1 ? '0.00' : product.totalFee | NumFormat }}</view
  141. >
  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. </view>
  162. </template>
  163. <script>
  164. import { mapState, mapMutations } from 'vuex'
  165. export default {
  166. data() {
  167. return {
  168. isIphoneX: this.$store.state.isIphoneX,
  169. CustomBar: this.CustomBar, // 顶部导航栏高度
  170. height: 64, //header高度
  171. top: 0, //标题图标距离顶部距离
  172. scrollH: 0, //滚动总高度
  173. opcity: 1,
  174. isCmcustomClass: 'left',
  175. skeletonShow: true,
  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. shopOrderId: 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.shopOrderId = option.shopOrderId
  211. this.getOrderReceiptOrdersInfo(this.shopOrderId)
  212. },
  213. computed: {
  214. ...mapState(['hasLogin'])
  215. },
  216. methods: {
  217. getOrderReceiptOrdersInfo(shopOrderId) {
  218. // 收款详情
  219. this.OrderService.orderReceiptOrdersInfo({ shopOrderId: shopOrderId })
  220. .then(response => {
  221. this.order = response.data
  222. setTimeout(() => {
  223. this.skeletonShow = false
  224. }, 1000)
  225. })
  226. .catch(err => {
  227. this.$util.msg(err.msg, 2000)
  228. })
  229. },
  230. toNoSms(url) {
  231. this.$api.navigateTo(url)
  232. },
  233. formatColor(state) {
  234. //设置邀请码状态亚瑟
  235. let stateColor = '',
  236. stateColorObject = {
  237. 1: '#ff7900',
  238. 2: '#4cd964',
  239. 3: '#19be6b',
  240. 4: '#ed3f14',
  241. 5: '#F74D54'
  242. }
  243. Object.keys(stateColorObject).forEach(function(key) {
  244. if (key == state) {
  245. stateColor = stateColorObject[key]
  246. }
  247. })
  248. return stateColor
  249. }
  250. },
  251. onPageScroll(e) {
  252. //实时获取到滚动的值
  253. // if (e.scrollTop > 30) {
  254. // this.isCmcustomClass = 'fiexd'
  255. // } else {
  256. // this.isCmcustomClass = 'left'
  257. // }
  258. },
  259. onPullDownRefresh() {
  260. setTimeout(() => {
  261. this.getOrderReceiptOrdersInfo(this.shopOrderId)
  262. uni.stopPullDownRefresh()
  263. }, 200)
  264. },
  265. onShow() {}
  266. }
  267. </script>
  268. <style lang="scss">
  269. @import '@/uni.scss';
  270. page {
  271. background: #fff;
  272. }
  273. .tui-header-box {
  274. width: 100%;
  275. background: #ffffff;
  276. z-index: 999;
  277. background-size: cover;
  278. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  279. &.fiexd {
  280. position: fixed;
  281. top: 0;
  282. left: 0;
  283. }
  284. }
  285. .header-top {
  286. width: 100%;
  287. font-size: 16px;
  288. font-weight: 500;
  289. height: 32px;
  290. display: flex;
  291. align-items: center;
  292. justify-content: center;
  293. position: relative;
  294. padding: 0 40rpx;
  295. }
  296. .header-sit {
  297. width: 100%;
  298. box-sizing: border-box;
  299. height: 80rpx;
  300. line-height: 80rpx;
  301. box-sizing: border-box;
  302. color: #ffffff;
  303. .header-sit-text {
  304. text-align: left;
  305. font-size: $font-size-40;
  306. font-weight: 600;
  307. font-family: '正楷';
  308. }
  309. .icon-fanhui {
  310. display: block;
  311. width: 80rpx;
  312. height: 80rpx;
  313. float: left;
  314. text-align: center;
  315. line-height: 80rpx;
  316. font-size: 42rpx;
  317. }
  318. }
  319. .mine {
  320. width: 100%;
  321. height: 100%;
  322. position: relative;
  323. }
  324. .distinguish-section {
  325. width: 100%;
  326. position: absolute;
  327. padding: 40rpx 20rpx;
  328. box-sizing: border-box;
  329. }
  330. .distinguish-section-conten {
  331. width: 100%;
  332. height: auto;
  333. position: relative;
  334. background-color: #ffffff;
  335. border-radius: 20rpx;
  336. padding: 20rpx;
  337. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  338. .section-top {
  339. width: 100%;
  340. height: 66rpx;
  341. box-sizing: border-box;
  342. .section-badges {
  343. float: left;
  344. height: 66rpx;
  345. padding: 13rpx 0;
  346. .list-title-tip {
  347. float: left;
  348. .badges {
  349. display: block;
  350. float: left;
  351. padding: 0 15rpx;
  352. height: 36rpx;
  353. line-height: 36rpx;
  354. border-radius: 20rpx;
  355. font-size: $font-size-22;
  356. background-color: #f0f9eb;
  357. color: #67c23a;
  358. text-align: center;
  359. &.success {
  360. background-color: #ecf5ff;
  361. color: #409eff;
  362. }
  363. &.warning {
  364. background-color: #fdf6ec;
  365. color: #e6a23c;
  366. }
  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: 36rpx;
  377. line-height: 36rpx;
  378. border-radius: 20rpx;
  379. font-size: $font-size-22;
  380. text-align: center;
  381. background-color: #ecf5ff;
  382. color: #409eff;
  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. font-size: $font-size-24;
  392. }
  393. }
  394. .button {
  395. float: right;
  396. box-sizing: border-box;
  397. padding: 0 24rpx;
  398. height: 100%;
  399. line-height: 66rpx;
  400. background: $btn-confirm;
  401. border-radius: 35rpx;
  402. text-align: center;
  403. color: #ffffff;
  404. }
  405. }
  406. .section-mid {
  407. width: 100%;
  408. height: auto;
  409. display: flex;
  410. flex-direction: column;
  411. padding: 15rpx 0;
  412. position: relative;
  413. border-radius: 0 0 20rpx 20rpx;
  414. &.supper {
  415. padding: 0;
  416. .list-goods {
  417. width: 100%;
  418. height: auto;
  419. margin-top: 20rpx;
  420. .list-goods-item {
  421. width: 100%;
  422. height: 180rpx;
  423. float: left;
  424. margin-bottom: 20rpx;
  425. .list-goods-image {
  426. width: 180rpx;
  427. height: 180rpx;
  428. border-radius: 8rpx;
  429. float: left;
  430. position: relative;
  431. border: 1px solid #e1e1e1;
  432. .list-image {
  433. width: 100%;
  434. height: 100%;
  435. border-radius: 8rpx;
  436. display: block;
  437. }
  438. .list-tags {
  439. padding: 0 15rpx;
  440. height: 40rpx;
  441. text-align: center;
  442. line-height: 40rpx;
  443. font-size: 22rpx;
  444. border-radius: 8rpx 20rpx 0 20rpx;
  445. color: #ffffff;
  446. background-color: #dd524d;
  447. position: absolute;
  448. top: 0;
  449. left: 0;
  450. }
  451. }
  452. .list-goods-mains {
  453. width: 480rpx;
  454. height: 100%;
  455. float: left;
  456. padding: 10rpx 0;
  457. padding-left: 24rpx;
  458. .list-name {
  459. width: 100%;
  460. line-height: 40rpx;
  461. font-size: $font-size-24;
  462. color: #333333;
  463. text-align: left;
  464. text-overflow: ellipsis;
  465. overflow: hidden;
  466. display: -webkit-box;
  467. -webkit-line-clamp: 2;
  468. line-clamp: 2;
  469. -webkit-box-orient: vertical;
  470. }
  471. .list-text {
  472. width: 100%;
  473. height: 40rpx;
  474. float: left;
  475. font-size: $font-size-24;
  476. line-height: 40rpx;
  477. color: #999999;
  478. text-align: left;
  479. .list-text-item {
  480. width: 50%;
  481. height: 100%;
  482. float: left;
  483. }
  484. }
  485. }
  486. }
  487. }
  488. }
  489. .list-title {
  490. width: 100%;
  491. height: auto;
  492. &.supper {
  493. background-color: #f7f7f7;
  494. box-sizing: border-box;
  495. padding: 10rpx 24rpx;
  496. border-radius: 8rpx;
  497. }
  498. .list-title-b {
  499. width: 100%;
  500. height: 50rpx;
  501. float: left;
  502. font-size: $font-size-24;
  503. line-height: 50rpx;
  504. color: #666666;
  505. text-align: left;
  506. .text {
  507. color: #999999;
  508. }
  509. .list-title-b-item {
  510. width: 50%;
  511. height: 100%;
  512. float: left;
  513. }
  514. }
  515. }
  516. }
  517. }
  518. </style>