fix: 删除无用代码
This commit is contained in:
parent
975bccbda8
commit
f9f2b095a0
|
@ -244,9 +244,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
|
|||
useEffect(() => {
|
||||
(async function init() {
|
||||
// 第一步:1.判断组件是否是 优惠券管理 couponType
|
||||
console.log("couponType =>", couponType);
|
||||
console.log("详情 =>", editData);
|
||||
console.log("isstate =>", sessionStorage.getItem("isState"));
|
||||
if (couponType === 0) {
|
||||
// 如果是编辑
|
||||
if (editData && editData !== "") {
|
||||
|
@ -612,7 +609,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
|
|||
update_product: {},
|
||||
delete_product: [],
|
||||
};
|
||||
console.log("所有数据 =>", state.tableData);
|
||||
// 第一步: 商品-立减金过滤
|
||||
let goods_arr = state.tableData.filter(
|
||||
(item) => item.checked && item.type === 1
|
||||
|
@ -641,11 +637,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
|
|||
return item.only;
|
||||
}); // 编辑
|
||||
|
||||
// console.log("编辑 大提交 =>", param);
|
||||
// return;
|
||||
|
||||
console.log("旧数据 =>", state.oldProduct);
|
||||
console.log("编辑 大提交 =>", param);
|
||||
// return;
|
||||
// 商品立减金-删除
|
||||
param.delete_product = state.tableData
|
||||
|
@ -658,8 +649,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
|
|||
}
|
||||
});
|
||||
|
||||
console.log("所有数据 =>", state.tableData);
|
||||
console.log("旧数据 =>", state.oldProduct);
|
||||
console.log("编辑 大提交 =>", param);
|
||||
|
||||
editCoupon(editData.id, param).then((res) => {
|
||||
|
@ -704,8 +693,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
|
|||
...item.only,
|
||||
};
|
||||
});
|
||||
console.log("param 优惠券新增 大提交 =>", param);
|
||||
|
||||
// 复制id
|
||||
if (state.isState === "1") {
|
||||
param.copy_code_batch_id = editData.id;
|
||||
|
@ -734,7 +721,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
|
|||
handelResponse(
|
||||
res,
|
||||
(req, msg) => {
|
||||
console.log("分销商 id =>", req.direct_reseller_id);
|
||||
setState({ direct_reseller_id: req.direct_reseller_id });
|
||||
},
|
||||
(err) => {
|
||||
|
@ -853,7 +839,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
|
|||
|
||||
// 获取已经选择的商品数据(禁用商品选择)
|
||||
const getCheckedProduct = () => {
|
||||
console.log("state.tableData =>", state.tableData);
|
||||
let arr = state.tableData.map((item) => item.product_id);
|
||||
return arr;
|
||||
};
|
||||
|
|
|
@ -168,9 +168,6 @@ const UseProductPop = forwardRef((props, ref) => {
|
|||
checkedProduct.indexOf(item.id) !== -1 ? true : false,
|
||||
};
|
||||
});
|
||||
console.log("opt-arr =>", optArr);
|
||||
console.log("checkedProduct =>", checkedProduct);
|
||||
|
||||
// 设置是否已经选择
|
||||
setState({ productOption: optArr });
|
||||
resolve(optArr);
|
||||
|
@ -179,7 +176,6 @@ const UseProductPop = forwardRef((props, ref) => {
|
|||
setState({
|
||||
loading: false,
|
||||
});
|
||||
console.log("err =>", err);
|
||||
reject(false);
|
||||
}
|
||||
);
|
||||
|
@ -193,7 +189,6 @@ const UseProductPop = forwardRef((props, ref) => {
|
|||
// 编辑处理
|
||||
const editFun = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
console.log("商品编辑 =>", productData);
|
||||
// 编辑
|
||||
if (productData) {
|
||||
setModel({
|
||||
|
|
Loading…
Reference in New Issue