Commit 20d1b38a by liwk
2 parents 5aec1858 76bb191b
...@@ -239,7 +239,7 @@ import { equityApi } from '@/api/api' ...@@ -239,7 +239,7 @@ import { equityApi } from '@/api/api'
export default { export default {
data() { data() {
return { return {
submitBtn:false, submitBtn: false,
disableInputNumber: false, disableInputNumber: false,
disableSelect: false, disableSelect: false,
//分页查询下拉框 //分页查询下拉框
...@@ -314,7 +314,7 @@ export default { ...@@ -314,7 +314,7 @@ export default {
backgroundImage: '', backgroundImage: '',
usageNotes: '', usageNotes: '',
merchantId: '', merchantId: '',
effectiveType: '', effectiveType: '1',
platformGoodsId: +'', platformGoodsId: +'',
merchantName: '', merchantName: '',
id: '' id: ''
...@@ -476,7 +476,6 @@ export default { ...@@ -476,7 +476,6 @@ export default {
// console.log(this.isAdd) // console.log(this.isAdd)
// console.log(row) // console.log(row)
this.ruleForm = row this.ruleForm = row
this.submitBtn =false
// this.changeStore() // this.changeStore()
this.dialogVisible = true this.dialogVisible = true
console.log(this.ruleForm.effectiveType) console.log(this.ruleForm.effectiveType)
...@@ -498,7 +497,6 @@ export default { ...@@ -498,7 +497,6 @@ export default {
}, },
//复制 //复制
copy(row) { copy(row) {
this.submitBtn =false
this.disableSelect = false this.disableSelect = false
this.isAdd = true this.isAdd = true
console.log(this.isAdd) console.log(this.isAdd)
...@@ -564,7 +562,7 @@ export default { ...@@ -564,7 +562,7 @@ export default {
//判断是否是从新建按钮进来的 //判断是否是从新建按钮进来的
var apiName = this.isAdd ? 'newEquityCard' : 'editEquityCard' var apiName = this.isAdd ? 'newEquityCard' : 'editEquityCard'
console.log(apiName) console.log(apiName)
this.submitBtn =true this.submitBtn = true
equityApi[apiName](this.ruleForm).then((res) => { equityApi[apiName](this.ruleForm).then((res) => {
console.log(res) console.log(res)
console.log(apiName) console.log(apiName)
...@@ -578,17 +576,26 @@ export default { ...@@ -578,17 +576,26 @@ export default {
type: "success", type: "success",
}); });
this.disableSelect = false this.disableSelect = false
setTimeout(() => {
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
this.submitBtn = false
}, 400);
} else if (res.code == -1) { } else if (res.code == -1) {
this.$message({ this.$message({
message: "当前门店已绑定其他权益卡", message: "当前门店已绑定其他权益卡",
type: "error", type: "error",
}); });
setTimeout(() => {
this.submitBtn = false
}, 400);
} else { } else {
this.$message({ this.$message({
message: "绑定失败", message: "绑定失败",
type: "error", type: "error",
}); });
setTimeout(() => {
this.submitBtn = false
}, 400);
} }
}); });
} else { } else {
...@@ -608,6 +615,7 @@ export default { ...@@ -608,6 +615,7 @@ export default {
console.log(this.isAdd) console.log(this.isAdd)
this.disableSelect = false this.disableSelect = false
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
this.$refs.recordTable.refreshTable()
}, },
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!