index.vue 28 KB

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