detail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  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>
  64. </view>
  65. <view class="distinguish-button" :style="{paddingBottom :isIphoneX ? '68rpx' : '24rpx'}">
  66. <view class="button" @click="confirmDistinguish">确认</view>
  67. </view>
  68. <!-- 弹窗提示 -->
  69. <tui-modal :show="modal" @click="handleClick" @cancel="hideMobel" :title="contentModalTitle"
  70. :content="contentModalText" :button="modalButton" color="#333" :size="32" shape="circle"
  71. :maskClosable="false">
  72. </tui-modal>
  73. </view>
  74. </template>
  75. <script>
  76. import wxLogin from '@/services/wxLogin.js'
  77. import {
  78. mapState,
  79. mapMutations
  80. } from 'vuex'
  81. export default {
  82. data() {
  83. return {
  84. isIphoneX:this.$store.state.isIphoneX,
  85. nvabarData: {
  86. //顶部自定义导航
  87. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  88. showSearch: 0,
  89. title: '', // 导航栏 中间的标题
  90. haveBack: false,
  91. home: false,
  92. textLeft: this.$store.state.isIphone,
  93. bgColor: '#D33020',
  94. textColor: '#ffffff'
  95. },
  96. payment:{
  97. id: 6090,
  98. number: 'W164488903271223',
  99. receiptAmount: 5000, //收款金额
  100. associateAmount: 5000, //关联金额
  101. orderType: 1, //收款类型
  102. receiptDate: '2022-02-15 10:58:25', // 收款时间
  103. reviewDate: '2022-02-15 10:58:25', // 审核时间
  104. smsContent:
  105. '【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
  106. confirmType: 11,
  107. userName: '采美网络信息有限公司',
  108. sourceType: 2,
  109. state: 1,
  110. isChecked: false
  111. },
  112. modalButton: [{
  113. text: '取消',
  114. type: 'gray',
  115. plain: true //是否空心
  116. },
  117. {
  118. text: '确认',
  119. customStyle: {
  120. color: '#fff',
  121. bgColor: '#4688fa'
  122. },
  123. plain: false
  124. }
  125. ],
  126. params: {
  127. type: 1,
  128. banksType: 1,
  129. amount: '',
  130. chargeValue: '',
  131. remarks: '',
  132. time: this.$api.getNowFormatDate()
  133. },
  134. infoData: {},
  135. isCmcustomClass: 'left',
  136. CustomBar: this.CustomBar, // 顶部导航栏高度
  137. height: 64, //header高度
  138. top: 0, //标题图标距离顶部距离
  139. scrollH: 0, //滚动总高度
  140. opcity: 1,
  141. isCheckedCharge: false,
  142. contentModalTitle: '',
  143. contentModalText: '', //操作文字提示语句
  144. modal: false,
  145. }
  146. },
  147. onLoad() {
  148. let obj = {}
  149. // #ifdef MP-WEIXIN
  150. obj = wx.getMenuButtonBoundingClientRect()
  151. // #endif
  152. // #ifdef MP-BAIDU
  153. obj = swan.getMenuButtonBoundingClientRect()
  154. // #endif
  155. // #ifdef MP-ALIPAY
  156. my.hideAddToDesktopMenu()
  157. // #endif
  158. uni.getSystemInfo({
  159. success: res => {
  160. this.width = obj.left || res.windowWidth
  161. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
  162. this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
  163. this.scrollH = res.windowWidth * 0.6
  164. }
  165. })
  166. },
  167. filters: {
  168. formatOrderType(value) {
  169. switch (value) {
  170. case 1:
  171. return '自主订单'
  172. break
  173. case 2:
  174. return '协销订单'
  175. break
  176. case 3:
  177. return '客服订单'
  178. break
  179. }
  180. },
  181. StateExpFormat(state) {
  182. //订单状态文字和颜色
  183. var HtmlStateText = '',
  184. stateTextObject = {
  185. 0: '待确认',
  186. 4: '交易完成',
  187. 5: '订单完成',
  188. 6: '已关闭',
  189. 7: '交易全退',
  190. 77: '交易全退',
  191. 11: '待付款待发货',
  192. 12: '待付款部分发货',
  193. 13: '待付款已发货',
  194. 21: '部分付款待发货',
  195. 22: '部分付款部分发货',
  196. 23: '部分付款已发货',
  197. 31: '已付款待发货',
  198. 32: '已付款部分发货',
  199. 33: '已付款已发货',
  200. 111: '待付款待发货'
  201. }
  202. Object.keys(stateTextObject).forEach(function(key) {
  203. if (key == state) {
  204. HtmlStateText = stateTextObject[key]
  205. }
  206. })
  207. return HtmlStateText
  208. },
  209. NumFormat: function(text) {
  210. //处理金额
  211. return Number(text).toFixed(2)
  212. }
  213. },
  214. computed: {
  215. ...mapState(['hasLogin', 'userInfo'])
  216. },
  217. methods: {
  218. bindPickerChange(type, e) {
  219. // 选择选项
  220. switch (type) {
  221. case 1:
  222. this.paymentTypeText = this.paymentActions[e.target.value].name
  223. this.params.type = this.paymentActions[e.target.value].value
  224. console.log('款项类型', this.paymentTypeText)
  225. console.log('款项类型', this.params.type)
  226. break
  227. case 2:
  228. this.banksTypeText = this.banksActions[e.target.value].name
  229. this.params.banksType = this.banksActions[e.target.value].value
  230. console.log('收款类型', this.params.banksType)
  231. break
  232. }
  233. },
  234. showTuiDateTime() {
  235. this.$refs.dateTime.show()
  236. },
  237. confirmDistinguish() {
  238. if (this.params.amount == '') {
  239. this.$util.msg('请输入收款金额', 2000)
  240. return
  241. }
  242. if (this.isCheckedCharge) {
  243. if (this.params.chargeValue == '') {
  244. this.$util.msg('请输入手续费', 2000)
  245. return
  246. }
  247. }
  248. if (this.params.remarks == '') {
  249. this.$util.msg('请填写收款备注', 2000)
  250. return
  251. }
  252. if (this.params.type == 1) {
  253. this.contentModalTitle = '确定收款吗?'
  254. this.contentModalText = '确认前请仔细检查各项数据是否正确,确认收款后将不能进行修改。' //操作文字提示语句
  255. } else if (this.params.type == 2) {
  256. this.contentModalTitle = ''
  257. this.contentModalText = '确定返佣收款吗?' //操作文字提示语句
  258. } else if (this.params.type == 3) {
  259. this.contentModalTitle = ''
  260. this.contentModalText = '确定供应商退款吗?' //操作文字提示语句
  261. }
  262. this.modal = true
  263. console.log('收款')
  264. },
  265. handleClick(e) {
  266. // 确认收款
  267. if (e.index == 1) {
  268. this.$api.navigateTo('/pages/collection/detail')
  269. }
  270. this.modal = false
  271. },
  272. hideMobel() {
  273. this.modal = false
  274. },
  275. checkedCharge() {
  276. // 勾选手续费
  277. this.isCheckedCharge = !this.isCheckedCharge
  278. },
  279. changeNumber(e) {
  280. // 校验输入为数字
  281. if (!this.$api.isNumber(e.detail.value)) {
  282. this.params.amount = ''
  283. } else {
  284. this.params.amount = e.detail.value
  285. }
  286. },
  287. toNoSms(url){
  288. this.$api.navigateTo(url)
  289. },
  290. formatColor(state) {
  291. //设置邀请码状态亚瑟
  292. let stateColor = '',
  293. stateColorObject = {
  294. 0: '#f0ad4e',
  295. 1: '#4cd964',
  296. 2: '#dd524d',
  297. 3: '#007aff'
  298. }
  299. Object.keys(stateColorObject).forEach(function(key) {
  300. if (key == state) {
  301. stateColor = stateColorObject[key]
  302. }
  303. })
  304. return stateColor
  305. },
  306. },
  307. onPageScroll(e) {
  308. //实时获取到滚动的值
  309. if (e.scrollTop > 30) {
  310. this.isCmcustomClass = 'fiexd'
  311. } else {
  312. this.isCmcustomClass = 'left'
  313. }
  314. },
  315. onPullDownRefresh() {
  316. setTimeout(() => {
  317. // this.initSsoMemberCollectionList()
  318. uni.stopPullDownRefresh()
  319. }, 200)
  320. },
  321. onShow() {
  322. if (this.hasLogin) {
  323. this.GetDataInfo()
  324. }
  325. }
  326. }
  327. </script>
  328. <style lang="scss">
  329. @import '@/uni.scss';
  330. page {
  331. background: #fff;
  332. }
  333. .tui-header-box {
  334. width: 100%;
  335. background: #ffffff;
  336. z-index: 999;
  337. background-size: cover;
  338. &.fiexd {
  339. position: fixed;
  340. top: 0;
  341. left: 0;
  342. background: #4688fa;
  343. border-radius: 0 0 20rpx 20rpx;
  344. }
  345. &.first {
  346. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  347. }
  348. }
  349. .header-top {
  350. width: 100%;
  351. font-size: 16px;
  352. font-weight: 500;
  353. height: 32px;
  354. display: flex;
  355. align-items: center;
  356. justify-content: center;
  357. position: relative;
  358. padding: 0 40rpx;
  359. }
  360. .header-sit {
  361. width: 100%;
  362. box-sizing: border-box;
  363. height: 80rpx;
  364. line-height: 80rpx;
  365. box-sizing: border-box;
  366. padding: 0 24rpx;
  367. color: #ffffff;
  368. .header-sit-text {
  369. text-align: left;
  370. font-size: $font-size-40;
  371. font-weight: 600;
  372. font-family: '正楷';
  373. }
  374. .icon-fanhui {
  375. font-size: 42rpx;
  376. margin-right: 10rpx;
  377. }
  378. .icon-iconfonticonfontsousuo1 {
  379. font-size: 42rpx;
  380. margin-left: 30rpx;
  381. }
  382. }
  383. .mine {
  384. width: 100%;
  385. height: 100%;
  386. position: relative;
  387. }
  388. .distinguish-section {
  389. width: 100%;
  390. position: absolute;
  391. padding: 40rpx 20rpx;
  392. box-sizing: border-box;
  393. }
  394. .distinguish-section-conten {
  395. width: 100%;
  396. height: auto;
  397. position: relative;
  398. background-color: #ffffff;
  399. border-radius: 20rpx;
  400. padding: 20rpx;
  401. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  402. .section-top {
  403. width: 100%;
  404. height: 66rpx;
  405. box-sizing: border-box;
  406. .section-badges {
  407. float: left;
  408. height: 66rpx;
  409. padding: 13rpx 0;
  410. .list-title-tip {
  411. float: left;
  412. .badges {
  413. display: block;
  414. float: left;
  415. padding: 0 15rpx;
  416. height: 40rpx;
  417. line-height: 40rpx;
  418. border-radius: 4rpx;
  419. background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
  420. font-size: $font-size-24;
  421. text-align: center;
  422. color: #ffffff;
  423. }
  424. }
  425. .list-title-num {
  426. float: left;
  427. text-align: left;
  428. color: #e15616;
  429. line-height: 40rpx;
  430. margin-left: 20rpx;
  431. }
  432. }
  433. .button {
  434. float: right;
  435. box-sizing: border-box;
  436. padding: 0 24rpx;
  437. height: 100%;
  438. line-height: 66rpx;
  439. background: $btn-confirm;
  440. border-radius: 8rpx;
  441. text-align: center;
  442. color: #ffffff;
  443. }
  444. }
  445. .section-mid{
  446. width: 100%;
  447. height: auto;
  448. display: flex;
  449. flex-direction: column;
  450. margin: 20rpx 0;
  451. position: relative;
  452. .list-title {
  453. width: 100%;
  454. height: auto;
  455. .list-title-b {
  456. width: 100%;
  457. height: 50rpx;
  458. float: left;
  459. font-size: $font-size-24;
  460. line-height: 50rpx;
  461. color: #999999;
  462. text-align: left;
  463. .list-title-b-item {
  464. width: 50%;
  465. height: 100%;
  466. float: left;
  467. }
  468. }
  469. }
  470. }
  471. }
  472. .distinguish-button {
  473. width: 100%;
  474. padding-top: 20rpx;
  475. position: fixed;
  476. bottom: 0;
  477. left: 0;
  478. background-color: #FFFFFF;
  479. padding: 0 50rpx;
  480. .button {
  481. width: 100%;
  482. height: 80rpx;
  483. background: $btn-confirm;
  484. border-radius: 40rpx;
  485. text-align: center;
  486. color: #ffffff;
  487. line-height: 80rpx;
  488. font-size: $font-size-28;
  489. box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
  490. }
  491. }
  492. .uni-badge--small {
  493. -webkit-transform: scale(0.8);
  494. -ms-transform: scale(0.8);
  495. transform: scale(0.8);
  496. -webkit-transform-origin: center center;
  497. -ms-transform-origin: center center;
  498. transform-origin: center center;
  499. }
  500. .uni-badge {
  501. font-family: 'Helvetica Neue', Helvetica, sans-serif;
  502. -webkit-box-sizing: border-box;
  503. box-sizing: border-box;
  504. font-size: 12px;
  505. line-height: 1;
  506. display: inline-block;
  507. padding: 3px 6px;
  508. color: #333;
  509. border-radius: 100px;
  510. background-color: #f1f1f1;
  511. }
  512. .uni-badge-error {
  513. color: #fff;
  514. background-color: #dd524d;
  515. }
  516. </style>