提交 4b996ee8 authored 作者: Chris Harris's avatar Chris Harris

sync: 同步服务器代码 12-13 14:27:58

上级 b1cc380c
......@@ -65,6 +65,9 @@ class Apply_Codes(models.Model):
product = models.ForeignKey('product.Product', verbose_name=_(
'产品名称'), on_delete=models.SET_NULL, blank=True, null=True)
package_id = models.SmallIntegerField(_('包装单位ID'), default=1)
label_id = models.BigIntegerField(_('标签ID'), db_index=True,null=True,blank=True)
label_pk_id = models.BigIntegerField(_('标签PKID'), db_index=True, null=True,blank=True)
dt = models.DateField(_('生成日期'),auto_now_add=True, blank=True, null=True, db_index=True)
class Meta:
verbose_name = _('宴会申请标签序号')
......
......@@ -244,8 +244,6 @@ def ajaxBanquetApply(request):
code = codes[i]['code']
product_id = codes[i]['product_id']
package_id = codes[i]['package_id']
label_id = codes[i]['label_id']
label_pk_id = codes[i]['label_pk_id']
needAdd = True
......@@ -266,9 +264,7 @@ def ajaxBanquetApply(request):
apply=apply,
code=code,
product_id=product_id,
package_id=package_id,
label_id=label_id,
label_pk_id=label_pk_id
package_id=package_id
)
ac.save()
......@@ -469,7 +465,7 @@ def ajaxBanquetDetail(request):
sWhere=f" where apply_id = {id}"
cur.execute("select id,(select name from product_product where id = product_id),product_id,code,package_id,label_id,label_pk_id from banquet_apply_codes "+sWhere)
cur.execute("select id,(select name from product_product where id = product_id),product_id,code,package_id from banquet_apply_codes "+sWhere)
rs = cur.fetchall()
codes = []
for r in rs:
......@@ -484,9 +480,7 @@ def ajaxBanquetDetail(request):
'product_id':r[2],
'code':r[3],
'package':pkg,
'package_id':r[4],
'label_id': r[5],
'label_pk_id': r[6]
'package_id':r[4]
})
res['detail']['codes'] = codes
......
......@@ -5,6 +5,7 @@ from .models import *
from product.models import Product,Series
from django.utils.translation import gettext_lazy as _
class StoreForm(ModelForm):
class Meta:
model = Storehouse
......@@ -415,12 +416,7 @@ class News_Form(ModelForm):
model=News
fields = ['news_from','subtitle','desc','poster','content','is_active','remark','pub_date']
def __init__(self, *args, **kwargs):
super(News_Form, self).__init__(*args, **kwargs)
self.fields['subtitle'].widget.attrs['placeholder'] = '必填'
self.fields['content'].widget.attrs['placeholder'] = '必填'
self.fields['desc'].widget.attrs['placeholder'] = '必填'
self.fields['news_from'].widget.attrs['placeholder'] = '必填'
#2021-02-24
......@@ -501,15 +497,6 @@ class Company_UploadFiles_Form(ModelForm):
self.fields['category'].queryset = FileCategory.objects.all()
class BonusPoints_Form(ModelForm):
class Meta:
model=BonusPoints
fields = ['points','remark']
def __init__(self, *args, **kwargs):
self._user = kwargs.pop('user')
super(BonusPoints_Form, self).__init__(*args, **kwargs)
self.fields['points'].queryset = BonusPoints.objects.filter(company_id=self._user.company.id)
......@@ -2056,8 +2056,8 @@ class BonusPointsLog(models.Model):
# 启用事务,将当前变化值实时反映到BonusPoints用户积分
self_points = models.DecimalField(_('确认收货方积分值'), max_digits=12, decimal_places=2, blank=True, null=True)
parent_points = models.JSONField(_('经济发货方积分值'), default=list, blank=True, null=True)
parent_points = models.JSONField(_('经济发货方积分值'), default=list, blank=True, null=True)
dt=models.DateField(_('日期'),auto_now_add=True,db_index=True)
tm=models.DateTimeField(_('时间'),auto_now_add=True)
remark=models.CharField(_('备注说明'),max_length=100,blank=True,null=True)
......@@ -2122,4 +2122,4 @@ class PointsRedeemed(models.Model):
class Meta:
verbose_name=_('积分兑换')
verbose_name_plural=_('积分兑换')
\ No newline at end of file
verbose_name_plural=_('积分兑换')
This source diff could not be displayed because it is too large. You can view the blob instead.
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论