detail.vue 18 KB

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