detail.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  1. <template>
  2. <view class="container mine clearfix">
  3. <!-- <cu-custom :navbar-data='nvabarData' @navigateBack="hanldNavigateBack"></cu-custom> -->
  4. <view class="tui-header-box first"
  5. :style="{ height: isCmcustomClass == 'fiexd' ? CustomBar + 10 + 'px' : CustomBar + 30 + 'px' }"
  6. :class="isCmcustomClass">
  7. <view class="header-top" :style="{ paddingTop: top + 'px', lineHeight: CustomBar + 30 + 'px' }"></view>
  8. <view class="header-sit">
  9. <text class="iconfont icon-fanhui" @click.stop="this.$api.navigateBack(1)"></text>
  10. <text class="header-sit-text">子订单详情</text>
  11. </view>
  12. </view>
  13. <view class="tui-header-box"
  14. :style="{ height: CustomBar + 30 + 'px', backgroundImage: 'url(https://static.caimei365.com/app/crm/image/statistic_bg1.png)' }">
  15. </view>
  16. <view class="distinguish-section" :style="{ top: CustomBar - 14 + 'px', left: 0 + 'px' }">
  17. <view class="distinguish-section-conten">
  18. <view class="section-top">
  19. <view class="section-badges">
  20. <view class="list-title-tip">
  21. <text class="badges">{{ payment.orderType | formatOrderType }}</text>
  22. </view>
  23. <view class="list-title-num">{{ payment.confirmType | StateExpFormat }}</view>
  24. </view>
  25. <view class="button" @click="toNoSms('/pages/collection/list')">
  26. <text class="iconfont icon-wodedingdan"></text>
  27. 收款列表
  28. </view>
  29. </view>
  30. <view class="section-mid">
  31. <view class="list-title">
  32. <view class="list-title-b">订单编号:{{ payment.number }} ( {{ payment.id }} )</view>
  33. <view class="list-title-b">下单日期:{{ payment.receiptDate }}</view>
  34. <view class="list-title-b">客户名称:{{ payment.userName }}</view>
  35. <view class="list-title-b">
  36. <view class="list-title-b-item ">
  37. 订单金额:¥{{ payment.receiptAmount | NumFormat }}
  38. </view>
  39. <view class="list-title-b-item ">
  40. 余额抵扣:¥{{ payment.receiptAmount | NumFormat }}
  41. </view>
  42. </view>
  43. <view class="list-title-b">
  44. <view class="list-title-b-item ">
  45. 应收金额:¥{{ payment.receiptAmount | NumFormat }}
  46. </view>
  47. <view class="list-title-b-item ">
  48. 已收金额:¥{{ payment.receiptAmount | NumFormat }}
  49. </view>
  50. </view>
  51. <view class="list-title-b">
  52. <view class="list-title-b-item ">
  53. 剩余应收:¥{{ payment.receiptAmount | NumFormat }}
  54. </view>
  55. <view class="list-title-b-item ">
  56. 待审金额:¥{{ payment.receiptAmount | NumFormat }}
  57. </view>
  58. </view>
  59. <view class="list-title-b">经理折扣:¥{{ payment.receiptAmount }}(原¥0.00,折扣取消¥0.00)</view>
  60. <view class="list-title-b">退货退款:¥{{ payment.receiptAmount }}(原¥0.00,折扣取消¥0.00)</view>
  61. </view>
  62. </view>
  63. <view class="section-mid supper">
  64. <view class="list-title supper">
  65. <view class="list-title-b">子订单号(标识):{{ payment.number }} ( {{ payment.id }} )</view>
  66. <view class="list-title-b">供应商:{{ payment.userName }}</view>
  67. <view class="list-title-b">订单金额:¥{{ payment.receiptAmount | NumFormat }}</view>
  68. </view>
  69. <view class="list-goods">
  70. <view class="list-goods-item" v-for="(product, index) in payment.productList" :key="index">
  71. <view class="list-goods-image">
  72. <image class="list-image" :src="product.image" mode=""></image>
  73. <view class="list-tags" v-if="product.productType == 1">赠品</view>
  74. </view>
  75. <view class="list-goods-mains">
  76. <view class="list-name">{{ product.name }}</view>
  77. <view class="list-text">
  78. <view class="list-text-item">单价:¥{{ product.price | NumFormat }}</view>
  79. <view class="list-text-item">数量:{{ product.productNum }}</view>
  80. </view>
  81. <view class="list-text">合计:¥{{ product.totalPrice | NumFormat }}</view>
  82. </view>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. <!-- 弹窗提示 -->
  89. <tui-modal :show="modal" @click="handleClick" @cancel="hideMobel" :title="contentModalTitle"
  90. :content="contentModalText" :button="modalButton" color="#333" :size="32" shape="circle"
  91. :maskClosable="false">
  92. </tui-modal>
  93. </view>
  94. </template>
  95. <script>
  96. import wxLogin from '@/services/wxLogin.js'
  97. import {
  98. mapState,
  99. mapMutations
  100. } from 'vuex'
  101. export default {
  102. data() {
  103. return {
  104. isIphoneX:this.$store.state.isIphoneX,
  105. nvabarData: {
  106. //顶部自定义导航
  107. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  108. showSearch: 0,
  109. title: '', // 导航栏 中间的标题
  110. haveBack: false,
  111. home: false,
  112. textLeft: this.$store.state.isIphone,
  113. bgColor: '#D33020',
  114. textColor: '#ffffff'
  115. },
  116. payment:{
  117. id: 6090,
  118. number: 'W164488903271223',
  119. receiptAmount: 5000, //收款金额
  120. associateAmount: 5000, //关联金额
  121. orderType: 1, //收款类型
  122. receiptDate: '2022-02-15 10:58:25', // 收款时间
  123. reviewDate: '2022-02-15 10:58:25', // 审核时间
  124. smsContent:
  125. '【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
  126. confirmType: 11,
  127. userName: '采美网络信息有限公司',
  128. sourceType: 2,
  129. state: 1,
  130. isChecked: false,
  131. productList:[
  132. {
  133. image:'https://img.caimei365.com/group1/M00/00/38/rB-lGGGbNPCAXPlfAAbfLUx_7cE227.png',
  134. name:'Skin 2 Skin Med 颜层面部皮肤注射泵 禾雅堂AI水光注射仪 含底座',
  135. productType:0,
  136. price:1000000,
  137. productNum:1,
  138. totalPrice:1000000
  139. },
  140. {
  141. image:'https://img.caimei365.com/group1/M00/00/38/rB-lGGGbNPCAXPlfAAbfLUx_7cE227.png',
  142. name:'Skin 2 Skin Med 颜层面部皮肤注射泵 禾雅堂AI水光注射仪 含底座',
  143. productType:1,
  144. price:1000000,
  145. productNum:1,
  146. totalPrice:1000000
  147. },
  148. {
  149. image:'https://img.caimei365.com/group1/M00/00/38/rB-lGGGbNPCAXPlfAAbfLUx_7cE227.png',
  150. name:'Skin 2 Skin Med 颜层面部皮肤注射泵 禾雅堂AI水光注射仪 含底座',
  151. productType:0,
  152. price:1000000,
  153. productNum:1,
  154. totalPrice:1000000
  155. },
  156. {
  157. image:'https://img.caimei365.com/group1/M00/00/38/rB-lGGGbNPCAXPlfAAbfLUx_7cE227.png',
  158. name:'Skin 2 Skin Med 颜层面部皮肤注射泵 禾雅堂AI水光注射仪 含底座',
  159. productType:1,
  160. price:1000000,
  161. productNum:1,
  162. totalPrice:1000000
  163. },
  164. {
  165. image:'https://img.caimei365.com/group1/M00/00/38/rB-lGGGbNPCAXPlfAAbfLUx_7cE227.png',
  166. name:'Skin 2 Skin Med 颜层面部皮肤注射泵 禾雅堂AI水光注射仪 含底座',
  167. productType:0,
  168. price:1000000,
  169. productNum:1,
  170. totalPrice:1000000
  171. },
  172. {
  173. image:'https://img.caimei365.com/group1/M00/00/38/rB-lGGGbNPCAXPlfAAbfLUx_7cE227.png',
  174. name:'Skin 2 Skin Med 颜层面部皮肤注射泵 禾雅堂AI水光注射仪 含底座',
  175. productType:1,
  176. price:1000000,
  177. productNum:1,
  178. totalPrice:1000000
  179. },
  180. {
  181. image:'https://img.caimei365.com/group1/M00/00/38/rB-lGGGbNPCAXPlfAAbfLUx_7cE227.png',
  182. name:'Skin 2 Skin Med 颜层面部皮肤注射泵 禾雅堂AI水光注射仪 含底座',
  183. productType:0,
  184. price:1000000,
  185. productNum:1,
  186. totalPrice:1000000
  187. },
  188. {
  189. image:'https://img.caimei365.com/group1/M00/00/38/rB-lGGGbNPCAXPlfAAbfLUx_7cE227.png',
  190. name:'Skin 2 Skin Med 颜层面部皮肤注射泵 禾雅堂AI水光注射仪 含底座',
  191. productType:1,
  192. price:1000000,
  193. productNum:1,
  194. totalPrice:1000000
  195. },
  196. ]
  197. },
  198. modalButton: [{
  199. text: '取消',
  200. type: 'gray',
  201. plain: true //是否空心
  202. },
  203. {
  204. text: '确认',
  205. customStyle: {
  206. color: '#fff',
  207. bgColor: '#4688fa'
  208. },
  209. plain: false
  210. }
  211. ],
  212. params: {
  213. type: 1,
  214. banksType: 1,
  215. amount: '',
  216. chargeValue: '',
  217. remarks: '',
  218. time: this.$api.getNowFormatDate()
  219. },
  220. infoData: {},
  221. isCmcustomClass: 'left',
  222. CustomBar: this.CustomBar, // 顶部导航栏高度
  223. height: 64, //header高度
  224. top: 0, //标题图标距离顶部距离
  225. scrollH: 0, //滚动总高度
  226. opcity: 1,
  227. isCheckedCharge: false,
  228. contentModalTitle: '',
  229. contentModalText: '', //操作文字提示语句
  230. modal: false,
  231. }
  232. },
  233. onLoad() {
  234. let obj = {}
  235. // #ifdef MP-WEIXIN
  236. obj = wx.getMenuButtonBoundingClientRect()
  237. // #endif
  238. // #ifdef MP-BAIDU
  239. obj = swan.getMenuButtonBoundingClientRect()
  240. // #endif
  241. // #ifdef MP-ALIPAY
  242. my.hideAddToDesktopMenu()
  243. // #endif
  244. uni.getSystemInfo({
  245. success: res => {
  246. this.width = obj.left || res.windowWidth
  247. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
  248. this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
  249. this.scrollH = res.windowWidth * 0.6
  250. }
  251. })
  252. },
  253. filters: {
  254. formatOrderType(value) {
  255. switch (value) {
  256. case 1:
  257. return '自主订单'
  258. break
  259. case 2:
  260. return '协销订单'
  261. break
  262. case 3:
  263. return '客服订单'
  264. break
  265. }
  266. },
  267. StateExpFormat(state) {
  268. //订单状态文字和颜色
  269. var HtmlStateText = '',
  270. stateTextObject = {
  271. 0: '待确认',
  272. 4: '交易完成',
  273. 5: '订单完成',
  274. 6: '已关闭',
  275. 7: '交易全退',
  276. 77: '交易全退',
  277. 11: '待付款待发货',
  278. 12: '待付款部分发货',
  279. 13: '待付款已发货',
  280. 21: '部分付款待发货',
  281. 22: '部分付款部分发货',
  282. 23: '部分付款已发货',
  283. 31: '已付款待发货',
  284. 32: '已付款部分发货',
  285. 33: '已付款已发货',
  286. 111: '待付款待发货'
  287. }
  288. Object.keys(stateTextObject).forEach(function(key) {
  289. if (key == state) {
  290. HtmlStateText = stateTextObject[key]
  291. }
  292. })
  293. return HtmlStateText
  294. },
  295. NumFormat: function(text) {
  296. //处理金额
  297. return Number(text).toFixed(2)
  298. }
  299. },
  300. computed: {
  301. ...mapState(['hasLogin', 'userInfo'])
  302. },
  303. methods: {
  304. bindPickerChange(type, e) {
  305. // 选择选项
  306. switch (type) {
  307. case 1:
  308. this.paymentTypeText = this.paymentActions[e.target.value].name
  309. this.params.type = this.paymentActions[e.target.value].value
  310. console.log('款项类型', this.paymentTypeText)
  311. console.log('款项类型', this.params.type)
  312. break
  313. case 2:
  314. this.banksTypeText = this.banksActions[e.target.value].name
  315. this.params.banksType = this.banksActions[e.target.value].value
  316. console.log('收款类型', this.params.banksType)
  317. break
  318. }
  319. },
  320. showTuiDateTime() {
  321. this.$refs.dateTime.show()
  322. },
  323. confirmDistinguish() {
  324. if (this.params.amount == '') {
  325. this.$util.msg('请输入收款金额', 2000)
  326. return
  327. }
  328. if (this.isCheckedCharge) {
  329. if (this.params.chargeValue == '') {
  330. this.$util.msg('请输入手续费', 2000)
  331. return
  332. }
  333. }
  334. if (this.params.remarks == '') {
  335. this.$util.msg('请填写收款备注', 2000)
  336. return
  337. }
  338. if (this.params.type == 1) {
  339. this.contentModalTitle = '确定收款吗?'
  340. this.contentModalText = '确认前请仔细检查各项数据是否正确,确认收款后将不能进行修改。' //操作文字提示语句
  341. } else if (this.params.type == 2) {
  342. this.contentModalTitle = ''
  343. this.contentModalText = '确定返佣收款吗?' //操作文字提示语句
  344. } else if (this.params.type == 3) {
  345. this.contentModalTitle = ''
  346. this.contentModalText = '确定供应商退款吗?' //操作文字提示语句
  347. }
  348. this.modal = true
  349. console.log('收款')
  350. },
  351. handleClick(e) {
  352. // 确认收款
  353. if (e.index == 1) {
  354. this.$api.navigateTo('/pages/collection/detail')
  355. }
  356. this.modal = false
  357. },
  358. hideMobel() {
  359. this.modal = false
  360. },
  361. checkedCharge() {
  362. // 勾选手续费
  363. this.isCheckedCharge = !this.isCheckedCharge
  364. },
  365. changeNumber(e) {
  366. // 校验输入为数字
  367. if (!this.$api.isNumber(e.detail.value)) {
  368. this.params.amount = ''
  369. } else {
  370. this.params.amount = e.detail.value
  371. }
  372. },
  373. toNoSms(url){
  374. this.$api.navigateTo(url)
  375. },
  376. formatColor(state) {
  377. //设置邀请码状态亚瑟
  378. let stateColor = '',
  379. stateColorObject = {
  380. 0: '#f0ad4e',
  381. 1: '#4cd964',
  382. 2: '#dd524d',
  383. 3: '#007aff'
  384. }
  385. Object.keys(stateColorObject).forEach(function(key) {
  386. if (key == state) {
  387. stateColor = stateColorObject[key]
  388. }
  389. })
  390. return stateColor
  391. },
  392. },
  393. onPageScroll(e) {
  394. //实时获取到滚动的值
  395. if (e.scrollTop > 30) {
  396. this.isCmcustomClass = 'fiexd'
  397. } else {
  398. this.isCmcustomClass = 'left'
  399. }
  400. },
  401. onPullDownRefresh() {
  402. setTimeout(() => {
  403. // this.initSsoMemberCollectionList()
  404. uni.stopPullDownRefresh()
  405. }, 200)
  406. },
  407. onShow() {
  408. if (this.hasLogin) {
  409. this.GetDataInfo()
  410. }
  411. }
  412. }
  413. </script>
  414. <style lang="scss">
  415. @import '@/uni.scss';
  416. page {
  417. background: #fff;
  418. }
  419. .tui-header-box {
  420. width: 100%;
  421. background: #ffffff;
  422. z-index: 999;
  423. background-size: cover;
  424. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  425. &.fiexd {
  426. position: fixed;
  427. top: 0;
  428. left: 0;
  429. }
  430. }
  431. .header-top {
  432. width: 100%;
  433. font-size: 16px;
  434. font-weight: 500;
  435. height: 32px;
  436. display: flex;
  437. align-items: center;
  438. justify-content: center;
  439. position: relative;
  440. padding: 0 40rpx;
  441. }
  442. .header-sit {
  443. width: 100%;
  444. box-sizing: border-box;
  445. height: 80rpx;
  446. line-height: 80rpx;
  447. box-sizing: border-box;
  448. padding: 0 24rpx;
  449. color: #ffffff;
  450. .header-sit-text {
  451. text-align: left;
  452. font-size: $font-size-40;
  453. font-weight: 600;
  454. font-family: '正楷';
  455. }
  456. .icon-fanhui {
  457. font-size: 42rpx;
  458. margin-right: 10rpx;
  459. }
  460. .icon-iconfonticonfontsousuo1 {
  461. font-size: 42rpx;
  462. margin-left: 30rpx;
  463. }
  464. }
  465. .mine {
  466. width: 100%;
  467. height: 100%;
  468. position: relative;
  469. }
  470. .distinguish-section {
  471. width: 100%;
  472. position: absolute;
  473. padding: 40rpx 20rpx;
  474. box-sizing: border-box;
  475. }
  476. .distinguish-section-conten {
  477. width: 100%;
  478. height: auto;
  479. position: relative;
  480. background-color: #ffffff;
  481. border-radius: 20rpx;
  482. padding: 20rpx;
  483. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  484. .section-top {
  485. width: 100%;
  486. height: 66rpx;
  487. box-sizing: border-box;
  488. .section-badges {
  489. float: left;
  490. height: 66rpx;
  491. padding: 13rpx 0;
  492. .list-title-tip {
  493. float: left;
  494. .badges {
  495. display: block;
  496. float: left;
  497. padding: 0 15rpx;
  498. height: 40rpx;
  499. line-height: 40rpx;
  500. border-radius: 4rpx;
  501. background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
  502. font-size: $font-size-24;
  503. text-align: center;
  504. color: #ffffff;
  505. }
  506. }
  507. .list-title-num {
  508. float: left;
  509. text-align: left;
  510. color: #e15616;
  511. line-height: 40rpx;
  512. margin-left: 20rpx;
  513. }
  514. }
  515. .button {
  516. float: right;
  517. box-sizing: border-box;
  518. padding: 0 24rpx;
  519. height: 100%;
  520. line-height: 66rpx;
  521. background: $btn-confirm;
  522. border-radius: 8rpx;
  523. text-align: center;
  524. color: #ffffff;
  525. }
  526. }
  527. .section-mid{
  528. width: 100%;
  529. height: auto;
  530. display: flex;
  531. flex-direction: column;
  532. padding: 15rpx 0;
  533. position: relative;
  534. border-radius:0 0 20rpx 20rpx;
  535. &.supper{
  536. padding: 0;
  537. .list-goods{
  538. width: 100%;
  539. height: auto;
  540. margin-top: 20rpx;
  541. .list-goods-item{
  542. width: 100%;
  543. height: 180rpx;
  544. margin-bottom: 20rpx;
  545. .list-goods-image{
  546. width: 180rpx;
  547. height: 180rpx;
  548. border-radius: 8rpx;
  549. float: left;
  550. position: relative;
  551. .list-image{
  552. width: 180rpx;
  553. height: 180rpx;
  554. border-radius: 8rpx;
  555. display: block;
  556. }
  557. .list-tags{
  558. padding: 0 15rpx;
  559. height: 40rpx;
  560. text-align: center;
  561. line-height: 40rpx;
  562. font-size: 22rpx;
  563. border-radius: 8rpx 20rpx 0 20rpx;
  564. color: #FFFFFF;
  565. background-color: #dd524d;
  566. position: absolute;
  567. top: 0;
  568. left: 0;
  569. }
  570. }
  571. .list-goods-mains{
  572. width: 480rpx;
  573. height: 100%;
  574. float: left;
  575. padding:10rpx 0;
  576. padding-left: 24rpx;
  577. .list-name{
  578. width: 100%;
  579. line-height: 40rpx;
  580. font-size: $font-size-24;
  581. color: #999999;
  582. text-align: left;
  583. text-overflow: ellipsis;
  584. overflow: hidden;
  585. display: -webkit-box;
  586. -webkit-line-clamp: 2;
  587. line-clamp: 2;
  588. -webkit-box-orient: vertical;
  589. }
  590. .list-text{
  591. width: 100%;
  592. height: 40rpx;
  593. float: left;
  594. font-size: $font-size-24;
  595. line-height: 40rpx;
  596. color: #999999;
  597. text-align: left;
  598. .list-text-item {
  599. width: 50%;
  600. height: 100%;
  601. float: left;
  602. }
  603. }
  604. }
  605. }
  606. }
  607. }
  608. .list-title {
  609. width: 100%;
  610. height: auto;
  611. &.supper{
  612. background-color: #F7F7F7;
  613. padding:0 10rpx;
  614. }
  615. .list-title-b {
  616. width: 100%;
  617. height: 50rpx;
  618. float: left;
  619. font-size: $font-size-24;
  620. line-height: 50rpx;
  621. color: #999999;
  622. text-align: left;
  623. .list-title-b-item {
  624. width: 50%;
  625. height: 100%;
  626. float: left;
  627. }
  628. }
  629. }
  630. }
  631. }
  632. </style>