Commit 021e76f5 by zhangquan

新增字段参数*100

1 parent 889bbe90
...@@ -43,6 +43,7 @@ import caseDesc from '../Renew/components/CaseDesc/caseDesc.vue' ...@@ -43,6 +43,7 @@ import caseDesc from '../Renew/components/CaseDesc/caseDesc.vue'
import claimsNote from '../Renew/components/ClaimsNote/index' import claimsNote from '../Renew/components/ClaimsNote/index'
import util from '@/util/util' import util from '@/util/util'
import glsxCombiForm from '@/components/glsx-combi-form' import glsxCombiForm from '@/components/glsx-combi-form'
import NP from 'number-precision'
export default { export default {
name: 'detail', name: 'detail',
components: { components: {
...@@ -196,7 +197,18 @@ export default { ...@@ -196,7 +197,18 @@ export default {
this.accountForm.objectType = 0 this.accountForm.objectType = 0
} }
if (this.accountForm.accountType !== 1) this.accountForm.accountType = 0 if (this.accountForm.accountType !== 1) this.accountForm.accountType = 0
this.serviceItemsList = serviceItemsList || [] this.serviceItemsList =
serviceItemsList?.map(item => {
return {
...item,
purchaseTax: NP.divide(item.purchaseTax, 100),
depreciation: NP.divide(item.depreciation, 100),
commercialInsurance: NP.divide(item.commercialInsurance, 100),
registrationFee: NP.divide(item.registrationFee, 100),
retrofits: NP.divide(item.retrofits, 100),
scooterFare: NP.divide(item.scooterFare, 100)
}
}) || []
// 以下是文件数据 // 以下是文件数据
res.files.forEach(item => { res.files.forEach(item => {
let obj = { url: item.fileUrl, fileType: item.fileType, name: item.fileName, progress: 100, mark: item.mark, fileCode: item.fileCode } let obj = { url: item.fileUrl, fileType: item.fileType, name: item.fileName, progress: 100, mark: item.mark, fileCode: item.fileCode }
......
...@@ -70,6 +70,7 @@ import material from './components/material.vue' ...@@ -70,6 +70,7 @@ import material from './components/material.vue'
import util from '@/util/util' import util from '@/util/util'
import wraning from './components/wraning/index.vue' import wraning from './components/wraning/index.vue'
import glsxCombiForm from '@/components/glsx-combi-form' import glsxCombiForm from '@/components/glsx-combi-form'
import NP from 'number-precision'
export default { export default {
name: 'order', name: 'order',
components: { components: {
...@@ -346,13 +347,13 @@ export default { ...@@ -346,13 +347,13 @@ export default {
_para.serviceItemsList = this.serviceItemsList.map(item => { _para.serviceItemsList = this.serviceItemsList.map(item => {
const { purchaseTax, depreciation, commercialInsurance, registrationFee, retrofits, scooterFare, serviceItemCode, serviceItemType, damageType } = item const { purchaseTax, depreciation, commercialInsurance, registrationFee, retrofits, scooterFare, serviceItemCode, serviceItemType, damageType } = item
return { return {
purchaseTax, purchaseTax: NP.times(purchaseTax || 0, 100),
depreciation, depreciation: NP.times(depreciation || 0, 100),
serviceItemCode, serviceItemCode,
commercialInsurance, commercialInsurance: NP.times(commercialInsurance || 0, 100),
registrationFee, registrationFee: NP.times(registrationFee || 0, 100),
retrofits, retrofits: NP.times(retrofits || 0, 100),
scooterFare, scooterFare: NP.times(scooterFare || 0, 100),
damageType: item.serviceItemType == 2 && item?.damageType?.length ? item.damageType.join(',') : '' damageType: item.serviceItemType == 2 && item?.damageType?.length ? item.damageType.join(',') : ''
} }
}) })
...@@ -428,6 +429,12 @@ export default { ...@@ -428,6 +429,12 @@ export default {
serviceItemsList.map(item => { serviceItemsList.map(item => {
return { return {
...item, ...item,
purchaseTax: NP.divide(item.purchaseTax, 100),
depreciation: NP.divide(item.depreciation, 100),
commercialInsurance: NP.divide(item.commercialInsurance, 100),
registrationFee: NP.divide(item.registrationFee, 100),
retrofits: NP.divide(item.retrofits, 100),
scooterFare: NP.divide(item.scooterFare, 100),
damageType: item?.damageType ? item.damageType.split(',').map(ele => Number(ele)) : [] damageType: item?.damageType ? item.damageType.split(',').map(ele => Number(ele)) : []
} }
}) || [] }) || []
...@@ -639,33 +646,16 @@ export default { ...@@ -639,33 +646,16 @@ export default {
lossAssessmentTarget[item.serviceItemCode] = item.lossAssessmentAmount lossAssessmentTarget[item.serviceItemCode] = item.lossAssessmentAmount
} }
}) })
// this.serviceItemsList.forEach((item, index) => {
// const { purchaseTax, depreciation, commercialInsurance, registrationFee, retrofits, scooterFare, serviceItemType, damageType } = item
// const _purchaseTax = `serviceItemsList[${index}].purchaseTax`
// const _depreciation = `serviceItemsList[${index}].depreciation`
// const _commercialInsurance = `serviceItemsList[${index}].commercialInsurance`
// const _registrationFee = `serviceItemsList[${index}].registrationFee`
// const _retrofits = `serviceItemsList[${index}].retrofits`
// const _scooterFare = `serviceItemsList[${index}].scooterFare`
// const _damageType = `serviceItemsList[${index}].damageType`
// params[_purchaseTax] = purchaseTax
// params[_depreciation] = depreciation
// params[_commercialInsurance] = commercialInsurance
// params[_registrationFee] = registrationFee
// params[_retrofits] = retrofits
// params[_scooterFare] = scooterFare
// params[_damageType] = serviceItemType == 2 && damageType?.length ? damageType.join(',') : ''
// })
params.serviceItemsList = this.serviceItemsList.map(item => { params.serviceItemsList = this.serviceItemsList.map(item => {
const { purchaseTax, depreciation, commercialInsurance, registrationFee, retrofits, scooterFare, serviceItemCode, serviceItemType, damageType } = item const { purchaseTax, depreciation, commercialInsurance, registrationFee, retrofits, scooterFare, serviceItemCode, serviceItemType, damageType } = item
return { return {
purchaseTax, purchaseTax: NP.times(purchaseTax || 0, 100),
depreciation, depreciation: NP.times(depreciation || 0, 100),
serviceItemCode, serviceItemCode,
commercialInsurance, commercialInsurance: NP.times(commercialInsurance || 0, 100),
registrationFee, registrationFee: NP.times(registrationFee || 0, 100),
retrofits, retrofits: NP.times(retrofits || 0, 100),
scooterFare, scooterFare: NP.times(scooterFare || 0, 100),
damageType: item.serviceItemType == 2 && item?.damageType?.length ? item.damageType.join(',') : '' damageType: item.serviceItemType == 2 && item?.damageType?.length ? item.damageType.join(',') : ''
} }
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!