Commit a979a372 authored by XieZhiXiong's avatar XieZhiXiong

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

parent c8d80a89
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-03-02 14:30:30
* @LastEditTime: 2021-07-29 13:40:54
* @Description: 联动逻辑相关
*/
import { Modal, message } from 'antd';
......@@ -388,6 +388,7 @@ export const useBusinessEffects = (context, actions) => {
FormPath.setIn(state, 'originAsyncData', details.map(item => ({
...item,
// 这里的数据以采购、销售订单的为准
price: item.processPrice, // 与采购入库单、销售发货单统一
logistics: {
deliveryType, // 手动赋值配送方式,同一个通知单下的所有商品都是统一的配送方式
},
......@@ -418,7 +419,10 @@ export const useBusinessEffects = (context, actions) => {
value: item.id,
}));
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);
});
});
......@@ -731,6 +735,14 @@ export const useBusinessEffects = (context, actions) => {
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;
}
......
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