Browse Source

增加税率和修改测试接口地址

wangcz 7 years ago
parent
commit
52ca0da848

+ 27 - 6
components/applyPurchase/SayPrice.vue

@@ -61,9 +61,13 @@
           </template>
           <div class="content-line">
             <div class="form-item form-left">
-              <span><i>*</i>交期:</span>
+              <span><i>*</i>交期34:</span>
               <input type="number" class="form-control" placeholder="天数" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime">
             </div>
+            <div class="form-item form-right">
+              <span><i>*</i>税率:</span>
+              <input type="number" class="form-control" placeholder="税率" @input="onTaxrateInput" @blur="onTaxrateBlur" v-model="sayPriceObj.taxrate">%
+            </div>
             <!--<div class="form-item form-upload">
               <label>
                 <span><i>+</i>添加附件</span>
@@ -118,6 +122,7 @@
         sayPriceObj: {
           currency: 'RMB',
           leadtime: '',
+          taxrate: '',
           replies: [
             {
               lapQty: '',
@@ -130,6 +135,7 @@
         },
         validSayPrice: {
           leadtime: false,
+          taxrate: false,
           repliesPrice: false,
           repliesLapQty: false,
           replaceBrand: false,
@@ -186,6 +192,7 @@
           let purchaseMan = JSON.parse(JSON.stringify(this.purchaseManList.content[this.currentSayPriceIndex]))
           this.showLoading = true
           purchaseMan.leadtime = this.sayPriceObj.leadtime
+          purchaseMan.taxrate = this.sayPriceObj.taxrate
           purchaseMan.replies = this.sayPriceObj.replies
           purchaseMan.vendUU = this.user.data.enterprise.uu
           purchaseMan.vendUserUU = this.user.data.userUU
@@ -224,6 +231,7 @@
         this.sayPriceObj = {
           currency: 'RMB',
           leadtime: '',
+          taxrate: '',
           replies: [
             {
               lapQty: '',
@@ -236,6 +244,7 @@
         }
       },
       onLeadtimeInput: function () {
+        this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.replace(/[^\-?\d.]/g, '')
         if (this.sayPriceObj.leadtime.length > 3) {
           this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.substring(0, 3)
         }
@@ -248,6 +257,20 @@
           this.validSayPrice.leadtime = true
         }
       },
+      onTaxrateInput () {
+        this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.replace(/[^\-?\d.]/g, '')
+        if (this.sayPriceObj.taxrate.length > 2) {
+          this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.substring(0, 2)
+        }
+      },
+      onTaxrateBlur () {
+        if (!this.sayPriceObj.taxrate || this.sayPriceObj.taxrate < 1 || this.sayPriceObj.taxrate >= 100 || this.sayPriceObj.taxrate.toString().indexOf('.') !== -1) {
+          this.validSayPrice.taxrate = false
+          this.$message.error('交期请填写1-99之间的正整数')
+        } else {
+          this.validSayPrice.taxrate = true
+        }
+      },
       onReplyPriceInput: function (index) {
         let price = this.sayPriceObj.replies[index].price
         if (price >= 10000) {
@@ -318,7 +341,7 @@
             return false
           }
         }
-        return this.validSayPrice.leadtime && this.validSayPrice.repliesLapQty && this.validSayPrice.repliesPrice && validReplace
+        return this.validSayPrice.leadtime && this.validSayPrice.taxrate && this.validSayPrice.repliesLapQty && this.validSayPrice.repliesPrice && validReplace
       },
       setReplies: function (type, index) {
         if (type === 'add' && this.sayPriceObj.replies.length < 5) {
@@ -471,8 +494,9 @@
           &.form-right {
             position: relative;
             input {
-              width: 104px;
+              width: 132px;
               padding: 0 8px;
+              margin-right:5px;
             }
             select {
               position: absolute;
@@ -497,9 +521,6 @@
                 width: 133px;
               }
             }
-            > i {
-              margin-left: 4px;
-            }
           }
           &.form-long {
             width: 100%;

+ 41 - 36
components/default/RightBar.vue

@@ -4,25 +4,29 @@
       <ul class="right-bar-center">
         <li class="right-bar-item" v-show="storeStatus && storeStatus.uuid">
           <a @click="goShop" class="title" target="_blank">
-            <i class="iconfont icon-dianpu icon-xlg"></i>
+            <i class="iconfont icon-dianpu icon-xlg"></i><br/>
+            <span>店铺</span>
           </a>
-          <div class="sidebar-menu"><a @click="goShop" title="我的店铺" target="_blank">我的店铺</a></div>
+          <!--<div class="sidebar-menu"><a @click="goShop" title="我的店铺" target="_blank">我的店铺</a></div>-->
         </li>
         <li class="right-bar-item" @mouseenter="loadCarCount()" id="shopCar">
           <a @click="goCart" class="title" target="_blank">
-            <i class="iconfont icon-shopping-cart icon-xlg"></i>
+            <i class="iconfont icon-shopping-cart icon-xlg"></i><br/>
+            <span>购物车</span>
           </a>
-          <div class="sidebar-menu"><a @click="goCart" title="我的购物车" target="_blank">我的购物车<em><span>(<span v-text="cartCount.count || 0"></span>)</span></em></a></div>
+          <!--<div class="sidebar-menu"><a @click="goCart" title="我的购物车" target="_blank">我的购物车<em><span>(<span v-text="cartCount.count || 0"></span>)</span></em></a></div>-->
         </li>
         <li class="right-bar-item">
           <a @click="dialogVisible = true" class="title">
-            <i class="iconfont icon-liuyan icon-xlg"></i>
-            <div class="sidebar-menu"><a title="留言板" target="_blank">留言板</a></div>
+            <i class="iconfont icon-liuyan icon-xlg"></i><br/>
+            <span>留言板</span>
+            <!--<div class="sidebar-menu"><a title="留言板" target="_blank">留言板</a></div>-->
           </a>
         </li>
         <li class="right-bar-item contact-menu">
           <a href="http://wpa.qq.com/msgrd?v=3&uin=3432892085&site=www.ubtoc.com&menu=yes" target="_blank" class="title">
-            <i class="iconfont icon-kefu icon-xlg"></i>
+            <i class="iconfont icon-kefu icon-xlg"></i><br/>
+            <span>在线客服</span>
           </a>
           <div class="contact-us sidebar-menu">
             <p>在线客服:<img src="/images/all/songguo.png" /><a href="http://wpa.qq.com/msgrd?v=3&uin=3432892085&site=www.ubtoc.com&menu=yes" class="contact-btn" target="_blank">联系客服</a></p>
@@ -44,30 +48,32 @@
       <ul class="right-bar-bottom">
         <li class="right-bar-item" @mouseenter="loadHistorys()">
           <a @click="goHistory" class="title" target="_blank">
-            <i class="iconfont icon-zuji icon-xlg"></i>
+            <i class="iconfont icon-zuji icon-xlg"></i><br/>
+            <span>浏览历史</span>
           </a>
-          <div class="sidebar-menu" v-if="!user.logged"><a @click="goHistory" title="浏览记录">浏览记录</a></div>
-          <div class="sidebar-menu" v-if="user.logged && listMe(history).length == 0"><a href="/user#/browsingHistory" title="浏览记录">浏览记录</a></div>
-          <div class="foot-record sidebar-menu" v-if="user.logged && listMe(history).length > 0">
-            <h3><a href="/user#/browsingHistory">浏览历史</a></h3>
-            <dl>
-              <dd v-for="item in listMe(history)">
-                  <a :href="'/store/productDetail/' + item.batchCode" target="_blank" :title="item.code" v-text="item.code" v-if="item.status== 1"></a>
-                  <a :title="item.code" v-text="item.code" v-if="item.status== 0" disabled="disabled"></a>
-                  <div class="hover-shows">
-                      <em :class="{ 'off' : item.status== 0}"></em>
-                      <span :class="{ 'off' : item.status== 0}">失效</span>
-                      <a @click="deleteHistory(item,item.id)">&times;</a>
-                  </div>
-              </dd>
-            </dl>
-          </div>
+          <!--<div class="sidebar-menu" v-if="!user.logged"><a @click="goHistory" title="浏览记录">浏览记录</a></div>-->
+          <!--<div class="sidebar-menu" v-if="user.logged && listMe(history).length == 0"><a href="/user#/browsingHistory" title="浏览记录">浏览记录</a></div>-->
+          <!--<div class="foot-record sidebar-menu" v-if="user.logged && listMe(history).length > 0">-->
+            <!--<h3><a href="/user#/browsingHistory">浏览历史</a></h3>-->
+            <!--<dl>-->
+              <!--<dd v-for="item in listMe(history)">-->
+                  <!--<a :href="'/store/productDetail/' + item.batchCode" target="_blank" :title="item.code" v-text="item.code" v-if="item.status== 1"></a>-->
+                  <!--<a :title="item.code" v-text="item.code" v-if="item.status== 0" disabled="disabled"></a>-->
+                  <!--<div class="hover-shows">-->
+                      <!--<em :class="{ 'off' : item.status== 0}"></em>-->
+                      <!--<span :class="{ 'off' : item.status== 0}">失效</span>-->
+                      <!--<a @click="deleteHistory(item,item.id)">&times;</a>-->
+                  <!--</div>-->
+              <!--</dd>-->
+            <!--</dl>-->
+          <!--</div>-->
         </li>
         <li class="right-bar-item">
           <a @click="toTop()" class="title">
-            <i class="iconfont icon-arrow-up icon-xlg"></i>
+            <i class="iconfont icon-arrow-up icon-xlg"></i><br/>
+            <span>返回顶部</span>
           </a>
-          <div class="sidebar-menu"><a @click="toTop()" title="返回顶部" target="_blank">返回顶部</a></div>
+          <!--<div class="sidebar-menu"><a @click="toTop()" title="返回顶部" target="_blank">返回顶部</a></div>-->
         </li>
       </ul>
     </div>
@@ -396,9 +402,8 @@ i {
 .right-bar ul li .sidebar-menu {
   position: absolute;
   display: block;
-  right: -100%;
-  top: 0px;
-  bottom: 0;
+  right: 0;
+  top: 0;
   width: 100px;
   line-height: 38px;
   height: 38px;
@@ -607,22 +612,22 @@ i {
   padding: 0;
 }
 .right-bar-item {
-  width: 36px;
+  width: 75px;
   /* height: 38px;*/
 }
 .right-bar .right-bar-item a.title {
   display: inline-block;
-  width: 36px;
-  height: 38px;
-  line-height: 38px;
-  padding: 0;
+  width: 75px;
+  height: 75px;
+  line-height: 25px;
+  padding: 15px 0;
 }
 .right-bar {
   position: fixed;
   z-index: 1000;
   right: 0;
   top: 0;
-  width: 36px;
+  width: 75px;
   height: 100%;
 
   .right-bar-center {
@@ -638,7 +643,7 @@ i {
     position: absolute;
     right: 0;
     bottom: 0;
-    width: 36px;
+    width: 75px;
   }
 
   .right-bar-item {

+ 22 - 0
components/mobile/applyPurchase/SayPrice.vue

@@ -79,6 +79,10 @@
               <span>交期(天)</span>
               <input type="text" placeholder="最大值" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime" class="fr">
             </div>
+            <div class="date">
+              <span>税率</span>
+              <input type="text" placeholder="税率" @input="onTaxrateInput" @blur="onTaxrateBlur" v-model="sayPriceObj.taxrate" class="fr">%
+            </div>
             <div style="position: relative;height: 1rem;"></div>
           </div>
         </div>
@@ -98,6 +102,7 @@
         sayPriceObj: {
           currency: 'RMB',
           leadtime: '',
+          taxrate: '',
           replies: [
             {
               lapQty: '',
@@ -110,6 +115,7 @@
         },
         validSayPrice: {
           leadtime: false,
+          taxrate: false,
           repliesPrice: false,
           repliesLapQty: false,
           replaceBrand: false,
@@ -188,6 +194,7 @@
         this.sayPriceObj = {
           currency: 'RMB',
           leadtime: '',
+          taxrate: '',
           replies: [
             {
               lapQty: '',
@@ -215,6 +222,7 @@
           let purchaseMan = JSON.parse(JSON.stringify(this.purchaseDetail))
 //          this.showLoading = true
           purchaseMan.leadtime = this.sayPriceObj.leadtime
+          purchaseMan.taxrate = this.sayPriceObj.taxrate
           purchaseMan.replies = this.sayPriceObj.replies
           purchaseMan.vendUU = this.user.data.enterprise.uu
           purchaseMan.vendUserUU = this.user.data.userUU
@@ -258,6 +266,20 @@
           this.validSayPrice.leadtime = true
         }
       },
+      onTaxrateInput () {
+        this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.replace(/[^\-?\d.]/g, '')
+        if (this.sayPriceObj.taxrate.length > 2) {
+          this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.substring(0, 2)
+        }
+      },
+      onTaxrateBlur () {
+        if (!this.sayPriceObj.taxrate || this.sayPriceObj.taxrate < 1 || this.sayPriceObj.taxrate >= 100 || this.sayPriceObj.taxrate.toString().indexOf('.') !== -1) {
+          this.validSayPrice.taxrate = false
+          this.$message.error('交期请填写1-99之间的正整数')
+        } else {
+          this.validSayPrice.taxrate = true
+        }
+      },
       onReplyPriceInput: function (index) {
         this.sayPriceObj.replies[index].price = this.sayPriceObj.replies[index].price.replace(/[^\-?\d.]/g, '')
         let price = this.sayPriceObj.replies[index].price

+ 6 - 6
nuxt.config.js

@@ -3,17 +3,17 @@ const isProdMode = Object.is(process.env.NODE_ENV, 'production')
 // b2c后台
 const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftchina.com/' : 'http://10.1.51.101:8090/')
 // 公共询价
-const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftchina.com/' : 'http://218.17.158.219:24000/')
+const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftchina.com/' : 'http://10.1.51.92:24000/')
 // 公共物料
-const materialUrl = process.env.MATERIAL_URL || (isProdMode ? 'https://api-product.usoftchina.com/' : 'http://218.17.158.219:24000/')
+const materialUrl = process.env.MATERIAL_URL || (isProdMode ? 'https://api-product.usoftchina.com/' : 'http://10.1.51.92:24002/')
 // 公共cms
-const cmsUrl = process.env.CMS_URL || (isProdMode ? 'http://cms.usoftchina.com' : 'http://cms.usoftchina.com')
+const cmsUrl = process.env.CMS_URL || (isProdMode ? 'http://cms.usoftchina.com' : 'http://cms.usoftchina.com/')
 // 消息
-const messageUrl = process.env.MESSAGE_URL || (isProdMode ? 'https://api-message.ubtob.com/' : 'http://192.168.253.6:24000/message')
+const messageUrl = process.env.MESSAGE_URL || (isProdMode ? 'https://api-message.usoftchina.com/' : 'http://10.1.51.92:24001/')
 // B2B
-const uasUrl = process.env.uasUrl || (isProdMode ? 'http://uas.ubtob.com/' : 'http://192.168.253.12:9000/b2b-test/')
+const uasUrl = process.env.uasUrl || (isProdMode ? 'http://uas.usoftchina.com/' : 'http://tb2b.usoftchina.com/')
 // 帐户中心
-const ssoUrl = process.env.ssoUrl || (isProdMode ? 'https://sso.ubtob.com/' : 'http://192.168.253.6:32323')
+const ssoUrl = process.env.ssoUrl || (isProdMode ? 'https://sso.usoftchina.com/' : 'http://tsso.usoftchina.com/')
 // pcb展示ID
 const pcbId = process.env.pcbId || (isProdMode ? '9612c0a894894c1aabbfe9192749bbfa' : 'shengfang')