su
su1124
2024-08-07 35dd3120b91b79e6a422ff3b30380487da38bf0b
src/views/reservation/resercopy/index.vue
@@ -58,12 +58,19 @@
          type="date"
          format="yyyy-MM-dd"
          value-format="yyyy-MM-dd"
          style="width: 220px"
          style="width: 130px"
          placeholder="请选择预约日期"
          @change="selectTime"
          :picker-options="setDisabled"
        >
        </el-date-picker>
      </el-form-item>
      <el-form-item label="有效天数" prop="yxts">
        <el-input
        style="width:100px"
          v-model="objs.yxts"
          placeholder="有效天数"
        />天(可自定义)
      </el-form-item>
    </el-form>
@@ -92,7 +99,7 @@
          type="primary"
          icon="el-icon-upload2"
          size="mini"
         @click="importTemplate"
          @click="importTemplate"
          v-hasPermi="['system:user:import']"
          >下载模板</el-button
        >
@@ -123,8 +130,9 @@
          align="center"
          prop="company"
          width="200"
        />
        <el-table-column label="工号" align="center" prop="jobNo" width="80" />
        >
        </el-table-column>
        <!-- <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">
@@ -147,14 +155,14 @@
          prop="birthday"
          width="100"
        />
        <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="position" /> -->
        <!-- <el-table-column label="部门" align="center" prop="department" /> -->
        <!-- <el-table-column label="部门编号" align="center" prop="departmentId" /> -->
        <el-table-column
          label="联系电话"
          align="center"
          prop="phoe"
          width="120"
          width="140"
        />
        <el-table-column label="地址" align="center" prop="address" />
        <el-table-column
@@ -178,7 +186,7 @@
            />
          </template>
        </el-table-column>
        <el-table-column label="联系邮箱" align="center" prop="email" />
        <!-- <el-table-column label="联系邮箱" align="center" prop="email" /> -->
        <!-- <el-table-column label="体检类别" align="center" prop="tjCategory" /> -->
        <el-table-column label="分组" align="center" prop="groupingName" />
        <el-table-column label="项目收费" align="center" prop="ysPrice" />
@@ -344,26 +352,26 @@
          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="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>
@@ -461,13 +469,14 @@
      data: {
        dwId: "",
        dwDeptId: "",
        dwName:"",
        dwName: "",
      },
      objs: {
        drugManufacturerId: "",
        dwDeptName: "",
        reservationTime: "",
        yxts:"30",
      },
      DataList: [],
      tjOrderList: [], //单个项目集合
@@ -535,9 +544,9 @@
        reservationTime: [
          { required: true, validator: checkPhoneNum, trigger: "blur" },
        ],
        dwDeptName: [
          { required: true, validator: checkPhoneNum, trigger: "change" },
        ],
        // dwDeptName: [
        //   { required: true, validator: checkPhoneNum, trigger: "change" },
        // ],
        signingPic: [
          { required: true, validator: checkPhoneNum, trigger: "blur" },
        ],
@@ -662,7 +671,7 @@
  methods: {
    // 保存部门
    handleAddDept() {
        let data = {
      let data = {
        dwName: this.data.dwName,
        dwId: this.data.dwId,
        dwDeptName: this.form.dwDeptName,
@@ -688,12 +697,12 @@
      console.log(value);
      if (value) {
        this.data.dwId = value;
        this.CompanyList.forEach(item=>{
        this.CompanyList.forEach((item) => {
          console.log(item);
          if(item.drugManufacturerId == this.data.dwId){
            this.data.dwName = item.cnName
          if (item.drugManufacturerId == this.data.dwId) {
            this.data.dwName = item.cnName;
          }
        })
        });
      }
    },
    idBm(value) {
@@ -704,55 +713,55 @@
      const { columns, data } = param;
      const sums = [];
      columns.forEach((column, index) => {
        // if (index === 0) {
        //   sums[index] = "合计";
        //   return;
        // }
        if (index === 0) {
          sums[index] = "合计";
          return;
        }
        if (index === 1) {
          sums[index] = "总计人数";
          return;
        }
        if (index === 2) {
        if (index === 1) {
          sums[index] = this.ListObj.count;
          return;
        }
        if (index === 6) {
        if (index === 2) {
          sums[index] = "男组人数";
          return;
        }
        if (index === 7) {
        if (index === 3) {
          sums[index] = this.ListObj.manCount;
          return;
        }
        if (index === 8) {
        if (index === 4) {
          sums[index] = "男组金额";
          return;
        }
        if (index === 9) {
        if (index === 5) {
          sums[index] = this.ListObj.manMoney;
          return;
        }
        if (index === 11) {
        if (index === 6) {
          sums[index] = "女组人数";
          return;
        }
        if (index === 12) {
        if (index === 7) {
          sums[index] = this.ListObj.woManCount;
          return;
        }
        if (index === 13) {
        if (index === 8) {
          sums[index] = "女组金额";
          return;
        }
        if (index === 14) {
        if (index === 9) {
          sums[index] = this.ListObj.woManMoney;
          return;
        }
        if (index === 15) {
        if (index === 10) {
          sums[index] = "合计金额";
          return;
        }
        if (index === 16) {
        if (index === 11) {
          sums[index] = this.ListObj.hjMoney;
          return;
        }
@@ -832,6 +841,7 @@
      this.objs.drugManufacturerId = "";
      this.objs.dwDeptName = "";
      this.objs.reservationTime = "";
      this.objs.yxts = "";
      this.TotalPrice = "";
      this.tableData[0] = [];
      this.TotalPrice1 = "";
@@ -846,11 +856,11 @@
    /** 导入按钮操作 */
    handleImport() {
      if (this.objs.drugManufacturerId && this.objs.reservationTime &&this.objs.dwDeptName) {
      if (this.objs.drugManufacturerId && this.objs.reservationTime) {
        this.upload.title = "用户导入";
        this.upload.open = true;
      } else {
        this.$modal.msgError("请选择单位或部门");
        this.$modal.msgError("请选择单位或预约时间");
      }
    },
    /** 下载模板操作 */
@@ -869,6 +879,13 @@
    handleFileSuccess(response, file, fileList) {
      this.ListObj = response.data;
      this.userList = response.data.list;
      this.userList.forEach((item) => {
        this.CompanyList.forEach((item1) => {
          if (item1.drugManufacturerId == this.objs.drugManufacturerId) {
            item.company = item1.cnName;
          }
        });
      });
      this.upload.open = false;
      this.upload.isUploading = false;
      this.$refs.upload.clearFiles();
@@ -960,11 +977,12 @@
          reservations: this.userList,
          reservationTime: this.objs.reservationTime,
          dwDeptId: this.data.dwDeptId,
          yxts:this.objs.yxts,
        };
        newConfirm(data).then((res) => {
          this.$modal.msgSuccess("提交成功");
          this.confirm = true;
           this.userList = [];
          this.userList = [];
        });
      } else {
        this.$modal.msgError("请填写带星号内容");