su
su1124
2024-06-24 0c2c35139886532e938ea304254a339bd22cbd41
src/views/system/tijian/index.vue
@@ -550,7 +550,9 @@
                >
                  项目列表
                </div>
                <el-input placeholder="输入关键字进行过滤" v-model="filterText">
                <!-- @input="gaibian" -->
                <el-input placeholder="输入关键字进行过滤"
                 v-model="filterText">
                </el-input>
                <div class="tab3">
                  <el-tree
@@ -645,7 +647,7 @@
                      </template>
                    </el-table-column>
                  </el-table>
                  <div>合计:{{ marryall }}元</div>
                  <h3 style="font-weight: bold;">合计:{{ marryall }}元</h3>
                  <!-- <el-collapse v-model="activeName" accordion v-if="list1">
                    <div>
                      <el-collapse-item title="请选择项目">
@@ -1311,6 +1313,7 @@
  },
  data() {
    return {
      pname:"",
      filterText: "",
      proIdList: [],
      tableDatas: [],
@@ -1319,6 +1322,7 @@
      table: false,
      HistoryList: {},
      index: 0,
      names:"",
      dictType: [
        {
          value: 0,
@@ -1348,7 +1352,7 @@
      hospName: "",
      currentDate: "",
      currentTime: "",
      tjCategory: "",
      tjCategory: "12",
      formIn: {
        tjPro: "体检费",
      },
@@ -1556,6 +1560,11 @@
    filterNode(value, data) {
      if (!value) return true;
      return data.proName.indexOf(value) !== -1;
      // if(value == data.proName){
      //   return data.proName.indexOf(value) !== -1;
      // }else{
      //   return data.proEngName.indexOf(value) !== -1;
      // }
    },
    beforeDestroy() {
      clearInterval(this.timer);
@@ -1628,39 +1637,40 @@
        cusCardId: this.form.cusIdcard,
        proId: item.proPrantId,
      };
      delTbBycusCardIdAndProId(data).then((res) => {});
      getTransitionList(this.form.cusIdcard).then((response) => {
        this.tableData1 = response.data;
        this.TotalPrice1 = 0;
        if (this.tableData1) {
          this.tableData1.forEach((item) => {
            this.TotalPrice1 += item.nowPrice;
            if (item.pacName === null) {
              item.pacName = "单项";
            }
            if (item.pacName == "单项") {
              item.list.forEach((item9) => {
                this.treeList.push(item9.proId);
              });
            }
            this.pacName = item.pacName;
          });
      delTbBycusCardIdAndProId(data).then((res) => {
        getTransitionList(this.form.cusIdcard).then((response) => {
          this.tableData1 = response.data;
          this.TotalPrice1 = 0;
          if (this.tableData1) {
            this.tableData1.forEach((item) => {
              this.TotalPrice1 += item.nowPrice;
              if (item.pacName === null) {
                item.pacName = "单项";
              }
              if (item.pacName == "单项") {
                item.list.forEach((item9) => {
                  this.treeList.push(item9.proId);
                });
              }
              this.pacName = item.pacName;
            });
          const r = /^\+?[0-9][0-9]*$/; //正整数(可以0打头)
          let TotalPrice = this.TotalPrice1 * (this.discount / 10);
          if (r.test(TotalPrice)) {
            this.TotalPrice = TotalPrice + ".00";
            const r = /^\+?[0-9][0-9]*$/; //正整数(可以0打头)
            let TotalPrice = this.TotalPrice1 * (this.discount / 10);
            if (r.test(TotalPrice)) {
              this.TotalPrice = TotalPrice + ".00";
            } else {
              this.TotalPrice = TotalPrice;
            }
            this.list1 = false;
            this.list3 = true;
          } else {
            this.TotalPrice = TotalPrice;
            this.list1 = true;
            this.TotalPrice = "0.00";
          }
          this.list1 = false;
          this.list3 = true;
        } else {
          this.list1 = true;
          this.TotalPrice = "0.00";
        }
        });
      });
    },
    cope() {
@@ -2029,7 +2039,6 @@
                  if (this.tableData1) {
                    this.tableData1.forEach((item) => {
                      this.TotalPrice1 += item.ysPrice;
                      console.log(this.TotalPrice1);
                      this.TotalPrice = (
                        this.TotalPrice1 *
                        (this.discount / 10)
@@ -2338,6 +2347,7 @@
      let _this = this;
      _this.pacId = "";
      this.proIds = [];
      this.tjCategory ="12"
      let data = {
        cusId,
        pacId: _this.pacId,
@@ -2440,14 +2450,23 @@
      }
    },
    handleClick(tab, event) {
      console.log(tab, event);
      if (tab.label == "单项") {
        this.DataList = [];
        this.getDataList();
      }
    },
    // gaibian(val){
    //   console.log(val);
    //   let pname = val;
    //   console.log(pname);
    //   getProParentIdDxList(pname).then(response=>{
    //     this.Treedata = response.data.list;
    //   })
    // },
    getDataList() {
      console.log(111);
      this.loading = true;
      // this.pname = "null";
      getProParentIdDxList().then((response) => {
        this.Treedata = response.data.list;
        if (this.tableData[0]) {
@@ -2459,15 +2478,20 @@
            });
          });
        }
        this.checkedkey.push(this.Treedata[0].proId);
        let proId = this.Treedata[0].proId;
        this.checkedkey.push("1735504273274236929");
        let proId = "1735504273274236929";
        this.Treedata.forEach(item =>{
          if(proId == item.proId){
            this.names = item.proName
          }
        })
        getProSonDxList(proId).then((res) => {
          this.TreedataList = res.data.list;
          this.TreedataList.forEach((item) => {
            this.checkedListkey.push(item.proId);
            this.DataList.push(item);
            this.DataList.forEach((item) => {
              item.propinName = this.Treedata[0].proName;
                item.propinName = this.names;
            });
          });
          this.TotalPrice1 = 0;
@@ -2583,7 +2607,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)) {
@@ -2631,7 +2654,7 @@
        proIds: this.proIds,
      };
      getaddtTransition(data).then((response) => {
        if (response.code === 200) {
        if(response.code==200 ){
          let cusId = this.form.cusIdcard;
          this.proIds = [];
          getTransitionList(cusId).then((response) => {
@@ -2640,8 +2663,8 @@
            if (this.tableData1) {
              this.tableData1.forEach((item) => {
                this.TotalPrice1 += item.nowPrice;
                if (item.pacName === null) {
                  item.pacName = "单项";
                if (item.tjCategory!=null ) {
                  this.tjCategory  = item.tjCategory
                }
                if (item.pacName == "单项") {
                  item.list.forEach((item9) => {
@@ -2658,12 +2681,10 @@
              } else {
                this.TotalPrice = TotalPrice;
              }
              this.list1 = false;
              this.list3 = true;
            } else {
              this.list1 = true;
              this.TotalPrice = "0.00";
            }
          });