流程卡1
This commit is contained in:
parent
2b0bd78686
commit
63ddab4942
|
@ -0,0 +1,3 @@
|
|||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
|
@ -0,0 +1,7 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class MnsConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'apps.mns'
|
||||
verbose_name = '消息通知系统'
|
|
@ -0,0 +1,6 @@
|
|||
from django.db import models
|
||||
from utils.model import BaseModel
|
||||
# Create your models here.
|
||||
|
||||
class Notify(BaseModel)
|
||||
pass
|
|
@ -0,0 +1,3 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
|
@ -0,0 +1,3 @@
|
|||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
|
@ -460,7 +460,16 @@ class WProductViewSet(ListModelMixin, RetrieveModelMixin, GenericViewSet):
|
|||
流程卡
|
||||
"""
|
||||
obj = self.get_object()
|
||||
return Response(WProductCardSerializer(instance=obj).data)
|
||||
card_data = WProductCardSerializer(instance=obj).data
|
||||
ret = []
|
||||
if card_data['parents']:
|
||||
pass
|
||||
else:
|
||||
ret.append(['序号', '工序', card_data['number']])
|
||||
step_list_full = card_data['step_list_full']
|
||||
for index, item in enumerate(step_list_full):
|
||||
ret.append([str(index+1), item['step_name'], item['actions']])
|
||||
return Response(ret)
|
||||
|
||||
class WproductTicketViewSet(ListModelMixin, GenericViewSet):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue