zhuzhuanzhuan
2023-08-10 9b3e7c3c47dc27e531a7b954aa2b3ba500c84b78
src/views/system/ProductionManager.vue
@@ -293,7 +293,11 @@
      batchDel: function () {
        console.log(this.checkedKeys)
        if (this.checkedKeys.length <= 0) {
          this.$message.warning('请选择一条记录!')
          // this.$message.warning('请选择一条记录!')
          this.$notification.warning({
            message:'消息',
            description:"请选择一条记录"
          });
        } else {
          var ids = ''
          for (var a = 0; a < this.checkedKeys.length; a++) {
@@ -306,11 +310,19 @@
            onOk: function () {
              deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => {
                if (res.success) {
                  that.$message.success(res.message)
                  // that.$message.success(res.message)
                  that.$notification.warning({
                    message:'消息',
                    description:res.message
                  });
                  that.loadTree()
                  that.onClearSelected()
                } else {
                  that.$message.warning(res.message)
                  // that.$message.warning(res.message)
                  that.$notification.warning({
                    message:'消息',
                    description:res.message
                  });
                }
              })
            }
@@ -328,7 +340,11 @@
                that.departTree.push(temp)
              }
            } else {
              that.$message.warning(res.message)
              // that.$message.warning(res.message)
              that.$notification.warning({
                message:'消息',
                description:res.message
              });
            }
          })
        } else {
@@ -400,16 +416,28 @@
        this.$refs.form.validate(valid => {
          if (valid) {
            if (!this.currSelected.id) {
              this.$message.warning('请点击选择要修改车间!')
              // this.$message.warning('请点击选择要修改车间!')
              this.$notification.warning({
                message:'消息',
                description:"请点击选择要修改车间!"
              });
              return
            }
            httpAction(this.url.edit, this.currSelected, 'put').then((res) => {
              if (res.success) {
                this.$message.success('保存成功!')
                // this.$message.success('保存成功!')
                this.$notification.warning({
                  message:'消息',
                  description:"保存成功"
                });
                this.loadTree()
              } else {
                this.$message.error(res.message)
                // this.$message.error(res.message)
                this.$notification.warning({
                  message:'消息',
                  description:res.message
                });
              }
            })
          }
@@ -437,7 +465,11 @@
          console.log(this.currSelected)
          let key = this.currSelected.key
          if (!key) {
            this.$message.warning('请先点击选中上级车间!')
            // this.$message.warning('请先点击选中上级车间!')
            this.$notification.warning({
              message:'消息',
              description:"请先点击选中上级车间!"
            });
            return false
          }
          this.$refs.departModal.add(this.selectedKeys)
@@ -457,7 +489,11 @@
              if (resp.success) {
                //删除成功后,去除已选中中的数据
                that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1);
                that.$message.success('删除成功!')
                // that.$message.success('删除成功!')
                that.$notification.success({
                  message:'消息',
                  description:"删除成功"
                });
                that.loadTree()
                //删除后同步清空右侧基本信息内容
                // let orgCode=that.model.orgCode;
@@ -465,7 +501,11 @@
                  that.onClearSelected()
                // }
              } else {
                that.$message.warning('删除失败!')
                // that.$message.warning('删除失败!')
                that.$notification.warning({
                  message:'消息',
                  description:"删除失败"
                });
              }
            })
          }