Commit c15651d9910b26a0a0236105751471a59b391c8a

Authored by zhongnanhuang
1 parent 8d621d9a

编辑订单时利润分析表和项目报告书审核中提示

src/views/project/order/FormDetail/index.vue
@@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
30 :forceRender="true" 30 :forceRender="true"
31 v-if="!!id && (role === ROLE.ADMIN || role === ROLE.BUSINESS)" 31 v-if="!!id && (role === ROLE.ADMIN || role === ROLE.BUSINESS)"
32 > 32 >
  33 + <div v-if="isProfitUnderReview" className="text-red-500">当前修改在审核中。</div>
33 <ProfitFormPanel ref="profitFormPanelRef" :id="id" :profitFormData="profitFormData" /> 34 <ProfitFormPanel ref="profitFormPanelRef" :id="id" :profitFormData="profitFormData" />
34 </TabPanel> 35 </TabPanel>
35 <TabPanel 36 <TabPanel
@@ -38,6 +39,7 @@ @@ -38,6 +39,7 @@
38 :forceRender="true" 39 :forceRender="true"
39 v-if="!!id && (role === ROLE.ADMIN || role === ROLE.BUSINESS)" 40 v-if="!!id && (role === ROLE.ADMIN || role === ROLE.BUSINESS)"
40 > 41 >
  42 + <div v-if="isReportUnderReview" className="text-red-500">当前修改在审核中。</div>
41 <ReportFormPanel ref="reportFormPanelRef" :id="id" :reportFormData="reportFormData" /> 43 <ReportFormPanel ref="reportFormPanelRef" :id="id" :reportFormData="reportFormData" />
42 </TabPanel> 44 </TabPanel>
43 <TabPanel 45 <TabPanel
@@ -114,6 +116,7 @@ @@ -114,6 +116,7 @@
114 }, 116 },
115 }, 117 },
116 emits: ['success'], 118 emits: ['success'],
  119 +
117 setup(_, { emit }) { 120 setup(_, { emit }) {
118 const activeKey = ref('1'); 121 const activeKey = ref('1');
119 const baseFormPanelRef = ref(); 122 const baseFormPanelRef = ref();
@@ -121,6 +124,8 @@ @@ -121,6 +124,8 @@
121 const reportFormPanelRef = ref(); 124 const reportFormPanelRef = ref();
122 const trackFormPanelRef = ref(); 125 const trackFormPanelRef = ref();
123 const inspectionFormPanelRef = ref(); 126 const inspectionFormPanelRef = ref();
  127 + const isProfitUnderReview = ref(false);
  128 + const isReportUnderReview = ref(false);
124 129
125 // 编辑从接口获取的value 130 // 编辑从接口获取的value
126 const baseFormData = ref(); 131 const baseFormData = ref();
@@ -216,9 +221,14 @@ @@ -216,9 +221,14 @@
216 }); 221 });
217 // 利润分析 222 // 利润分析
218 profitFormPanelRef.value.fields = { ...data.lockFields?.profitAnalysisFields } || {}; 223 profitFormPanelRef.value.fields = { ...data.lockFields?.profitAnalysisFields } || {};
  224 +
219 if (data?.orderUpdateInfoVO?.profitAnalysisFields) { 225 if (data?.orderUpdateInfoVO?.profitAnalysisFields) {
220 const { customerPrice, productionDepartmentPrice } = 226 const { customerPrice, productionDepartmentPrice } =
221 data?.orderUpdateInfoVO?.profitAnalysisFields || {}; 227 data?.orderUpdateInfoVO?.profitAnalysisFields || {};
  228 +
  229 + //给个审核中提示
  230 + isProfitUnderReview.value = true;
  231 +
222 // 编辑了但是还没审核,先将页面的值变化 232 // 编辑了但是还没审核,先将页面的值变化
223 profitFormPanelRef?.value?.setFieldsValue({ 233 profitFormPanelRef?.value?.setFieldsValue({
224 ...toRaw(data?.orderUpdateInfoVO?.profitAnalysisFields), 234 ...toRaw(data?.orderUpdateInfoVO?.profitAnalysisFields),
@@ -243,6 +253,10 @@ @@ -243,6 +253,10 @@
243 const { ideaSourceRate, manualPreform1Rate, manualPreform2Rate } = 253 const { ideaSourceRate, manualPreform1Rate, manualPreform2Rate } =
244 data?.orderUpdateInfoVO?.reportFields || {}; 254 data?.orderUpdateInfoVO?.reportFields || {};
245 data?.orderUpdateInfoVO?.reportFields; 255 data?.orderUpdateInfoVO?.reportFields;
  256 +
  257 + //给个审核中提示
  258 + isReportUnderReview.value = true;
  259 +
246 // 编辑了但是还没审核,先将页面的值变化 260 // 编辑了但是还没审核,先将页面的值变化
247 reportFormPanelRef?.value?.setFieldsValue({ 261 reportFormPanelRef?.value?.setFieldsValue({
248 ...toRaw(data?.orderUpdateInfoVO?.reportFields), 262 ...toRaw(data?.orderUpdateInfoVO?.reportFields),
@@ -362,6 +376,8 @@ @@ -362,6 +376,8 @@
362 register, 376 register,
363 handleSubmit, 377 handleSubmit,
364 businessUsers, 378 businessUsers,
  379 + isProfitUnderReview,
  380 + isReportUnderReview,
365 }; 381 };
366 }, 382 },
367 }); 383 });