index.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205
  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. color: #ffffff;
  788. .header-sit-text {
  789. text-align: left;
  790. font-size: $font-size-40;
  791. font-weight: 600;
  792. font-family: '正楷';
  793. }
  794. .icon-fanhui {
  795. display: block;
  796. width: 80rpx;
  797. height: 80rpx;
  798. float: left;
  799. text-align: center;
  800. line-height: 80rpx;
  801. font-size: 42rpx;
  802. }
  803. }
  804. .tui-header-tabs {
  805. width: 100%;
  806. height: auto;
  807. margin-bottom: 40rpx;
  808. padding: 20rpx 24rpx;
  809. background: #ffffff;
  810. box-sizing: border-box;
  811. position: fixed;
  812. z-index: 999;
  813. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  814. .tui-header-top {
  815. width: 100%;
  816. height: 66rpx;
  817. box-sizing: border-box;
  818. float: left;
  819. .title {
  820. float: left;
  821. line-height: 66rpx;
  822. color: #333333;
  823. text-align: left;
  824. font-size: $font-size-30;
  825. font-weight: 600;
  826. }
  827. .tui-header-button {
  828. float: right;
  829. box-sizing: border-box;
  830. height: 100%;
  831. line-height: 66rpx;
  832. padding: 5rpx 0;
  833. .button {
  834. float: left;
  835. box-sizing: border-box;
  836. padding: 0 24rpx;
  837. height: 100%;
  838. line-height: 56rpx;
  839. border-radius: 8rpx;
  840. text-align: center;
  841. color: #ffffff;
  842. margin-left: 10rpx;
  843. &.btn-confirm {
  844. background: $btn-confirm;
  845. }
  846. }
  847. }
  848. }
  849. .tui-header-item {
  850. width: 100%;
  851. height: auto;
  852. margin-top: 10rpx;
  853. position: relative;
  854. float: left;
  855. .list-title-t {
  856. width: 100%;
  857. height: 50rpx;
  858. float: left;
  859. font-size: $font-size-28;
  860. padding-bottom: 10rpx;
  861. margin-bottom: 10rpx;
  862. .list-title-num {
  863. float: left;
  864. text-align: left;
  865. color: #999999;
  866. margin-left: 30rpx;
  867. line-height: 40rpx;
  868. }
  869. .list-title-tip {
  870. float: left;
  871. .badges {
  872. display: block;
  873. float: left;
  874. padding: 0 15rpx;
  875. height: 40rpx;
  876. line-height: 40rpx;
  877. border-radius: 4rpx;
  878. background: $btn-confirm;
  879. font-size: $font-size-24;
  880. text-align: center;
  881. color: #ffffff;
  882. }
  883. }
  884. }
  885. .list-title-b {
  886. width: 100%;
  887. height: 40rpx;
  888. float: left;
  889. font-size: $font-size-24;
  890. line-height: 40rpx;
  891. color: #666666;
  892. text-align: left;
  893. .text{
  894. color: #999999;
  895. }
  896. .list-title-b-item {
  897. width: 50%;
  898. height: 100%;
  899. float: left;
  900. }
  901. &.sms {
  902. height: 100rpx;
  903. padding: 10rpx;
  904. border-radius: 4rpx;
  905. }
  906. }
  907. .list-icon {
  908. width: 120rpx;
  909. height: 60rpx;
  910. border: 1px solid #e1e1e1;
  911. border-radius: 10rpx;
  912. text-align: center;
  913. font-size: 20rpx;
  914. line-height: 60rpx;
  915. position: absolute;
  916. right: 90rpx;
  917. top: 40rpx;
  918. color: #dd524d;
  919. z-index: 99;
  920. transform: rotate(45deg);
  921. -webkit-transform: rotate(45deg);
  922. -moz-transform: rotate(45deg);
  923. font-family: '正楷';
  924. }
  925. }
  926. .tui-header-tabmain {
  927. width: 100%;
  928. height: 70rpx;
  929. float: left;
  930. position: relative;
  931. margin-top: 10rpx;
  932. .input {
  933. width: 100%;
  934. height: 70rpx;
  935. box-sizing: border-box;
  936. padding: 0 20rpx;
  937. padding-left: 70rpx;
  938. background: #f7f7f7;
  939. border-radius: 8rpx;
  940. }
  941. .icon-sousuo {
  942. width: 80rpx;
  943. height: 70rpx;
  944. display: block;
  945. line-height: 70rpx;
  946. text-align: center;
  947. color: #999999;
  948. font-size: $font-size-40;
  949. position: absolute;
  950. left: 0;
  951. top: 0;
  952. }
  953. }
  954. .button-content {
  955. width: 100%;
  956. height: auto;
  957. float: left;
  958. position: relative;
  959. .btn {
  960. height: 64rpx;
  961. padding: 0 20rpx;
  962. margin: 10rpx 0 0 0;
  963. line-height: 64rpx;
  964. font-size: $font-size-26;
  965. text-align: center;
  966. border-radius: 6rpx;
  967. float: right;
  968. }
  969. .btn-confirm {
  970. background-color: #ff5000;
  971. color: #ffffff;
  972. }
  973. }
  974. }
  975. .distinguish-button {
  976. width: 100%;
  977. position: fixed;
  978. bottom: 0;
  979. left: 0;
  980. background-color: #ffffff;
  981. padding: 0 50rpx;
  982. padding-top: 20rpx;
  983. .button {
  984. width: 100%;
  985. height: 80rpx;
  986. background: $btn-confirm;
  987. border-radius: 40rpx;
  988. text-align: center;
  989. color: #ffffff;
  990. line-height: 80rpx;
  991. font-size: $font-size-28;
  992. box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
  993. }
  994. }
  995. .user-section {
  996. position: absolute;
  997. width: 100%;
  998. }
  999. .header-content {
  1000. width: 100%;
  1001. height: auto;
  1002. position: relative;
  1003. background-color: #f7f7f7;
  1004. .tui-header-btm {
  1005. width: 100%;
  1006. padding: 0 30rpx;
  1007. box-sizing: border-box;
  1008. display: flex;
  1009. align-items: center;
  1010. justify-content: space-between;
  1011. color: #fff;
  1012. }
  1013. .tui-btm-item {
  1014. flex: 1;
  1015. display: flex;
  1016. flex-direction: column;
  1017. align-items: center;
  1018. justify-content: center;
  1019. }
  1020. .tui-btm-num {
  1021. font-size: 32rpx;
  1022. font-weight: 600;
  1023. position: relative;
  1024. }
  1025. .tui-btm-text {
  1026. font-size: 24rpx;
  1027. opacity: 0.85;
  1028. padding-top: 4rpx;
  1029. }
  1030. }
  1031. .uni-badge--small {
  1032. -webkit-transform: scale(0.8);
  1033. -ms-transform: scale(0.8);
  1034. transform: scale(0.8);
  1035. -webkit-transform-origin: center center;
  1036. -ms-transform-origin: center center;
  1037. transform-origin: center center;
  1038. }
  1039. .uni-badge {
  1040. font-family: 'Helvetica Neue', Helvetica, sans-serif;
  1041. -webkit-box-sizing: border-box;
  1042. box-sizing: border-box;
  1043. font-size: 12px;
  1044. line-height: 1;
  1045. display: inline-block;
  1046. padding: 3px 6px;
  1047. color: #333;
  1048. border-radius: 100px;
  1049. background-color: #f1f1f1;
  1050. }
  1051. .uni-badge-error {
  1052. color: #fff;
  1053. background-color: #dd524d;
  1054. }
  1055. .tui-order-list {
  1056. margin-top: 24rpx;
  1057. width: 100%;
  1058. position: relative;
  1059. box-sizing: border-box;
  1060. padding: 0 20rpx;
  1061. }
  1062. .tui-order-content {
  1063. width: 100%;
  1064. height: auto;
  1065. }
  1066. .tui-order-item {
  1067. display: flex;
  1068. flex-direction: column;
  1069. width: 100%;
  1070. padding: 20rpx 20rpx;
  1071. background: #fff;
  1072. margin-bottom: 24rpx;
  1073. border-radius: 8rpx;
  1074. position: relative;
  1075. .list-checked {
  1076. width: 80rpx;
  1077. height: 80rpx;
  1078. line-height: 80rpx;
  1079. text-align: center;
  1080. position: absolute;
  1081. right: 0;
  1082. top: 0;
  1083. .iconfont {
  1084. font-size: 38rpx;
  1085. color: $color-system;
  1086. }
  1087. }
  1088. .list-detail {
  1089. width: 80rpx;
  1090. height: 280rpx;
  1091. line-height: 280rpx;
  1092. text-align: center;
  1093. position: absolute;
  1094. right: 0;
  1095. top: 120rpx;
  1096. .iconfont {
  1097. font-size: $font-size-30;
  1098. color: #999999;
  1099. }
  1100. }
  1101. }
  1102. .list-title {
  1103. width: 100%;
  1104. height: auto;
  1105. .list-title-t {
  1106. width: 100%;
  1107. height: 50rpx;
  1108. float: left;
  1109. font-size: $font-size-24;
  1110. padding-bottom: 10rpx;
  1111. .list-title-tip {
  1112. float: left;
  1113. .badges {
  1114. display: block;
  1115. float: left;
  1116. padding: 0 15rpx;
  1117. height: 40rpx;
  1118. line-height: 40rpx;
  1119. border-radius: 4rpx;
  1120. background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
  1121. font-size: $font-size-24;
  1122. text-align: center;
  1123. color: #ffffff;
  1124. }
  1125. }
  1126. .list-title-num {
  1127. float: left;
  1128. text-align: left;
  1129. color: #e15616;
  1130. line-height: 40rpx;
  1131. margin-left: 20rpx;
  1132. }
  1133. }
  1134. .list-title-a {
  1135. width: 100%;
  1136. height: auto;
  1137. float: left;
  1138. padding: 5rpx 8rpx;
  1139. border-radius: 4rpx;
  1140. background-color: rgba(247, 247, 247, 1);
  1141. margin-bottom: 10rpx;
  1142. .text{
  1143. color: #999999;
  1144. }
  1145. .list-title-a-text {
  1146. width: 100%;
  1147. height: 40rpx;
  1148. float: left;
  1149. font-size: $font-size-24;
  1150. line-height: 40rpx;
  1151. color: #666666;
  1152. text-align: left;
  1153. .list-title-b-item {
  1154. width: 50%;
  1155. height: 100%;
  1156. float: left;
  1157. }
  1158. }
  1159. }
  1160. .list-title-b {
  1161. width: 100%;
  1162. height: 40rpx;
  1163. float: left;
  1164. font-size: $font-size-24;
  1165. line-height: 40rpx;
  1166. color: #666666;
  1167. text-align: left;
  1168. .text{
  1169. color: #999999;
  1170. }
  1171. .list-title-b-item {
  1172. width: 50%;
  1173. height: 100%;
  1174. float: left;
  1175. }
  1176. &.sms {
  1177. height: auto;
  1178. }
  1179. }
  1180. }
  1181. </style>