|
@@ -1239,30 +1239,35 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
cancel() {
|
|
|
- const toast = this.$toast.loading({
|
|
|
- forbidClick: true,
|
|
|
- duration: 0
|
|
|
- });
|
|
|
- var ids = '';
|
|
|
- var data = this.form.domains;
|
|
|
- data.forEach(element => {
|
|
|
- if (element.id != null && element.id != '') {
|
|
|
- if (element.id) {
|
|
|
- ids += (element.id + ',');
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- this.$axios.post("/report/cancel", { userId: this.user.id, reportIds: ids })
|
|
|
- .then(res => {
|
|
|
- if (res.code == "ok") {
|
|
|
- this.$toast.clear();
|
|
|
- this.$toast.success('撤销成功');
|
|
|
- this.getReport();
|
|
|
- } else {
|
|
|
- this.$toast.clear();
|
|
|
- this.$toast.fail('获取失败');
|
|
|
+ this.$dialog.confirm({
|
|
|
+ title: '撤回日报',
|
|
|
+ message: '确定要撤回当天日报吗?'
|
|
|
+ }).then(() => {
|
|
|
+ const toast = this.$toast.loading({
|
|
|
+ forbidClick: true,
|
|
|
+ duration: 0
|
|
|
+ });
|
|
|
+ var ids = '';
|
|
|
+ var data = this.form.domains;
|
|
|
+ data.forEach(element => {
|
|
|
+ if (element.id != null && element.id != '') {
|
|
|
+ if (element.id) {
|
|
|
+ ids += (element.id + ',');
|
|
|
+ }
|
|
|
}
|
|
|
- }).catch(err => { this.$toast.clear(); });
|
|
|
+ });
|
|
|
+ this.$axios.post("/report/cancel", { userId: this.user.id, reportIds: ids })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.$toast.clear();
|
|
|
+ this.$toast.success('撤销成功');
|
|
|
+ this.getReport();
|
|
|
+ } else {
|
|
|
+ this.$toast.clear();
|
|
|
+ this.$toast.fail('获取失败');
|
|
|
+ }
|
|
|
+ }).catch(err => { this.$toast.clear(); });
|
|
|
+ }).catch(() => { });
|
|
|
},
|
|
|
|
|
|
confirmWorkTime(field) {
|