Commit ebac4c7d1318f8a50eb6d6d1238f4020417cb188

Authored by sanmu
1 parent e36faa70

feat: 包装费用支持修改

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