examine-detail.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
  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-shouye1" v-if="isShareType" @click.stop="this.$api.navigateLinkJump()"></text>
  10. <text class="iconfont icon-fanhui" v-else @click.stop="this.$api.navigateBack(1)"></text>
  11. <text class="header-sit-text">审核详情</text>
  12. </view>
  13. </view>
  14. <view class="tui-header-box"
  15. :style="{ height: CustomBar + 30 + 'px', backgroundImage: 'url(https://static.caimei365.com/app/crm/image/statistic_bg1.png)' }">
  16. </view>
  17. <tui-skeleton
  18. v-if="skeletonShow"
  19. backgroundColor="#fafafa"
  20. borderRadius="10rpx"
  21. :isLoading="true"
  22. :loadingType="7"
  23. ></tui-skeleton>
  24. <view class="distinguish-section" v-else :style="{ top: CustomBar - 4 + 'px', left: 0 + 'px' }">
  25. <view class="distinguish-section-conten">
  26. <view class="section-top">
  27. <view class="title">
  28. <view class="title-text">收款信息</view>
  29. </view>
  30. <view class="button" @click="toNoSms('/pages/collection/list')">
  31. <text class="iconfont icon-wodedingdan"></text>
  32. 收款列表
  33. </view>
  34. </view>
  35. <view class="section-top-item">
  36. <view class="list-title-t">
  37. <view class="list-title-tip">
  38. <text class="badges">{{ receiptInfo.receiptType | formatReceiptType }}款</text>
  39. </view>
  40. </view>
  41. <view class="list-title-b">
  42. <view class="list-title-b-item ">
  43. 收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }} </text>
  44. </view>
  45. <view class="list-title-b-item ">
  46. 收款类型:<text class="text">{{ receiptInfo.payTypeText }} </text>
  47. </view>
  48. </view>
  49. <view class="list-title-b">
  50. 收款时间:<text class="text">{{ receiptInfo.receiptDate }}</text>
  51. </view>
  52. <template v-if="receiptInfo.smsContent">
  53. <view class="list-title-b">收款短信:</view>
  54. <view class="list-title-b sms">
  55. <text class="text">{{ receiptInfo.smsContent ? receiptInfo.smsContent : '无' }}</text>
  56. </view>
  57. </template>
  58. <view class="list-icon" v-if="receiptInfo.tipMsg">
  59. <image
  60. class="list-icon-image"
  61. src="https://static.caimei365.com/app/crm/image/icon-noconfirm@2x.png"
  62. mode=""
  63. v-if="receiptInfo.receiptStatus == 1"
  64. ></image>
  65. <image
  66. class="list-icon-image"
  67. src="https://static.caimei365.com/app/crm/image/icon-noaudit@2x.png"
  68. mode=""
  69. v-if="receiptInfo.receiptStatus == 2"
  70. ></image>
  71. </view>
  72. </view>
  73. <view class="section-title">关联订单</view>
  74. <view class="section-mid">
  75. <view class="tui-order-item" v-for="(order, orderIndex) in receiptInfo.orderList" :key="orderIndex">
  76. <receipt-details :orderInfo="order"></receipt-details>
  77. <view class="list-detail" @click="orderDetail(order.orderId)">
  78. <text class="iconfont icon-xiayibu"></text>
  79. </view>
  80. </view>
  81. </view>
  82. <view class="section-title">状态</view>
  83. <view class="section-mid">
  84. <view class="list-title">
  85. <view class="list-title-b">进度:<text
  86. :style="{ color: formatColor(receiptInfo.receiptStatus) }">{{ receiptInfo.receiptStatusText }}</text>
  87. </view>
  88. <view class="list-title-b">确认人:<text class="text">正大单</text></view>
  89. <view class="list-title-b">确认时间:<text class="text">{{ receiptInfo.confirmDate }}</text></view>
  90. </view>
  91. </view>
  92. <view class="section-tips">注:款项和订单已确认关联,等待审核</view>
  93. </view>
  94. </view>
  95. <view class="distinguish-button" :style="{ paddingBottom: isIphoneX ? '68rpx' : '24rpx' }">
  96. <view class="button cancel" @click="confirmDistinguish(2)">不通过</view>
  97. <view class="button confirm" @click="confirmDistinguish(1)">通过</view>
  98. </view>
  99. <!-- 审核通过弹窗 -->
  100. <tui-modal :show="modal" @click="handleClick" @cancel="hideMobel(0)" :content="contentModalText" color="#333"
  101. :size="32" shape="circle" :maskClosable="false"></tui-modal>
  102. <!--不通过审核备注弹窗 -->
  103. <tui-modal :show="modal1" :padding="'40rpx 30rpx'" @cancel="hideMobel(1)" :custom="true" fadeIn >
  104. <view class="tui-modal-custom">
  105. <view class="tui-prompt-title">确认不通过</view>
  106. <view class="tui-prompt-textarea">
  107. <textarea
  108. :class="modal1 ? 'show' : 'none'"
  109. class="textarea"
  110. placeholder="请输入不通过说明(必填)"
  111. v-model="noReviewReason"
  112. />
  113. </view>
  114. <view class="tui-prompt-flex">
  115. <view class="btn btn-cancel" @click="hideMobel(1)">取消</view>
  116. <view class="btn btn-confirm" @click="handleClick1">确定</view>
  117. </view>
  118. </view>
  119. </tui-modal>
  120. </view>
  121. </template>
  122. <script>
  123. import wxLogin from '@/services/wxLogin.js'
  124. import receiptDetails from '@/components/cm-module/receipt/receipt-details'
  125. import {
  126. mapState,
  127. mapMutations
  128. } from 'vuex'
  129. export default {
  130. components: {
  131. receiptDetails
  132. },
  133. data() {
  134. return {
  135. isIphoneX: this.$store.state.isIphoneX,
  136. CustomBar: this.CustomBar, // 顶部导航栏高度
  137. height: 64, //header高度
  138. top: 0, //标题图标距离顶部距离
  139. scrollH: 0, //滚动总高度
  140. opcity: 1,
  141. isCmcustomClass: 'left',
  142. skeletonShow:true,
  143. nvabarData: {
  144. //顶部自定义导航
  145. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  146. showSearch: 0,
  147. title: '', // 导航栏 中间的标题
  148. haveBack: false,
  149. home: false,
  150. textLeft: this.$store.state.isIphone,
  151. bgColor: '#D33020',
  152. textColor: '#ffffff'
  153. },
  154. receiptInfo: {},
  155. receiptId:0,
  156. noReviewReason:'',
  157. params: {
  158. id: 0,
  159. receiptStatus: 1
  160. },
  161. contentModalText: '确认通过审核?', //操作文字提示语句
  162. modal: false,
  163. modal1: false,
  164. isShareType:false
  165. }
  166. },
  167. onLoad(option) {
  168. let obj = {}
  169. // #ifdef MP-WEIXIN
  170. obj = wx.getMenuButtonBoundingClientRect()
  171. // #endif
  172. // #ifdef MP-BAIDU
  173. obj = swan.getMenuButtonBoundingClientRect()
  174. // #endif
  175. // #ifdef MP-ALIPAY
  176. my.hideAddToDesktopMenu()
  177. // #endif
  178. uni.getSystemInfo({
  179. success: res => {
  180. this.width = obj.left || res.windowWidth
  181. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
  182. this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
  183. this.scrollH = res.windowWidth * 0.6
  184. }
  185. })
  186. if(option.type == 'share'){ this.isShareType = true }
  187. this.receiptId = this.params.id = option.id
  188. this.getOrderReceiptDetail(this.receiptId)
  189. },
  190. filters: {
  191. },
  192. computed: {
  193. ...mapState(['hasLogin'])
  194. },
  195. methods: {
  196. getOrderReceiptDetail(id){
  197. // 收款详情
  198. this.OrderService.orderReceiptDetail({ id : id})
  199. .then(response => {
  200. this.receiptInfo = response.data
  201. setTimeout(()=>{
  202. this.skeletonShow = false
  203. },1000)
  204. })
  205. .catch(err => {
  206. this.$util.msg(err.msg, 2000)
  207. })
  208. },
  209. orderReceiptAudit(params){
  210. //操作审核款项
  211. this.OrderService.orderReceiptAudit(params)
  212. .then(response => {
  213. this.$util.msg('操作成功~', 2000, true, 'success')
  214. setTimeout(()=>{
  215. if(this.params.receiptStatus == 3){//通过审核跳转
  216. this.$api.navigateTo(`/pages/relation/ordinary/detail?id=${this.params.id}`)
  217. }else{//不通过审核跳转
  218. this.$api.navigateTo(`/pages/relation/ordinary/index?id=${this.params.id}`)
  219. }
  220. },2000)
  221. })
  222. .catch(error => {
  223. this.$util.msg(error.msg, 2000)
  224. })
  225. },
  226. confirmDistinguish(type) {
  227. switch(type){
  228. case 1:
  229. //通过审核
  230. this.params.receiptStatus = 3
  231. this.modal = true
  232. break
  233. case 2:
  234. //不通过审核显示备注弹窗
  235. this.params.receiptStatus = 4
  236. this.modal1 = true
  237. break
  238. }
  239. },
  240. handleClick(e) {
  241. // 通过审核
  242. let index = e.index
  243. if (index == 1) {
  244. this.orderReceiptAudit(this.params)
  245. }
  246. this.modal = false
  247. },
  248. handleClick1() {
  249. // 不通过审核
  250. if(this.noReviewReason == ''){
  251. this.$util.msg('请输入不通过说明!', 2000)
  252. return
  253. }
  254. this.params.reviewReason = this.noReviewReason
  255. this.orderReceiptAudit(this.params)
  256. this.modal1 = false
  257. },
  258. hideMobel(type) {
  259. switch(type){
  260. case 0:
  261. this.modal = false
  262. break
  263. case 1:
  264. this.modal1 = false
  265. break
  266. }
  267. },
  268. orderDetail(orderId) {
  269. //订单详情跳转
  270. this.$api.navigateTo(`/pages/relation/order/detail?orderId=${orderId}`)
  271. },
  272. toNoSms(url) {
  273. this.$api.navigateTo(url)
  274. },
  275. formatColor(state) {
  276. //设置颜色
  277. let stateColor = '',
  278. stateColorObject = {
  279. 1: '#FEAC20',
  280. 2: '#4cd964',
  281. 3: '#34CC8C',
  282. 4: '#F94B4B',
  283. 5: '#007aff'
  284. }
  285. Object.keys(stateColorObject).forEach(function(key) {
  286. if (key == state) {
  287. stateColor = stateColorObject[key]
  288. }
  289. })
  290. return stateColor
  291. },
  292. formatReceiptType(value) {
  293. //订单状态文字和颜色
  294. var HtmlStateText = '',
  295. stateTextObject = {
  296. 1: '订单款',
  297. 2: '非订单款',
  298. 3: '返佣款',
  299. 4: '订单款或者非订单款',
  300. 5: '供应商退款'
  301. }
  302. Object.keys(stateTextObject).forEach(function(key) {
  303. if (key == value) {
  304. HtmlStateText = stateTextObject[key]
  305. }
  306. })
  307. return HtmlStateText
  308. },
  309. },
  310. onPageScroll(e) {
  311. //实时获取到滚动的值
  312. // if (e.scrollTop > 30) {
  313. // this.isCmcustomClass = 'fiexd'
  314. // } else {
  315. // this.isCmcustomClass = 'left'
  316. // }
  317. },
  318. onPullDownRefresh() {
  319. setTimeout(() => {
  320. this.getOrderReceiptDetail(this.receiptId)
  321. uni.stopPullDownRefresh()
  322. }, 200)
  323. },
  324. onShareAppMessage(res) {
  325. //分享购买优惠券
  326. const receipt = this.receiptInfo
  327. const receiptTypeText = this.formatReceiptType(receipt.receiptType)
  328. if (res.from === 'button') {
  329. // console.log('来自页面内转发按钮')
  330. }
  331. return {
  332. title: `【${receipt.receiptStatusText}(${receiptTypeText})】收款金额${receipt.receiptAmount.toFixed(2)}元,收款时间:${receipt.receiptDate}`,
  333. path: `/pages/login/login-share?id=${receipt.id}`,
  334. imageUrl: 'https://static.caimei365.com/app/crm/image/icon-share@2x.jpg'
  335. }
  336. },
  337. onShow() {
  338. }
  339. }
  340. </script>
  341. <style lang="scss">
  342. @import '@/uni.scss';
  343. page {
  344. background: #fff;
  345. }
  346. .tui-header-box {
  347. width: 100%;
  348. background: #ffffff;
  349. z-index: 999;
  350. background-size: cover;
  351. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  352. &.fiexd {
  353. position: fixed;
  354. top: 0;
  355. left: 0;
  356. }
  357. }
  358. .header-top {
  359. width: 100%;
  360. font-size: 16px;
  361. font-weight: 500;
  362. height: 32px;
  363. display: flex;
  364. align-items: center;
  365. justify-content: center;
  366. position: relative;
  367. padding: 0 40rpx;
  368. }
  369. .header-sit {
  370. width: 100%;
  371. box-sizing: border-box;
  372. height: 80rpx;
  373. line-height: 80rpx;
  374. box-sizing: border-box;
  375. color: #ffffff;
  376. .header-sit-text {
  377. text-align: left;
  378. font-size: $font-size-40;
  379. font-weight: 600;
  380. font-family: '正楷';
  381. }
  382. .iconfont {
  383. display: block;
  384. width: 80rpx;
  385. height: 80rpx;
  386. float: left;
  387. text-align: center;
  388. line-height: 80rpx;
  389. font-size: 42rpx;
  390. }
  391. }
  392. .mine {
  393. width: 100%;
  394. height: 100%;
  395. position: relative;
  396. }
  397. .distinguish-section {
  398. width: 100%;
  399. position: absolute;
  400. padding: 40rpx 20rpx;
  401. box-sizing: border-box;
  402. }
  403. .distinguish-section-conten {
  404. width: 100%;
  405. height: auto;
  406. position: relative;
  407. background-color: #ffffff;
  408. border-radius: 20rpx;
  409. padding: 20rpx;
  410. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  411. .section-top {
  412. width: 100%;
  413. height: 66rpx;
  414. box-sizing: border-box;
  415. .title {
  416. float: left;
  417. height: 66rpx;
  418. padding: 13rpx 0;
  419. .title-text{
  420. float: left;
  421. line-height: 40rpx;
  422. height: 40rpx;
  423. color: #333333;
  424. text-align: left;
  425. font-weight: 600;
  426. font-size: $font-size-30;
  427. }
  428. }
  429. .button {
  430. float: right;
  431. box-sizing: border-box;
  432. padding: 0 24rpx;
  433. height: 100%;
  434. line-height: 66rpx;
  435. background: $btn-confirm;
  436. border-radius: 8rpx;
  437. text-align: center;
  438. color: #ffffff;
  439. }
  440. }
  441. .section-top-item {
  442. width: 100%;
  443. height: auto;
  444. margin-top: 10rpx;
  445. position: relative;
  446. float: left;
  447. .list-title-t {
  448. width: 100%;
  449. height: 50rpx;
  450. float: left;
  451. font-size: $font-size-28;
  452. padding-bottom: 10rpx;
  453. .list-title-tip {
  454. float: left;
  455. .badges {
  456. display: block;
  457. float: left;
  458. padding: 0 15rpx;
  459. height: 40rpx;
  460. line-height: 40rpx;
  461. border-radius: 4rpx;
  462. background: $btn-confirm;
  463. font-size: $font-size-24;
  464. text-align: center;
  465. color: #ffffff;
  466. }
  467. }
  468. }
  469. .list-title-b {
  470. width: 100%;
  471. height: 44rpx;
  472. float: left;
  473. font-size: $font-size-24;
  474. line-height: 44rpx;
  475. color: #666666;
  476. text-align: left;
  477. .text{
  478. color: #999999;
  479. }
  480. .list-title-b-item {
  481. width: 50%;
  482. height: 100%;
  483. float: left;
  484. }
  485. &.sms {
  486. height: 120rpx;
  487. padding: 10rpx;
  488. border-radius: 4rpx;
  489. background: #F7F7F7;
  490. }
  491. }
  492. .list-icon {
  493. width: 120rpx;
  494. height: 120rpx;
  495. border-radius: 10rpx;
  496. position: absolute;
  497. right: 0;
  498. top: 0;
  499. color: #dd524d;
  500. z-index: 99;
  501. .list-icon-image{
  502. width: 120rpx;
  503. height: 120rpx;
  504. display: block;
  505. }
  506. }
  507. }
  508. .section-title {
  509. width: 100%;
  510. height: 66rpx;
  511. float: left;
  512. font-size: $font-size-28;
  513. line-height: 66rpx;
  514. color: #333333;
  515. text-align: left;
  516. font-weight: 600;
  517. }
  518. .section-mid {
  519. width: 100%;
  520. height: auto;
  521. display: flex;
  522. flex-direction: column;
  523. position: relative;
  524. border-radius: 0 0 20rpx 20rpx;
  525. .list-title {
  526. width: 100%;
  527. height: auto;
  528. .list-title-b {
  529. width: 100%;
  530. height: 50rpx;
  531. float: left;
  532. font-size: $font-size-24;
  533. line-height: 50rpx;
  534. color: #666666;
  535. text-align: left;
  536. .text{
  537. color: #999999;
  538. }
  539. .list-title-b-item {
  540. width: 50%;
  541. height: 100%;
  542. float: left;
  543. }
  544. }
  545. }
  546. }
  547. .section-tips{
  548. width: 100%;
  549. height: 50rpx;
  550. font-size: $font-size-28;
  551. line-height: 50rpx;
  552. color: $uni-color-error;
  553. text-align: left;
  554. }
  555. }
  556. .tui-order-item {
  557. display: flex;
  558. flex-direction: column;
  559. width: 100%;
  560. background: #fff;
  561. margin-bottom: 24rpx;
  562. border-radius: 8rpx;
  563. position: relative;
  564. .list-detail {
  565. width: 70rpx;
  566. height: 80rpx;
  567. line-height: 80rpx;
  568. text-align: right;
  569. position: absolute;
  570. right: 0;
  571. bottom: 0;
  572. .iconfont {
  573. font-size: $font-size-32;
  574. color: #999999;
  575. }
  576. }
  577. }
  578. .distinguish-button {
  579. width: 100%;
  580. position: fixed;
  581. bottom: 0;
  582. left: 0;
  583. background-color: #ffffff;
  584. padding: 0 50rpx;
  585. padding-top: 20rpx;
  586. display: flex;
  587. .button {
  588. flex: 1;
  589. height: 80rpx;
  590. margin: 0 20rpx;
  591. border-radius: 40rpx;
  592. text-align: center;
  593. color: #ffffff;
  594. line-height: 80rpx;
  595. font-size: $font-size-28;
  596. box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
  597. &.confirm{
  598. background: $btn-confirm;
  599. }
  600. &.cancel{
  601. background: $uni-color-error;
  602. }
  603. }
  604. }
  605. .tui-prompt-title{
  606. line-height: 44rpx;
  607. text-align: center;
  608. }
  609. .tui-prompt-textarea{
  610. width: 100%;
  611. height: 160rpx;
  612. box-sizing: border-box;
  613. background: #f7f7f7;
  614. border-radius: 8rpx;
  615. padding:15rpx 20rpx;
  616. margin: 20rpx 0;
  617. .textarea {
  618. width: 100%;
  619. height: 100%;
  620. font-size: $font-size-26;
  621. &.none{
  622. display: none;
  623. }
  624. }
  625. }
  626. .tui-prompt-flex{
  627. width: 100%;
  628. height: 70rpx;
  629. display: flex;
  630. margin-top: 20rpx;
  631. .btn{
  632. flex: 1;
  633. line-height: 70rpx;
  634. font-size: $font-size-26;
  635. text-align: center;
  636. color: #FFFFFF;
  637. border-radius: 33rpx;
  638. margin: 0 24rpx;
  639. &.btn-cancel{
  640. background: #F7F7F7;
  641. color: #999999;
  642. }
  643. &.btn-confirm{
  644. background: $color-system;
  645. }
  646. }
  647. }
  648. </style>