Browse Source

bug修复

chenrui 3 years ago
parent
commit
296e3397d8

+ 3 - 8
src/views/reportData/chainStockReport/detailModal.vue

@@ -11,8 +11,8 @@
     <!-- 合计 -->
     <!-- 合计 -->
     <a-alert type="info" style="margin-bottom:10px">
     <a-alert type="info" style="margin-bottom:10px">
       <div class="ftext" slot="message">
       <div class="ftext" slot="message">
-        现有库存总数量(个):<strong> {{ (currentStock && currentStock.totalQty) || 0 }} </strong>;
-        现有库存总成本(¥):<strong> {{ (currentStock && currentStock.totalCost) || 0 }} </strong>。
+        可用库存总数量(个):<strong> {{ (currentStock && currentStock.totalQty) || 0 }} </strong>;
+        可用库存总成本(¥):<strong> {{ (currentStock && currentStock.totalCost) || 0 }} </strong>。
       </div>
       </div>
     </a-alert>
     </a-alert>
     <!-- 详情 -->
     <!-- 详情 -->
@@ -25,11 +25,6 @@
       :columns="columns"
       :columns="columns"
       :data="loadData"
       :data="loadData"
       bordered>
       bordered>
-      <!-- 库存数量 -->
-      <template slot="currentQty" slot-scope="text, record">
-        {{ (Number(record.currentQty) + Number(record.freezeQty)) || 0 }}
-        <span v-if="Number(record.freezeQty)">(冻结{{ record.freezeQty }})</span>
-      </template>
     </s-table>
     </s-table>
     <div class="btn-cont">
     <div class="btn-cont">
       <a-button id="chainStockReportDetail-detail-modal-back" @click="isShow = false">返回列表</a-button>
       <a-button id="chainStockReportDetail-detail-modal-back" @click="isShow = false">返回列表</a-button>
@@ -74,7 +69,7 @@ export default {
         { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '库存数量', scopedSlots: { customRender: 'currentQty' }, width: '8%', align: 'center' },
+        { title: '库存数量', dataIndex: 'currentQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '成本单价', dataIndex: 'putCost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
         { title: '成本单价', dataIndex: 'putCost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象

+ 4 - 12
src/views/reportData/chainStockReport/list.vue

@@ -87,8 +87,8 @@
       <!-- 合计 -->
       <!-- 合计 -->
       <a-alert type="info" style="margin-bottom:10px">
       <a-alert type="info" style="margin-bottom:10px">
         <div class="ftext" slot="message">
         <div class="ftext" slot="message">
-          现有库存总数量(个):<strong> {{ (totalData && (totalData.currentStockQty || totalData.currentStockQty==0)) ? totalData.currentStockQty : '--' }} </strong>;
-          现有库存总成本(¥):<strong> {{ (totalData && (totalData.currentStockCost || totalData.currentStockCost==0)) ? totalData.currentStockCost : '--' }} </strong>。
+          可用库存总数量(个):<strong> {{ (totalData && (totalData.currentStockQty || totalData.currentStockQty==0)) ? totalData.currentStockQty : '--' }} </strong>;
+          可用库存总成本(¥):<strong> {{ (totalData && (totalData.currentStockCost || totalData.currentStockCost==0)) ? totalData.currentStockCost : '--' }} </strong>。
         </div>
         </div>
       </a-alert>
       </a-alert>
       <!-- 列表 -->
       <!-- 列表 -->
@@ -101,14 +101,6 @@
         :data="loadData"
         :data="loadData"
         :defaultLoadData="false"
         :defaultLoadData="false"
         bordered>
         bordered>
-        <!-- 现有库存数量 -->
-        <template slot="currentStockQty" slot-scope="text, record">
-          {{ (Number(record.currentStockQty) + Number(record.freezeQty)) || 0 }}
-          <span v-if="Number(record.freezeQty)">(冻结{{ record.freezeQty }})</span>
-        </template>
-        <template slot="currentStockCost" slot-scope="text, record">
-          {{ (Number(record.currentStockCost)*1000 + Number(record.freezeCost)*1000)/1000 || 0 }}
-        </template>
         <!-- 操作 -->
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
         <template slot="action" slot-scope="text, record">
           <a-button size="small" type="link" class="button-success" @click="goDetail(record)" id="chainStockReportList-detail-btn">详情</a-button>
           <a-button size="small" type="link" class="button-success" @click="goDetail(record)" id="chainStockReportList-detail-btn">详情</a-button>
@@ -156,8 +148,8 @@ export default {
         { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
         { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
         { title: '产品名称', dataIndex: 'productName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品名称', dataIndex: 'productName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productOrigCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '原厂编码', dataIndex: 'productOrigCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '现有库存数量(个)', dataIndex: 'currentStockQty', scopedSlots: { customRender: 'currentStockQty' }, width: '14%', align: 'center', sorter: true },
-        { title: '现有库存成本(¥)', dataIndex: 'currentStockCost', scopedSlots: { customRender: 'currentStockCost' }, width: '14%', align: 'center', sorter: true },
+        { title: '可用库存数量(个)', dataIndex: 'currentStockQty', width: '14%', align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '可用库存成本(¥)', dataIndex: 'currentStockCost', width: '14%', align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象