Browse Source

需求调整

yangc 7 years ago
parent
commit
fc5bf54112

+ 11 - 7
components/applyPurchase/ApplyInfo.vue

@@ -4,7 +4,7 @@
       <p>最新求购信息</p>
       <span>海量求购,一网打尽</span>
       <div>
-        <input type="text" class="form-control" v-model="keyWord" @keyup.13="searchList" placeholder="型号/品牌" />
+        <input type="text" class="form-control" v-model="keyWord" @keyup.13="searchList" :placeholder="user.logged ? '型号/品牌/店铺' : '型号/品牌'" />
         <span @click="searchList">查询</span>
       </div>
     </div>
@@ -57,14 +57,18 @@
               </div>
             </div>
             <div class="il-box-small il-box">
-              <div :title="purchaseMan.encapsulation" class="item">
-                <span>封装:</span>{{purchaseMan.encapsulation || '-'}}</div>
+              <!--<div :title="purchaseMan.encapsulation" class="item">
+                <span>封装:</span>{{purchaseMan.encapsulation || '-'}}
+              </div>
               <div :title="purchaseMan.produceDate" class="item">
-                <span>生产日期:</span>{{purchaseMan.produceDate || '-'}}</div>
+                <span>生产日期:</span>{{purchaseMan.produceDate || '-'}}
+              </div>-->
               <div :title="purchaseMan.needquantity" class="item">
-                <span>采购数量(PCS):</span>{{purchaseMan.needquantity || '-'}}</div>
-              <div :title="purchaseMan.unitPrice ? (purchaseMan.currency == 'RMB' ? '¥' : '$') + purchaseMan.unitPrice : '-'" class="item">
-                <span>单价预算:</span>{{purchaseMan.unitPrice ? (purchaseMan.currency == 'RMB' ? '¥' : '$') + purchaseMan.unitPrice : '-'}}</div>
+                <span>采购数量(PCS):</span>{{purchaseMan.needquantity || '-'}}
+              </div>
+              <!--<div :title="purchaseMan.unitPrice ? (purchaseMan.currency == 'RMB' ? '¥' : '$') + purchaseMan.unitPrice : '-'" class="item">
+                <span>单价预算:</span>{{purchaseMan.unitPrice ? (purchaseMan.currency == 'RMB' ? '¥' : '$') + purchaseMan.unitPrice : '-'}}
+              </div>-->
             </div>
           </div>
           <div class="il-item number-content"><img src="/images/applyPurchase/hot-fire.png" alt="" v-if="purchaseMan.offerAmount > 10">

+ 59 - 38
components/applyPurchase/BatchPublish.vue

@@ -13,7 +13,7 @@
           <!--</th>-->
           <th width="615">产品信息</th>
           <th width="95">采购数量(PCS)</th>
-          <th width="114">生产日期</th>
+          <!--<th width="114">生产日期</th>-->
           <th width="136"><i class="red-text">*</i>截止时间</th>
           <th width="186">操作</th>
         </tr>
@@ -41,11 +41,11 @@
                   <li v-for="code in item.codeWord" @click="modifyItemByWord(index, code.code, 'code')" :title="code.code">{{code.code}}</li>
                 </ul>
               </div>
-              <div class="prod-item prod-item-small">
+              <!--<div class="prod-item prod-item-small">
                 <span class="pi-title">单价预算:</span>
                 <div class="pi-content over-ell" v-if="item.unitPrice">{{(item.currency === 'RMB' ? '¥' : '$') + item.unitPrice}}</div>
                 <div class="pi-content over-ell" v-else="!item.unitPrice">-</div>
-              </div>
+              </div>-->
               <div class="prod-item prod-item-large" :title="item.brand">
                 <span class="pi-title"><i class="red-text">*</i>品牌:</span>
                 <div class="pi-content over-ell" v-if="item.brand && (!item.brandWord || item.brandWord.length == 0)" :title="item.brand">{{item.brand}}</div>
@@ -59,22 +59,22 @@
                 <span class="pi-title">规格:</span>
                 <div class="pi-content over-ell">{{item.spec || '-'}}</div>
               </div>
-              <div class="prod-item prod-item-small" :title="item.encapsulation">
+              <!--<div class="prod-item prod-item-small" :title="item.encapsulation">
                 <span class="pi-title">封装:</span>
                 <div class="pi-content over-ell">
                   {{item.encapsulation || '-'}}
                 </div>
-              </div>
+              </div>-->
             </div>
           </td>
           <td>
             <div class="over-ell" :title="item.amount">{{item.amount || '-'}}</div>
           </td>
-          <td>
+          <!--<td>
             <div class="over-ell" :title="item.produceDate">
               {{item.produceDate || '-'}}
             </div>
-          </td>
+          </td>-->
           <td>
             <span v-if="item.deadline">{{item.deadline | date}}</span>
             <span class="red-text" v-if="!item.deadline">请完善信息</span>
@@ -88,7 +88,7 @@
           </td>
         </tr>
         <tr class="spot-goods" v-if="item.showSpotGoods">
-          <td colspan="8">
+          <td colspan="4">
             <div class="spot-goods-body">
               <div class="spot-goods-title">商城现货({{spotGoodsData.length || 0}})</div>
               <table>
@@ -151,14 +151,14 @@
                   <li v-for="sCode in similarCode" @click="setCode(sCode.code)">{{sCode.code}}</li>
                 </ul>
               </div>
-              <div class="prod-item prod-item-small pi-select">
+              <!--<div class="prod-item prod-item-small pi-select">
                 <span class="pi-title">单价预算:</span>
                 <select class="form-control" v-model="modifyObj.currency">
                   <option value="RMB">¥</option>
                   <option value="USD">$</option>
                 </select>
                 <input class="form-control" type="number" v-model="modifyObj.unitPrice" :class="{'error': !validObj.unitPrice}" @blur="checkUnitPrice" @input="onUnitPriceInput">
-              </div>
+              </div>-->
               <div class="prod-item prod-item-large">
                 <span class="pi-title"><i class="red-text">*</i>品牌:</span>
                 <input type="text" class="form-control" v-model="modifyObj.brand" :class="{'error': !validObj.brand}" @blur="checkBrand" @input="onBrandChange">
@@ -170,18 +170,18 @@
                 <span class="pi-title">规格:</span>
                 <input type="text" class="form-control" v-model="modifyObj.spec" :class="{'error': !validObj.spec}" @input="onSpecInput" @blur="checkSpec">
               </div>
-              <div class="prod-item prod-item-small">
+              <!--<div class="prod-item prod-item-small">
                 <span class="pi-title">封装:</span>
                 <input type="text" class="form-control" v-model="modifyObj.encapsulation" @input="onEncapsulationChange">
-              </div>
+              </div>-->
             </div>
           </td>
           <td>
             <input type="text" class="form-control" v-model="modifyObj.amount" :class="{'error': !validObj.amount}" @blur="checkAmount" @input="onAmountInput">
           </td>
-          <td>
+          <!--<td>
             <input type="text" class="form-control" v-model="modifyObj.produceDate" @input="onProduceDateChange">
-          </td>
+          </td>-->
           <td>
             <el-date-picker
               v-model="modifyObj.deadline"
@@ -254,30 +254,51 @@
         showSimilarCodeList: false,
         showSimilarBrandList: false,
         spotGoodsData: [],
-        fragments: []
+        fragments: [],
+        bomList: {}
       }
     },
     components: {
       Page
     },
+    watch: {
+      '$store.state.applyPurchase.bomMaterial.bomList.data': {
+        handler: function (val) {
+          let _this = this
+          let list = JSON.parse(JSON.stringify(val))
+          list.content = list.content.slice()
+          for (let i = 0; i < list.content.length; i++) {
+            _this.$set(list.content[i], 'checked', false)
+            _this.$set(list.content[i], 'active', false)
+            _this.$set(list.content[i], 'showCodeWord', false)
+            _this.$set(list.content[i], 'showBrandWord', false)
+            _this.$set(list.content[i], 'showSpotGoods', false)
+          }
+          this.bomList = list
+        },
+        immediate: true
+      }
+    },
     computed: {
-      bomList () {
-        let _this = this
-        let list = this.$store.state.applyPurchase.bomMaterial.bomList.data
-        for (let i = 0; i < list.content.length; i++) {
-          _this.$set(list.content[i], 'checked', false)
-          _this.$set(list.content[i], 'active', false)
-          _this.$set(list.content[i], 'showCodeWord', false)
-          _this.$set(list.content[i], 'showBrandWord', false)
-          _this.$set(list.content[i], 'showSpotGoods', false)
-//          list.content[i].checked = false
-//          list.content[i].active = false
-//          if (!list.content[i].code || list.content[i].brand || !list.content[i].deadline || !this.isValidDate(list.content[i].deadline)) {
-//            _this.validList = false
-//          }
-        }
-        return list
-      },
+//      bomList () {
+//        let _this = this
+//        let list = JSON.parse(JSON.stringify(this.$store.state.applyPurchase.bomMaterial.bomList.data))
+//        list.content = list.content.slice()
+//        for (let i = 0; i < list.content.length; i++) {
+//          _this.$set(list.content[i], 'checked', false)
+//          _this.$set(list.content[i], 'active', false)
+//          _this.$set(list.content[i], 'showCodeWord', false)
+//          _this.$set(list.content[i], 'showBrandWord', false)
+//          _this.$set(list.content[i], 'showSpotGoods', false)
+// //          list.content[i].checked = false
+// //          list.content[i].active = false
+// //          if (!list.content[i].code || list.content[i].brand || !list.content[i].deadline || !this.isValidDate(list.content[i].deadline)) {
+// //            _this.validList = false
+// //          }
+//        }
+//        console.log(list)
+//        return list
+//      },
       bomNumber () {
         return this.$store.state.applyPurchase.bomMaterial.bomNumber.data
       },
@@ -1090,10 +1111,10 @@
                   line-height: 30px;
                   float: left;
                   margin-right: 5px;
-                  &:nth-child(n + 4) {
+                  &:nth-child(n + 3) {
                     margin-top: 9px;
                   }
-                  &:nth-child(3n) {
+                  &:nth-child(2n) {
                     margin-right: 0;
                   }
                   .pi-title {
@@ -1111,7 +1132,7 @@
                   }
                   &.prod-item-large {
                     .pi-content {
-                      width: 145px;
+                      width: 226px;
                     }
                     .pi-title {
                       width: 62px;
@@ -1137,7 +1158,7 @@
                     overflow-y: auto;
                     overflow-x: hidden;
                     border-radius: 2px;
-                    width: 145px;
+                    width: 228px;
                     li {
                       height: 30px;
                       line-height: 30px;
@@ -1165,7 +1186,7 @@
                 padding: 0 22px 0 5px;
                 background: url('/images/all/select-icon-full.png') no-repeat;
                 background-color: #fff;
-                background-position: 125px 10px;
+                background-position: 194px 10px;
                 cursor: default;
                 border-radius: 2px;
                 & + ul {
@@ -1330,7 +1351,7 @@
                   position: relative;
                   &.prod-item-large {
                     input {
-                      width: 145px;
+                      width: 226px;
                     }
                   }
                   &.prod-item-small {

+ 7 - 7
components/applyPurchase/PublishApply.vue

@@ -49,7 +49,7 @@
               size="mini">
             </el-date-picker>
           </div>
-          <div class="form-item">
+          <!--<div class="form-item">
             <span>
               单价预算:
             </span>
@@ -58,7 +58,7 @@
               <option value="USD">$</option>
             </select>
             <input type="number" class="form-control" :class="{'error': !validObj.unitPrice}" v-model="applyObj.unitPrice" @blur="checkUnitPrice" @input="onUnitPriceInput" />
-          </div>
+          </div>-->
           <div class="form-item">
            <span>
               类目:
@@ -71,24 +71,24 @@
             </span>
             <input type="text" class="form-control" :class="{'error': !validObj.spec}" v-model="applyObj.spec" @blur="checkSpec" @input="onSpecInput"/>
           </div>
-          <div class="form-item">
+          <!--<div class="form-item">
            <span>
               封装:
             </span>
             <input type="text" class="form-control" v-model="applyObj.encapsulation" @input="onEncapsulationChange" />
-          </div>
+          </div>-->
           <div class="form-item">
             <span>
               采购数量(PCS):
             </span>
             <input type="text" class="form-control" :class="{'error': !validObj.amount}" v-model="applyObj.amount" @blur="checkAmount" @input="onAmountInput" />
           </div>
-          <div class="form-item">
+          <!--<div class="form-item">
             <span>
               生产日期:
             </span>
             <input type="text" class="form-control" v-model="applyObj.produceDate" @input="onProduceDateChange" />
-          </div>
+          </div>-->
         </div>
         <a @click="goPublish()">发布求购</a>
       </div>
@@ -575,7 +575,7 @@
           text-align: left;
           margin-left: 3px;
           .form-item {
-            margin-bottom: 3px;
+            margin-bottom: 14px;
             position: relative;
             span {
               width: 107px;

+ 28 - 11
components/main/Nav.vue

@@ -14,16 +14,16 @@
       <nuxt-link to="/supplier" class="item">
         <span>供应商</span>
       </nuxt-link>
-      <a class="item expand-item">
-        <span>店铺
+      <a class="item expand-item" :class="{'active': isActive}">
+        <span>{{name}}
           <i class="iconfont icon-arrow-down"></i>
           <i class="iconfont icon-arrow-up"></i>
         </span>
         <ul class="expand-list">
-          <li>
+          <li v-show="name !== '原厂专区'">
             <nuxt-link to="/provider/factories">原厂专区</nuxt-link>
           </li>
-          <li>
+          <li v-show="name !== '代理经销'">
             <nuxt-link to="/provider/home">代理经销</nuxt-link>
           </li>
           <li>
@@ -42,7 +42,22 @@
 </template>
 <script>
   export default {
-    name: 'navView'
+    name: 'navView',
+    computed: {
+      name () {
+        let path = this.$route.path
+        if (path === '/provider/factories') {
+          return '原厂专区'
+        } else if (path === '/provider/home') {
+          return '代理经销'
+        } else {
+          return '店  铺'
+        }
+      },
+      isActive () {
+        return (this.$route.path === '/provider/factories' && this.name === '原厂专区') || (this.$route.path === '/provider/home' && this.name === '代理经销')
+      }
+    }
   }
 </script>
 <style lang="scss" scoped>
@@ -69,7 +84,7 @@
         padding: 5px 2px;
       }
 
-      &.nuxt-link-active:not(.expand-item), &:not(.expand-item):hover {
+      &.nuxt-link-active, &.active, &:not(.expand-item):hover {
         > span {
           color: #5078cb;
           border-bottom: #5078cb 3px solid;
@@ -82,17 +97,19 @@
         .expand-list {
           z-index: 10;
           position: absolute;
-          left: 30px;
+          left: 8px;
           background: #fff;
-          width: 66px;
+          width: 106px;
           border-radius: 2px;
           display: none;
+          -webkit-box-shadow: 0 1px 12px 0 rgba(0,0,0,.2);
+          -moz-box-shadow: 0 1px 12px 0 rgba(0,0,0,.2);
+          box-shadow: 0 1px 12px 0 rgba(0,0,0,.2);
           li {
-            height: 20px;
-            line-height: 20px;
+            height: 34px;
+            line-height: 34px;
             text-align: center;
             a {
-              font-size: 12px;
               color: #666;
             }
             &:hover {

+ 1 - 1
components/main/Search.vue

@@ -6,7 +6,7 @@
         <option value="store">店铺</option>
       </select>
       <input v-model="keyword" type="text" class="search-input form-control input-primary"
-             placeholder="型号/类目/品牌"
+             :placeholder="searchType === 'product' ? '型号/类目/品牌' : '店铺名称'"
              @focus.stop.prevent="onFocus()"
              @blur.stop.prevent="onBlur()"
              @keyup.40="onSelectChange(1)"

+ 1 - 1
nuxt.config.js

@@ -1,6 +1,6 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
-const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftmall.com/' : 'http://192.168.253.121:9090/platform-b2c')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftmall.com/' : 'http://10.1.51.124:8080/platform-b2c')
 const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftmall.com/' : 'http://218.17.158.219:24000/')
 const materialUrl = process.env.MATERIAL_URL || (isProdMode ? 'https://api-product.usoftmall.com/' : 'http://218.17.158.219:24000/')
 

+ 1 - 1
pages/mobile/search/_keycode.vue

@@ -33,7 +33,7 @@
     <div v-if="searchLists && searchLists.length > 0" >
       <div class="detail-brand" v-for="(item, index) in searchLists" :style="index == 0 ? 'padding-top: .2rem;' : ''" v-if="item">
         <div class="brand-item" @click="goComponent(item.uuid)">
-          <p>店铺:<span>{{item.storeName || '-'}}</span></p>
+          <p>商家名称:<span>{{item.storeName || '-'}}</span></p>
           <p>型号:<span>{{item.code || '-'}}</span></p>
           <p>品牌:<span>{{item.brandEn || item.brand.nameCn || '-'}}</span></p>
           <p>产品描述:<span>{{item.description || '-'}}</span></p>

+ 1 - 1
pages/mobile/user/index.vue

@@ -367,7 +367,7 @@
   import PageLoading from '~components/common/loading/PageLoading.vue'
   export default {
     layout: 'mobile',
-//    middleware: 'authenticated',
+    middleware: 'authenticated',
     data () {
       return {
         userName: '',