1) 修复新建优惠券key批次查询错误

This commit is contained in:
zhangds 2022-09-16 15:35:52 +08:00
parent 7a21b16397
commit 5db99f4103
3 changed files with 630 additions and 599 deletions

View File

@ -257,6 +257,7 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
try {
queryPlans({ status: "3,4,5" }).then((res) => {
handelResponse(res, (req, msg) => {
console.log("计划:", req);
let arr = req.map((item) => {
return {
key: { key: item.id, reseller_id: item.reseller_id },
@ -402,19 +403,22 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
setForm_info_data({ plan_id: e });
setState({ direct_reseller_id: e.key.reseller_id });
setForm_info_data({ key_batch_id: "" });
queryKeyBatch({ status: "4,5", plan_id: e.key.key }).then((res) => {
handelResponse(res, (req, msg) => {
let arr = req.map((item) => {
return {
key: item.id,
text: item.batch_name,
};
queryKeyBatch({ status: "4,5", plan_id: e.key.key, bind_object: 2 }).then(
(res) => {
handelResponse(res, (req, msg) => {
console.log("req =>", req);
let arr = req.map((item) => {
return {
key: item.id,
text: item.batch_name,
};
});
setState({
key_OPTIONS: arr,
});
});
setState({
key_OPTIONS: arr,
});
});
});
}
);
};
const onReturn = () => {};

View File

@ -12,8 +12,8 @@ import "./style.less";
const tableColumn = [
{
title: "商品编号",
name: "product_id",
prop: "product_id",
name: "id",
prop: "id",
type: "normal",
width: "auto",
},
@ -100,12 +100,12 @@ const UseCouponCommodity = () => {
tabList: [{ title: "商品范围列表", index: 0 }],
tableData: [],
tableHeight: 500,
dataCount: 0,
lodgingTable: true,
combinedValue: [],
key_word: "",
page: 1,
limit: 10,
total: 0,
isQuery: false,
});
const table_el = useRef(null);
@ -136,6 +136,7 @@ const UseCouponCommodity = () => {
let param = getParam();
getCodeProductList(param).then((res) => {
handelResponse(res, (req, msg) => {
setState({ tableData: req.data });
console.log("res =>", req);
});
});
@ -186,12 +187,13 @@ const UseCouponCommodity = () => {
spliteColor={"#fff"}
tableData={state.tableData}
Column={tableColumn}
countbarVisible={false}
maxheight={state.tableHeight}
isSwitch={false}
isShowPageBar={false}
countbarVisible={false}
page={state.page}
ref={table_el}
dataCount={state.dataCount}
dataCount={state.total}
pageChange={(e) => onPageChange(e)}
emptyText={
state.lodgingTable

File diff suppressed because it is too large Load Diff