BillPending.vue 26 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019
  1. <template>
  2. <view class="page">
  3. <u-tabs :list="tabs" @click="sectionChange" style="background-color: #fff;" :current=current
  4. :itemStyle="{'width':'250rpx','padding':'24rpx'}" lineHeight="2px" lineWidth="30px"></u-tabs>
  5. <!-- 账单明细 -->
  6. <view class="contain" v-show="cdshow==0">
  7. <view class="topbilledit">
  8. <view class="changetime1">
  9. <picker mode="date" :value="myday" fields="month" @change="dateChange">
  10. <view class="selestDate">{{myday}}</view>
  11. </picker>
  12. </view>
  13. <view class="changetime2">
  14. <u-icon name="arrow-down-fill" color="#999" size="20"></u-icon>
  15. </view>
  16. </view>
  17. <view style="padding:16rpx 0 16rpx 32rpx">
  18. 共有 <span style="color: red">{{totalnumber}}</span>条记录
  19. </view>
  20. <view class="u-listdata">
  21. <u-list @scrolltolower="scrolltolower" :pagingEnabled='true'
  22. style="height:400px;flex:1;padding-bottom: 49px;">
  23. <u-list-item v-for="(item, index) in indexList1" :key="index">
  24. <view class="paisong">
  25. <u-icon name="arrow-up" @click="item.showMore=false" class="iconBtn" size="20px"
  26. v-if="item.showMore" color="#999"></u-icon>
  27. <u-icon name="arrow-down" @click="item.showMore=true" class="iconBtn" size="22px"
  28. color="#999" v-else></u-icon>
  29. <checkbox :checked="item.check" class="check" @click="checkItem(item)" />
  30. <view class="title">
  31. {{item.costType | getDictLab(that)}}: <span><text class="txt">¥{{item.amount}}</text>
  32. <text class="status s1" v-if='item.status==1'>
  33. 已支付
  34. </text>
  35. <text class="status s2" v-if='item.status==2'>
  36. 待支付
  37. </text>
  38. <text class="status s3" v-if='item.status==3'>
  39. 支付失败
  40. </text></span>
  41. </view>
  42. <template v-if="item.showMore">
  43. <view class="subtit" style="margin-top: 16rpx;" v-for="subItem in item.billLists"
  44. :key="subItem.id">
  45. <template v-if="item.costType!='PropertyFee'">
  46. {{subItem.equipName}}:{{subItem.amount}}
  47. </template>
  48. <template v-else>
  49. {{subItem.costType| getDictLab2(that)}}:{{subItem.amount}}
  50. </template>
  51. </view>
  52. </template>
  53. </view>
  54. </u-list-item>
  55. </u-list>
  56. </view>
  57. <view class="zhifu">
  58. <view class="zhifuright" @click="Immediatepayment">
  59. <view class="heji">
  60. 合计:<span>¥ {{heji}}</span>
  61. </view>
  62. <view class="likezhifu">
  63. <u-button type="primary" size='mini' shape='circle' text="立即支付"></u-button>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. <!-- 我的订单 -->
  69. <view class="contain" v-show="cdshow==1">
  70. <view class="topbilledit" @click="orderTypechange">
  71. <view class="changetime1">
  72. {{myorderType}}
  73. </view>
  74. <view class="changetime2">
  75. <u-icon name="arrow-down-fill" color="#999" size="20"></u-icon>
  76. </view>
  77. </view>
  78. <view class="u-listdata">
  79. <view style="padding:16rpx 0 16rpx 32rpx">
  80. 共有 <span style="color: red">{{orderTotalnumber}}</span>条记录
  81. </view>
  82. <u-list @scrolltolower="orderScrolltolower" :pagingEnabled='true' style="height:400px;flex:1;">
  83. <u-list-item v-for="(item, index) in orderList" :key="index">
  84. <view class="paisong2" @click="orderDetail(item)">
  85. <view class="status" v-if='item.status==0' style="background-color: #FF9C27;">
  86. 待支付
  87. </view>
  88. <view class="status" v-if='item.status==1'>
  89. 已支付
  90. </view>
  91. <view class="status" v-if="item.status=='-1'" style="background-color: #9DA0AC;">
  92. 已关闭
  93. </view>
  94. <view class="subtit" style="margin-top: 20rpx;">
  95. 支付金额: <span>¥{{item.payAmount}}</span>
  96. </view>
  97. <view class="subtit" v-if="status=='1'">
  98. 支付时间: {{item.payAt}}
  99. </view>
  100. <view class="subtit">
  101. 下单时间: {{item.createDate}}
  102. </view>
  103. <view class="subtit">
  104. 交易类型: 微信支付
  105. </view>
  106. <view class="operation" v-if="item.status==0">
  107. <text @click.stop="cancle(item.id,index)">取消订单</text>
  108. <text class="p2">继续付款</text>
  109. </view>
  110. </view>
  111. </u-list-item>
  112. </u-list>
  113. </view>
  114. </view>
  115. <!--缴费记录 -->
  116. <view class="contain" v-show="cdshow==2">
  117. <!-- 列表 -->
  118. <view class="u-listdata">
  119. <view class="topbilledit" @click="typechange">
  120. <view class="changetime1">
  121. {{mytype}}
  122. </view>
  123. <view class="changetime2">
  124. <u-icon name="arrow-down-fill" color="#999" size="20"></u-icon>
  125. </view>
  126. </view>
  127. <view style="padding:16rpx 0 0 30rpx">
  128. 共有 <span style="color: red">{{totalnumber}}</span>条记录
  129. </view>
  130. <u-list @scrolltolower="scrolltolower2" :pagingEnabled='true'
  131. style="height:400px;flex:1;padding-bottom: 49px;">
  132. <u-list-item v-for="(item, index) in indexList2" :key="index">
  133. <view class="paisong2">
  134. <view class="status" v-if="item.type=='Subsidy'">
  135. 补助
  136. </view>
  137. <view class="status s2" v-if="item.type=='PreStorage'">
  138. 预存
  139. </view>
  140. <view class="status s3" v-if="item.type=='Refund'">
  141. 退费
  142. </view>
  143. <view class="status s4" v-if="item.type=='Water'">
  144. 水费
  145. </view>
  146. <view class="status s4" v-if="item.type=='Elec'">
  147. 电费
  148. </view>
  149. <view class="status s4" v-if="item.type=='PropertyFee'">
  150. 物业费
  151. </view>
  152. <div class="title">{{item.tenantInfo.name}}</div>
  153. <view class="subtit">
  154. 扣缴金额:{{item.amount}}
  155. </view>
  156. <view class="subtit">
  157. 账户金额:{{item.surplus}}
  158. </view>
  159. <view class="subtit">
  160. 租户电话:{{item.tenantInfo.tel}}
  161. </view>
  162. <view class="subtit">
  163. 操作人:{{item.createName}}
  164. </view>
  165. <view class="subtit">
  166. 扣缴时间:{{item.createDate}}
  167. </view>
  168. </view>
  169. </u-list-item>
  170. </u-list>
  171. <view class="Predeposit" v-show="Predepositshow">
  172. <span @click="Predeposit">预存</span>
  173. </view>
  174. </view>
  175. </view>
  176. <u-picker :show="showtype" itemHeight="76" :columns="columnstype" keyName="dictLabel" @confirm="confirmtype"
  177. @cancel='canceltype'></u-picker>
  178. <!-- <text>请选择支付方式</text> -->
  179. <u-popup :show="showpay" @close="closepay" mode="bottom" :round="10" :closeable=true :closeOnClickOverlay=true>
  180. <view class="paytall">
  181. <view class="hejitop">
  182. ¥ {{heji}}
  183. </view>
  184. <view class="zhifufs">
  185. <u-radio-group v-model="zhifufangshi" placement="column" iconPlacement="right">
  186. <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
  187. :label="item.name" :name="item.id">
  188. </u-radio>
  189. </u-radio-group>
  190. </view>
  191. <view style="margin: 0 30rpx;">
  192. <u-button type="primary" text="确认支付" @click="Confirmationpayment"></u-button>
  193. </view>
  194. </view>
  195. </u-popup>
  196. <!-- 充值提示框 -->
  197. <u-modal :show="showjiaofei" title="提示" content='当前账户余额不足,请问是否充值?' @confirm="jiaofeiconfirm"
  198. @cancel='cancleJiaofei()' :showCancelButton=true>
  199. </u-modal>
  200. <!-- 支付框 -->
  201. <view class="canys" v-if="zhifucanvas">
  202. <h4>请用微信扫码二维码</h4>
  203. <canvas class="zhifucanvas" canvas-id='canvas'></canvas>
  204. <view class="guanbi">
  205. <u-button type="primary" :plain="true" text="关闭" style="border:none" @click="guanbi"></u-button>
  206. </view>
  207. </view>
  208. <!-- 预存 -->
  209. <u-popup :show="showpayjine" @close="closepay1" mode="bottom" :round="10" :closeable=true
  210. :closeOnClickOverlay=true>
  211. <view class="paytall1" style="padding-bottom: 20rpx;">
  212. <view class="hejitop">
  213. 预存
  214. </view>
  215. <view class="zhifufs">
  216. <u--form labelWidth="30" labelPosition="left" :model="model1" :rules="rules" ref="uForm">
  217. <u-form-item label="¥" prop="userInfo.amount" ref="item1">
  218. <u--input v-model="model1.userInfo.amount" border="none" placeholder="点击输入金额"></u--input>
  219. </u-form-item>
  220. </u--form>
  221. </view>
  222. <view style="margin:0 32rpx">
  223. <u-button type="primary" text="确认支付" @click="Confirmationpaymentjine"></u-button>
  224. </view>
  225. </view>
  226. </u-popup>
  227. <!-- 订单类型 -->
  228. <u-picker :show="orderShowtype" :itemHeight="80" :columns="orderColumnstype" keyName="label"
  229. @confirm="orderConfirmtype" @cancel='orderCanceltype'>
  230. </u-picker>
  231. <u-notify ref="uNotify" message=""></u-notify>
  232. </view>
  233. </template>
  234. <script>
  235. import {
  236. methods
  237. } from '../../../uni_modules/uview-ui/libs/mixin/mixin';
  238. var QRCode = require('@/utils/qrcode.js');
  239. const BaseApi = require("@/http/baseApi.js");
  240. export default {
  241. name: 'Workordertodone',
  242. data() {
  243. const currentDate = this.getDate({
  244. format: 'yyyy-mm'
  245. })
  246. return {
  247. that: this,
  248. billstype: [],
  249. PropertyTypedata: [],
  250. tabs: [{
  251. name: '账单明细',
  252. }, {
  253. name: '我的订单',
  254. }, {
  255. name: '扣缴记录'
  256. }],
  257. model1: {
  258. userInfo: {
  259. amount: '',
  260. },
  261. },
  262. rules: {
  263. 'userInfo.amount': {
  264. type: 'string',
  265. required: true,
  266. message: '请填写预存金额',
  267. trigger: ['blur', 'change']
  268. },
  269. },
  270. showMore: false,
  271. Predepositshow: true,
  272. showpayjine: false,
  273. zhifucanvas: false,
  274. radiolist1: [],
  275. radiovalue1: '微信',
  276. showjiaofei: false,
  277. showpay: false,
  278. myday: currentDate,
  279. totalnumber: 0,
  280. jfnodata: false,
  281. showtype: false,
  282. //账单明细
  283. billIds: [],
  284. // 订单
  285. myorderType: '类型',
  286. orderPd: true,
  287. orderShowtype: false,
  288. orderTotalnumber: 0,
  289. orderList: [],
  290. orderDataForm: {
  291. status: "",
  292. page: 1,
  293. limit: 10,
  294. },
  295. orderColumnstype: [
  296. [{
  297. label: '全部',
  298. id: ''
  299. }, {
  300. label: '已关闭',
  301. id: '-1'
  302. },
  303. {
  304. label: '待支付',
  305. id: '0'
  306. },
  307. {
  308. label: '已支付',
  309. id: '1'
  310. },
  311. ]
  312. ],
  313. //end
  314. //扣缴记录
  315. mytype: '扣缴类型',
  316. indexList2: [],
  317. dataForm: {
  318. tenantId: '',
  319. costCycle: currentDate,
  320. type: '',
  321. page: 1,
  322. limit: 10,
  323. },
  324. cdshow: 0,
  325. current: 0,
  326. zhanghuyue: 0,
  327. heji: 0,
  328. indexList1: [],
  329. nodata: true,
  330. pd: true,
  331. zhifufangshi: '',
  332. columnstype: [],
  333. PropertyType: [],
  334. }
  335. },
  336. //监听页面加载,其参数为上个页面传递的数据,参数类型为 Object(用于页面传参
  337. onLoad: function(options) { //option为object类型,会序列化上个页面传递的参数
  338. let userInfo = JSON.parse(decodeURIComponent(options.info));
  339. this.dataForm.tenantId = userInfo.tenantId;
  340. var getDictDataList = uni.getStorageSync('getDictDataList');
  341. this.billstype = getDictDataList.filter((item) => item.dictType == 'PayType');
  342. this.columnstype = [this.billstype[0].dataList];
  343. this.PropertyTypedata = getDictDataList.filter((item) => item.dictType == 'PropertyType');
  344. this.PropertyType = [this.PropertyTypedata]
  345. // for (let i = 0; i < getDictDataList.length; i++) {
  346. // if (getDictDataList[i].dictType == 'PayType') {
  347. // this.columnstype = [getDictDataList[i].dataList]
  348. // }
  349. // if (getDictDataList[i].dictType == 'PropertyType') {
  350. // this.PropertyType = [getDictDataList[i].dataList]
  351. // }
  352. // }
  353. this.getpaisongdata(); //账单明细
  354. },
  355. //监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
  356. onReady() {},
  357. //监听页面隐藏
  358. onHide() {},
  359. //监听窗口尺寸变化
  360. onResize() {},
  361. //监听页面卸载
  362. onUnload() {},
  363. //监听用户下拉动作,一般用于下拉刷新
  364. onPullDownRefresh() {},
  365. filters: {
  366. getDictLab(v, that) {
  367. let val = that.billstype[0].dataList.filter((item) => item.dictValue == v);
  368. if (val && val[0]) {
  369. return val[0].dictLabel;
  370. }
  371. },
  372. getDictLab2(v, that) {
  373. let val = that.PropertyTypedata[0].dataList.filter((item) => item.dictValue == v);
  374. if (val && val[0]) {
  375. return val[0].dictLabel || '11';
  376. }
  377. }
  378. },
  379. methods: {
  380. guanbi() {
  381. this.zhifucanvas = false;
  382. this.dataForm.page = 1;
  383. this.indexList1 = [];
  384. this.getpaisongdata();
  385. },
  386. // 创建订单
  387. createOrder(postdata, type) {
  388. uni.request({
  389. url: BaseApi.BaseApi + '/pay/createOrder',
  390. method: "POST",
  391. data: postdata,
  392. header: {
  393. 'content-type': 'application/x-www-form-urlencoded',
  394. "token": uni.getStorageSync('tokendata'),
  395. },
  396. success: (res) => {
  397. if (type) {
  398. let qrcode = new QRCode('canvas', {
  399. text: res.data.codeUrl, // weixin://wxpay/bizpayurl?pr=sZz****
  400. width: 213,
  401. height: 213,
  402. colorDark: "black",
  403. colorLight: "white",
  404. correctLevel: QRCode.CorrectLevel.H,
  405. });
  406. }
  407. }
  408. });
  409. },
  410. //确认预存
  411. Confirmationpaymentjine() {
  412. this.$refs.uForm.validate().then(res => {
  413. this.zhifucanvas = true;
  414. this.showpayjine = false;
  415. this.Predepositshow = false;
  416. let postdata = {
  417. totalFee: this.model1.userInfo.amount,
  418. tenantId: this.dataForm.tenantId,
  419. tradeType: 'NATIVE',
  420. billIds: ''
  421. }
  422. this.createOrder(postdata, 1);
  423. }).catch(errors => {
  424. //Funi.$u.toast('校验失败')
  425. })
  426. },
  427. Predeposit() {
  428. this.showpayjine = true;
  429. },
  430. queryOrder1() {
  431. this.Predepositshow = true;
  432. this.zhifucanvas = false;
  433. this.indexList1 = [];
  434. this.dataForm.page = 1;
  435. this.getpaisongdata();
  436. },
  437. queryOrder2() {
  438. this.Predepositshow = true;
  439. this.zhifucanvas = false;
  440. this.indexList2 = [];
  441. this.dataForm.page = 1;
  442. this.getpayrecord();
  443. },
  444. //提交订单
  445. Confirmationpayment() {
  446. this.showpay = false;
  447. if (this.zhifufangshi == 'zhanghu') {
  448. //余额是否足够支付,不够提示充值
  449. let billIdslist = this.billIds;
  450. if (this.zhanghuyue >= this.heji) {
  451. let postdata = {
  452. amount: String(this.heji),
  453. tenantId: this.dataForm.tenantId,
  454. payType: 'Account',
  455. billIds: billIdslist
  456. }
  457. this.$api.post('/billinfo/billPay', postdata)
  458. .then(res => {
  459. if (res.data.code == 0) {
  460. this.$refs.uNotify.success(res.data.msg)
  461. this.showpay = false;
  462. this.indexList1 = [];
  463. this.dataForm.page = 1;
  464. this.getpaisongdata();
  465. } else {
  466. this.$refs.uNotify.error(res.data.msg)
  467. this.showpay = false;
  468. }
  469. })
  470. } else if (this.zhanghuyue < this.heji) {
  471. let postdata = {
  472. totalFee: this.heji,
  473. tenantId: this.dataForm.tenantId,
  474. tradeType: 'NATIVE',
  475. billIds: billIdslist
  476. }
  477. this.createOrder(postdata)
  478. this.showjiaofei = true;
  479. }
  480. } else if (this.zhifufangshi == 'weixin') {
  481. this.zhifucanvas = true;
  482. this.showpay = false;
  483. let billIdslist = this.billIds.join(',');
  484. let postdata = {
  485. totalFee: this.heji,
  486. tenantId: this.dataForm.tenantId,
  487. tradeType: 'NATIVE',
  488. billIds: billIdslist
  489. }
  490. this.createOrder(postdata, 1);
  491. }
  492. this.heji = 0;
  493. },
  494. //确认提前缴费
  495. jiaofeiconfirm() {
  496. this.showpayjine = true;
  497. this.showjiaofei = false;
  498. this.dataForm.page = 1;
  499. this.indexList1 = [];
  500. this.getpaisongdata();
  501. },
  502. // 取消缴费
  503. cancleJiaofei() {
  504. this.showjiaofei = false;
  505. this.dataForm.page = 1;
  506. this.indexList1 = [];
  507. this.getpaisongdata();
  508. },
  509. Immediatepayment() {
  510. //获取账户余额
  511. this.$api.get('/accountinfo/detail/' + this.dataForm.tenantId, {})
  512. .then(res => {
  513. this.zhanghuyue = res.data.data.amount;
  514. this.showpay = true;
  515. this.radiolist1 = [{
  516. name: '微信',
  517. disabled: false,
  518. id: 'weixin',
  519. },
  520. {
  521. name: '账户余额' + '(可用¥' + this.zhanghuyue + ')',
  522. disabled: false,
  523. id: 'zhanghu'
  524. },
  525. ]
  526. })
  527. },
  528. closepay() {
  529. this.showpay = false
  530. },
  531. closepay1() {
  532. this.showpayjine = false
  533. },
  534. //勾选账单明细
  535. checkItem(e) {
  536. e.check = !e.check;
  537. if (e.check) {
  538. this.heji += e.amount;
  539. for (let i = 0; i < e.billLists.length; i++) {
  540. this.billIds.push(e.billLists[i].id);
  541. }
  542. } else {
  543. if (this.heji > 0) {
  544. this.heji -= e.amount;
  545. }
  546. for (let i = 0; i < e.billLists.length; i++) {
  547. let ind = this.billIds.indexOf(e.billLists[i].id);
  548. if (ind > -1) {
  549. this.billIds.splice(ind, 1);
  550. }
  551. }
  552. }
  553. },
  554. // 我的订单
  555. cancle(id, ind) {
  556. let that = this;
  557. uni.request({
  558. url: BaseApi.BaseApi + '/pay/closeOrder/' + id,
  559. methods: 'get',
  560. success(res) {
  561. if (res.data.returnCode == "SUCCESS") {
  562. that.orderList.splice(ind, 1);
  563. }
  564. }
  565. })
  566. },
  567. dateChange(e) {
  568. this.myday = e.target.value;
  569. this.dataForm.costCycle = e.target.value;
  570. this.dataForm.page = 1;
  571. this.indexList1 = [];
  572. this.getpaisongdata();
  573. },
  574. sectionChange(val) {
  575. this.current = val.index;
  576. if (val.index == 0) {
  577. this.cdshow = 0;
  578. this.indexList1 = [];
  579. this.dataForm.page = 1;
  580. this.getpaisongdata();
  581. } else if (val.index == 1) {
  582. this.cdshow = 1;
  583. this.orderList = [];
  584. this.orderDataForm.page = 1;
  585. this.getorderList();
  586. } else if (val.index == 2) {
  587. this.cdshow = 2;
  588. this.indexList2 = [];
  589. this.dataForm.page = 1;
  590. this.getpayrecord();
  591. }
  592. },
  593. scrolltolower() {
  594. if (this.pd) {
  595. this.getpaisongdata();
  596. } else {
  597. return
  598. }
  599. },
  600. scrolltolower2() {
  601. if (this.pd) {
  602. this.getpayrecord();
  603. } else {
  604. return
  605. }
  606. },
  607. getpayrecord() {
  608. this.$api.get('/payrecord/page', this.dataForm)
  609. .then(res => {
  610. this.totalnumber = res.data.data.total;
  611. if (res.data.data.list.length != 0) {
  612. this.indexList2.push(...res.data.data.list);
  613. this.dataForm.page = this.dataForm.page + 1;
  614. this.pd = true;
  615. this.jfnodata = false;
  616. } else {
  617. uni.showToast({
  618. title: '暂无更多数据了',
  619. icon: 'none',
  620. duration: 1500
  621. })
  622. this.pd = false;
  623. }
  624. })
  625. },
  626. getpaisongdata() {
  627. this.$api.post('/billinfo/billDetail', this.dataForm)
  628. .then(res => {
  629. this.totalnumber = res.data.data.length;
  630. if (res.data.data.length != 0) {
  631. for (let i = 0; i < res.data.data.length; i++) {
  632. res.data.data[i].check = false;
  633. res.data.data[i].showMore = false;
  634. }
  635. this.indexList1.push(...res.data.data);
  636. this.dataForm.page = this.dataForm.page + 1;
  637. this.pd = true;
  638. this.jfnodata = false;
  639. } else {
  640. if (this.dataForm.page != 1) {
  641. uni.showToast({
  642. title: '暂无更多数据了',
  643. icon: 'none',
  644. duration: 1500
  645. })
  646. }
  647. this.pd = false;
  648. }
  649. })
  650. },
  651. getDate(type) {
  652. const date = new Date();
  653. let year = date.getFullYear();
  654. let month = date.getMonth();
  655. if (type === 'start') {
  656. year = year - 60;
  657. } else if (type === 'end') {
  658. year = year + 2;
  659. }
  660. month = month > 9 ? month : '0' + month;
  661. // day = day > 9 ? day : '0' + day;
  662. return `${year}-${month}`;
  663. },
  664. typechange() {
  665. this.showtype = true;
  666. },
  667. confirmtype(e) {
  668. this.indexList2 = [];
  669. this.showtype = false;
  670. if (e.value[0].dictValue == 'all') {
  671. this.mytype = e.value[0].dictLabel;
  672. this.dataForm.type = '';
  673. this.dataForm.page = 1;
  674. this.getpayrecord();
  675. } else {
  676. this.mytype = e.value[0].dictLabel;
  677. this.dataForm.type = e.value[0].dictValue;
  678. this.dataForm.page = 1;
  679. this.getpayrecord();
  680. }
  681. },
  682. canceltype() {
  683. this.showtype = false;
  684. },
  685. // 订单
  686. orderDetail(e) {
  687. uni.navigateTo({
  688. url: `/pages/my/Myorder/Orderdetails/Orderdetails?companyOrgId=${e.id}`
  689. });
  690. },
  691. orderScrolltolower() {
  692. if (this.orderPd) {
  693. this.getorderList();
  694. } else {
  695. return
  696. }
  697. },
  698. getorderList() {
  699. this.$api.get('/order/page', this.orderDataForm)
  700. .then(res => {
  701. this.orderTotalnumber = res.data.data.total;
  702. if (res.data.data.list.length != 0) {
  703. this.orderList.push(...res.data.data.list);
  704. this.orderDataForm.page = this.orderDataForm.page + 1;
  705. this.orderPd = true;
  706. } else {
  707. uni.showToast({
  708. title: '暂无更多数据了',
  709. icon: 'none',
  710. duration: 1500
  711. })
  712. this.orderPd = false;
  713. }
  714. })
  715. },
  716. orderCanceltype() {
  717. this.orderShowtype = false;
  718. },
  719. orderConfirmtype(e) {
  720. this.orderShowtype = false;
  721. this.myorderType = e.value[0].label;
  722. this.orderDataForm.status = e.value[0].id;
  723. this.orderList = [];
  724. this.orderDataForm.page = 1;
  725. this.getorderList();
  726. },
  727. orderTypechange() {
  728. this.orderShowtype = true;
  729. },
  730. }
  731. }
  732. </script>
  733. <style lang="scss">
  734. .Predeposit {
  735. position: fixed;
  736. bottom: 0;
  737. left: 0;
  738. right: 0;
  739. height: 98rpx;
  740. line-height: 98rpx;
  741. width: 750rpx;
  742. background-color: #fff;
  743. text-align: center;
  744. color: #2E69EB;
  745. box-shadow: 0 -6px 12px 0 rgba(153, 153, 153, 0.10);
  746. }
  747. .nodata {
  748. text-align: center;
  749. padding-top: 400rpx;
  750. }
  751. .zhifucanvas {
  752. width: 400rpx;
  753. height: 400rpx;
  754. margin: 0 auto;
  755. }
  756. .canys {
  757. width: 500rpx;
  758. height: 600rpx;
  759. position: fixed;
  760. top: 30%;
  761. left: 0;
  762. right: 0;
  763. margin: 0 auto;
  764. background: #e6e6e6;
  765. h4 {
  766. width: 500rpx;
  767. text-align: center;
  768. height: 80rpx;
  769. line-height: 80rpx;
  770. }
  771. }
  772. .guanbi {
  773. margin-top: 50rpx;
  774. }
  775. .zhifufs {
  776. padding: 10rpx 60rpx 30px;
  777. ::v-deep .u-radio-label--right {
  778. margin-top: 30rpx;
  779. }
  780. ::v-deep .uni-input-placeholder {
  781. text-align: left
  782. }
  783. ::v-deep .u-radio__icon-wrap {
  784. width: 40rpx !important;
  785. height: 40rpx !important;
  786. }
  787. ::v-deep .u-radio__text {
  788. font-size: 32rpx !important;
  789. }
  790. }
  791. .hejitop {
  792. text-align: center;
  793. border-bottom: 1px solid #eee;
  794. padding: 48rpx 0 24rpx;
  795. font-size: 32rpx;
  796. }
  797. .paytall {
  798. padding: 12px 0;
  799. }
  800. .heji span {
  801. color: #ED3A25;
  802. }
  803. .likezhifu {
  804. margin-left: 20rpx;
  805. margin-right: 30rpx;
  806. }
  807. .zhifu {
  808. position: fixed;
  809. right: 0;
  810. bottom: 0;
  811. left: 0;
  812. height: 98rpx;
  813. background-color: #fff;
  814. display: flex;
  815. align-items: center;
  816. justify-content: flex-end;
  817. .zhifuright {
  818. display: flex;
  819. align-items: center;
  820. justify-content: flex-end;
  821. }
  822. }
  823. .page {
  824. height: 100%;
  825. overflow: hidden;
  826. .contain {
  827. height: calc(100% - 44px);
  828. padding: 0;
  829. display: flex;
  830. flex-direction: column;
  831. .u-listdata {
  832. height: 400px;
  833. flex: 1;
  834. display: flex;
  835. flex-direction: column;
  836. }
  837. }
  838. }
  839. .paisong,
  840. .paisong2 {
  841. display: flex;
  842. flex-direction: column;
  843. justify-content: center;
  844. background-color: #fff;
  845. margin: 0 16px 24rpx;
  846. padding: 12px 16px 12px 34px;
  847. border-radius: 4px;
  848. position: relative;
  849. .iconBtn {
  850. position: absolute;
  851. top: 32rpx;
  852. right: 32rpx;
  853. z-index: 1;
  854. }
  855. .title {
  856. width: 90%;
  857. font-size: 32rpx;
  858. color: #0C1935;
  859. margin-bottom: 16rpx;
  860. span {
  861. position: relative;
  862. }
  863. .txt {
  864. color: #FA5555;
  865. font-weight: 600;
  866. }
  867. .status {
  868. width: 50px;
  869. padding: 3px 3px 10px 3px;
  870. text-align: center;
  871. font-size: 13px;
  872. color: #fff;
  873. background-color: #09C700;
  874. border-radius: 11px;
  875. position: absolute;
  876. right: -50px;
  877. top: -10px;
  878. transform: scale(0.8);
  879. &.s1 {
  880. background: url('@/static/imgs/paySuccess.png') no-repeat;
  881. background-size: 100%;
  882. }
  883. &.s2 {
  884. background: url('@/static/imgs/payerror.png') no-repeat;
  885. background-size: 100%;
  886. }
  887. }
  888. }
  889. .subtit {
  890. color: #9DA0AC;
  891. margin-bottom: 6rpx;
  892. }
  893. .check {
  894. position: absolute;
  895. left: 16rpx;
  896. top: 24rpx;
  897. z-index: 1;
  898. font-size: 0;
  899. transform: scale(.7)
  900. }
  901. }
  902. .paisong2 {
  903. display: flex;
  904. flex-direction: column;
  905. justify-content: center;
  906. background-color: #fff;
  907. margin: 0 16px 24rpx;
  908. padding: 12px 16px;
  909. border-radius: 4px;
  910. position: relative;
  911. .status {
  912. position: absolute;
  913. width: 96rpx;
  914. height: 48rpx;
  915. border-radius: 0 8rpx 0 20rpx;
  916. right: 0;
  917. line-height: 48rpx;
  918. text-align: center;
  919. top: 0;
  920. z-index: 1;
  921. font-size: 22rpx;
  922. background-color: #30D3A2;
  923. color: #fff;
  924. &.s2 {
  925. background-color: #09C700;
  926. }
  927. &.s3 {
  928. background-color: #FA5555;
  929. }
  930. &.s4 {
  931. background-color: #FF9C27;
  932. }
  933. }
  934. }
  935. .topbilledit {
  936. display: flex;
  937. justify-content: center;
  938. align-items: center;
  939. background: #fff;
  940. height: 88rpx;
  941. }
  942. .changetime2 {
  943. padding-left: 10rpx;
  944. }
  945. .operation {
  946. text-align: right;
  947. margin-right: -32rpx;
  948. height: 70rpx;
  949. margin-top: 32rpx;
  950. text {
  951. padding: 6px 12px;
  952. font-size: 12px;
  953. border: 1px solid #D8D8D8;
  954. border-radius: 20px;
  955. margin-right: 16px;
  956. &.p2 {
  957. border-color: #2E69EB;
  958. color: #2E69EB;
  959. }
  960. }
  961. }
  962. </style>