Commit 41a1755f authored by guang.wu's avatar guang.wu

feat: 修改投资金转换问题

parent 9b668ec5
...@@ -229,7 +229,6 @@ const CreateBatchFormItems = ({ specInitValue, batchChange, defaultColumns }) => ...@@ -229,7 +229,6 @@ const CreateBatchFormItems = ({ specInitValue, batchChange, defaultColumns }) =>
const FormPriceOrStock = forwardRef((props, ref) => { const FormPriceOrStock = forwardRef((props, ref) => {
const { specList, editData, skuList = [], onSpecChange } = props; const { specList, editData, skuList = [], onSpecChange } = props;
const editRef = useRef(null); const editRef = useRef(null);
const packageRef = useRef(null); const packageRef = useRef(null);
const customer = useContext(ServiceContext); const customer = useContext(ServiceContext);
...@@ -457,7 +456,15 @@ const FormPriceOrStock = forwardRef((props, ref) => { ...@@ -457,7 +456,15 @@ const FormPriceOrStock = forwardRef((props, ref) => {
setMergeTable(Boolean(editData.secondSpecValue && editData.secondSpecValue.length)); setMergeTable(Boolean(editData.secondSpecValue && editData.secondSpecValue.length));
setTableData(fliterSkuListSortData(skuList) || []); setTableData(fliterSkuListSortData(skuList) || []);
} }
}, [customer.isEdit, customer.isUseCache, editData]); }, [customer.isEdit, customer.isUseCache, editData, skuList]);
useEffect(() => {
if (!editData) {
onFinish();
return;
}
CreateColumnsEvent(editData);
}, [customer.isGold]);
return ( return (
<> <>
......
...@@ -377,7 +377,7 @@ const ServiceGoods = options => { ...@@ -377,7 +377,7 @@ const ServiceGoods = options => {
} }
setPageLoading(false); setPageLoading(false);
})(); })();
}, [SourceData, categoryIds]); }, [SourceData]);
useEffect(() => { useEffect(() => {
if (options.visible) { if (options.visible) {
...@@ -443,10 +443,10 @@ const ServiceGoods = options => { ...@@ -443,10 +443,10 @@ const ServiceGoods = options => {
const onCategoryChange = e => { const onCategoryChange = e => {
setCategoryIds(e); setCategoryIds(e);
let txt = ''; let txt = '';
if (categoryIds.includes(GoldCategory)) { if (e.includes(GoldCategory)) {
txt = '千克';
} else if (e.includes(GoldCategory)) {
txt = ''; txt = '';
} else if (categoryIds.includes(GoldCategory) && !e.includes(GoldCategory)) {
txt = '千克';
} }
if (txt) { if (txt) {
message.warning(`商品品类已切换,规格重量单位已自动切换为${txt}`, 6); message.warning(`商品品类已切换,规格重量单位已自动切换为${txt}`, 6);
......
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