瀏覽代碼

bug修复

chenrui 4 年之前
父節點
當前提交
371fec06bb
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/views/inventoryManagement/inventoryQuery/list.vue

+ 4 - 1
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -96,6 +96,9 @@
         {{ (record.currentStockQty + record.freezeQty) || 0 }}
         <span v-if="record.freezeQty">(冻结{{ record.freezeQty }})</span>
       </template>
+      <template slot="currentStockCost" slot-scope="text, record">
+        {{ (Number(record.currentStockCost) + Number(record.freezeCost)) || 0 }}
+      </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
         <a-button size="small" type="link" class="button-success" @click="goDetail(record)" id="inventoryQueryList-detail-btn">库存详情</a-button>
@@ -147,7 +150,7 @@ export default {
         { title: '产品品牌', dataIndex: 'brandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productTypeName' }, width: 240, align: 'center' },
         { title: '现有库存数量(个)', dataIndex: 'currentStockQty', scopedSlots: { customRender: 'currentStockQty' }, width: 165, align: 'center', sorter: true },
-        { title: '现有库存成本(¥)', dataIndex: 'currentStockCost', width: 165, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '现有库存成本(¥)', dataIndex: 'currentStockCost', scopedSlots: { customRender: 'currentStockCost' }, width: 165, align: 'center', sorter: true },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象