index.vue 27 KB

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