Merge branch 'couponV1.5' of codeup.aliyun.com:5f9118049cffa29cfdd3be1c/marketing/frontend into couponV1.5

This commit is contained in:
许红梅 2022-09-16 16:45:10 +08:00
commit 1e65e269b3
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,8 +403,10 @@ 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) => {
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,
@ -414,7 +417,8 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
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