From 6f6707c0242890d1f99fda3cb0aa50095ecbdf14 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 1 Mar 2022 13:21:01 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E9=A2=86=E6=96=99=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=BD=A6=E9=97=B4=E7=89=A9=E6=96=99=E6=97=B6=E5=8F=AA=E5=A4=84?= =?UTF-8?q?=E7=90=86=E7=89=A9=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_server/apps/mtm/views.py | 4 ++-- hb_server/apps/wpm/serializers.py | 19 ++++++++++--------- hb_server/apps/wpm/views.py | 2 ++ 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/hb_server/apps/mtm/views.py b/hb_server/apps/mtm/views.py index 4a972cf..2862a39 100644 --- a/hb_server/apps/mtm/views.py +++ b/hb_server/apps/mtm/views.py @@ -77,8 +77,8 @@ class StepViewSet(OptimizationMixin, CreateUpdateModelAMixin, ModelViewSet): """ 子工序-增删改查 """ - perms_map = {'get':'*', 'post':'step_create', - 'put':'step_update', 'delete':'step_delete'} + perms_map = {'get':'*', 'post':'process_update', + 'put':'process_update', 'delete':'process_update'} queryset = Step.objects.all() serializer_class = StepSerializer search_fields = ['name', 'number'] diff --git a/hb_server/apps/wpm/serializers.py b/hb_server/apps/wpm/serializers.py index 61ae4b5..79b4234 100644 --- a/hb_server/apps/wpm/serializers.py +++ b/hb_server/apps/wpm/serializers.py @@ -93,15 +93,16 @@ class PickSerializer(serializers.Serializer): FIFOItemProduct.objects.bulk_create(mls) # 更新车间物料 - wm, _ = WMaterial.objects.get_or_create(material=i['material'], batch=i['batch'], \ - subproduction_plan=sp,defaults={ - 'material':i['material'], - 'batch':i['batch'], - 'subproduction_plan':sp, - 'count':0 - }) - wm.count = wm.count + i['count'] - wm.save() + if i['material'].type != Material.MA_TYPE_HALFGOOD: + wm, _ = WMaterial.objects.get_or_create(material=i['material'], batch=i['batch'], \ + subproduction_plan=sp,defaults={ + 'material':i['material'], + 'batch':i['batch'], + 'subproduction_plan':sp, + 'count':0 + }) + wm.count = wm.count + i['count'] + wm.save() # 更新子计划物料情况 spp = SubProductionProgress.objects.get(material=i['material'], subproduction_plan=sp, type=SubprodctionMaterial.SUB_MA_TYPE_IN) spp.count_pick = spp.count_pick + i['count'] diff --git a/hb_server/apps/wpm/views.py b/hb_server/apps/wpm/views.py index 59a4086..d7b1480 100644 --- a/hb_server/apps/wpm/views.py +++ b/hb_server/apps/wpm/views.py @@ -281,6 +281,8 @@ class WProductViewSet(ListModelMixin, RetrieveModelMixin, GenericViewSet): ip = {} ip['fifoitem'] = fifoitem ip['wproduct'] = i + if i.number is None: + raise exceptions.APIException('缺少编号') ip['number'] = i.number ip['material'] = i.material ips.append(FIFOItemProduct(**ip)) From 94bfe4b47adff87bf2a3564e871568273b08a06a Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 1 Mar 2022 13:58:46 +0800 Subject: [PATCH 2/7] bigScreenOpenBlank --- hb_client/src/router/index.js | 2 +- hb_client/src/views/bigScreen/index.vue | 4 ++++ hb_client/src/views/system/perm.vue | 4 ++-- hb_client/src/views/wpm/need.vue | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hb_client/src/router/index.js b/hb_client/src/router/index.js index 4147e89..4aa2481 100644 --- a/hb_client/src/router/index.js +++ b/hb_client/src/router/index.js @@ -250,7 +250,7 @@ export const asyncRoutes = [ path: 'firstCheck', name: 'firstCheck', component: () => import('@/views/wpm/firstCheck'), - meta: { title: '首件确认', icon: 'finishedCheck', perms: ['wpm_firstCheck'] } + meta: { title: '首件确认', icon: 'finishedCheck', perms: ['wpm_firstCheck'] ,noCache: true} } ] diff --git a/hb_client/src/views/bigScreen/index.vue b/hb_client/src/views/bigScreen/index.vue index 2a0fcf1..d78a676 100644 --- a/hb_client/src/views/bigScreen/index.vue +++ b/hb_client/src/views/bigScreen/index.vue @@ -121,6 +121,10 @@ bottomLeft, bottomRight }, + created(){ + window.open('http://49.232.14.174:2222/#/index'); + this.$router.go(-1) + }, mounted() { this.timeFn(); this.cancelLoading(); diff --git a/hb_client/src/views/system/perm.vue b/hb_client/src/views/system/perm.vue index 8b474e0..7aaae2f 100644 --- a/hb_client/src/views/system/perm.vue +++ b/hb_client/src/views/system/perm.vue @@ -86,10 +86,10 @@ - + - + From efd5c828537dbbea14c2bbd506e79ed417064218 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 1 Mar 2022 14:01:57 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E8=BD=A6=E9=97=B4=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=8D=8A=E6=88=90=E5=93=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_server/apps/pm/views.py | 2 +- hb_server/apps/sam/views.py | 2 +- hb_server/apps/wpm/views.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hb_server/apps/pm/views.py b/hb_server/apps/pm/views.py index 4257e9f..c827e5d 100644 --- a/hb_server/apps/pm/views.py +++ b/hb_server/apps/pm/views.py @@ -411,7 +411,7 @@ class ResourceViewSet(GenericViewSet): del(half_list[0]) 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): """ 设备状态查看 diff --git a/hb_server/apps/sam/views.py b/hb_server/apps/sam/views.py index da60306..95200e2 100644 --- a/hb_server/apps/sam/views.py +++ b/hb_server/apps/sam/views.py @@ -63,7 +63,7 @@ class OrderViewSet(CreateUpdateCustomMixin, ModelViewSet): return OrderCreateUpdateSerializer 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): queryset = Order.objects.filter(count__gt=F('planed_count')).order_by('-id') page = self.paginate_queryset(queryset) diff --git a/hb_server/apps/wpm/views.py b/hb_server/apps/wpm/views.py index d7b1480..9bbb3c4 100644 --- a/hb_server/apps/wpm/views.py +++ b/hb_server/apps/wpm/views.py @@ -141,7 +141,7 @@ class WMaterialViewSet(CreateUpdateModelAMixin, ListModelMixin, GenericViewSet): ordering_fields = ['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): """ 领料 @@ -817,6 +817,7 @@ class OperationWproductViewSet(ListModelMixin, DestroyModelMixin, UpdateModelMix raise exceptions.APIException('该操作已提交') instance.delete() wp = instance.wproduct + wp.state = WProduct.WPR_ACT_STATE_DOWAIT wp.operation = None wp.save() return Response() From 8eea8e956ec1ba34e3b1467126dfe0415e1b947f Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 1 Mar 2022 14:21:42 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=A4=B9=E5=B1=82=E5=90=8E=E6=A3=80?= =?UTF-8?q?=E9=AA=8Cbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_server/apps/wpm/services.py | 8 +++++--- hb_server/apps/wpm/views.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hb_server/apps/wpm/services.py b/hb_server/apps/wpm/services.py index f836273..36db321 100644 --- a/hb_server/apps/wpm/services.py +++ b/hb_server/apps/wpm/services.py @@ -54,6 +54,10 @@ class WpmService(object): if wproduct.act_state == WProduct.WPR_ACT_STATE_TORETEST: # 复检 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 \ test.is_midtesting is True: 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: # 成品检验 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: wproduct.act_state = WProduct.WPR_ACT_STATE_OK if wproduct.number is None: # 产生半成品编号 diff --git a/hb_server/apps/wpm/views.py b/hb_server/apps/wpm/views.py index 9bbb3c4..b2e6c3e 100644 --- a/hb_server/apps/wpm/views.py +++ b/hb_server/apps/wpm/views.py @@ -817,7 +817,7 @@ class OperationWproductViewSet(ListModelMixin, DestroyModelMixin, UpdateModelMix raise exceptions.APIException('该操作已提交') instance.delete() wp = instance.wproduct - wp.state = WProduct.WPR_ACT_STATE_DOWAIT + wp.act_state = WProduct.WPR_ACT_STATE_DOWAIT wp.operation = None wp.save() return Response() From 51030dc9974d417485de349a51cd3dc12f8850d7 Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 1 Mar 2022 14:43:13 +0800 Subject: [PATCH 5/7] jiacengbanchengpinjianyan --- hb_client/src/views/wpm/need.vue | 326 +++++++++++++++---------------- 1 file changed, 158 insertions(+), 168 deletions(-) diff --git a/hb_client/src/views/wpm/need.vue b/hb_client/src/views/wpm/need.vue index f85c028..9609745 100644 --- a/hb_client/src/views/wpm/need.vue +++ b/hb_client/src/views/wpm/need.vue @@ -1,38 +1,38 @@ - + + :filter-method="filterTag"> @@ -206,37 +205,37 @@ 批量入库 - - 搜索 - - 重置 - + + 搜索 + + 重置 + - + @@ -259,15 +258,15 @@ {{ actstate_[scope.row.act_state] }} - + + :filter-method="filterTag"> @@ -297,36 +296,36 @@ - - 搜索 - - 重置 - + + 搜索 + + 重置 + @@ -341,14 +340,14 @@ {{ actstate_[scope.row.act_state] }} - + + :filter-method="filterTag"> @@ -356,7 +355,7 @@ {{ ng_sign_[scope.row.ng_sign] }} - + @@ -390,26 +389,23 @@ - - - - + @@ -417,26 +413,25 @@ {{ actstate_[scope.row.act_state] }} - + - + { text: '夹层', value: '夹层' }, { text: '包边', value: '包边' }]" :filter-method="filterTag"> @@ -779,8 +774,8 @@ import checkPermission from "@/utils/permission"; import customForm from '@/components/customForm/index'; import reviewForm from '@/components/customForm/review'; - import { createTicket, getWorkflowInit} from "@/api/workflow"; - import { getrecordformList, getrffieldList} from "@/api/mtm"; + import {createTicket, getWorkflowInit} from "@/api/workflow"; + import {getrecordformList, getrffieldList} from "@/api/mtm"; import {getwproductList, wproductPutin, createputins, testInit, scrap, getRetrial} from "@/api/wpm"; import {getTestRecord, getTestRecordItem, putTestRecordItem, delTestRecordItem, subTestRecordItem} from "@/api/qm"; // import {genTree} from "@/utils"; @@ -829,7 +824,7 @@ page: 1, page_size: 20, }, - activeName: "1", + activeName: "1", create_by_: '', update_time: '', formLabelWidth: '', @@ -943,30 +938,21 @@ }, methods: { checkPermission, - handleClick(tab) { + handleClick(tab) { this.listLoading = true; this.listQuery.type = tab.name; - if(tab.name==1) - { - this.getList(); + if (tab.name == 1) { + this.getList(); + } else if (tab.name == 2) { + this.getList2(); + } else if (tab.name == 3) { + this.getList1(); + } else if (tab.name == 4) { + this.getList4(); + } else if (tab.name == 5) { + this.getList3(); } - else if(tab.name==2) - { - this.getList2(); - } - else if(tab.name==3) - { - this.getList1(); - } - else if(tab.name==4) - { - this.getList4(); - } - else if(tab.name==5) - { - this.getList3(); - } - + }, //待检半成品列表 getList() { @@ -979,12 +965,12 @@ this.listLoading = false; }); }, - handleFilter1() { + handleFilter1() { this.listQuery.page = 1; this.getList(); }, resetFilter1() { - + this.listQuery = { page: 1, page_size: 20, @@ -1019,12 +1005,12 @@ } }); }, - handleFilter2() { + handleFilter2() { this.listQuery2.page = 1; this.getList2(); }, resetFilter2() { - + this.listQuery2 = { page: 1, page_size: 20, @@ -1042,12 +1028,12 @@ }); }, - handleFilter3() { + handleFilter3() { this.listQuery1.page = 1; this.getList1(); }, resetFilter3() { - + this.listQuery1 = { page: 1, page_size: 20, @@ -1065,12 +1051,12 @@ }); }, - handleFilter4() { + handleFilter4() { this.listQuery4.page = 1; this.getList4(); }, resetFilter4() { - + this.listQuery4 = { page: 1, page_size: 20, @@ -1152,7 +1138,7 @@ }); }, //筛选 - filterTag(value, row) { + filterTag(value, row) { return row.step_.name === value; }, //夹层半成品列表 @@ -1204,7 +1190,11 @@ // this.outerVisible = true; that.wproduct = scope.row.id;//半成品ID that.listQueryrecordform.material = scope.row.material; - that.listQueryrecordform.type = 20; + if (index === '3') { + that.listQueryrecordform.type = 40; + } else { + that.listQueryrecordform.type = 20; + } that.listQueryrecordform.enabled = true; that.recordform = null; getrecordformList(that.listQueryrecordform).then((response) => { @@ -1251,8 +1241,8 @@ that.recordId = scope.row.id; that.recordform = scope.row.form; that.formName = scope.row.form_.name; - if(that.innerIndex==='1'){//非复检 - getrffieldList({form: this.recordform,enabled:true, page: 1, page_size: 100}).then((response) => { + if (that.innerIndex === '1') {//非复检 + getrffieldList({form: this.recordform, enabled: true, page: 1, page_size: 100}).then((response) => { if (response.data) { that.hasPicture = false; let fieldList = response.data.results; @@ -1378,7 +1368,7 @@ this.outerVisible = false; that.fieldList = []; if (that.recordform != "") { - if (index === '1') {//非复检 + if (index !== '2') {//非复检 testInit({wproduct: that.wproduct, form: that.recordform}).then((response) => { if (response.data) { that.hasPicture = false; From d6fcc6c88bd5c939631d29eb73277a97ad944115 Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 1 Mar 2022 14:46:13 +0800 Subject: [PATCH 6/7] jiacengbanchengpinjianyan --- hb_client/src/views/wpm/need.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hb_client/src/views/wpm/need.vue b/hb_client/src/views/wpm/need.vue index 9609745..004125d 100644 --- a/hb_client/src/views/wpm/need.vue +++ b/hb_client/src/views/wpm/need.vue @@ -1241,7 +1241,7 @@ that.recordId = scope.row.id; that.recordform = scope.row.form; 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) => { if (response.data) { that.hasPicture = false; From 7a1a1111ff1bcf8386c60cc04a8dfac97d89c84b Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 1 Mar 2022 15:00:44 +0800 Subject: [PATCH 7/7] chengpinjinayan --- hb_client/src/views/wpm/productjy.vue | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/hb_client/src/views/wpm/productjy.vue b/hb_client/src/views/wpm/productjy.vue index d376eb6..14f37b0 100644 --- a/hb_client/src/views/wpm/productjy.vue +++ b/hb_client/src/views/wpm/productjy.vue @@ -18,7 +18,6 @@ scope.row.material_.name }} - @@ -27,7 +26,6 @@ {{ actstate_[scope.row.act_state] }} - @@ -59,14 +57,11 @@ /> - 批量入库 - - - - - -