index.vue 31 KB

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