examine-detail.vue 15 KB

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