qinxianzhangyao
2023-10-31 c5351e5f1d21b848bbaaa403726115d220443074
src/views/system/comp/index.vue
@@ -738,6 +738,8 @@
    changeName() {
      this.openss = true;
      this.title = "分组项目维护";
      this.OnenewpacName =[]
      this.queryParams.price = 0
      if (this.forms.sex) {
        deptTreeSelect(this.forms.sex).then((response) => {
          this.newpacName = response.rows;
@@ -1042,7 +1044,7 @@
    // 双击
    dbclick(row, column, event) {
      row.isOK = !row.isOK
      this.queryParams.price = 0
      this.OnenewpacName[row.index] = JSON.parse(JSON.stringify(row)) // 复制旧的数据,取消时用到
      // 判断是否为双击第二次修改,第二次双击则提交数据进行修改,或者可点击按钮取消
      if (row.isOK == true) {
@@ -1053,9 +1055,15 @@
        })
          .then(() => {
            this.OnenewpacName.splice(row.index, 1); //删除对应的表头
            this.queryParams.price = 0
            if (this.OnenewpacName.length >= 1) {
            this.OnenewpacName.forEach(item => {
              this.queryParams.price += item.proPrice
            })
            } else {
              this.queryParams.price = 0
            }
          })
          .catch(() => {
            this.$message({