diff --git a/src/components/UseGoodsScopePop/index.jsx b/src/components/UseGoodsScopePop/index.jsx index 51d2259d..ce51787c 100644 --- a/src/components/UseGoodsScopePop/index.jsx +++ b/src/components/UseGoodsScopePop/index.jsx @@ -42,10 +42,12 @@ const UseGoodsScopePop = forwardRef((props, ref) => { Number(form_model.quantity) ); form_model.effectDate = "-"; + console.log("new_tableData[table_index] 1=>", new_tableData[table_index]); if (product_title === "编辑商品") { if (table_index !== -1) { - form_model.checked = false; + let ck = new_tableData[table_index].checked; new_tableData[table_index] = form_model; + new_tableData[table_index].checked = ck; } } else { new_tableData.push(form_model); @@ -58,11 +60,13 @@ const UseGoodsScopePop = forwardRef((props, ref) => { let new_tableData = tableData; let form_model = knockGold_el.current.state.form_data; let table_obj = knockGoldFun(form_model); + console.log("new_tableData[table_index] 2=>", new_tableData[table_index]); if (product_title === "编辑立减金") { if (table_index !== -1) { - table_obj.checked = false; + let ck = new_tableData[table_index].checked; new_tableData[table_index] = table_obj; new_tableData[table_index].only = form_model; + new_tableData[table_index].checked = ck; } } else { new_tableData.push(table_obj); diff --git a/src/components/UseProductPop/index.jsx b/src/components/UseProductPop/index.jsx index d610495a..686d3ce7 100644 --- a/src/components/UseProductPop/index.jsx +++ b/src/components/UseProductPop/index.jsx @@ -198,7 +198,7 @@ const UseProductPop = forwardRef((props, ref) => { setModel({ goods_id: productData.goods_id, cost_price: productData.cost_price, - weight: productData.weight, + weight: String(productData.weight), quantity: productData.quantity, contract_price: productData.contract_price, product_name: productData.product_name, @@ -532,7 +532,7 @@ const UseProductPop = forwardRef((props, ref) => { setModel({ weight: e }); }} onClearItem={(e) => { - setModel({ weight: "" }); + setModel({ weight: 0 }); }} value={model.weight} placeholder={"请输入"} diff --git a/src/tools/index.js b/src/tools/index.js index 92d66a7e..4ae68846 100644 --- a/src/tools/index.js +++ b/src/tools/index.js @@ -1,7 +1,6 @@ import { divNum } from "./number"; // 立减金对象重构 export const knockGoldFun = (item) => { - console.log("库存", item.stock); let table_obj = {}; table_obj.type = 2; // 类型 table_obj.upstream = String(item.channel) === "1" ? "支付宝" : "微信"; // 上游平台