xinfeng vor 5 Jahren
Ursprung
Commit
bbc6121684

+ 15 - 1
assets/css/otherpage/money/withdraw.scss

@@ -165,6 +165,7 @@
         justify-content: flex-start;
         align-items: flex-start;
         .leftChoose {
+          flex-shrink: 0;
           width: pxtovw(24);
           height: pxtovw(24);
           background-repeat: no-repeat;
@@ -175,6 +176,7 @@
           }
         }
         .rightContent {
+          flex-shrink: 0;
           margin-left: pxtovw(10);
           width: 100%;
           .taxTop {
@@ -182,6 +184,7 @@
             justify-content: space-between;
             align-items: center;
             width: 100%;
+            position: relative;
             .topLeft {
               height: pxtovw(22);
               font-size: pxtovw(16);
@@ -189,8 +192,15 @@
               text-align: left;
               color: #333333;
               line-height: pxtovw(22);
+              white-space: nowrap;
+              word-break: keep-all;
             }
             .topRight {
+              position: absolute;
+              right: pxtovw(30);
+              top: pxtovw(4);
+              transform-origin: right center;
+              transform: scale(0.83);
               height: pxtovw(14);
               font-size: pxtovw(10);
               font-weight: 400;
@@ -198,7 +208,9 @@
               color: #999999;
               line-height: pxtovw(14);
               letter-spacing: 0;
-              a {
+              white-space: nowrap;
+              word-break: keep-all;
+              a, span {
                 height: pxtovw(14);
                 font-size: pxtovw(10);
                 font-weight: 400;
@@ -206,6 +218,8 @@
                 color: #308eff;
                 line-height: pxtovw(14);
                 letter-spacing: 0;
+                white-space: nowrap;
+                word-break: keep-all;
               }
             }
           }

+ 53 - 15
pages/otherpage/money/withdraw.vue

@@ -28,14 +28,18 @@
       <div class="stitle">选择缴税方案</div>
       <div class="sdesc">已默认为您选择最低费率缴税方案</div>
       <div class="schemeList">
-        <div class="cell">
-          <div class="leftChoose ok"></div>
+        <div class="cell" v-for="item in list" :key="item.id">
+          <div class="leftChoose" :class="{ok: item.id === selectedId}"></div>
           <div class="rightContent">
             <div class="taxTop">
-              <div class="topLeft">青团宝</div>
-              <div class="topRight">选则扣税方式即表示您同意 <a href="">《青团宝服务协议》</a></div>
+              <div class="topLeft">{{item.config_key}}</div>
+              <div class="topRight" v-if="item.is_auto != 1">选则扣税方式即表示您同意
+                <a href="">《{{item.config_key}}服务协议》</a></div>
+              <div class="topRight" v-else>
+                <span @click="onJumpToUpload">{{fpUrl ? '去上传电子发票' : '已上传电子发票'}}</span>
+              </div>
             </div>
-            <div class="taxContent">代缴综合费率7.5%, 预计到账¥8888.88元</div>
+            <div class="taxContent">代缴综合费率{{item.kaifabao_rate}}%, 预计到账¥{{calcOkMoney}}元</div>
           </div>
         </div>
       </div>
@@ -76,8 +80,21 @@
     data() {
       return {
         bankInfo: {},
+        list: [],
         vCoins: 0,
-        fpUrl: ''
+        fpUrl: '',
+        selectedId: -1
+      }
+    },
+    computed: {
+      calcOkMoney() {
+        if (this.selectedId === -1) {
+          return 0
+        }
+        return this.vCoins * (1 - this.selectedItem.kaifabao_rate)
+      },
+      selectedItem() {
+        return this.list.filter(v=>v.id === this.selectedId)[0] || {}
       }
     },
     created() {
@@ -90,7 +107,10 @@
     methods: {
       getWithdrawType() {
         this.$axios.post('/api/kaifabao/getBuckleConfigList').then(res => {
-
+          if (Number(res.data.status) === 1) {
+            let data = res.data.data
+            this.list = data.list
+          }
         }).catch(e => {
           console.log(e)
         })
@@ -113,14 +133,32 @@
         location.href = `/otherpage/money/uploadInvoice?coins=${vCoins}&fpUrl=${fpUrl}`
       },
       submitCommit() {
-        this.$axios.post('/api/recruit/addInvoiceWithdrawalApply', {
-          auth_code: '',
-          coins: this.coins,
-          invoice_url: this.invoiceImg
-        }).then(res=>{
-          this.invoiceImg = ""
-          this._toast('上传成功')
-        })
+        const {is_auto, id} = this.selectedItem
+        if (this.selectedId === -1) {
+          this._toast('请选择缴税方案')
+          return
+        }
+        if (!(this.coins >= 10 && this.coins <= 30000)) {
+          this._toast('请填写正确的的提现金额')
+          return
+        }
+
+        //自行提供发票
+        if (Number(is_auto) === 1) {
+          this.$axios.post('/api/recruit/addInvoiceWithdrawalApply', {
+            coins: this.coins,
+            invoice_url: this.fpUrl
+          }).then(res=>{
+            this._toast('上传成功')
+          })
+        } else {
+          this.$axios.post('/api/account/takeSalary', {
+            coins: this.coins,
+            payment_id: id
+          }).then(res=>{
+            this._toast('上传成功')
+          })
+        }
       },
     }
   }

+ 27 - 0
pages/otherpage/proto/money.vue

@@ -0,0 +1,27 @@
+<template>
+  <div v-html="">
+
+  </div>
+</template>
+
+<script>
+  export default {
+    name: "protoMoney",
+    head() {
+      return {
+        title: this.item.title
+      }
+    },
+    async asyncData({ app, $axios }) {
+      let { query: { id = 1} } = app.context.route
+      let res = await $axios.post('/api/kaifabao/getBasicConfigList')
+      const { list = []} = res.data.data || {}
+      let item = list.filter((v => v.id == id))[0] || []
+      return item
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 5 - 0
plugins/seoRouter.js

@@ -29,6 +29,11 @@ const extendRoutes = (routes, resolve) => {
     path: '/job/*',
     component: resolve(__dirname, '../pages/job/index.vue')
   })
+  routes.unshift({
+    name: 'JobListSeoDetail',
+    path: '/job/d/:id',
+    component: resolve(__dirname, '../pages/job/detail/_id.vue')
+  })
   // /** 兼职招聘SEO优化 end**/
   //
   //