qinxianzhangyao
2024-06-19 5f5425c1be29b82205f19b7779cda67cfcc3a6e5
src/views/system/package/index.vue
@@ -640,7 +640,6 @@
  components: { Packages },
  data() {
    let checkPhoneNum = (rule, value, callback) => {
      console.log(value);
      let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/);
      if (value == "" && value == undefined && !value) {
        return callback("");
@@ -696,6 +695,7 @@
      newproName: [],
      // 所有体检项目·
      allList: [],
      treeList: [],
      // 所有套餐数据
      // allpackage:[],
      // 弹出层标题
@@ -794,7 +794,6 @@
      });
    },
    sel(val) {
      console.log(val);
      let id = val;
      this.keys = "";
      id.forEach((item) => {
@@ -808,9 +807,7 @@
        this.categoryList = response.rows;
      });
    },
    shangpin(vals) {
      console.log(vals);
    },
    shangpin(vals) {},
    // 取消按钮
    cancel() {
      this.open = false;
@@ -876,6 +873,8 @@
      this.open = true;
      this.title = "体检套餐信息维护";
      this.DataList = [];
      this.checkedkey=[];
      this.checkedListkey=[];
      this.getDataList();
      // getAllList().then((response) => {
      //   this.allList = response.data;
@@ -928,7 +927,7 @@
      // });
      getPacInFo(this.forms.pacId).then((response) => {
        this.form = response.data;
        this.form.keywords=this.form.keywords.slice(0, -1);
        this.form.keywords = this.form.keywords.slice(0, -1);
        this.form.keywords = this.form.keywords.split(",");
        this.DataList = [];
        this.checkedkey = [];
@@ -942,7 +941,7 @@
      this.open = true;
      getPacInFo(row.pacId).then((response) => {
        this.form = response.data;
        this.form.keywords=this.form.keywords.slice(0, -1);
        this.form.keywords = this.form.keywords.slice(0, -1);
        this.form.keywords = this.form.keywords.split(",");
        this.DataList = [];
        this.checkedkey = [];
@@ -1031,7 +1030,6 @@
    },
    //  // 默认接受四个值 { 当前行的值, 当前列的值, 行的下标, 列的下标 }
    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
      // console.log(row, column, rowIndex, columnIndex);
      let fields = ["propinName"];
      let cellValue = row[column.property];
      if (cellValue && fields.includes(column.property)) {
@@ -1081,8 +1079,10 @@
            });
          });
        } else {
          console.log(this.checkedkey)
          this.checkedkey.push(this.Treedata[0].proId);
          let proId = this.Treedata[0].proId;
          console.log(proId)
          getProSonDxList(proId).then((res) => {
            this.TreedataList = res.data.list;
            this.TreedataList.forEach((item) => {
@@ -1100,7 +1100,7 @@
      });
    },
    handleCurrentChecked(data, checked, checkedNodes) {
      console.log(data, checked);
      console.log(data, checked)
      this.dataObj = data;
      this.checkedObj = checked;
      if (checked == true) {
@@ -1136,7 +1136,6 @@
            item.disabled = true;
          });
          this.checkedListkey = [];
          console.log(this.TreedataList.length);
          this.DataList.forEach((item, index) => {
            if (item.proParentId == this.dataObj.proId) {
              this.DataList.splice(index, this.TreedataList.length);
@@ -1207,7 +1206,16 @@
      if (this.form.pacName) {
        this.form.tjProjectList = [];
        if (this.DataList.length != 0) {
          this.DataList.forEach((item) => {
          this.treeList = JSON.parse(JSON.stringify(this.DataList));
          for (var i = 0; i < this.treeList.length; i++) {
            for (var j = i + 1; j < this.treeList.length; j++) {
              if (this.treeList[i].proParentId == this.treeList[j].proParentId) {
                this.treeList.splice(j, 1);
                j--;
              }
            }
          }
           this.treeList.forEach((item) => {
            this.form.tjProjectList.push({
              // id: 0,
              proName: item.propinName,
@@ -1226,12 +1234,12 @@
              // } else {
              //   this.form.pacStatus = 1;
              // }
              if(this.keys){
              if (this.keys) {
                this.form.keywords = this.keys;
              }else{
              } else {
                this.form.keywords = this.form.keywords.toString();
              }
              updatePackage(this.form).then((response) => {
                this.$modal.msgSuccess("修改成功");
                this.open = false;
@@ -1244,7 +1252,6 @@
              // } else {
              //   this.form.pacStatus = 1;
              // }
              // console.log(this.form.tjProjectList);
              // return;
              addPackage(this.form).then((response) => {
                this.$modal.msgSuccess("新增成功");