|
@@ -131,12 +131,29 @@
|
|
|
this.fetch(this.planId)
|
|
|
},
|
|
|
save(){
|
|
|
- orderMgrApi.saveToolTask(this.tableData).then(response => {
|
|
|
- const res = response.data
|
|
|
- if(res.isSuccess){
|
|
|
- this.$emit('close');
|
|
|
- }
|
|
|
- }).finally(() => this.loading = false)
|
|
|
+ let that = this
|
|
|
+ orderMgrApi.checkToolTask({planId:this.tableData[0].planId}).then(response=> {
|
|
|
+ const res = response.data
|
|
|
+ if(res.isSuccess){
|
|
|
+ if(!res.data){
|
|
|
+ orderMgrApi.saveToolTask(that.tableData).then(response => {
|
|
|
+ const res = response.data
|
|
|
+ if(res.isSuccess){
|
|
|
+ this.$emit('close');
|
|
|
+ }
|
|
|
+ }).finally(() => this.loading = false)
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: '任务已保存,请勿重复提交 ',
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ /*
|
|
|
+ */
|
|
|
}
|
|
|
}
|
|
|
}
|