mirror of
https://github.com/shawncai/ERP.git
synced 2024-09-20 15:06:11 +08:00
Merge branch 'master' of https://github.com/shawncai/ERP
This commit is contained in:
commit
ad00de10ce
|
@ -77,6 +77,7 @@ export function productABC(query) {
|
|||
// 供应商准时交货分析
|
||||
export function supplierOnTimeABC(query) {
|
||||
var params = new URLSearchParams()
|
||||
|
||||
if (query.supplierId !== '' && query.supplierId !== null && query.supplierId !== undefined) {
|
||||
params.append('supplierId', query.supplierId) // 你要传给后台的参数值 key/value
|
||||
}
|
||||
|
|
|
@ -4342,5 +4342,12 @@ export default {
|
|||
orderQuantity: '订货数量',
|
||||
orderRate: '占总订货额(%)',
|
||||
level: 'ABC分类'
|
||||
},
|
||||
update4: {
|
||||
shouldMoney: '应收款',
|
||||
customerPay: '实际收到客户',
|
||||
changeMoney: '找零',
|
||||
receivableMoney: '已收款',
|
||||
unpayMoney: '未收款'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -207,11 +207,37 @@
|
|||
<el-button v-show="index === personalForm.couponSupports.length -1" icon="el-icon-plus" type="success" @click="addDomain" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 前两个改变会影响后面的改变 要加change事件 -->
|
||||
<el-col :span="6" style="height: 57px">
|
||||
<el-form-item :label="$t('SaleOut.receivableMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<el-form-item :label="$t('update4.shouldMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<span style="margin-left: 20px;">
|
||||
{{ personalForm.shouldMoney }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="$t('update4.customerPay')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<el-input-number v-model="personalForm.customerPay" :controls="false" :step="0.1" :min="0" style="width: 200px" @change="updatePrice()"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" style="height: 57px">
|
||||
<el-form-item :label="$t('update4.changeMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<span style="margin-left: 20px;">
|
||||
{{ personalForm.changeMoney }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" style="height: 57px">
|
||||
<el-form-item :label="$t('update4.receivableMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<span style="margin-left: 20px;">
|
||||
{{ personalForm.receivableMoney }}
|
||||
<!-- {{ getReceivableMoney() }} -->
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" style="height: 57px">
|
||||
<el-form-item :label="$t('update4.unpayMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<span style="margin-left: 20px;">
|
||||
{{ personalForm.unpayMoney }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -754,6 +780,7 @@ export default {
|
|||
control: false,
|
||||
// 销售订单信息数据
|
||||
personalForm: {
|
||||
customerPay: 0,
|
||||
couponSupports: [
|
||||
{
|
||||
couponSupport: 0
|
||||
|
@ -816,7 +843,7 @@ export default {
|
|||
{ required: true, validator: validatePass6, trigger: 'change' }
|
||||
]
|
||||
},
|
||||
receivableMoney: 0,
|
||||
shouldMoney: 0,
|
||||
// 订单明细数据
|
||||
list2: [],
|
||||
// 销售费用明细
|
||||
|
@ -838,7 +865,17 @@ export default {
|
|||
flag: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
myshouldMoney() {
|
||||
return this.personalForm.shouldMoney
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
myshouldMoney: {
|
||||
handler(oldval, newval) {
|
||||
this.updatePrice()
|
||||
}
|
||||
},
|
||||
list2: {
|
||||
handler(oldval, newval) {
|
||||
if (this.list2.length !== 0) {
|
||||
|
@ -908,6 +945,23 @@ export default {
|
|||
_that = this
|
||||
},
|
||||
methods: {
|
||||
updatePrice() {
|
||||
console.log('999', 999)
|
||||
if (this.personalForm.shouldMoney !== null && this.personalForm.shouldMoney !== '' && this.personalForm.shouldMoney !== undefined) {
|
||||
if (this.personalForm.customerPay !== null && this.personalForm.customerPay !== '' && this.personalForm.customerPay !== undefined) {
|
||||
// 客户给的钱多
|
||||
if (this.personalForm.customerPay > this.personalForm.shouldMoney) {
|
||||
this.personalForm.changeMoney = Number(this.personalForm.customerPay - this.personalForm.shouldMoney).toFixed(2)
|
||||
this.personalForm.receivableMoney = this.personalForm.shouldMoney
|
||||
this.personalForm.unpayMoney = Number(this.personalForm.shouldMoney - this.personalForm.receivableMoney).toFixed(2)
|
||||
} else {
|
||||
this.personalForm.changeMoney = 0
|
||||
this.personalForm.receivableMoney = this.personalForm.customerPay
|
||||
this.personalForm.unpayMoney = Number(this.personalForm.shouldMoney - this.personalForm.receivableMoney).toFixed(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
jundgeprice() {
|
||||
if (this.$store.getters.countryId === 2) {
|
||||
return true
|
||||
|
@ -1023,7 +1077,7 @@ export default {
|
|||
this.Isproduct = true
|
||||
this.IsSourceNumber = false
|
||||
if (this.$store.getters.newsaleoutdata.firstMoney !== '' && this.$store.getters.newsaleoutdata.firstMoney !== null && this.$store.getters.newsaleoutdata.firstMoney !== undefined) {
|
||||
this.receivableMoney = this.$store.getters.newsaleoutdata.firstMoney
|
||||
this.shouldMoney = this.$store.getters.newsaleoutdata.firstMoney
|
||||
}
|
||||
this.personalForm.customerType = this.$store.getters.newsaleoutdata.customerType.toString()
|
||||
this.personalForm.customerId = this.$store.getters.newsaleoutdata.customerId
|
||||
|
@ -1155,7 +1209,7 @@ export default {
|
|||
if (needmoney < 0) {
|
||||
needmoney = 0
|
||||
}
|
||||
this.$set(this.personalForm, 'receivableMoney', needmoney)
|
||||
this.$set(this.personalForm, 'shouldMoney', needmoney)
|
||||
// 未减去优惠券额的金额
|
||||
this.$set(this.personalForm, 'receivableMoney2', needmoney2)
|
||||
} else if (this.$store.getters.newsaleoutdata.firstMoney) {
|
||||
|
@ -1165,16 +1219,16 @@ export default {
|
|||
if (needmoney < 0) {
|
||||
needmoney = 0
|
||||
}
|
||||
this.$set(this.personalForm, 'receivableMoney', needmoney)
|
||||
this.$set(this.personalForm, 'shouldMoney', needmoney)
|
||||
// 未减去优惠券额的金额
|
||||
this.$set(this.personalForm, 'receivableMoney2', needmoney2)
|
||||
} else if (this.receivableMoney !== '' || this.receivableMoney !== null || this.receivableMoney !== undefined) {
|
||||
let needmoney = (this.receivableMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney)
|
||||
const needmoney2 = (this.receivableMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney)
|
||||
} else if (this.shouldMoney !== '' || this.shouldMoney !== null || this.shouldMoney !== undefined) {
|
||||
let needmoney = (this.shouldMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney)
|
||||
const needmoney2 = (this.shouldMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney)
|
||||
if (needmoney < 0) {
|
||||
needmoney = 0
|
||||
}
|
||||
this.$set(this.personalForm, 'receivableMoney', needmoney)
|
||||
this.$set(this.personalForm, 'shouldMoney', needmoney)
|
||||
// 未减去优惠券额的金额
|
||||
this.$set(this.personalForm, 'receivableMoney2', needmoney2)
|
||||
} else {
|
||||
|
@ -1183,7 +1237,7 @@ export default {
|
|||
if (needmoney < 0) {
|
||||
needmoney = 0
|
||||
}
|
||||
this.$set(this.personalForm, 'receivableMoney', needmoney)
|
||||
this.$set(this.personalForm, 'shouldMoney', needmoney)
|
||||
// 未减去优惠券额的金额
|
||||
this.$set(this.personalForm, 'receivableMoney2', needmoney2)
|
||||
}
|
||||
|
@ -1196,18 +1250,18 @@ export default {
|
|||
// return (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.couponSupport) - Number(this.personalForm.advanceMoney))
|
||||
// }
|
||||
|
||||
// if (this.receivableMoney !== null && this.receivableMoney !== '' && this.receivableMoney !== undefined) {
|
||||
// this.personalForm.receivableMoney = this.receivableMoney
|
||||
// return (this.receivableMoney - Number(this.personalForm.couponSupport))
|
||||
// if (this.shouldMoney !== null && this.shouldMoney !== '' && this.shouldMoney !== undefined) {
|
||||
// this.personalForm.shouldMoney = this.shouldMoney
|
||||
// return (this.shouldMoney - Number(this.personalForm.couponSupport))
|
||||
// } else if (this.personalForm.ridMoney !== null && this.personalForm.ridMoney !== '' && this.personalForm.ridMoney !== undefined) {
|
||||
// this.personalForm.receivableMoney = this.heji3 - this.heji4 - this.personalForm.ridMoney - this.personalForm.advanceMoney
|
||||
// this.personalForm.shouldMoney = this.heji3 - this.heji4 - this.personalForm.ridMoney - this.personalForm.advanceMoney
|
||||
// return (this.heji3 - this.heji4 - this.personalForm.ridMoney - Number(this.personalForm.couponSupport) - this.personalForm.advanceMoney)
|
||||
// } else if (this.personalForm.ridBikeMoney !== null && this.personalForm.ridBikeMoney !== '' && this.personalForm.ridBikeMoney !== undefined) {
|
||||
// this.personalForm.receivableMoney = this.heji3 - this.heji4 - this.personalForm.ridBikeMoney - this.personalForm.advanceMoney
|
||||
// this.personalForm.shouldMoney = this.heji3 - this.heji4 - this.personalForm.ridBikeMoney - this.personalForm.advanceMoney
|
||||
// return (this.heji3 - this.heji4 - this.personalForm.ridBikeMoney - Number(this.personalForm.couponSupport) - this.personalForm.advanceMoney)
|
||||
// } else {
|
||||
// if (this.personalForm.sourceType === '1' || this.personalForm.sourceType === '4' || this.personalForm.sourceType === '5') {
|
||||
// this.personalForm.receivableMoney = this.heji3 - this.heji4
|
||||
// this.personalForm.shouldMoney = this.heji3 - this.heji4
|
||||
// return (this.heji3 - this.heji4 - Number(this.personalForm.couponSupport))
|
||||
// }
|
||||
// }
|
||||
|
@ -1608,7 +1662,7 @@ export default {
|
|||
row.flag = false
|
||||
},
|
||||
chooseSourceType(val) {
|
||||
this.receivableMoney = ''
|
||||
this.shouldMoney = ''
|
||||
this.personalForm.ridMoney = ''
|
||||
this.personalForm.ridBikeMoney = ''
|
||||
if (val === '5' || val === '7' || val === undefined) {
|
||||
|
@ -2012,7 +2066,7 @@ export default {
|
|||
}
|
||||
},
|
||||
saleOrder(val) {
|
||||
this.receivableMoney = ''
|
||||
this.shouldMoney = ''
|
||||
if (val.customerType !== null && val.customerType !== undefined && val.customerType !== '') {
|
||||
this.personalForm.customerType = String(val.customerType)
|
||||
}
|
||||
|
@ -2093,7 +2147,7 @@ export default {
|
|||
}
|
||||
},
|
||||
opportunity(val) {
|
||||
this.receivableMoney = ''
|
||||
this.shouldMoney = ''
|
||||
if (val.customerType !== null && val.customerType !== undefined && val.customerType !== '') {
|
||||
this.personalForm.customerType = String(val.customerType)
|
||||
}
|
||||
|
@ -2124,7 +2178,7 @@ export default {
|
|||
if (val.sourceType === 2 && val.sourceNumber !== null) {
|
||||
this.personalForm.applyNumber = val.sourceNumber
|
||||
}
|
||||
this.receivableMoney = val.firstMoney
|
||||
this.shouldMoney = val.firstMoney
|
||||
if (val.customerType !== null && val.customerType !== undefined && val.customerType !== '') {
|
||||
this.personalForm.customerType = '2'
|
||||
}
|
||||
|
@ -2304,18 +2358,18 @@ export default {
|
|||
otherMoney: '',
|
||||
saleRepositoryId: this.$store.getters.repositoryId,
|
||||
salePersonId: this.$store.getters.userId,
|
||||
receivableMoney: 0,
|
||||
shouldMoney: 0,
|
||||
receiveMoney: 0,
|
||||
isInvoice: 1,
|
||||
couponSupportOld: 0,
|
||||
// receivableMoney: '',
|
||||
// shouldMoney: '',
|
||||
couponSupports: [
|
||||
{
|
||||
couponSupport: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
this.receivableMoney = ''
|
||||
this.shouldMoney = ''
|
||||
this.customerId = null
|
||||
this.salePersonId = this.$store.state.user.name
|
||||
this.saleRepositoryId = this.$store.getters.repositoryName
|
||||
|
@ -2574,7 +2628,7 @@ export default {
|
|||
couponNumbers = couponNumbers.substring(0, couponNumbers.length - 1)
|
||||
this.personalForm.couponNumbers = couponNumbers
|
||||
// eslint-disable-next-line use-isnan
|
||||
if (this.personalForm.receivableMoney === '' || this.personalForm.receivableMoney === undefined || this.personalForm.receivableMoney === NaN || this.personalForm.receivableMoney === null) {
|
||||
if (this.personalForm.shouldMoney === '' || this.personalForm.shouldMoney === undefined || this.personalForm.shouldMoney === NaN || this.personalForm.shouldMoney === null) {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: '本次收款金额不能为空',
|
||||
|
@ -2582,6 +2636,15 @@ export default {
|
|||
})
|
||||
return false
|
||||
}
|
||||
// eslint-disable-next-line use-isnan
|
||||
if (this.personalForm.customerPay === '' || this.personalForm.customerPay === undefined || this.personalForm.customerPay === NaN || this.personalForm.customerPay === null) {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: '实际收到客户金额不能为空',
|
||||
offset: 100
|
||||
})
|
||||
return false
|
||||
}
|
||||
const Data = this.personalForm
|
||||
for (const key in Data) {
|
||||
if (Data[key] === '' || Data[key] === undefined || Data[key] === null) {
|
||||
|
@ -2851,14 +2914,14 @@ export default {
|
|||
couponNumbers = couponNumbers.substring(0, couponNumbers.length - 1)
|
||||
this.personalForm.couponNumbers = couponNumbers
|
||||
// eslint-disable-next-line use-isnan
|
||||
if (this.personalForm.receivableMoney === '' || this.personalForm.receivableMoney === undefined || this.personalForm.receivableMoney === NaN || this.personalForm.receivableMoney === null) {
|
||||
if (this.personalForm.shouldMoney === '' || this.personalForm.shouldMoney === undefined || this.personalForm.shouldMoney === NaN || this.personalForm.shouldMoney === null) {
|
||||
// this.$notify.error({
|
||||
// title: 'wrong',
|
||||
// message: '本次收款金额不能为空',
|
||||
// offset: 100
|
||||
// })
|
||||
// return false
|
||||
this.personalForm.receivableMoney = 0
|
||||
this.personalForm.shouldMoney = 0
|
||||
}
|
||||
this.personalForm.judgeStat = 4
|
||||
const Data = this.personalForm
|
||||
|
|
|
@ -83,11 +83,37 @@
|
|||
<el-button v-show="index === personalForm.couponSupports.length -1" icon="el-icon-plus" type="success" @click="addDomain" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 前两个改变会影响后面的改变 要加change事件 -->
|
||||
<el-col :span="6" style="height: 57px">
|
||||
<el-form-item :label="$t('SaleOut.receivableMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<el-form-item :label="$t('update4.shouldMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<span style="margin-left: 20px;">
|
||||
{{ personalForm.shouldMoney }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="$t('update4.customerPay')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<el-input-number v-model="personalForm.customerPay" :controls="false" :step="0.1" :min="0" style="width: 200px" @change="updatePrice()"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" style="height: 57px">
|
||||
<el-form-item :label="$t('update4.changeMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<span style="margin-left: 20px;">
|
||||
{{ personalForm.changeMoney }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" style="height: 57px">
|
||||
<el-form-item :label="$t('update4.receivableMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<span style="margin-left: 20px;">
|
||||
{{ personalForm.receivableMoney }}
|
||||
<!-- {{ getReceivableMoney() }} -->
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" style="height: 57px">
|
||||
<el-form-item :label="$t('update4.unpayMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<span style="margin-left: 20px;">
|
||||
{{ personalForm.unpayMoney }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -645,6 +671,7 @@ export default {
|
|||
control: false,
|
||||
// 销售订单信息数据
|
||||
personalForm: {
|
||||
customerPay: 0,
|
||||
couponSupports: [
|
||||
{
|
||||
couponSupport: 0
|
||||
|
@ -710,7 +737,7 @@ export default {
|
|||
{ required: true, validator: validatePass6, trigger: 'change' }
|
||||
]
|
||||
},
|
||||
receivableMoney: 0,
|
||||
shouldMoney: 0,
|
||||
// 订单明细数据
|
||||
list2: [],
|
||||
// 销售费用明细
|
||||
|
@ -731,7 +758,17 @@ export default {
|
|||
batchlist: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
myshouldMoney() {
|
||||
return this.personalForm.shouldMoney
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
myshouldMoney: {
|
||||
handler(oldval, newval) {
|
||||
this.updatePrice()
|
||||
}
|
||||
},
|
||||
list2: {
|
||||
handler(oldval, newval) {
|
||||
if (this.list2.length !== 0) {
|
||||
|
@ -788,6 +825,23 @@ export default {
|
|||
_that = this
|
||||
},
|
||||
methods: {
|
||||
updatePrice() {
|
||||
console.log('999', 999)
|
||||
if (this.personalForm.shouldMoney !== null && this.personalForm.shouldMoney !== '' && this.personalForm.shouldMoney !== undefined) {
|
||||
if (this.personalForm.customerPay !== null && this.personalForm.customerPay !== '' && this.personalForm.customerPay !== undefined) {
|
||||
// 客户给的钱多
|
||||
if (this.personalForm.customerPay > this.personalForm.shouldMoney) {
|
||||
this.personalForm.changeMoney = Number(this.personalForm.customerPay - this.personalForm.shouldMoney).toFixed(2)
|
||||
this.personalForm.receivableMoney = this.personalForm.shouldMoney
|
||||
this.personalForm.unpayMoney = Number(this.personalForm.shouldMoney - this.personalForm.receivableMoney).toFixed(2)
|
||||
} else {
|
||||
this.personalForm.changeMoney = 0
|
||||
this.personalForm.receivableMoney = this.personalForm.customerPay
|
||||
this.personalForm.unpayMoney = Number(this.personalForm.shouldMoney - this.personalForm.receivableMoney).toFixed(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
jundgeprice() {
|
||||
if (this.$store.getters.countryId === 2) {
|
||||
return true
|
||||
|
@ -952,7 +1006,7 @@ export default {
|
|||
this.Isproduct = true
|
||||
this.IsSourceNumber = false
|
||||
if (this.$store.getters.newsaleoutdata.firstMoney !== '' && this.$store.getters.newsaleoutdata.firstMoney !== null && this.$store.getters.newsaleoutdata.firstMoney !== undefined) {
|
||||
this.receivableMoney = this.$store.getters.newsaleoutdata.firstMoney
|
||||
this.shouldMoney = this.$store.getters.newsaleoutdata.firstMoney
|
||||
}
|
||||
this.personalForm.customerType = this.$store.getters.newsaleoutdata.customerType.toString()
|
||||
this.personalForm.customerId = this.$store.getters.newsaleoutdata.customerId
|
||||
|
@ -1084,7 +1138,7 @@ export default {
|
|||
if (needmoney < 0) {
|
||||
needmoney = 0
|
||||
}
|
||||
this.$set(this.personalForm, 'receivableMoney', needmoney)
|
||||
this.$set(this.personalForm, 'shouldMoney', needmoney)
|
||||
// 未减去优惠券额的金额
|
||||
this.$set(this.personalForm, 'receivableMoney2', needmoney2)
|
||||
} else if (this.$store.getters.newsaleoutdata.firstMoney) {
|
||||
|
@ -1093,16 +1147,16 @@ export default {
|
|||
if (needmoney < 0) {
|
||||
needmoney = 0
|
||||
}
|
||||
this.$set(this.personalForm, 'receivableMoney', needmoney)
|
||||
this.$set(this.personalForm, 'shouldMoney', needmoney)
|
||||
// 未减去优惠券额的金额
|
||||
this.$set(this.personalForm, 'receivableMoney2', needmoney2)
|
||||
} else if (this.receivableMoney !== '' || this.receivableMoney !== null || this.receivableMoney !== undefined) {
|
||||
let needmoney = (this.receivableMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney)
|
||||
const needmoney2 = (this.receivableMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney)
|
||||
} else if (this.shouldMoney !== '' || this.shouldMoney !== null || this.shouldMoney !== undefined) {
|
||||
let needmoney = (this.shouldMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney)
|
||||
const needmoney2 = (this.shouldMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney)
|
||||
if (needmoney < 0) {
|
||||
needmoney = 0
|
||||
}
|
||||
this.$set(this.personalForm, 'receivableMoney', needmoney)
|
||||
this.$set(this.personalForm, 'shouldMoney', needmoney)
|
||||
// 未减去优惠券额的金额
|
||||
this.$set(this.personalForm, 'receivableMoney2', needmoney2)
|
||||
} else {
|
||||
|
@ -1111,7 +1165,7 @@ export default {
|
|||
if (needmoney < 0) {
|
||||
needmoney = 0
|
||||
}
|
||||
this.$set(this.personalForm, 'receivableMoney', needmoney)
|
||||
this.$set(this.personalForm, 'shouldMoney', needmoney)
|
||||
// 未减去优惠券额的金额123
|
||||
this.$set(this.personalForm, 'receivableMoney2', needmoney2)
|
||||
}
|
||||
|
@ -1125,22 +1179,22 @@ export default {
|
|||
// return (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.couponSupport) - Number(this.personalForm.advanceMoney))
|
||||
// }
|
||||
|
||||
// if (this.receivableMoney !== null && this.receivableMoney !== '' && this.receivableMoney !== undefined) {
|
||||
// if (this.shouldMoney !== null && this.shouldMoney !== '' && this.shouldMoney !== undefined) {
|
||||
// console.log(12333333333)
|
||||
// this.personalForm.receivableMoney = this.receivableMoney
|
||||
// return (this.receivableMoney - Number(this.personalForm.couponSupport))
|
||||
// this.personalForm.shouldMoney = this.shouldMoney
|
||||
// return (this.shouldMoney - Number(this.personalForm.couponSupport))
|
||||
// } else if (this.personalForm.ridMoney !== null && this.personalForm.ridMoney !== '' && this.personalForm.ridMoney !== undefined) {
|
||||
// console.log('this.heji3 - this.heji4 - this.personalForm.ridMoney', this.heji3 - this.heji4 - this.personalForm.ridMoney)
|
||||
// this.personalForm.receivableMoney = this.heji3 - this.heji4 - this.personalForm.ridMoney - this.personalForm.advanceMoney
|
||||
// this.personalForm.shouldMoney = this.heji3 - this.heji4 - this.personalForm.ridMoney - this.personalForm.advanceMoney
|
||||
// return (this.heji3 - this.heji4 - this.personalForm.ridMoney - Number(this.personalForm.couponSupport) - this.personalForm.advanceMoney)
|
||||
// } else if (this.personalForm.ridBikeMoney !== null && this.personalForm.ridBikeMoney !== '' && this.personalForm.ridBikeMoney !== undefined) {
|
||||
// console.log('this.heji3 - this.heji4 - this.personalForm.ridMoney', this.heji3 - this.heji4 - this.personalForm.ridMoney)
|
||||
// this.personalForm.receivableMoney = this.heji3 - this.heji4 - this.personalForm.ridBikeMoney - this.personalForm.advanceMoney
|
||||
// this.personalForm.shouldMoney = this.heji3 - this.heji4 - this.personalForm.ridBikeMoney - this.personalForm.advanceMoney
|
||||
// return (this.heji3 - this.heji4 - this.personalForm.ridBikeMoney - Number(this.personalForm.couponSupport) - this.personalForm.advanceMoney)
|
||||
// } else {
|
||||
// if (this.personalForm.sourceType === '1' || this.personalForm.sourceType === '4' || this.personalForm.sourceType === '5') {
|
||||
// console.log('this.heji3 - this.heji4', this.heji3 - this.heji4)
|
||||
// this.personalForm.receivableMoney = this.heji3 - this.heji4
|
||||
// this.personalForm.shouldMoney = this.heji3 - this.heji4
|
||||
// return (this.heji3 - this.heji4 - Number(this.personalForm.couponSupport))
|
||||
// }
|
||||
// }
|
||||
|
@ -1551,7 +1605,7 @@ export default {
|
|||
row.flag = false
|
||||
},
|
||||
chooseSourceType(val) {
|
||||
this.receivableMoney = ''
|
||||
this.shouldMoney = ''
|
||||
this.personalForm.ridMoney = ''
|
||||
this.personalForm.ridBikeMoney = ''
|
||||
if (val === '5' || val === undefined) {
|
||||
|
@ -1939,7 +1993,7 @@ export default {
|
|||
}
|
||||
},
|
||||
saleOrder(val) {
|
||||
this.receivableMoney = ''
|
||||
this.shouldMoney = ''
|
||||
if (val.customerType !== null && val.customerType !== undefined && val.customerType !== '') {
|
||||
this.personalForm.customerType = String(val.customerType)
|
||||
}
|
||||
|
@ -2020,7 +2074,7 @@ export default {
|
|||
}
|
||||
},
|
||||
opportunity(val) {
|
||||
this.receivableMoney = ''
|
||||
this.shouldMoney = ''
|
||||
if (val.customerType !== null && val.customerType !== undefined && val.customerType !== '') {
|
||||
this.personalForm.customerType = String(val.customerType)
|
||||
}
|
||||
|
@ -2051,7 +2105,7 @@ export default {
|
|||
if (val.sourceType === 2 && val.sourceNumber !== null) {
|
||||
this.personalForm.applyNumber = val.sourceNumber
|
||||
}
|
||||
this.receivableMoney = val.firstMoney
|
||||
this.shouldMoney = val.firstMoney
|
||||
if (val.customerType !== null && val.customerType !== undefined && val.customerType !== '') {
|
||||
this.personalForm.customerType = '2'
|
||||
}
|
||||
|
@ -2493,20 +2547,20 @@ export default {
|
|||
}
|
||||
couponNumbers = couponNumbers.substring(0, couponNumbers.length - 1)
|
||||
this.personalForm.couponNumbers = couponNumbers
|
||||
if (this.personalForm.receivableMoney === '' || this.personalForm.receivableMoney === undefined || this.personalForm.receivableMoney === null) {
|
||||
if (this.personalForm.shouldMoney === '' || this.personalForm.shouldMoney === undefined || this.personalForm.shouldMoney === null) {
|
||||
// this.$notify.error({
|
||||
// title: 'wrong',
|
||||
// message: '本次收款金额不能为空',
|
||||
// offset: 100
|
||||
// })
|
||||
// return false
|
||||
this.personalForm.receivableMoney = 0
|
||||
this.personalForm.shouldMoney = 0
|
||||
}
|
||||
if (this.personalForm.isFree === 1) {
|
||||
this.personalForm.taxMoney = 0
|
||||
this.personalForm.includeTaxMoney = 0
|
||||
this.personalForm.money = 0
|
||||
this.personalForm.receivableMoney = 0
|
||||
this.personalForm.shouldMoney = 0
|
||||
this.personalForm.discount_money = 0
|
||||
this.personalForm.actualMoney = 0
|
||||
EnterDetail.map(function(elem) {
|
||||
|
@ -2989,7 +3043,7 @@ export default {
|
|||
}
|
||||
couponNumbers = couponNumbers.substring(0, couponNumbers.length - 1)
|
||||
this.personalForm.couponNumbers = couponNumbers
|
||||
if (this.personalForm.receivableMoney === '' || this.personalForm.receivableMoney === undefined || this.personalForm.receivableMoney === null) {
|
||||
if (this.personalForm.shouldMoney === '' || this.personalForm.shouldMoney === undefined || this.personalForm.shouldMoney === null) {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: '本次收款金额不能为空',
|
||||
|
@ -2997,11 +3051,20 @@ export default {
|
|||
})
|
||||
return false
|
||||
}
|
||||
// eslint-disable-next-line use-isnan
|
||||
if (this.personalForm.customerPay === '' || this.personalForm.customerPay === undefined || this.personalForm.customerPay === NaN || this.personalForm.customerPay === null) {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: '实际收到客户金额不能为空',
|
||||
offset: 100
|
||||
})
|
||||
return false
|
||||
}
|
||||
if (this.personalForm.isFree === 1) {
|
||||
this.personalForm.taxMoney = 0
|
||||
this.personalForm.includeTaxMoney = 0
|
||||
this.personalForm.money = 0
|
||||
this.personalForm.receivableMoney = 0
|
||||
this.personalForm.shouldMoney = 0
|
||||
this.personalForm.discount_money = 0
|
||||
this.personalForm.actualMoney = 0
|
||||
EnterDetail.map(function(elem) {
|
||||
|
|
|
@ -135,10 +135,35 @@
|
|||
</el-form-item>
|
||||
<!-- <span style="color: red;font-size: 14px">回收车金额:{{ huishou }}</span> -->
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item :label="$t('SaleOut.receivableMoney')" style="width: 100%;">
|
||||
<span>{{ personalForm.receivableMoneyForDetail }}</span>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('update4.shouldMoney')" style="width: 100%;">
|
||||
<span>{{ personalForm.shouldMoney }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('update4.customerPay')" style="width: 100%;">
|
||||
<span>{{ personalForm.customerPay }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('update4.changeMoney')" style="width: 100%;">
|
||||
<span>{{ personalForm.changeMoney }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('update4.receivableMoney')" style="width: 100%;">
|
||||
<span>{{ personalForm.receivableMoney }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('update4.unpayMoney')" style="width: 100%;">
|
||||
<span>{{ personalForm.unpayMoney }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('otherlanguage.yskdk')" style="width: 100%;">
|
||||
|
|
|
@ -182,10 +182,38 @@
|
|||
</el-form-item>
|
||||
<!-- <span style="color: red;font-size: 14px">回收车金额:{{ huishou }}</span> -->
|
||||
</el-col>
|
||||
<!-- 前两个改变会影响后面的改变 要加change事件 -->
|
||||
<el-col :span="12" style="height: 57px">
|
||||
<el-form-item :label="$t('update4.shouldMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<span style="margin-left: 20px;">
|
||||
{{ personalForm.shouldMoney }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('SaleOut.receivableMoney')" style="width: 100%;">
|
||||
<!-- <el-input v-model="personalForm.receivableMoney" style="margin-left: 18px;width: 200px" disabled/> -->
|
||||
<el-form-item :label="$t('update4.customerPay')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<el-input-number v-model="personalForm.customerPay" :controls="false" :step="0.1" :min="0" style="width: 200px" @change="updatePrice()"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" style="height: 57px">
|
||||
<el-form-item :label="$t('update4.changeMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<span style="margin-left: 20px;">
|
||||
{{ personalForm.changeMoney }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" style="height: 57px">
|
||||
<el-form-item :label="$t('update4.receivableMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<span style="margin-left: 20px;">
|
||||
{{ personalForm.receivableMoney }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" style="height: 57px">
|
||||
<el-form-item :label="$t('update4.unpayMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<span style="margin-left: 20px;">
|
||||
{{ personalForm.unpayMoney }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-for="(item, index) in personalForm2.couponSupports" :key="index" :span="12">
|
||||
|
@ -877,7 +905,17 @@ export default {
|
|||
ableSubmission: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
myshouldMoney() {
|
||||
return this.personalForm.shouldMoney
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
myshouldMoney: {
|
||||
handler(oldval, newval) {
|
||||
this.updatePrice()
|
||||
}
|
||||
},
|
||||
editcontrol() {
|
||||
this.editVisible = this.editcontrol
|
||||
// this.chooseSourceType()
|
||||
|
@ -913,7 +951,7 @@ export default {
|
|||
// }
|
||||
}
|
||||
this.personalForm.couponMoney = this.personalForm.couponSupport
|
||||
console.log('this.personalForm.receivableMoney', this.personalForm.receivableMoney)
|
||||
console.log('this.personalForm.shouldMoney', this.personalForm.shouldMoney)
|
||||
if (this.personalForm.couponNumbers === '' || this.personalForm.couponNumbers === null || this.personalForm.couponNumbers === undefined) {
|
||||
this.personalForm2.couponSupports = [
|
||||
{
|
||||
|
@ -1026,6 +1064,23 @@ export default {
|
|||
_that = this
|
||||
},
|
||||
methods: {
|
||||
updatePrice() {
|
||||
console.log('999', 999)
|
||||
if (this.personalForm.shouldMoney !== null && this.personalForm.shouldMoney !== '' && this.personalForm.shouldMoney !== undefined) {
|
||||
if (this.personalForm.customerPay !== null && this.personalForm.customerPay !== '' && this.personalForm.customerPay !== undefined) {
|
||||
// 客户给的钱多
|
||||
if (this.personalForm.customerPay > this.personalForm.shouldMoney) {
|
||||
this.personalForm.changeMoney = Number(this.personalForm.customerPay - this.personalForm.shouldMoney).toFixed(2)
|
||||
this.personalForm.receivableMoney = this.personalForm.shouldMoney
|
||||
this.personalForm.unpayMoney = Number(this.personalForm.shouldMoney - this.personalForm.receivableMoney).toFixed(2)
|
||||
} else {
|
||||
this.personalForm.changeMoney = 0
|
||||
this.personalForm.receivableMoney = this.personalForm.customerPay
|
||||
this.personalForm.unpayMoney = Number(this.personalForm.shouldMoney - this.personalForm.receivableMoney).toFixed(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
jundgeprice() {
|
||||
if (this.$store.getters.countryId === 2) {
|
||||
return true
|
||||
|
@ -1229,7 +1284,7 @@ export default {
|
|||
if (needmoney < 0) {
|
||||
needmoney = 0
|
||||
}
|
||||
this.$set(this.personalForm, 'receivableMoney', needmoney)
|
||||
this.$set(this.personalForm, 'shouldMoney', needmoney)
|
||||
// 未减去优惠券额的金额
|
||||
this.$set(this.personalForm, 'receivableMoney2', needmoney2)
|
||||
} else if (this.personalForm.useMonth !== null) {
|
||||
|
@ -1255,11 +1310,11 @@ export default {
|
|||
if (needmoney < 0) {
|
||||
needmoney = 0
|
||||
}
|
||||
this.$set(this.personalForm, 'receivableMoney', needmoney)
|
||||
this.$set(this.personalForm, 'shouldMoney', needmoney)
|
||||
// 未减去优惠券额的金额
|
||||
this.$set(this.personalForm, 'receivableMoney2', needmoney2)
|
||||
} else {
|
||||
this.$set(this.personalForm, 'receivableMoney', 0)
|
||||
this.$set(this.personalForm, 'shouldMoney', 0)
|
||||
// 未减去优惠券额的金额
|
||||
this.$set(this.personalForm, 'receivableMoney2', 0)
|
||||
}
|
||||
|
@ -1270,18 +1325,18 @@ export default {
|
|||
if (needmoney < 0) {
|
||||
needmoney = 0
|
||||
}
|
||||
this.$set(this.personalForm, 'receivableMoney', needmoney)
|
||||
this.$set(this.personalForm, 'shouldMoney', needmoney)
|
||||
// 未减去优惠券额的金额
|
||||
this.$set(this.personalForm, 'receivableMoney2', needmoney2)
|
||||
} else if (this.receivableMoney !== '' || this.receivableMoney !== null || this.receivableMoney !== undefined) {
|
||||
} else if (this.shouldMoney !== '' || this.shouldMoney !== null || this.shouldMoney !== undefined) {
|
||||
console.log('是否是销售合同带入过来')
|
||||
console.log('234', 234)
|
||||
let needmoney = (this.receivableMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney)
|
||||
const needmoney2 = (this.receivableMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney)
|
||||
let needmoney = (this.shouldMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney)
|
||||
const needmoney2 = (this.shouldMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney)
|
||||
if (needmoney < 0) {
|
||||
needmoney = 0
|
||||
}
|
||||
this.$set(this.personalForm, 'receivableMoney', needmoney)
|
||||
this.$set(this.personalForm, 'shouldMoney', needmoney)
|
||||
// 未减去优惠券额的金额
|
||||
this.$set(this.personalForm, 'receivableMoney2', needmoney2)
|
||||
} else {
|
||||
|
@ -1291,7 +1346,7 @@ export default {
|
|||
if (needmoney < 0) {
|
||||
needmoney = 0
|
||||
}
|
||||
this.$set(this.personalForm, 'receivableMoney', needmoney)
|
||||
this.$set(this.personalForm, 'shouldMoney', needmoney)
|
||||
// 未减去优惠券额的金额
|
||||
this.$set(this.personalForm, 'receivableMoney2', needmoney2)
|
||||
}
|
||||
|
@ -1305,22 +1360,22 @@ export default {
|
|||
// return (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.couponSupport) - Number(this.personalForm.advanceMoney))
|
||||
// }
|
||||
|
||||
// if (this.receivableMoney !== null && this.receivableMoney !== '' && this.receivableMoney !== undefined) {
|
||||
// if (this.shouldMoney !== null && this.shouldMoney !== '' && this.shouldMoney !== undefined) {
|
||||
// console.log(12333333333)
|
||||
// this.personalForm.receivableMoney = this.receivableMoney
|
||||
// return (this.receivableMoney - Number(this.personalForm.couponSupport))
|
||||
// this.personalForm.shouldMoney = this.shouldMoney
|
||||
// return (this.shouldMoney - Number(this.personalForm.couponSupport))
|
||||
// } else if (this.personalForm.ridMoney !== null && this.personalForm.ridMoney !== '' && this.personalForm.ridMoney !== undefined) {
|
||||
// console.log('this.heji3 - this.heji4 - this.personalForm.ridMoney', this.heji3 - this.heji4 - this.personalForm.ridMoney)
|
||||
// this.personalForm.receivableMoney = this.heji3 - this.heji4 - this.personalForm.ridMoney - this.personalForm.advanceMoney
|
||||
// this.personalForm.shouldMoney = this.heji3 - this.heji4 - this.personalForm.ridMoney - this.personalForm.advanceMoney
|
||||
// return (this.heji3 - this.heji4 - this.personalForm.ridMoney - Number(this.personalForm.couponSupport) - this.personalForm.advanceMoney)
|
||||
// } else if (this.personalForm.ridBikeMoney !== null && this.personalForm.ridBikeMoney !== '' && this.personalForm.ridBikeMoney !== undefined) {
|
||||
// console.log('this.heji3 - this.heji4 - this.personalForm.ridMoney', this.heji3 - this.heji4 - this.personalForm.ridMoney)
|
||||
// this.personalForm.receivableMoney = this.heji3 - this.heji4 - this.personalForm.ridBikeMoney - this.personalForm.advanceMoney
|
||||
// this.personalForm.shouldMoney = this.heji3 - this.heji4 - this.personalForm.ridBikeMoney - this.personalForm.advanceMoney
|
||||
// return (this.heji3 - this.heji4 - this.personalForm.ridBikeMoney - Number(this.personalForm.couponSupport) - this.personalForm.advanceMoney)
|
||||
// } else {
|
||||
// if (this.personalForm.sourceType === '1' || this.personalForm.sourceType === '4' || this.personalForm.sourceType === '5') {
|
||||
// console.log('this.heji3 - this.heji4', this.heji3 - this.heji4)
|
||||
// this.personalForm.receivableMoney = this.heji3 - this.heji4
|
||||
// this.personalForm.shouldMoney = this.heji3 - this.heji4
|
||||
// return (this.heji3 - this.heji4 - Number(this.personalForm.couponSupport))
|
||||
// }
|
||||
// }
|
||||
|
@ -1328,21 +1383,21 @@ export default {
|
|||
// getReceivableMoney(val) {
|
||||
// console.log('666', 666)
|
||||
// console.log('val', val)
|
||||
// if (this.receivableMoney !== null && this.receivableMoney !== '' && this.receivableMoney !== undefined) {
|
||||
// this.personalForm.receivableMoney = this.receivableMoney
|
||||
// return (this.receivableMoney - Number(this.personalForm.couponSupport))
|
||||
// if (this.shouldMoney !== null && this.shouldMoney !== '' && this.shouldMoney !== undefined) {
|
||||
// this.personalForm.shouldMoney = this.shouldMoney
|
||||
// return (this.shouldMoney - Number(this.personalForm.couponSupport))
|
||||
// } else if (this.personalForm.ridMoney !== null && this.personalForm.ridMoney !== '' && this.personalForm.ridMoney !== undefined) {
|
||||
// console.log('this.heji3 - this.heji4 - this.personalForm.ridMoney', this.heji3 - this.heji4 - this.personalForm.ridMoney)
|
||||
// this.personalForm.receivableMoney = this.heji3 - this.heji4 - this.personalForm.ridMoney
|
||||
// this.personalForm.shouldMoney = this.heji3 - this.heji4 - this.personalForm.ridMoney
|
||||
// return (this.heji3 - this.heji4 - this.personalForm.ridMoney - Number(this.personalForm.couponSupport))
|
||||
// } else if (this.personalForm.ridBikeMoney !== null && this.personalForm.ridBikeMoney !== '' && this.personalForm.ridBikeMoney !== undefined) {
|
||||
// console.log('this.heji3 - this.heji4 - this.personalForm.ridMoney', this.heji3 - this.heji4 - this.personalForm.ridMoney)
|
||||
// this.personalForm.receivableMoney = this.heji3 - this.heji4 - this.personalForm.ridBikeMoney
|
||||
// this.personalForm.shouldMoney = this.heji3 - this.heji4 - this.personalForm.ridBikeMoney
|
||||
// return (this.heji3 - this.heji4 - this.personalForm.ridBikeMoney - Number(this.personalForm.couponSupport))
|
||||
// } else {
|
||||
// if (this.personalForm.sourceType === '1' || this.personalForm.sourceType === '4' || this.personalForm.sourceType === '5') {
|
||||
// console.log('this.heji3 - this.heji4', this.heji3 - this.heji4)
|
||||
// this.personalForm.receivableMoney = this.heji3 - this.heji4
|
||||
// this.personalForm.shouldMoney = this.heji3 - this.heji4
|
||||
// return (this.heji3 - this.heji4 - Number(this.personalForm.couponSupport))
|
||||
// }
|
||||
// }
|
||||
|
@ -1702,7 +1757,7 @@ export default {
|
|||
},
|
||||
salecontract(val) {
|
||||
console.log('val.firstMoney', val.firstMoney)
|
||||
this.receivableMoney = val.firstMoney
|
||||
this.shouldMoney = val.firstMoney
|
||||
if (val.customerType !== null && val.customerType !== undefined && val.customerType !== '') {
|
||||
this.personalForm.customerType = '2'
|
||||
}
|
||||
|
@ -1747,7 +1802,7 @@ export default {
|
|||
},
|
||||
chooseSourceType(val) {
|
||||
this.$refs.editable.clear()
|
||||
this.receivableMoney = ''
|
||||
this.shouldMoney = ''
|
||||
this.personalForm.ridMoney = ''
|
||||
this.personalForm.ridBikeMoney = ''
|
||||
console.log(val)
|
||||
|
@ -2396,9 +2451,9 @@ export default {
|
|||
outDate: null,
|
||||
sourceType: '5',
|
||||
otherMoney: '',
|
||||
receivableMoney: ''
|
||||
shouldMoney: ''
|
||||
}
|
||||
this.receivableMoney = ''
|
||||
this.shouldMoney = ''
|
||||
this.customerId = null
|
||||
this.salePersonId = null
|
||||
this.saleRepositoryId = null
|
||||
|
@ -2716,7 +2771,7 @@ export default {
|
|||
couponNumbers = couponNumbers.substring(0, couponNumbers.length - 1)
|
||||
console.log('couponNumbers', couponNumbers)
|
||||
this.personalForm.couponNumbers = couponNumbers
|
||||
if (this.personalForm.receivableMoney === '' || this.personalForm.receivableMoney === undefined || this.personalForm.receivableMoney === null) {
|
||||
if (this.personalForm.shouldMoney === '' || this.personalForm.shouldMoney === undefined || this.personalForm.shouldMoney === null) {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: '本次收款金额不能为空',
|
||||
|
@ -2724,12 +2779,21 @@ export default {
|
|||
})
|
||||
return false
|
||||
}
|
||||
// eslint-disable-next-line use-isnan
|
||||
if (this.personalForm.customerPay === '' || this.personalForm.customerPay === undefined || this.personalForm.customerPay === NaN || this.personalForm.customerPay === null) {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: '实际收到客户金额不能为空',
|
||||
offset: 100
|
||||
})
|
||||
return false
|
||||
}
|
||||
if (this.personalForm.isFree === 1) {
|
||||
console.log('進入了2')
|
||||
this.personalForm.taxMoney = 0
|
||||
this.personalForm.includeTaxMoney = 0
|
||||
this.personalForm.money = 0
|
||||
this.personalForm.receivableMoney = 0
|
||||
this.personalForm.shouldMoney = 0
|
||||
this.personalForm.discount_money = 0
|
||||
this.personalForm.actualMoney = 0
|
||||
EnterDetail.map(function(elem) {
|
||||
|
|
|
@ -330,6 +330,7 @@ export default {
|
|||
}, 100)
|
||||
},
|
||||
mounted() {
|
||||
this.getinformation()
|
||||
this.getlist()
|
||||
setTimeout(() => {
|
||||
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
|
||||
|
@ -339,6 +340,15 @@ export default {
|
|||
_that = this
|
||||
},
|
||||
methods: {
|
||||
getinformation() {
|
||||
if (this.$store.getters.empcontract) {
|
||||
console.log('getempcontract', this.$store.getters.empcontract)
|
||||
this.getemplist.supplierId = this.$store.getters.empcontract.supplierId
|
||||
this.getemplist.beginTime = this.$store.getters.empcontract.beginTime
|
||||
this.getemplist.endTime = this.$store.getters.empcontract.endTime
|
||||
this.$store.dispatch('getempcontract', '')
|
||||
}
|
||||
},
|
||||
getSpanArr(data) {
|
||||
this.spanArr = []
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
<el-option value="0.8" label="80%" />
|
||||
<el-option value="0.9" label="90%" />
|
||||
</el-select>
|
||||
<el-select v-model="getemplist.bPercent" :value="getemplist.aPercent" size="small" placeholder="B" clearable style="width: 150px;margin-top: 10px">
|
||||
<el-select v-model="getemplist.bPercent" :value="getemplist.bPercent" size="small" placeholder="B" clearable style="width: 150px;margin-top: 10px">
|
||||
<el-option value="0.1" label="10%" />
|
||||
<el-option value="0.2" label="20%" />
|
||||
<el-option value="0.3" label="30%" />
|
||||
<el-option value="0.4" label="40%" />
|
||||
</el-select>
|
||||
<el-select v-model="getemplist.cPercent" :value="getemplist.aPercent" size="small" placeholder="C" clearable style="width: 150px;margin-top: 10px">
|
||||
<el-select v-model="getemplist.cPercent" :value="getemplist.cPercent" size="small" placeholder="C" clearable style="width: 150px;margin-top: 10px">
|
||||
<el-option value="0.1" label="10%" />
|
||||
<el-option value="0.2" label="20%" />
|
||||
</el-select>
|
||||
|
@ -331,7 +331,8 @@ export default {
|
|||
// 搜索
|
||||
handleFilter() {
|
||||
if (this.getemplist.aPercent === undefined || this.getemplist.aPercent === null || this.getemplist.aPercent === '') {
|
||||
if ((Number(this.getemplist.bPercent) + Number(this.getemplist.cPercent)) !== parseInt(1)) {
|
||||
console.log('123', 11)
|
||||
if ((Number(this.getemplist.bPercent) + Number(this.getemplist.cPercent)).toFixed(1) !== '1.0') {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: 'ABC加起来需要为1',
|
||||
|
@ -340,7 +341,8 @@ export default {
|
|||
return false
|
||||
}
|
||||
} else if (this.getemplist.bPercent === undefined || this.getemplist.bPercent === null || this.getemplist.bPercent === '') {
|
||||
if ((Number(this.getemplist.aPercent) + Number(this.getemplist.cPercent)) !== parseInt(1)) {
|
||||
console.log('123', 12)
|
||||
if ((Number(this.getemplist.aPercent) + Number(this.getemplist.cPercent)).toFixed(1) !== '1.0') {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: 'ABC加起来需要为1',
|
||||
|
@ -349,7 +351,8 @@ export default {
|
|||
return false
|
||||
}
|
||||
} else if (this.getemplist.cPercent === undefined || this.getemplist.cPercent === null || this.getemplist.cPercent === '') {
|
||||
if ((Number(this.getemplist.aPercent) + Number(this.getemplist.bPercent)) !== parseInt(1)) {
|
||||
console.log('123', 13)
|
||||
if ((Number(this.getemplist.aPercent) + Number(this.getemplist.bPercent)).toFixed(1) !== '1.0') {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: 'ABC加起来需要为1',
|
||||
|
@ -358,7 +361,10 @@ export default {
|
|||
return false
|
||||
}
|
||||
} else {
|
||||
if ((Number(this.getemplist.aPercent) + Number(this.getemplist.bPercent) + Number(this.getemplist.cPercent)) !== parseInt(1)) {
|
||||
console.log('123', (Number(this.getemplist.aPercent) + Number(this.getemplist.bPercent) + Number(this.getemplist.cPercent)).toFixed(1))
|
||||
console.log('123', '1.0')
|
||||
console.log('123', (Number(this.getemplist.aPercent) + Number(this.getemplist.bPercent) + Number(this.getemplist.cPercent)).toFixed(1) === parseInt(1))
|
||||
if ((Number(this.getemplist.aPercent) + Number(this.getemplist.bPercent) + Number(this.getemplist.cPercent)).toFixed(1) !== '1.0') {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: 'ABC加起来需要为1',
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
<div class="ERP-container">
|
||||
<el-card :body-style=" { padding: '5px' }" class="box-card" style="margin-top: 5px" shadow="never">
|
||||
|
||||
<el-input v-model="getemplist.productName" :placeholder="$t('Hmodule.wpmc')" size="small" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
|
||||
|
||||
<el-input v-model="supplierId" :placeholder="$t('StockContract.supplierId')" size="small" class="filter-item" @focus="handlechoose" @clear="restFilter"/>
|
||||
<my-supplier :control.sync="empcontrol" @supplierName="supplierName"/>
|
||||
|
||||
|
@ -30,21 +28,21 @@
|
|||
border
|
||||
style="width: 100%"
|
||||
@row-click="clickRow">
|
||||
<el-table-column :label="$t('report.supplierName')" :resizable="false" align="center" min-width="200">
|
||||
<el-table-column
|
||||
:label="$t('report.supplierName')"
|
||||
prop="supplierName"
|
||||
width="200"
|
||||
align="center"/>
|
||||
<el-table-column :label="$t('report.orderNum')" :resizable="false" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<span class="link-type" @click="handleDetail(scope.row)">{{ scope.row.supplierName }}</span>
|
||||
<span class="link-type" @click="handleDetail(scope.row)">{{ scope.row.orderNum }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('report.arrivalNum')" :resizable="false" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<span class="link-type" @click="handleDetail2(scope.row)">{{ scope.row.arrivalNum }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('report.orderNum')"
|
||||
prop="orderNum"
|
||||
width="200"
|
||||
align="center"/>
|
||||
<el-table-column
|
||||
:label="$t('report.arrivalNum')"
|
||||
prop="arrivalNum"
|
||||
width="200"
|
||||
align="center"/>
|
||||
<el-table-column
|
||||
:label="$t('report.delayNum')"
|
||||
prop="delayNum"
|
||||
|
@ -212,6 +210,15 @@ export default {
|
|||
_that = this
|
||||
},
|
||||
methods: {
|
||||
handleDetail2(row) {
|
||||
console.log('row', row)
|
||||
const param = {}
|
||||
param.supplierId = row.supplierId
|
||||
param.beginTime = this.date[0]
|
||||
param.endTime = this.date[1]
|
||||
this.$store.dispatch('getempcontract', param)
|
||||
this.$router.push('/StockArrival/StockArrivalList')
|
||||
},
|
||||
clickRow(val) {
|
||||
if (val.judgeStat === 0) {
|
||||
this.$refs.table.toggleRowSelection(val)
|
||||
|
@ -365,14 +372,13 @@ export default {
|
|||
},
|
||||
// 详情操作
|
||||
handleDetail(row) {
|
||||
console.log(row)
|
||||
const query_params = {
|
||||
id: row.supplierId,
|
||||
name: row.supplierName,
|
||||
beginTime: this.date[0] || '',
|
||||
endTime: this.date[1] || ''
|
||||
}
|
||||
this.$router.push({ path: '/StockOrder/StockOrderList', query: { arry: query_params }})
|
||||
console.log('row', row)
|
||||
const param = {}
|
||||
param.supplierId = row.supplierId
|
||||
param.beginTime = this.date[0]
|
||||
param.endTime = this.date[1]
|
||||
this.$store.dispatch('getempcontract', param)
|
||||
this.$router.push('/StockOrder/StockOrderList')
|
||||
},
|
||||
// 判断审核按钮
|
||||
isReview(row) {
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
<el-option value="0.8" label="80%" />
|
||||
<el-option value="0.9" label="90%" />
|
||||
</el-select>
|
||||
<el-select v-model="getemplist.bPercent" :value="getemplist.aPercent" size="small" placeholder="B" clearable style="width: 150px;margin-top: 10px">
|
||||
<el-select v-model="getemplist.bPercent" :value="getemplist.bPercent" size="small" placeholder="B" clearable style="width: 150px;margin-top: 10px">
|
||||
<el-option value="0.1" label="10%" />
|
||||
<el-option value="0.2" label="20%" />
|
||||
<el-option value="0.3" label="30%" />
|
||||
<el-option value="0.4" label="40%" />
|
||||
</el-select>
|
||||
<el-select v-model="getemplist.cPercent" :value="getemplist.aPercent" size="small" placeholder="C" clearable style="width: 150px;margin-top: 10px">
|
||||
<el-select v-model="getemplist.cPercent" :value="getemplist.cPercent" size="small" placeholder="C" clearable style="width: 150px;margin-top: 10px">
|
||||
<el-option value="0.1" label="10%" />
|
||||
<el-option value="0.2" label="20%" />
|
||||
</el-select>
|
||||
|
@ -105,7 +105,7 @@ import MySupplier from './components/MySupplier'
|
|||
|
||||
var _that
|
||||
export default {
|
||||
name: 'StockDetailCount',
|
||||
name: 'SupplierProvideABC',
|
||||
directives: { waves, permission, permission2 },
|
||||
components: { MyDialog, DetailList, MyEmp, MyCustomer, MySupplier, MyAgent, MyRepository, Pagination },
|
||||
filters: {
|
||||
|
@ -324,8 +324,12 @@ export default {
|
|||
},
|
||||
// 搜索
|
||||
handleFilter() {
|
||||
console.log('aPercent', this.getemplist.aPercent)
|
||||
console.log('bPercent', this.getemplist.bPercent)
|
||||
console.log('cPercent', this.getemplist.cPercent)
|
||||
if (this.getemplist.aPercent === undefined || this.getemplist.aPercent === null || this.getemplist.aPercent === '') {
|
||||
if ((Number(this.getemplist.bPercent) + Number(this.getemplist.cPercent)) !== parseInt(1)) {
|
||||
console.log('123', 11)
|
||||
if ((Number(this.getemplist.bPercent) + Number(this.getemplist.cPercent)).toFixed(1) !== '1.0') {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: 'ABC加起来需要为1',
|
||||
|
@ -334,7 +338,8 @@ export default {
|
|||
return false
|
||||
}
|
||||
} else if (this.getemplist.bPercent === undefined || this.getemplist.bPercent === null || this.getemplist.bPercent === '') {
|
||||
if ((Number(this.getemplist.aPercent) + Number(this.getemplist.cPercent)) !== parseInt(1)) {
|
||||
console.log('123', 12)
|
||||
if ((Number(this.getemplist.aPercent) + Number(this.getemplist.cPercent)).toFixed(1) !== '1.0') {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: 'ABC加起来需要为1',
|
||||
|
@ -343,7 +348,8 @@ export default {
|
|||
return false
|
||||
}
|
||||
} else if (this.getemplist.cPercent === undefined || this.getemplist.cPercent === null || this.getemplist.cPercent === '') {
|
||||
if ((Number(this.getemplist.aPercent) + Number(this.getemplist.bPercent)) !== parseInt(1)) {
|
||||
console.log('123', 13)
|
||||
if ((Number(this.getemplist.aPercent) + Number(this.getemplist.bPercent)).toFixed(1) !== '1.0') {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: 'ABC加起来需要为1',
|
||||
|
@ -352,7 +358,10 @@ export default {
|
|||
return false
|
||||
}
|
||||
} else {
|
||||
if ((Number(this.getemplist.aPercent) + Number(this.getemplist.bPercent) + Number(this.getemplist.cPercent)) !== parseInt(1)) {
|
||||
console.log('123', (Number(this.getemplist.aPercent) + Number(this.getemplist.bPercent) + Number(this.getemplist.cPercent)).toFixed(1))
|
||||
console.log('123', '1.0')
|
||||
console.log('123', (Number(this.getemplist.aPercent) + Number(this.getemplist.bPercent) + Number(this.getemplist.cPercent)).toFixed(1) === parseInt(1))
|
||||
if ((Number(this.getemplist.aPercent) + Number(this.getemplist.bPercent) + Number(this.getemplist.cPercent)).toFixed(1) !== '1.0') {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: 'ABC加起来需要为1',
|
||||
|
@ -361,9 +370,6 @@ export default {
|
|||
return false
|
||||
}
|
||||
}
|
||||
console.log('123', (Number(this.getemplist.aPercent) + Number(this.getemplist.bPercent) + Number(this.getemplist.cPercent)))
|
||||
console.log('123', 1)
|
||||
console.log('123', (Number(this.getemplist.aPercent) + Number(this.getemplist.bPercent) + Number(this.getemplist.cPercent)) === Number(1).toFixed(0))
|
||||
// if ((Number(Number(this.getemplist.aPercent) + Number(this.getemplist.bPercent) + Number(this.getemplist.cPercent)).toFixed(0)) !== Number(1).toFixed(0)) {
|
||||
// this.$notify.error({
|
||||
// title: 'wrong',
|
||||
|
|
Loading…
Reference in a new issue