From 2a271e34670471c58a8b006d35df8003a62684f3 Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Fri, 8 Nov 2024 17:08:24 +0800 Subject: [PATCH] =?UTF-8?q?11/8=20=E8=8D=AF=E5=93=81=20=E9=87=87=E9=9B=86?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E5=B1=82=E7=BA=A7=E8=AE=BE=E7=BD=AE=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=B1=82=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/basic/product/drug/drugAdd.vue | 197 +++-------------------- 1 file changed, 25 insertions(+), 172 deletions(-) diff --git a/src/views/basic/product/drug/drugAdd.vue b/src/views/basic/product/drug/drugAdd.vue index f83ed55..007b496 100644 --- a/src/views/basic/product/drug/drugAdd.vue +++ b/src/views/basic/product/drug/drugAdd.vue @@ -451,38 +451,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -494,120 +463,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -615,32 +470,6 @@ 取消
- - - - - - - - - - - - - - - - - - - - - - - - - - { if (!valid) { return this.$message.error('请补充必要数据') @@ -1080,6 +910,11 @@ export default { this.$message.error('层级单位不能为空') return } + + if (isBlank(row.bhxjsl)) { + this.$message.error('请填写下级数量') + return + } let editQuery = { nameCode: row.nameCode, packLevel: row.packLevel, @@ -1252,6 +1087,24 @@ export default { }) }, + + //设置层级 + setDefaultLevel(){ + //判断流通 最大层级 + if (this.newProductData.distributeMaxLevel == null){ + let levelUnit = this.levelUnitList[this.levelUnitList.length - 1]; + this.newProductData.distributeMaxLevel = levelUnit.packLevel + } + // 判断使用 采集最大层级 + if (this.newProductData.useMaxLevel == null){ + //获取获取第一个 如果packUnit且为null的话就设置第二个 + let levelUnit = this.levelUnitList[0]; + if (isBlank(levelUnit.packUnit)){ + levelUnit = this.levelUnitList[1] + } + this.newProductData.useMaxLevel = levelUnit.packLevel + } + }, //获取层级标识 getDetailList() { if (this.newProductData.uuid != null) {