|
@@ -70,7 +70,7 @@
|
|
<a-alert type="info" style="margin-bottom:10px">
|
|
<a-alert type="info" style="margin-bottom:10px">
|
|
<div slot="message">
|
|
<div slot="message">
|
|
总数量:<strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong> ,
|
|
总数量:<strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong> ,
|
|
- 总成本(¥):<strong>{{ (productTotal&&(productTotal.totalCost || productTotal.totalCost==0)) ? productTotal.totalCost : '--' }}</strong> ,
|
|
|
|
|
|
+ <span v-if="$hasPermissions('B_isShowCost')">总成本(¥):<strong>{{ (productTotal&&(productTotal.totalCost || productTotal.totalCost==0)) ? productTotal.totalCost : '--' }}</strong> ,</span>
|
|
总售价(¥):<strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? productTotal.totalPrice : '--' }}</strong>
|
|
总售价(¥):<strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? productTotal.totalPrice : '--' }}</strong>
|
|
</div>
|
|
</div>
|
|
</a-alert>
|
|
</a-alert>
|
|
@@ -188,18 +188,6 @@ export default {
|
|
productTypeList: [], // 产品分类 下拉数据
|
|
productTypeList: [], // 产品分类 下拉数据
|
|
productType: [],
|
|
productType: [],
|
|
warehouseList: [], // 仓库 下拉数据
|
|
warehouseList: [], // 仓库 下拉数据
|
|
- // 表头
|
|
|
|
- columns: [
|
|
|
|
- { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
|
|
|
|
- { title: '产品编码', dataIndex: 'productCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '原厂编码', dataIndex: 'productOrigCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '成本价', dataIndex: 'lastStockCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '售价', dataIndex: 'productPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '库存数量', dataIndex: 'currentStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '单位', dataIndex: 'productUnit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
|
|
|
|
- ],
|
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
@@ -213,19 +201,6 @@ export default {
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 表头
|
|
|
|
- chooseColumns: [
|
|
|
|
- { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
|
|
|
|
- { title: '产品编码', dataIndex: 'productEntity.code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '原厂编码', dataIndex: 'productEntity.origCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '成本价', dataIndex: 'cost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '售价', dataIndex: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '库存数量', dataIndex: 'currentStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '调出数量', scopedSlots: { customRender: 'qty' }, width: 100, align: 'center' },
|
|
|
|
- { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
|
|
|
|
- ],
|
|
|
|
localDataSource: [],
|
|
localDataSource: [],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
chooseLoadData: parameter => {
|
|
chooseLoadData: parameter => {
|
|
@@ -249,6 +224,41 @@ export default {
|
|
openGuideModal: false // 导入产品引导
|
|
openGuideModal: false // 导入产品引导
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ computed: {
|
|
|
|
+ columns () {
|
|
|
|
+ const arr = [
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '原厂编码', dataIndex: 'productOrigCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '售价', dataIndex: 'productPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '库存数量', dataIndex: 'currentStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '单位', dataIndex: 'productUnit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
|
|
|
|
+ ]
|
|
|
|
+ if (this.$hasPermissions('B_isShowCost')) {
|
|
|
|
+ arr.splice(4, 0, { title: '成本价', dataIndex: 'lastStockCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
+ }
|
|
|
|
+ return arr
|
|
|
|
+ },
|
|
|
|
+ chooseColumns () {
|
|
|
|
+ const arr = [
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
|
|
|
|
+ { title: '产品编码', dataIndex: 'productEntity.code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '原厂编码', dataIndex: 'productEntity.origCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '售价', dataIndex: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '库存数量', dataIndex: 'currentStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '调出数量', scopedSlots: { customRender: 'qty' }, width: 100, align: 'center' },
|
|
|
|
+ { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
|
|
|
|
+ ]
|
|
|
|
+ if (this.$hasPermissions('B_isShowCost')) {
|
|
|
|
+ arr.splice(4, 0, { title: '成本价', dataIndex: 'cost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
+ }
|
|
|
|
+ return arr
|
|
|
|
+ }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|