Просмотр исходного кода

价格策略

Signed-off-by: hsshuxian <3049816743@qq.com>
hsshuxian 8 месяцев назад
Родитель
Сommit
ee4f3dd52f
1 измененных файлов с 2 добавлено и 5 удалено
  1. 2 5
      ems-ui-cloud/src/views/basecfg/price/index.vue

+ 2 - 5
ems-ui-cloud/src/views/basecfg/price/index.vue

@@ -59,7 +59,6 @@
                   修改
                 </el-button>
               </el-tooltip>
-              <!-- 删除按钮 -->
               <el-tooltip
                 effect="dark"
                 :content="scope.row.areaCode !== currentAreaCode ? '请到上游节点编辑' : '删除'"
@@ -270,7 +269,6 @@
                 修改</el-button>
               <el-button size="mini" type="text" icon="el-icon-delete" class="deleteBtn" @click="handleStrategyDelete(scope.row)" v-hasPermi="['basecfg:price:remove']" :disabled="scope.row.editFlag==0">
                 删除</el-button>
-
             </template>
           </el-table-column>
         </el-table>
@@ -816,21 +814,20 @@ export default {
       this.$refs['attrForm'].validate(valid => {
         if (valid) {
           console.log("Submitting form with areaCode:", this.attrForm.areaCode);
-          if(this.attrList.some(item=>item.areaCode===this.attrForm.areaCode)){
+          // 排除当前正在修改的园区
+          if(this.attrList.some(item => item.areaCode === this.attrForm.areaCode && item.id !== this.attrForm.id)){
             return this.$modal.msgError('当前园区已存在')
           }
           if (this.attrForm.id != null) {
             updateAttr(this.attrForm).then(response => {
               this.$modal.msgSuccess('修改成功')
               this.attrOpen = false
-              // this.getAttrList()
               this.refreshCurrentAreaData();
             })
           } else {
             addAttr(this.attrForm).then(response => {
               this.$modal.msgSuccess('新增成功')
               this.attrOpen = false
-              // this.getAttrList()
               this.refreshCurrentAreaData();
             })
           }