Showing
1 changed file
with
32 additions
and
11 deletions
| @@ -159,6 +159,7 @@ export default { | @@ -159,6 +159,7 @@ export default { | ||
| 159 | businessFileList: [], | 159 | businessFileList: [], |
| 160 | shareholderFileList: [], | 160 | shareholderFileList: [], |
| 161 | customerInfo: { businessFileList: [], shareholderFileList: [], annualTotalSales: '', mainIndustry: '', annualMaterialOverview: '' }, | 161 | customerInfo: { businessFileList: [], shareholderFileList: [], annualTotalSales: '', mainIndustry: '', annualMaterialOverview: '' }, |
| 162 | + customerInfoOpened: false, | ||
| 162 | companyReview: { companySettlementPeriod: '', companyMaterialSupplyPlan: '', companySuggestedCategory: '', companySuggestedCategoryName: '', companyCreditLimit: '' }, | 163 | companyReview: { companySettlementPeriod: '', companyMaterialSupplyPlan: '', companySuggestedCategory: '', companySuggestedCategoryName: '', companyCreditLimit: '' }, |
| 163 | categoryOptions: [], | 164 | categoryOptions: [], |
| 164 | sheet: { visible: false, title: '请选择', options: [], value: '', field: '' }, | 165 | sheet: { visible: false, title: '请选择', options: [], value: '', field: '' }, |
| @@ -298,6 +299,14 @@ export default { | @@ -298,6 +299,14 @@ export default { | ||
| 298 | getPayload() { | 299 | getPayload() { |
| 299 | const ref = this.$refs.basicRef | 300 | const ref = this.$refs.basicRef |
| 300 | const vals = ref && typeof ref.getFormValues === 'function' ? ref.getFormValues() : {} | 301 | const vals = ref && typeof ref.getFormValues === 'function' ? ref.getFormValues() : {} |
| 302 | + if (this.auditCtx && this.auditCtx.bizFlag === 'CUSTOMER_CREDIT_EDIT') { | ||
| 303 | + if (Array.isArray(vals && vals.businessFileInfoList)) { | ||
| 304 | + vals.businessFileList = vals.businessFileInfoList || [] | ||
| 305 | + } | ||
| 306 | + if (Array.isArray(vals && vals.shareholderFileInfoList)) { | ||
| 307 | + vals.shareholderFileList = vals.shareholderFileInfoList || [] | ||
| 308 | + } | ||
| 309 | + } | ||
| 301 | return { | 310 | return { |
| 302 | ...vals, | 311 | ...vals, |
| 303 | } | 312 | } |
| @@ -374,7 +383,6 @@ export default { | @@ -374,7 +383,6 @@ export default { | ||
| 374 | })).filter(it => it.id) | 383 | })).filter(it => it.id) |
| 375 | } | 384 | } |
| 376 | const vals = this.getPayload() || {} | 385 | const vals = this.getPayload() || {} |
| 377 | - console.log(vals,'12312321') | ||
| 378 | if (this.customerInfo.annualTotalSales === '' && vals.annualTotalSales !== undefined && vals.annualTotalSales !== null) { | 386 | if (this.customerInfo.annualTotalSales === '' && vals.annualTotalSales !== undefined && vals.annualTotalSales !== null) { |
| 379 | this.customerInfo.annualTotalSales = vals.annualTotalSales | 387 | this.customerInfo.annualTotalSales = vals.annualTotalSales |
| 380 | } | 388 | } |
| @@ -384,14 +392,15 @@ export default { | @@ -384,14 +392,15 @@ export default { | ||
| 384 | if (this.customerInfo.annualMaterialOverview === '' && vals.annualMaterialOverview !== undefined && vals.annualMaterialOverview !== null) { | 392 | if (this.customerInfo.annualMaterialOverview === '' && vals.annualMaterialOverview !== undefined && vals.annualMaterialOverview !== null) { |
| 385 | this.customerInfo.annualMaterialOverview = vals.annualMaterialOverview | 393 | this.customerInfo.annualMaterialOverview = vals.annualMaterialOverview |
| 386 | } | 394 | } |
| 387 | - const b = (this.customerInfo && this.customerInfo.businessFileList && this.customerInfo.businessFileList.length > 0) | ||
| 388 | - ? this.customerInfo.businessFileList | ||
| 389 | - : (vals.businessFileList || []) | ||
| 390 | - const s = (this.customerInfo && this.customerInfo.shareholderFileList && this.customerInfo.shareholderFileList.length > 0) | ||
| 391 | - ? this.customerInfo.shareholderFileList | ||
| 392 | - : (vals.shareholderFileList || []) | 395 | + const b = this.customerInfoOpened |
| 396 | + ? (this.customerInfo.businessFileList || []) | ||
| 397 | + : ((vals.businessFileList || vals.businessFileInfoList || [])) | ||
| 398 | + const s = this.customerInfoOpened | ||
| 399 | + ? (this.customerInfo.shareholderFileList || []) | ||
| 400 | + : ((vals.shareholderFileList || vals.shareholderFileInfoList || [])) | ||
| 393 | this.businessFileList = toListModel(b) | 401 | this.businessFileList = toListModel(b) |
| 394 | this.shareholderFileList = toListModel(s) | 402 | this.shareholderFileList = toListModel(s) |
| 403 | + this.customerInfoOpened = true | ||
| 395 | this.$refs.customerInfoPopup && this.$refs.customerInfoPopup.open() | 404 | this.$refs.customerInfoPopup && this.$refs.customerInfoPopup.open() |
| 396 | } else if (this.extraBtnText === '公司评审') { | 405 | } else if (this.extraBtnText === '公司评审') { |
| 397 | this.$refs.companyReviewPopup && this.$refs.companyReviewPopup.open() | 406 | this.$refs.companyReviewPopup && this.$refs.companyReviewPopup.open() |
| @@ -456,10 +465,19 @@ export default { | @@ -456,10 +465,19 @@ export default { | ||
| 456 | if (this.auditCtx.bizFlag === 'CUSTOMER_CREDIT_EDIT') { | 465 | if (this.auditCtx.bizFlag === 'CUSTOMER_CREDIT_EDIT') { |
| 457 | // 运作科档案员审核(yzkday) --客户信息数据 | 466 | // 运作科档案员审核(yzkday) --客户信息数据 |
| 458 | if (this.roleCodes.includes('yzkday')) { | 467 | if (this.roleCodes.includes('yzkday')) { |
| 459 | - _data = { | ||
| 460 | - ..._data, | ||
| 461 | - ...this.customerInfo | 468 | + const savedBusiness = Array.isArray(this.customerInfo && this.customerInfo.businessFileList) ? this.customerInfo.businessFileList : [] |
| 469 | + const savedShareholder = Array.isArray(this.customerInfo && this.customerInfo.shareholderFileList) ? this.customerInfo.shareholderFileList : [] | ||
| 470 | + const currentBusiness = Array.isArray(_data.businessFileList) ? _data.businessFileList : (Array.isArray(_data.businessFileInfoList) ? _data.businessFileInfoList : []) | ||
| 471 | + const currentShareholder = Array.isArray(_data.shareholderFileList) ? _data.shareholderFileList : (Array.isArray(_data.shareholderFileInfoList) ? _data.shareholderFileInfoList : []) | ||
| 472 | + const merged = { ..._data } | ||
| 473 | + if (this.customerInfoOpened) { | ||
| 474 | + if (this.customerInfo.annualTotalSales != null) merged.annualTotalSales = this.customerInfo.annualTotalSales | ||
| 475 | + if (this.customerInfo.mainIndustry != null) merged.mainIndustry = this.customerInfo.mainIndustry | ||
| 476 | + if (this.customerInfo.annualMaterialOverview != null) merged.annualMaterialOverview = this.customerInfo.annualMaterialOverview | ||
| 462 | } | 477 | } |
| 478 | + merged.businessFileList = this.customerInfoOpened ? savedBusiness : (savedBusiness.length > 0 ? savedBusiness : currentBusiness) | ||
| 479 | + merged.shareholderFileList = this.customerInfoOpened ? savedShareholder : (savedShareholder.length > 0 ? savedShareholder : currentShareholder) | ||
| 480 | + _data = merged | ||
| 463 | } | 481 | } |
| 464 | // 运作科主管审核(yzkzg) --公司评审数据 | 482 | // 运作科主管审核(yzkzg) --公司评审数据 |
| 465 | if (this.roleCodes.includes('yzkzg')) { | 483 | if (this.roleCodes.includes('yzkzg')) { |
| @@ -474,7 +492,10 @@ export default { | @@ -474,7 +492,10 @@ export default { | ||
| 474 | message: this.message, | 492 | message: this.message, |
| 475 | taskId: this.auditCtx.taskId | 493 | taskId: this.auditCtx.taskId |
| 476 | } | 494 | } |
| 477 | - console.log('审核__confirmApprove', payload) | 495 | + if (this.auditCtx && this.auditCtx.bizFlag === 'CUSTOMER_CREDIT_EDIT') { |
| 496 | + delete payload.variables.businessFileInfoList | ||
| 497 | + delete payload.variables.shareholderFileInfoList | ||
| 498 | + } | ||
| 478 | if (this.approveType === 'PASS') { | 499 | if (this.approveType === 'PASS') { |
| 479 | approvePassApi(payload).then(res => { | 500 | approvePassApi(payload).then(res => { |
| 480 | console.log('审核__approvePass', res) | 501 | console.log('审核__approvePass', res) |