|
@@ -28,7 +28,8 @@
|
|
|
<!-- alert -->
|
|
|
<a-alert type="info" style="margin-bottom: 10px;" v-if="detailData!=null">
|
|
|
<div slot="message">
|
|
|
- 总销售数量:<strong>{{ detailData.totalSalesQty || 0 }}</strong>;本次下推数量:<strong>{{ detailData.totalQty || 0 }}</strong>;
|
|
|
+ <span v-if="$route.params.type!='stockOut'">总销售数量:<strong>{{ detailData.totalSalesQty || 0 }}</strong>;</span>
|
|
|
+ 本次下推数量:<strong>{{ detailData.totalQty || 0 }}</strong>;
|
|
|
</strong></strong></div>
|
|
|
</a-alert>
|
|
|
<!-- 列表 -->
|
|
@@ -37,7 +38,7 @@
|
|
|
ref="table"
|
|
|
size="default"
|
|
|
:rowKey="(record) => record.id"
|
|
|
- :columns="columns"
|
|
|
+ :columns="$route.params.type=='stockOut' ? outColumns : columns"
|
|
|
:data="loadData"
|
|
|
:scroll="{ x: 1070, y: 500 }"
|
|
|
bordered>
|
|
@@ -69,8 +70,16 @@ export default {
|
|
|
{ title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '原厂编码', dataIndex: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '销售数量', dataIndex: 'salesQty', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '本次下推数', dataIndex: 'qty', width: 130, align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
+ { title: '销售数量', dataIndex: 'salesQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '本次下推数', dataIndex: 'qty', width: 130, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
+ ],
|
|
|
+ outColumns: [
|
|
|
+ { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: 220, scopedSlots: { customRender: 'productCode' }, align: 'center' },
|
|
|
+ { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '原厂编码', dataIndex: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '本次出库数', dataIndex: 'qty', width: 130, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|