浏览代码

提示信息优化

master
nizongfeng 2 年前
父节点
当前提交
26dbd2118d
共有 2 个文件被更改,包括 147 次插入47 次删除
  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 查看文件

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


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




+ 24
- 24
application/admin/view/receipt_order/index.html 查看文件

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




正在加载...
取消
保存