Commit c59366d8c5f63fb04142e39213635ea2250f29d0
Merge branch 'zhusen/order' into 'develop'
fix: 数值修改 See merge request !1
Showing
1 changed file
with
34 additions
and
26 deletions
src/views/project/order/FormDetail/index.vue
@@ -216,37 +216,45 @@ | @@ -216,37 +216,45 @@ | ||
216 | }); | 216 | }); |
217 | // 利润分析 | 217 | // 利润分析 |
218 | profitFormPanelRef.value.fields = { ...data.lockFields?.profitAnalysisFields } || {}; | 218 | profitFormPanelRef.value.fields = { ...data.lockFields?.profitAnalysisFields } || {}; |
219 | - // if (data?.orderUpdateInfoVO?.profitAnalysisFields) { | ||
220 | - // // 编辑了但是还没审核,先将页面的值变化 | ||
221 | - // profitFormPanelRef?.value?.setFieldsValue({ | ||
222 | - // ...toRaw(data?.orderUpdateInfoVO?.profitAnalysisFields), | ||
223 | - // packetPrice: packetPrice?.relationValue || 0, | ||
224 | - // exchangeRate: exchangeRate?.settingValue, | ||
225 | - // }); | ||
226 | - // } else { | ||
227 | - profitFormPanelRef?.value?.setFieldsValue({ | ||
228 | - ...toRaw(data.profitAnalysisInfo), | ||
229 | - packetPrice: packetPrice?.relationValue || 0, | ||
230 | - exchangeRate: exchangeRate?.settingValue, | ||
231 | - }); | ||
232 | - // } | ||
233 | - profitFormPanelRef?.value?.clearValidate(); | 219 | + if (data?.orderUpdateInfoVO?.profitAnalysisFields) { |
220 | + const { customerPrice, productionDepartmentPrice } = | ||
221 | + data?.orderUpdateInfoVO?.profitAnalysisFields || {}; | ||
222 | + // 编辑了但是还没审核,先将页面的值变化 | ||
223 | + profitFormPanelRef?.value?.setFieldsValue({ | ||
224 | + ...toRaw(data?.orderUpdateInfoVO?.profitAnalysisFields), | ||
225 | + customerPrice: Number(customerPrice || 0), | ||
226 | + productionDepartmentPrice: Number(productionDepartmentPrice || 0), | ||
227 | + packetPrice: packetPrice?.relationValue || 0, | ||
228 | + exchangeRate: exchangeRate?.settingValue, | ||
229 | + }); | ||
230 | + } else { | ||
231 | + profitFormPanelRef?.value?.setFieldsValue({ | ||
232 | + ...toRaw(data.profitAnalysisInfo), | ||
233 | + packetPrice: packetPrice?.relationValue || 0, | ||
234 | + exchangeRate: exchangeRate?.settingValue, | ||
235 | + }); | ||
236 | + } | ||
234 | } | 237 | } |
235 | 238 | ||
236 | if (reportFormPanelRef.value) { | 239 | if (reportFormPanelRef.value) { |
237 | // 项目报告书 | 240 | // 项目报告书 |
238 | reportFormPanelRef.value.fields = { ...data.lockFields?.reportFields } || {}; | 241 | reportFormPanelRef.value.fields = { ...data.lockFields?.reportFields } || {}; |
239 | - // if (data?.orderUpdateInfoVO?.reportFields) { | ||
240 | - // data?.orderUpdateInfoVO?.reportFields; | ||
241 | - // // 编辑了但是还没审核,先将页面的值变化 | ||
242 | - // reportFormPanelRef?.value?.setFieldsValue({ | ||
243 | - // ...data?.orderUpdateInfoVO?.reportFields, | ||
244 | - // }); | ||
245 | - // } else { | ||
246 | - reportFormPanelRef?.value?.setFieldsValue({ | ||
247 | - ...toRaw(data.reportInfo), | ||
248 | - }); | ||
249 | - // } | 242 | + if (data?.orderUpdateInfoVO?.reportFields) { |
243 | + const { ideaSourceRate, manualPreform1Rate, manualPreform2Rate } = | ||
244 | + data?.orderUpdateInfoVO?.reportFields || {}; | ||
245 | + data?.orderUpdateInfoVO?.reportFields; | ||
246 | + // 编辑了但是还没审核,先将页面的值变化 | ||
247 | + reportFormPanelRef?.value?.setFieldsValue({ | ||
248 | + ...toRaw(data?.orderUpdateInfoVO?.reportFields), | ||
249 | + ideaSourceRate: Number(ideaSourceRate || 0), | ||
250 | + manualPreform1Rate: Number(manualPreform1Rate || 0), | ||
251 | + manualPreform2Rate: Number(manualPreform2Rate || 0), | ||
252 | + }); | ||
253 | + } else { | ||
254 | + reportFormPanelRef?.value?.setFieldsValue({ | ||
255 | + ...toRaw(data.reportInfo), | ||
256 | + }); | ||
257 | + } | ||
250 | } | 258 | } |
251 | if (trackFormPanelRef.value) { | 259 | if (trackFormPanelRef.value) { |
252 | // 跟单信息 | 260 | // 跟单信息 |