修复线上营销计划删除草稿状态,订单查询

This commit is contained in:
许红梅 2022-05-20 10:39:47 +08:00
parent 59d4cabb79
commit 604e5ad9e3
6 changed files with 537 additions and 448 deletions

View File

@ -354,6 +354,11 @@ export const keysIsSend = (id, params) => {
export const cancelKey = (id, params) => { export const cancelKey = (id, params) => {
return req("put", baseurl + "/keys/cancel/" + id, params); return req("put", baseurl + "/keys/cancel/" + id, params);
}; };
//删除草稿key批次
export const deldraftCode = (id) => {
return req("delete", baseurl + "/plan/delete/" + id);
};
//发送密钥邮件 //发送密钥邮件
export const postKeyEmail = (id, params) => { export const postKeyEmail = (id, params) => {

View File

@ -3,7 +3,6 @@ import React, { Component } from "react";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { import {
Button, Button,
Tag,
Sweetalert, Sweetalert,
CombinedDateRangePicker, CombinedDateRangePicker,
Notify, Notify,

File diff suppressed because it is too large Load Diff

View File

@ -11,4 +11,10 @@
.orderList .distable{ .orderList .distable{
margin-bottom: 10px; margin-bottom: 10px;
}
.orderList .iptfillself {
margin-bottom: 5px;
}
.orderList .iptfillself .label {
margin-right: 20px;
} }

View File

@ -29,6 +29,7 @@ import Filterbar from "../../../components/filterbar/main.js";
import { import {
planIsSend, planIsSend,
planCancel, planCancel,
deldraftCode,
getPlanList, getPlanList,
handelResponse, handelResponse,
startOrStopPlan, startOrStopPlan,
@ -165,7 +166,7 @@ export default class acclist extends React.Component {
this.setState({ distdata: req.data }); this.setState({ distdata: req.data });
this.setState({ dataCount: req.total }); this.setState({ dataCount: req.total });
}, },
(err) => {} (err) => { }
); );
}); });
} }
@ -295,7 +296,7 @@ export default class acclist extends React.Component {
} }
} }
//输入值变化 //输入值变化
onInputChange(e) {} onInputChange(e) { }
//营销系统名称 //营销系统名称
linkTo(row) { linkTo(row) {
sessionStorage.setItem("showflag", true); sessionStorage.setItem("showflag", true);
@ -319,7 +320,8 @@ export default class acclist extends React.Component {
menuItemClick(e, key, row) { menuItemClick(e, key, row) {
this.setState({ plan_id: row.id }); this.setState({ plan_id: row.id });
if (row.status == 6 || row.status == 0) { if (row.status == 6) {
Notify.clear();
Notify.error("该状态下的数据不允许编辑"); Notify.error("该状态下的数据不允许编辑");
return; return;
} }
@ -373,6 +375,44 @@ export default class acclist extends React.Component {
parentComponent: this, parentComponent: this,
}); });
} }
//删除
if (key == 4) {
let self = this;
Sweetalert.confirm({
type: "warning",
closeBtn: true,
title: "确认操作",
content: <p>是否确定删除[{row.title}]</p>,
onConfirm: () => {
deldraftCode(row.id).then((res) => {
handelResponse(
res,
(req, msg) => {
Notify.success(msg);
self.setState({ page: 1 });
self.setState({ limit: 10 });
let data = {
page: 1,
limit: 10,
status: this.state.status,
key_word: this.state.key_word,
};
if (data.key_word === "") {
delete data.key_word;
}
self.getPlanList(data);
},
(err) => {
Notify.error(err);
}
);
});
},
onCancel: this.onCancel,
className: "questModal",
parentComponent: this,
});
}
} }
//清空 //清空
@ -775,7 +815,7 @@ export default class acclist extends React.Component {
</a> </a>
<Dropdown position={DropdownPosition.RightTop}> <Dropdown position={DropdownPosition.RightTop}>
<DropdownClickTrigger> <DropdownClickTrigger>
<div className="linkmore" onClick={(e) => {}}> <div className="linkmore" onClick={(e) => { }}>
{" "} {" "}
更多 <Icon type={"down"} />{" "} 更多 <Icon type={"down"} />{" "}
</div> </div>
@ -834,19 +874,26 @@ export default class acclist extends React.Component {
<DropdownClickTrigger> <DropdownClickTrigger>
<div <div
className="linkmore" className="linkmore"
style={{ paddingLeft: "2px", color: "#d8dbdd" }} style={{ paddingLeft: "2px"}}
onClick={(e) => {}} onClick={(e) => { }}
> >
{" "} {" "}
更多 <Icon type={"down"} />{" "} 更多 <Icon type={"down"} />{" "}
</div> </div>
</DropdownClickTrigger> </DropdownClickTrigger>
<DropdownContent></DropdownContent> <DropdownContent>
<Menu
onClick={(e, key) =>
this.menuItemClick(e, key, rowData)
}
>
<MenuItem key="4">删除</MenuItem>
</Menu>
</DropdownContent>
</Dropdown> </Dropdown>
</div> </div>
); );
} }
if (rowData.status == 6) { if (rowData.status == 6) {
str = ( str = (
<div> <div>
@ -859,7 +906,7 @@ export default class acclist extends React.Component {
<div <div
className="linkmore" className="linkmore"
style={{ paddingLeft: "2px", color: "#d8dbdd" }} style={{ paddingLeft: "2px", color: "#d8dbdd" }}
onClick={(e) => {}} onClick={(e) => { }}
> >
{" "} {" "}
更多 <Icon type={"down"} />{" "} 更多 <Icon type={"down"} />{" "}
@ -870,7 +917,6 @@ export default class acclist extends React.Component {
</div> </div>
); );
} }
return str; return str;
} }
}} }}

View File

@ -3,4 +3,7 @@
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
} }
}
#systemMenu .zent-card[data-zv="9.12.7"]{
overflow: scroll;
} }