applicationForWithdrawal.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726
  1. <template>
  2. <view>
  3. <u-tabs class="jputabs" name="cate_name" gutter="200" bar-width="100" active-color="#101010"
  4. inactive-color="#A1A1A1" :list="tabList" :is-scroll="false" :current="current" @change="change"></u-tabs>
  5. <u-navbar title="提现申请单" style="
  6. margin-bottom: 40px;
  7. ">
  8. </u-navbar>
  9. <template v-if="current==0">
  10. <view class="withdraw">
  11. <view class="withdraw-head">
  12. <b class="asterisk"><text>*</text>申请站点</b>
  13. <span>
  14. <picker @change="bindPickerChange1" range-key="name" :range="stationList" >
  15. <view class="uni-input">
  16. <view class="input-text">
  17. {{stationObj.name?stationObj.name:'无站点'}}
  18. </view>
  19. <view class="iconfont more">
  20. &#xe600;
  21. </view>
  22. </view>
  23. </picker>
  24. </span>
  25. </view>
  26. <view class="withdraw-head">
  27. <b class="asterisk"><text>*</text>提现事由</b>
  28. <span>
  29. <picker @change="bindPickerChange2" range-key="name" :range="applicationList" >
  30. <view class="uni-input">{{applicationList[info.applicationType].name}}<text class="iconfont more">
  31. &#xe600;
  32. </text></view>
  33. </picker>
  34. </span>
  35. </view>
  36. <view class="withdraw-head">
  37. <b class="asterisk"><text>*</text>提现月份</b>
  38. <span>
  39. <picker @change="bindPickerChange3" mode = "date" fields="month" :end="nowTime" :value="queryTime" >
  40. <view class="uni-input">{{showTime(queryTime)}}<text class="iconfont more">
  41. &#xe600;
  42. </text></view>
  43. </picker>
  44. </span>
  45. </view>
  46. <view class="withdraw-head ">
  47. <b>充电分成</b><span>2601.62元</span>
  48. </view>
  49. <view class="withdraw-head border-n">
  50. <b>分润提现明细表</b><span class="download">
  51. <u-icon name="download"></u-icon> 下载
  52. </span>
  53. </view>
  54. </view>
  55. <view class="withdraw">
  56. <view class="withdraw-head">
  57. <b class="asterisk"><text>*</text>电单价</b>
  58. <text class="unit" style="float: right;font-size: 16px;">元/度</text>
  59. <span class="withdraw-input" style="width: 63%;">
  60. <u-input height="20px"
  61. v-model="info.electricityPrice"
  62. placeholder="请填写价格" input-align="left" type="digit">
  63. </u-input>
  64. </span>
  65. </view>
  66. <view class="withdraw-head">
  67. <b class="asterisk"><text>*</text>实际电量</b>
  68. <text class="unit" style="float: right;font-size: 16px;">度</text>
  69. <span class="withdraw-input" style="width: 63%;">
  70. <u-input height="20px" placeholder="请填写度数"
  71. v-model="info.electricQuantity"
  72. input-align="left" type="digit">
  73. </u-input>
  74. </span>
  75. </view>
  76. <view class="withdraw-head border-n">
  77. <b>电费成本</b>
  78. <text class="unit" style="float: right;font-size: 16px;">元</text>
  79. <span class="withdraw-input" style="width: 63%;">
  80. <view v-show="electricityPriceX">{{electricityPriceX}}</view>
  81. <view class="classFFF" v-show="!electricityPriceX">自动计算出结果</view>
  82. </span>
  83. </view>
  84. </view>
  85. <view class="withdraw">
  86. <view class="withdraw-head">
  87. <b>充电分成比例</b>
  88. <span>
  89. 96.2%
  90. </span>
  91. </view>
  92. <view class="withdraw-head">
  93. <b>充电分成</b>
  94. <span>
  95. 2502.72元
  96. </span>
  97. </view>
  98. <view class="withdraw-head border-n">
  99. <b>充电服务收益</b>
  100. <span>
  101. 286.59元
  102. </span>
  103. </view>
  104. </view>
  105. <view class="withdraw">
  106. <view class="withdraw-head">
  107. <b>包月卡分润笔数</b>
  108. <span>
  109. 1笔
  110. </span>
  111. </view>
  112. <view class="withdraw-head border-n">
  113. <b>包月卡收益</b>
  114. <span>
  115. 57.62元
  116. </span>
  117. </view>
  118. </view>
  119. <view class="withdraw">
  120. <view class="withdraw-head">
  121. <b>合伙人总收入</b>
  122. <span>
  123. 2560.35元
  124. </span>
  125. </view>
  126. <view class="withdraw-head border-n">
  127. <b>合伙人总收益</b>
  128. <span>
  129. 344.21元
  130. </span>
  131. </view>
  132. </view>
  133. <view class="withdraw">
  134. <view class="withdraw-head">
  135. <b>是否开票</b><span>
  136. <u-radio-group>
  137. <u-radio v-for="(item, index) in list2" style="margin-right: 16px;" :key="index+'a'"
  138. :name="item.value" :disabled="item.disabled" active-color="blue">
  139. {{item.name}}
  140. </u-radio>
  141. </u-radio-group>
  142. </span>
  143. </view>
  144. <view class="withdraw-head">
  145. <b>发票类型</b><span>
  146. <u-radio-group>
  147. <u-radio v-for="(item, index) in list1" :key="index+'a'" :name="item.value"
  148. :disabled="item.disabled" active-color="blue">
  149. {{item.name}}
  150. </u-radio>
  151. </u-radio-group>
  152. </span>
  153. </view>
  154. <view class="withdraw-head border-n">
  155. <b class="asterisk"><text>*</text>发票税率</b>
  156. <text style="float: right;font-size: 16px;">%</text>
  157. <span class="withdraw-input" style="width: 58%;">
  158. <u-input height="20px" placeholder="请输入开票税率" input-align="left" type="digit">
  159. </u-input>
  160. </span>
  161. </view>
  162. </view>
  163. <view class="withdraw">
  164. <view class="withdraw-head ">
  165. <b class="asterisk"><text>*</text>申请提现金额</b>
  166. <text class="unit" style="float: right;font-size: 16px;">元</text>
  167. <span class="withdraw-input" style="width: 63%;">
  168. <u-input height="20px"
  169. v-model="info.applicationAmount"
  170. placeholder="请填写金额" input-align="left" type="digit">
  171. </u-input>
  172. </span>
  173. </view>
  174. <view class="withdraw-head border-n">
  175. <b>大写金额</b>
  176. <span class="withdraw-input" style="width: 63%;">
  177. <view v-show="applicationAmountDX">{{applicationAmountDX}}</view>
  178. <view class="classFFF" v-show="!applicationAmountDX">自动转换</view>
  179. </span>
  180. </view>
  181. </view>
  182. <view class="withdraw">
  183. <view class="withdraw-head ">
  184. <b class="asterisk"><text>*</text>提现人收款户名</b>
  185. <u-input class="textarea" type="textarea" placeholder="请填写收款户名" height="96" cursor-spacing="8" />
  186. </view>
  187. <view class="withdraw-head ">
  188. <b class="asterisk"><text>*</text>提现人收款银行</b>
  189. <u-input class="textarea" type="textarea" placeholder="请填写收款银行全称" height="96" cursor-spacing="8" />
  190. </view>
  191. <view class="withdraw-head border-n">
  192. <b class="asterisk"><text>*</text>提现人收款账号</b>
  193. <u-input class="textarea" type="textarea" placeholder="提现人收款账号" height="96" cursor-spacing="8" />
  194. </view>
  195. </view>
  196. </template>
  197. <template v-if="current==1">
  198. <view class="details">
  199. <view class="withdraw">
  200. <view class="withdraw-head">
  201. <b class="asterisk"><text>*</text>项目</b>
  202. <text class="unit" style="float: right;font-size: 16px;">
  203. <i class="ri-indeterminate-circle-fill" style="color: red;font-size: 24px;"></i>
  204. </text>
  205. <span class="withdraw-input" style="width: 80%;">
  206. <u-input height="20px" placeholder="请填写项目名称" input-align="left" type="digit">
  207. </u-input>
  208. </span>
  209. </view>
  210. <view class="withdraw-head border-n">
  211. <b class="asterisk"><text>*</text>金额</b>
  212. <text class="unit" style="float: right;font-size: 16px;">元</text>
  213. <span class="withdraw-input" style="width: 80%;">
  214. <u-input height="20px" placeholder="请填写价格" input-align="left" type="digit">
  215. </u-input>
  216. </span>
  217. </view>
  218. <view class="withdraw-head border-n">
  219. <b>备注</b>
  220. <span class="withdraw-input" style="width: 80%;">
  221. <u-input height="20px" placeholder="请填写备注信息" input-align="left" type="digit">
  222. </u-input>
  223. </span>
  224. </view>
  225. </view>
  226. </view>
  227. <view class="add"><i class="ri-add-circle-fill"></i><text>增加项目</text></view>
  228. </template>
  229. <view class="applyBtn">
  230. <u-button class="save">保存草稿</u-button>
  231. <u-button class="submit">提交申请单</u-button>
  232. </view>
  233. </view>
  234. </template>
  235. <script>
  236. import * as API from '@/apis/finance.js'
  237. import {
  238. beforeTimeStamp,
  239. parseUnixTime,
  240. substrMb,DX
  241. } from '@/utils'
  242. export default {
  243. data() {
  244. return {
  245. isPt: false,
  246. info: {
  247. electricityPrice:'',
  248. electricQuantity:'',
  249. stationId:"",
  250. applicationType:'1'
  251. },
  252. applicationList:[
  253. {
  254. name: '物业结算',
  255. value:"1"
  256. }, {
  257. name: '市场费用',
  258. value:"2"
  259. },{
  260. name: '利润提现',
  261. value:"3"
  262. }
  263. ],
  264. stationList: [],
  265. queryTime:'',
  266. nowTime:'',
  267. stationObj: {},
  268. current: 0, // tabs组件的current值,表示当前活动的tab选项
  269. params: {
  270. year: true,
  271. month: true,
  272. day: false,
  273. hour: false,
  274. minute: false,
  275. second: false,
  276. timestamp: false,
  277. },
  278. list1: [{
  279. name: '普票',
  280. value:"1"
  281. }, {
  282. name: '专票',
  283. value:"2"
  284. },{
  285. name: '收据',
  286. value:"3"
  287. }],
  288. list2: [{
  289. name: '是',
  290. value: "1"
  291. }, {
  292. name: '否 ',
  293. value: "0"
  294. }],
  295. tabList: [{
  296. name: '申请单主表'
  297. }, {
  298. name: '提现明细'
  299. }],
  300. }
  301. },
  302. onShow(){
  303. },
  304. onReady() {
  305. var nowTime=parseUnixTime(new Date(),"{y}-{m}-01")
  306. this.queryTime=parseUnixTime(beforeTimeStamp(1,new Date(nowTime)), '{y}-{m}')
  307. this.nowTime=parseUnixTime(beforeTimeStamp(1,new Date(nowTime)), '{y}-{m}')
  308. this.getStationList()
  309. },
  310. computed:{
  311. applicationAmountDX(){
  312. if(this.info.applicationAmount){
  313. var c=DX(this.info.applicationAmount)
  314. return c
  315. }else{
  316. return ''
  317. }
  318. },
  319. electricityPriceX(){
  320. if(this.info.electricityPrice!=''&&this.info.electricQuantity!=''){
  321. return (this.info.electricityPrice*this.info.electricQuantity).toFixed(2)
  322. }
  323. return ''
  324. }
  325. },
  326. methods: {
  327. showTime(name){
  328. if(!name){
  329. return ''
  330. }
  331. return name.replace('-','年')+'月';
  332. },
  333. queryWithdrawInfo(){
  334. return;
  335. uni.showLoading({
  336. title: "加载中",
  337. mask: true,
  338. })
  339. API.queryWithdrawInfo({
  340. stationId:this.stationObj.id,
  341. endTime:this.endTime
  342. }).then((res) => {
  343. this.info=res.data;
  344. this.isPt=res.data.isPt;
  345. uni.hideLoading()
  346. }).catch(error => {
  347. uni.showToast({
  348. title: error
  349. })
  350. })
  351. },
  352. getStationList(){
  353. uni.showLoading({
  354. title: "加载中",
  355. mask: true,
  356. })
  357. API.stationList().then((res) => {
  358. this.stationList=res.data.stationList;
  359. if(this.stationList.length){
  360. this.stationObj=this.stationList[0];
  361. this.queryWithdrawInfo()
  362. }
  363. uni.hideLoading()
  364. }).catch(error => {
  365. uni.showToast({
  366. title: error
  367. })
  368. })
  369. },
  370. bindPickerChange1(e){
  371. if(this.stationList[e.detail.value]){
  372. this.stationObj=this.stationList[e.detail.value];
  373. this.queryWithdrawInfo()
  374. }
  375. },
  376. bindPickerChange2(e){
  377. this.info.applicationType=e.detail.value;
  378. this.queryWithdrawInfo()
  379. },
  380. bindPickerChange3(e){
  381. this.queryTime=e.detail.value;
  382. this.queryWithdrawInfo()
  383. },
  384. change(index) {
  385. this.current = index;
  386. }
  387. }
  388. }
  389. </script>
  390. <style>
  391. page {
  392. background-color: #F7F7F7;
  393. padding-bottom: 65px;
  394. }
  395. </style>
  396. <style lang="scss" scoped>
  397. .jputabs {
  398. //position: absolute;
  399. position: fixed;
  400. background-color: #FFF;
  401. width: 100%;
  402. top: 40px;
  403. z-index: 99;
  404. }
  405. .classFFF{
  406. color: #a1a1a1;
  407. }
  408. .download {
  409. color: #185AC6 !important;
  410. }
  411. /deep/.u-tab-bar {
  412. background-color: #0076FF !important;
  413. }
  414. /deep/.u-tabs-scorll-flex {
  415. width: 56%;
  416. margin: 0 auto;
  417. }
  418. .withdraw-tips {
  419. margin: 24px 16px;
  420. p {
  421. color: #999;
  422. margin-top: 4px;
  423. }
  424. }
  425. .uni-input {
  426. font-size: 16px;
  427. color: #333333;
  428. }
  429. .withdraw {
  430. margin-bottom: 8px;
  431. background-color: #fff;
  432. padding: 0px 16px 0 16px;
  433. .withdraw-head {
  434. padding: 16px 0;
  435. border-bottom: 1px solid #E5E7EA;
  436. align-items: center;
  437. position: relative;
  438. .unit {
  439. position: absolute;
  440. top: 34rpx;
  441. right: 0;
  442. }
  443. .whthdraw-price {
  444. font-size: 18px;
  445. color: #101010;
  446. font-weight: 600;
  447. }
  448. b {
  449. color: rgba(119, 119, 119, 100);
  450. font-size: 16px;
  451. }
  452. span {
  453. width: 60%;
  454. float: right;
  455. text-align: left;
  456. font-size: 16px;
  457. color: #333333;
  458. }
  459. @media screen and (max-width:320px) {
  460. span {
  461. width: 55%;
  462. }
  463. }
  464. }
  465. .withdraw-main {
  466. border-top: 1px solid #f7f7f7;
  467. border-bottom: 1px solid #f7f7f7;
  468. margin: 16px 0;
  469. padding: 16px 0;
  470. .withdraw-input {
  471. margin-top: 32px;
  472. display: flex;
  473. align-items: center;
  474. font-size: 28px;
  475. /deep/.uni-input-input {
  476. font-size: 28rpx;
  477. }
  478. }
  479. }
  480. .withdraw-foot {
  481. display: flex;
  482. align-items: center;
  483. p {
  484. color: #999
  485. }
  486. span {
  487. color: #2979FF;
  488. margin-left: 16px;
  489. }
  490. }
  491. }
  492. .more {
  493. color: #B3B3B3;
  494. font-size: 24px
  495. }
  496. .applyBtn {
  497. padding: 0 16px;
  498. display: flex;
  499. background-color: #FFF;
  500. font-size: 16px;
  501. line-height: 44px;
  502. height: 60px;
  503. position: fixed;
  504. bottom: 0;
  505. left: 0;
  506. right: 0;
  507. .save {
  508. width: 33.6%;
  509. border-radius: 8px 0px 0px 8px;
  510. background-color: rgba(0, 185, 98, 100);
  511. color: rgba(255, 255, 255, 100);
  512. }
  513. .submit {
  514. width: 66.4%;
  515. border-radius: 0px 8px 8px 0px;
  516. background-color: rgba(24, 90, 198, 100);
  517. color: rgba(255, 255, 255, 100);
  518. }
  519. }
  520. /deep/.uni-input-input {
  521. text-align: start !important;
  522. }
  523. .border-n {
  524. border: none !important;
  525. }
  526. .textarea {
  527. background-color: rgba(242, 242, 242, 100);
  528. margin-top: 12px;
  529. line-height: 20px;
  530. border-radius: 4px;
  531. color: rgba(136, 136, 136, 100);
  532. .uni-textarea-placeholder {
  533. padding: 0 16rpx;
  534. }
  535. /deep/.uni-textarea-textarea {
  536. width: 90%;
  537. padding: 0 16rpx;
  538. }
  539. }
  540. .details {
  541. margin: 16px;
  542. border-radius: 8px;
  543. background-color: #fff;
  544. overflow: hidden;
  545. }
  546. .asterisk {
  547. position: relative;
  548. text {
  549. position: absolute;
  550. top: 0px;
  551. left: -14rpx;
  552. color: #EE3138;
  553. }
  554. }
  555. .add {
  556. text-align: center;
  557. font-size: 18px;
  558. color: #101010;
  559. display: flex;
  560. align-items: center;
  561. justify-content: center;
  562. .ri-add-circle-fill {
  563. font-size: 24px;
  564. color: #44B371;
  565. margin: auto 0;
  566. margin-right: 4rpx;
  567. }
  568. }
  569. /deep/.u-input__input {
  570. font-size: 16px !important
  571. }
  572. .uni-input {
  573. display: flex;
  574. justify-content: space-between;
  575. }
  576. .input-text {
  577. white-space: nowrap;
  578. overflow: hidden;
  579. text-overflow: ellipsis;
  580. }
  581. </style>