examine-detail.vue 16 KB

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