|
@@ -263,7 +263,7 @@ export default {
|
|
|
<div>
|
|
|
<span style="padding-right: 15px;">{data}</span>
|
|
|
{ftext?(<a-badge count={ftext} number-style={{ backgroundColor: fcolor, zoom:'80%' }}></a-badge>):''}
|
|
|
- {record.convertPromoGiftsFlag == '1'?(<a-badge count="转" number-style={{ backgroundColor: '#ffaa00', zoom:'80%' }}></a-badge>):''}
|
|
|
+ {record.convertPromoGiftsQty?(<a-badge count="转" number-style={{ backgroundColor: '#ffaa00', zoom:'80%' }}></a-badge>):''}
|
|
|
{Number(record.stockQty||0) < Number(record.unpushedQty||0)?(<a-badge count="缺" number-style={{ zoom:'80%' }}></a-badge>):''}
|
|
|
</div>
|
|
|
)
|
|
@@ -291,7 +291,7 @@ export default {
|
|
|
const inputFormat1 = function(record,data,h) {
|
|
|
if(record.unpushedQty>=0){
|
|
|
// 已选
|
|
|
- if(_this.selectedRowKeys.includes(record.id) && record.convertPromoGiftsFlag == 1){
|
|
|
+ if(_this.selectedRowKeys.includes(record.id)){
|
|
|
return (
|
|
|
<div>
|
|
|
<a-input-number
|
|
@@ -522,7 +522,8 @@ export default {
|
|
|
// 格式化数据
|
|
|
let f = 0
|
|
|
this.dataSource.map((item,i) => {
|
|
|
- if(item.id.indexOf('promo-')>=0){f = f - 1}
|
|
|
+ const isTjRow = item.id.indexOf('promo-')>=0
|
|
|
+ if(isTjRow){f = f - 1}
|
|
|
item.no = i + 1 + f
|
|
|
const productCode = (item.productEntity && item.productEntity.code) || (item.dealerProductEntity && item.dealerProductEntity.code)
|
|
|
const productName = (item.productEntity && item.productEntity.name) || (item.dealerProductEntity && item.dealerProductEntity.name)
|
|
@@ -541,9 +542,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
// 库存为0或待下推数为0,不可添加
|
|
|
- // if(!item.unpushedQty || item.unpushedQty<0){
|
|
|
- // this.disableSelectedRowKeys.push(item.id)
|
|
|
- // }
|
|
|
+ if(!item.unpushedQty || item.unpushedQty<0 || isTjRow){
|
|
|
+ this.disableSelectedRowKeys.push(item.id)
|
|
|
+ }
|
|
|
})
|
|
|
this.showEmpty = this.dataSource.length <= 0
|
|
|
this.tableData = this.dataSource
|
|
@@ -637,6 +638,7 @@ export default {
|
|
|
}
|
|
|
const chooseRow = this.dataSource.filter(item => chooseList.includes(item.id) && item.stockQty > 0)
|
|
|
const noStockRow = this.dataSource.filter(item => chooseList.includes(item.id) && !item.stockQty)
|
|
|
+ console.log(noStockRow)
|
|
|
const obj = []
|
|
|
const noObj = []
|
|
|
chooseRow && chooseRow.map(item => {
|