Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
bf3dd8b083
|
@ -250,7 +250,7 @@ export const asyncRoutes = [
|
||||||
path: 'firstCheck',
|
path: 'firstCheck',
|
||||||
name: 'firstCheck',
|
name: 'firstCheck',
|
||||||
component: () => import('@/views/wpm/firstCheck'),
|
component: () => import('@/views/wpm/firstCheck'),
|
||||||
meta: { title: '首件确认', icon: 'finishedCheck', perms: ['wpm_firstCheck'] }
|
meta: { title: '首件确认', icon: 'finishedCheck', perms: ['wpm_firstCheck'] ,noCache: true}
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
|
@ -121,6 +121,10 @@
|
||||||
bottomLeft,
|
bottomLeft,
|
||||||
bottomRight
|
bottomRight
|
||||||
},
|
},
|
||||||
|
created(){
|
||||||
|
window.open('http://49.232.14.174:2222/#/index');
|
||||||
|
this.$router.go(-1)
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.timeFn();
|
this.timeFn();
|
||||||
this.cancelLoading();
|
this.cancelLoading();
|
||||||
|
|
|
@ -86,10 +86,10 @@
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="perm.name" placeholder="名称" />
|
<el-input v-model="perm.name" placeholder="名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="代号" prop="method">
|
<el-form-item label="代号">
|
||||||
<el-input v-model="perm.method" placeholder="代号" />
|
<el-input v-model="perm.method" placeholder="代号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="父级" prop="parent">
|
<el-form-item label="父级">
|
||||||
<treeselect
|
<treeselect
|
||||||
v-model="perm.parent"
|
v-model="perm.parent"
|
||||||
:multiple="false"
|
:multiple="false"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-refresh-left"
|
icon="el-icon-refresh-left"
|
||||||
@click="resetFilter"
|
@click="resetFilter1"
|
||||||
>重置
|
>重置
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -90,7 +90,6 @@
|
||||||
:limit.sync="listQuery.page_size"
|
:limit.sync="listQuery.page_size"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<el-dialog title="半成品报废" :close-on-click-modal="false" :visible.sync="dialogFormVisiblebcp">
|
<el-dialog title="半成品报废" :close-on-click-modal="false" :visible.sync="dialogFormVisiblebcp">
|
||||||
<el-form :model="formbcp">
|
<el-form :model="formbcp">
|
||||||
<el-form-item label="甩片原因" :label-width="formLabelWidth">
|
<el-form-item label="甩片原因" :label-width="formLabelWidth">
|
||||||
|
@ -400,12 +399,9 @@
|
||||||
v-el-height-adaptive-table="{bottomOffset: 50}"
|
v-el-height-adaptive-table="{bottomOffset: 50}"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50"/>
|
<el-table-column type="index" width="50"/>
|
||||||
|
|
||||||
|
|
||||||
<el-table-column label="半成品名称">
|
<el-table-column label="半成品名称">
|
||||||
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
|
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="半成品编号">
|
<el-table-column label="半成品编号">
|
||||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -423,20 +419,19 @@
|
||||||
<el-table-column label="所在子工序" :filters="[{ text: '切割', value: '切割' },{ text: '磨边', value: '磨边' },
|
<el-table-column label="所在子工序" :filters="[{ text: '切割', value: '切割' },{ text: '磨边', value: '磨边' },
|
||||||
{ text: '清洗', value: '清洗' }, { text: '热弯成型', value: '热弯成型' },{ text: '化学钢化', value: '化学钢化' },
|
{ text: '清洗', value: '清洗' }, { text: '热弯成型', value: '热弯成型' },{ text: '化学钢化', value: '化学钢化' },
|
||||||
{ text: '镀膜', value: '镀膜' }, { text: '断膜', value: '断膜' },{ text: '汇流条制备', value: '汇流条制备' },
|
{ text: '镀膜', value: '镀膜' }, { text: '断膜', value: '断膜' },{ text: '汇流条制备', value: '汇流条制备' },
|
||||||
{ text: '夹层', value: '夹层' }, { text: '包边', value: '包边' }]"
|
{ text: '夹层', value: '夹层' }, { text: '包边', value: '包边' }]" :filter-method="filterTag">
|
||||||
:filter-method="filterTag">
|
|
||||||
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
|
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作" width="220px">
|
<el-table-column align="center" label="操作" width="220px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['warehouse_update'])"
|
v-if="scope.row.test===null"
|
||||||
@click="handleInspection(scope)"
|
@click="handleInspection(scope,'3')"
|
||||||
>检验
|
>检验
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="scope.row.test!==null"
|
v-if="scope.row.test!==null"
|
||||||
@click="checkRecord(scope,'1')"
|
@click="checkRecord(scope,'3')"
|
||||||
>检验记录
|
>检验记录
|
||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
|
@ -624,7 +619,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
<el-button @click="limitedCheckRecord = false">取 消</el-button>
|
||||||
<el-button type="primary" @click="putin">确 定</el-button>
|
<el-button type="primary" @click="putin">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -946,24 +941,15 @@
|
||||||
handleClick(tab) {
|
handleClick(tab) {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
this.listQuery.type = tab.name;
|
this.listQuery.type = tab.name;
|
||||||
if(tab.name==1)
|
if (tab.name == 1) {
|
||||||
{
|
|
||||||
this.getList();
|
this.getList();
|
||||||
}
|
} else if (tab.name == 2) {
|
||||||
else if(tab.name==2)
|
|
||||||
{
|
|
||||||
this.getList2();
|
this.getList2();
|
||||||
}
|
} else if (tab.name == 3) {
|
||||||
else if(tab.name==3)
|
|
||||||
{
|
|
||||||
this.getList1();
|
this.getList1();
|
||||||
}
|
} else if (tab.name == 4) {
|
||||||
else if(tab.name==4)
|
|
||||||
{
|
|
||||||
this.getList4();
|
this.getList4();
|
||||||
}
|
} else if (tab.name == 5) {
|
||||||
else if(tab.name==5)
|
|
||||||
{
|
|
||||||
this.getList3();
|
this.getList3();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1204,7 +1190,11 @@
|
||||||
// this.outerVisible = true;
|
// this.outerVisible = true;
|
||||||
that.wproduct = scope.row.id;//半成品ID
|
that.wproduct = scope.row.id;//半成品ID
|
||||||
that.listQueryrecordform.material = scope.row.material;
|
that.listQueryrecordform.material = scope.row.material;
|
||||||
|
if (index === '3') {
|
||||||
|
that.listQueryrecordform.type = 40;
|
||||||
|
} else {
|
||||||
that.listQueryrecordform.type = 20;
|
that.listQueryrecordform.type = 20;
|
||||||
|
}
|
||||||
that.listQueryrecordform.enabled = true;
|
that.listQueryrecordform.enabled = true;
|
||||||
that.recordform = null;
|
that.recordform = null;
|
||||||
getrecordformList(that.listQueryrecordform).then((response) => {
|
getrecordformList(that.listQueryrecordform).then((response) => {
|
||||||
|
@ -1251,7 +1241,7 @@
|
||||||
that.recordId = scope.row.id;
|
that.recordId = scope.row.id;
|
||||||
that.recordform = scope.row.form;
|
that.recordform = scope.row.form;
|
||||||
that.formName = scope.row.form_.name;
|
that.formName = scope.row.form_.name;
|
||||||
if(that.innerIndex==='1'){//非复检
|
if (that.innerIndex !== '2') {//非复检
|
||||||
getrffieldList({form: this.recordform, enabled: true, page: 1, page_size: 100}).then((response) => {
|
getrffieldList({form: this.recordform, enabled: true, page: 1, page_size: 100}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
that.hasPicture = false;
|
that.hasPicture = false;
|
||||||
|
@ -1378,7 +1368,7 @@
|
||||||
this.outerVisible = false;
|
this.outerVisible = false;
|
||||||
that.fieldList = [];
|
that.fieldList = [];
|
||||||
if (that.recordform != "") {
|
if (that.recordform != "") {
|
||||||
if (index === '1') {//非复检
|
if (index !== '2') {//非复检
|
||||||
testInit({wproduct: that.wproduct, form: that.recordform}).then((response) => {
|
testInit({wproduct: that.wproduct, form: that.recordform}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
that.hasPicture = false;
|
that.hasPicture = false;
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
scope.row.material_.name
|
scope.row.material_.name
|
||||||
}}</template>
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="成品编号">
|
<el-table-column label="成品编号">
|
||||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -27,7 +26,6 @@
|
||||||
{{ actstate_[scope.row.act_state] }}
|
{{ actstate_[scope.row.act_state] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="所在子工序">
|
<el-table-column label="所在子工序">
|
||||||
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
|
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -59,14 +57,11 @@
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="已合格成品">
|
<el-tab-pane label="已合格成品">
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
>批量入库
|
>批量入库
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
:data="wproductList1.results"
|
:data="wproductList1.results"
|
||||||
|
@ -108,10 +103,6 @@
|
||||||
{{scope.row.to_order_.contract_.name }}
|
{{scope.row.to_order_.contract_.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-table-column align="center" label="操作" width="220px">
|
<el-table-column align="center" label="操作" width="220px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link
|
<el-link
|
||||||
|
@ -504,7 +495,7 @@ export default {
|
||||||
//调该物料对应的检查表
|
//调该物料对应的检查表
|
||||||
this.wproduct = scope.row.id; //成品ID
|
this.wproduct = scope.row.id; //成品ID
|
||||||
this.listQueryrecordform.material = scope.row.material; //
|
this.listQueryrecordform.material = scope.row.material; //
|
||||||
this.listQueryrecordform.type = 2;
|
this.listQueryrecordform.type = 40;
|
||||||
this.recordform = null;
|
this.recordform = null;
|
||||||
getrecordformList(this.listQueryrecordform).then((response) => {
|
getrecordformList(this.listQueryrecordform).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
|
|
|
@ -77,8 +77,8 @@ class StepViewSet(OptimizationMixin, CreateUpdateModelAMixin, ModelViewSet):
|
||||||
"""
|
"""
|
||||||
子工序-增删改查
|
子工序-增删改查
|
||||||
"""
|
"""
|
||||||
perms_map = {'get':'*', 'post':'step_create',
|
perms_map = {'get':'*', 'post':'process_update',
|
||||||
'put':'step_update', 'delete':'step_delete'}
|
'put':'process_update', 'delete':'process_update'}
|
||||||
queryset = Step.objects.all()
|
queryset = Step.objects.all()
|
||||||
serializer_class = StepSerializer
|
serializer_class = StepSerializer
|
||||||
search_fields = ['name', 'number']
|
search_fields = ['name', 'number']
|
||||||
|
|
|
@ -411,7 +411,7 @@ class ResourceViewSet(GenericViewSet):
|
||||||
del(half_list[0])
|
del(half_list[0])
|
||||||
return Response(res)
|
return Response(res)
|
||||||
|
|
||||||
@action(methods=['post'], detail=False, perms_map={'post':'resource_cal_equip'}, serializer_class=ResourceCalListSerializer)
|
@action(methods=['post'], detail=False, perms_map={'post':'resource_cal'}, serializer_class=ResourceCalListSerializer)
|
||||||
def cal_equip(self, request, pk=None):
|
def cal_equip(self, request, pk=None):
|
||||||
"""
|
"""
|
||||||
设备状态查看
|
设备状态查看
|
||||||
|
|
|
@ -63,7 +63,7 @@ class OrderViewSet(CreateUpdateCustomMixin, ModelViewSet):
|
||||||
return OrderCreateUpdateSerializer
|
return OrderCreateUpdateSerializer
|
||||||
return super().get_serializer_class()
|
return super().get_serializer_class()
|
||||||
|
|
||||||
@action(methods=['get'], detail=False, perms_map={'get':'order_toplan'})
|
@action(methods=['get'], detail=False, perms_map={'get':'*'})
|
||||||
def toplan(self, request, pk=None):
|
def toplan(self, request, pk=None):
|
||||||
queryset = Order.objects.filter(count__gt=F('planed_count')).order_by('-id')
|
queryset = Order.objects.filter(count__gt=F('planed_count')).order_by('-id')
|
||||||
page = self.paginate_queryset(queryset)
|
page = self.paginate_queryset(queryset)
|
||||||
|
|
|
@ -93,6 +93,7 @@ class PickSerializer(serializers.Serializer):
|
||||||
FIFOItemProduct.objects.bulk_create(mls)
|
FIFOItemProduct.objects.bulk_create(mls)
|
||||||
|
|
||||||
# 更新车间物料
|
# 更新车间物料
|
||||||
|
if i['material'].type != Material.MA_TYPE_HALFGOOD:
|
||||||
wm, _ = WMaterial.objects.get_or_create(material=i['material'], batch=i['batch'], \
|
wm, _ = WMaterial.objects.get_or_create(material=i['material'], batch=i['batch'], \
|
||||||
subproduction_plan=sp,defaults={
|
subproduction_plan=sp,defaults={
|
||||||
'material':i['material'],
|
'material':i['material'],
|
||||||
|
|
|
@ -54,6 +54,10 @@ class WpmService(object):
|
||||||
if wproduct.act_state == WProduct.WPR_ACT_STATE_TORETEST: # 复检
|
if wproduct.act_state == WProduct.WPR_ACT_STATE_TORETEST: # 复检
|
||||||
wproduct.act_state = WProduct.WPR_ACT_STATE_DOWAIT
|
wproduct.act_state = WProduct.WPR_ACT_STATE_DOWAIT
|
||||||
|
|
||||||
|
elif wproduct.act_state == WProduct.WPR_ACT_STATE_TOTEST and \
|
||||||
|
wproduct.subproduction_plan.subproduction.need_combtest : # 配置中需要质检
|
||||||
|
wproduct.act_state = WProduct.WPR_ACT_STATE_TOCOMBTEST
|
||||||
|
|
||||||
elif wproduct.act_state == WProduct.WPR_ACT_STATE_TOTEST and \
|
elif wproduct.act_state == WProduct.WPR_ACT_STATE_TOTEST and \
|
||||||
test.is_midtesting is True:
|
test.is_midtesting is True:
|
||||||
wproduct.act_state = WProduct.WPR_ACT_STATE_DOWAIT
|
wproduct.act_state = WProduct.WPR_ACT_STATE_DOWAIT
|
||||||
|
@ -62,9 +66,7 @@ class WpmService(object):
|
||||||
elif wproduct.act_state == WProduct.WPR_ACT_STATE_TOTEST and wproduct.material.type == Material.MA_TYPE_GOOD: # 成品检验
|
elif wproduct.act_state == WProduct.WPR_ACT_STATE_TOTEST and wproduct.material.type == Material.MA_TYPE_GOOD: # 成品检验
|
||||||
wproduct.act_state = WProduct.WPR_ACT_STATE_TOFINALTEST
|
wproduct.act_state = WProduct.WPR_ACT_STATE_TOFINALTEST
|
||||||
|
|
||||||
elif wproduct.act_state == WProduct.WPR_ACT_STATE_TOTEST and \
|
|
||||||
wproduct.subproduction_plan.subproduction.need_combtest : # 配置中需要质检
|
|
||||||
wproduct.act_state = WProduct.WPR_ACT_STATE_TOCOMBTEST
|
|
||||||
else:
|
else:
|
||||||
wproduct.act_state = WProduct.WPR_ACT_STATE_OK
|
wproduct.act_state = WProduct.WPR_ACT_STATE_OK
|
||||||
if wproduct.number is None: # 产生半成品编号
|
if wproduct.number is None: # 产生半成品编号
|
||||||
|
|
|
@ -141,7 +141,7 @@ class WMaterialViewSet(CreateUpdateModelAMixin, ListModelMixin, GenericViewSet):
|
||||||
ordering_fields = ['material__number']
|
ordering_fields = ['material__number']
|
||||||
ordering = ['material__number']
|
ordering = ['material__number']
|
||||||
|
|
||||||
@action(methods=['post'], detail=False, perms_map={'post': 'pick'}, serializer_class=PickSerializer)
|
@action(methods=['post'], detail=False, perms_map={'post': 'wmaterial_pick'}, serializer_class=PickSerializer)
|
||||||
def pick(self, request, pk=None):
|
def pick(self, request, pk=None):
|
||||||
"""
|
"""
|
||||||
领料
|
领料
|
||||||
|
@ -281,6 +281,8 @@ class WProductViewSet(ListModelMixin, RetrieveModelMixin, GenericViewSet):
|
||||||
ip = {}
|
ip = {}
|
||||||
ip['fifoitem'] = fifoitem
|
ip['fifoitem'] = fifoitem
|
||||||
ip['wproduct'] = i
|
ip['wproduct'] = i
|
||||||
|
if i.number is None:
|
||||||
|
raise exceptions.APIException('缺少编号')
|
||||||
ip['number'] = i.number
|
ip['number'] = i.number
|
||||||
ip['material'] = i.material
|
ip['material'] = i.material
|
||||||
ips.append(FIFOItemProduct(**ip))
|
ips.append(FIFOItemProduct(**ip))
|
||||||
|
@ -815,6 +817,7 @@ class OperationWproductViewSet(ListModelMixin, DestroyModelMixin, UpdateModelMix
|
||||||
raise exceptions.APIException('该操作已提交')
|
raise exceptions.APIException('该操作已提交')
|
||||||
instance.delete()
|
instance.delete()
|
||||||
wp = instance.wproduct
|
wp = instance.wproduct
|
||||||
|
wp.act_state = WProduct.WPR_ACT_STATE_DOWAIT
|
||||||
wp.operation = None
|
wp.operation = None
|
||||||
wp.save()
|
wp.save()
|
||||||
return Response()
|
return Response()
|
||||||
|
|
Loading…
Reference in New Issue