Commit ebac4c7d1318f8a50eb6d6d1238f4020417cb188

Authored by sanmu
1 parent e36faa70

feat: 包装费用支持修改

src/utils/project.ts
@@ -5,7 +5,7 @@ export const getDisable = (code, id, value) => { @@ -5,7 +5,7 @@ export const getDisable = (code, id, value) => {
5 // 利润分析的权限校验 5 // 利润分析的权限校验
6 export const getProfitDisable = (field, code, id, value) => { 6 export const getProfitDisable = (field, code, id, value) => {
7 // 包装费用,汇率不允许修改 7 // 包装费用,汇率不允许修改
8 - if (['packetPrice', 'exchangeRate', 'profitRate'].includes(field)) { 8 + if (['exchangeRate', 'profitRate'].includes(field)) {
9 return true; 9 return true;
10 } 10 }
11 // code是lock,编辑并且value存在,才需要审核 11 // code是lock,编辑并且value存在,才需要审核
src/views/project/order/CheckDetail.vue
@@ -74,9 +74,8 @@ @@ -74,9 +74,8 @@
74 })) 74 }))
75 .filter( 75 .filter(
76 (item) => 76 (item) =>
77 - item.field !== 'packetPrice' &&  
78 - item.field !== 'exchangeRate' &&  
79 - item.field !== 'profitRate', 77 + // item.field !== 'packetPrice' &&
  78 + item.field !== 'exchangeRate' && item.field !== 'profitRate',
80 ); 79 );
81 80
82 export default defineComponent({ 81 export default defineComponent({
src/views/project/order/FormDetail/index.vue
@@ -240,11 +240,17 @@ @@ -240,11 +240,17 @@
240 profitFormPanelRef.value.fields = { ...data.lockFields?.profitAnalysisFields } || {}; 240 profitFormPanelRef.value.fields = { ...data.lockFields?.profitAnalysisFields } || {};
241 241
242 if (data?.orderUpdateInfoVO?.profitAnalysisFields) { 242 if (data?.orderUpdateInfoVO?.profitAnalysisFields) {
243 - const { customerPrice, productionDepartmentPrice, customerRmbPrice } = 243 + const { customerPrice, productionDepartmentPrice, customerRmbPrice, packetPrice } =
244 data?.orderUpdateInfoVO?.profitAnalysisFields || {}; 244 data?.orderUpdateInfoVO?.profitAnalysisFields || {};
245 245
246 //给个审核中提示 246 //给个审核中提示
247 checkingMsg.value = '当前订单利润分析审核中'; 247 checkingMsg.value = '当前订单利润分析审核中';
  248 + if (
  249 + data?.orderUpdateInfoVO?.profitAnalysisFields.packetPrice !==
  250 + data?.profitAnalysisInfo?.packetPrice
  251 + ) {
  252 + checkingMsg.value += ',包装费用有修改';
  253 + }
248 254
249 // 编辑了但是还没审核,先将页面的值变化 255 // 编辑了但是还没审核,先将页面的值变化
250 profitFormPanelRef?.value?.setFieldsValue({ 256 profitFormPanelRef?.value?.setFieldsValue({
@@ -252,13 +258,13 @@ @@ -252,13 +258,13 @@
252 customerPrice: Number(customerPrice || 0), 258 customerPrice: Number(customerPrice || 0),
253 customerRmbPrice: Number(customerRmbPrice || 0), 259 customerRmbPrice: Number(customerRmbPrice || 0),
254 productionDepartmentPrice: Number(productionDepartmentPrice || 0), 260 productionDepartmentPrice: Number(productionDepartmentPrice || 0),
255 - packetPrice: packetPrice?.relationValue || 0, 261 + packetPrice: packetPrice || packetPrice?.relationValue,
256 exchangeRate: exchangeRate?.settingValue, 262 exchangeRate: exchangeRate?.settingValue,
257 }); 263 });
258 } else { 264 } else {
259 profitFormPanelRef?.value?.setFieldsValue({ 265 profitFormPanelRef?.value?.setFieldsValue({
260 ...toRaw(data.profitAnalysisInfo), 266 ...toRaw(data.profitAnalysisInfo),
261 - packetPrice: packetPrice?.relationValue || 0, 267 + packetPrice: data.profitAnalysisInfo?.packetPrice || packetPrice?.relationValue,
262 exchangeRate: exchangeRate?.settingValue, 268 exchangeRate: exchangeRate?.settingValue,
263 }); 269 });
264 } 270 }