Просмотр исходного кода

fix:商品信息供应商回显

maliang 1 неделя назад
Родитель
Сommit
f338eef51e
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      jshERP-web/src/views/material/modules/MaterialModal.vue

+ 8 - 0
jshERP-web/src/views/material/modules/MaterialModal.vue

@@ -342,6 +342,9 @@
                 bordered
                 @change="handleMeTableChange"
               >
+                <template slot="supplierId" slot-scope="text, record">
+                  {{ formatSupplierName(record.supplierId) }}
+                </template>
                 <template slot="depotId" slot-scope="text, record">
                   {{ formatDepotName(record.depotId) }}
                 </template>
@@ -593,6 +596,7 @@ export default {
           {
             title: '供应商',
             dataIndex: 'supplierId',
+            scopedSlots: { customRender: 'supplierId' } 
           },
           {
             title: '库存(最小单位)',
@@ -735,6 +739,10 @@ export default {
       const target = this.depotList.find(item => item.value == id)
       return target ? target.title : ''
     },
+    formatSupplierName(id){
+      const target = this.supList.find(item => item.id == id)
+      return target ? target.supplier : ''
+    },
     // 快捷键
     handleOkKey(e) {
       const key = window.event.keyCode ? window.event.keyCode : window.event.which