examine-detail.vue 14 KB

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