qinxianzhangyao
2024-05-20 41332257f7889df6032fa3c64a7f3998e4b65524
src/views/reservation/groupcheck/index.vue
@@ -8,17 +8,16 @@
        :inline="true"
        label-width="100px"
      >
        <el-form-item label="单位名称" prop="drugManufacturerId">
      <el-form-item label="单位名称" prop="compId">
          <el-select
            :remote-method="getRemoteData"
            v-model="objs.drugManufacturerId"
          v-model="objs.compId"
            remote
            filterable
            style="width: 200px"
            placeholder="请选择单位名称"
            clearable
            @clear="getCompanyList"
            @change="idFn"
          >
            <el-option
              v-for="dict in CompanyList"
@@ -29,22 +28,13 @@
          </el-select>
          <i class="el-icon-circle-plus-outline" @click="handleAdd"></i>
        </el-form-item>
        <el-form-item label="部门" prop="dwDeptName">
          <el-select
            v-model="objs.dwDeptName"
            placeholder="请选择部门"
            style="width: 200px"
      <el-form-item label="姓名" prop="name">
        <el-input
          v-model="objs.name"
          placeholder="请输入姓名"
            clearable
            @change="idBm"
          >
            <el-option
              v-for="dict in deptList"
              :key="dict.id"
              :label="dict.dwDeptName"
              :value="dict.id"
          @keyup.enter.native="handleQuery"
            />
          </el-select>
          <i class="el-icon-circle-plus-outline" @click="handleAddbumen"></i>
        </el-form-item>
        <el-form-item label="预约时间" prop="reservationTime">
          <el-date-picker
@@ -100,23 +90,40 @@
          >
        </el-col>
      </el-row>
      <div style="margin: 5px 20px; width: 94%">
    <el-row :gutter="20" style="margin: 8px 15px">
      <el-col :span="12">
        <div>
        <el-table
          v-loading="loading"
          :data="userList"
          :summary-method="getSummaries"
          show-summary
            @selection-change="handleSelectionChange"
          border
        >
        <el-table-column type="selection" width="55" align="center" fixed="left" />
            <el-table-column
              type="selection"
              width="55"
              align="center"
              fixed="left"
            />
          <el-table-column
            label="单位名称"
            align="center"
            prop="company"
            width="200"
          />
          <el-table-column label="工号" align="center" prop="jobNo" width="80" />
          <el-table-column label="姓名" align="center" prop="name" width="75" />
            <el-table-column
              label="工号"
              align="center"
              prop="jobNo"
              width="80"
            />
            <el-table-column
              label="姓名"
              align="center"
              prop="name"
              width="75"
            />
          <el-table-column label="性别" align="center" prop="sex" width="75">
            <template slot-scope="scope">
              <dict-tag
@@ -131,7 +138,12 @@
            prop="idCard"
            width="200"
          />
          <el-table-column label="年龄" align="center" prop="age" width="75" />
            <el-table-column
              label="年龄"
              align="center"
              prop="age"
              width="75"
            />
          <el-table-column
            label="出生日期"
            align="center"
@@ -140,7 +152,11 @@
          />
          <el-table-column label="职位" align="center" prop="position" />
          <el-table-column label="部门" align="center" prop="department" />
          <el-table-column label="部门编号" align="center" prop="departmentId" />
            <el-table-column
              label="部门编号"
              align="center"
              prop="departmentId"
            />
          <el-table-column
            label="联系电话"
            align="center"
@@ -161,7 +177,12 @@
              />
            </template>
          </el-table-column>
          <el-table-column label="民族" align="center" prop="nation" key="nation">
            <el-table-column
              label="民族"
              align="center"
              prop="nation"
              key="nation"
            >
            <template slot-scope="scope">
              <dict-tag
                :options="dict.type.dict_user_national"
@@ -174,7 +195,62 @@
          <el-table-column label="分组" align="center" prop="groupingName" />
          <el-table-column label="项目收费" align="center" prop="ysPrice" />
        </el-table>
          <div class="pag">
      <div class="pag1">
        <pagination v-show="total > 0" :total="total" :page.sync="objs.page"
          :limit.sync="objs.pageSize" @pagination="handleQuery" />
      </div>
    </div>
        </div>
      </el-col>
      <el-col :span="12">
        <el-table
            :data="selectList"
            border
          >
            <el-table-column
              label="工号"
              align="center"
              prop="jobNo"
              width="80"
            />
            <el-table-column
              label="姓名"
              align="center"
              prop="name"
              width="75"
            />
            <el-table-column label="性别" align="center" prop="sex" width="75">
              <template slot-scope="scope">
                <dict-tag
                  :options="dict.type.sys_user_sex"
                  :value="scope.row.sex"
                />
              </template>
            </el-table-column>
            <el-table-column
              label="身份证号"
              align="center"
              prop="idCard"
              width="200"
            />
            <el-table-column
              label="联系电话"
              align="center"
              prop="phoe"
              width="120"
            />
            <el-table-column label="分组" align="center" prop="groupingName" />
            <el-table-column label="项目收费" align="center" prop="ysPrice" />
            <el-table-column fixed="right" label="操作" align="center" width="90px" class-name="small-padding fixed-width">
        <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-col>
    </el-row>
  
      <!-- 添加或修改体检单位信息维护对话框 -->
      <div class="dia">
@@ -276,58 +352,6 @@
          </div>
        </el-dialog>
      </div>
      <!-- 添加或修改部门信息维护对话框 -->
      <div class="dia">
        <el-dialog
          :title="title"
          :visible.sync="open1"
          width="1000px"
          append-to-body
        >
          <el-form
            ref="form"
            :model="form"
            :rules="rules"
            label-width="100px"
            :inline="true"
          >
          <el-form-item label="单位名称" prop="drugManufacturerId">
          <el-select
            :remote-method="getRemoteData"
            v-model="objs.drugManufacturerId"
            remote
            filterable
            style="width: 200px"
            placeholder="请选择单位名称"
            clearable
            @clear="getCompanyList"
            @change="idFn1"
          >
            <el-option
              v-for="dict in CompanyList"
              :key="dict.cnName"
              :label="dict.cnName"
              :value="dict.drugManufacturerId"
            />
          </el-select>
        </el-form-item>
            <el-form-item label="部门名称" prop="dwDeptName">
              <el-input v-model="form.dwDeptName" placeholder="请输入部门名称" />
            </el-form-item>
            <el-form-item label="签约金额" prop="signingPrice">
              <el-input
                v-model="form.signingPrice"
                placeholder="请输入签约金额"
              />
            </el-form-item>
          </el-form>
          <div slot="footer" class="dialog-footer2">
            <el-button type="primary" @click="handleAddDept">确 定</el-button>
            <el-button @click="cancel">取 消</el-button>
          </div>
        </el-dialog>
      </div>
    </div>
  </template>
  
@@ -335,12 +359,9 @@
  import {
    addDept,
    addComp,
    Deptlist,
    getDwAndDwDept,
    newExcelImport,
  Deptlist,getCusTomterListByCompId
  } from "@/api/system/comp";
  import { newConfirm, getCompany, queryCompany } from "@/api/team/tuanti";
  import { getToken } from "@/utils/auth";
import {  getCompany, queryCompany } from "@/api/team/tuanti";
  
  export default {
    dicts: [
@@ -375,6 +396,7 @@
          },
        },
        CompanyList: [],
      selectList:[],
        tableData: [], // 表数据
        form: {
          company: "",
@@ -385,12 +407,8 @@
          discount: "",
        },
        size: "",
        creaseopen: false,
        // 套餐提交按钮
        confirm: false,
        TotalPrice: 0,
        TotalPrice1: 0,
        discount: 100,
        deptList: [],
        data: {
          dwId: "",
@@ -399,9 +417,11 @@
        },
  
        objs: {
          drugManufacturerId: "",
          dwDeptName: "",
          reservationTime: "",
        compId: null,
        name: null,
        reservationTime: null,
        page:1,
        pageSize:10
        },
        // 非单个禁用
        single: true,
@@ -414,7 +434,7 @@
        // 查询参数
        queryParam: {
          pageNum: 1,
          pageSize: 10
        pageSize: 10,
        },
        // 表单参数
        form: {},
@@ -550,7 +570,10 @@
    },
    methods: {
        handleQuery(){
      getCusTomterListByCompId(this.objs).then(res => {
        this.userList = res.data.records
        this.total = res.data.total
      })
        },
      // 保存部门
      handleAddDept() {
@@ -567,90 +590,27 @@
          }
        });
      },
      idFn(value) {
        console.log(value);
        if (value) {
          this.data.dwId = value;
          Deptlist(value).then((response) => {
            this.deptList = response.data;
          });
        }
      },
      idFn1(value) {
        console.log(value);
        if (value) {
          this.data.dwId = value;
          this.CompanyList.forEach(item=>{
            console.log(item);
            if(item.drugManufacturerId == this.data.dwId){
              this.data.dwName = item.cnName
            }
          })
        }
      },
      idBm(value) {
        this.data.dwDeptId = value;
    // idFn(value) {
    //   console.log(value);
    //   if (value) {
    //     this.data.dwId = value;
    //     Deptlist(value).then((response) => {
    //       this.deptList = response.data;
    //     });
    //   }
    // },
      // 多选框选中数据
      handleSelectionChange(selection) {
        console.log(selection)
      // this.ids = selection.map((item) => item.cusId);
      // this.single = selection.length !== 1;
      // this.multiple = !selection.length;
      },
  
      getSummaries(param) {
        const { columns, data } = param;
        const sums = [];
        columns.forEach((column, index) => {
          if (index === 0) {
            sums[index] = "合计";
            return;
          }
          if (index === 1) {
            sums[index] = "总计人数";
            return;
          }
          if (index === 2) {
            sums[index] = this.ListObj.count;
            return;
          }
          if (index === 7) {
            sums[index] = "男组人数";
            return;
          }
          if (index === 8) {
            sums[index] = this.ListObj.manCount;
            return;
          }
          if (index === 9) {
            sums[index] = "男组金额";
            return;
          }
          if (index === 10) {
            sums[index] = this.ListObj.manMoney;
            return;
          }
          if (index === 12) {
            sums[index] = "女组人数";
            return;
          }
          if (index === 13) {
            sums[index] = this.ListObj.woManCount;
            return;
          }
          if (index === 14) {
            sums[index] = "女组金额";
            return;
          }
          if (index === 15) {
            sums[index] = this.ListObj.woManMoney;
            return;
          }
          if (index === 16) {
            sums[index] = "合计金额";
            return;
          }
          if (index === 17) {
            sums[index] = this.ListObj.hjMoney;
            return;
          }
        });
        return sums;
    handleDelete(row){
      },
      // 搜索
      getRemoteData(query) {
        if (query) {
@@ -669,7 +629,6 @@
        this.loading = true;
        getCompany(this.queryParam).then((response) => {
          this.CompanyList = response.data;
          this.total = response.total;
          this.loading = false;
        });
      },
@@ -677,7 +636,6 @@
      cancel() {
        this.open = false;
        this.open1 = false;
        this.creaseopen = false;
        this.reset();
      },
      /** 新增按钮操作 */
@@ -720,14 +678,9 @@
      },
      /** 重置按钮操作 */
      resetQuery() {
        this.date = [];
        this.objs.drugManufacturerId = "";
        this.objs.dwDeptName = "";
        this.objs.reservationTime = "";
        this.TotalPrice = "";
        this.tableData[0] = [];
        this.TotalPrice1 = "";
        // this.resetForm("form");
        this.form = {};
      },
  
@@ -736,16 +689,24 @@
        this.objs.reservationTime = val;
      },
  
      /** 确认按钮 */
      submitForm() {
      }
    submitForm() {},
    },
  };
  </script>
  
  
  <style>
.pag {
  width: 100%;
  display: flex;
  justify-content: center;
}
.pag1 {
  width: 30%;
}
  .el-dialog:not(.is-fullscreen) {
    margin-top: 6vh !important;
    width: 600px;