123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>仓库管理-调整额度-创业帮</title>
- <meta name="keywords" content="仓库管理-调整额度-创业帮">
- <meta name="description" content="仓库管理-调整额度-创业帮">
- <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <meta content="telephone=no" name="format-detection">
- <meta content="email=no" name="format-detection">
- <meta name="apple-mobile-web-app-title" content="仓库管理-调整额度-创业帮">
- <meta http-equiv="Cache-Control" content="no-siteapp">
- <link rel="stylesheet" href="./static/css/main.css">
- <style>
- .van-field__right-icon i{
- transform:rotate(90deg);
- }
- .van-goods-action{height:1.5467rem;}
- .merchant-verification .van-button{height:1.28rem;}
- .adjustQuota .line{border:0.2px solid #F1F1F1;}
- .warehouse-application .topline{border-top:1px solid #f2f2f2;}
- </style>
- </head>
- <body class="pb0 ovh pt0" style="padding-top:0;">
- <div class="warehouse rel merchant-verification warehouse-application adjustQuota" id="app" v-cloak style="height:100vh;background-color:#f6f6f6">
- <van-nav-bar class="user_rank_explan_title user_title_normal titlef16 rightc333" left-arrow title="调低临额" v-if="toptitleisshow" @click-left="goback">
- <template #left><img src="./static/images/left.png" alt=""></template>
- </van-nav-bar>
- <div class="bgcfff topline">
- <div class="f15 c333"><span>当前额度</span><span class="f16 ml20">¥</span><span class="f28">{{curQuota}}</span></div>
- <div class="f15 c333 df aic mt24"><span>调低临额</span>
- <van-stepper class="ml20" v-model="reductQuota" button-size="28" disable-input min="0" step="1000" :max="least"></van-stepper><span class="ml10 c999 f12">最多可调低¥{{least}}</span>
- </div>
- <div class="line mt24"></div>
- <div class="f15 c333 mt24"><span>返还押金</span><span class="ml20">{{returnDeposit}} 元</span></div>
- <div class="f12 c999 mt20">调整提示</div>
- <div class="f12 c999 mt6">仅可调低1000的整倍数,正在使用的临时额度不可调低,调整后的返还金额将返还至您的创客余额中。</div>
- </div>
- <div class="van-goods-action">
- <van-goods-action-button color="#FDD500" type="danger" text="确认调整" style="width:80%" @click="submit"></van-goods-action-button>
- </div>
- <van-popup v-model="applicationFaild" :close-on-click-overlay="false" style="border-radius:.4267rem;width:83%;">
- <div class="warp-box" style="height:4.8533rem">
- <div class="f16 c333 tc b">申请失败</div>
- <div class="f14 mt8 c333">{{errInfo}}</div>
- <van-button class="btn" round color="#FDD500" block @click="applicationFaild = false">确定</van-button>
- </div>
- </van-popup>
- <van-popup v-model="applicationSuccess" :close-on-click-overlay="false" style="border-radius:.4267rem;width:83%;">
- <div class="warp-box" style="height:4.4133rem">
- <div class="f16 c333 tc b">{{resInfo}}</div>
- <van-button class="btn" round color="#FDD500" block @click="applicationSuccessclose">好的</van-button>
- </div>
- </van-popup>
- </div>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/appfunc.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script src="./static/js/publicfn.js"></script>
- <script>
- Vue.use(vant.Lazyload);
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data(){
- return{
- curQuota:0,
- reductQuota:0,
- //- returnDeposit:0,
- toptitleisshow,
- applicationFaild:false,
- errInfo:'',
- applicationSuccess:false,
- least:0,
- resInfo:'',
- }
- },
- computed:{
- returnDeposit:function(){
- return this.reductQuota/2
- }
- },
- created(){
- this.getMyamount()
- },
- methods:{
- applicationSuccessclose(){
- this.getMyamount();
- this.applicationSuccess = false;
- },
- submit(){
- if(this.reductQuota === 0) return tips('请先选择调整额度')
- vant.Dialog.confirm({
- message: `确认将临时额度调低${this.reductQuota}元?`,
- })
- .then(() => {
- const UserId = PublicLib.getCookieInfo('userId');
- const Amount = this.reductQuota;
- postRequest('api/v1/storehouseamountrecord/downamount',JSON.stringify({UserId,Amount}))
- .then((res)=>{
- if(res.status !== '1'){
- this.errInfo = res.info;
- this.applicationFaild = true;
- };
- if(res.status === '1'){
- this.resInfo = res.info;
- this.applicationSuccess = true;
- this.reductQuota = 0;
- setTimeout(()=>{
- this.getMyamount();
- },3000)
- };
- });
- });
- },
- goback(){
- PublicLib.GoBack({Level:1});
- },
- async getMyamount(){
- const UserId = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/useraccount/myamount?='+Math.random(6),JSON.stringify({UserId}));
- if(res.status === '1'){
- this.curQuota = res.data.TempAmount;
- if(res.data.OkTempAmount){
- this.least = (Math.floor(res.data.OkTempAmount / 1000))*1000;
- };
- }else{
- tips('初始化失败!请重试')
- }
- },
- }
- })
- </script>
- </body>
- </html>
|