index.vue 30 KB

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