|
@@ -100,19 +100,11 @@
|
|
|
>批量操作<a-icon type="down" /> </a-button>
|
|
|
</a-dropdown>
|
|
|
<span v-if="selectTotal" style="margin:0 10px;">已选 {{ selectTotal }} 项</span>
|
|
|
- </a-col>
|
|
|
- <a-col :md="12" :sm="24" style="text-align:right;">
|
|
|
- <a-button
|
|
|
- :id="'salesEdit-searchBox-'+id"
|
|
|
- type="link"
|
|
|
- class="button-info"
|
|
|
- @click="showSearchBox=!showSearchBox" ><a-icon :type="showSearchBox?'close':'search'"/> 筛选</a-button>
|
|
|
<a-button
|
|
|
:id="'salesEdit-allSetWare-'+id"
|
|
|
type="link"
|
|
|
class="button-info"
|
|
|
size="small"
|
|
|
- style="margin-right:10px;"
|
|
|
@click="handleMenuClick({key:3})"
|
|
|
><a-icon type="setting"/> 全部仓库设置</a-button>
|
|
|
<a-button
|
|
@@ -123,6 +115,13 @@
|
|
|
@click="handleMenuClick({key:2})"
|
|
|
><a-icon type="delete"/> 全部删除</a-button>
|
|
|
</a-col>
|
|
|
+ <a-col :md="12" :sm="24" style="text-align:right;">
|
|
|
+ <a-button
|
|
|
+ :id="'salesEdit-searchBox-'+id"
|
|
|
+ type="link"
|
|
|
+ class="button-info"
|
|
|
+ @click="showSearchBox=!showSearchBox" ><a-icon :type="showSearchBox?'close':'search'"/> 筛选</a-button>
|
|
|
+ </a-col>
|
|
|
</a-row>
|
|
|
</div>
|
|
|
|
|
@@ -459,7 +458,7 @@ export default {
|
|
|
id={'salesEdit-upactive-' + row.id}
|
|
|
size="small"
|
|
|
type="link"
|
|
|
- loading={_this.delLoading}
|
|
|
+ disabled={_this.delLoading}
|
|
|
class="button-primary"
|
|
|
onClick={() => _this.handleUpdateActive(row)}
|
|
|
>换促销</a-button> : ''
|
|
@@ -470,7 +469,7 @@ export default {
|
|
|
id={'salesEdit-del-' + row.id}
|
|
|
size="small"
|
|
|
type="link"
|
|
|
- loading={_this.delLoading}
|
|
|
+ disabled={_this.delLoading}
|
|
|
class="button-error"
|
|
|
onClick={() => _this.handleDel(row)}
|
|
|
>删除{row.regularPromotionSameFlag}</a-button> : ''
|
|
@@ -712,6 +711,7 @@ export default {
|
|
|
_this.$message.warning('请先选择要批量取消的产品!')
|
|
|
return
|
|
|
}
|
|
|
+ const len = this.selectedRowKeys.length
|
|
|
const rowSelect = this.dataSource.filter(item => this.selectedRowKeys.includes(item.id))
|
|
|
// 判断是否全部为赠品
|
|
|
const obj = []
|
|
@@ -750,7 +750,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 删除全部产品 this.promo ? this.promo.salesPromoSn : ''
|
|
|
+ // 删除全部产品
|
|
|
handleBatchDelAll () {
|
|
|
const _this = this
|
|
|
if (_this.dataSource.length == 0) {
|
|
@@ -763,7 +763,7 @@ export default {
|
|
|
centered: true,
|
|
|
onOk () {
|
|
|
_this.spinning = true
|
|
|
- deleteAll({ salesBillSn: _this.salesBillSn, salesPromoSn: '' }).then(res => {
|
|
|
+ deleteAll({ salesBillSn: _this.salesBillSn }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
_this.searchProduct()
|
|
|
_this.$emit('refash', 'promo', 'batchDel')
|
|
@@ -791,7 +791,6 @@ export default {
|
|
|
_this.spinning = true
|
|
|
salesDetailBatchDel({
|
|
|
salesBillSn: _this.salesBillSn,
|
|
|
- salesPromoSn: '',
|
|
|
salesBillDetailSnList: obj
|
|
|
}).then(res => {
|
|
|
if (res.status == 200) {
|
|
@@ -810,8 +809,7 @@ export default {
|
|
|
const ajax_data = {
|
|
|
warehouseSn: row.warehouseSn,
|
|
|
salesBillDetailSnList: snArr,
|
|
|
- salesBillSn: this.salesBillSn,
|
|
|
- salesPromoSn: ''
|
|
|
+ salesBillSn: this.salesBillSn
|
|
|
}
|
|
|
this.setWarehouseInfo(ajax_data)
|
|
|
},
|
|
@@ -826,7 +824,6 @@ export default {
|
|
|
warehouseSn: sn,
|
|
|
salesBillDetailSnList: snArr,
|
|
|
salesBillSn: _this.salesBillSn,
|
|
|
- salesPromoSn: '',
|
|
|
allFlag: _this.warehouseTit ? true : undefined
|
|
|
}
|
|
|
_this.setWarehouseInfo(ajax_data)
|
|
@@ -869,6 +866,7 @@ export default {
|
|
|
} else if (e.key == 4) { // 批量取消促销
|
|
|
_this.handleBatchCancelActive()
|
|
|
} else { // 全部删除
|
|
|
+ _this.clearTableSelect()
|
|
|
_this.handleBatchDelAll()
|
|
|
}
|
|
|
},
|
|
@@ -891,8 +889,7 @@ export default {
|
|
|
salesDetailUpdateQty({
|
|
|
salesBillDetailSn: record.salesBillDetailSn,
|
|
|
qty: record.qty,
|
|
|
- salesBillSn: _this.salesBillSn,
|
|
|
- salesPromoSn: ''
|
|
|
+ salesBillSn: _this.salesBillSn
|
|
|
}).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
_this.$emit('refash', 'promo', 'update')
|
|
@@ -916,7 +913,7 @@ export default {
|
|
|
onOk () {
|
|
|
_this.delLoading = true
|
|
|
_this.spinning = true
|
|
|
- salesDetailDel({ salesBillDetailSn: row.salesBillDetailSn, salesBillSn: _this.salesBillSn, salesPromoSn: '' }).then(res => {
|
|
|
+ salesDetailDel({ salesBillDetailSn: row.salesBillDetailSn, salesBillSn: _this.salesBillSn }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
_this.searchProduct()
|
|
|
_this.$emit('refash', 'promo', 'del')
|