|
@@ -1,17 +1,16 @@
|
|
<template>
|
|
<template>
|
|
<div class="productInfoList-wrap">
|
|
<div class="productInfoList-wrap">
|
|
<!-- alert -->
|
|
<!-- alert -->
|
|
- <div style="margin-bottom: 10px;display: flex;align-items: center;">
|
|
|
|
|
|
+ <div style="margin-bottom: 10px;display: flex;align-items: center;" v-if="!showEmpty">
|
|
<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="danger" :disabled="newLoading" class="button-info" @click="delSalerDetailAll">批量删除</a-button>
|
|
<span style="margin-left: 10px;" v-if="selectedRowKeys.length">已选 {{ selectedRowKeys.length }} 项</span>
|
|
<span style="margin-left: 10px;" v-if="selectedRowKeys.length">已选 {{ selectedRowKeys.length }} 项</span>
|
|
</div>
|
|
</div>
|
|
- <div style="padding-left: 20px;" v-if="detailData">
|
|
|
|
- 本次下推款数:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;
|
|
|
|
- 本次下推数量:<strong>{{ detailData&&(detailData.totalCancelQty || detailData.totalCancelQty==0) ? detailData.totalCancelQty : '--' }}</strong>;
|
|
|
|
|
|
+ <div style="padding-left: 20px;">
|
|
|
|
+ <slot name="total"></slot>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
|
|
+
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<ve-table
|
|
<ve-table
|
|
border-y
|
|
border-y
|
|
@@ -30,7 +29,7 @@
|
|
:column-width-resize-option="columnWidthResizeOption"
|
|
:column-width-resize-option="columnWidthResizeOption"
|
|
:checkbox-option="checkboxOption"
|
|
:checkbox-option="checkboxOption"
|
|
/>
|
|
/>
|
|
- <div v-show="showEmpty" class="empty-data">暂无数据</div>
|
|
|
|
|
|
+ <div v-show="showEmpty" class="empty-data">暂无待下推产品</div>
|
|
</a-spin>
|
|
</a-spin>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
@@ -39,7 +38,6 @@
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { deleteBatch, waitDispatchDetailAllList, updateQty } from '@/api/waitDispatchDetail'
|
|
import { deleteBatch, waitDispatchDetailAllList, updateQty } from '@/api/waitDispatchDetail'
|
|
- import { findBySalesBillSn } from '@/api/dispatch'
|
|
|
|
|
|
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import chooseWarehouse from '@/views/common/chooseWarehouse'
|
|
import chooseWarehouse from '@/views/common/chooseWarehouse'
|
|
@@ -63,8 +61,8 @@
|
|
},
|
|
},
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
- queryParam: {
|
|
|
|
- dispatchBillSn
|
|
|
|
|
|
+ productForm: {
|
|
|
|
+ dispatchBillSn: ''
|
|
},
|
|
},
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
spinning: false,
|
|
spinning: false,
|
|
@@ -89,7 +87,9 @@
|
|
showEmpty: false,
|
|
showEmpty: false,
|
|
showTableHead: true,
|
|
showTableHead: true,
|
|
disableSelectedRowKeys: [],
|
|
disableSelectedRowKeys: [],
|
|
- selectedRowKeys: []
|
|
|
|
|
|
+ selectedRowKeys: [],
|
|
|
|
+ detailData: null,
|
|
|
|
+ activeList: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -122,10 +122,10 @@
|
|
ftext = '促'
|
|
ftext = '促'
|
|
fcolor = '#52c41a'
|
|
fcolor = '#52c41a'
|
|
}
|
|
}
|
|
- if(record.promotionFlag == 'REGULAR'){
|
|
|
|
- ftext = '正'
|
|
|
|
- fcolor = '#108ee9'
|
|
|
|
- }
|
|
|
|
|
|
+ // if(record.promotionFlag == 'REGULAR'){
|
|
|
|
+ // ftext = '正'
|
|
|
|
+ // fcolor = '#108ee9'
|
|
|
|
+ // }
|
|
if(record.promotionFlag == 'DISCOUNT'){
|
|
if(record.promotionFlag == 'DISCOUNT'){
|
|
ftext = '特'
|
|
ftext = '特'
|
|
fcolor = '#faad14'
|
|
fcolor = '#faad14'
|
|
@@ -145,9 +145,10 @@
|
|
<div>
|
|
<div>
|
|
<a-input-number
|
|
<a-input-number
|
|
size="small"
|
|
size="small"
|
|
- vModel={record.cancelNums}
|
|
|
|
|
|
+ value={record.qty}
|
|
|
|
+ onChange={e => _this.cancelNumsChange(e,record)}
|
|
precision={0}
|
|
precision={0}
|
|
- min={0}
|
|
|
|
|
|
+ min={1}
|
|
max={record.surplusQty}
|
|
max={record.surplusQty}
|
|
style="width: 100%;"
|
|
style="width: 100%;"
|
|
placeholder="请输入" />
|
|
placeholder="请输入" />
|
|
@@ -164,75 +165,31 @@
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
- class="button-info"
|
|
|
|
- onClick={()=>_this.handleAdd(record)}
|
|
|
|
- >添加</a-button>
|
|
|
|
|
|
+ class="button-error"
|
|
|
|
+ onClick={()=>_this.handleDel(record)}
|
|
|
|
+ >删除</a-button>
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|
|
}
|
|
}
|
|
return '--'
|
|
return '--'
|
|
}
|
|
}
|
|
- // 编号,并且格式化活动分类行
|
|
|
|
- const noFormat = function(record,data,h){
|
|
|
|
- return (
|
|
|
|
- <div>
|
|
|
|
- {record.id.indexOf('promo-')>=0 ? (
|
|
|
|
- <div class="active-title">
|
|
|
|
- {record.promo?(
|
|
|
|
- <div>
|
|
|
|
- <strong style="margin-right:10px;font-size:14px;">{record.promo.promotion.title} ({record.promo.promotionRule.description})</strong>
|
|
|
|
- <span style="margin-left:10px;color:#00aaff;cursor: pointer;" onClick={()=>this.showDesc(record)}>
|
|
|
|
- <a-icon title="查看活动详情" type="eye"/> 活动详情
|
|
|
|
- </span>
|
|
|
|
- </div>
|
|
|
|
- ):(<div></div>)}
|
|
|
|
- <div>
|
|
|
|
- 总售价:<strong>12333</strong>;
|
|
|
|
- 总款数:<strong>22</strong>;
|
|
|
|
- 总数量:<strong>134</strong>;
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- ):(<span>{data}</span>)}
|
|
|
|
- </div>
|
|
|
|
- )
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+
|
|
let arr= [
|
|
let arr= [
|
|
{ title: "", field: "", key: "acheck", type: "checkbox", align: "center" },
|
|
{ title: "", field: "", key: "acheck", type: "checkbox", align: "center" },
|
|
- { title: '序号', field: 'no',key: "a", width: 50, align: 'center', operationColumn: false,renderBodyCell: ({ row, column, rowIndex }, h) => { return noFormat(row,row[column.field],h)} },
|
|
|
|
|
|
+ { title: '序号', field: 'no',key: "a", width: 50, align: 'center', operationColumn: false },
|
|
{ title: '产品编码', field: 'productCode',key: "b", width: 150, align: 'center',operationColumn: false,renderBodyCell: ({ row, column, rowIndex }, h) => { return codeFormat(row,row[column.field],h)} },
|
|
{ title: '产品编码', field: 'productCode',key: "b", width: 150, align: 'center',operationColumn: false,renderBodyCell: ({ row, column, rowIndex }, h) => { return codeFormat(row,row[column.field],h)} },
|
|
{ title: '产品名称', field: 'productName',key: "c", width: 250, align: 'center',operationColumn: false , ellipsis: { showTitle: true },renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'}},
|
|
{ title: '产品名称', field: 'productName',key: "c", width: 250, align: 'center',operationColumn: false , ellipsis: { showTitle: true },renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'}},
|
|
- { title: '原厂编码', field: 'productOrigCode',key: "d", width: 150, align: 'center',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] || '--'}},
|
|
|
|
+ { title: '待下推数量', field: 'surplusQty', width: 80,key: "o", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
|
|
|
|
+ { title: '本次下推数', field: 'qty', width: 80,key: "r", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return inputFormat(row,row[column.field],h)} },
|
|
|
|
+ { title: '单位', field: 'productOrigUnit',key: "i", width: 80, align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'}},
|
|
|
|
+ { title: '操作', field: 'action', width: 80,key: "s", align: 'center',fixed: 'right',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return actionFormat(row,row[column.field],h)} }
|
|
]
|
|
]
|
|
- if (this.$hasPermissions('B_salesDispatch_salesPrice')) { // 售价权限
|
|
|
|
- arr.push({ title: '销售价', field: 'price', width: 80,key: "f", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return priceFormat(row[column.field])} })
|
|
|
|
- }
|
|
|
|
- if (this.$hasPermissions('B_salesDispatch_costPrice')) {
|
|
|
|
- arr.push({ title: '成本价', field: 'showCost', width: 80,key: "g", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return priceFormat(row[column.field])} })
|
|
|
|
- }
|
|
|
|
- arr = arr.concat([
|
|
|
|
- { title: '出库仓库', field: 'warehouseName',key: "h", width: 100, align: 'center',operationColumn: false,renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'}},
|
|
|
|
- { title: '单位', field: 'productOrigUnit',key: "i", width: 80, align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'}},
|
|
|
|
- { title: '可用库存', field: 'stockQty', width: 80,key: "j", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
|
|
|
|
- { title: '销售数量', field: 'qty', width: 80,key: "k", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
|
|
|
|
- { title: '已取消', field: 'cancelQty', width: 80,key: "o", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
|
|
|
|
- { title: '已下推', field: 'pushedQty', width: 80,key: "p", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
|
|
|
|
- { title: '待下推', field: 'surplusQty', width: 80,key: "q", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
|
|
|
|
- { title: '取消数量', field: 'surplusQty', width: 80,key: "r", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return inputFormat(row,row[column.field],h)} },
|
|
|
|
- { title: '操作', field: 'action', width: 80,key: "s", align: 'center',fixed: 'right',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return actionFormat(row,row[column.field],h)} },
|
|
|
|
- ])
|
|
|
|
-
|
|
|
|
|
|
+
|
|
return arr
|
|
return arr
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- // 产品分类 change
|
|
|
|
- changeProductType (val, opt) {
|
|
|
|
- this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
|
|
|
|
- this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
|
|
- this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
|
|
- },
|
|
|
|
// 合并活动分类单元格
|
|
// 合并活动分类单元格
|
|
bodyCellSpan({ row, column, rowIndex }) {
|
|
bodyCellSpan({ row, column, rowIndex }) {
|
|
if (row.id.indexOf('promo-')>=0) {
|
|
if (row.id.indexOf('promo-')>=0) {
|
|
@@ -259,29 +216,15 @@
|
|
// console.log(isSelected, selectedRowKeys);
|
|
// console.log(isSelected, selectedRowKeys);
|
|
this.selectedRowKeys = selectedRowKeys;
|
|
this.selectedRowKeys = selectedRowKeys;
|
|
},
|
|
},
|
|
- // 获取销售单参与的活动列表
|
|
|
|
- getActiveList(){
|
|
|
|
- salesPromoQueryList({ salesBillSn: this.salesBillSn }).then(res => {
|
|
|
|
- if(res.status == 200){
|
|
|
|
- this.activeList = res.data || []
|
|
|
|
- }
|
|
|
|
- this.$nextTick(()=>{
|
|
|
|
- this.searchTable()
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
async searchTable(){
|
|
async searchTable(){
|
|
this.selectedRowKeys = []
|
|
this.selectedRowKeys = []
|
|
this.disableSelectedRowKeys = []
|
|
this.disableSelectedRowKeys = []
|
|
this.dataSource = []
|
|
this.dataSource = []
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- this.queryParam.salesBillSn = this.salesBillSn
|
|
|
|
- this.queryParam.showStock = true
|
|
|
|
- const params = this.queryParam
|
|
|
|
- // 正常产品
|
|
|
|
|
|
+ const params = this.productForm
|
|
|
|
+ // 带下推产品
|
|
const listData = await waitDispatchDetailAllList(params).then(res => res.data)
|
|
const listData = await waitDispatchDetailAllList(params).then(res => res.data)
|
|
- const countData = await findBySalesBillSn({salesBillSn: this.salesBillSn}).then(res => res.data)
|
|
|
|
console.log(listData)
|
|
console.log(listData)
|
|
this.dataSource = listData
|
|
this.dataSource = listData
|
|
|
|
|
|
@@ -294,100 +237,122 @@
|
|
const productName = (item.productEntity && item.productEntity.name) || (item.dealerProductEntity && item.dealerProductEntity.name)
|
|
const productName = (item.productEntity && item.productEntity.name) || (item.dealerProductEntity && item.dealerProductEntity.name)
|
|
const productOrigCode = (item.productEntity && item.productEntity.origCode) || (item.dealerProductEntity && item.dealerProductEntity.origCode)
|
|
const productOrigCode = (item.productEntity && item.productEntity.origCode) || (item.dealerProductEntity && item.dealerProductEntity.origCode)
|
|
const productOrigUnit = (item.productEntity && item.productEntity.unit) || (item.dealerProductEntity && item.dealerProductEntity.unit)
|
|
const productOrigUnit = (item.productEntity && item.productEntity.unit) || (item.dealerProductEntity && item.dealerProductEntity.unit)
|
|
|
|
+ const warehouseName = item.dispatchBill && item.dispatchBill.warehouseName || ''
|
|
item.productCode = productCode || '--'
|
|
item.productCode = productCode || '--'
|
|
item.productName = productName || '--'
|
|
item.productName = productName || '--'
|
|
item.productOrigCode = productOrigCode == ' ' ? '--' : productOrigCode
|
|
item.productOrigCode = productOrigCode == ' ' ? '--' : productOrigCode
|
|
item.productOrigUnit = productOrigUnit || '--'
|
|
item.productOrigUnit = productOrigUnit || '--'
|
|
- if(item.stockQty<0 || !item.stockQty){
|
|
|
|
- this.disableSelectedRowKeys.push(item.id)
|
|
|
|
- }
|
|
|
|
|
|
+ item.warehouseName = warehouseName || '--'
|
|
|
|
+ item.qtyBackups = item.qty
|
|
})
|
|
})
|
|
- this.tableHeight = (this.showEmpty ? 200 : this.maxHeight) + 'px'
|
|
|
|
|
|
+ this.showEmpty = this.dataSource.length <= 0
|
|
|
|
+ this.tableHeight = (this.showEmpty ? 300 : this.maxHeight) + 'px'
|
|
this.spinning = false
|
|
this.spinning = false
|
|
this.disabled = false
|
|
this.disabled = false
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
- this.queryParam.ptype = '0'
|
|
|
|
- this.queryParam.productCode = ''
|
|
|
|
- this.queryParam.productName = ''
|
|
|
|
- this.queryParam.promotionFlag = undefined
|
|
|
|
- this.queryParam.brandSn = undefined
|
|
|
|
- this.queryParam.productTypeSn1 = ''
|
|
|
|
- this.queryParam.productTypeSn2 = ''
|
|
|
|
- this.queryParam.productTypeSn3 = ''
|
|
|
|
- this.queryParam.warehouseSn = undefined
|
|
|
|
- this.productType = []
|
|
|
|
this.dataSource = []
|
|
this.dataSource = []
|
|
|
|
+ this.clearSelectTable()
|
|
this.searchTable()
|
|
this.searchTable()
|
|
},
|
|
},
|
|
- pageInit (salesBillSn, detailData) {
|
|
|
|
- this.salesBillSn = salesBillSn
|
|
|
|
|
|
+ pageInit (productForm, detailData, activeList) {
|
|
|
|
+ this.productForm = Object.assign(this.productForm,productForm)
|
|
this.detailData = detailData
|
|
this.detailData = detailData
|
|
|
|
+ this.activeList = activeList
|
|
// 获取活动列表
|
|
// 获取活动列表
|
|
- this.getActiveList()
|
|
|
|
|
|
+ this.resetSearchForm()
|
|
},
|
|
},
|
|
// 清空选项
|
|
// 清空选项
|
|
clearSelectTable () {
|
|
clearSelectTable () {
|
|
this.selectedRowKeys = []
|
|
this.selectedRowKeys = []
|
|
},
|
|
},
|
|
- // 添加
|
|
|
|
- handleAdd (row) {
|
|
|
|
- if (row.stockQty > 0) { // 可用库存大于0才可添加
|
|
|
|
- this.$emit('addProduct', [row.salesBillDetailSn])
|
|
|
|
|
|
+ // 已选产品 blur
|
|
|
|
+ cancelNumsChange (val, record) {
|
|
|
|
+ const _this = this
|
|
|
|
+ if (val && val != record.qtyBackups) {
|
|
|
|
+ _this.spinning = true
|
|
|
|
+ updateQty({
|
|
|
|
+ dispatchBillDetailSn: record.dispatchBillDetailSn,
|
|
|
|
+ qty: record.qty,
|
|
|
|
+ salesBillSn: _this.detailData.salesBillSn,
|
|
|
|
+ dispatchBillSn: _this.productForm.dispatchBillSn
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.$message.success(res.message)
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ _this.$emit('refashTable')
|
|
|
|
+ } else {
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
- this.$message.warning('库存为0,不可添加!')
|
|
|
|
|
|
+ record.qty = record.qtyBackups
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 批量添加
|
|
|
|
- handlePlAdd () {
|
|
|
|
- const _this = this
|
|
|
|
- const chooseList = this.selectedRowKeys
|
|
|
|
- if (chooseList.length == 0) {
|
|
|
|
- _this.$message.warning('请先选择产品!')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- const chooseRow = this.dataSource.filter(item => chooseList.includes(item.id) && item.id.indexOf('promo-')<0)
|
|
|
|
- const obj = []
|
|
|
|
- chooseRow && chooseRow.map(item => {
|
|
|
|
- if (item.stockQty > 0) {
|
|
|
|
- obj.push(item.salesBillDetailSn)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- this.$confirm({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '确认要批量添加到待下推列表吗?',
|
|
|
|
- centered: true,
|
|
|
|
- closable: true,
|
|
|
|
- onOk () {
|
|
|
|
- _this.$emit('addProduct', obj)
|
|
|
|
|
|
+ // 删除产品
|
|
|
|
+ handleDel (row) {
|
|
|
|
+ const _this = this
|
|
|
|
+ this.$confirm({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '确认要删除吗?',
|
|
|
|
+ centered: true,
|
|
|
|
+ closable: true,
|
|
|
|
+ onOk () {
|
|
|
|
+ _this.deleteFun(row, 0)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 移除操作
|
|
|
|
+ deleteFun (row, type) {
|
|
|
|
+ const _this = this
|
|
|
|
+ _this.spinning = true
|
|
|
|
+ deleteBatch({
|
|
|
|
+ dispatchBillSn: this.productForm.dispatchBillSn,
|
|
|
|
+ dispatchBillDetailList : type == 0 ? [row.dispatchBillDetailSn] : row
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.$emit('refashTable')
|
|
|
|
+ _this.$message.success(res.message)
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ } else {
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 批量删除
|
|
|
|
+ delSalerDetailAll () {
|
|
|
|
+ const _this = this
|
|
|
|
+ const chooseList = this.selectedRowKeys
|
|
|
|
+ if (chooseList.length == 0) {
|
|
|
|
+ _this.$message.warning('请选择待下推产品!')
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 批量取消
|
|
|
|
- handlePlCancel () {
|
|
|
|
- const _this = this
|
|
|
|
- const chooseList = this.selectedRowKeys
|
|
|
|
- if (chooseList.length == 0) {
|
|
|
|
- _this.$message.warning('请先选择产品!')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- const chooseRow = this.dataSource.filter(item => chooseList.includes(item.id) && item.id.indexOf('promo-')<0)
|
|
|
|
- const obj = []
|
|
|
|
- chooseRow && chooseRow.map(item => {
|
|
|
|
- obj.push({
|
|
|
|
- 'cancelQty': item.cancelNums,
|
|
|
|
- 'salesBillDetailSn': item.salesBillDetailSn
|
|
|
|
|
|
+ const chooseRow = this.dataSource.filter(item => chooseList.includes(item.id) && item.id.indexOf('promo-')<0)
|
|
|
|
+ const obj = []
|
|
|
|
+ chooseRow && chooseRow.map(item => {
|
|
|
|
+ obj.push(item.dispatchBillDetailSn)
|
|
})
|
|
})
|
|
- })
|
|
|
|
-
|
|
|
|
- this.$emit('cancelProduct', obj)
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ this.$confirm({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '确认要批量删除吗?',
|
|
|
|
+ centered: true,
|
|
|
|
+ closable: true,
|
|
|
|
+ onOk () {
|
|
|
|
+ _this.deleteFun(obj, 1)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang="less">
|
|
<style lang="less">
|
|
|
|
+ .empty-data{
|
|
|
|
+ color: #999;
|
|
|
|
+ text-align: center;
|
|
|
|
+ padding: 20px;
|
|
|
|
+ }
|
|
.ve-table-body-td{
|
|
.ve-table-body-td{
|
|
.active-title{
|
|
.active-title{
|
|
display: flex;
|
|
display: flex;
|