#34;: [122.85, 41.12], 144
+  "溧阳": [119.48, 31.43],
145
+  "库尔勒": [86.06, 41.68],
146
+  "安阳": [114.35, 36.1],
147
+  "开封": [114.35, 34.79],
148
+  "济南": [117, 36.65],
149
+  "德阳": [104.37, 31.13],
150
+  "温州": [120.65, 28.01],
151
+  "九江": [115.97, 29.71],
152
+  "邯郸": [114.47, 36.6],
153
+  "临安": [119.72, 30.23],
154
+  "兰州": [103.73, 36.03],
155
+  "沧州": [116.83, 38.33],
156
+  "临沂": [118.35, 35.05],
157
+  "南充": [106.110698, 30.837793],
158
+  "天津": [117.2, 39.13],
159
+  "富阳": [119.95, 30.07],
160
+  "泰安": [117.13, 36.18],
161
+  "诸暨": [120.23, 29.71],
162
+  "郑州": [113.65, 34.76],
163
+  "哈尔滨": [126.63, 45.75],
164
+  "聊城": [115.97, 36.45],
165
+  "芜湖": [118.38, 31.33],
166
+  "唐山": [118.02, 39.63],
167
+  "平顶山": [113.29, 33.75],
168
+  "邢台": [114.48, 37.05],
169
+  "德州": [116.29, 37.45],
170
+  "济宁": [116.59, 35.38],
171
+  "荆州": [112.239741, 30.335165],
172
+  "宜昌": [111.3, 30.7],
173
+  "义乌": [120.06, 29.32],
174
+  "丽水": [119.92, 28.45],
175
+  "洛阳": [112.44, 34.7],
176
+  "秦皇岛": [119.57, 39.95],
177
+  "株洲": [113.16, 27.83],
178
+  "石家庄": [114.48, 38.03],
179
+  "莱芜": [117.67, 36.19],
180
+  "常德": [111.69, 29.05],
181
+  "保定": [115.48, 38.85],
182
+  "湘潭": [112.91, 27.87],
183
+  "金华": [119.64, 29.12],
184
+  "岳阳": [113.09, 29.37],
185
+  "长沙": [113, 28.21],
186
+  "衢州": [118.88, 28.97],
187
+  "廊坊": [116.7, 39.53],
188
+  "菏泽": [115.480656, 35.23375],
189
+  "合肥": [117.27, 31.86],
190
+  "武汉": [114.31, 30.52],
191
+  "大庆": [125.03, 46.58],
192
+  "林芝地": [94.25, 29.59],
193
+  "果洛藏族自治": [97.42, 34.81],
194
+  "闵行": [121.23, 31.07],
195
+  "那曲地": [92.1, 31.47]
196
+}

+ 0 - 0
dist/static/css/app.3a26c6e73b7d3ba6472504322287f93a.css

@@ -0,0 +1,2 @@

kodo - Gogs: Go Git Service

Няма описание

models.py 8.7KB

    # -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django_models_ext import BaseModelMixin, upload_file_path, upload_file_url, upload_path from TimeConvert import TimeConvert as tc from mch.models import DistributorInfo, ModelInfo from sales.models import SalesResponsibilityInfo from utils.qiniucdn import qiniu_file_url class SaleclerkIntegralIncomeExpensesInfo(BaseModelMixin): INCOME = 0 EXPENSE = 1 UNFREEZE = 2 TYPE = ( (INCOME, u'收入'), (EXPENSE, u'支出'), (UNFREEZE, u'解冻'), ) clerk_id = models.CharField(_(u'clerk_id'), max_length=32, blank=True, null=True, help_text=u'店员唯一标识', db_index=True) type = models.IntegerField(_(u'type'), choices=TYPE, default=INCOME, help_text=u'收支类别', db_index=True) brand_id = models.CharField(_(u'brand_id'), max_length=32, blank=True, null=True, help_text=u'品牌唯一标识', db_index=True) brand_name = models.CharField(_(u'brand_name'), max_length=255, blank=True, null=True, help_text=u'品牌名称') model_id = models.CharField(_(u'model_id'), max_length=32, blank=True, null=True, help_text=u'型号唯一标识', db_index=True) model_name = models.CharField(_(u'model_name'), max_length=255, blank=True, null=True, help_text=u'型号名称') distributor_id = models.CharField(_(u'distributor_id'), max_length=32, blank=True, null=True, help_text=u'经销商唯一标识', db_index=True) distributor_name = models.CharField(_(u'distributor_name'), max_length=255, blank=True, null=True, help_text=u'经销商名称') code = models.CharField(_(u'code'), max_length=32, blank=True, null=True, help_text=u'机身码', db_index=True) consumer_name = models.CharField(_(u'consumer_name'), max_length=32, blank=True, null=True, help_text=u'消费者姓名') consumer_phone = models.CharField(_(u'consumer_phone'), max_length=32, blank=True, null=True, help_text=u'消费者手机号') lat = models.FloatField(_(u'lat'), default=1.0, help_text=u'纬度') lon = models.FloatField(_(u'lon'), default=1.0, help_text=u'经度') image = models.FileField(_(u'image'), upload_to=upload_path, blank=True, null=True, help_text=u'图片') integral = models.IntegerField(_(u'integral'), default=0, help_text=u'增减积分') left_integral = models.IntegerField(_(u'left_integral'), default=0, help_text=u'积分增减后数量(分)') remark = models.CharField(_(u'remark'), max_length=255, blank=True, null=True, help_text=u'备注') test_user = models.BooleanField(_(u'test_user'), default=False, help_text=u'是否为测试用户') class Meta: verbose_name = _(u'saleclerkintegralincomeexpensesinfo') verbose_name_plural = _(u'saleclerkintegralincomeexpensesinfo') def __unicode__(self): return '%d' % self.pk @property def model_info(self): try: info = ModelInfo.objects.get(model_id=self.model_id).fulldata except ModelInfo.DoesNotExist: info = {} return info @property def data(self): return { 'type': self.type, 'integral': self.integral, 'model_info': self.model_info, 'modelName': self.model_name, 'serialNo': self.code, 'created_at': self.created_at, } class SaleclerkSubmitLogInfo(BaseModelMixin): brand_pk = models.IntegerField(_(u'brand_pk'), default=0, help_text=u'品牌PK', db_index=True) brand_name = models.CharField(_(u'brand_name'), max_length=255, blank=True, null=True, help_text=u'品牌名称') model_pk = models.IntegerField(_(u'model_pk'), default=0, help_text=u'型号PK', db_index=True) model_name = models.CharField(_(u'model_name'), max_length=255, blank=True, null=True, help_text=u'型号名称') model_uni_name = models.CharField(_(u'model_uni_name'), max_length=255, blank=True, null=True, help_text=u'型号统称') distributor_pk = models.IntegerField(_(u'distributor_pk'), default=0, help_text=u'经销商PK', db_index=True) distributor_id = models.CharField(_(u'distributor_id'), max_length=32, blank=True, null=True, help_text=u'经销商唯一标识', db_index=True) distributor_name = models.CharField(_(u'distributor_name'), max_length=32, blank=True, null=True, help_text=u'经销商名称') clerk_id = models.CharField(_(u'clerk_id'), max_length=32, blank=True, null=True, help_text=u'店员唯一标识', db_index=True) clerk_name = models.CharField(_(u'clerk_name'), max_length=32, blank=True, null=True, help_text=u'店员名称') code = models.CharField(_(u'code'), max_length=32, blank=True, null=True, help_text=u'机身码', db_index=True) consumer_name = models.CharField(_(u'consumer_name'), max_length=32, blank=True, null=True, help_text=u'消费者姓名') consumer_phone = models.CharField(_(u'consumer_phone'), max_length=32, blank=True, null=True, help_text=u'消费者手机号') lat = models.FloatField(_(u'lat'), default=1.0, help_text=u'纬度') lon = models.FloatField(_(u'lon'), default=1.0, help_text=u'经度') image = models.FileField(_(u'image'), upload_to=upload_path, max_length=255, blank=True, null=True, help_text=u'图片') code_image = models.FileField(_(u'code_image'), upload_to=upload_path, max_length=255, blank=True, null=True, help_text=u'序列号图片') has_scan = models.BooleanField(_(u'has_scan'), default=False, help_text=u'是否被消费者扫过') remark = models.CharField(_(u'remark'), max_length=255, blank=True, null=True, help_text=u'备注') dupload = models.BooleanField(_(u'dupload'), default=False, help_text=u'是否为重复提交') test_user = models.BooleanField(_(u'test_user'), default=False, help_text=u'是否为测试用户') test_sn = models.BooleanField(_(u'test_sn'), default=False, help_text=u'是否为测试序列号') ym = models.IntegerField(_(u'ym'), default=0, help_text=u'年月', db_index=True) # 例:201712, tc.local_string(format='%Y%m') ymd = models.IntegerField(_(u'ymd'), default=0, help_text=u'年月日', db_index=True) # 例:20171208, tc.local_string(format='%Y%m%d') trackingNo = models.CharField(_(u'trackingNo'), max_length=32, blank=True, null=True, help_text=u'快递单号') is_wxwork = models.BooleanField(_(u'is_wxwork'), default=False, help_text=u'是否为企业微信端') is_staff_delete = models.BooleanField(_(u'is_staff_delete'), default=False, help_text=u'是否管理员删除') code_version = models.IntegerField(_(u'code_version'), default=1, help_text=u'统览码版本', db_index=True) is_upload_qiniu = models.BooleanField(_(u'is_upload_qiniu'), default=False, help_text=u'是否已上传七牛') class Meta: verbose_name = _(u'销售员扫码出库记录') verbose_name_plural = _(u'销售员扫码出库记录') def __unicode__(self): return '%d' % self.pk @property def image_path(self): return upload_file_path(self.image) @property def image_url(self): return qiniu_file_url(self.image.name, bucket='tamron') if self.is_upload_qiniu else upload_file_url(self.image) @property def code_image_path(self): return upload_file_path(self.code_image) @property def code_image_url(self): return qiniu_file_url(self.code_image.name, bucket='tamron') if self.is_upload_qiniu else upload_file_url(self.code_image) @property def admindata(self): try: distributor = DistributorInfo.objects.get(distributor_id=self.distributor_id) except DistributorInfo.DoesNotExist: distributor = None if distributor: try: sr = SalesResponsibilityInfo.objects.get(sr_id=distributor.sr_id) except SalesResponsibilityInfo.DoesNotExist: sr = None else: sr = None if sr: office = distributor.office sr_name = sr.name else: office = '' sr_name = '' return { 'pk': self.pk, 'model_name': self.model_name, 'model_uni_name': self.model_uni_name, 'code': self.code, 'trackingNo': self.trackingNo, 'is_staff_delete': self.is_staff_delete, 'code_version': self.code_version, 'clerk_name': self.clerk_name, 'distributor_id': self.distributor_id, 'distributor_name': self.distributor_name, 'office': office, 'sr_name': sr_name, 'remark': self.remark, 'dupload': self.dupload, 'has_scan': self.has_scan, 'image': self.image_url, 'code_image': self.code_image_url, 'created_at': tc.local_string(utc_dt=self.created_at), }