采购入库bug
This commit is contained in:
parent
f7df60e7b5
commit
1d7faaa34e
|
@ -7,6 +7,7 @@ from apps.inm.models import WareHouse,Inventory
|
|||
from apps.inm.serializers import FIFOInPurSerializer, WareHouseSerializer, WareHouseCreateUpdateSerializer,InventorySerializer
|
||||
from apps.system.mixins import CreateUpdateModelAMixin, OptimizationMixin
|
||||
from rest_framework.decorators import action
|
||||
from rest_framework.response import Response
|
||||
|
||||
# Create your views here.
|
||||
class WarehouseViewSet(CreateUpdateModelAMixin, ModelViewSet):
|
||||
|
@ -51,4 +52,5 @@ class FIFOViewSet(GenericViewSet):
|
|||
serializer = self.get_serializer(data=request.data)
|
||||
serializer.is_valid(raise_exception=True)
|
||||
serializer.save(create_by=request.user)
|
||||
return Response()
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 3.2.6 on 2021-10-28 06:47
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pm', '0007_auto_20211025_1533'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='subproductionprogress',
|
||||
name='count_current',
|
||||
field=models.IntegerField(default=0, verbose_name='当前数量'),
|
||||
),
|
||||
]
|
|
@ -1,3 +1,4 @@
|
|||
from io import open_code
|
||||
from apps.system.models import CommonAModel, Organization
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import AbstractUser
|
||||
|
|
|
@ -137,7 +137,7 @@ class SubProductionPlanViewSet(CreateUpdateModelAMixin, ListModelMixin, UpdateMo
|
|||
return Response()
|
||||
raise APIException('计划状态有误')
|
||||
|
||||
@action(methods=['get'], detail=True, perms_map={'get':'*'}, serializer_class=serializers.Serializer)
|
||||
@action(methods=['post'], detail=True, perms_map={'post':'*'}, serializer_class=serializers.Serializer)
|
||||
def pick_need(self, request, pk=None):
|
||||
"""
|
||||
领料需求清单
|
||||
|
@ -147,6 +147,7 @@ class SubProductionPlanViewSet(CreateUpdateModelAMixin, ListModelMixin, UpdateMo
|
|||
serializer = SubProductionProgressSerializer(instance=instance, many=True)
|
||||
return Response(serializer.data)
|
||||
|
||||
|
||||
class ResourceViewSet(GenericViewSet):
|
||||
|
||||
perms_map = {'*': '*'}
|
||||
|
|
|
@ -8,10 +8,6 @@ from utils.model import SoftModel, BaseModel
|
|||
from simple_history.models import HistoricalRecords
|
||||
from apps.mtm.models import Material, Step, RecordForm
|
||||
|
||||
class WorkshopInm():
|
||||
"""
|
||||
车间库存
|
||||
"""
|
||||
class Product(CommonAModel):
|
||||
"""
|
||||
产品(所有生产过程中出现过的)
|
||||
|
|
|
@ -2,3 +2,5 @@ from rest_framework import serializers
|
|||
from rest_framework.serializers import ModelSerializer
|
||||
|
||||
|
||||
class PickSerializer(serializers.Serializer):
|
||||
pass
|
|
@ -1,6 +1,12 @@
|
|||
from django.shortcuts import render
|
||||
from rest_framework.viewsets import ModelViewSet
|
||||
from rest_framework.generics import CreateAPIView, GenericAPIView
|
||||
from rest_framework.viewsets import GenericViewSet, ModelViewSet
|
||||
|
||||
from apps.system.mixins import CreateUpdateModelAMixin, OptimizationMixin
|
||||
|
||||
# Create your views here.
|
||||
class WpmPickView(CreateUpdateModelAMixin, CreateAPIView):
|
||||
"""
|
||||
领料
|
||||
"""
|
||||
pass
|
Loading…
Reference in New Issue