Commit a979a372 authored by XieZhiXiong's avatar XieZhiXiong

chore: 显示加工单价、加工金额

parent c8d80a89
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47 * @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-03-02 14:30:30 * @LastEditTime: 2021-07-29 13:40:54
* @Description: 联动逻辑相关 * @Description: 联动逻辑相关
*/ */
import { Modal, message } from 'antd'; import { Modal, message } from 'antd';
...@@ -388,6 +388,7 @@ export const useBusinessEffects = (context, actions) => { ...@@ -388,6 +388,7 @@ export const useBusinessEffects = (context, actions) => {
FormPath.setIn(state, 'originAsyncData', details.map(item => ({ FormPath.setIn(state, 'originAsyncData', details.map(item => ({
...item, ...item,
// 这里的数据以采购、销售订单的为准 // 这里的数据以采购、销售订单的为准
price: item.processPrice, // 与采购入库单、销售发货单统一
logistics: { logistics: {
deliveryType, // 手动赋值配送方式,同一个通知单下的所有商品都是统一的配送方式 deliveryType, // 手动赋值配送方式,同一个通知单下的所有商品都是统一的配送方式
}, },
...@@ -418,7 +419,10 @@ export const useBusinessEffects = (context, actions) => { ...@@ -418,7 +419,10 @@ export const useBusinessEffects = (context, actions) => {
value: item.id, value: item.id,
})); }));
setFieldState('invoicesDetailsRequests.*.product', state => { setFieldState('invoicesDetailsRequests.*.product', state => {
FormPath.setIn(state, 'originAsyncData', details); FormPath.setIn(state, 'originAsyncData', details.map((item) => ({
...item,
price: item.processPrice, // 与采购入库单、销售发货单统一
})));
FormPath.setIn(state, 'props.enum', goodOptions); FormPath.setIn(state, 'props.enum', goodOptions);
}); });
}); });
...@@ -731,6 +735,14 @@ export const useBusinessEffects = (context, actions) => { ...@@ -731,6 +735,14 @@ export const useBusinessEffects = (context, actions) => {
state.value = current.processNum; state.value = current.processNum;
} }
); );
setFieldState(
FormPath.transform(name, /\d/, $1 => {
return `invoicesDetailsRequests.${$1}.amount`
}),
state => {
state.value = current.processPrice ? `¥${(current.processNum * current.processPrice).toFixed(2)}` : null;
}
);
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment