qinxianzhangyao
2024-07-23 50dd8296b363798246749bc402302535451921a5
src/views/hosp/order/index.vue
@@ -29,6 +29,16 @@
          @blur="hb"
        />
      </el-form-item>
      <el-form-item label="体检项目" prop="xmmc">
        <el-input
          ref="inputName"
          v-model="queryParams.xmmc"
          placeholder="请输入体检项目"
          style="width: 120px"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="登记时间" prop="createTimeList">
        <el-date-picker
          v-model="createTimeList"
@@ -452,95 +462,226 @@
      width="1100px"
      style="height: 860px"
      append-to-body
      :close-on-click-modal="false"
    >
      <el-row type="flex" class="row-bg" justify="space-around">
        <el-col :span="6">
          <div
            style="text-align: center; margin-bottom: 10px; margin-top: 10px"
          >
            项目列表
          </div>
          <el-input placeholder="输入关键字进行过滤" v-model="filterText">
          </el-input>
          <div class="tab3">
            <el-tree
              class="filter-tree"
              v-loading="loading"
              :data="Treedata"
              :props="defaultProps"
              show-checkbox
              node-key="proId"
              @check="handleCurrentChecked"
              :default-checked-keys="checkedkey"
              :filter-node-method="filterNode"
              ref="tree"
              :render-content="renderContent"
            >
            </el-tree>
          </div>
        </el-col>
        <el-col :span="5">
          <div
            style="text-align: center; margin-bottom: 10px; margin-top: 10px"
          >
            明细项目列表
          </div>
          <div class="tab3">
            <el-tree
              class="filter-tree"
              v-loading="loading"
              :data="TreedataList"
              node-key="proId"
              :props="defaultProps"
              :filter-node-method="filterNode"
              show-checkbox
              @check-change="handleCurrentChecked1"
              :default-checked-keys="checkedListkey"
              :render-content="renderContent"
            >
            </el-tree>
          </div>
        </el-col>
        <el-col :span="11">
          <div class="grid-content bg-purple">
            <div
              style="text-align: center; margin-bottom: 10px; margin-top: 10px"
            >
              已选项目列表
            </div>
            <el-table
              :data="DataList"
              border
              style="width: 100%"
              height="400"
              :span-method="objectSpanMethod"
            >
              <el-table-column prop="propinName" label="检查项目">
              </el-table-column>
              <el-table-column prop="proPrice" label="原价" width="56px">
              </el-table-column>
              <el-table-column prop="proName" label="明细项目" width="260px">
              </el-table-column>
      <el-tabs
        type="border-card"
        style="height: 640px; margin: 0 10px; width: 100%"
        @tab-click="handleClick"
        v-model="activeNames"
      >
        <el-tab-pane label="组合" name="first">
          <div class="tab8">
            <el-row :gutter="20" style="width: 100%">
              <el-col :span="6">
                <div
                  style="
                    text-align: center;
                    margin-bottom: 10px;
                    margin-top: 10px;
                  "
                >
                  项目列表
                </div>
                <el-input placeholder="输入关键字进行过滤" v-model="filterage">
                </el-input>
                <div class="tab3">
                  <el-tree
                    class="filter-tree"
                    v-loading="loading"
                    :data="packageList"
                    :props="defaultProp"
                    show-checkbox
                    node-key="id"
                    @check="handlepackage"
                    :default-checked-keys="checkedkeys"
                    :filter-node-method="filterpackage"
                    ref="treas"
                    :render-content="renderContents"
                  >
                  </el-tree>
                </div>
              </el-col>
              <el-col :span="6">
                <div
                  style="
                    text-align: center;
                    margin-bottom: 10px;
                    margin-top: 10px;
                  "
                >
                  明细项目列表
                </div>
                <div class="tab3">
                  <el-tree
                    class="filter-tree"
                    v-loading="loading"
                    :data="packagedataList"
                    node-key="proId"
                    :props="defaultpackProps"
                    :render-content="renderContent"
                  >
                  </el-tree>
                </div>
              </el-col>
              <el-col :span="11">
                <div class="grid-content bg-purple">
                  <div
                    style="
                      text-align: center;
                      margin-bottom: 10px;
                      margin-top: 10px;
                    "
                  >
                    已选项目列表
                  </div>
                  <el-table
                    :data="Datalists"
                    border
                    style="width: 100%"
                    height="400"
                    :span-method="objectspanmethod"
                  >
                    <el-table-column prop="propinName" label="检查项目">
                    </el-table-column>
                    <el-table-column
                      prop="proName"
                      label="明细项目"
                      width="260px"
                    >
                    </el-table-column>
                    <el-table-column prop="proPrice" label="原价" width="56px">
                    </el-table-column>
              <el-table-column
                label="操作"
                align="center"
                fixed="right"
                class-name="small-padding fixed-width"
                width="50px"
                    <el-table-column
                      label="操作"
                      align="center"
                      class-name="small-padding fixed-width"
                      width="50px"
                    >
                      <template slot-scope="scope">
                        <el-button
                          size="mini"
                          type="text"
                          icon="el-icon-delete"
                          @click="handleDel(scope.row)"
                          title="删除"
                        ></el-button>
                      </template>
                    </el-table-column>
                  </el-table>
                  <h3 style="font-weight: 600">合计:{{ marryalls }}元</h3>
                </div>
              </el-col>
            </el-row>
          </div>
        </el-tab-pane>
        <el-tab-pane label="单项" name="third">
          <el-row type="flex" class="row-bg" justify="space-around">
            <el-col :span="6">
              <div
                style="
                  text-align: center;
                  margin-bottom: 10px;
                  margin-top: 10px;
                "
              >
                <template slot-scope="scope">
                  <el-button
                    size="mini"
                    type="text"
                    icon="el-icon-delete"
                    @click="handleDelete(scope.row)"
                    title="删除"
                  ></el-button>
                </template>
              </el-table-column>
            </el-table>
            <el-collapse v-model="activeName" accordion v-if="list1">
                项目列表
              </div>
              <el-input placeholder="输入关键字进行过滤" v-model="filterText">
              </el-input>
              <div class="tab3">
                <el-tree
                  class="filter-tree"
                  v-loading="loading"
                  :data="Treedata"
                  :props="defaultProps"
                  show-checkbox
                  node-key="proId"
                  @check="handleCurrentChecked"
                  :default-checked-keys="checkedkey"
                  :filter-node-method="filterNode"
                  ref="tree"
                  :render-content="renderContent"
                >
                </el-tree>
              </div>
            </el-col>
            <el-col :span="5">
              <div
                style="
                  text-align: center;
                  margin-bottom: 10px;
                  margin-top: 10px;
                "
              >
                明细项目列表
              </div>
              <div class="tab3">
                <el-tree
                  class="filter-tree"
                  v-loading="loading"
                  :data="TreedataList"
                  node-key="proId"
                  :props="defaultProps"
                  :filter-node-method="filterNode"
                  show-checkbox
                  @check-change="handleCurrentChecked1"
                  :default-checked-keys="checkedListkey"
                  :render-content="renderContent"
                >
                </el-tree>
              </div>
            </el-col>
            <el-col :span="11">
              <div class="grid-content bg-purple">
                <div
                  style="
                    text-align: center;
                    margin-bottom: 10px;
                    margin-top: 10px;
                  "
                >
                  已选项目列表
                </div>
                <el-table
                  :data="DataList"
                  border
                  style="width: 100%"
                  height="400"
                  :span-method="objectSpanMethod"
                >
                  <el-table-column prop="propinName" label="检查项目">
                  </el-table-column>
                  <el-table-column prop="proPrice" label="原价" width="56px">
                  </el-table-column>
                  <el-table-column
                    prop="proName"
                    label="明细项目"
                    width="260px"
                  >
                  </el-table-column>
                  <el-table-column
                    label="操作"
                    align="center"
                    fixed="right"
                    class-name="small-padding fixed-width"
                    width="50px"
                  >
                    <template slot-scope="scope">
                      <el-button
                        size="mini"
                        type="text"
                        icon="el-icon-delete"
                        @click="handleDelete(scope.row)"
                        title="删除"
                      ></el-button>
                    </template>
                  </el-table-column>
                </el-table>
                <!-- <el-collapse v-model="activeName" accordion v-if="list1">
              <div>
                <el-collapse-item title="请选择项目">
                  <el-table :data="DataList" border style="width: 100%">
@@ -551,71 +692,73 @@
                  </el-table>
                </el-collapse-item>
              </div>
            </el-collapse>
            <template>
              <el-form :model="form">
                <el-form-item label="体检类型" prop="tjType">
                  <el-radio-group v-model="form.tjType">
                    <el-radio :label="1">团队</el-radio>
                    <el-radio :label="2">个人</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-form>
            </template>
            </el-collapse> -->
                <template>
                  <el-form :model="form">
                    <el-form-item label="体检类型" prop="tjType">
                      <el-radio-group v-model="form.tjType">
                        <el-radio :label="1">团队</el-radio>
                        <el-radio :label="2">个人</el-radio>
                      </el-radio-group>
                    </el-form-item>
                  </el-form>
                </template>
            <div class="outside">
              <el-form :inline="true" class="outside1">
                <el-form-item label="原价">
                  <el-input
                    placeholder="原价"
                    :value="TotalPrice1"
                    disabled
                    style="width: 90px"
                  ></el-input>
                </el-form-item>
                <el-form-item label="折扣设定">
                  <el-input
                    style="width: 90px"
                    type="number"
                    v-model="discount"
                    :value="discount"
                  ></el-input>
                </el-form-item>
                <el-form-item label="应付金额">
                  <el-input
                    placeholder="应付金额"
                    :value="TotalPrice1 * (discount / 10)"
                    style="width: 90px"
                  ></el-input>
                </el-form-item>
                <el-form-item label="付款类型" prop="payType">
                  <el-select
                    style="width: 120px"
                    v-model="payType"
                    placeholder="请选择付款类型"
                  >
                    <el-option
                      v-for="dict in dict.type.dict_pay_type"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item>
                  <el-button
                    type="primary"
                    @click="submitPrice"
                    :disabled="confirm"
                    style="margin-top: 34px"
                    >提交</el-button
                  >
                </el-form-item>
              </el-form>
            </div>
          </div>
        </el-col>
      </el-row>
                <div class="outside">
                  <el-form :inline="true" class="outside1">
                    <el-form-item label="原价">
                      <el-input
                        placeholder="原价"
                        :value="TotalPrice1"
                        disabled
                        style="width: 90px"
                      ></el-input>
                    </el-form-item>
                    <el-form-item label="折扣设定">
                      <el-input
                        style="width: 90px"
                        type="number"
                        v-model="discount"
                        :value="discount"
                      ></el-input>
                    </el-form-item>
                    <el-form-item label="应付金额">
                      <el-input
                        placeholder="应付金额"
                        :value="TotalPrice1 * (discount / 10)"
                        style="width: 90px"
                      ></el-input>
                    </el-form-item>
                    <el-form-item label="付款类型" prop="payType">
                      <el-select
                        style="width: 120px"
                        v-model="payType"
                        placeholder="请选择付款类型"
                      >
                        <el-option
                          v-for="dict in dict.type.dict_pay_type"
                          :key="dict.value"
                          :label="dict.label"
                          :value="dict.value"
                        ></el-option>
                      </el-select>
                    </el-form-item>
                    <el-form-item>
                      <el-button
                        type="primary"
                        @click="submitPrice"
                        :disabled="confirm"
                        style="margin-top: 34px"
                        >提交</el-button
                      >
                    </el-form-item>
                  </el-form>
                </div>
              </div>
            </el-col>
          </el-row>
        </el-tab-pane>
      </el-tabs>
    </el-dialog>
    <!-- 添加补录项目 -->
@@ -625,184 +768,321 @@
      width="1100px"
      style="height: 860px"
      append-to-body
      :close-on-click-modal="false"
    >
      <el-row type="flex" class="row-bg" justify="space-around">
        <el-col :span="6">
          <div
            style="text-align: center; margin-bottom: 10px; margin-top: 10px"
          >
            项目列表
          </div>
          <el-input placeholder="输入关键字进行过滤" v-model="filterText">
          </el-input>
          <div class="tab3">
            <el-tree
              class="filter-tree"
              v-loading="loading"
              :data="Treedata"
              :props="defaultProps"
              show-checkbox
              node-key="proId"
              @check="handleCurrentChecked"
              :default-checked-keys="checkedkey"
              :filter-node-method="filterNode"
              ref="tree"
              :render-content="renderContent"
            >
            </el-tree>
          </div>
        </el-col>
        <el-col :span="5">
          <div
            style="text-align: center; margin-bottom: 10px; margin-top: 10px"
          >
            明细项目列表
          </div>
          <div class="tab3">
            <div class="outside1">
              <el-tree
                class="filter-tree"
                v-loading="loading"
                :data="TreedataList"
                node-key="proId"
                :props="defaultProps"
                :filter-node-method="filterNode"
                show-checkbox
                @check-change="handleCurrentChecked1"
                :default-checked-keys="checkedListkey"
                :render-content="renderContent"
              >
              </el-tree>
            </div>
          </div>
        </el-col>
        <el-col :span="11">
          <div class="grid-content bg-purple">
            <div
              style="text-align: center; margin-bottom: 10px; margin-top: 10px"
            >
              已选项目列表
            </div>
            <el-table
              :data="DataList"
              border
              style="width: 100%"
              height="400"
              :span-method="objectSpanMethod"
            >
              <el-table-column prop="propinName" label="检查项目">
              </el-table-column>
              <el-table-column prop="proPrice" label="原价" width="56px">
              </el-table-column>
              <el-table-column prop="proName" label="明细项目" width="260px">
              </el-table-column>
              <el-table-column
                label="操作"
                align="center"
                fixed="right"
                class-name="small-padding fixed-width"
                width="50px"
              >
                <template slot-scope="scope">
                  <el-button
                    size="mini"
                    type="text"
                    icon="el-icon-delete"
                    @click="handleDelete(scope.row)"
                    title="删除"
                  ></el-button>
                </template>
              </el-table-column>
            </el-table>
            <el-collapse v-model="activeName" accordion v-if="list1">
              <div>
                <el-collapse-item title="请选择项目">
      <el-tabs
        type="border-card"
        style="height: 640px; margin: 0 10px; width: 100%"
        @tab-click="handleClick"
        v-model="activeNames"
      >
        <el-tab-pane label="组合" name="first">
          <div class="tab8">
            <el-row :gutter="20" style="width: 100%">
              <el-col :span="6">
                <div
                  style="
                    text-align: center;
                    margin-bottom: 10px;
                    margin-top: 10px;
                  "
                >
                  项目列表
                </div>
                <el-input placeholder="输入关键字进行过滤" v-model="filterage">
                </el-input>
                <div class="tab3">
                  <el-tree
                    class="filter-tree"
                    v-loading="loading"
                    :data="packageList"
                    :props="defaultProp"
                    show-checkbox
                    node-key="id"
                    @check="handlepackage"
                    :default-checked-keys="checkedkeys"
                    :filter-node-method="filterpackage"
                    ref="treas"
                    :render-content="renderContents"
                  >
                  </el-tree>
                </div>
              </el-col>
              <el-col :span="6">
                <div
                  style="
                    text-align: center;
                    margin-bottom: 10px;
                    margin-top: 10px;
                  "
                >
                  明细项目列表
                </div>
                <div class="tab3">
                  <el-tree
                    class="filter-tree"
                    v-loading="loading"
                    :data="packagedataList"
                    node-key="proId"
                    :props="defaultpackProps"
                    :render-content="renderContent"
                  >
                  </el-tree>
                </div>
              </el-col>
              <el-col :span="11">
                <div class="grid-content bg-purple">
                  <div
                    style="
                      text-align: center;
                      margin-bottom: 10px;
                      margin-top: 10px;
                    "
                  >
                    已选项目列表
                  </div>
                  <el-table
                    :data="DataList"
                    :data="Datalists"
                    border
                    style="width: 100%"
                    height="400"
                    :span-method="objectSpanMethod"
                    :span-method="objectspanmethod"
                  >
                    <el-table-column prop="proName" label="项目" width="180">
                    <el-table-column prop="propinName" label="检查项目">
                    </el-table-column>
                    <el-table-column prop="ordPrice" label="原价">
                    <el-table-column
                      prop="proName"
                      label="明细项目"
                      width="260px"
                    >
                    </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">
                        <el-button
                          size="mini"
                          type="text"
                          icon="el-icon-delete"
                          @click="handleDel(scope.row)"
                          title="删除"
                        ></el-button>
                      </template>
                    </el-table-column>
                  </el-table>
                </el-collapse-item>
              </div>
            </el-collapse>
            <template>
              <el-form :model="form">
                <el-form-item label="体检类型" prop="tjType">
                  <el-radio-group v-model="form.tjType">
                    <el-radio :label="1">团队</el-radio>
                    <el-radio :label="2">个人</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-form>
            </template>
            <div class="outside">
              <el-form :inline="true" class="outside1">
                <el-form-item label="原价">
                  <el-input
                    placeholder="原价"
                    :value="TotalPrice1"
                    disabled
                    style="width: 90px"
                  ></el-input>
                </el-form-item>
                <el-form-item label="折扣设定">
                  <el-input
                    style="width: 90px"
                    type="number"
                    v-model="discount"
                    :value="discount"
                  ></el-input>
                </el-form-item>
                <el-form-item label="应付金额">
                  <el-input
                    placeholder="应付金额"
                    :value="TotalPrice1 * (discount / 10)"
                    style="width: 90px"
                  ></el-input>
                </el-form-item>
                <el-form-item label="付款类型" prop="payType">
                  <el-select
                    style="width: 120px"
                    v-model="payType"
                    placeholder="请选择付款类型"
                  >
                    <el-option
                      v-for="dict in dict.type.dict_pay_type"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item>
                  <el-button
                    type="primary"
                    @click="submitPrice1"
                    :disabled="confirm"
                    style="margin-top: 34px"
                    >提交</el-button
                  >
                </el-form-item>
              </el-form>
            </div>
                  <h3 style="font-weight: 600">合计:{{ marryalls }}元</h3>
                </div>
              </el-col>
            </el-row>
          </div>
        </el-col>
      </el-row>
        </el-tab-pane>
        <el-tab-pane label="单项" name="third">
          <el-row type="flex" class="row-bg" justify="space-around">
            <el-col :span="6">
              <div
                style="
                  text-align: center;
                  margin-bottom: 10px;
                  margin-top: 10px;
                "
              >
                项目列表
              </div>
              <el-input placeholder="输入关键字进行过滤" v-model="filterText">
              </el-input>
              <div class="tab3">
                <el-tree
                  class="filter-tree"
                  v-loading="loading"
                  :data="Treedata"
                  :props="defaultProps"
                  show-checkbox
                  node-key="proId"
                  @check="handleCurrentChecked"
                  :default-checked-keys="checkedkey"
                  :filter-node-method="filterNode"
                  ref="tree"
                  :render-content="renderContent"
                >
                </el-tree>
              </div>
            </el-col>
            <el-col :span="5">
              <div
                style="
                  text-align: center;
                  margin-bottom: 10px;
                  margin-top: 10px;
                "
              >
                明细项目列表
              </div>
              <div class="tab3">
                <div class="outside1">
                  <el-tree
                    class="filter-tree"
                    v-loading="loading"
                    :data="TreedataList"
                    node-key="proId"
                    :props="defaultProps"
                    :filter-node-method="filterNode"
                    show-checkbox
                    @check-change="handleCurrentChecked1"
                    :default-checked-keys="checkedListkey"
                    :render-content="renderContent"
                  >
                  </el-tree>
                </div>
              </div>
            </el-col>
            <el-col :span="11">
              <div class="grid-content bg-purple">
                <div
                  style="
                    text-align: center;
                    margin-bottom: 10px;
                    margin-top: 10px;
                  "
                >
                  已选项目列表
                </div>
                <el-table
                  :data="DataList"
                  border
                  style="width: 100%"
                  height="400"
                  :span-method="objectSpanMethod"
                >
                  <el-table-column prop="propinName" label="检查项目">
                  </el-table-column>
                  <el-table-column prop="proPrice" label="原价" width="56px">
                  </el-table-column>
                  <el-table-column
                    prop="proName"
                    label="明细项目"
                    width="260px"
                  >
                  </el-table-column>
                  <el-table-column
                    label="操作"
                    align="center"
                    fixed="right"
                    class-name="small-padding fixed-width"
                    width="50px"
                  >
                    <template slot-scope="scope">
                      <el-button
                        size="mini"
                        type="text"
                        icon="el-icon-delete"
                        @click="handleDelete(scope.row)"
                        title="删除"
                      ></el-button>
                    </template>
                  </el-table-column>
                </el-table>
                <!-- <el-collapse v-model="activeName" accordion v-if="list1">
                  <div>
                    <el-collapse-item title="请选择项目">
                      <el-table
                        :data="DataList"
                        border
                        style="width: 100%"
                        height="400"
                        :span-method="objectSpanMethod"
                      >
                        <el-table-column
                          prop="proName"
                          label="项目"
                          width="180"
                        >
                        </el-table-column>
                        <el-table-column prop="ordPrice" label="原价">
                        </el-table-column>
                      </el-table>
                    </el-collapse-item>
                  </div>
                </el-collapse> -->
                <template>
                  <el-form :model="form">
                    <el-form-item label="体检类型" prop="tjType">
                      <el-radio-group v-model="form.tjType">
                        <el-radio :label="1">团队</el-radio>
                        <el-radio :label="2">个人</el-radio>
                      </el-radio-group>
                    </el-form-item>
                  </el-form>
                </template>
                <div class="outside">
                  <el-form :inline="true" class="outside1">
                    <el-form-item label="原价">
                      <el-input
                        placeholder="原价"
                        :value="TotalPrice1"
                        disabled
                        style="width: 90px"
                      ></el-input>
                    </el-form-item>
                    <el-form-item label="折扣设定">
                      <el-input
                        style="width: 90px"
                        type="number"
                        v-model="discount"
                        :value="discount"
                      ></el-input>
                    </el-form-item>
                    <el-form-item label="应付金额">
                      <el-input
                        placeholder="应付金额"
                        :value="TotalPrice1 * (discount / 10)"
                        style="width: 90px"
                      ></el-input>
                    </el-form-item>
                    <el-form-item label="付款类型" prop="payType">
                      <el-select
                        style="width: 120px"
                        v-model="payType"
                        placeholder="请选择付款类型"
                      >
                        <el-option
                          v-for="dict in dict.type.dict_pay_type"
                          :key="dict.value"
                          :label="dict.label"
                          :value="dict.value"
                        ></el-option>
                      </el-select>
                    </el-form-item>
                    <el-form-item>
                      <el-button
                        type="primary"
                        @click="submitPrice1"
                        :disabled="confirm"
                        style="margin-top: 34px"
                        >提交</el-button
                      >
                    </el-form-item>
                  </el-form>
                </div>
              </div>
            </el-col>
          </el-row>
        </el-tab-pane>
      </el-tabs>
    </el-dialog>
    <!-- 添加或修改体检记录对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="950px" append-to-body >
    <el-dialog :title="title" :visible.sync="open" width="950px" append-to-body :close-on-click-modal="false">
      <el-tabs v-model="activeName1" type="card">
        <!-- <el-tab-pane label="订单流水" name="first">
          <el-table :data="numberList" style="width: 100%">
@@ -839,7 +1119,7 @@
            </el-table-column>
          </el-table>
        </el-tab-pane> -->
        <el-tab-pane label="项目汇总" name="second" style="height: 400px;">
        <el-tab-pane label="项目汇总" name="second" style="height: 400px">
          <el-table :data="huizongList" style="width: 100%" max-height="200">
            <el-table-column
              align="center"
@@ -865,7 +1145,7 @@
            </el-table-column>
          </el-table>
        </el-tab-pane>
        <el-tab-pane label="明细项目" name="third" style="height: 350px;">
        <el-tab-pane label="明细项目" name="third" style="height: 350px">
          <el-table
            :data="infoList"
            style="width: 100%"
@@ -910,6 +1190,7 @@
      width="1100px"
      style="height: 860px"
      append-to-body
      :close-on-click-modal="false"
    >
      <el-row type="flex" class="row-bg" justify="space-around">
        <el-col :span="13">
@@ -920,7 +1201,13 @@
          </div>
          <div class="tab3">
            <el-table :data="DataLists" border style="width: 100%" height="400"  @selection-change="handleProjectssChange" >
            <el-table
              :data="DataLists"
              border
              style="width: 100%"
              height="400"
              @selection-change="handleProjectssChange"
            >
              <el-table-column type="selection" width="40" align="center" />
              <el-table-column
                type="index"
@@ -957,7 +1244,6 @@
                width="96px"
              >
              </el-table-column>
            </el-table>
          </div>
        </el-col>
@@ -1003,9 +1289,11 @@
  getNewDateList,
  revokeTjOrderByTjNum,
  getTransitionInfo,
  getBlproByTjh,revokeBlProByBldhAndTjh
  getBlproByTjh,
  revokeBlProByBldhAndTjh,
} from "@/api/hosp/order";
import moment from "moment";
import { getZhList, getlistByZhId } from "@/api/system/package";
import { getwater } from "@/api/hosp/customer";
import ViewPdf from "@/components/ViewPdf";
import {
@@ -1023,9 +1311,10 @@
  data() {
    return {
      huizongList: [],
      DataLists:[],
      DataLists: [],
      infoList: [],
      bldhs:[],
      bldhs: [],
      filterage: "",
      activeName1: "second",
      filterText: "",
      orderIds: "",
@@ -1035,13 +1324,20 @@
      cusIds: "",
      userIds: "",
      cusIdcard: "",
      defaultpackProps: {
        children: [],
        label: "proName",
      },
      cusName: "",
      cusPhone: "",
      cusSex: "",
      reportTimeList: "",
      createTimeList: "",
      packagedataList: [],
      cusId: "",
      payType: "0",
      packageList: [],
      checkedkeys: [],
      dialogVisible: false,
      daoZhenDan: false,
      Projectopen: false,
@@ -1051,12 +1347,16 @@
      flag: true,
      bill: [],
      Treedata: [],
      DataListss:[],
      DataListss: [],
      checkedkey: [],
      checkedListkey: [],
      defaultProps: {
        children: [],
        label: "proName",
      },
      defaultProp: {
        children: [],
        label: "zhmc",
      },
      TreedataList: [],
      discount: 10,
@@ -1076,6 +1376,7 @@
      dataObj: {},
      // 非单个禁用
      single: true,
      activeNames: "first",
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
@@ -1090,8 +1391,10 @@
      orderId: "",
      // 是否显示弹出层
      open: false,
      Datalists: [],
      // 日期范围
      datetimerange: [],
      marryalls: 0,
      // 查询参数
      queryParams: {
        pageNum: 1,
@@ -1101,6 +1404,7 @@
        tjNum: null,
        bgbeginTime: null,
        bgendTime: null,
        xmmc:null,
      },
      startTime: "",
      startTime1: "",
@@ -1146,6 +1450,9 @@
  watch: {
    filterText(val) {
      this.$refs.tree.filter(val);
    },
    filterage(val) {
      this.$refs.treas.filter(val);
    },
  },
  created() {
@@ -1393,6 +1700,53 @@
      this.queryParams.pageNum = 1;
      this.getList();
    },
    renderContents(h, { node, data, store }) {
      return (
        <span class="custom-tree-node">
          <span>{node.label}</span>
          <span>({data.price}元)</span>
        </span>
      );
    },
    objectspanmethod({ row, column, rowIndex, columnIndex }) {
      let fields = ["propinName"];
      let cellValue = row[column.property];
      if (cellValue && fields.includes(column.property)) {
        let prevRow = this.Datalists[rowIndex - 1];
        let nextRow = this.Datalists[rowIndex + 1];
        if (prevRow && prevRow[column.property] === cellValue) {
          return { rowspan: 0, colspan: 0 };
        } else {
          let countRowspan = 1;
          while (nextRow && nextRow[column.property] === cellValue) {
            nextRow = this.Datalists[++countRowspan + rowIndex];
          }
          if (countRowspan > 1) {
            return { rowspan: countRowspan, colspan: 1 };
          }
        }
      }
      // if (columnIndex == 3) {
      //   let rowspan = 0;
      //   this.DataLists.forEach((element) => {
      //     if (element.propinName === row.propinName) {
      //       rowspan++;
      //     }
      //   });
      //   return [rowspan, 1];
      // }
    },
    filterpackage(value, data) {
      if (!value) return true;
      if (data.zhmc.indexOf(value) !== -1) {
        return data.zhmc.indexOf(value) !== -1;
      } else {
        return data.pym.indexOf(value) !== -1;
      }
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.startTime = [];
@@ -1412,6 +1766,7 @@
        this.cusName = item.tjCustomerName;
        this.cusPhone = item.tjCustomerPhone;
        this.cusSex = item.tjCustomerSex;
        this.form.tjType = parseInt(item.tjType);
      });
      this.ids = selection.map((item) => item.orderId);
      // this.tjNumbers = selection.map((item) => item.tjNumber);
@@ -1432,16 +1787,20 @@
      getNumber(tjNumber).then((response) => {
        // this.form = response.data;
        this.numberList = response.data.charging;
        this.bill =[]
        this.bill = [];
        var copeWith = 0;
        var paidIn = 0;
        var discount = ""
        response.data.water.forEach(item => {
        var discount = "";
        response.data.water.forEach((item) => {
          copeWith += item.copeWith;
          paidIn+= item.copeWith;
          discount= item.discount
        })
        this.bill.push({copeWith:copeWith,paidIn:paidIn,discount:discount});
          paidIn += item.copeWith;
          discount = item.discount;
        });
        this.bill.push({
          copeWith: copeWith,
          paidIn: paidIn,
          discount: discount,
        });
        this.title = "订单流水";
      });
@@ -1469,18 +1828,22 @@
      getNumber(tjNumber).then((response) => {
        // this.form = response.data;
        this.numberList = response.data.charging;
        this.bill =[]
        this.bill = [];
        var copeWith = 0;
        var paidIn = 0;
        var discount = ""
        response.data.water.forEach(item => {
        var discount = "";
        response.data.water.forEach((item) => {
          copeWith += item.copeWith;
          paidIn+= item.copeWith;
          discount= item.discount
        })
        this.bill.push({copeWith:copeWith,paidIn:paidIn,discount:discount});
          paidIn += item.copeWith;
          discount = item.discount;
        });
        this.bill.push({
          copeWith: copeWith,
          paidIn: paidIn,
          discount: discount,
        });
        console.log(this.bill)
        console.log(this.bill);
        this.title = "订单流水";
      });
      getTransitionInfo(tjNumber).then((res) => {
@@ -1499,6 +1862,62 @@
            1;
        });
      });
    },
    handleClick(tab, event) {
      if (this.activeNames == "first") {
        this.marryalls = 0;
        this.Datalists = [];
        this.checkedkeys = [];
        getZhList().then((response) => {
          if (response.data) {
            this.packageList = response.data;
          }
          this.loading = false;
        });
      } else {
        console.log(111)
        this.TotalPrice1 = 0;
        this.checkedkey =[]
        this.DataList = []
        this.getDataList();
        if (this.marryalls != 0) {
          this.TotalPrice1 += this.marryalls;
        }
      }
    },
    handlepackage(data, checked, checkedNodes) {
      if (checked.checkedNodes.length != 0) {
        this.$refs.treas.setCheckedKeys([data.id]);
        let datas = {
          zhId: data.id,
        };
        getlistByZhId(datas).then((res) => {
          this.packagedataList = res.data.tjProjectList;
          for (var i = 0; i < this.packagedataList.length; i++) {
            let proId = this.packagedataList[i].proId;
            getProSonDxList(proId).then((res) => {
              this.TreedataList = res.data.list;
              this.TreedataList.forEach((item) => {
                this.Datalists.push(item);
                if (this.Datalists.length >= 1) {
                  this.marryalls = 0;
                  this.Datalists.forEach((item1) => {
                    this.marryalls += item1.proPrice;
                    this.packagedataList.forEach((item3) => {
                      if (item1.proParentId == item3.proId) {
                        item1.propinName = item3.proName;
                      }
                    });
                  });
                }
              });
            });
          }
        });
      } else if (checked.checkedNodes.length == 0) {
      }
    },
    renderContent(h, { node, data, store }) {
@@ -1526,10 +1945,12 @@
      if (row.tjType) {
        this.form.tjType = parseInt(row.tjType);
      } else {
        this.form.tjType = 0;
        this.form.tjType = 2;
      }
      this.activeNames = "first";
      /** 查询部门下拉树结构 */
      this.getDataList();
      this.handleClick();
      this.Projectopen = true;
      this.title = "补录项目";
    },
@@ -1537,33 +1958,33 @@
    getDataList() {
      getProParentIdDxList().then((response) => {
        this.Treedata = response.data.list;
        this.checkedkey.push(this.Treedata[0].proId);
        let proId = this.Treedata[0].proId;
        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;
            });
          });
          this.TotalPrice1 = 0;
        // this.checkedkey.push(this.Treedata[0].proId);
        // let proId = this.Treedata[0].proId;
        // 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;
        //     });
        //   });
        //   this.TotalPrice1 = 0;
          if (this.DataList.length != 0) {
            this.list1 = false;
            this.DataList.forEach((item) => {
              this.TotalPrice1 = item.proPrice + this.TotalPrice1;
            });
          }
        });
        //   if (this.DataList.length != 0) {
        //     this.list1 = false;
        //     this.DataList.forEach((item) => {
        //       this.TotalPrice1 = item.proPrice + this.TotalPrice1;
        //     });
        //   }
        // });
        this.loading = false;
      });
    },
    revokeProject() {
      getBlproByTjh(this.tjnumbers).then((res) => {
        if (res.data) {
          this.DataLists = res.data
          this.DataLists = res.data;
          this.Projectssopen = true;
          this.title1 = "撤销补录";
        } else {
@@ -1587,8 +2008,10 @@
        cusPhone: this.cusPhone,
        cusSex: this.cusSex,
      };
      this.activeNames = "first";
      /** 查询部门下拉树结构 */
      this.getDataList();
      this.handleClick();
      this.Projectopen1 = true;
      this.title = "补录项目";
    },
@@ -1617,6 +2040,9 @@
            this.DataList.forEach((item) => {
              this.TotalPrice1 = item.proPrice + this.TotalPrice1;
            });
            if (this.marryalls != 0) {
          this.TotalPrice1 += this.marryalls;
        }
          }
        });
      } else if (checked.checkedNodes.length == 0) {
@@ -1651,6 +2077,9 @@
            this.DataList.forEach((item1) => {
              this.TotalPrice1 = item1.proPrice + this.TotalPrice1;
            });
            if (this.marryalls != 0) {
          this.TotalPrice1 += this.marryalls;
        }
          }
        });
      } else if (checked == true) {
@@ -1665,9 +2094,22 @@
        this.DataList.forEach((item1) => {
          this.TotalPrice1 = item1.proPrice + this.TotalPrice1;
        });
        if (this.marryalls != 0) {
          this.TotalPrice1 += this.marryalls;
        }
      }
    },
    handleDel(row) {
      this.Datalists.forEach((item, index) => {
        if (item.proId == row.proId) {
          this.Datalists.splice(index, 1);
          this.marryalls = 0;
          this.Datalists.forEach((item1) => {
            this.marryalls += item1.proPrice;
          });
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      this.DataList.forEach((item, index) => {
@@ -1677,6 +2119,9 @@
          this.DataList.forEach((item1) => {
            this.TotalPrice1 = item1.proPrice + this.TotalPrice1;
          });
          if (this.marryalls != 0) {
          this.TotalPrice1 += this.marryalls;
        }
        }
      });
    },
@@ -1753,6 +2198,11 @@
          this.proIds.push(item.proId);
        });
      }
      if (this.Datalists.length != 0) {
        this.Datalists.forEach((item) => {
          this.proIds.push(item.proId);
        });
      }
      let data = {
        cusId: this.cusId,
        proIds: this.proIds,
@@ -1794,6 +2244,11 @@
          this.proIds.push(item.proId);
        });
      }
      if (this.Datalists.length != 0) {
        this.Datalists.forEach((item) => {
          this.proIds.push(item.proId);
        });
      }
      let data = {
        cusId: this.cusIds,
        proIds: this.proIds,
@@ -1828,23 +2283,22 @@
      });
    },
    handleProjectssChange(selection){
      this.DataListss =[]
    handleProjectssChange(selection) {
      this.DataListss = [];
      this.bldhs = selection.map((item) => item.bldh);
      selection.forEach(item => {
        item.projectList.forEach(item1 => {
          item1.children.forEach(item2 => {
            this.DataListss.push(item2)
            if(this.DataListss.length != 0){
              this.DataListss.forEach(item => {
                if(item.proParentId ==item1.proId )
                item.propinName= item1.proName
              })
      selection.forEach((item) => {
        item.projectList.forEach((item1) => {
          item1.children.forEach((item2) => {
            this.DataListss.push(item2);
            if (this.DataListss.length != 0) {
              this.DataListss.forEach((item) => {
                if (item.proParentId == item1.proId)
                  item.propinName = item1.proName;
              });
            }
          })
        })
      })
          });
        });
      });
    },
    /** 提交按钮 */
@@ -1857,18 +2311,18 @@
        .then(() => {
          let data = {
            tjh: this.tjnumbers,
            bldhs:this.bldhs
          }
          revokeBlProByBldhAndTjh(data).then(res => {
            this.Projectssopen =false
          })
            bldhs: this.bldhs,
          };
          revokeBlProByBldhAndTjh(data).then((res) => {
            this.Projectssopen = false;
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消撤销",
          });
          this.Projectssopen =false
          this.Projectssopen = false;
        });
    },