diff --git a/client/src/api/record.js b/client/src/api/record.js
index abf1667..d6b231f 100644
--- a/client/src/api/record.js
+++ b/client/src/api/record.js
@@ -85,3 +85,11 @@ export function deptconfirm(id) {
})
}
+export function deptconfirm_top(id) {
+ return request({
+ url: `/supervision/record/${id}/deptconfirm_top/`,
+ method: 'put',
+ })
+}
+
+
diff --git a/client/src/router/index.js b/client/src/router/index.js
index f9a435c..5d92762 100644
--- a/client/src/router/index.js
+++ b/client/src/router/index.js
@@ -254,7 +254,7 @@ export const asyncRoutes = [
path: 'other',
name: 'other',
component: () => import('@/views/supervision/task.vue'),
- meta: { title: '其他任务'}
+ meta: { title: '其他任务', perms: ['task2']}
},
]
},
@@ -289,7 +289,7 @@ export const asyncRoutes = [
path: 'taskdo/:id',
name: 'Taskdo',
component: () => import('@/views/supervision/taskdo.vue'),
- meta: { title: '报送任务执行', perms: ['task_view'] },
+ meta: { title: '报送任务执行', perms: ['task2'] },
hidden: true
},
{
diff --git a/client/src/views/supervision/mytaskrecord.vue b/client/src/views/supervision/mytaskrecord.vue
index d8f7e17..0692b05 100644
--- a/client/src/views/supervision/mytaskrecord.vue
+++ b/client/src/views/supervision/mytaskrecord.vue
@@ -50,6 +50,12 @@
未确认
+
+
+ 已确认
+ 未确认
+
+
{{
@@ -108,6 +114,16 @@
@click="handleRecord({ action: 'deptconfirm', record: scope.row })"
>二级单位确认
+ 事业部确认
已确认
未确认
+
+
+
+ 已确认
+ 未确认
+
diff --git a/client/src/views/supervision/recorddo.vue b/client/src/views/supervision/recorddo.vue
index 437472b..61575f3 100644
--- a/client/src/views/supervision/recorddo.vue
+++ b/client/src/views/supervision/recorddo.vue
@@ -142,7 +142,9 @@ import {
rejectRecord,
confirmRecord,
deleteRecord,
- deptconfirm
+ deptconfirm,
+ deptconfirm_top
+
} from "@/api/record";
export default {
name: "recorddo",
@@ -230,9 +232,12 @@ export default {
this.$message.success("二级单位确认成功");
this.$emit("handleDo",true);
});
-
- }
- else if (this.data.action == "reject") {
+ } else if (this.data.action == "deptconfirm_top") {
+ deptconfirm_top(this.record.id).then((res) => {
+ this.$message.success("事业部确认成功");
+ this.$emit("handleDo",true);
+ });
+ } else if (this.data.action == "reject") {
rejectRecord(this.record.id, this.record).then((res) => {
this.$message.success("成功");
this.$emit("handleDo",true);
diff --git a/client/src/views/supervision/taskdo.vue b/client/src/views/supervision/taskdo.vue
index 024f86e..c675edc 100644
--- a/client/src/views/supervision/taskdo.vue
+++ b/client/src/views/supervision/taskdo.vue
@@ -257,6 +257,12 @@
已确认
未确认
+
+
+
+ 已确认
+ 未确认
+
{{ scope.row.note }}
diff --git a/server/apps/supervision/migrations/0053_record_dept_top_yes.py b/server/apps/supervision/migrations/0053_record_dept_top_yes.py
new file mode 100644
index 0000000..c3d1e74
--- /dev/null
+++ b/server/apps/supervision/migrations/0053_record_dept_top_yes.py
@@ -0,0 +1,18 @@
+# Generated by Django 3.2.12 on 2024-03-22 02:55
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('supervision', '0052_task_cate'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='record',
+ name='dept_top_yes',
+ field=models.BooleanField(default=True, verbose_name='事业部是否确认'),
+ ),
+ ]
diff --git a/server/apps/supervision/models.py b/server/apps/supervision/models.py
index 8ebb62c..ab8b1a7 100644
--- a/server/apps/supervision/models.py
+++ b/server/apps/supervision/models.py
@@ -85,6 +85,7 @@ class Record(CommonBModel):
noteb = models.TextField('报送说明', null=True, blank=True)
files = models.ManyToManyField(File, verbose_name="关联文件")
dept_yes = models.BooleanField('二级单位是否确认', default=True)
+ dept_top_yes = models.BooleanField('事业部是否确认', default=True)
class Meta:
verbose_name = '报送记录'
verbose_name_plural = verbose_name
diff --git a/server/apps/supervision/views.py b/server/apps/supervision/views.py
index 4203e99..69e7e21 100644
--- a/server/apps/supervision/views.py
+++ b/server/apps/supervision/views.py
@@ -315,6 +315,8 @@ class RecordViewSet(RbacFilterSet, PageOrNot, CreateUpdateCustomMixin, ModelView
obj.state = '已报送'
if obj.belong_dept.type.name=='2级公司':
obj.dept_yes = True
+ if obj.belong_dept.type.name=='事业部':
+ obj.dept_yes_top = True
obj.up_user = request.user
obj.up_date = timezone.now()
obj.save()
@@ -351,6 +353,17 @@ class RecordViewSet(RbacFilterSet, PageOrNot, CreateUpdateCustomMixin, ModelView
obj.save()
return Response(status=status.HTTP_200_OK)
return Response('记录状态错误', status=status.HTTP_400_BAD_REQUEST)
+ @action(methods=['put'], detail=True, perms_map = {'put':'record_detconfirm_top'})
+ def deptconfirm_top(self, request, *args, **kwargs):
+ """
+ 事业部确认
+ """
+ obj = self.get_object()
+ if obj.state in ['已报送']:
+ obj.dept_top_yes = True
+ obj.save()
+ return Response(status=status.HTTP_200_OK)
+ return Response('记录状态错误', status=status.HTTP_400_BAD_REQUEST)
@action(methods=['put'], detail=True, perms_map = {'put':'record_confirm'})
def confirm(self, request, *args, **kwargs):
"""