|
@@ -104,7 +104,6 @@ export default {
|
|
submitForm(formName) {
|
|
submitForm(formName) {
|
|
this.$refs[formName].validate((valid) => {
|
|
this.$refs[formName].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- this.submitBtndisabled = true
|
|
|
|
let formData = { ...this.addEditDialogForm };
|
|
let formData = { ...this.addEditDialogForm };
|
|
if (formData.type === 1) {
|
|
if (formData.type === 1) {
|
|
delete formData.price;
|
|
delete formData.price;
|
|
@@ -121,13 +120,16 @@ export default {
|
|
message: '折扣金额不能大于满减金额',
|
|
message: '折扣金额不能大于满减金额',
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
|
|
+ this.submitBtndisabled = true
|
|
if (this.addOrEditor === 'add') {
|
|
if (this.addOrEditor === 'add') {
|
|
formData.checkFalg = 2;
|
|
formData.checkFalg = 2;
|
|
let message = '新增成功';
|
|
let message = '新增成功';
|
|
formData.totalPrice = Number(this.totalPrice) || null;
|
|
formData.totalPrice = Number(this.totalPrice) || null;
|
|
addCoupons(formData).then((res) => {
|
|
addCoupons(formData).then((res) => {
|
|
this.completeOperation(message);
|
|
this.completeOperation(message);
|
|
- }).catch();
|
|
|
|
|
|
+ }).catch(()=>{
|
|
|
|
+ this.submitBtndisabled = false
|
|
|
|
+ });
|
|
}
|
|
}
|
|
if (this.addOrEditor === 'edit') {
|
|
if (this.addOrEditor === 'edit') {
|
|
let data = {
|
|
let data = {
|
|
@@ -148,7 +150,9 @@ export default {
|
|
updateCouponsStatus(data).then((res) => {
|
|
updateCouponsStatus(data).then((res) => {
|
|
let message = '修改成功';
|
|
let message = '修改成功';
|
|
this.completeOperation(message);
|
|
this.completeOperation(message);
|
|
- }).catch();
|
|
|
|
|
|
+ }).catch(()=>{
|
|
|
|
+ this.submitBtndisabled = false
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|