index.vue 27 KB

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