fix: 新建商品新增完成
This commit is contained in:
parent
28b15a22b4
commit
dc40ac8587
|
@ -55,9 +55,7 @@ const UseGoodsScopePop = forwardRef((props, ref) => {
|
||||||
const format_knockGold_model = () => {
|
const format_knockGold_model = () => {
|
||||||
let new_tableData = tableData;
|
let new_tableData = tableData;
|
||||||
let form_model = knockGold_el.current.state.form_data;
|
let form_model = knockGold_el.current.state.form_data;
|
||||||
|
|
||||||
let table_obj = knockGoldFun(form_model);
|
let table_obj = knockGoldFun(form_model);
|
||||||
|
|
||||||
if (product_title === "编辑立减金") {
|
if (product_title === "编辑立减金") {
|
||||||
if (table_index !== -1) {
|
if (table_index !== -1) {
|
||||||
table_obj.checked = false;
|
table_obj.checked = false;
|
||||||
|
@ -67,7 +65,6 @@ const UseGoodsScopePop = forwardRef((props, ref) => {
|
||||||
} else {
|
} else {
|
||||||
new_tableData.push(table_obj);
|
new_tableData.push(table_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new_tableData;
|
return new_tableData;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ import React, {
|
||||||
} from "react";
|
} from "react";
|
||||||
import { Select, ImageUpload, RadioButton, RadioGroup, Notify } from "zent";
|
import { Select, ImageUpload, RadioButton, RadioGroup, Notify } from "zent";
|
||||||
import { useSetState } from "ahooks";
|
import { useSetState } from "ahooks";
|
||||||
import { FixedSizeList } from "react-window";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
|
||||||
import Ipt from "@/components/input/main";
|
import Ipt from "@/components/input/main";
|
||||||
|
@ -70,6 +69,7 @@ const UseProductPop = forwardRef((props, ref) => {
|
||||||
productDataAll: [], // 商品所有数据
|
productDataAll: [], // 商品所有数据
|
||||||
productPic: [],
|
productPic: [],
|
||||||
isUpdatePic: false,
|
isUpdatePic: false,
|
||||||
|
isProductSelect: false,
|
||||||
});
|
});
|
||||||
const [model, setModel] = useSetState({
|
const [model, setModel] = useSetState({
|
||||||
cur_product: {},
|
cur_product: {},
|
||||||
|
@ -122,17 +122,26 @@ const UseProductPop = forwardRef((props, ref) => {
|
||||||
reseller_id: directResellerId,
|
reseller_id: directResellerId,
|
||||||
type: productType,
|
type: productType,
|
||||||
};
|
};
|
||||||
|
setState({
|
||||||
|
isProductSelect: true,
|
||||||
|
});
|
||||||
getProductInfoSelect(param).then((res) => {
|
getProductInfoSelect(param).then((res) => {
|
||||||
handelResponse(
|
handelResponse(
|
||||||
res,
|
res,
|
||||||
(req, msg) => {
|
(req, msg) => {
|
||||||
console.log("商品数据 =>", req);
|
console.log("商品数据 =>", req);
|
||||||
|
setState({
|
||||||
|
isProductSelect: false,
|
||||||
|
});
|
||||||
setState({
|
setState({
|
||||||
productDataAll: req.data,
|
productDataAll: req.data,
|
||||||
});
|
});
|
||||||
productListEl(req.data);
|
productListEl(req.data);
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
|
setState({
|
||||||
|
isProductSelect: false,
|
||||||
|
});
|
||||||
console.log("err =>", err);
|
console.log("err =>", err);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -404,7 +413,9 @@ const UseProductPop = forwardRef((props, ref) => {
|
||||||
options={state.productOption}
|
options={state.productOption}
|
||||||
placeholder="请选择商品"
|
placeholder="请选择商品"
|
||||||
value={model.cur_product}
|
value={model.cur_product}
|
||||||
disabled={model.code_batch_id ? true : false}
|
disabled={
|
||||||
|
model.code_batch_id || state.isProductSelect ? true : false
|
||||||
|
}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
onProductChange(e);
|
onProductChange(e);
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Reference in New Issue