根据零收付款启用标记来对采购入库和销售出库进行赋值判断
This commit is contained in:
@@ -43,6 +43,8 @@ export const BillModalMixin = {
|
||||
isShowPrintBtn: true,
|
||||
/* 原始审核是否开启 */
|
||||
checkFlag: true,
|
||||
//零收付款的场景开关
|
||||
zeroChangeAmountFlag: false,
|
||||
validatorRules:{
|
||||
price:{
|
||||
rules: [
|
||||
@@ -182,6 +184,7 @@ export const BillModalMixin = {
|
||||
this.checkFlag = getCheckFlag(multiBillType, multiLevelApprovalFlag, this.prefixNo)
|
||||
this.purchaseBySaleFlag = res.data.purchaseBySaleFlag==='1'?true:false
|
||||
this.inOutManageFlag = res.data.inOutManageFlag==='1'?true:false
|
||||
this.zeroChangeAmountFlag = res.data.zeroChangeAmountFlag==='1'?true:false
|
||||
if(res.data.auditPrintFlag==='1') {
|
||||
if(this.model.status === '0' || this.model.status === '9') {
|
||||
this.isShowPrintBtn = false
|
||||
@@ -738,6 +741,7 @@ export const BillModalMixin = {
|
||||
changeAmountNew = this.prefixNo === 'CGDD' || this.prefixNo === 'XSDD'?0:changeAmountNew
|
||||
this.form.setFieldsValue({'discount':discount,'discountMoney':discountMoney,'discountLastMoney':discountLastMoney,
|
||||
'changeAmount':changeAmountNew,'debt':0})
|
||||
this.setZeroChangeAmount()
|
||||
});
|
||||
},
|
||||
//改变优惠率
|
||||
@@ -756,6 +760,7 @@ export const BillModalMixin = {
|
||||
changeAmountNew = this.prefixNo === 'CGDD' || this.prefixNo === 'XSDD'?0:changeAmountNew
|
||||
this.form.setFieldsValue({'discountMoney':discountMoneyNew,'discountLastMoney':discountLastMoneyNew,
|
||||
'changeAmount':changeAmountNew,'debt':0})
|
||||
this.setZeroChangeAmount()
|
||||
});
|
||||
},
|
||||
//改变付款优惠
|
||||
@@ -774,6 +779,7 @@ export const BillModalMixin = {
|
||||
changeAmountNew = this.prefixNo === 'CGDD' || this.prefixNo === 'XSDD'?0:changeAmountNew
|
||||
this.form.setFieldsValue({'discount':discountNew,'discountLastMoney':discountLastMoneyNew,
|
||||
'changeAmount':changeAmountNew,'debt':0})
|
||||
this.setZeroChangeAmount()
|
||||
});
|
||||
},
|
||||
//其它费用
|
||||
@@ -787,6 +793,7 @@ export const BillModalMixin = {
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue({'changeAmount':changeAmountNew, 'debt':0})
|
||||
this.setZeroChangeAmount()
|
||||
});
|
||||
},
|
||||
//改变扣除订金
|
||||
@@ -800,6 +807,7 @@ export const BillModalMixin = {
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue({'changeAmount':changeAmountNew, 'debt':0})
|
||||
this.setZeroChangeAmount()
|
||||
});
|
||||
},
|
||||
//改变本次付款
|
||||
@@ -880,12 +888,22 @@ export const BillModalMixin = {
|
||||
changeAmountNew = this.prefixNo === 'XSDD'?0:changeAmountNew
|
||||
this.form.setFieldsValue({'discount':discount,'discountMoney':discountMoney,'discountLastMoney':discountLastMoney,
|
||||
'changeAmount':changeAmountNew,'debt':0})
|
||||
this.setZeroChangeAmount()
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
//切换收付款的金额为0
|
||||
setZeroChangeAmount() {
|
||||
if(this.prefixNo === 'CGRK'||this.prefixNo === 'CGTH'||this.prefixNo === 'XSCK'||this.prefixNo === 'XSTH') {
|
||||
if(this.zeroChangeAmountFlag) {
|
||||
let oldChangeAmount = this.form.getFieldValue('changeAmount')-0
|
||||
this.form.setFieldsValue({'changeAmount':0, 'debt':oldChangeAmount})
|
||||
}
|
||||
}
|
||||
},
|
||||
scanEnter() {
|
||||
this.scanStatus = false
|
||||
this.$nextTick(() => {
|
||||
|
||||
@@ -194,6 +194,7 @@
|
||||
import JUpload from '@/components/jeecg/JUpload'
|
||||
import JDate from '@/components/jeecg/JDate'
|
||||
import Vue from 'vue'
|
||||
import { getCurrentSystemConfig } from '@/api/api'
|
||||
export default {
|
||||
name: "PurchaseBackModal",
|
||||
mixins: [JEditableTableMixin, BillModalMixin],
|
||||
@@ -446,6 +447,16 @@
|
||||
'accountId': accountId,
|
||||
'remark': remark
|
||||
})
|
||||
getCurrentSystemConfig().then((res) => {
|
||||
if (res.code === 200 && res.data) {
|
||||
let flag = res.data.zeroChangeAmountFlag==='1'?true:false
|
||||
if(flag) {
|
||||
//切换收付款的金额为0
|
||||
let oldChangeAmount = this.form.getFieldValue('changeAmount')-0
|
||||
this.form.setFieldsValue({'changeAmount':0, 'debt':oldChangeAmount})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -221,6 +221,7 @@
|
||||
import JUpload from '@/components/jeecg/JUpload'
|
||||
import JDate from '@/components/jeecg/JDate'
|
||||
import Vue from 'vue'
|
||||
import { getCurrentSystemConfig } from '@/api/api'
|
||||
|
||||
export default {
|
||||
name: "PurchaseInModal",
|
||||
@@ -504,6 +505,16 @@
|
||||
'accountId': accountId,
|
||||
'remark': remark
|
||||
})
|
||||
getCurrentSystemConfig().then((res) => {
|
||||
if (res.code === 200 && res.data) {
|
||||
let flag = res.data.zeroChangeAmountFlag==='1'?true:false
|
||||
if(flag) {
|
||||
//切换收付款的金额为0
|
||||
let oldChangeAmount = this.form.getFieldValue('changeAmount')-0
|
||||
this.form.setFieldsValue({'changeAmount':0, 'debt':oldChangeAmount})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
//判断后进行仓库的切换
|
||||
if(depotId) {
|
||||
|
||||
@@ -198,6 +198,7 @@
|
||||
import JUpload from '@/components/jeecg/JUpload'
|
||||
import JDate from '@/components/jeecg/JDate'
|
||||
import Vue from 'vue'
|
||||
import { getCurrentSystemConfig } from '@/api/api'
|
||||
export default {
|
||||
name: "SaleBackModal",
|
||||
mixins: [JEditableTableMixin, BillModalMixin],
|
||||
@@ -456,6 +457,16 @@
|
||||
'accountId': accountId,
|
||||
'remark': remark
|
||||
})
|
||||
getCurrentSystemConfig().then((res) => {
|
||||
if (res.code === 200 && res.data) {
|
||||
let flag = res.data.zeroChangeAmountFlag==='1'?true:false
|
||||
if(flag) {
|
||||
//切换收付款的金额为0
|
||||
let oldChangeAmount = this.form.getFieldValue('changeAmount')-0
|
||||
this.form.setFieldsValue({'changeAmount':0, 'debt':oldChangeAmount})
|
||||
}
|
||||
}
|
||||
})
|
||||
this.personList.value = salesMan
|
||||
})
|
||||
}
|
||||
|
||||
@@ -236,6 +236,7 @@
|
||||
import JUpload from '@/components/jeecg/JUpload'
|
||||
import JDate from '@/components/jeecg/JDate'
|
||||
import Vue from 'vue'
|
||||
import { getCurrentSystemConfig } from '@/api/api'
|
||||
export default {
|
||||
name: "SaleOutModal",
|
||||
mixins: [JEditableTableMixin, BillModalMixin],
|
||||
@@ -521,6 +522,16 @@
|
||||
'accountId': accountId,
|
||||
'remark': remark
|
||||
})
|
||||
getCurrentSystemConfig().then((res) => {
|
||||
if (res.code === 200 && res.data) {
|
||||
let flag = res.data.zeroChangeAmountFlag==='1'?true:false
|
||||
if(flag) {
|
||||
//切换收付款的金额为0
|
||||
let oldChangeAmount = this.form.getFieldValue('changeAmount')-0
|
||||
this.form.setFieldsValue({'changeAmount':0, 'debt':oldChangeAmount})
|
||||
}
|
||||
}
|
||||
})
|
||||
this.personList.value = salesMan
|
||||
})
|
||||
//判断后进行仓库的切换
|
||||
|
||||
Reference in New Issue
Block a user