Browse Source

求购添加类目非空判断

liusw 7 years ago
parent
commit
cb91834f21
1 changed files with 5 additions and 1 deletions
  1. 5 1
      components/applyPurchase/ApplyInfo.vue

+ 5 - 1
components/applyPurchase/ApplyInfo.vue

@@ -39,7 +39,7 @@
           </div>
           <div class="il-item il-center">
             <div class="il-box-large il-box">
-              <div :title="purchaseMan.prodTitle" class="fl item"><span>类目:</span><div class="content">{{purchaseMan.prodTitle || '-'}}</div></div>
+              <div :title="purchaseMan.prodTitle | nullFilter" class="fl item"><span>类目:</span><div class="content">{{(purchaseMan.prodTitle || '-') | nullFilter}}</div></div>
               <div :title="purchaseMan.cmpCode" class="fl item"><span>型号:</span><div class="content">{{purchaseMan.cmpCode || '-'}}</div></div>
               <div :title="purchaseMan.inbrand" class="fl item bottom"><span>品牌:</span><div class="content">{{purchaseMan.inbrand || '-'}}</div></div>
               <div :title="purchaseMan.spec" class="fl item bottom"><span>规格:</span><div class="content">{{purchaseMan.spec || '-'}}</div></div>
@@ -105,6 +105,7 @@
 <script>
   import Page from '~components/common/page/pageComponent.vue'
   import SayPrice from './SayPrice.vue'
+  import { checkNullStr } from '~utils/baseUtils'
   export default {
     data () {
       return {
@@ -147,6 +148,9 @@
         } else {
           return str || '-'
         }
+      },
+      nullFilter (str) {
+        return checkNullStr(str) ? str : '-'
       }
     },
     computed: {