Commit d3b7438c by zhouzy

解决了一部分交互问题

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