|
@@ -181,6 +181,9 @@
|
|
if (value != Number(value)) {
|
|
if (value != Number(value)) {
|
|
callback(new Error('金额必须是数字'));
|
|
callback(new Error('金额必须是数字'));
|
|
}
|
|
}
|
|
|
|
+ if (value && 999999999999999999 < Number(value)) {
|
|
|
|
+ callback(new Error('数字过大'));
|
|
|
|
+ }
|
|
callback();
|
|
callback();
|
|
};
|
|
};
|
|
var checkMileage = (rule, value, callback) => {
|
|
var checkMileage = (rule, value, callback) => {
|
|
@@ -369,11 +372,17 @@
|
|
|
|
|
|
async saveQuit(){
|
|
async saveQuit(){
|
|
this.btnLoad = true;
|
|
this.btnLoad = true;
|
|
- if(this.activeType == '1'){
|
|
|
|
|
|
+ try {
|
|
|
|
+ if(this.activeType == '1'){
|
|
await this.saveProject();
|
|
await this.saveProject();
|
|
}else if(this.activeType == '2'){
|
|
}else if(this.activeType == '2'){
|
|
await this.saveWbsTree();
|
|
await this.saveWbsTree();
|
|
}
|
|
}
|
|
|
|
+ } catch (error) {
|
|
|
|
+ this.btnLoad = false;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
this.$message({
|
|
this.$message({
|
|
type: "success",
|
|
type: "success",
|
|
message: "保存成功!"
|
|
message: "保存成功!"
|
|
@@ -383,12 +392,18 @@
|
|
},
|
|
},
|
|
async saveNext(type){
|
|
async saveNext(type){
|
|
this.btnLoad = true;
|
|
this.btnLoad = true;
|
|
- if(this.activeType == '1'){
|
|
|
|
- let res = await this.saveProject();
|
|
|
|
- this.projectForm.id = res.data.data.id;
|
|
|
|
- }else if(this.activeType == '2'){
|
|
|
|
- await this.saveWbsTree();
|
|
|
|
|
|
+ try {
|
|
|
|
+ if(this.activeType == '1'){
|
|
|
|
+ let res = await this.saveProject();
|
|
|
|
+ this.projectForm.id = res.data.data.id;
|
|
|
|
+ }else if(this.activeType == '2'){
|
|
|
|
+ await this.saveWbsTree();
|
|
|
|
+ }
|
|
|
|
+ } catch (error) {
|
|
|
|
+ this.btnLoad = false;
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
|
|
+
|
|
this.$message({
|
|
this.$message({
|
|
type: "success",
|
|
type: "success",
|
|
message: "保存成功!"
|
|
message: "保存成功!"
|