Merge branch 'couponV1.5' of codeup.aliyun.com:5f9118049cffa29cfdd3be1c/marketing/frontend into couponV1.5
This commit is contained in:
commit
1e65e269b3
|
@ -257,6 +257,7 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
|
||||||
try {
|
try {
|
||||||
queryPlans({ status: "3,4,5" }).then((res) => {
|
queryPlans({ status: "3,4,5" }).then((res) => {
|
||||||
handelResponse(res, (req, msg) => {
|
handelResponse(res, (req, msg) => {
|
||||||
|
console.log("计划:", req);
|
||||||
let arr = req.map((item) => {
|
let arr = req.map((item) => {
|
||||||
return {
|
return {
|
||||||
key: { key: item.id, reseller_id: item.reseller_id },
|
key: { key: item.id, reseller_id: item.reseller_id },
|
||||||
|
@ -402,19 +403,22 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
|
||||||
setForm_info_data({ plan_id: e });
|
setForm_info_data({ plan_id: e });
|
||||||
setState({ direct_reseller_id: e.key.reseller_id });
|
setState({ direct_reseller_id: e.key.reseller_id });
|
||||||
setForm_info_data({ key_batch_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(
|
||||||
handelResponse(res, (req, msg) => {
|
(res) => {
|
||||||
let arr = req.map((item) => {
|
handelResponse(res, (req, msg) => {
|
||||||
return {
|
console.log("req =>", req);
|
||||||
key: item.id,
|
let arr = req.map((item) => {
|
||||||
text: item.batch_name,
|
return {
|
||||||
};
|
key: item.id,
|
||||||
|
text: item.batch_name,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
setState({
|
||||||
|
key_OPTIONS: arr,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
setState({
|
}
|
||||||
key_OPTIONS: arr,
|
);
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const onReturn = () => {};
|
const onReturn = () => {};
|
||||||
|
|
|
@ -12,8 +12,8 @@ import "./style.less";
|
||||||
const tableColumn = [
|
const tableColumn = [
|
||||||
{
|
{
|
||||||
title: "商品编号",
|
title: "商品编号",
|
||||||
name: "product_id",
|
name: "id",
|
||||||
prop: "product_id",
|
prop: "id",
|
||||||
type: "normal",
|
type: "normal",
|
||||||
width: "auto",
|
width: "auto",
|
||||||
},
|
},
|
||||||
|
@ -100,12 +100,12 @@ const UseCouponCommodity = () => {
|
||||||
tabList: [{ title: "商品范围列表", index: 0 }],
|
tabList: [{ title: "商品范围列表", index: 0 }],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
tableHeight: 500,
|
tableHeight: 500,
|
||||||
dataCount: 0,
|
|
||||||
lodgingTable: true,
|
lodgingTable: true,
|
||||||
combinedValue: [],
|
combinedValue: [],
|
||||||
key_word: "",
|
key_word: "",
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
|
total: 0,
|
||||||
isQuery: false,
|
isQuery: false,
|
||||||
});
|
});
|
||||||
const table_el = useRef(null);
|
const table_el = useRef(null);
|
||||||
|
@ -136,6 +136,7 @@ const UseCouponCommodity = () => {
|
||||||
let param = getParam();
|
let param = getParam();
|
||||||
getCodeProductList(param).then((res) => {
|
getCodeProductList(param).then((res) => {
|
||||||
handelResponse(res, (req, msg) => {
|
handelResponse(res, (req, msg) => {
|
||||||
|
setState({ tableData: req.data });
|
||||||
console.log("res =>", req);
|
console.log("res =>", req);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -186,12 +187,13 @@ const UseCouponCommodity = () => {
|
||||||
spliteColor={"#fff"}
|
spliteColor={"#fff"}
|
||||||
tableData={state.tableData}
|
tableData={state.tableData}
|
||||||
Column={tableColumn}
|
Column={tableColumn}
|
||||||
countbarVisible={false}
|
|
||||||
maxheight={state.tableHeight}
|
maxheight={state.tableHeight}
|
||||||
isSwitch={false}
|
isSwitch={false}
|
||||||
|
isShowPageBar={false}
|
||||||
|
countbarVisible={false}
|
||||||
page={state.page}
|
page={state.page}
|
||||||
ref={table_el}
|
ref={table_el}
|
||||||
dataCount={state.dataCount}
|
dataCount={state.total}
|
||||||
pageChange={(e) => onPageChange(e)}
|
pageChange={(e) => onPageChange(e)}
|
||||||
emptyText={
|
emptyText={
|
||||||
state.lodgingTable
|
state.lodgingTable
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue