|
|
@@ -428,11 +428,12 @@ export default {
|
|
|
//已完成下发的计划不显示下发按钮
|
|
|
checkCanPublish(row) {
|
|
|
// console.log(row.planOfOrgType,"row.planOfOrgType")
|
|
|
- if (row.planOfOrgType == "1" && (row.distribute == null||row.distribute == 2)) {
|
|
|
+ if (row.planOfOrgType == "1" && row.distribute == 0) {
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|
|
|
},
|
|
|
+ //开始撤回
|
|
|
chhuile(row) {
|
|
|
this.loading = true;
|
|
|
api.cheHui(row.id).then((response) => {
|
|
|
@@ -440,8 +441,9 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
+ //已下发的显示撤回
|
|
|
chehui(row) {
|
|
|
- if (row.planOfOrgType == "1" && row.distribute == 1) {
|
|
|
+ if (row.distribute == 1) {
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|
|
|
@@ -492,17 +494,25 @@ export default {
|
|
|
this.$refs.editDialog.show(id, other);
|
|
|
},
|
|
|
showDialogDistribute(row) {
|
|
|
- api.cheHui(row.id).then((response) => {
|
|
|
- console.log(response.data,"appPlanService.cheHui(id);")
|
|
|
- if(response.data!=1){
|
|
|
- this.$refs.dialogDistribute.show(row);
|
|
|
- }else{
|
|
|
- this.getList();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+ this.loading = true;
|
|
|
+ api
|
|
|
+ .distributeCheHui(row.id)
|
|
|
+ .then((response) => {
|
|
|
+ // console.log(response, "then");
|
|
|
+ if (response.data == 0) {
|
|
|
+ this.loading = false;
|
|
|
+ this.$refs.dialogDistribute.show(row);
|
|
|
+ } else {
|
|
|
+ this.getList();
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
})
|
|
|
-
|
|
|
+ .catch((response) => {
|
|
|
+ // console.log(response, "catch");
|
|
|
+ this.getList();
|
|
|
+ this.loading = false;
|
|
|
+ this.$refs.dialogDistribute.show(row);
|
|
|
+ });
|
|
|
},
|
|
|
async onDel(id, name) {
|
|
|
this.$modal
|