beyond 2.7 配件出库修改

This commit is contained in:
beyond 2020-02-07 19:36:37 +08:00
parent 187a4cfdc5
commit 74521abe5a

View file

@ -177,6 +177,11 @@
<el-input v-model="personalForm.pointSupport" :disabled="personalForm.customerType === '1'" style="margin-left: 18px;width: 200px"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('collectAndPay.couponSupportOld')" style="width: 100%;">
<el-input-number v-model="personalForm.couponSupportOld" :controls="false" :step="0.1" :min="0" style="margin-left: 18px;width: 200px" @blur="getReceivableMoney"/>
</el-form-item>
</el-col>
<!-- <el-col :span="6">
<el-form-item :label="$t('SaleOut.couponSupport')" style="width: 100%;">
<el-input v-model="personalForm.couponSupport" style="margin-left: 18px;width: 200px" type="number"/>
@ -767,7 +772,8 @@ export default {
advanceMoney: 0,
receiveMoney: 0,
isInvoice: 1,
couponMoney: 0
couponMoney: 0,
couponSupportOld: 0
},
//
personalrules: {
@ -1100,12 +1106,15 @@ export default {
this.personalForm.advanceMoney = 0
}
console.log('this.personalForm.sourceTypethis.personalForm.sourceType', this.personalForm.sourceType)
if (this.personalForm.couponSupportOld === null || this.personalForm.couponSupportOld === '' || this.personalForm.couponSupportOld === undefined) {
this.personalForm.couponSupportOld = 0
}
if (this.personalForm.sourceType === '1' || this.personalForm.sourceType === '3' || this.personalForm.sourceType === '4' || this.personalForm.sourceType === '5' || this.personalForm.sourceType === '6') {
console.log('this.heji3', this.heji3)
console.log('this.heji4', this.heji4)
console.log('this.personalForm.couponMoney', this.personalForm.couponMoney)
let needmoney = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponMoney))
const needmoney2 = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney))
let needmoney = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney))
const needmoney2 = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld))
if (needmoney < 0) {
needmoney = 0
}
@ -1114,8 +1123,8 @@ export default {
this.$set(this.personalForm, 'receivableMoney2', needmoney2)
} else if (this.$store.getters.newsaleoutdata.firstMoney) {
console.log('123', 123)
let needmoney = (this.$store.getters.newsaleoutdata.firstMoney - Number(this.personalForm.couponMoney))
const needmoney2 = (this.$store.getters.newsaleoutdata.firstMoney)
let needmoney = (this.$store.getters.newsaleoutdata.firstMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney))
const needmoney2 = (this.$store.getters.newsaleoutdata.firstMoney - Number(this.personalForm.couponSupportOld))
if (needmoney < 0) {
needmoney = 0
}
@ -1125,8 +1134,8 @@ export default {
} else if (this.receivableMoney !== '' || this.receivableMoney !== null || this.receivableMoney !== undefined) {
console.log('是否是销售合同带入过来')
console.log('234', 234)
let needmoney = (this.receivableMoney - Number(this.personalForm.couponMoney))
const needmoney2 = (this.receivableMoney)
let needmoney = (this.receivableMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney))
const needmoney2 = (this.receivableMoney - Number(this.personalForm.couponSupportOld))
if (needmoney < 0) {
needmoney = 0
}
@ -1135,8 +1144,8 @@ export default {
this.$set(this.personalForm, 'receivableMoney2', needmoney2)
} else {
console.log('456', 456)
let needmoney = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponMoney))
const needmoney2 = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney))
let needmoney = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney))
const needmoney2 = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld))
if (needmoney < 0) {
needmoney = 0
}
@ -2179,7 +2188,8 @@ export default {
ridBikeMoney: 0,
advanceMoney: 0,
receiveMoney: 0,
isInvoice: 1
isInvoice: 1,
couponSupportOld: 0
}
this.customerId = null
this.salePersonId = this.$store.state.user.name
@ -2197,6 +2207,9 @@ export default {
handlesave() {
this.$refs.personalForm.validate((valid) => {
if (valid) {
if (this.personalForm.couponSupportOld === null || this.personalForm.couponSupportOld === '' || this.personalForm.couponSupportOld === undefined) {
this.personalForm.couponSupportOld = 0
}
const EnterDetail = this.deepClone(this.$refs.editable.getRecords())
//
let m = 1