Browse Source

提示信息优化

master
nizongfeng 1 year ago
parent
commit
26dbd2118d
2 changed files with 147 additions and 47 deletions
  1. +123
    -23
      application/admin/view/payment_order/index.html
  2. +24
    -24
      application/admin/view/receipt_order/index.html

+ 123
- 23
application/admin/view/payment_order/index.html View File

@@ -512,9 +512,18 @@
axios.post("/hotel.php/order_main/setFinanceMemo", param).then((response) => {
let data = response.data;
if (data.flag) {
this.$message.success("备注成功");
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'success',
message: '成功'
});
} else {
this.$message.error(response.msg);
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'error',
message:response.msg});
}
}).catch(function (error) {
console.log(error);
@@ -532,22 +541,38 @@
if (data.flag) {
this.fileTable = data.data
} else {
this.$message.error(response.msg);
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'error',
message:response.msg});
}
}).catch(function (error) {
console.log(error);
});
},
handleExceed(files, fileList) {
this.$message.warning(`当前限制选择 1 个文件`);
this.$message.warning({
offset:0,
showClose:true,duration:1500,
type: 'success',
message:`当前限制选择 1 个文件`});
},
fileSubmit(){
if (this.fileList.length==0) {
this.$message.error(`请选择文件`);
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'error',
message:`请选择文件`});
return false;
}
if (this.fileData["name"]=="") {
this.$message.error(`请输入名称标识`);
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'error',
message:`请输入名称标识`});
return false;
}
let file = this.fileList[0].response.data.url;
@@ -558,7 +583,11 @@
this.fileList=[]
this.showFile(this.fileData["id"])
} else {
this.$message.error(response.msg);
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'error',
message:response.msg});
}
}).catch(function (error) {
console.log(error);
@@ -671,7 +700,11 @@
this.total = data.data.total;
console.log(this.tableData);
} else {
this.$message.error(response.msg);
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'error',
message:response.msg});
}
}).catch(function (error) {
console.log(error);
@@ -705,14 +738,27 @@
let data = response.data;
console.log(this.tableData);
if (data.flag) {
this.$message.success("保存成功");
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'success',
message: '成功'
});
this.editShow = false;
this.getData(1);
} else {
this.$message.error(data.msg);
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'error',
message:data.msg});
}
}).catch(function (error) {
this.$message.error("保存失败");
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'error',
message:"保存失败"});
console.log(error);
});
},
@@ -725,18 +771,36 @@
axios.post("/hotel.php/payment_order/setStatus", info).then( (response)=> {
let data = response.data;
if (data.flag) {
this.$message.success("设置成功");
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'success',
message: '成功'
});
} else {
this.$message.error(data.msg);
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'error',
message:data.msg});
this.getData(this.search.pageNum)
}
}).catch(function (error) {
this.$message.error("保存失败");
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'error',
message:"保存失败"});
console.log(error);
this.getData(this.search.pageNum)
});
}).catch(() => {
this.$message.success("已取消");
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'success',
message: '已取消'
});
this.getData(this.search.pageNum)
})

@@ -759,7 +823,11 @@
this.orderMainTotal = data.data.total;
console.log(this.orderMainList);
} else {
this.$message.error(data.msg);
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'error',
message:data.msg});
}
}).catch(function (error) {
console.log(error);
@@ -782,11 +850,20 @@
axios.post("/hotel.php/payment_order/addOrderMain", param).then((response) => {
let data = response.data;
if (data.flag) {
this.$message.success("添加成功");
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'success',
message: '成功'
});
this.getOrderMainData(this.orderMainListSearch.pageNum)
this.getData(this.search.pageNum)
} else {
this.$message.error(data.msg);
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'error',
message:data.msg});
}
}).catch(function (error) {
console.log(error);
@@ -822,11 +899,20 @@
axios.post("/hotel.php/payment_order/removeOrderMain", param).then((response) => {
let data = response.data;
if (data.flag) {
this.$message.success("移除成功");
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'success',
message: '成功'
});
this.getOrderMainData(this.orderMainListSearch.pageNum)
this.getData(this.search.pageNum)
} else {
this.$message.error(data.msg);
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'error',
message:data.msg});
}
}).catch(function (error) {
console.log(error);
@@ -844,16 +930,30 @@
axios.post("/hotel.php/payment_order/delAll", param).then((response) => {
let data = response.data;
if (data.flag) {
this.$message.success("移除成功");
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'success',
message: '成功'
});
this.getData(this.search.pageNum)
} else {
this.$message.error(data.msg);
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'error',
message:data.msg});
}
}).catch(function (error) {
console.log(error);
});
}).catch(() => {
this.$message.success("已取消");
this.$message({
offset:0,
showClose:true,duration:1500,
type: 'success',
message: '已取消'
});
});
}



+ 24
- 24
application/admin/view/receipt_order/index.html View File

@@ -468,14 +468,14 @@
if (data.flag) {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'success',
message: '备注成功'
});
} else {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'error',
message:response.msg});
}
@@ -497,7 +497,7 @@
} else {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'error',
message:response.msg});
}
@@ -508,7 +508,7 @@
handleExceed(files, fileList) {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'warning',
message:`当前限制选择 1 个文件`});
},
@@ -516,7 +516,7 @@
if (this.fileList.length==0) {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'error',
message:`请选择文件`});
return false;
@@ -524,7 +524,7 @@
if (this.fileData["name"]=="") {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'error',
message:`请输入名称标识`});
return false;
@@ -539,7 +539,7 @@
} else {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'error',
message:response.msg});
}
@@ -614,7 +614,7 @@
} else {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'error',
message:response.msg});
}
@@ -652,7 +652,7 @@
if (data.flag) {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'success',
message:"保存成功"});
this.editShow = false;
@@ -660,14 +660,14 @@
} else {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'error',
message:data.msg});
}
}).catch(function (error) {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'error',
message:"保存失败"});
console.log(error);
@@ -684,13 +684,13 @@
if (data.flag) {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'success',
message:"保存成功"});
} else {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'error',
message:data.msg});
this.getData(this.search.pageNum)
@@ -699,7 +699,7 @@
}).catch(function (error) {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'error',
message:"保存失败"});
console.log(error);
@@ -708,7 +708,7 @@
}).catch(() => {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'success',
message:"已取消"});
this.getData(this.search.pageNum)
@@ -735,7 +735,7 @@
} else {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'error',
message:data.msg});
}
@@ -753,7 +753,7 @@
if (data.flag) {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'success',
message:"保存成功"});
this.getOrderMainData(this.orderMainListSearch.pageNum)
@@ -761,7 +761,7 @@
} else {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'error',
message: data.msg});
}
@@ -791,7 +791,7 @@
if (data.flag) {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'success',
message:"移除成功"});
this.getOrderMainData(this.orderMainListSearch.pageNum)
@@ -799,7 +799,7 @@
} else {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'error',
message: data.msg});
}
@@ -821,14 +821,14 @@
if (data.flag) {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'success',
message:"移除成功"});
this.getData(this.search.pageNum)
} else {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'error',
message:data.msg});
}
@@ -838,9 +838,9 @@
}).catch(() => {
this.$message({
offset:0,
showClose:true,
showClose:true,duration:1500,
type: 'success',
message:"保存成功"});
message:"已取消"});
});
}



Loading…
Cancel
Save