index.vue 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162
  1. <template>
  2. <view class="container mine clearfix">
  3. <view
  4. class="tui-header-box first"
  5. :style="{ height: isCmcustomClass == 'fiexd' ? CustomBar + 6 + 'px' : CustomBar + 6 + 'px' }"
  6. :class="isCmcustomClass"
  7. >
  8. <view class="header-top" :style="{ paddingTop: top + 'px', lineHeight: CustomBar + 20 + 'px' }"></view>
  9. <view class="header-sit">
  10. <text class="iconfont icon-fanhui" @click.stop="this.$api.navigateBack(1)"></text>
  11. <text class="header-sit-text">关联订单</text>
  12. </view>
  13. </view>
  14. <view class="tui-header-tabs day clearfix" :style="{ top: CustomBar + 6 + 'px' }">
  15. <view v-if="!isShowHeader">
  16. <view class="tui-header-top">
  17. <view class="title"> 收款信息 </view>
  18. <view class="tui-header-button">
  19. <view class="button btn-confirm" @click="toNoSms('/pages/collection/list')">
  20. <text class="iconfont icon-wodedingdan"></text> 收款列表
  21. </view>
  22. </view>
  23. </view>
  24. <view class="tui-header-item">
  25. <view class="list-title-t">
  26. <view class="list-title-tip">
  27. <text class="badges">{{ paymentInfo.sourceType | formatSourceType }}</text>
  28. </view>
  29. <view class="list-title-num" :style="{ color: formatColor(paymentInfo.confirmType) }">{{
  30. paymentInfo.confirmType | formatStateType
  31. }}</view>
  32. </view>
  33. <view class="list-title-b">
  34. <view class="list-title-b-item "> 收款金额:¥{{ paymentInfo.receiptAmount | NumFormat }} </view>
  35. <view class="list-title-b-item "> 收款类型:{{ paymentInfo.payType }} </view>
  36. </view>
  37. <view class="list-title-b">收款时间:{{ paymentInfo.receiptDate }}</view>
  38. <template v-if="paymentInfo.smsContent">
  39. <view class="list-title-b">收款短信:</view>
  40. <view class="list-title-b sms">{{ paymentInfo.smsContent }}</view>
  41. </template>
  42. <view class="list-icon">无人确认</view>
  43. </view>
  44. </view>
  45. <view class="tui-header-tabmain">
  46. <input
  47. class="input"
  48. type="text"
  49. confirm-type="search"
  50. @confirm="subMitSearch()"
  51. placeholder="请输入供应商名称"
  52. />
  53. <text class="iconfont icon-sousuo"></text>
  54. </view>
  55. </view>
  56. <view
  57. class="user-section"
  58. :style="{
  59. top: isIphoneX ? CustomBar + 260 + 'px' : CustomBar + 250 + 'px',
  60. left: 0 + 'px',
  61. paddingBottom: isIphoneX ? '178rpx' : '144rpx'
  62. }"
  63. >
  64. <view class="header-content">
  65. <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
  66. <!-- 空白页 -->
  67. <empty v-if="isEmpty" :typeIndex="currents" :navbarHeight="navbarHeight"></empty>
  68. <!-- 列表 -->
  69. <view v-else class="tui-order-content">
  70. <view
  71. class="tui-order-item"
  72. v-for="(payment, payIndex) in payList"
  73. :key="payIndex"
  74. @click.stop="orderDetail(payment.id)"
  75. >
  76. <view class="list-title">
  77. <view class="list-title-t">
  78. <view class="list-title-tip">
  79. <text class="badges">{{ payment.orderType | formatOrderType }}</text>
  80. </view>
  81. <view class="list-title-num">{{ payment.confirmType | StateExpFormat }}</view>
  82. </view>
  83. <view class="list-title-a">
  84. <view class="list-title-a-text"
  85. >子订单编号:{{ payment.number }} ( {{ payment.id }} )</view
  86. >
  87. <view class="list-title-a-text">供应商名称:{{ payment.userName }}</view>
  88. <view class="list-title-a-text"
  89. >订单金额:¥{{ payment.receiptAmount | NumFormat }}</view
  90. >
  91. </view>
  92. <view class="list-title-b">客户名称:{{ payment.userName }}</view>
  93. <view class="list-title-b">订单编号:{{ payment.number }} ( {{ payment.id }} )</view>
  94. <view class="list-title-b">下单日期:{{ payment.receiptDate }}</view>
  95. <view class="list-title-b">
  96. <view class="list-title-b-item ">
  97. 订单金额:¥{{ payment.receiptAmount | NumFormat }}
  98. </view>
  99. <view class="list-title-b-item ">
  100. 已收金额:¥{{ payment.receiptAmount | NumFormat }}
  101. </view>
  102. </view>
  103. </view>
  104. <view class="list-checked" @click="checkedOrder(payment)">
  105. <text
  106. class="iconfont"
  107. :class="payment.isChecked ? 'icon-yixuanze' : 'icon-weixuanze'"
  108. ></text>
  109. </view>
  110. <view class="list-detail" @click="handelDetail(payment)">
  111. <text class="iconfont icon-xiayibu"></text>
  112. </view>
  113. </view>
  114. <!--加载loadding-->
  115. <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
  116. <tui-nomore :visible="!pullUpOn" bgcolor="#F7F7F7" :text="nomoreText"></tui-nomore>
  117. <!--加载loadding-->
  118. </view>
  119. </view>
  120. </view>
  121. </view>
  122. <view class="distinguish-button" :style="{ paddingBottom: isIphoneX ? '68rpx' : '24rpx' }">
  123. <view class="button" @click="confirmDistinguish">确认</view>
  124. </view>
  125. <!-- 弹窗 -->
  126. <tui-modal
  127. :show="modal"
  128. @click="handleClick"
  129. @cancel="hideMobel"
  130. :content="contentModalText"
  131. color="#333"
  132. :size="32"
  133. shape="circle"
  134. :maskClosable="false"
  135. ></tui-modal>
  136. </view>
  137. </template>
  138. <script>
  139. import headerBack from '@/components/cm-module/headerNavbar/header-back' //自定义导航
  140. import modalLayer from '@/components/modal-layer'
  141. import empty from '@/components/empty'
  142. import wxLogin from '@/services/wxLogin.js'
  143. import { mapState, mapMutations } from 'vuex'
  144. const defaultListQuery = {
  145. pageNum: 1, //页数
  146. pageSize: 10, //条数
  147. orderNum: '',
  148. phone: '',
  149. date: '', //订单提交时间
  150. classification: '', //订单分类
  151. merchantId: 0,
  152. source: '' //订单来源
  153. }
  154. export default {
  155. components: {
  156. empty
  157. },
  158. data() {
  159. const currentDate = this.getDate({
  160. format: true
  161. })
  162. return {
  163. CustomBar: this.CustomBar, // 顶部导航栏高度
  164. isIphoneX: this.$store.state.isIphoneX,
  165. paymentInfo: {
  166. id: 6090,
  167. receiptAmount: 5000, //收款金额
  168. associateAmount: 5000, //关联金额
  169. payType: '广发银行-0115', //收款类型
  170. receiptDate: '2022-02-15 10:58:25', // 收款时间
  171. reviewDate: '2022-02-15 10:58:25', // 审核时间
  172. smsContent:
  173. '【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
  174. confirmType: 0,
  175. userName: '采美网络信息有限公司',
  176. sourceType: 3,
  177. state: 1
  178. },
  179. queryData: {
  180. startAddTime: '',
  181. endAddTime: ''
  182. },
  183. date: currentDate,
  184. currents: 0,
  185. tabCurrents: 0,
  186. userID: 0,
  187. openId: '',
  188. listQuery: Object.assign({}, defaultListQuery),
  189. payList: [
  190. {
  191. id: 6090,
  192. number: 'W164488903271223',
  193. receiptAmount: 5000, //收款金额
  194. associateAmount: 5000, //关联金额
  195. orderType: 2, //收款类型
  196. receiptDate: '2022-02-15 10:58:25', // 收款时间
  197. reviewDate: '2022-02-15 10:58:25', // 审核时间
  198. smsContent:
  199. '【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
  200. confirmType: 33,
  201. userName: '采美网络信息有限公司',
  202. sourceType: 1,
  203. state: 1,
  204. isChecked: false
  205. },
  206. {
  207. id: 6090,
  208. number: 'W164488903271223',
  209. receiptAmount: 5000, //收款金额
  210. associateAmount: 5000, //关联金额
  211. orderType: 2, //收款类型
  212. receiptDate: '2022-02-15 10:58:25', // 收款时间
  213. reviewDate: '2022-02-15 10:58:25', // 审核时间
  214. smsContent:
  215. '【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
  216. confirmType: 33,
  217. userName: '采美网络信息有限公司',
  218. sourceType: 2,
  219. state: 1,
  220. isChecked: false
  221. },
  222. {
  223. id: 6092,
  224. number: 'W164488903271223',
  225. receiptAmount: 5000, //收款金额
  226. associateAmount: 5000, //关联金额
  227. orderType: 2, //收款类型
  228. receiptDate: '2022-02-15 10:58:25', // 收款时间
  229. reviewDate: '2022-02-15 10:58:25', // 审核时间
  230. smsContent:
  231. '【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
  232. confirmType: 33,
  233. userName: '采美网络信息有限公司',
  234. sourceType: 3,
  235. state: 2,
  236. isChecked: false
  237. },
  238. {
  239. id: 6092,
  240. number: 'W164488903271223',
  241. receiptAmount: 5000, //收款金额
  242. associateAmount: 5000, //关联金额
  243. orderType: 2, //收款类型
  244. receiptDate: '2022-02-15 10:58:25', // 收款时间
  245. reviewDate: '2022-02-15 10:58:25', // 审核时间
  246. smsContent:
  247. '【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
  248. confirmType: 33,
  249. userName: '采美网络信息有限公司',
  250. sourceType: 4,
  251. state: 2,
  252. isChecked: false
  253. }
  254. ],
  255. btnoRderID: 0, //点击按钮传入的的订单ID
  256. scrollTop: 0,
  257. deteleType: '',
  258. skeletonShow: true,
  259. isEmpty: false,
  260. isDelete: false,
  261. isModalLayer: false,
  262. loadding: false,
  263. pullUpOn: true,
  264. total: 0,
  265. pullFlag: true,
  266. navbarHeight: '',
  267. nomoreText: '上拉显示更多',
  268. contentModalText: '', //操作文字提示语句
  269. modal: false,
  270. rightDrawer: false,
  271. hanldOrder: '', //储存监听订单信息
  272. OperationType: '', //操作类型
  273. isCmcustomClass: 'left',
  274. isShowHeader:false,
  275. height: 64, //header高度
  276. top: 0, //标题图标距离顶部距离
  277. scrollH: 0, //滚动总高度
  278. opcity: 1
  279. }
  280. },
  281. onLoad() {
  282. let obj = {}
  283. uni.getSystemInfo({
  284. success: res => {
  285. this.width = obj.left || res.windowWidth
  286. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
  287. this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
  288. this.scrollH = res.windowWidth * 0.6
  289. }
  290. })
  291. },
  292. filters: {
  293. StateExpFormat(state) {
  294. //订单状态文字和颜色
  295. var HtmlStateText = '',
  296. stateTextObject = {
  297. 0: '待确认',
  298. 4: '交易完成',
  299. 5: '订单完成',
  300. 6: '已关闭',
  301. 7: '交易全退',
  302. 77: '交易全退',
  303. 11: '待付款待发货',
  304. 12: '待付款部分发货',
  305. 13: '待付款已发货',
  306. 21: '部分付款待发货',
  307. 22: '部分付款部分发货',
  308. 23: '部分付款已发货',
  309. 31: '已付款待发货',
  310. 32: '已付款部分发货',
  311. 33: '待收款',
  312. 111: '待付款待发货'
  313. }
  314. Object.keys(stateTextObject).forEach(function(key) {
  315. if (key == state) {
  316. HtmlStateText = stateTextObject[key]
  317. }
  318. })
  319. return HtmlStateText
  320. },
  321. formatSourceType(value) {
  322. switch (value) {
  323. case 1:
  324. return '订单'
  325. break
  326. case 2:
  327. return '非订单'
  328. break
  329. case 3:
  330. return '返佣'
  331. break
  332. case 4:
  333. return '供应商退款'
  334. break
  335. }
  336. },
  337. formatStateType(value) {
  338. switch (value) {
  339. case 0:
  340. return '待确认'
  341. break
  342. case 1:
  343. return '已确认'
  344. break
  345. case 2:
  346. return '待审核'
  347. break
  348. case 3:
  349. return '审核通过'
  350. break
  351. }
  352. },
  353. formatOrderType(value) {
  354. switch (value) {
  355. case 1:
  356. return '自主订单'
  357. break
  358. case 2:
  359. return '协销订单'
  360. break
  361. case 3:
  362. return '客服订单'
  363. break
  364. }
  365. },
  366. NumFormat: function(text) {
  367. //处理金额
  368. return Number(text).toFixed(2)
  369. }
  370. },
  371. computed: {
  372. ...mapState(['hasLogin', 'userInfo']),
  373. startDate() {
  374. return this.getDate('start')
  375. },
  376. endDate() {
  377. return this.getDate('end')
  378. }
  379. },
  380. methods: {
  381. getDate(type) {
  382. const date = new Date()
  383. let year = date.getFullYear()
  384. let month = date.getMonth() + 1
  385. let day = date.getDate()
  386. if (type === 'start') {
  387. year = year - 1
  388. } else if (type === 'end') {
  389. year = year + 1
  390. }
  391. month = month > 9 ? month : '0' + month
  392. day = day > 9 ? day : '0' + day
  393. return `${year}-${month}-${day}`
  394. },
  395. bindStartDateChange(event) {
  396. //开始时间
  397. console.log('开始时间==>', event.detail.value)
  398. this.queryData.startAddTime = event.detail.value
  399. },
  400. bindEndDateChange(event) {
  401. //结束时间
  402. console.log('结束时间==>', event.detail.value)
  403. this.queryData.endAddTime = event.detail.value
  404. },
  405. getOrderDatainit(index) {
  406. this.listQuery.pageNum = 1
  407. this.OrderService.OrderList(
  408. Object.assign(
  409. {
  410. status: index
  411. },
  412. this.listQuery
  413. )
  414. )
  415. .then(response => {
  416. let resData = response.data.list
  417. this.total = response.data.total
  418. if (resData && resData.length > 0) {
  419. this.isEmpty = false
  420. this.orderData = [...resData]
  421. this.hanldOrderList(this.orderData)
  422. if (this.total > this.orderData.length) {
  423. this.pullUpOn = false
  424. this.nomoreText = '上拉显示更多'
  425. } else {
  426. if (this.orderData.length < 5) {
  427. this.pullUpOn = true
  428. } else {
  429. this.pullUpOn = false
  430. this.nomoreText = '已至底部'
  431. }
  432. }
  433. } else {
  434. this.isEmpty = true
  435. }
  436. })
  437. .catch(error => {
  438. this.$util.msg(error.msg, 2000)
  439. })
  440. },
  441. getOnReachBottomData(index) {
  442. //上拉加载
  443. this.listQuery.pageNum += 1
  444. this.OrderService.OrderList(
  445. Object.assign(
  446. {
  447. status: index
  448. },
  449. this.listQuery
  450. )
  451. ).then(response => {
  452. let resData = response.data.list
  453. this.total = response.data.total
  454. this.orderData = this.orderData.concat(resData)
  455. this.hanldOrderList(this.orderData)
  456. this.pullFlag = false // 防上拉暴滑
  457. setTimeout(() => {
  458. this.pullFlag = true
  459. }, 500)
  460. if (this.total > this.orderData.length) {
  461. this.pullUpOn = false
  462. this.nomoreText = '上拉显示更多'
  463. } else {
  464. this.loadding = false
  465. this.pullUpOn = false
  466. this.nomoreText = '已至底部'
  467. }
  468. })
  469. },
  470. change(e) {
  471. //切换tab传递当前tab[index]执行初始化方法
  472. this.currentTabs = e.index
  473. switch (e.index) {
  474. case 0:
  475. this.currentTab = -1
  476. break
  477. case 1:
  478. this.currentTab = 0
  479. break
  480. case 2:
  481. this.currentTab = 1
  482. break
  483. case 3:
  484. this.currentTab = 2
  485. break
  486. case 4:
  487. this.currentTab = 3
  488. break
  489. case 5:
  490. this.currentTab = 4
  491. break
  492. }
  493. this.pageNum = 1
  494. this.orderData = []
  495. this.pullUpOn = true //切换时隐藏
  496. this.loadding = false //切换时隐藏
  497. this.getOrderDatainit(this.currentTab)
  498. },
  499. orderDetail(id) {
  500. //订单详情跳转
  501. this.isModalLayer = true
  502. this.$api.navigateTo(`/pages/relation/order/detail?orderId=${id}`)
  503. },
  504. handButtonConfirm(data) {
  505. //获取点击
  506. console.log('data', data)
  507. // this.handShowAlert(data)
  508. },
  509. handShowAlert(data) {
  510. console.log('data', data)
  511. //执行
  512. switch (data.type) {
  513. case 'pay':
  514. this.$api.navigateTo(`/pages/user/order/order-details?path=pay&state=0&orderID=${this.btnoRderID}`)
  515. break
  516. case 'delete':
  517. this.modal = true
  518. this.contentModalText = '确认删除该订单吗?'
  519. break
  520. case 'cancel':
  521. this.modal = true
  522. this.contentModalText = '确认关闭该订单吗?'
  523. break
  524. case 'refund':
  525. uni.setStorageSync('refundData', data.order)
  526. this.$api.navigateTo('/pages/user/order/order-refund')
  527. break
  528. case 'returned':
  529. uni.setStorageSync('refundData', data.order)
  530. this.$api.navigateTo('/pages/user/order/order-refund')
  531. break
  532. case 'query':
  533. this.isModalLayer = true
  534. this.$api.navigateTo('/pages/user/order/order-logistics?orderID=' + data.orderId)
  535. break
  536. case 'confirm':
  537. this.modal = true
  538. this.contentModalText = '是否确认收货?'
  539. // this.handOrderConfirm(data.orderId);
  540. break
  541. case 'cancelRefund':
  542. this.modal = true
  543. this.contentModalText = '确定取消退货/退款?'
  544. // this.handCancelRefundConfirm(data.orderId);
  545. break
  546. }
  547. },
  548. handleClick(e) {
  549. //用户操作订单
  550. let index = e.index
  551. if (index == 1) {
  552. switch (this.OperationType) {
  553. case 'delete': //删除订单
  554. this.handOrderDetele(this.hanldOrder)
  555. break
  556. case 'cancel': //取消订单
  557. this.modal = true
  558. this.handCenceConfirm(this.hanldOrder)
  559. break
  560. case 'refund': //退款
  561. this.modal = true
  562. this.handRefundConfirm(this.hanldOrder)
  563. break
  564. case 'returned': //退货
  565. this.modal = true
  566. this.handReturnedConfirm(this.hanldOrder)
  567. break
  568. case 'confirm': //确认收货
  569. this.handOrderConfirm(this.hanldOrder)
  570. break
  571. case 'cancelRefund': //确认收货
  572. this.handCancelRefundConfirm(this.hanldOrder)
  573. break
  574. }
  575. }
  576. this.modal = false
  577. },
  578. checkedOrder(payment) {
  579. // 勾选关联订单
  580. payment.isChecked = !payment.isChecked
  581. },
  582. hideMobel() {
  583. this.modal = false
  584. },
  585. hanldOrderList(list) {
  586. let state = ''
  587. for (let i = 0; i < list.length; i++) {
  588. if (list[i].status == 4) {
  589. state = list[i].returnApplyStatus
  590. switch (state) {
  591. case 0:
  592. list[i].status = 40
  593. break
  594. case 1:
  595. list[i].status = 41
  596. break
  597. case 2:
  598. list[i].status = 42
  599. break
  600. case 3:
  601. list[i].status = 43
  602. break
  603. }
  604. }
  605. }
  606. },
  607. //订单状态文字和颜色
  608. orderStateExp(state) {
  609. let stateText = '',
  610. stateTextObject = {
  611. 0: '待付款',
  612. 1: '待发货',
  613. 2: '已发货',
  614. 3: '已完成',
  615. 4: '已关闭',
  616. 5: '无效订单'
  617. }
  618. Object.keys(stateTextObject).forEach(key => {
  619. if (key == state) {
  620. stateText = stateTextObject[key]
  621. }
  622. })
  623. return stateText
  624. },
  625. formatColor(state) {
  626. //设置邀请码状态亚瑟
  627. let stateColor = '',
  628. stateColorObject = {
  629. 0: '#f0ad4e',
  630. 1: '#4cd964',
  631. 2: '#dd524d',
  632. 3: '#007aff'
  633. }
  634. Object.keys(stateColorObject).forEach(function(key) {
  635. if (key == state) {
  636. stateColor = stateColorObject[key]
  637. }
  638. })
  639. return stateColor
  640. },
  641. orderPriceToFixed(n) {
  642. let price = ''
  643. price = Number(n).toFixed(2)
  644. return price
  645. },
  646. tabClick(type, index) {
  647. switch (type) {
  648. case 1:
  649. this.currents = index
  650. this.getOrderDatainit(this.currents)
  651. this.tabCurrents = 0
  652. break
  653. case 2:
  654. this.tabCurrents = index
  655. this.getOrderDatainit(this.currents)
  656. }
  657. },
  658. bindDateChange: function(e) {
  659. //选择筛选时间
  660. console.log(e)
  661. this.listQuery.date = e.detail.value
  662. console.log(this.listQuery.date)
  663. },
  664. bindPickerChange: function(type, e) {
  665. //选择筛选条件
  666. if (type == 1) {
  667. this.listQuery.classification = this.Array[e.target.value].name
  668. console.log(this.listQuery.classification)
  669. } else {
  670. this.listQuery.source = this.Array1[e.target.value].name
  671. console.log(this.listQuery.source)
  672. }
  673. },
  674. toNoSms(url) {
  675. this.$api.navigateTo(url)
  676. }
  677. },
  678. onPageScroll(e) {
  679. //实时获取到滚动的值
  680. if (e.scrollTop > 30) {
  681. this.isCmcustomClass = 'fiexd'
  682. } else {
  683. this.isCmcustomClass = 'left'
  684. }
  685. if (e.scrollTop > 180) {
  686. this.isShowHeader = true
  687. } else {
  688. this.isShowHeader = false
  689. }
  690. },
  691. onReachBottom() {
  692. if (this.total > this.orderData.length) {
  693. this.loadding = true
  694. this.pullUpOn = true
  695. this.getOnReachBottomData(this.currents)
  696. }
  697. },
  698. onPullDownRefresh() {
  699. setTimeout(() => {
  700. this.listQuery.pageNum = 1
  701. this.currents = 0
  702. // this.getOrderDatainit(this.currents)
  703. uni.stopPullDownRefresh()
  704. }, 200)
  705. },
  706. onShareAppMessage(res) {
  707. //分享购买优惠券
  708. const payment = res.target.dataset.payment
  709. console.log('payment', payment)
  710. if (res.from === 'button') {
  711. // console.log('来自页面内转发按钮')
  712. return {
  713. title: `【待确认】收款金额${payment.receiptAmount.toFixed(2)}元,收款时间:${payment.receiptDate}`,
  714. path: `pages/seller/cart/coupon-share?payment=${payment.id}`,
  715. imageUrl: 'https://static.caimei365.com/app/img/icon/icon-shareCoupon@2x.png'
  716. }
  717. }
  718. },
  719. onShow() {
  720. this.$api.getComStorage('userInfo').then(resolve => {
  721. this.listQuery.merchantId = resolve.id
  722. // this.getOrderDatainit(this.currents)
  723. })
  724. }
  725. }
  726. </script>
  727. <style lang="scss">
  728. @import '@/uni.scss';
  729. page {
  730. background: #f7f7f7;
  731. }
  732. .tui-header-box {
  733. width: 100%;
  734. background: #ffffff;
  735. z-index: 999;
  736. position: fixed;
  737. top: 0;
  738. left: 0;
  739. background-size: cover;
  740. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  741. &.fiexd {
  742. }
  743. &.first {
  744. }
  745. }
  746. .header-top {
  747. width: 100%;
  748. font-size: 16px;
  749. font-weight: 500;
  750. height: 32px;
  751. display: flex;
  752. align-items: center;
  753. justify-content: center;
  754. position: relative;
  755. padding: 0 40rpx;
  756. }
  757. .header-sit {
  758. width: 100%;
  759. box-sizing: border-box;
  760. height: 80rpx;
  761. line-height: 80rpx;
  762. box-sizing: border-box;
  763. padding: 0 24rpx;
  764. color: #ffffff;
  765. .header-sit-text {
  766. text-align: left;
  767. font-size: $font-size-40;
  768. font-weight: 600;
  769. font-family: '正楷';
  770. }
  771. .icon-fanhui {
  772. font-size: 42rpx;
  773. margin-right: 10rpx;
  774. }
  775. }
  776. .tui-header-tabs {
  777. width: 100%;
  778. height: auto;
  779. margin-bottom: 40rpx;
  780. padding: 20rpx 24rpx;
  781. background: #ffffff;
  782. box-sizing: border-box;
  783. position: fixed;
  784. z-index: 999;
  785. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  786. .tui-header-top {
  787. width: 100%;
  788. height: 66rpx;
  789. box-sizing: border-box;
  790. float: left;
  791. .title {
  792. float: left;
  793. line-height: 66rpx;
  794. color: #333333;
  795. text-align: left;
  796. font-size: $font-size-30;
  797. font-weight: 600;
  798. }
  799. .tui-header-button {
  800. float: right;
  801. box-sizing: border-box;
  802. height: 100%;
  803. line-height: 66rpx;
  804. padding: 5rpx 0;
  805. .button {
  806. float: left;
  807. box-sizing: border-box;
  808. padding: 0 24rpx;
  809. height: 100%;
  810. line-height: 56rpx;
  811. border-radius: 8rpx;
  812. text-align: center;
  813. color: #ffffff;
  814. margin-left: 10rpx;
  815. &.btn-confirm {
  816. background: $btn-confirm;
  817. }
  818. }
  819. }
  820. }
  821. .tui-header-item {
  822. width: 100%;
  823. height: auto;
  824. margin: 10rpx 0;
  825. position: relative;
  826. float: left;
  827. .list-title-t {
  828. width: 100%;
  829. height: 50rpx;
  830. float: left;
  831. font-size: $font-size-28;
  832. padding-bottom: 10rpx;
  833. margin-bottom: 10rpx;
  834. .list-title-num {
  835. float: left;
  836. text-align: left;
  837. color: #999999;
  838. margin-left: 30rpx;
  839. line-height: 40rpx;
  840. }
  841. .list-title-tip {
  842. float: left;
  843. .badges {
  844. display: block;
  845. float: left;
  846. padding: 0 15rpx;
  847. height: 40rpx;
  848. line-height: 40rpx;
  849. border-radius: 4rpx;
  850. background: $btn-confirm;
  851. font-size: $font-size-24;
  852. text-align: center;
  853. color: #ffffff;
  854. }
  855. }
  856. }
  857. .list-title-b {
  858. width: 100%;
  859. height: 40rpx;
  860. float: left;
  861. font-size: $font-size-24;
  862. line-height: 40rpx;
  863. color: #999999;
  864. text-align: left;
  865. .list-title-b-item {
  866. width: 50%;
  867. height: 100%;
  868. float: left;
  869. }
  870. &.sms {
  871. height: 100rpx;
  872. padding: 10rpx;
  873. border-radius: 4rpx;
  874. }
  875. }
  876. .list-icon {
  877. width: 120rpx;
  878. height: 60rpx;
  879. border: 1px solid #e1e1e1;
  880. border-radius: 10rpx;
  881. text-align: center;
  882. font-size: 20rpx;
  883. line-height: 60rpx;
  884. position: absolute;
  885. right: 90rpx;
  886. top: 40rpx;
  887. color: #dd524d;
  888. z-index: 99;
  889. transform: rotate(45deg);
  890. -webkit-transform: rotate(45deg);
  891. -moz-transform: rotate(45deg);
  892. font-family: '正楷';
  893. }
  894. }
  895. .tui-header-tabmain {
  896. width: 100%;
  897. height: 70rpx;
  898. float: left;
  899. position: relative;
  900. .input {
  901. width: 100%;
  902. height: 70rpx;
  903. box-sizing: border-box;
  904. padding: 0 20rpx;
  905. padding-left: 70rpx;
  906. background: #f7f7f7;
  907. border-radius: 8rpx;
  908. }
  909. .icon-sousuo {
  910. width: 80rpx;
  911. height: 70rpx;
  912. display: block;
  913. line-height: 70rpx;
  914. text-align: center;
  915. color: #999999;
  916. font-size: $font-size-40;
  917. position: absolute;
  918. left: 0;
  919. top: 0;
  920. }
  921. }
  922. .button-content {
  923. width: 100%;
  924. height: auto;
  925. float: left;
  926. position: relative;
  927. .btn {
  928. height: 64rpx;
  929. padding: 0 20rpx;
  930. margin: 10rpx 0 0 0;
  931. line-height: 64rpx;
  932. font-size: $font-size-26;
  933. text-align: center;
  934. border-radius: 6rpx;
  935. float: right;
  936. }
  937. .btn-confirm {
  938. background-color: #ff5000;
  939. color: #ffffff;
  940. }
  941. }
  942. }
  943. .distinguish-button {
  944. width: 100%;
  945. position: fixed;
  946. bottom: 0;
  947. left: 0;
  948. background-color: #ffffff;
  949. padding: 0 50rpx;
  950. padding-top: 20rpx;
  951. .button {
  952. width: 100%;
  953. height: 80rpx;
  954. background: $btn-confirm;
  955. border-radius: 40rpx;
  956. text-align: center;
  957. color: #ffffff;
  958. line-height: 80rpx;
  959. font-size: $font-size-28;
  960. box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
  961. }
  962. }
  963. .user-section {
  964. position: absolute;
  965. width: 100%;
  966. }
  967. .header-content {
  968. width: 100%;
  969. height: auto;
  970. position: relative;
  971. background-color: #f7f7f7;
  972. .tui-header-btm {
  973. width: 100%;
  974. padding: 0 30rpx;
  975. box-sizing: border-box;
  976. display: flex;
  977. align-items: center;
  978. justify-content: space-between;
  979. color: #fff;
  980. }
  981. .tui-btm-item {
  982. flex: 1;
  983. display: flex;
  984. flex-direction: column;
  985. align-items: center;
  986. justify-content: center;
  987. }
  988. .tui-btm-num {
  989. font-size: 32rpx;
  990. font-weight: 600;
  991. position: relative;
  992. }
  993. .tui-btm-text {
  994. font-size: 24rpx;
  995. opacity: 0.85;
  996. padding-top: 4rpx;
  997. }
  998. }
  999. .uni-badge--small {
  1000. -webkit-transform: scale(0.8);
  1001. -ms-transform: scale(0.8);
  1002. transform: scale(0.8);
  1003. -webkit-transform-origin: center center;
  1004. -ms-transform-origin: center center;
  1005. transform-origin: center center;
  1006. }
  1007. .uni-badge {
  1008. font-family: 'Helvetica Neue', Helvetica, sans-serif;
  1009. -webkit-box-sizing: border-box;
  1010. box-sizing: border-box;
  1011. font-size: 12px;
  1012. line-height: 1;
  1013. display: inline-block;
  1014. padding: 3px 6px;
  1015. color: #333;
  1016. border-radius: 100px;
  1017. background-color: #f1f1f1;
  1018. }
  1019. .uni-badge-error {
  1020. color: #fff;
  1021. background-color: #dd524d;
  1022. }
  1023. .tui-order-list {
  1024. margin-top: 24rpx;
  1025. width: 100%;
  1026. position: relative;
  1027. box-sizing: border-box;
  1028. padding: 0 20rpx;
  1029. }
  1030. .tui-order-content {
  1031. width: 100%;
  1032. height: auto;
  1033. }
  1034. .tui-order-item {
  1035. display: flex;
  1036. flex-direction: column;
  1037. width: 100%;
  1038. padding: 20rpx 20rpx;
  1039. background: #fff;
  1040. margin-bottom: 24rpx;
  1041. border-radius: 8rpx;
  1042. position: relative;
  1043. .list-checked {
  1044. width: 80rpx;
  1045. height: 80rpx;
  1046. line-height: 80rpx;
  1047. text-align: center;
  1048. position: absolute;
  1049. right: 0;
  1050. top: 0;
  1051. .iconfont {
  1052. font-size: 38rpx;
  1053. color: $color-system;
  1054. }
  1055. }
  1056. .list-detail {
  1057. width: 80rpx;
  1058. height: 280rpx;
  1059. line-height: 280rpx;
  1060. text-align: center;
  1061. position: absolute;
  1062. right: 0;
  1063. top: 80rpx;
  1064. .iconfont {
  1065. font-size: $font-size-30;
  1066. color: #999999;
  1067. }
  1068. }
  1069. }
  1070. .list-title {
  1071. width: 100%;
  1072. height: auto;
  1073. .list-title-t {
  1074. width: 100%;
  1075. height: 50rpx;
  1076. float: left;
  1077. font-size: $font-size-24;
  1078. padding-bottom: 10rpx;
  1079. .list-title-tip {
  1080. float: left;
  1081. .badges {
  1082. display: block;
  1083. float: left;
  1084. padding: 0 15rpx;
  1085. height: 40rpx;
  1086. line-height: 40rpx;
  1087. border-radius: 4rpx;
  1088. background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
  1089. font-size: $font-size-24;
  1090. text-align: center;
  1091. color: #ffffff;
  1092. }
  1093. }
  1094. .list-title-num {
  1095. float: left;
  1096. text-align: left;
  1097. color: #e15616;
  1098. line-height: 40rpx;
  1099. margin-left: 20rpx;
  1100. }
  1101. }
  1102. .list-title-a {
  1103. width: 100%;
  1104. height: auto;
  1105. float: left;
  1106. padding: 5rpx 8rpx;
  1107. border-radius: 4rpx;
  1108. background-color: rgba(247, 247, 247, 1);
  1109. margin-bottom: 10rpx;
  1110. .list-title-a-text {
  1111. width: 100%;
  1112. height: 40rpx;
  1113. float: left;
  1114. font-size: $font-size-24;
  1115. line-height: 40rpx;
  1116. color: #999999;
  1117. text-align: left;
  1118. }
  1119. }
  1120. .list-title-b {
  1121. width: 100%;
  1122. height: 40rpx;
  1123. float: left;
  1124. font-size: $font-size-24;
  1125. line-height: 40rpx;
  1126. color: #999999;
  1127. text-align: left;
  1128. .list-title-b-item {
  1129. width: 50%;
  1130. height: 100%;
  1131. float: left;
  1132. }
  1133. &.sms {
  1134. height: auto;
  1135. }
  1136. }
  1137. }
  1138. </style>