qinxianzhangyao
2023-12-09 876f43e0fd34e084cc8a179a20afb51fe612eca3
src/views/system/tijianall/index.vue
@@ -226,24 +226,24 @@
                style="width: 190px"
              />
            </el-form-item>
             <el-form-item
                label="体检类型"
                prop="tjType"
                style="margin-right: 20px"
            <el-form-item
              label="体检类型"
              prop="tjType"
              style="margin-right: 20px"
            >
              <el-select
                style="width: 145px"
                v-model="form.tjType"
                placeholder="请选择体检类型"
              >
                <el-select
                  style="width: 145px"
                  v-model="form.tjType"
                  placeholder="请选择体检类型"
                >
                  <el-option
                    v-for="dict in dict.type.dict_team"
                    :key="dict.value"
                    :label="dict.label"
                    :value="parseInt(dict.value)"
                  ></el-option>
                </el-select>
              </el-form-item>
                <el-option
                  v-for="dict in dict.type.dict_team"
                  :key="dict.value"
                  :label="dict.label"
                  :value="parseInt(dict.value)"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-form>
        </div>
      </el-col>
@@ -427,7 +427,6 @@
              label-width="75px"
              style="margin-left: 10px"
            >
              <el-form-item label="应收金额" style="margin-right: 20px">
                <el-input
                  placeholder="应收金额"
@@ -459,14 +458,23 @@
                  @click="submitPrice"
                  size="mini"
                  :disabled="confirm"
                  >预约登记</el-button>
                  <el-button
                  >预约登记</el-button
                >
                <el-button
                  v-show="lishi"
                  type="primary"
                  @click="inputChange"
                  @click="cope"
                  size="mini"
                  >一键复制</el-button
                >
                <el-button
                  type="primary"
                  @click="inputChanges"
                  v-show="lishi"
                  size="mini"
                  :disabled="confirm"
                  >历史体检记录</el-button>
                  >历史体检记录</el-button
                >
              </el-form-item>
            </el-form>
          </template>
@@ -631,14 +639,19 @@
        ></iframe>
      </div>
    </el-dialog>
    <el-drawer title="历史体检记录" :visible.sync="table" direction="rtl" size="50%">
      <el-table :data="HistoryList" style="width:95%;margin-left:20px">
        <el-table-column property="tjNum" label="体检号" align="center" :show-overflow-tooltip="true"></el-table-column>
        <el-table-column property="userName" label="姓名" align="center" :show-overflow-tooltip="true"></el-table-column>
        <el-table-column property="tjTime" label="体检时间" align="center" :show-overflow-tooltip="true"></el-table-column>
        <el-table-column property="tjProName" label="体检项目" align="center" :show-overflow-tooltip="true"></el-table-column>
      </el-table>
    </el-drawer>
     <el-dialog
      title="提示"
      :visible.sync="dialogVisiblese"
      width="30%"
      :before-close="handleClose"
    >
      <span>是否复制最近一次的体检项目?</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisiblese = false">取 消</el-button>
        <el-button type="primary" @click="copes">确 定</el-button>
      </span>
    </el-dialog>
    <historyTj :cusIdCard="form.cusIdcard" ref="historyTj"></historyTj>
  </div>
</template>
  
@@ -655,12 +668,14 @@
  getGuide,
  getaddTj,
  getHistryTjOrderByCusIdCard,
  getHistryTjOrderProByCusIdCard,
} from "@/api/system/tijian";
import { MessageBox } from "element-ui";
import VTreeTransfer from "../tijian/TreeTransfer.vue";
import historyTj from "@/components/historyTj/index";
export default {
  components: {
    VTreeTransfer,
    VTreeTransfer,historyTj
  },
  dicts: [
    "dict_user_national",
@@ -702,7 +717,10 @@
    //   }
    // };
    return {
      lishi:false,
      proIdList: [],
      tableDatas: [],
      dialogVisiblese: false,
      lishi: false,
      table: false,
      HistoryList: {},
      index: 0,
@@ -922,18 +940,99 @@
          this.form.cusBrithday = birthday;
          this.form.age = age;
        }
        let cusIdCard = this.form.cusIdcard;
        getHistryTjOrderByCusIdCard(cusIdCard).then((res) => {
          if (res.code == 200) {
        // let cusIdCard = this.form.cusIdcard;
        // getHistryTjOrderByCusIdCard(cusIdCard).then((res) => {
        //   if (res.code == 200) {
            this.table = true;
            this.lishi = true;
            this.HistoryList = res.data;
          }
        });
        //     this.HistoryList = res.data;
        //   }
        // });
      } else {
        // return this.$message.error("请输入正确的身份证号!");;
      }
    },
    inputChanges(){
      this.$refs.historyTj.getlist();
    },
    cope() {
      let cusIdCard = this.form.cusIdcard;
      getHistryTjOrderProByCusIdCard(cusIdCard).then((res) => {
        this.copeList = res.data;
        if (res.msg !="暂无历史记录") {
          this.dialogVisiblese = true;
        } else {
          this.$message.warning("暂无历史体检记录!");
        }
      });
    },
    copes() {
      let cusIdCard = this.form.cusIdcard;
      getHistryTjOrderProByCusIdCard(cusIdCard).then((res) => {
        this.tableDatas = res.data;
        if (this.form.cusIdcard) {
          var cusId = this.form.cusIdcard;
        } else {
          this.$message.warning("请先填写信息,再选体检内容");
        }
        let _this = this;
        if (this.tableDatas.length != 0) {
          this.tableDatas.forEach((item) => {
            if (item.pacId != null) {
              _this.pacId = item.pacId;
            } else {
              item.list.forEach((items) => {
                _this.proIdList.push(items.proId);
                console.log(_this.pacId, 888);
              });
            }
          });
        } else {
          _this.pacId = "";
        }
        let data = {
          cusId,
          pacId: _this.pacId,
          proIds: _this.proIdList,
        };
        getaddtTransition(data).then((response) => {
          if (response.msg === "操作成功") {
            let cusId = this.form.cusIdcard;
            getTransitionList(cusId).then((response) => {
              this.tableData1 = response.data;
              // this.checkSelectable();
              this.TotalPrice1 = 0;
              if (this.tableData1) {
                this.tableData1.forEach((item) => {
                  this.TotalPrice1 += item.nowPrice;
                  this.TotalPrice = this.TotalPrice1 + ".00";
                  if (item.pacName === null) {
                    item.pacName = "单项";
                  }
                  this.pacName = item.pacName;
                });
                this.list1 = false;
                this.list3 = true;
              } else {
                this.list1 = true;
                this.TotalPrice = "0.00";
              }
            });
          }
        });
        this.taocan = false;
      });
      this.dialogVisiblese = false;
    },
    handleClose(done) {
      this.$confirm("确认关闭?")
        .then((_) => {
          done();
        })
        .catch((_) => {});
    },
    getList1() {
      getInfo().then((response) => {
        this.getInfodis = response.user.discount;