|
@@ -29,8 +29,8 @@
|
|
<a-select-option value="GIFT">
|
|
<a-select-option value="GIFT">
|
|
促销产品
|
|
促销产品
|
|
</a-select-option>
|
|
</a-select-option>
|
|
- <a-select-option value="GIFT" v-if="hasConvertPromoGifts">
|
|
|
|
- 促销产品(转采购额)
|
|
|
|
|
|
+ <a-select-option value="GIFT1" v-if="showConvertPromoGifts">
|
|
|
|
+ 促销产品(转采购额)
|
|
</a-select-option>
|
|
</a-select-option>
|
|
<a-select-option value="GATE">
|
|
<a-select-option value="GATE">
|
|
门槛产品
|
|
门槛产品
|
|
@@ -73,7 +73,7 @@
|
|
<div style="margin-bottom: 10px;display: flex;align-items: center;" v-if="detailData">
|
|
<div style="margin-bottom: 10px;display: flex;align-items: center;" v-if="detailData">
|
|
<div style="display: flex;align-items: center;">
|
|
<div style="display: flex;align-items: center;">
|
|
<a-button type="primary" :disabled="newLoading" class="button-info" @click="handlePlAdd">批量添加</a-button>
|
|
<a-button type="primary" :disabled="newLoading" class="button-info" @click="handlePlAdd">批量添加</a-button>
|
|
- <a-button type="primary" :disabled="newLoading" class="button-info" v-if="hasConvertPromoGifts" @click="handlePlPurchase">批量转采购额</a-button>
|
|
|
|
|
|
+ <a-button type="primary" :disabled="newLoading" class="button-info" v-if="showConvertPromoGifts" @click="handlePlPurchase">批量转采购额</a-button>
|
|
<a-button type="primary" v-if="hasNormalProduct" ghost style="margin-left:6px;" :disabled="newLoading" @click="handlePlCancel">批量取消</a-button>
|
|
<a-button type="primary" v-if="hasNormalProduct" ghost style="margin-left:6px;" :disabled="newLoading" @click="handlePlCancel">批量取消</a-button>
|
|
<a-button type="primary" v-if="hasPrompActive&&hasNoPushedActive" ghost style="margin-left:6px;" :disabled="newLoading" @click="handleAllCancel">整单取消</a-button>
|
|
<a-button type="primary" v-if="hasPrompActive&&hasNoPushedActive" ghost style="margin-left:6px;" :disabled="newLoading" @click="handleAllCancel">整单取消</a-button>
|
|
<a-tooltip placement="top" v-if="hasPrompActive&&hasNoPushedActive" style="margin-left:6px;">
|
|
<a-tooltip placement="top" v-if="hasPrompActive&&hasNoPushedActive" style="margin-left:6px;">
|
|
@@ -170,7 +170,8 @@ export default {
|
|
productTypeSn2: '', // 产品二级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
productTypeSn3: '', // 产品三级分类
|
|
productTypeSn3: '', // 产品三级分类
|
|
salesBillSn: '',
|
|
salesBillSn: '',
|
|
- warehouseSn: undefined
|
|
|
|
|
|
+ warehouseSn: undefined,
|
|
|
|
+ convertPromoGiftsFlag: undefined
|
|
},
|
|
},
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
activeList: [], // 活动列表
|
|
activeList: [], // 活动列表
|
|
@@ -198,7 +199,7 @@ export default {
|
|
disableSelectedRowKeys: [],
|
|
disableSelectedRowKeys: [],
|
|
selectedRowKeys: [],
|
|
selectedRowKeys: [],
|
|
colspanNums: 16,
|
|
colspanNums: 16,
|
|
- hasNormalProduct: false
|
|
|
|
|
|
+ hasNormalProduct: false,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -214,6 +215,9 @@ export default {
|
|
hasConvertPromoGifts(){
|
|
hasConvertPromoGifts(){
|
|
return this.detailData&&this.detailData.totalConvertPromoGiftsAmount > 0
|
|
return this.detailData&&this.detailData.totalConvertPromoGiftsAmount > 0
|
|
},
|
|
},
|
|
|
|
+ showConvertPromoGifts(){
|
|
|
|
+ return this.activeList&&this.activeList.find(item => item.promotionRule&&item.promotionRule.convertExpenseFlag==1&&item.promotionRule.promotionRuleType=='BUY_PROD_GIVE_PROD')
|
|
|
|
+ },
|
|
checkboxOption () {
|
|
checkboxOption () {
|
|
return {
|
|
return {
|
|
disableSelectedRowKeys: this.disableSelectedRowKeys,
|
|
disableSelectedRowKeys: this.disableSelectedRowKeys,
|
|
@@ -287,7 +291,7 @@ export default {
|
|
const inputFormat1 = function(record,data,h) {
|
|
const inputFormat1 = function(record,data,h) {
|
|
if(record.unpushedQty>0){
|
|
if(record.unpushedQty>0){
|
|
// 已选
|
|
// 已选
|
|
- if(_this.selectedRowKeys.includes(record.id)){
|
|
|
|
|
|
+ if(_this.selectedRowKeys.includes(record.id) && record.convertPromoGiftsFlag == 1){
|
|
return (
|
|
return (
|
|
<div>
|
|
<div>
|
|
<a-input-number
|
|
<a-input-number
|
|
@@ -362,7 +366,7 @@ export default {
|
|
{ title: '原厂编码', field: 'productOrigCode',key: "d", width: 150, align: 'left',operationColumn: false,ellipsis: { showTitle: true },renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'} },
|
|
{ title: '原厂编码', field: 'productOrigCode',key: "d", width: 150, align: 'left',operationColumn: false,ellipsis: { showTitle: true },renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'} },
|
|
{ title: '出库仓库', field: 'warehouseName',key: "e", width: 100, align: 'center',operationColumn: false,renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'}}
|
|
{ title: '出库仓库', field: 'warehouseName',key: "e", width: 100, align: 'center',operationColumn: false,renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'}}
|
|
]
|
|
]
|
|
- this.colspanNums = 6
|
|
|
|
|
|
+ this.colspanNums = this.showConvertPromoGifts ? 7 : 6
|
|
if (this.$hasPermissions('B_salesDispatch_salesPrice')) { // 售价权限
|
|
if (this.$hasPermissions('B_salesDispatch_salesPrice')) { // 售价权限
|
|
this.colspanNums = this.colspanNums + 1
|
|
this.colspanNums = this.colspanNums + 1
|
|
arr.push({ title: '销售价', field: 'price', width: 80,key: "f", align: 'right',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return priceFormat(row,row[column.field],h)} })
|
|
arr.push({ title: '销售价', field: 'price', width: 80,key: "f", align: 'right',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return priceFormat(row,row[column.field],h)} })
|
|
@@ -381,8 +385,8 @@ export default {
|
|
{ title: '待下推', field: 'unpushedQty', width: 80,key: "q", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
|
|
{ title: '待下推', field: 'unpushedQty', width: 80,key: "q", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
|
|
{ title: '取消数量', field: 'cancelNums', width: 80,key: "r", align: 'center',fixed: 'right',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return inputFormat(row,row[column.field],h)} },
|
|
{ title: '取消数量', field: 'cancelNums', width: 80,key: "r", align: 'center',fixed: 'right',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return inputFormat(row,row[column.field],h)} },
|
|
])
|
|
])
|
|
- if(this.hasConvertPromoGifts){
|
|
|
|
- arr.push({ title: '转采购额数量', field: 'convertPromoGiftsQty', width: 80,key: "r", align: 'center',fixed: 'right',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => {
|
|
|
|
|
|
+ if(this.showConvertPromoGifts){
|
|
|
|
+ arr.push({ title: '转采购额数量', field: 'convertPromoGiftsQty', width: 80,key: "z", align: 'center',fixed: 'right',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => {
|
|
return inputFormat1(row,row[column.field],h)
|
|
return inputFormat1(row,row[column.field],h)
|
|
} })
|
|
} })
|
|
}
|
|
}
|
|
@@ -456,6 +460,7 @@ export default {
|
|
this.queryParam.salesBillSn = this.salesBillSn
|
|
this.queryParam.salesBillSn = this.salesBillSn
|
|
this.queryParam.showStock = true
|
|
this.queryParam.showStock = true
|
|
const params = this.queryParam
|
|
const params = this.queryParam
|
|
|
|
+ console.log(params)
|
|
const active = this.activeList
|
|
const active = this.activeList
|
|
// 正常产品
|
|
// 正常产品
|
|
const hasSearchNormal = !params.promotionFlag || params.promotionFlag == 0
|
|
const hasSearchNormal = !params.promotionFlag || params.promotionFlag == 0
|
|
@@ -480,7 +485,6 @@ export default {
|
|
...params
|
|
...params
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
// 获取活动产品统计
|
|
// 获取活动产品统计
|
|
const acTotal = await salesPromoDetailCount(activeParams).then(res => res.data)
|
|
const acTotal = await salesPromoDetailCount(activeParams).then(res => res.data)
|
|
if(acTotal){
|
|
if(acTotal){
|
|
@@ -550,6 +554,7 @@ export default {
|
|
this.queryParam.productTypeSn2 = ''
|
|
this.queryParam.productTypeSn2 = ''
|
|
this.queryParam.productTypeSn3 = ''
|
|
this.queryParam.productTypeSn3 = ''
|
|
this.queryParam.warehouseSn = undefined
|
|
this.queryParam.warehouseSn = undefined
|
|
|
|
+ this.queryParam.convertPromoGiftsFlag = undefined
|
|
this.productType = []
|
|
this.productType = []
|
|
this.dataSource = []
|
|
this.dataSource = []
|
|
this.clearSelectTable()
|
|
this.clearSelectTable()
|
|
@@ -589,18 +594,21 @@ export default {
|
|
const noChooseRow = this.dataSource.filter(item => chooseList.includes(item.id) && item.convertPromoGiftsFlag==0)
|
|
const noChooseRow = this.dataSource.filter(item => chooseList.includes(item.id) && item.convertPromoGiftsFlag==0)
|
|
const obj = []
|
|
const obj = []
|
|
const noObj = []
|
|
const noObj = []
|
|
- chooseRow && chooseRow.map(item => {
|
|
|
|
- obj.push(item.salesBillDetailSn)
|
|
|
|
- })
|
|
|
|
noChooseRow && noChooseRow.map(item => {
|
|
noChooseRow && noChooseRow.map(item => {
|
|
noObj.push(item.productCode)
|
|
noObj.push(item.productCode)
|
|
})
|
|
})
|
|
|
|
+ chooseRow && chooseRow.map(item => {
|
|
|
|
+ obj.push({
|
|
|
|
+ 'convertPromoGiftsQty': item.convertPromoGiftsQty,
|
|
|
|
+ 'salesBillDetailSn': item.salesBillDetailSn
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
|
|
if(obj.length){
|
|
if(obj.length){
|
|
this.$confirm({
|
|
this.$confirm({
|
|
title: '提示',
|
|
title: '提示',
|
|
- content: <div><div style="text-align:center;padding:10px 0;font-weight:bold;">确定将选中的促销产品转成采购额吗?</div><div style="font-size:12px;color:#999;padding:10px 0;">
|
|
|
|
-当该销售单完结后,可将采购额转成费用报销单。</div>{noObj.length?<div><div>总共选择了 {chooseList.length} 个产品,其中 {obj.length} 个产品可转采购额。</div><div> 产品 ({noObj.toString()}) 不可转采购额!</div></div>:''}</div>,
|
|
|
|
|
|
+ content: <div><div style="text-align:center;padding:10px 0;font-weight:bold;">确定将选中的促销产品转成采购额吗?</div><div style="font-size:12px;color:#999;padding:10px 0;text-align:center;">
|
|
|
|
+当该销售单完结后,可将采购额转成费用报销单。</div>{noObj.length?<div style="text-align:center;"><div>总共选择了 {chooseList.length} 个产品,其中 {obj.length} 个产品可转采购额。</div><div> 产品 ({noObj.toString()}) 不可转采购额!</div></div>:''}</div>,
|
|
centered: true,
|
|
centered: true,
|
|
closable: true,
|
|
closable: true,
|
|
class: 'confirm-center',
|
|
class: 'confirm-center',
|