|
@@ -531,9 +531,16 @@ export default {
|
|
|
async handleExpense (row) {
|
|
|
const _this = this
|
|
|
const hasExpense = await queryCreateBySalesBillSn({ salesBillSn: row.salesBillSn }).then(res => res.data || [])
|
|
|
+ const showModalFlag = [hasExpense.exceed,hasExpense.balance,hasExpense.giftConvertAmount]
|
|
|
+ const showModal = 0
|
|
|
+ showModalFlag.map(item => {
|
|
|
+ if(item){
|
|
|
+ showModal = showModal + 1
|
|
|
+ }
|
|
|
+ })
|
|
|
console.log(hasExpense)
|
|
|
// 有2个以上采购额时
|
|
|
- if (hasExpense && hasExpense.exceed && hasExpense.balance) {
|
|
|
+ if (hasExpense && showModal > 1) {
|
|
|
_this.$confirm({
|
|
|
title: '转费用报销单?',
|
|
|
centered: true,
|
|
@@ -577,7 +584,7 @@ export default {
|
|
|
// 转费用单
|
|
|
expenseSave (data, type) {
|
|
|
console.log(data, type)
|
|
|
- const params = type ? data[type] : (data.balance || data.exceed)
|
|
|
+ const params = type ? data[type] : (data.balance || data.exceed || data.giftConvertAmount)
|
|
|
if (params) {
|
|
|
this.openBaseModal = true
|
|
|
this.$refs.expenseModal.setDetail(params, 'sales')
|