From c33920bfa34d739929cef61a1ff1ef61e5be2b1e Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 14 Jun 2022 10:16:34 +0800 Subject: [PATCH 1/2] xiada --- hb_client/src/views/bigScreen/centerLeft1.vue | 9 +++++---- hb_client/src/views/pm/work.vue | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hb_client/src/views/bigScreen/centerLeft1.vue b/hb_client/src/views/bigScreen/centerLeft1.vue index 9b84107..08d39ec 100644 --- a/hb_client/src/views/bigScreen/centerLeft1.vue +++ b/hb_client/src/views/bigScreen/centerLeft1.vue @@ -46,11 +46,12 @@ return { options: {}, cdata: { - xData: ["冷加工", "热弯", "化学钢化"], + xData: ["冷加工", "热弯","物理钢化", "化学钢化"], seriesData: [ - {value: 25, name: "冷加工"}, - {value: 20, name: "热弯"}, - {value: 30, name: "化学钢化"} + {value: 20, name: "冷加工"}, + {value: 25, name: "热弯"}, + {value: 30, name: "物理钢化"}, + {value: 35, name: "化学钢化"} ] } } diff --git a/hb_client/src/views/pm/work.vue b/hb_client/src/views/pm/work.vue index d9911f6..d874f55 100644 --- a/hb_client/src/views/pm/work.vue +++ b/hb_client/src/views/pm/work.vue @@ -75,6 +75,7 @@ 修改日期 From 7640f53757a2b2d52f77afafb078cd927a4f947c Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 14 Jun 2022 11:05:31 +0800 Subject: [PATCH 2/2] youxioaqi&batch --- hb_client/src/components/customForm/index.vue | 5 +- hb_client/src/views/inm/fifo.vue | 47 ++++++++++++++----- hb_client/src/views/pm/plan.vue | 6 ++- 3 files changed, 42 insertions(+), 16 deletions(-) diff --git a/hb_client/src/components/customForm/index.vue b/hb_client/src/components/customForm/index.vue index 1f0e232..e9f17f3 100644 --- a/hb_client/src/components/customForm/index.vue +++ b/hb_client/src/components/customForm/index.vue @@ -160,7 +160,7 @@ - + @@ -306,6 +306,9 @@ } }, methods: { + checkValue() { + this.number = this.number.replace(/[^0-9a-zA-Z]/g, ''); + }, filterBlock(rule, index, field_key) { let that = this; if (rule !== '' && rule !== null && rule !== undefined) { diff --git a/hb_client/src/views/inm/fifo.vue b/hb_client/src/views/inm/fifo.vue index e448e0f..c1c16c3 100644 --- a/hb_client/src/views/inm/fifo.vue +++ b/hb_client/src/views/inm/fifo.vue @@ -346,7 +346,7 @@ label="批次" :prop="'details.' + index + '.batch'" > - + @@ -379,7 +379,7 @@ - + @@ -465,7 +465,7 @@ material: "", // 物料 count: "", //数量 batch: "", //批次 - expiration_date: "", // + expiration_date: null, // details:[], }, ], @@ -481,6 +481,13 @@ export default { components: {Pagination}, data() { + const validateBatch = (rule, value, callback) => { + if (value.length < 6) { + callback(new Error("请输入不小于六位!")); + } else { + callback(); + } + }; return { inventory: defaulteinventory, outfifo: defaulteoutfifo, @@ -513,6 +520,7 @@ dialogVisibles: false, rule1: { name: [{required: true, message: "请输入", trigger: "blur"}], + batch: [{required: true, message: "请输入不小于六位", trigger: "blur", validator: validateBatch},], }, }; }, @@ -526,6 +534,12 @@ this.getpuorderList(); }, methods: { + checkValue() { + this.itemDetails = this.itemDetails.replace(/[^0-9a-zA-Z]/g, ''); + }, + checkValueItem(index) { + this.inventory.details[index].batch = this.inventory.details[index].batch.replace(/[^0-9a-zA-Z]/g, ''); + }, detailEnter(item,index){ this.inventory.details[index].details.push({number:item}); this.itemDetails = ''; @@ -639,7 +653,7 @@ material: "", // 物料 count: "", //数量 batch: "", //批次 - expiration_date: "", // + expiration_date: null, // details:[], }, ]; @@ -711,9 +725,12 @@ }, async confirm(form) { - console.log(this.inventory); + let isbatch = false; let details = []; this.inventory.details.forEach(item=>{ + if(item.batch.length<6){ + isbatch = true; + } let obj = new Object(); if(item.details.length>0){ obj = item; @@ -726,14 +743,18 @@ } details.push(obj); }); - this.inventory.details = details; - createInother(this.inventory).then((res) => { - if (res.code >= 200) { - this.getList(); - this.dialogVisible = false; - this.$message.success("成功"); - } - }); + if(isbatch){ + this.$message.warning("批次号不能少于六位数"); + }else{ + this.inventory.details = details; + createInother(this.inventory).then((res) => { + if (res.code >= 200) { + this.getList(); + this.dialogVisible = false; + this.$message.success("成功"); + } + }); + } }, handleDelete(scope) { this.$confirm("确认删除?", "警告", { diff --git a/hb_client/src/views/pm/plan.vue b/hb_client/src/views/pm/plan.vue index 460f75e..966e079 100644 --- a/hb_client/src/views/pm/plan.vue +++ b/hb_client/src/views/pm/plan.vue @@ -238,7 +238,7 @@ - +
@@ -336,7 +336,9 @@ }, methods: { checkPermission, - + checkValue() { + this.orderplan.number = this.orderplan.number.replace(/[^0-9a-zA-Z]/g, ''); + }, //订单列表 getorderList() { this.listLoading = true;