detail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  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 wxLogin from '@/services/wxLogin.js'
  166. import { mapState, mapMutations } from 'vuex'
  167. export default {
  168. data() {
  169. return {
  170. isIphoneX: this.$store.state.isIphoneX,
  171. CustomBar: this.CustomBar, // 顶部导航栏高度
  172. height: 64, //header高度
  173. top: 0, //标题图标距离顶部距离
  174. scrollH: 0, //滚动总高度
  175. opcity: 1,
  176. isCmcustomClass: 'left',
  177. nvabarData: {
  178. //顶部自定义导航
  179. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  180. showSearch: 0,
  181. title: '', // 导航栏 中间的标题
  182. haveBack: false,
  183. home: false,
  184. textLeft: this.$store.state.isIphone,
  185. bgColor: '#D33020',
  186. textColor: '#ffffff'
  187. },
  188. order: {},
  189. orderId: 0
  190. }
  191. },
  192. onLoad(option) {
  193. let obj = {}
  194. // #ifdef MP-WEIXIN
  195. obj = wx.getMenuButtonBoundingClientRect()
  196. // #endif
  197. // #ifdef MP-BAIDU
  198. obj = swan.getMenuButtonBoundingClientRect()
  199. // #endif
  200. // #ifdef MP-ALIPAY
  201. my.hideAddToDesktopMenu()
  202. // #endif
  203. uni.getSystemInfo({
  204. success: res => {
  205. this.width = obj.left || res.windowWidth
  206. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
  207. this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
  208. this.scrollH = res.windowWidth * 0.6
  209. }
  210. })
  211. this.orderId = option.orderId
  212. this.getOrderReceiptOrdersInfo(this.orderId)
  213. },
  214. computed: {
  215. ...mapState(['hasLogin'])
  216. },
  217. methods: {
  218. getOrderReceiptOrdersInfo(orderId) {
  219. // 收款详情
  220. this.OrderService.orderReceiptOrdersInfo({ orderId: orderId })
  221. .then(response => {
  222. this.order = response.data
  223. this.skeletonShow = false
  224. })
  225. .catch(err => {
  226. this.$util.msg(err.msg, 2000)
  227. })
  228. },
  229. toNoSms(url) {
  230. this.$api.navigateTo(url)
  231. },
  232. formatColor(state) {
  233. //设置颜色
  234. let stateColor = '',
  235. stateColorObject = {
  236. 1: '#FEAC20',
  237. 2: '#4cd964',
  238. 3: '#34CC8C',
  239. 4: '#F94B4B',
  240. 5: '#007aff'
  241. }
  242. Object.keys(stateColorObject).forEach(function(key) {
  243. if (key == state) {
  244. stateColor = stateColorObject[key]
  245. }
  246. })
  247. return stateColor
  248. },
  249. },
  250. onPageScroll(e) {
  251. //实时获取到滚动的值
  252. // if (e.scrollTop > 30) {
  253. // this.isCmcustomClass = 'fiexd'
  254. // } else {
  255. // this.isCmcustomClass = 'left'
  256. // }
  257. },
  258. onPullDownRefresh() {
  259. setTimeout(() => {
  260. this.getOrderReceiptOrdersInfo(this.orderId)
  261. uni.stopPullDownRefresh()
  262. }, 200)
  263. },
  264. onShow() {}
  265. }
  266. </script>
  267. <style lang="scss">
  268. @import '@/uni.scss';
  269. page {
  270. background: #fff;
  271. }
  272. .tui-header-box {
  273. width: 100%;
  274. background: #ffffff;
  275. z-index: 999;
  276. background-size: cover;
  277. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  278. &.fiexd {
  279. position: fixed;
  280. top: 0;
  281. left: 0;
  282. }
  283. }
  284. .header-top {
  285. width: 100%;
  286. font-size: 16px;
  287. font-weight: 500;
  288. height: 32px;
  289. display: flex;
  290. align-items: center;
  291. justify-content: center;
  292. position: relative;
  293. padding: 0 40rpx;
  294. }
  295. .header-sit {
  296. width: 100%;
  297. box-sizing: border-box;
  298. height: 80rpx;
  299. line-height: 80rpx;
  300. box-sizing: border-box;
  301. color: #ffffff;
  302. .header-sit-text {
  303. text-align: left;
  304. font-size: $font-size-40;
  305. font-weight: 600;
  306. font-family: '正楷';
  307. }
  308. .icon-fanhui {
  309. display: block;
  310. width: 80rpx;
  311. height: 80rpx;
  312. float: left;
  313. text-align: center;
  314. line-height: 80rpx;
  315. font-size: 42rpx;
  316. }
  317. .icon-iconfonticonfontsousuo1 {
  318. font-size: 42rpx;
  319. margin-left: 30rpx;
  320. }
  321. }
  322. .mine {
  323. width: 100%;
  324. height: 100%;
  325. position: relative;
  326. }
  327. .distinguish-section {
  328. width: 100%;
  329. position: absolute;
  330. padding: 40rpx 20rpx;
  331. box-sizing: border-box;
  332. }
  333. .distinguish-section-conten {
  334. width: 100%;
  335. height: auto;
  336. position: relative;
  337. background-color: #ffffff;
  338. border-radius: 20rpx;
  339. padding: 20rpx;
  340. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  341. .section-top {
  342. width: 100%;
  343. height: 66rpx;
  344. box-sizing: border-box;
  345. .section-badges {
  346. float: left;
  347. height: 66rpx;
  348. padding: 13rpx 0;
  349. .list-title-tip {
  350. float: left;
  351. .badges {
  352. display: block;
  353. float: left;
  354. padding: 0 15rpx;
  355. height: 40rpx;
  356. line-height: 40rpx;
  357. border-radius: 20rpx;
  358. background: rgba(248, 204, 148, 0.5);
  359. font-size: $font-size-24;
  360. text-align: center;
  361. color: #666666;
  362. }
  363. }
  364. .list-title-tag {
  365. float: left;
  366. margin-left: 20rpx;
  367. .badges {
  368. display: block;
  369. float: left;
  370. padding: 0 15rpx;
  371. height: 40rpx;
  372. line-height: 40rpx;
  373. border-radius: 20rpx;
  374. background: linear-gradient(270deg, #fee9ba 0%, #f0cb72 100%);
  375. font-size: $font-size-24;
  376. text-align: center;
  377. color: #666666;
  378. }
  379. }
  380. .list-title-num {
  381. float: left;
  382. text-align: left;
  383. color: #e15616;
  384. line-height: 40rpx;
  385. margin-left: 20rpx;
  386. }
  387. }
  388. .button {
  389. float: right;
  390. box-sizing: border-box;
  391. padding: 0 24rpx;
  392. height: 100%;
  393. line-height: 66rpx;
  394. background: $btn-confirm;
  395. border-radius: 8rpx;
  396. text-align: center;
  397. color: #ffffff;
  398. }
  399. }
  400. .section-mid {
  401. width: 100%;
  402. height: auto;
  403. display: flex;
  404. flex-direction: column;
  405. padding: 15rpx 0;
  406. position: relative;
  407. border-radius: 0 0 20rpx 20rpx;
  408. &.supper {
  409. padding: 0;
  410. .list-goods {
  411. width: 100%;
  412. height: auto;
  413. margin-top: 20rpx;
  414. .list-goods-item {
  415. width: 100%;
  416. height: 180rpx;
  417. float: left;
  418. margin-bottom: 20rpx;
  419. .list-goods-image {
  420. width: 180rpx;
  421. height: 180rpx;
  422. border-radius: 8rpx;
  423. float: left;
  424. position: relative;
  425. border: 1px solid #E1E1E1;
  426. .list-image {
  427. width: 100%;
  428. height: 100%;
  429. border-radius: 8rpx;
  430. display: block;
  431. }
  432. .list-tags {
  433. padding: 0 15rpx;
  434. height: 40rpx;
  435. text-align: center;
  436. line-height: 40rpx;
  437. font-size: 22rpx;
  438. border-radius: 8rpx 20rpx 0 20rpx;
  439. color: #ffffff;
  440. background-color: #dd524d;
  441. position: absolute;
  442. top: 0;
  443. left: 0;
  444. }
  445. }
  446. .list-goods-mains {
  447. width: 480rpx;
  448. height: 100%;
  449. float: left;
  450. padding: 10rpx 0;
  451. padding-left: 24rpx;
  452. .list-name {
  453. width: 100%;
  454. line-height: 40rpx;
  455. font-size: $font-size-24;
  456. color: #333333;
  457. text-align: left;
  458. text-overflow: ellipsis;
  459. overflow: hidden;
  460. display: -webkit-box;
  461. -webkit-line-clamp: 2;
  462. line-clamp: 2;
  463. -webkit-box-orient: vertical;
  464. }
  465. .list-text {
  466. width: 100%;
  467. height: 40rpx;
  468. float: left;
  469. font-size: $font-size-24;
  470. line-height: 40rpx;
  471. color: #999999;
  472. text-align: left;
  473. .list-text-item {
  474. width: 50%;
  475. height: 100%;
  476. float: left;
  477. }
  478. }
  479. }
  480. }
  481. }
  482. }
  483. .list-title {
  484. width: 100%;
  485. height: auto;
  486. &.supper {
  487. background-color: #f7f7f7;
  488. padding:10rpx;
  489. }
  490. .list-title-b {
  491. width: 100%;
  492. height: 50rpx;
  493. float: left;
  494. font-size: $font-size-24;
  495. line-height: 50rpx;
  496. color: #666666;
  497. text-align: left;
  498. .text {
  499. color: #999999;
  500. }
  501. .list-title-b-item {
  502. width: 50%;
  503. height: 100%;
  504. float: left;
  505. }
  506. }
  507. }
  508. }
  509. }
  510. </style>