Qx
qx
3 天以前 26e6be1dfd468b1cf74708bd2f8f6eba5e9ac050
src/views/hosp/order/index.vue
@@ -75,7 +75,7 @@
            v-hasPermi="['hosp:order:export']">导出</el-button>
        </el-col>
        <el-col :span="1.5">
          <el-button type="primary" size="mini" @click="handleProject1" :disabled="single"
            v-hasPermi="['hosp:order:export']">补录项目</el-button>
@@ -97,16 +97,17 @@
          <el-button type="primary" size="mini" @click="budadzd" :disabled="single"
            v-hasPermi="['hosp:order:export']">打印补录单</el-button>
        </el-col>
         <el-col :span="1.5">
          <el-button style="background-color:#E6A23C;color:#fff"
           size="mini" @click="handleRevoke" :disabled="single">撤销签到</el-button>
        <el-col :span="1.5">
          <el-button style="background-color:#E6A23C;color:#fff" size="mini" @click="handleRevoke"
            :disabled="single">撤销签到</el-button>
        </el-col>
        <el-col :span="1.5">
          <el-button style="background-color:#E6A23C;color:#fff" size="mini" @click="ForceChexiao" :disabled="single"
            v-hasPermi="['qzcx']">强制撤销</el-button>
        </el-col>
        <el-col :span="1.5">
          <el-button style="background-color:#E6A23C;color:#fff" size="mini" @click="ResumeAppointment" :disabled="multiple">恢复预约</el-button>
          <el-button style="background-color:#E6A23C;color:#fff" size="mini" @click="ResumeAppointment"
            :disabled="multiple">恢复预约</el-button>
        </el-col>
        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
      </el-row>
@@ -473,6 +474,7 @@
              </el-table-column>
              <el-table-column prop="proPrice" label="原价" width="56px">
              </el-table-column>
              <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="50px">
                <template slot-scope="scope">
@@ -534,7 +536,7 @@
      </el-dialog>
      <!-- 添加补录项目 -->
      <el-dialog :title="title" :visible.sync="Projectopen1" width="1100px" style="height: 860px" append-to-body
      <el-dialog :title="title" :visible.sync="Projectopen1" width="1200px" style="height: 860px" append-to-body
        :close-on-click-modal="false">
        <div class="box">
          <div class="box1">
@@ -586,9 +588,9 @@
            </div>
            <el-table :data="DataList3" border style="width: 100%; table-layout: fixed" height="560"
              :span-method="objectspanmethod">
              <el-table-column prop="propinName" label="检查项目" width="200px" :show-overflow-tooltip="true">
              <el-table-column prop="propinName" label="检查项目" width="160px" :show-overflow-tooltip="true">
              </el-table-column>
              <el-table-column prop="proName" label="明细项目" width="200px" :show-overflow-tooltip="true">
              <el-table-column prop="proName" label="明细项目" width="160px" :show-overflow-tooltip="true">
              </el-table-column>
              <el-table-column prop="sl" label="数量" width="56px">
              </el-table-column>
@@ -786,10 +788,10 @@
              <el-table-column align="center" prop="price" label="费用合计">
              </el-table-column>
              <el-table-column align="center" prop="sfzt" label="费用状态">
                 <template v-slot="scope">
                    <span v-if="scope.row.sfzt">{{ '已结账' }}</span>
                    <span v-else>{{ '未结账' }}</span>
                 </template>
                <template v-slot="scope">
                  <span v-if="scope.row.sfzt">{{ '已结账' }}</span>
                  <span v-else>{{ '未结账' }}</span>
                </template>
              </el-table-column>
            </el-table>
            <h3>付款详情</h3>
@@ -1348,8 +1350,6 @@
      // 先调用 getInfo 获取 userId
      getInfo()
        .then((res) => {
          console.log(res, 1111);
          const dqdlr = res.user.userId; // 获取 userId
          console.log("User ID:", dqdlr);
          const params = { viewNum, tjNumber, dqdlr }; // 将 userId 加入 params
@@ -1370,7 +1370,6 @@
    // 强制撤销按钮
    ForceChexiao() {
      const tjNum = this.tjnumbers;
      this.isLoading = true
      this.$confirm(
@@ -1383,17 +1382,13 @@
          customClass: "custom-message-box",
        }
      )
        .then(() => {
          getForceChexiao(tjNum).then((res) => {
            if (res.code == 200) {
              this.$modal.msgSuccess("撤销成功");
              this.isLoading = false
              this.getList();
            }
          }).catch(() => {
            console.log("加载失败")
            this.isLoading = false;
@@ -1459,6 +1454,37 @@
          // 不论操作成功还是失败,都会执行
        });
    },
     updateProPrice(row) {
      const ordPrice = new Big(row.ordPrice);
      const discount = new Big(row.discount);
      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;
    },
     handleManualChange(row) {
      this.updateProPrice(row);
    },
     updateProPrice(row) {
      const ordPrice = new Big(row.ordPrice);
      const discount = new Big(row.discount);
      const result = ordPrice.times(discount.div(10)); // ordPrice * (discount / 10)
      row.nowPrice = result.toNumber();
      this.TotalPrice = this.DataList3.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;
    },
    handleRevoke() {
@@ -2021,8 +2047,8 @@
      this.Datalists = [];
      this.TotalPrice1 = 0;
      this.filterText = "",
      this.filterage = "",
      this.orderId = row.orderId;
        this.filterage = "",
        this.orderId = row.orderId;
      this.cusId = row.tjCusIdCard;
      this.userId = row.userId;
      this.customer = {
@@ -2103,8 +2129,8 @@
      this.DataList3 = [];
      this.Datalists = [];
      this.filterText = "",
      this.filterage = "",
      this.TotalPrice1 = 0;
        this.filterage = "",
        this.TotalPrice1 = 0;
      this.orderId = this.ids;
      this.cusId = this.cusIds;
      this.userId = this.userIds;