From 08dc30c65990f64aed11fbc54aded40311a6e638 Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 10 Feb 2022 16:35:13 +0800 Subject: [PATCH 1/2] dumoCheck --- hb_client/src/api/mtm.js | 7 + hb_client/src/components/customForm/index.vue | 8 +- .../src/components/customForm/review.vue | 3 +- hb_client/src/views/mtm/productprocess.vue | 2451 ++++++++--------- hb_client/src/views/wpm/need.vue | 4 +- 5 files changed, 1230 insertions(+), 1243 deletions(-) diff --git a/hb_client/src/api/mtm.js b/hb_client/src/api/mtm.js index bac34b9..e1adb34 100644 --- a/hb_client/src/api/mtm.js +++ b/hb_client/src/api/mtm.js @@ -272,6 +272,13 @@ export function createUsedstep(data) { data }) } +export function updateUsedstep(id,data) { + return request({ + url: `/mtm/usedstep/${id}/`, + method: 'put', + data + }) +} export function deleteUsedstep(id, data) { return request({ url: `/mtm/usedstep/${id}/`, diff --git a/hb_client/src/components/customForm/index.vue b/hb_client/src/components/customForm/index.vue index fc336cf..961af55 100644 --- a/hb_client/src/components/customForm/index.vue +++ b/hb_client/src/components/customForm/index.vue @@ -196,10 +196,6 @@ isDisabled:{ type:Boolean, default:false - }, - isMidTesting:{ - type:Boolean, - default:false } }, mounted() { @@ -235,13 +231,11 @@ let listJudge = this.formData.filter(item => { return item.need_judge === true; }); - debugger; listJudge.forEach(item => { let obj = new Object(); obj = item; that.judgeList.push(obj) }); - debugger; let imag= this.formData.filter(item => { return item.field_type === 'draw'; }); @@ -727,7 +721,7 @@ that.testrecord.record_data = that.field;//检查项列表 that.testrecord.is_testok = that.is_testok;//检查表检查结果 that.testrecord.id = that.recordId;//记录id - if(submit&&that.isMidTesting!==true){//提交 + if(submit){//提交 this.$emit('recordSubmit',that.testrecord); }else {//保存 this.$emit('recordSave',that.testrecord); diff --git a/hb_client/src/components/customForm/review.vue b/hb_client/src/components/customForm/review.vue index dd598af..91cc206 100644 --- a/hb_client/src/components/customForm/review.vue +++ b/hb_client/src/components/customForm/review.vue @@ -818,7 +818,8 @@ that.testrecord.is_testok = that.is_testok;//检查表检查结果 that.testrecord.id = that.recordId; // debugger; - if(submit&&that.isMidTesting!==true){//提交 + // if(submit&&that.isMidTesting!==true){//提交 + if(submit){//提交 this.$emit('recordSubmit',that.testrecord); }else {//保存 this.$emit('recordSave',that.testrecord); diff --git a/hb_client/src/views/mtm/productprocess.vue b/hb_client/src/views/mtm/productprocess.vue index 5c7811f..02184bb 100644 --- a/hb_client/src/views/mtm/productprocess.vue +++ b/hb_client/src/views/mtm/productprocess.vue @@ -1,1297 +1,1280 @@ - - - - - - - - - - - - - - - - - - - -
- 取消 - 确认 -
-
- - - - 新增 - - - - - - - + + + + + + + + + + + + + + + + + + + + +
+ 取消 + 确认 +
+ + + + + 新增 + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - 上传文件 - - - - -
- 取消 - 确认 -
-
-
-
- - - - + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + {{ item.name }} + {{ item.specification }} + + + + + + + + + + +
+ 取消 + 确认 +
+
+
+ + 新增 + + + + + + + + + + + + + + + + + + + + + + + {{ item.name }} + {{ item.specification }} + + + + + + + +
+ 取消 + 确认 +
+
+
+ + 新增 + + + + + + + + + + + + + + + + + + + + + 检验 + 不检验 + + + + + + + + + + + + +
+ 取消 + 确认 +
+
+
+ + 新增 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 上传文件 + + + +
+ 取消 + 确认 +
+
+
+ + + + diff --git a/hb_client/src/views/wpm/need.vue b/hb_client/src/views/wpm/need.vue index fec2f23..2af65be 100644 --- a/hb_client/src/views/wpm/need.vue +++ b/hb_client/src/views/wpm/need.vue @@ -1011,7 +1011,9 @@ this.innerIndex = index; // this.outerVisible = true; this.wproduct = scope.row.id;//半成品ID - this.listQueryrecordform.material = scope.row.material_check!==null ? scope.row.material_check :scope.row.material_.id;// + debugger; + console.log(scope.row.material_check); + this.listQueryrecordform.material = scope.row.material_check!==null ? scope.row.material_check :scope.row.material;// this.listQueryrecordform.type = 2; this.listQueryrecordform.enabled = true; this.recordform = null; From 0d8fe4d7ebbd2485aeb20beccb0892327f44f82e Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 11 Feb 2022 08:39:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4material=20check=20?= =?UTF-8?q?=E5=8F=AA=E8=A6=81=E7=BB=8F=E8=BF=87=E6=93=8D=E4=BD=9C=E5=B0=B1?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E7=89=A9=E6=96=99=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apps/wpm/migrations/0053_auto_20220129_1512.py | 10 ---------- hb_server/apps/wpm/models.py | 6 ------ hb_server/apps/wpm/views.py | 3 +-- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/hb_server/apps/wpm/migrations/0053_auto_20220129_1512.py b/hb_server/apps/wpm/migrations/0053_auto_20220129_1512.py index 21d27fe..0a60f4c 100644 --- a/hb_server/apps/wpm/migrations/0053_auto_20220129_1512.py +++ b/hb_server/apps/wpm/migrations/0053_auto_20220129_1512.py @@ -12,16 +12,6 @@ class Migration(migrations.Migration): ] operations = [ - migrations.AddField( - model_name='wproduct', - name='material_check', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='wp_material_check', to='mtm.material', verbose_name='按物料状态检查'), - ), - migrations.AddField( - model_name='wproductflow', - name='material_check', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='wpf_material_check', to='mtm.material', verbose_name='按物料状态检查'), - ), migrations.AlterField( model_name='wproduct', name='child', diff --git a/hb_server/apps/wpm/models.py b/hb_server/apps/wpm/models.py index 997e65c..f75908f 100644 --- a/hb_server/apps/wpm/models.py +++ b/hb_server/apps/wpm/models.py @@ -91,9 +91,6 @@ class WProduct(CommonAModel): material = models.ForeignKey( Material, verbose_name='所属物料状态', on_delete=models.CASCADE, related_name='wp_material') - material_check = models.ForeignKey( - Material, verbose_name='按物料状态检查', on_delete=models.CASCADE, - null=True, blank=True, related_name='wp_material_check') pre_step = models.ForeignKey(Step, verbose_name='已执行到', help_text='已执行完的步骤', null=True, blank=True, on_delete=models.CASCADE, related_name='wp_pre_step') step = models.ForeignKey(Step, verbose_name='所在步骤', on_delete=models.CASCADE, null=True, blank=True, @@ -170,9 +167,6 @@ class WproductFlow(CommonAModel): number = models.CharField('物品编号', null=True, blank=True, max_length=50) material = models.ForeignKey( Material, verbose_name='所属物料状态', on_delete=models.CASCADE, related_name='wpf_material') - material_check = models.ForeignKey( - Material, verbose_name='按物料状态检查', on_delete=models.CASCADE, - null=True, blank=True, related_name='wpf_material_check') pre_step = models.ForeignKey(Step, verbose_name='已执行到', help_text='已执行完的步骤', null=True, blank=True, on_delete=models.CASCADE, related_name='wpf_pre_step') step = models.ForeignKey(Step, verbose_name='所在步骤', on_delete=models.CASCADE, null=True, blank=True, diff --git a/hb_server/apps/wpm/views.py b/hb_server/apps/wpm/views.py index dbf50f0..81c18ed 100644 --- a/hb_server/apps/wpm/views.py +++ b/hb_server/apps/wpm/views.py @@ -684,10 +684,10 @@ class OperationViewSet(ListModelMixin, RetrieveModelMixin, CreateModelMixin, Upd newstep, needTest = WpmService.get_next_step(wsp, step) wp.step = newstep wp.pre_step = step + wp.material = wsp.product if step == newstep: wp.act_state = WProduct.WPR_ACT_STATE_TOTEST - wp.material = wsp.product if wp.test:# 如果有正在进行的工序中检验 wp.test.is_midtesting = False wp.test.is_submited = False @@ -696,7 +696,6 @@ class OperationViewSet(ListModelMixin, RetrieveModelMixin, CreateModelMixin, Upd wp.act_state = WProduct.WPR_ACT_STATE_DOWAIT if needTest: wp.act_state = WProduct.WPR_ACT_STATE_TOTEST - wp.material_check = wsp.product wp.operation = None wp.update_by = request.user