|
@@ -48,10 +48,7 @@
|
|
</a-form>
|
|
</a-form>
|
|
</div>
|
|
</div>
|
|
<a-tabs type="card" @change="changeTab">
|
|
<a-tabs type="card" @change="changeTab">
|
|
- <a-tab-pane key="1" tab="门槛产品"></a-tab-pane>
|
|
|
|
- <a-tab-pane key="2" tab="正价产品"></a-tab-pane>
|
|
|
|
- <a-tab-pane key="3" tab="促销产品"></a-tab-pane>
|
|
|
|
- <a-tab-pane key="4" tab="特价产品"></a-tab-pane>
|
|
|
|
|
|
+ <a-tab-pane v-for="item in tabList" :key="item.val" :tab="item.text"></a-tab-pane>
|
|
</a-tabs>
|
|
</a-tabs>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<s-table
|
|
<s-table
|
|
@@ -108,7 +105,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
-import { queryStockProductPage } from '@/api/stock'
|
|
|
|
|
|
+import { queryPromoProductPage } from '@/api/stock'
|
|
import ProductType from '@/views/common/productType.js'
|
|
import ProductType from '@/views/common/productType.js'
|
|
import ProductBrand from '@/views/common/productBrand.js'
|
|
import ProductBrand from '@/views/common/productBrand.js'
|
|
import chooseWarehouse from '@/views/common/chooseWarehouse'
|
|
import chooseWarehouse from '@/views/common/chooseWarehouse'
|
|
@@ -139,12 +136,15 @@ export default {
|
|
defaultWarehouseSn: undefined, // 默认仓库sn
|
|
defaultWarehouseSn: undefined, // 默认仓库sn
|
|
tableHeight: 300,
|
|
tableHeight: 300,
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
- promoProductClz: null,
|
|
|
|
|
|
+ promoProductClz: 'GATE',
|
|
|
|
+ promoRuleData: null,
|
|
|
|
+ tabList:[],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.queryParam.dealerSn = this.buyerSn
|
|
this.queryParam.dealerSn = this.buyerSn
|
|
- return queryStockProductPage(Object.assign(parameter, this.queryParam, { onlineFalg: '1', pricingState: 'PRICED' })).then(res => {
|
|
|
|
|
|
+ this.queryParam.promoProductClz = this.promoProductClz
|
|
|
|
+ return queryPromoProductPage(Object.assign(parameter, this.queryParam, { onlineFalg: '1', pricingState: 'PRICED' })).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
@@ -158,6 +158,7 @@ export default {
|
|
const productUnit = data.list[i].productUnit || '--'
|
|
const productUnit = data.list[i].productUnit || '--'
|
|
const productPackQtyUnit = data.list[i].productPackQtyUnit || '--'
|
|
const productPackQtyUnit = data.list[i].productPackQtyUnit || '--'
|
|
data.list[i].packQtyV = productPackQty + productUnit + '/' + productPackQtyUnit
|
|
data.list[i].packQtyV = productPackQty + productUnit + '/' + productPackQtyUnit
|
|
|
|
+ data.list[i].unitQtyV = data.list[i].unitQty + data.list[i].unitTypeDictValue
|
|
}
|
|
}
|
|
this.disabled = false
|
|
this.disabled = false
|
|
}
|
|
}
|
|
@@ -175,12 +176,11 @@ export default {
|
|
{ title: '品牌', dataIndex: 'productBrandName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '品牌', dataIndex: 'productBrandName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '出库仓库', dataIndex: 'warehouseName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '出库仓库', dataIndex: 'warehouseName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '库存数量', dataIndex: 'currentStockQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '库存数量', dataIndex: 'currentStockQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '单位', dataIndex: 'productUnit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
// { title: '售价', dataIndex: 'productPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
// { title: '售价', dataIndex: 'productPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '包装数', dataIndex: 'packQtyV', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '包装数', dataIndex: 'packQtyV', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '起订量', dataIndex: 'packQtyV', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
|
|
+ { title: '起订量', dataIndex: 'unitQtyV', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '下单数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '8%', align: 'center' },
|
|
{ title: '下单数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '8%', align: 'center' },
|
|
- { title: '实际数量', dataIndex: 'packQtyV', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
|
|
+ { title: '单位', dataIndex: 'productUnit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
{ title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
]
|
|
]
|
|
if (this.$hasPermissions('B_salesEdit_salesPrice')) { // 售价权限
|
|
if (this.$hasPermissions('B_salesEdit_salesPrice')) { // 售价权限
|
|
@@ -204,8 +204,8 @@ export default {
|
|
},
|
|
},
|
|
// 切换tab
|
|
// 切换tab
|
|
changeTab(e){
|
|
changeTab(e){
|
|
- console.log(e)
|
|
|
|
- this.promoProductClz = e.key
|
|
|
|
|
|
+ this.promoProductClz = e
|
|
|
|
+ this.resetSearchForm()
|
|
},
|
|
},
|
|
// 双击列表
|
|
// 双击列表
|
|
handleClickRow (record) {
|
|
handleClickRow (record) {
|
|
@@ -244,8 +244,28 @@ export default {
|
|
this.queryParam.warehouseSn = this.defaultWarehouseSn
|
|
this.queryParam.warehouseSn = this.defaultWarehouseSn
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
- pageInit (buyerSn, warehouseSn) {
|
|
|
|
- this.buyerSn = buyerSn
|
|
|
|
|
|
+ pageInit (data, promo) {
|
|
|
|
+ this.buyerSn = data.buyerSn
|
|
|
|
+ this.promoRuleData = promo.promotionRule
|
|
|
|
+ this.queryParam.dealerLevel = data.buyerLevel
|
|
|
|
+ this.queryParam.promoRuleSn = promo.promoRuleSn
|
|
|
|
+ const tabList = []
|
|
|
|
+ if(this.promoRuleData){
|
|
|
|
+ if(this.promoRuleData.gateFlag==='1'){
|
|
|
|
+ tabList.push({text:'门槛产品',val:'GATE'})
|
|
|
|
+ }
|
|
|
|
+ if(this.promoRuleData.promotionRuleType!='PROMO_PROD'){
|
|
|
|
+ tabList.push({text:'正价产品',val:'REGULAR'})
|
|
|
|
+ }
|
|
|
|
+ if(this.promoRuleData.regularPromotionSameFlag==='0'){
|
|
|
|
+ tabList.push({text:'促销产品',val:'GIFT'})
|
|
|
|
+ }
|
|
|
|
+ if(this.promoRuleData.promotionRuleType=='PROMO_PROD'){
|
|
|
|
+ tabList.push({text:'特价产品',val:'DISCOUNT'})
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.tabList = tabList
|
|
|
|
+ this.promoProductClz = tabList[0].val
|
|
this.tableHeight = window.innerHeight - 350
|
|
this.tableHeight = window.innerHeight - 350
|
|
},
|
|
},
|
|
// 刷新当前页面
|
|
// 刷新当前页面
|
|
@@ -257,7 +277,7 @@ export default {
|
|
},
|
|
},
|
|
// 选择配件
|
|
// 选择配件
|
|
handleAdd (row) {
|
|
handleAdd (row) {
|
|
- this.$emit('add', row, 0)
|
|
|
|
|
|
+ this.$emit('add', row, 0, this.promoProductClz)
|
|
},
|
|
},
|
|
// 产品分类 change
|
|
// 产品分类 change
|
|
changeProductType (val, opt) {
|
|
changeProductType (val, opt) {
|