Browse Source

默认图片

lilei 3 years ago
parent
commit
3cb83ecb23

BIN
src/assets/def_img@2x.png


+ 3 - 3
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -97,13 +97,11 @@
                 <!-- 产品图片 -->
                 <template slot="imageUrl" slot-scope="text, record">
                   <img
-                    v-if="record.productMainPic && record.productMainPic.imageUrl"
-                    :src="record.productMainPic.imageUrl+'?x-oss-process=image/resize,h_30,m_lfit' || ''"
+                    :src="record.productMainPic && record.productMainPic.imageUrl?(record.productMainPic.imageUrl+'?x-oss-process=image/resize,h_30,m_lfit'):defImg"
                     width="30"
                     height="30"
                     class="imageUrl"
                     @click="handlePicDetail(record)" />
-                  <span v-else>--</span>
                 </template>
                 <!-- 产品编码 -->
                 <template slot="code" slot-scope="text, record">
@@ -255,6 +253,7 @@ import ProductBrand from '../../common/productBrand.js'
 import { purchaseDetailBySn, purchaseWriteSubmit, purchaseDetailPrint, purchaseDetailBatchInsert, purchaseDetailExport } from '@/api/purchase'
 import { purchaseDetailList, purchaseDetailSave, purchaseDetailDel, purchaseDetailCount, purchaseDetailCancelList } from '@/api/purchaseDetail'
 import { productListPurchase } from '@/api/product'
+import defImg from '@/assets/def_img@2x.png'
 export default {
   components: { STable, VSelect, ProductType, ProductBrand, ImportGuideModal, outStockModal },
   data () {
@@ -262,6 +261,7 @@ export default {
       spinning: false,
       detail: null, // 详细信息
       subLoading: false,
+      defImg,
       // 选择产品
       addLoading: false,
       productType: [],