|
@@ -66,7 +66,6 @@
|
|
|
<a-col :md="4" :sm="24" style="margin-bottom: 10px;">
|
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" :id="'salesEdit-refresh-'+id">查询</a-button>
|
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" :id="'salesEdit-reset-'+id">重置</a-button>
|
|
|
- <a-button type="primary" style="margin-left: 15px" class="button-info" :id="'salesEdit-updateStock-'+id">第三方库存</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
@@ -84,6 +83,7 @@
|
|
|
class="button-info"
|
|
|
@click="showSearchBox=!showSearchBox" ><a-icon :type="showSearchBox?'close':'search'"/> 筛选</a-button>
|
|
|
<!-- // 操作按钮 -->
|
|
|
+ <a-button type="link" class="button-info" @click="searchThreeStock" id="salesEdit-updateStock"><a-icon type="redo"/>第三方库存</a-button>
|
|
|
<a-dropdown>
|
|
|
<a-menu slot="overlay" @click="handleMenuClick" :id="'salesEdit-menu-'+id">
|
|
|
<a-menu-item key="3" :disabled="disablePromo" :id="'salesEdit-menu-3'+id">
|
|
@@ -408,7 +408,8 @@ export default {
|
|
|
promoProductClz: null, // 活动产品分类
|
|
|
disablePromo: false, // 是否禁用活动
|
|
|
countData: null, // 统计信息
|
|
|
- warehouseTit: '' // 仓库设置唐卡标题
|
|
|
+ warehouseTit: '', // 仓库设置唐卡标题
|
|
|
+ showStockCol: false // 第三方库存是否显示
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -425,11 +426,13 @@ export default {
|
|
|
{ title: '起订量', dataIndex: 'unitQtyV', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '6%', align: 'center' },
|
|
|
{ title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '6%', align: 'center' },
|
|
|
- { title: '第三方库存', dataIndex: 'stockQty', width: '6%', align: 'center', customRender: text => ((text || text == 0) ? text : '--') },
|
|
|
{ title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '10%', align: 'center' },
|
|
|
{ title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
|
|
|
]
|
|
|
+ if (this.showStockCol) {
|
|
|
+ arr.splice(6, 0, { title: '第三方库存', dataIndex: 'stockQty', width: '6%', align: 'center', customRender: text => ((text || text == 0) ? text : '--') })
|
|
|
+ }
|
|
|
// 售价权限
|
|
|
if (this.$hasPermissions('B_salesEdit_salesPrice')) {
|
|
|
arr.splice(3, 0, { title: '售价', dataIndex: 'price', width: '6%', align: 'right', scopedSlots: { customRender: 'price' } })
|
|
@@ -440,7 +443,7 @@ export default {
|
|
|
idx = idx + 1
|
|
|
arr.splice(5, 0, { title: '折扣', dataIndex: 'discountPrice', width: '6%', align: 'right', scopedSlots: { customRender: 'discountPrice' } })
|
|
|
}
|
|
|
- arr.splice(9 + idx, 0, { title: '售价小计', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
+ arr.splice((this.showStockCol ? 9 : 8) + idx, 0, { title: '售价小计', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
}
|
|
|
return arr
|
|
|
}
|
|
@@ -465,6 +468,10 @@ export default {
|
|
|
showSearch () {
|
|
|
this.showSearchBox = !this.showSearchBox
|
|
|
},
|
|
|
+ // 查询第三方库存
|
|
|
+ searchThreeStock () {
|
|
|
+ this.showStockCol = true
|
|
|
+ },
|
|
|
// 显示规则详细
|
|
|
showDesc (descDetail) {
|
|
|
this.showDescBox = !this.showDescBox
|