Example #1
0
class BaseAudit(models.Model):

    CURRENT_STATE_CHOICE = (
        (BitStatesUtils.STATE_NORMAL(), '未审核'),
        (BitStatesUtils.STATE_AUDIT(), '审核通过'),
        (BitStatesUtils.STATE_REJECT(), '审核拒绝'),
    )
    remark = models.TextField(max_length=40,
                              null=True,
                              blank=True,
                              verbose_name='审核备注')
    state = models.IntegerField(choices=CURRENT_STATE_CHOICE,
                                default=0,
                                blank=True,
                                verbose_name='审核状态',
                                null=True)
    applier = models.ForeignKey(UserProfile,
                                null=True,
                                blank=True,
                                verbose_name=u"申请人",
                                on_delete=models.CASCADE)
    auditor = models.CharField(max_length=10,
                               null=True,
                               blank=True,
                               verbose_name='审核人')
    applyTime = models.DateTimeField(auto_now_add=True, verbose_name=u"申请时间")
    audiTime = models.DateTimeField(blank=True,
                                    null=True,
                                    verbose_name=u"审核时间")

    class Meta:
        abstract = True
Example #2
0
 def queryset(self):
     qs = super(FullAuditOneAdmin, self).queryset()
     qs = qs.filter(Q(auditType=BidRequestAuditHistory.FULL_AUDIT_1)&Q(state=BitStatesUtils.STATE_NORMAL()))
     return qs
Example #3
0
 def queryset(self):
     qs = super(RechargeOfflineAdmin, self).queryset()
     qs = qs.filter(state=BitStatesUtils.STATE_NORMAL())
     return qs
Example #4
0
 def queryset(self):
     qs = super(PublishBidAauditAdmin, self).queryset()
     #未审核且标的申请存在
     qs = qs.filter(Q(auditType=BidRequestAuditHistory.PUBLISH_AUDIT)&Q(state=BitStatesUtils.STATE_NORMAL()))
     return qs
Example #5
0
 def queryset(self):
     qs = super(RealAuthAdmin, self).queryset()
     qs = qs.filter(
         Q(state=BitStatesUtils.STATE_NORMAL())
         | Q(state=BitStatesUtils.STATE_REJECT()))
     return qs