applicationForWithdrawal.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. <template>
  2. <view>
  3. <!-- <view v-if="step==1">
  4. <ujp-navbar title="签名" :custom-back="customback" >
  5. </ujp-navbar>
  6. <signReceipt :obj="0" @signsubmit="submit" ></signReceipt>
  7. </view> -->
  8. <view >
  9. <ujp-navbar title="申请提现"></ujp-navbar>
  10. <businessView1 v-if="info.applicationType==1" :onReadyId="id" @changetabs_app="changetabs" ></businessView1>
  11. <businessView2 v-if="info.applicationType==2" :onReadyId="id" @changetabs_app="changetabs" ></businessView2>
  12. <businessView3 v-if="info.applicationType==3" :onReadyId="id" @changetabs_app="changetabs" ></businessView3>
  13. <view class="withdraw" v-if="tabindex==0" >
  14. <view class="withdraw-head " v-if="!info.invoiceRequired">
  15. <b>是否开票</b>
  16. <span>
  17. <view class="uni-input">{{info.invoiceRequired?'是':'否'}}</view>
  18. </span>
  19. </view>
  20. <view class="withdraw-head " v-if="info.invoiceRequired">
  21. <b>发票类型</b>
  22. <span>
  23. <view class="uni-input" v-if="!info.invoiceType">无</view>
  24. <view class="uni-input" v-else>{{invoiceTypeName}}</view>
  25. </span>
  26. </view>
  27. <view class="withdraw-head border-n " v-if="info.invoiceRequired&&info.invoiceType==1" >
  28. <b>发票税率</b>
  29. <span>
  30. <view class="uni-input">{{info.taxRate?info.taxRate+'%':''}}</view>
  31. </span>
  32. </view>
  33. </view>
  34. <view v-if="tabindex==0&&(info.status!=5||!userInfo.status)" >
  35. <view class="withdraw" v-if="info.applicationType!=3">
  36. <view class="withdraw-head ">
  37. <b class="asterisk">收款户名</b>
  38. <p class="uni-input">{{info.accountName}}</p>
  39. </view>
  40. <view class="withdraw-head ">
  41. <b class="asterisk">收款银行</b>
  42. <p class="uni-input">{{info.bankName}}</p>
  43. </view>
  44. <view class="withdraw-head border-n">
  45. <b class="asterisk">收款账号</b>
  46. <p class="uni-input">{{info.accountNo}}</p>
  47. </view>
  48. </view>
  49. </view>
  50. <view v-if="tabindex==0&&info.status==5&&userInfo.status" >
  51. <view class="withdraw" v-if="info.applicationType!=3" >
  52. <view class="withdraw-head ">
  53. <b class="asterisk"><text>*</text>收款户名</b>
  54. <u-input class="textarea" type="textarea"
  55. v-model="info.accountName"
  56. placeholder="请填写收款户名" height="96" cursor-spacing="8" />
  57. </view>
  58. <view class="withdraw-head ">
  59. <b class="asterisk"><text>*</text>收款银行</b>
  60. <u-input class="textarea" type="textarea"
  61. v-model="info.bankName"
  62. placeholder="请填写收款银行全称" height="96" cursor-spacing="8" />
  63. </view>
  64. <view class="withdraw-head border-n">
  65. <b class="asterisk"><text>*</text>收款账号</b>
  66. <u-input class="textarea" v-model="info.accountNo"
  67. type="textarea" placeholder="请填写收款账号" height="96" cursor-spacing="8" />
  68. </view>
  69. </view>
  70. <u-button v-if="info.applicationType==3"
  71. @click="submit()"
  72. type="primary" >申请提现</u-button>
  73. <u-button v-if="info.applicationType!=3"
  74. @click="submit2()"
  75. type="primary" >申请提现</u-button>
  76. </view>
  77. </view>
  78. </view>
  79. </template>
  80. <script>
  81. import businessView1 from './businessView-1.vue'
  82. import businessView2 from './businessView-2.vue'
  83. import businessView3 from './businessView-3.vue'
  84. //import signReceipt from './signReceipt.vue'
  85. import * as API from '@/apis/finance.js'
  86. import {
  87. DX
  88. } from '@/utils'
  89. export default {
  90. components: {
  91. businessView1,businessView2,businessView3
  92. },
  93. data() {
  94. return {
  95. step:0,
  96. id:'',
  97. tabindex:0,
  98. info:{},
  99. list1: [
  100. {
  101. name: '收据',
  102. value: "3"
  103. },{
  104. name: '普票',
  105. value: "1"
  106. },
  107. // {
  108. // name: '专票',
  109. // value: "2"
  110. // },
  111. ],
  112. list2: [{
  113. name: '是',
  114. value: "1"
  115. }, {
  116. name: '否',
  117. value: "0"
  118. }],
  119. detailList:[],
  120. userInfo:{},
  121. }
  122. },
  123. onLoad(op){
  124. this.userInfo=this.carhelp.getPersonInfo()
  125. if(op.id){
  126. this.id=op.id
  127. this.getInfo()
  128. this.uuid=op.uuid;
  129. }
  130. },computed: {
  131. invoiceTypeName() {
  132. var info = this.list1.find(item => {
  133. console.log(item.value == this.info.invoiceType)
  134. return item.value == this.info.invoiceType
  135. })
  136. if (info) {
  137. return info.name
  138. }
  139. return ''
  140. },
  141. },
  142. watch:{
  143. },
  144. methods: {
  145. customback(){
  146. this.step=0
  147. },
  148. submit2(){
  149. if(!this.info.accountName){
  150. uni.showToast({
  151. title: "请输入收款户名"
  152. })
  153. return
  154. }
  155. if(!this.info.bankName){
  156. uni.showToast({
  157. title: "请输入收款银行"
  158. })
  159. return
  160. }
  161. if(!this.info.accountNo){
  162. uni.showToast({
  163. title: "请输入收款账号"
  164. })
  165. return
  166. }
  167. uni.showLoading({
  168. title: "加载中",
  169. mask: true,
  170. })
  171. this.info.status=5;
  172. //var str=JSON.stringify();
  173. API.applyWithdrawByAccounting({
  174. record:this.info,
  175. detailList:this.detailList
  176. }).then((res) => {
  177. this.carhelp.set("withdrawRecord",{
  178. uuid:this.uuid,
  179. })
  180. this.id=res.data;
  181. uni.hideLoading()
  182. uni.redirectTo({
  183. url:"/pagesFinance/user/withdrawal/signature?id="+this.info.id+"&uuid="+this.uuid
  184. })
  185. }).catch(error => {
  186. uni.hideLoading()
  187. uni.showModal({
  188. title:"提示",
  189. content:error,
  190. showCancel:false
  191. })
  192. })
  193. },
  194. submit(){
  195. uni.showLoading({
  196. title: "加载中",
  197. mask: true,
  198. })
  199. this.info.status=0;
  200. //var str=JSON.stringify();
  201. API.applyWithdrawByAccounting({
  202. record:this.info,
  203. detailList:this.detailList
  204. }).then((res) => {
  205. this.carhelp.set("withdrawRecord",{
  206. uuid:this.uuid,
  207. })
  208. this.id=res.data;
  209. uni.hideLoading()
  210. uni.redirectTo({
  211. url:"/pagesFinance/user/applyResult?value="+this.info.applicationAmount
  212. })
  213. }).catch(error => {
  214. uni.hideLoading()
  215. uni.showModal({
  216. title:"提示",
  217. content:error,
  218. showCancel:false
  219. })
  220. })
  221. },
  222. changetabs(index){
  223. this.tabindex=index
  224. },
  225. getInfo(){
  226. uni.showLoading({
  227. title: "加载中",
  228. mask: true,
  229. })
  230. API.getWithdrawInfoByAccounting(this.id).then((res) => {
  231. this.info=res.data.record
  232. if(this.info.applicationType!=3){
  233. if(this.info.invoiceRequired==null){
  234. this.info.invoiceRequired="1"
  235. this.info.invoiceType="3"
  236. }
  237. }
  238. this.detailList=res.data.detailList
  239. uni.hideLoading()
  240. }).catch(error => {
  241. uni.showToast({
  242. title: error
  243. })
  244. })
  245. },
  246. change(index) {
  247. this.current = index;
  248. }
  249. }
  250. }
  251. </script>
  252. <style>
  253. page {
  254. background-color: #F7F7F7;
  255. padding-bottom: 65px;
  256. }
  257. </style>
  258. <style lang="scss" scoped>
  259. .jputabs {
  260. //position: absolute;
  261. position: fixed;
  262. background-color: #FFF;
  263. width: 100%;
  264. top: 45px;
  265. z-index: 99;
  266. }
  267. .classFFF {
  268. color: #607d8b !important;
  269. }
  270. .download {
  271. color: #185AC6 !important;
  272. }
  273. .download5 {
  274. width: 160rpx !important;
  275. float: right;
  276. color: #185AC6 !important;
  277. }
  278. /deep/.u-tab-bar {
  279. background-color: #0076FF !important;
  280. }
  281. /deep/.u-tabs-scorll-flex {
  282. width: 56%;
  283. margin: 0 auto;
  284. }
  285. .withdraw-tips {
  286. margin: 24px 16px;
  287. p {
  288. color: #999;
  289. margin-top: 4px;
  290. }
  291. }
  292. .uni-input {
  293. font-size: 16px;
  294. color: #333333;
  295. }
  296. .withdraw {
  297. margin-bottom: 8px;
  298. background-color: #fff;
  299. padding: 0px 16px 0 16px;
  300. .withdraw-head {
  301. padding: 24rpx 0;
  302. border-bottom: 1px solid #E5E7EA;
  303. align-items: center;
  304. position: relative;
  305. .unit {
  306. position: absolute;
  307. top: 34rpx;
  308. right: 0;
  309. }
  310. b {
  311. font-weight: normal;
  312. color: rgba(119, 119, 119, 100);
  313. font-size: 36rpx;
  314. }
  315. span {
  316. width: 60%;
  317. float: right;
  318. text-align: left;
  319. font-size: 32rpx;
  320. color: #333333;
  321. }
  322. @media screen and (max-width:320px) {
  323. span {
  324. width: 60%;
  325. }
  326. }
  327. }
  328. .withdraw-main {
  329. border-top: 1px solid #f7f7f7;
  330. border-bottom: 1px solid #f7f7f7;
  331. margin: 16px 0;
  332. padding: 16px 0;
  333. .withdraw-input {
  334. width: 63%;
  335. margin-top: 64rpx;
  336. display: flex;
  337. align-items: center;
  338. font-size: 56rpx;
  339. /deep/.uni-input-input {
  340. font-size: 28rpx;
  341. }
  342. }
  343. }
  344. .withdraw-foot {
  345. display: flex;
  346. align-items: center;
  347. p {
  348. color: #999
  349. }
  350. span {
  351. color: #2979FF;
  352. margin-left: 16px;
  353. }
  354. }
  355. }
  356. .more {
  357. color: #B3B3B3;
  358. font-size: 24px
  359. }
  360. .applyBtn {
  361. padding: 0 16px;
  362. display: flex;
  363. background-color: #FFF;
  364. font-size: 16px;
  365. line-height: 44px;
  366. height: 60px;
  367. position: fixed;
  368. bottom: 0;
  369. left: 0;
  370. right: 0;
  371. .save {
  372. width: 33.6%;
  373. border-radius: 8px 0px 0px 8px;
  374. background-color: rgba(0, 185, 98, 100);
  375. color: rgba(255, 255, 255, 100);
  376. }
  377. .submit {
  378. width: 66.4%;
  379. border-radius: 0px 8px 8px 0px;
  380. background-color: rgba(24, 90, 198, 100);
  381. color: rgba(255, 255, 255, 100);
  382. }
  383. }
  384. /deep/.uni-input-input {
  385. text-align: start !important;
  386. }
  387. .border-n {
  388. //border: none !important;
  389. }
  390. .textarea {
  391. background-color: rgba(242, 242, 242, 100);
  392. margin-top: 12px;
  393. line-height: 20px;
  394. border-radius: 4px;
  395. color: rgba(136, 136, 136, 100);
  396. .uni-textarea-placeholder {
  397. padding: 0 16rpx;
  398. }
  399. /deep/.uni-textarea-textarea {
  400. width: 90%;
  401. padding: 0 16rpx;
  402. }
  403. }
  404. .withdrawHead{
  405. padding: 15px;
  406. font-size: 14px;
  407. .red{
  408. color: red;
  409. }
  410. }
  411. .details {
  412. margin: 16px;
  413. border-radius: 8px;
  414. background-color: #fff;
  415. overflow: hidden;
  416. }
  417. .asterisk {
  418. position: relative;
  419. text {
  420. position: absolute;
  421. top: 0px;
  422. left: -14rpx;
  423. color: #EE3138;
  424. }
  425. }
  426. .add {
  427. text-align: center;
  428. font-size: 18px;
  429. color: #101010;
  430. display: flex;
  431. align-items: center;
  432. justify-content: center;
  433. .ri-add-circle-fill {
  434. font-size: 24px;
  435. color: #44B371;
  436. margin: auto 0;
  437. margin-right: 4rpx;
  438. }
  439. }
  440. /deep/.u-input__input {
  441. font-size: 16px !important
  442. }
  443. .uni-time{
  444. font-size: 32rpx;
  445. }
  446. .uni-input {
  447. display: flex;
  448. justify-content: space-between;
  449. }
  450. .input-text {
  451. white-space: nowrap;
  452. overflow: hidden;
  453. text-overflow: ellipsis;
  454. }
  455. .u-btn{
  456. margin: 0 16px;
  457. position: fixed;
  458. bottom: 12px;
  459. left: 0;
  460. right: 0;
  461. height: 44px;
  462. line-height: 44px;
  463. border-radius: 8px;
  464. background-color: rgba(24, 90, 198, 100);
  465. color: rgba(255, 255, 255, 100);
  466. }
  467. </style>