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) {