fix: 增加批次卡密时间

This commit is contained in:
zhangds 2022-11-02 10:25:17 +08:00
parent 02f9c97b28
commit e79b2df5e2
3 changed files with 14 additions and 14 deletions

View File

@ -271,10 +271,6 @@ export default class add extends React.Component {
};
let plan_id = sessionStorage.getItem("plan_id");
console.log("key批次提交 =>", obj);
// 校验key批次卡密时间
return;
await addPlanStep(plan_id, obj).then((res) => {
handelResponse(
res,
@ -480,9 +476,6 @@ export default class add extends React.Component {
receive_email: this.state.email_list[0],
payment_direction: this.state.payment_direction[this.state.paytype - 1],
};
console.log("大提交 =>", data);
return;
approvals(plan_id, data).then((res) => {
handelResponse(
res,

View File

@ -296,9 +296,7 @@ export default class acclist extends React.Component {
data.mobile_excel = this.state.mobile_excel;
data.mobile_repeat = this.state.mobile_repeat;
console.log("data =>", data);
// 校验 卡密时间判断
for (let i = 0; i < param.length; i++) {
if (submitIsKm(param[i].product.legal) === false) {
return valide;

View File

@ -25,6 +25,7 @@ import Ipt from "@/components/input/main";
import Form from "@/components/form/main";
import FormItem from "@/components/form-item/main";
import Grid from "@/components/gird/main.js";
import { submitIsKm } from "@/tools/index";
import UseCouponAddEdit from "@/components/UseCouponAddEdit"; //
import UseExchangeAddEdit from "@/components/UseExchangeAddEdit"; //
@ -665,9 +666,10 @@ const UseKeyAddEdit = () => {
const changeKeyName = () => {
let falag = false;
let keyBatch_id = sessionStorage.getItem("keybatch_id");
let editData = [];
// keyType 1 2
if (state.keyType === 1) {
let editExchangeData = state.distdata.filter(
editData = state.distdata.filter(
(item) =>
item.checked === true &&
(item.status === -1 ||
@ -675,11 +677,11 @@ const UseKeyAddEdit = () => {
item.id === "" ||
!item.id)
);
if (isDisabled() && editExchangeData.length <= 0) {
if (isDisabled() && editData.length <= 0) {
falag = true;
}
} else {
let editCouponData = state.couponData.filter(
editData = state.couponData.filter(
(item) =>
item.checked === true &&
(item.status === -1 ||
@ -687,11 +689,18 @@ const UseKeyAddEdit = () => {
item.id === "" ||
!item.id)
);
if (isDisabled() && editCouponData.length <= 0) {
if (isDisabled() && editData.length <= 0) {
falag = true;
}
}
//
for (let i = 0; i < editData.length; i++) {
if (submitIsKm(editData[i].product.legal) === false) {
falag = false;
return;
}
}
if (falag) {
keyEditApproval(keyBatch_id, {
id: state.id,
@ -707,7 +716,7 @@ const UseKeyAddEdit = () => {
(req, msg) => {
setTimeout(() => {
window.history.back();
}, 1000);
}, 500);
},
(err) => {
Notify.error(err);