operation spxq
This commit is contained in:
parent
d99b375c4d
commit
07eae98390
|
@ -12,6 +12,7 @@ aspnet_client/
|
||||||
static/
|
static/
|
||||||
mysite/settings.py
|
mysite/settings.py
|
||||||
safesite/token.txt
|
safesite/token.txt
|
||||||
|
web.config
|
||||||
|
|
||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
|
BIN
requirements.txt
BIN
requirements.txt
Binary file not shown.
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 2.2.8 on 2019-12-05 17:02
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('safesite', '0294_auto_20191125_1414'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='operation',
|
||||||
|
name='issimple',
|
||||||
|
field=models.IntegerField(default=1),
|
||||||
|
),
|
||||||
|
]
|
|
@ -471,6 +471,7 @@ class Operation(models.Model):#作业表
|
||||||
zyimg = models.CharField(max_length=1000,default='')
|
zyimg = models.CharField(max_length=1000,default='')
|
||||||
zyimg2 = models.CharField(max_length=1000,default='')
|
zyimg2 = models.CharField(max_length=1000,default='')
|
||||||
deletemark = models.IntegerField(default='1')
|
deletemark = models.IntegerField(default='1')
|
||||||
|
issimple = models.IntegerField(default=1)
|
||||||
zyzt = JSONField()
|
zyzt = JSONField()
|
||||||
fxcs = models.CharField(max_length=200)
|
fxcs = models.CharField(max_length=200)
|
||||||
todouser = models.ForeignKey(User,related_name='zyclr',on_delete=models.CASCADE,null=True,blank=True)
|
todouser = models.ForeignKey(User,related_name='zyclr',on_delete=models.CASCADE,null=True,blank=True)
|
||||||
|
|
|
@ -4628,16 +4628,16 @@ def apioperation(req):
|
||||||
nextindex = obj.zyzt['index']+1
|
nextindex = obj.zyzt['index']+1
|
||||||
spruser = User.objects.get(userid=userid)
|
spruser = User.objects.get(userid=userid)
|
||||||
if oldindex == 0:
|
if oldindex == 0:
|
||||||
Operspxq.objects.create(oper=obj,jdmc=obj.zyzt['splc'][0]['jdmc'],spr=spruser,checked=1,spbm=spruser.ubelongpart)
|
|
||||||
spr1 = data['spr1'] if 'spr1' in data else None
|
spr1 = data['spr1'] if 'spr1' in data else None
|
||||||
spr2 = data['spr2'] if 'spr2' in data else None
|
spr2 = data['spr2'] if 'spr2' in data else None
|
||||||
if spr1:
|
if spr1:
|
||||||
obj.zyzt['splc'][1]['sprs'] = [spr1] #作业部门审批人
|
obj.zyzt['splc'][1]['sprs'] = [spr1] #作业部门审批人
|
||||||
if spr2:
|
if spr2:
|
||||||
obj.zyzt['splc'][2]['sprs'] = [spr2] #属地部门审批人
|
obj.zyzt['splc'][2]['sprs'] = [spr2] #属地部门审批人
|
||||||
|
Operspxq.objects.create(oper=obj,jdmc=obj.zyzt['splc'][oldindex]['jdmc'],spr=spruser,checked=1,spbm=spruser.ubelongpart)#审批该步
|
||||||
while nextindex<len(obj.zyzt['splc']):
|
while nextindex<len(obj.zyzt['splc']):
|
||||||
nextsplc = obj.zyzt['splc'][nextindex]
|
nextsplc = obj.zyzt['splc'][nextindex]
|
||||||
if userid in nextsplc['sprs']:#本人可审批直接跳过
|
if userid in nextsplc['sprs']:#本人可审批直接跳过下一步
|
||||||
Operspxq.objects.create(oper=obj,jdmc=nextsplc['jdmc'],spr=spruser,checked=1,spbm=spruser.ubelongpart)
|
Operspxq.objects.create(oper=obj,jdmc=nextsplc['jdmc'],spr=spruser,checked=1,spbm=spruser.ubelongpart)
|
||||||
else:
|
else:
|
||||||
obj.zyzt['zyzt'] = '审批中'
|
obj.zyzt['zyzt'] = '审批中'
|
||||||
|
@ -5479,7 +5479,7 @@ def apiarea(req):
|
||||||
elif a == 'add':
|
elif a == 'add':
|
||||||
data = json.loads(req.body.decode('utf-8'))
|
data = json.loads(req.body.decode('utf-8'))
|
||||||
name = data['name']
|
name = data['name']
|
||||||
if Area.objects.filter(usecomp__partid=companyid,name=name).exists():
|
if Area.objects.filter(usecomp__partid=companyid,name=name,deletemark=1).exists():
|
||||||
return JsonResponse({"code":0})
|
return JsonResponse({"code":0})
|
||||||
map = data['map']
|
map = data['map']
|
||||||
order = data['order']
|
order = data['order']
|
||||||
|
|
Loading…
Reference in New Issue