index.vue 28 KB

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