@@ -134,7 +134,7 @@ def shot_request_list(request, administrator):  | 
            ||
| 134 | 134 | 
                 | 
            
| 135 | 135 | 
                if query:  | 
            
| 136 | 136 | 
                         shots = list(TenancyShotInfo.objects.values_list('shot_id', flat=True).filter(sn__icontains=query))
               | 
            
| 137 | 
                - reqs = reqs.filter(Q(phone__icontains=query) | Q(name__icontains=query) | Q(shot_id__in=shots))  | 
            |
| 137 | 
                + reqs = reqs.filter(Q(phone__icontains=query) | Q(name__icontains=query) | Q(shot_id__in=shots) | Q(request_number__icontains=query))  | 
            |
| 138 | 138 | 
                 | 
            
| 139 | 139 | 
                if model_id:  | 
            
| 140 | 140 | 
                reqs = reqs.filter(model_id=model_id)  | 
            
                @@ -0,0 +1,19 @@  | 
            ||
| 1 | 
                +# -*- coding: utf-8 -*-  | 
            |
| 2 | 
                +# Generated by Django 3.2.6 on 2023-12-27 07:24  | 
            |
| 3 | 
                +  | 
            |
| 4 | 
                +from django.db import migrations, models  | 
            |
| 5 | 
                +  | 
            |
| 6 | 
                +  | 
            |
| 7 | 
                +class Migration(migrations.Migration):  | 
            |
| 8 | 
                +  | 
            |
| 9 | 
                + dependencies = [  | 
            |
| 10 | 
                +        ('tenancy', '0006_tenancyshotrequestinfo_remark'),
               | 
            |
| 11 | 
                + ]  | 
            |
| 12 | 
                +  | 
            |
| 13 | 
                + operations = [  | 
            |
| 14 | 
                + migrations.AddField(  | 
            |
| 15 | 
                + model_name='tenancyshotrequestinfo',  | 
            |
| 16 | 
                + name='request_number',  | 
            |
| 17 | 
                + field=models.CharField(blank=True, db_index=True, help_text='线下借单编号', max_length=32, null=True, verbose_name='request_number'),  | 
            |
| 18 | 
                + ),  | 
            |
| 19 | 
                + ]  | 
            
                @@ -73,6 +73,8 @@ class TenancyShotRequestInfo(BaseModelMixin):  | 
            ||
| 73 | 73 | 
                request_id = ShortUUIDField(_(u'request_id'), max_length=32, blank=True, null=True, help_text=u'申请唯一标识', db_index=True, unique=True)  | 
            
| 74 | 74 | 
                admin_id = models.CharField(_(u'admin_id'), max_length=32, blank=True, null=True, help_text=u'经手人唯一标识', db_index=True)  | 
            
| 75 | 75 | 
                 | 
            
| 76 | 
                + request_number = models.CharField(_(u'request_number'), max_length=32, blank=True, null=True, help_text=u'线下借单编号', db_index=True)  | 
            |
| 77 | 
                +  | 
            |
| 76 | 78 | 
                shot_id = models.CharField(_(u'shot_id'), max_length=32, blank=True, null=True, help_text=u'镜头唯一标识', db_index=True)  | 
            
| 77 | 79 | 
                model_id = models.CharField(_(u'model_id'), max_length=32, blank=True, null=True, help_text=u'镜头型号唯一标识', db_index=True)  | 
            
| 78 | 80 | 
                 | 
            
                @@ -149,6 +151,7 @@ class TenancyShotRequestInfo(BaseModelMixin):  | 
            ||
| 149 | 151 | 
                         return {
               | 
            
| 150 | 152 | 
                'req_id': self.request_id,  | 
            
| 151 | 153 | 
                'request_id': self.request_id,  | 
            
| 154 | 
                + 'request_number': self.request_number,  | 
            |
| 152 | 155 | 
                'shot_id': self.shot_id,  | 
            
| 153 | 156 | 
                'model_info': model.admindata,  | 
            
| 154 | 157 | 
                             'shot_info': shot.data if shot else {},
               | 
            
                @@ -207,6 +210,7 @@ class TenancyShotRequestInfo(BaseModelMixin):  | 
            ||
| 207 | 210 | 
                         return {
               | 
            
| 208 | 211 | 
                'req_id': self.request_id,  | 
            
| 209 | 212 | 
                'request_id': self.request_id,  | 
            
| 213 | 
                + 'request_number': self.request_number,  | 
            |
| 210 | 214 | 
                'shot_id': self.shot_id,  | 
            
| 211 | 215 | 
                             'shot_info': shot.data if shot else {},
               | 
            
| 212 | 216 | 
                'model_info': model.admindata,  |