| | |
| | | <div class="app-container"> |
| | | <el-form :model="objs" :rules="rules" ref="form" size="small" :inline="true" label-width="100px"> |
| | | <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="idFn"> |
| | | <el-select :remote-method="getRemoteData" v-model="objs.drugManufacturerId" remote filterable |
| | | style="width: 200px" placeholder="请选择单位名称" clearable @clear="getCompanyList" @change="idFn"> |
| | | <el-option v-for="dict in CompanyList" :key="dict.cnName" :label="dict.cnName" |
| | | :value="dict.drugManufacturerId" /> |
| | | </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" clearable @change="idBm"> |
| | | <el-option v-for="dict in deptList" :key="dict.id" :label="dict.dwDeptName" :value="dict.id" /> |
| | | <!-- <el-form-item label="部门" prop="dwDeptName"> |
| | | <el-select |
| | | v-model="objs.dwDeptName" |
| | | placeholder="请选择部门" |
| | | style="width: 200px" |
| | | clearable |
| | | @change="idBm" |
| | | > |
| | | <el-option |
| | | v-for="dict in deptList" |
| | | :key="dict.id" |
| | | :label="dict.dwDeptName" |
| | | :value="dict.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <i class="el-icon-circle-plus-outline" @click="handleAddbumen"></i> |
| | | </el-form-item> --> |
| | | <!-- <el-form-item label="分组" prop="payType"> |
| | | <el-select v-model="objs.payType" placeholder="请选择结算方式" style="width: 200px" clearable> |
| | | <el-option v-for="dict in groupingList" :key="dict.id" :label="dict.groupingName" :value="dict.id" /> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | <el-form-item label="预约时间" prop="reservationTime"> |
| | | <el-date-picker clearable v-model="objs.reservationTime" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" |
| | | style="width: 220px" placeholder="请选择预约日期" @change="selectTime" :picker-options="setDisabled"> |
| | | <el-date-picker clearable v-model="objs.reservationTime" type="date" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" 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> |
| | | |
| | | <el-row :gutter="10" class="mb8" style="margin: 5px 20px;"> |
| | | <el-row :gutter="10" class="mb8" style="margin: 5px 20px"> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleImport" |
| | | v-hasPermi="['system:user:import']">导入</el-button> |
| | | <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleImport">导入</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" class="btn" icon="el-icon-thumb" :disabled="isdisabled" size="mini" @click="submitForm"> |
| | | <el-button type="primary" icon="el-icon-upload2" size="mini" @click="importTemplate">下载模板</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" class="btn" icon="el-icon-thumb" :disabled="isdisabled" size="mini" |
| | | @click="submitForm"> |
| | | 确认</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div style="margin: 5px 20px;width: 94%"> |
| | | <div style="margin: 5px 20px; width: 94%"> |
| | | <el-table v-loading="loading" :data="userList" :summary-method="getSummaries" show-summary border> |
| | | |
| | | <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="company" width="200"> |
| | | </el-table-column> |
| | | <el-table-column label="单位部门" align="center" prop="department" width="200"> |
| | | </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"> |
| | |
| | | <el-table-column label="身份证号" align="center" prop="idCard" width="200" /> |
| | | <el-table-column label="年龄" align="center" prop="age" width="75" /> |
| | | <el-table-column label="出生日期" align="center" 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="phoe" width="120" /> |
| | | <!-- <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="140" /> |
| | | <el-table-column label="地址" align="center" prop="address" /> |
| | | <el-table-column label="婚姻状况" align="center" prop="marriage" key="marriage" > |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.dict_user_marry" :value="scope.row.marriage" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="民族" align="center" prop="nation" key="nation" > |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.dict_user_national" :value="scope.row.nation" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="联系邮箱" align="center" prop="email" /> |
| | | <el-table-column label="婚姻状况" align="center" prop="marriage" key="marriage"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.dict_user_marry" :value="scope.row.marriage" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="民族" align="center" prop="nation" key="nation"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.dict_user_national" :value="scope.row.nation" /> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <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" /> |
| | |
| | | |
| | | <!-- 用户导入对话框 --> |
| | | <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body> |
| | | <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :data="data" :action="upload.url" |
| | | :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" |
| | | :auto-upload="false" drag> |
| | | <el-upload ref="upload" :limit="1" :key="uploadKey" accept=".xls" :headers="upload.headers" :data="data" |
| | | :action="upload.url" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" |
| | | :on-success="handleFileSuccess" :auto-upload="false" drag> |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
| | | <div class="el-upload__tip text-center" slot="tip"> |
| | | <div class="el-upload__tip" slot="tip"> |
| | | <!-- <div class="el-upload__tip" slot="tip"> |
| | | <el-checkbox v-model="upload.updateSupport" /> |
| | | 是否更新已经存在的用户数据 |
| | | </div> |
| | | <span>仅允许导入xls、xlsx格式文件。</span> |
| | | <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" |
| | | @click="importTemplate">下载模板</el-link> |
| | | </div> --> |
| | | <span>仅允许导入xls格式文件。</span> |
| | | <!-- <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" |
| | | @click="importTemplate">下载模板</el-link> --> |
| | | </div> |
| | | </el-upload> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitFileForm">确 定</el-button> |
| | | <el-button type="primary" @click="submitFileForm">保存信息</el-button> |
| | | <el-button @click="upload.open = false">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | |
| | | <!-- 添加或修改体检单位信息维护对话框 --> |
| | | <div class="dia"> |
| | |
| | | <el-form-item label="有效时间" prop="validTime"> |
| | | <el-date-picker clearable v-model="form.validTime" type="date" value-format="yyyy-MM-dd" |
| | | placeholder="请选择有效时间"> |
| | | </el-date-picker> |
| | | </el-form-item><br> |
| | | </el-date-picker> </el-form-item><br /> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" :rows="2" label-width="400px" |
| | | style="width: 830px" resize="none"></el-input> |
| | |
| | | </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> |
| | | |
| | | <script> |
| | | import { addComp, Deptlist, getDwAndDwDept, newExcelImport } from "@/api/system/comp"; |
| | | import { newConfirm, getCompany, queryCompany } from "@/api/team/tuanti"; |
| | | import Cookies from "js-cookie" |
| | | import { |
| | | addDept, |
| | | addComp, |
| | | Deptlist, |
| | | getDwAndDwDept, |
| | | newExcelImport, |
| | | } from "@/api/system/comp"; |
| | | import { |
| | | newConfirm, |
| | | getCompany, |
| | | queryCompany, |
| | | getconfigKey, |
| | | } from "@/api/team/tuanti"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import { read, utils } from "xlsx"; |
| | | |
| | | export default { |
| | | dicts: [ |
| | |
| | | "sys_yes_no", |
| | | "sys_user_sex", |
| | | "reservation_pay_type", |
| | | "sys_normal_disable" |
| | | "sys_normal_disable", |
| | | ], |
| | | |
| | | name: "Tijian", |
| | | data() { |
| | | let checkPhoneNum = (rule, value, callback) => { |
| | | console.log(value); |
| | | let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/); |
| | | if (value == "" && value == undefined && !value) { |
| | | return callback(""); |
| | | } else if (value != undefined && value != "") { |
| | | return callback(); |
| | | } else if (!patter.test(value)) { |
| | | return callback(""); |
| | | } |
| | | }; |
| | | return { |
| | | uploadKey: 0, |
| | | leftList: "", |
| | | isdisabled: true, |
| | | setDisabled: { |
| | |
| | | data: { |
| | | dwId: "", |
| | | dwDeptId: "", |
| | | dwName: "", |
| | | }, |
| | | |
| | | objs: { |
| | | drugManufacturerId: "", |
| | | dwDeptName: "", |
| | | reservationTime: "", |
| | | yxts: "", |
| | | }, |
| | | DataList: [], |
| | | tjOrderList: [], //单个项目集合 |
| | |
| | | // 是否更新已经存在的用户数据 |
| | | updateSupport: 0, |
| | | // 设置上传的请求头部 |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | headers: { Authorization: "Bearer " + getToken(), hospId: Cookies.get("hospId") }, |
| | | // 上传的地址 |
| | | url: |
| | | process.env.VUE_APP_BASE_API + "/reservation/reservation/newExcelImport", |
| | | process.env.VUE_APP_BASE_API + |
| | | "/reservation/reservation/newExcelImportNotDwDeptId", |
| | | }, |
| | | // 查询参数 |
| | | queryParam: { |
| | |
| | | // 表单参数 |
| | | form: {}, |
| | | // 表单校验 |
| | | |
| | | |
| | | rules: { |
| | | drugManufacturerId: [ |
| | | { required: true, message: "", trigger: "change" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "change" }, |
| | | ], |
| | | reservationTime: [ |
| | | { required: true, message: "", trigger: "blur" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | dwDeptName: [ |
| | | { required: true, message: "", trigger: "change" }, |
| | | ], |
| | | // dwDeptName: [ |
| | | // { required: true, validator: checkPhoneNum, trigger: "change" }, |
| | | // ], |
| | | signingPic: [ |
| | | { required: true, message: "", trigger: "blur" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | contactPerson: [ |
| | | { required: true, message: "", trigger: "blur" } |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | contactPhone: [ |
| | | { required: true, message: "", trigger: "blur" } |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | taxNumber: [ |
| | | { required: true, message: "", trigger: "blur" } |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | legalPerson: [ |
| | | { required: true, message: "", trigger: "blur" } |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | registerAddress: [ |
| | | { required: true, message: "", trigger: "blur" } |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | bankAccount: [ |
| | | { required: true, message: "", trigger: "blur" } |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | countNum: [ |
| | | { required: true, message: "", trigger: "blur" } |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | principal: [ |
| | | { required: true, message: "", trigger: "blur" } |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | faxNumber: [ |
| | | { required: true, message: "", trigger: "blur" } |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | mailingAddress: [ |
| | | { required: true, message: "", trigger: "blur" } |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | email: [ |
| | | { required: true, message: "", trigger: "blur" } |
| | | ], |
| | | email: [{ required: true, validator: checkPhoneNum, trigger: "blur" }], |
| | | pacName: [ |
| | | { required: true, message: "", trigger: "change" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "change" }, |
| | | ], |
| | | payType: [ |
| | | { required: true, message: "", trigger: "change" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "change" }, |
| | | ], |
| | | phoe: [ |
| | | { |
| | | required: true, |
| | | pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, |
| | | message: "", |
| | | validator: checkPhoneNum, |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | |
| | | proPrice: [ |
| | | { required: true, message: "", trigger: "blur" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | createTime: [ |
| | | { required: true, message: "", trigger: "blur" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | cnName: [ |
| | | { required: true, message: "", trigger: "blur" }, |
| | | ], |
| | | cnName: [{ required: true, validator: checkPhoneNum, trigger: "blur" }], |
| | | businessLicenseNumber: [ |
| | | { required: true, message: "", trigger: "blur" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | createTime: [ |
| | | { required: true, message: "", trigger: "blur" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | updateTime: [ |
| | | { required: true, message: "", trigger: "blur" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | effective: [ |
| | | { |
| | | required: true, |
| | | message: "", |
| | | validator: checkPhoneNum, |
| | | trigger: "change", |
| | | }, |
| | | ], |
| | | name: [ |
| | | { required: true, message: "", trigger: "change" }, |
| | | ], |
| | | name: [{ required: true, validator: checkPhoneNum, trigger: "change" }], |
| | | contactPhone: [ |
| | | { required: true, message: "", trigger: "change" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "change" }, |
| | | ], |
| | | }, |
| | | ListObj: {}, |
| | |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | open1: false, |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | // 保存部门 |
| | | handleAddDept() { |
| | | let data = { |
| | | dwName: this.data.dwName, |
| | | dwId: this.data.dwId, |
| | | dwDeptName: this.form.dwDeptName, |
| | | signingPrice: this.form.signingPrice, |
| | | }; |
| | | addDept(data).then((response) => { |
| | | if (response.code == 200) { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open1 = false; |
| | | } |
| | | }); |
| | | }, |
| | | idFn(value) { |
| | | console.log(value); |
| | | if (value) { |
| | | this.data.dwId = 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 |
| | | this.data.dwDeptId = value; |
| | | }, |
| | | |
| | | getSummaries(param) { |
| | | const { columns, data } = param; |
| | | const sums = []; |
| | | columns.forEach((column, index) => { |
| | | // if (index === 0) { |
| | | // sums[index] = "合计"; |
| | | // return; |
| | | // } |
| | | if (index === 0) { |
| | | sums[index] = '合计'; |
| | | sums[index] = "总计人数"; |
| | | return; |
| | | } |
| | | if (index === 1) { |
| | | sums[index] = '总计人数'; |
| | | return; |
| | | } |
| | | if (index === 2) { |
| | | sums[index] = this.ListObj.count; |
| | | return; |
| | | } |
| | | if (index === 7) { |
| | | sums[index] = '男组人数'; |
| | | if (index === 2) { |
| | | sums[index] = "男组人数"; |
| | | return; |
| | | } |
| | | if (index === 8) { |
| | | if (index === 3) { |
| | | sums[index] = this.ListObj.manCount; |
| | | return; |
| | | } |
| | | if (index === 9) { |
| | | sums[index] = '男组金额'; |
| | | if (index === 4) { |
| | | sums[index] = "男组金额"; |
| | | return; |
| | | } |
| | | if (index === 10) { |
| | | if (index === 5) { |
| | | sums[index] = this.ListObj.manMoney; |
| | | return; |
| | | } |
| | | if (index === 12) { |
| | | sums[index] = '女组人数'; |
| | | if (index === 6) { |
| | | sums[index] = "女组人数"; |
| | | return; |
| | | } |
| | | if (index === 13) { |
| | | if (index === 7) { |
| | | sums[index] = this.ListObj.woManCount; |
| | | return; |
| | | } |
| | | if (index === 14) { |
| | | sums[index] = '女组金额'; |
| | | if (index === 8) { |
| | | sums[index] = "女组金额"; |
| | | return; |
| | | } |
| | | if (index === 15) { |
| | | if (index === 9) { |
| | | sums[index] = this.ListObj.woManMoney; |
| | | return; |
| | | } |
| | | if (index === 16) { |
| | | sums[index] = '合计金额'; |
| | | if (index === 10) { |
| | | sums[index] = "合计金额"; |
| | | return; |
| | | } |
| | | if (index === 17) { |
| | | if (index === 11) { |
| | | sums[index] = this.ListObj.hjMoney; |
| | | return; |
| | | } |
| | | |
| | | |
| | | }); |
| | | return sums |
| | | return sums; |
| | | }, |
| | | // 搜索 |
| | | getRemoteData(query) { |
| | | |
| | | if (query) { |
| | | let compName = query; |
| | | queryCompany(compName).then((response) => { |
| | |
| | | // 获取单位信息集合 |
| | | getCompanyList() { |
| | | this.loading = true; |
| | | getconfigKey('team_reservation_default_day').then((res) => { |
| | | console.log(res, 1111); |
| | | this.objs.yxts = res.msg; |
| | | }); |
| | | getCompany(this.queryParam).then((response) => { |
| | | this.CompanyList = response.data; |
| | | this.total = response.total; |
| | |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.open1 = false; |
| | | this.creaseopen = false; |
| | | this.reset(); |
| | | }, |
| | |
| | | this.open = true; |
| | | this.title = "添加体检单位信息维护"; |
| | | }, |
| | | |
| | | /** 部门新增按钮操作 */ |
| | | handleAddbumen() { |
| | | this.reset(); |
| | | this.open1 = true; |
| | | this.title = "添加部门信息维护"; |
| | | }, |
| | | |
| | | /** 提交按钮 */ |
| | | submitFormS() { |
| | |
| | | name: null, |
| | | phoe: null, |
| | | signingPic: null, |
| | | pacStatus: "启用" |
| | | pacStatus: "启用", |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | |
| | | this.TotalPrice = ""; |
| | | this.tableData[0] = []; |
| | | this.TotalPrice1 = ""; |
| | | this.userList = [] |
| | | // this.resetForm("form"); |
| | | this.form = {}; |
| | | }, |
| | |
| | | selectTime(val) { |
| | | this.objs.reservationTime = val; |
| | | }, |
| | | |
| | | /** 导入按钮操作 */ |
| | | handleImport() { |
| | | if (this.data.dwId || this.data.dwDeptId) { |
| | | if (this.objs.drugManufacturerId && this.objs.reservationTime) { |
| | | // 清空组件内部状态(含已上传文件) |
| | | this.$refs.upload?.clearFiles(); |
| | | this.uploadKey = Date.now(); // 改变 key 强制重新渲染组件 |
| | | // 同步数据源(Vue2 需用 $set 确保响应式) |
| | | this.upload.title = "用户导入"; |
| | | this.upload.open = true; |
| | | } else { |
| | | this.$modal.msgError("请选择单位或部门") |
| | | this.$modal.msgError("请选择单位或预约时间"); |
| | | } |
| | | |
| | | }, |
| | | /** 下载模板操作 */ |
| | | importTemplate() { |
| | | this.download( |
| | | "/reservation/reservation/importTemplate", |
| | | {}, |
| | | `user_template_${new Date().getTime()}.xlsx` |
| | | `团体预约Excel模版.xls` |
| | | ); |
| | | }, |
| | | // 文件上传中处理 |
| | |
| | | this.upload.isUploading = true; |
| | | }, |
| | | // 文件上传成功处理 |
| | | // 文件上传成功处理 |
| | | handleFileSuccess(response, file, fileList) { |
| | | this.ListObj = response.data |
| | | this.userList = response.data.list |
| | | console.log(response, file, fileList) |
| | | if (response.code == 500) { |
| | | this.isdisabled = true; |
| | | // Message.warning(response.msg); |
| | | // this.$modal.msgError(response.msg); |
| | | // this.$modal.msgError("人员"+ response.data.list + "信息错误"); |
| | | |
| | | if (response.data) { |
| | | if (response.data.list) { |
| | | const errorList = ` |
| | | <div style="max-height: 300px; overflow-y: auto;"> |
| | | ${response.data.list.join(", ")} |
| | | </div>` |
| | | |
| | | this.$confirm(errorList, `${response.msg}`, { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "error", |
| | | center: true, |
| | | dangerouslyUseHTMLString: true, |
| | | }); |
| | | } |
| | | |
| | | } else { |
| | | this.$confirm(`${response.msg}`, { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "error", |
| | | center: true, |
| | | dangerouslyUseHTMLString: true, |
| | | }); |
| | | } |
| | | |
| | | |
| | | } else { |
| | | this.isdisabled = false; |
| | | 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(); |
| | | this.leftList = response.msg; |
| | | |
| | | if (this.leftList == "操作失败") { |
| | | this.isdisabled = true; |
| | | this.$alert( |
| | |
| | | "导入结果", |
| | | { dangerouslyUseHTMLString: true } |
| | | ); |
| | | } else { |
| | | this.isdisabled = false; |
| | | this.$alert( |
| | | "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + |
| | | response.msg, |
| | | { dangerouslyUseHTMLString: true } |
| | | ); |
| | | this.rightList = response; |
| | | } |
| | | // else { |
| | | // console.log(11111) |
| | | // this.isdisabled = false; |
| | | // this.$alert( |
| | | // "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + |
| | | // response.msg, |
| | | // { dangerouslyUseHTMLString: true } |
| | | // ); |
| | | // this.rightList = response; |
| | | // } |
| | | for (let i = 0; i < fileList.length; i++) { |
| | | if (file.name != fileList[i].name) { |
| | | this.fileList.push({ |
| | |
| | | }, |
| | | // 提交上传文件 |
| | | submitFileForm() { |
| | | console.log(9999) |
| | | this.$refs.upload.submit(); |
| | | this.isShow = false; |
| | | }, |
| | |
| | | |
| | | /** 确认按钮 */ |
| | | submitForm() { |
| | | if (this.objs.reservationTime && this.data.dwDeptId) { |
| | | // if (this.objs.reservationTime && this.data.dwDeptId) { |
| | | if (this.objs.reservationTime) { |
| | | let data = { |
| | | copeWith: this.ListObj.hjMoney, |
| | | reservations: this.userList, |
| | | reservationTime: this.objs.reservationTime, |
| | | dwDeptId: this.data.dwDeptId, |
| | | yxts: this.objs.yxts, |
| | | dwId: this.data.dwId, |
| | | }; |
| | | newConfirm(data).then((res) => { |
| | | this.$modal.msgSuccess("提交成功"); |
| | | this.confirm = true; |
| | | this.userList = []; |
| | | }); |
| | | } else { |
| | | this.$modal.msgError("请填写带星号内容"); |
| | | } |
| | | |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | </style> |
| | | |
| | | |
| | | </style> |