wushaodong 4 年 前
コミット
c69c00459a
2 ファイル変更3 行追加3 行削除
  1. 2 2
      apps/tenant/repair_order/views.py
  2. 1 1
      uis/tenant/repairManage/index.html

+ 2 - 2
apps/tenant/repair_order/views.py

@@ -99,7 +99,7 @@ class RepairOrderViewSet(CustomModelViewSet):
             with transaction.atomic():
                 instance = RepairOrder.get_instance_by_id(pk, user.employee.tenant)
                 if not instance.status == settings.CHECKED:
-                    return response_ok('当前报修工单状态非待派单状态,不能进行派单!')
+                    return response_error('当前报修工单状态非待派单状态,不能进行派单!')
                 instance.dispatch_repair_order(user, user_ids)
             if user.id != user_ids:
                 user = User.objects.filter(id=user_ids).first()
@@ -124,7 +124,7 @@ class RepairOrderViewSet(CustomModelViewSet):
             with transaction.atomic():
                 instance = RepairOrder.get_instance_by_id(pk, user.employee.tenant)
                 if not instance.status == settings.DISPATCH:
-                    return response_ok('当前报修单状态还未派单,不能进行转单!')
+                    return response_error('当前报修单状态还未派单,不能进行转单!')
                 instance.repair_users_id = user_ids
                 instance.save()
                 # 记录操作

+ 1 - 1
uis/tenant/repairManage/index.html

@@ -182,7 +182,7 @@
                     content: 'detail.html'
                 })
             } else if (obj.event === 'dispatch') {
-                if (data.status < 1) {
+                if (data.status == 1) {
                     layer.msg('该报修单未审核,禁止派工!');
                     return false
                 }