|
@@ -289,7 +289,7 @@ export default {
|
|
|
}
|
|
|
// 转采购额数量输入框
|
|
|
const inputFormat1 = function(record,data,h) {
|
|
|
- if(record.unpushedQty>0){
|
|
|
+ if(record.unpushedQty>=0){
|
|
|
// 已选
|
|
|
if(_this.selectedRowKeys.includes(record.id) && record.convertPromoGiftsFlag == 1){
|
|
|
return (
|
|
@@ -300,7 +300,7 @@ export default {
|
|
|
onChange={e => _this.convertPromoGiftsChange(e,record)}
|
|
|
precision={0}
|
|
|
min={0}
|
|
|
- max={record.unpushedQty}
|
|
|
+ max={record.maxConvertNums}
|
|
|
style="width: 100%;"
|
|
|
placeholder="请输入" />
|
|
|
</div>
|
|
@@ -349,7 +349,7 @@ export default {
|
|
|
{_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.lossAmount ? (<span>优惠金额:<strong>{record.total.lossAmount}</strong>;</span>):('')}
|
|
|
{_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.cgejyAmount>0 ? (<span>采购额结余:<strong>{_this.toThousands(record.total.cgejyAmount)}</strong>;</span>):('')}
|
|
|
{_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.cgejyAmount<0 ? (<span>采购额超出:<strong>{_this.toThousands(record.total.cgeccAmount)}</strong>;</span>):('')}
|
|
|
- {_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.convertPromoGiftsAmount ? (<span>促销产品转采购额金额:<strong>{record.total&&record.total.convertPromoGiftsAmount||'--'}</strong>;</span>):('')}
|
|
|
+ {_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.totalPromoGiftsAmount ? (<span>促销产品转采购额金额:<strong>{record.total&&record.total.totalPromoGiftsAmount||'--'}</strong>;</span>):('')}
|
|
|
{record.expenseAccountFlag!='WAIT' ? record.expenseAccountFlagDictValue : ''}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -533,10 +533,17 @@ export default {
|
|
|
item.productOrigCode = productOrigCode == ' ' ? '--' : productOrigCode
|
|
|
item.productOrigUnit = productOrigUnit || '--'
|
|
|
item.cancelNums = item.unpushedQty
|
|
|
- // 库存为0或待下推数为0,不可添加
|
|
|
- if(!item.unpushedQty || item.unpushedQty<0){
|
|
|
- this.disableSelectedRowKeys.push(item.id)
|
|
|
+
|
|
|
+ if(item.convertPromoGiftsFlag == 1){
|
|
|
+ item.maxConvertNums = item.unpushedQty + item.convertPromoGiftsQty
|
|
|
+ }else{
|
|
|
+ item.maxConvertNums = 0
|
|
|
}
|
|
|
+
|
|
|
+ // 库存为0或待下推数为0,不可添加
|
|
|
+ // if(!item.unpushedQty || item.unpushedQty<0){
|
|
|
+ // this.disableSelectedRowKeys.push(item.id)
|
|
|
+ // }
|
|
|
})
|
|
|
this.showEmpty = this.dataSource.length <= 0
|
|
|
this.tableData = this.dataSource
|
|
@@ -591,7 +598,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
const chooseRow = this.dataSource.filter(item => chooseList.includes(item.id) && item.convertPromoGiftsFlag==1)
|
|
|
- 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)
|
|
|
const obj = []
|
|
|
const noObj = []
|
|
|
noChooseRow && noChooseRow.map(item => {
|
|
@@ -607,8 +614,8 @@ export default {
|
|
|
if(obj.length){
|
|
|
this.$confirm({
|
|
|
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;text-align:center;">
|
|
|
-当该销售单完结后,可将采购额转成费用报销单。</div>{noObj.length?<div style="text-align:center;"><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>{noObj.length?<div style="text-align:center;"><div>总共选择了 {chooseList.length} 个产品,其中 {obj.length} 个产品可转采购额。</div><div style="color:red;"> 产品 ({noObj.toString()}) 不可转采购额!</div></div>:''}<div style="font-size:12px;color:#999;padding:10px 0;text-align:center;">
|
|
|
+当该销售单完结后,可将采购额转成费用报销单。</div></div>,
|
|
|
centered: true,
|
|
|
closable: true,
|
|
|
class: 'confirm-center',
|