detail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  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 - 14 + '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 }}</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. j.discountFee - j.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>
  99. </view>
  100. <view class="section-mid supper">
  101. <view v-for="(shop, index) in order.shopOrderList" :key="index">
  102. <view class="list-title supper">
  103. <view class="list-title-b">
  104. 子订单号(标识):<text class="text">{{ shop.orderNo }} ( {{ shop.shopOrderId }} )</text>
  105. </view>
  106. <view class="list-title-b">
  107. 供应商:<text class="text">{{ shop.shopName }}</text>
  108. </view>
  109. <view class="list-title-b">
  110. 订单金额:<text class="text">¥{{ shop.needPayAmount | NumFormat }}</text>
  111. </view>
  112. </view>
  113. <view class="list-goods">
  114. <view
  115. class="list-goods-item"
  116. v-for="(product, pIndex) in shop.orderProductList"
  117. :key="pIndex"
  118. >
  119. <view class="list-goods-image">
  120. <image class="list-image" :src="product.image" mode=""></image>
  121. <view class="list-tags" v-if="product.productType == 1">赠品</view>
  122. </view>
  123. <view class="list-goods-mains">
  124. <view class="list-name">{{ product.name }}</view>
  125. <view class="list-text">
  126. <view class="list-text-item"
  127. >单价:¥{{
  128. product.productType == 1 ? '0.00' : product.discountPrice | NumFormat
  129. }}</view
  130. >
  131. <view class="list-text-item">数量:{{ product.num }}</view>
  132. </view>
  133. <view class="list-text"
  134. >合计:¥{{
  135. product.productType == 1 ? '0.00' : product.totalFee | NumFormat
  136. }}</view
  137. >
  138. </view>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. <!-- 弹窗提示 -->
  146. <tui-modal
  147. :show="modal"
  148. @click="handleClick"
  149. @cancel="hideMobel"
  150. :title="contentModalTitle"
  151. :content="contentModalText"
  152. :button="modalButton"
  153. color="#333"
  154. :size="32"
  155. shape="circle"
  156. :maskClosable="false"
  157. >
  158. </tui-modal>
  159. </view>
  160. </template>
  161. <script>
  162. import wxLogin from '@/services/wxLogin.js'
  163. import { mapState, mapMutations } from 'vuex'
  164. export default {
  165. data() {
  166. return {
  167. isIphoneX: this.$store.state.isIphoneX,
  168. CustomBar: this.CustomBar, // 顶部导航栏高度
  169. height: 64, //header高度
  170. top: 0, //标题图标距离顶部距离
  171. scrollH: 0, //滚动总高度
  172. opcity: 1,
  173. isCmcustomClass: 'left',
  174. nvabarData: {
  175. //顶部自定义导航
  176. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  177. showSearch: 0,
  178. title: '', // 导航栏 中间的标题
  179. haveBack: false,
  180. home: false,
  181. textLeft: this.$store.state.isIphone,
  182. bgColor: '#D33020',
  183. textColor: '#ffffff'
  184. },
  185. order: {},
  186. orderId: 0
  187. }
  188. },
  189. onLoad(option) {
  190. let obj = {}
  191. // #ifdef MP-WEIXIN
  192. obj = wx.getMenuButtonBoundingClientRect()
  193. // #endif
  194. // #ifdef MP-BAIDU
  195. obj = swan.getMenuButtonBoundingClientRect()
  196. // #endif
  197. // #ifdef MP-ALIPAY
  198. my.hideAddToDesktopMenu()
  199. // #endif
  200. uni.getSystemInfo({
  201. success: res => {
  202. this.width = obj.left || res.windowWidth
  203. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
  204. this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
  205. this.scrollH = res.windowWidth * 0.6
  206. }
  207. })
  208. this.orderId = option.orderId
  209. this.getOrderReceiptOrdersInfo(this.orderId)
  210. },
  211. computed: {
  212. ...mapState(['hasLogin'])
  213. },
  214. methods: {
  215. getOrderReceiptOrdersInfo(orderId) {
  216. // 收款详情
  217. this.OrderService.orderReceiptOrdersInfo({ orderId: orderId })
  218. .then(response => {
  219. this.order = response.data
  220. this.skeletonShow = false
  221. })
  222. .catch(err => {
  223. this.$util.msg(err.msg, 2000)
  224. })
  225. },
  226. toNoSms(url) {
  227. this.$api.navigateTo(url)
  228. },
  229. formatColor(state) {
  230. //设置颜色
  231. let stateColor = '',
  232. stateColorObject = {
  233. 1: '#FEAC20',
  234. 2: '#4cd964',
  235. 3: '#34CC8C',
  236. 4: '#F94B4B',
  237. 5: '#007aff'
  238. }
  239. Object.keys(stateColorObject).forEach(function(key) {
  240. if (key == state) {
  241. stateColor = stateColorObject[key]
  242. }
  243. })
  244. return stateColor
  245. },
  246. },
  247. onPageScroll(e) {
  248. //实时获取到滚动的值
  249. // if (e.scrollTop > 30) {
  250. // this.isCmcustomClass = 'fiexd'
  251. // } else {
  252. // this.isCmcustomClass = 'left'
  253. // }
  254. },
  255. onPullDownRefresh() {
  256. setTimeout(() => {
  257. this.getOrderReceiptOrdersInfo(this.orderId)
  258. uni.stopPullDownRefresh()
  259. }, 200)
  260. },
  261. onShow() {}
  262. }
  263. </script>
  264. <style lang="scss">
  265. @import '@/uni.scss';
  266. page {
  267. background: #fff;
  268. }
  269. .tui-header-box {
  270. width: 100%;
  271. background: #ffffff;
  272. z-index: 999;
  273. background-size: cover;
  274. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  275. &.fiexd {
  276. position: fixed;
  277. top: 0;
  278. left: 0;
  279. }
  280. }
  281. .header-top {
  282. width: 100%;
  283. font-size: 16px;
  284. font-weight: 500;
  285. height: 32px;
  286. display: flex;
  287. align-items: center;
  288. justify-content: center;
  289. position: relative;
  290. padding: 0 40rpx;
  291. }
  292. .header-sit {
  293. width: 100%;
  294. box-sizing: border-box;
  295. height: 80rpx;
  296. line-height: 80rpx;
  297. box-sizing: border-box;
  298. color: #ffffff;
  299. .header-sit-text {
  300. text-align: left;
  301. font-size: $font-size-40;
  302. font-weight: 600;
  303. font-family: '正楷';
  304. }
  305. .icon-fanhui {
  306. display: block;
  307. width: 80rpx;
  308. height: 80rpx;
  309. float: left;
  310. text-align: center;
  311. line-height: 80rpx;
  312. font-size: 42rpx;
  313. }
  314. .icon-iconfonticonfontsousuo1 {
  315. font-size: 42rpx;
  316. margin-left: 30rpx;
  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: 40rpx;
  353. line-height: 40rpx;
  354. border-radius: 20rpx;
  355. background: rgba(248, 204, 148, 0.5);
  356. font-size: $font-size-24;
  357. text-align: center;
  358. color: #666666;
  359. }
  360. }
  361. .list-title-tag {
  362. float: left;
  363. margin-left: 20rpx;
  364. .badges {
  365. display: block;
  366. float: left;
  367. padding: 0 15rpx;
  368. height: 40rpx;
  369. line-height: 40rpx;
  370. border-radius: 20rpx;
  371. background: linear-gradient(270deg, #fee9ba 0%, #f0cb72 100%);
  372. font-size: $font-size-24;
  373. text-align: center;
  374. color: #666666;
  375. }
  376. }
  377. .list-title-num {
  378. float: left;
  379. text-align: left;
  380. color: #e15616;
  381. line-height: 40rpx;
  382. margin-left: 20rpx;
  383. }
  384. }
  385. .button {
  386. float: right;
  387. box-sizing: border-box;
  388. padding: 0 24rpx;
  389. height: 100%;
  390. line-height: 66rpx;
  391. background: $btn-confirm;
  392. border-radius: 8rpx;
  393. text-align: center;
  394. color: #ffffff;
  395. }
  396. }
  397. .section-mid {
  398. width: 100%;
  399. height: auto;
  400. display: flex;
  401. flex-direction: column;
  402. padding: 15rpx 0;
  403. position: relative;
  404. border-radius: 0 0 20rpx 20rpx;
  405. &.supper {
  406. padding: 0;
  407. .list-goods {
  408. width: 100%;
  409. height: auto;
  410. margin-top: 20rpx;
  411. .list-goods-item {
  412. width: 100%;
  413. height: 180rpx;
  414. margin-bottom: 20rpx;
  415. .list-goods-image {
  416. width: 180rpx;
  417. height: 180rpx;
  418. border-radius: 8rpx;
  419. float: left;
  420. position: relative;
  421. border: 1px solid #E1E1E1;
  422. .list-image {
  423. width: 100%;
  424. height: 100%;
  425. border-radius: 8rpx;
  426. display: block;
  427. }
  428. .list-tags {
  429. padding: 0 15rpx;
  430. height: 40rpx;
  431. text-align: center;
  432. line-height: 40rpx;
  433. font-size: 22rpx;
  434. border-radius: 8rpx 20rpx 0 20rpx;
  435. color: #ffffff;
  436. background-color: #dd524d;
  437. position: absolute;
  438. top: 0;
  439. left: 0;
  440. }
  441. }
  442. .list-goods-mains {
  443. width: 480rpx;
  444. height: 100%;
  445. float: left;
  446. padding: 10rpx 0;
  447. padding-left: 24rpx;
  448. .list-name {
  449. width: 100%;
  450. line-height: 40rpx;
  451. font-size: $font-size-24;
  452. color: #333333;
  453. text-align: left;
  454. text-overflow: ellipsis;
  455. overflow: hidden;
  456. display: -webkit-box;
  457. -webkit-line-clamp: 2;
  458. line-clamp: 2;
  459. -webkit-box-orient: vertical;
  460. }
  461. .list-text {
  462. width: 100%;
  463. height: 40rpx;
  464. float: left;
  465. font-size: $font-size-24;
  466. line-height: 40rpx;
  467. color: #999999;
  468. text-align: left;
  469. .list-text-item {
  470. width: 50%;
  471. height: 100%;
  472. float: left;
  473. }
  474. }
  475. }
  476. }
  477. }
  478. }
  479. .list-title {
  480. width: 100%;
  481. height: auto;
  482. &.supper {
  483. background-color: #f7f7f7;
  484. padding: 0 10rpx;
  485. }
  486. .list-title-b {
  487. width: 100%;
  488. height: 50rpx;
  489. float: left;
  490. font-size: $font-size-24;
  491. line-height: 50rpx;
  492. color: #666666;
  493. text-align: left;
  494. .text {
  495. color: #999999;
  496. }
  497. .list-title-b-item {
  498. width: 50%;
  499. height: 100%;
  500. float: left;
  501. }
  502. }
  503. }
  504. }
  505. }
  506. </style>