Commit d3b7438c by zhouzy

解决了一部分交互问题

1 parent 69bb03eb
......@@ -23,9 +23,9 @@ function getlistByCardName(params) {
return GlAxios.get(`${path}/listByCardName`, { params })
}
// function exportMemberCard(params) {
// return GlAxios.get(`${path}/exportMemberCard`, params, { headers: { 'Content-Type': 'application/json; charset=utf-8' }, requestType: 'jsonString' })
// }
function exportMemberCard(params) {
return GlAxios.post(`${path}/exportMemberCard`, params, { headers: { 'Content-Type': 'application/json; charset=utf-8' }, requestType: 'jsonString' })
}
// 查询权益卡详情
// export function memberCardDetails(data) {
// data.method = 'memberInfo/detailsMemberInfo'
......@@ -52,9 +52,9 @@ export {
insertMemberCardDefineRf,
listMemberCardDefine,
getlistByCardName,
// exportMemberCard
exportMemberCard,
listMemberBatch,
listMemberCard,
listRequisitionMemberCard,
getMemberCardDetail,
getMemberCardDetail
}
......@@ -110,8 +110,8 @@
</el-form-item>
</div>
<div class="buttonContainer">
<el-button size="middle">取消</el-button>
<el-button :plain="true" size="middle" @click="jump" type="primary"
<el-button size="middle" @click="cancel">取消</el-button>
<el-button :plain="true" size="middle" @click="jump('ruleForm')" type="primary"
>提交</el-button
>
</div>
......@@ -176,58 +176,38 @@ export default {
},
],
validity: [{ required: true, message: "请选择有效期", trigger: "blur" }],
currencyInpution: [
{ required: true, message: "请填写返回的嘀币数", trigger: "blur" },
],
oilInpution: [{ required: true, message: "请填写推荐半径", trigger: "blur" }],
timeInpution: [{ required: true, message: "请填写最大天数", trigger: "blur" }],
rebateRatio: [{ required: true, message: "请填写返利比例", trigger: "blur" }],
// currencyInpution: [
// { required: true, message: "请填写返回的嘀币数", trigger: "blur" },
// ],
// oilInpution: [{ required: true, message: "请填写推荐半径", trigger: "blur" }],
// timeInpution: [{ required: true, message: "请填写最大天数", trigger: "blur" }],
// rebateRatio: [{ required: true, message: "请填写返利比例", trigger: "blur" }],
},
};
},
methods: {
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert("submit!");
} else {
console.log("error submit!!");
return false;
}
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
cancel(){
window.history.go(-1);
},
jump() {
jump(formName) {
var equityItemJson = {
returnDicoins: this.ruleForm.currencyInpution + "",
returnDicoins: this.ruleForm.currencyInpution ,
oilWorry: {
oilRadius: +this.ruleForm.oilInpution,
oioilInterval: +this.ruleForm.timeInpution,
},
collisionPush: this.ruleForm.pushCollision + "",
dicoinRatio: this.ruleForm.rebateRatio + "",
rescueWorryFree: this.ruleForm.rescueWorryFree + "",
creditInstallment: this.ruleForm.creditInstallment + "",
meiTuan: this.ruleForm.meiTuan + "",
collisionPush: this.ruleForm.pushCollision ,
dicoinRatio: this.ruleForm.rebateRatio ,
rescueWorryFree: this.ruleForm.rescueWorryFree ,
creditInstallment: this.ruleForm.creditInstallment ,
meiTuan: this.ruleForm.meiTuan ,
};
// window.location.href='http://localhost:8080/customer/rightsCardManagement.html
var params = {
memberDescription: this.ruleForm.explain + "",
memberName: this.ruleForm.name + "",
memberDescription: this.ruleForm.explain ,
memberName: this.ruleForm.name ,
validitVaule: this.ruleForm.validity,
rightsList: [],
// equityItemJson: {
// returnDicoins: this.ruleForm.currencyInpution + '',
// oilWorry: this.ruleForm.oilInpution + '',
// oioilInterval: this.ruleForm.timeInpution + '',
// collisionPush: this.ruleForm.pushCollision + '',
// dicoinRatio: this.ruleForm.rebateRatio + '',
// rescueWorryFree: this.ruleForm.rescueWorryFree + '',
// creditInstallment: this.ruleForm.creditInstallment + '',
// meiTuan: this.ruleForm.meiTuan + ''
// }
};
if (this.ruleForm.currencyCheckbox) {
......@@ -279,32 +259,53 @@ export default {
});
this.submit = true;
}
if (this.ruleForm.name) {
if (this.submit == true) {
insertMemberCardDefineRf(params).then((res) => {
this.$refs[formName].validate((valid) => {
if (valid) {
insertMemberCardDefineRf(params).then((res) => {
// console.log(res)
if (res > 0) {
window.history.go(-1);
ruleForm = {};
alert("增加权益卡成功");
} else {
this.$message({
message: "增加失败",
message: "请至少选择一项服务",
type: "error",
});
}
});
} else {
this.$message({
message: "需开通至少一项服务",
type: "error",
});
alert("必选项未填,增加权益卡失败");
return false;
}
} else {
this.$message({
message: "权益卡名称不能为空",
type: "error",
});
}
});
// if (this.ruleForm.name) {
// if (this.submit == true) {
// insertMemberCardDefineRf(params).then((res) => {
// // console.log(res)
// if (res > 0) {
// window.history.go(-1);
// ruleForm = {};
// } else {
// this.$message({
// message: "增加失败",
// type: "error",
// });
// }
// });
// } else {
// this.$message({
// message: "需开通至少一项服务",
// type: "error",
// });
// }
// } else {
// this.$message({
// message: "权益卡名称不能为空",
// type: "error",
// });
// }
},
// inableInpution(checkStatus, inputStatus) {
......
......@@ -35,11 +35,10 @@ function date_format(d) {
var D = date.getDate() + " ";
return Y + M + D;
}
// import { getListApi } from '@/api/test'
import { listMemberCardDefine } from '@/api/test'
// import {memberCardDetails} from "@/api/test";
import { listMemberCardDefine } from '@/api/test'
// import selectbotton from '@/components/selectbotton'
import { Define } from '@/api/test'
export default {
// components: {
// selectbotton
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!