list.vue 33 KB

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