lkk
2025-01-16 049e03b29d8cf819c319e85fcf1b7b80454db5b0
lis编码
3个文件已修改
379 ■■■■■ 已修改文件
src/views/hosp/project/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reservation/reservations/index.vue 354 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/tijian/index.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hosp/project/index.vue
@@ -608,7 +608,7 @@
        <el-form-item label="LIS编码" prop="lisXmbm">
          <el-input
            v-model="form.LISXmbm"
            v-model="form.lisXmbm"
            placeholder="请输入his编码"
            style="width: 260px"
          />
src/views/reservation/reservations/index.vue
@@ -811,18 +811,114 @@
                  </el-form>
                </template>
                <div style="text-align: center; margin-bottom: 10px">
                <div
                  style="
                    display: flex;
                    align-items: center;
                    justify-content: flex-start;
                    width: 100%;
                  "
                >
                  <div
                    style="
                      white-space: nowrap;
                      overflow: hidden;
                      text-overflow: ellipsis;
                      margin-left: 46px;
                      font-size: 16px;
                      margin-right: 20px;
                    "
                  >
                    已选项目条数:<span
                      style="font-weight: 700; color: red; margin-right: 5px"
                      >{{ this.tableData1.length || 0 }}</span
                    >条
                  </div>
                  已选项目列表
                </div>
                <div
                  style="
                    padding: 0px 6px;
                    border: 1px solid #e6ebf5;
                    max-height: 650%;
                    overflow: auto;
                    width: 916px;
                    margin-left: 35px;
                  "
                >
                  <el-table :data="tableData1" border style="width: 100%">
                    <el-table-column prop="proName" label="项目" width="180" align="center">
                    </el-table-column>
                    <el-table-column prop="proType" label="性别" width="50" align="center">
                      <template slot-scope="scope">
                        <template v-if="isAll(scope.row.proType)">
                          全部
                        </template>
                        <template v-else>
                          <dict-tag
                            :options="dict.type.sys_user_sex"
                            :value="scope.row.proType"
                          />
                        </template>
                      </template>
                    </el-table-column>
                    <el-table-column prop="ordPrice" label="应收金额" align="center">
                    </el-table-column>
                    <el-table-column label="折扣" width="160px" align="center">
                      <template slot-scope="scope">
                        <el-input-number
                          v-model.number="scope.row.discount"
                          @input="validateDiscount(scope.row)"
                          placeholder="输入折扣"
                          size="small"
                          type="number"
                          :precision="1"
                          :step="0.1"
                          :max="10"
                          :min="0"
                          :disabled="true"
                        >
                        </el-input-number>
                      </template>
                    </el-table-column>
                    <el-table-column prop="nowPrice" label="实收金额" align="center">
                    </el-table-column>
                    <el-table-column prop="proCheckMethod" label="是否空腹" align="center">
                      <template slot-scope="scope">
                        <dict-tag
                          :options="dict.type.sys_yes_no"
                          :value="scope.row.proCheckMethod"
                        />
                      </template>
                    </el-table-column>
                    <el-table-column label="操作" align="center" width="80px">
                      <template slot-scope="scope">
                        <el-button
                          size="mini"
                          type="text"
                          icon="el-icon-delete"
                          @click="handleDelete1(scope.row)"
                          title="删除"
                        >
                        </el-button>
                      </template>
                    </el-table-column>
                  </el-table>
                </div>
                <!-- <div style="text-align: center; margin-bottom: 10px">
                  已选项目列表
                </div> -->
                <!-- <div
                  style="
                    padding: 0px 6px;
                    border: 1px solid #e6ebf5;
                    max-height: 420px;
                    overflow: auto;
                  "
                >
                  <el-collapse v-model="index" accordion v-if="list3">
                > -->
                <!-- <el-collapse v-model="index" accordion v-if="list3">
                    <div
                      class="info1"
                      v-for="(item, index) in tableData1"
@@ -840,6 +936,16 @@
                            item.nowPrice +
                            "元)"
                          }}
                          <div style="font-size: 16px; margin-left: 20px">
                            已选项目条数:<span
                              style="
                                font-weight: 700 !important;
                                color: red;
                                margin-right: 5px;
                              "
                              >{{ item.list.length || 0 }}</span
                            >条
                          </div>
                        </template>
                        <el-table
                          :data="item.list"
@@ -855,7 +961,39 @@
                          </el-table-column>
                          <el-table-column prop="ordPrice" label="应收金额">
                          </el-table-column>
                          <el-table-column label="折扣">
                            <template slot-scope="scope">
                              <el-input-number
                                v-model.number="scope.row.discount"
                                @input="validateDiscount(scope.row)"
                                placeholder="输入折扣"
                                size="small"
                                type="number"
                                :precision="1"
                                :step="0.1"
                                :max="10"
                                :min="0"
                              >
                              </el-input-number>
                            </template>
                          </el-table-column>
                          <el-table-column prop="nowPrice" label="实收金额">
                          </el-table-column>
                          <el-table-column
                            label="操作"
                            align="center"
                            width="80px"
                          >
                            <template slot-scope="scope">
                              <el-button
                                size="mini"
                                type="text"
                                icon="el-icon-delete"
                                @click="handleDelete1(scope.row)"
                                title="删除"
                              >
                              </el-button>
                            </template>
                          </el-table-column>
                        </el-table>
                      </el-collapse-item>
@@ -926,8 +1064,8 @@
                        </el-table>
                      </el-collapse-item>
                    </div>
                  </el-collapse>
                </div>
                  </el-collapse> -->
                <!-- </div> -->
              </div>
            </el-col>
          </el-row>
@@ -1361,9 +1499,6 @@
                        ></el-option>
                      </el-select>
                    </el-form-item>
                    <!-- <div class="tab1"> -->
                    <!-- <el-form :inline="true" class="tab1"> -->
                    <el-form-item label="应收金额">
                      <el-input
                        placeholder="应收金额"
@@ -1373,7 +1508,6 @@
                      ></el-input>
                    </el-form-item>
                    <el-form-item label="优惠折扣">
                      <!-- <el-input style="width: 100px" type="number" v-model="discount" :value="discount"></el-input> -->
                      <el-input-number
                        ref="inputNumber"
                        style="width: 130px"
@@ -1411,7 +1545,79 @@
                <div style="text-align: center; margin-bottom: 10px">
                  已选项目列表
                </div>
                <div
                  style="
                    padding: 0px 6px;
                    border: 1px solid #e6ebf5;
                    max-height: 650%;
                    overflow: auto;
                    width: 916px;
                    margin-left: 35px;
                  "
                >
                  <el-table :data="tableData1" border style="width: 100%">
                    <el-table-column prop="proName" label="项目" width="180" align="center">
                    </el-table-column>
                    <el-table-column prop="proType" label="性别" width="50" align="center">
                      <template slot-scope="scope">
                        <template v-if="isAll(scope.row.proType)">
                          全部
                        </template>
                        <template v-else>
                          <dict-tag
                            :options="dict.type.sys_user_sex"
                            :value="scope.row.proType"
                          />
                        </template>
                      </template>
                    </el-table-column>
                    <el-table-column prop="ordPrice" label="应收金额" align="center">
                    </el-table-column>
                    <el-table-column label="折扣" width="160px" align="center">
                      <template slot-scope="scope">
                        <el-input-number
                          v-model.number="scope.row.discount"
                          @input="validateDiscount(scope.row)"
                          placeholder="输入折扣"
                          size="small"
                          type="number"
                          :precision="1"
                          :step="0.1"
                          :max="10"
                          :min="0"
                          :disabled="true"
                        >
                        </el-input-number>
                      </template>
                    </el-table-column>
                    <el-table-column prop="nowPrice" label="实收金额" align="center">
                    </el-table-column>
                    <el-table-column prop="proCheckMethod" label="是否空腹" align="center">
                      <template slot-scope="scope">
                        <dict-tag
                          :options="dict.type.sys_yes_no"
                          :value="scope.row.proCheckMethod"
                        />
                      </template>
                    </el-table-column>
                    <el-table-column label="操作" align="center" width="80px">
                      <template slot-scope="scope">
                        <el-button
                          size="mini"
                          type="text"
                          icon="el-icon-delete"
                          @click="handleDelete1(scope.row)"
                          title="删除"
                        >
                        </el-button>
                      </template>
                    </el-table-column>
                  </el-table>
                </div>
                <!--  <div
                  style="
                    padding: 0px 6px;
                    border: 1px solid #e6ebf5;
@@ -1419,6 +1625,14 @@
                    overflow: auto;
                  "
                >
                  <div
                    style="
                      padding: 0px 6px;
                      border: 1px solid #e6ebf5;
                      max-height: 420px;
                      overflow: auto;
                    "
                  ></div>
                  <el-collapse v-model="index" accordion v-if="list3">
                    <div
                      class="info1"
@@ -1437,7 +1651,18 @@
                            item.nowPrice +
                            ".00元)"
                          }}
                          <div style="font-size: 16px; margin-left: 20px">
                            已选项目条数:<span
                              style="
                                font-weight: 700 !important;
                                color: red;
                                margin-right: 5px;
                              "
                              >{{ item.list.length || 0 }}</span
                            >条
                          </div>
                        </template>
                        <el-table
                          :data="item.list"
                          border
@@ -1457,6 +1682,22 @@
                          >
                          </el-table-column>
                          <el-table-column prop="ordPrice" label="应收金额">
                          </el-table-column>
                          <el-table-column label="折扣">
                            <template slot-scope="scope">
                              <el-input-number
                                v-model.number="scope.row.discount"
                                @input="validateDiscount(scope.row)"
                                placeholder="输入折扣"
                                size="small"
                                type="number"
                                :precision="1"
                                :step="0.1"
                                :max="10"
                                :min="0"
                              >
                              </el-input-number>
                            </template>
                          </el-table-column>
                          <el-table-column prop="nowPrice" label="实收金额">
                          </el-table-column>
@@ -1532,7 +1773,7 @@
                      </el-collapse-item>
                    </div>
                  </el-collapse>
                </div>
                </div> -->
              </div>
            </el-col>
          </el-row>
@@ -1559,7 +1800,7 @@
<script>
import { addComp } from "@/api/system/comp";
import Big from "big.js";
import {
  listReservation,
  gettjCancel,
@@ -1575,6 +1816,8 @@
  getaddtTransition,
  getTransitionList,
  getconfigKey,
  delTbBycusCardIdAndProId,
  getTransitionList1,
} from "@/api/system/tijian";
import { getCompany, queryCompany } from "@/api/team/tuanti";
import user from "@/store/modules/user";
@@ -1621,6 +1864,7 @@
          return time.getTime() < Date.now() - 8.64e7; // 不可选历史天、不可选当前天、可选未来天
        },
      },
      discount: 10,
      taocan: false,
      defaultKeys: [],
      value1: "",
@@ -1732,7 +1976,29 @@
        cusNumber: null,
        cusIsvip: null,
      },
      formIn: {},
      formIn: {
        name: "",
        age: "",
        idCard: "",
        remark: null,
        pacName: "",
        cusaddr: null,
        idType: null,
        ageUnit: null,
        sex: null,
        phoe: "",
        nation: null,
        email: "",
        marriage: null,
        address: "",
        tjCategory: null,
        company: "",
        career: null,
        reservationTime: null,
        timeRegion: null,
        indexCard: "",
        department: "",
      },
      fmobj: {},
      // 表单校验
      form1: {},
@@ -1857,6 +2123,65 @@
    this.getList();
  },
  methods: {
    isAll(value) {
      return value === "" || value === null;
    },
    validateDiscount(row) {
      if (row.discount == null || isNaN(row.discount)) {
        row.discount = 10;
      }
      if (row.discount > 10) {
        row.discount = 10; // 强制将值设置为最大值
      } else if (row.discount < 0) {
        row.discount = 0; // 强制将值设置为最小值
      }
      this.updateProPrice(row); // 更新价格或其他逻辑
    },
    updateProPrice(row) {
      const ordPrice = new Big(row.ordPrice || 0);
      const discount = new Big(row.discount || 0);
      const result = ordPrice.times(discount.div(10)); // ordPrice * (discount / 10)
      row.nowPrice = result.toNumber();
      this.TotalPrice = this.tableData1.reduce((sum, item) => {
        return sum.plus(new Big(item.nowPrice || "0"));
      }, new Big(0));
      this.discount =
        (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10;
    },
    /** 删除按钮操作 */
    handleDelete1(row) {
      // console.log(row);
      let data = {
        cusCardId: row.cusId,
        proId: row.parentProId,
      };
      this.$modal
        .confirm("是否确认删除?")
        .then(() => {
          return delTbBycusCardIdAndProId(data);
        })
        .then(() => {
          this.TotalPrice1 = 0;
          getTransitionList1(row.cusId).then((response) => {
            this.tableData1 = response.data;
            this.tableData1.forEach((item) => {
              this.TotalPrice1 += item.ordPrice;
              this.TotalPrice += item.nowPrice;
            });
            this.TotalPrice = this.tableData1.reduce((sum, item) => {
              return sum.plus(new Big(item.nowPrice || "0"));
            }, new Big(0));
            this.discount =
              (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) *
              10;
          });
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    getCompanyList() {
      this.loading = true;
      getconfigKey("team_reservation_default_day").then((res) => {
@@ -2073,7 +2398,7 @@
          getReservation(id).then((response) => {
            if (response.data) {
              let cusId = response.data.idCard;
              getTransitionList(cusId).then((response) => {
              getTransitionList1(cusId).then((response) => {
                if (response.data) {
                  this.tableData1 = response.data;
                  if (this.tableData1.length != 0) {
@@ -2184,9 +2509,10 @@
        getReservation(id).then((response) => {
          if (response.data) {
            let cusId = response.data.idCard;
            getTransitionList(cusId).then((response) => {
            getTransitionList1(cusId).then((response) => {
              if (response.data) {
                this.tableData1 = response.data;
                if (this.tableData1.length != 0) {
                  this.TotalPrice1 = 0;
                  this.tableData1.forEach((item) => {
src/views/system/tijian/index.vue
@@ -1658,7 +1658,27 @@
        firmId: "",
        firmDeptName: "",
      },
      form1: {},
      form1: {
        cnName: "",
        contactPerson: "",
        contactPhone: "",
        taxNumber: "",
        legalPerson: "",
        registerAddress: "",
        mailingAddress: "",
        bankAccount: "",
        mailingAddress: "",
        countNum: "",
        bankAccount: "",
        email: "",
        principal: "",
        url: "",
        faxNumber: "",
        areaName: "",
        orderNum: "",
        remark: "",
        validTime: "",
      },
      title: "",
      // 表单校验
      rules: {
@@ -2331,7 +2351,6 @@
      let _this = this;
      let cusIdcard = this.form.cusIdcard;
      if (cusIdcard) {
        getCusIdcard(cusIdcard).then((response) => {
          _this.top = false;
          if (response.data) {