| | |
| | | <el-button type="primary" :disabled="!disabled" @click="Cancellation">撤销合并</el-button> |
| | | <el-button type="primary" @click="Confirmreceipt" :disabled="!selectList.length">采样打码</el-button> |
| | | <el-button type="primary" @click="piliangPrint" :disabled="!isAllSelected">批量打印</el-button> |
| | | |
| | | </el-col> |
| | | <el-col :span="12" style="margin: 10px 15px" v-show="samplingList.length > 0 && tjStatus == 0"> |
| | | <el-button type="primary" :disabled="!selectList.length" @click="buda">补打条码</el-button> |
| | | <!-- @click="Collection" --> |
| | | <el-button type="primary" :disabled="!disabled" @click="Cancellation">撤销合并</el-button> |
| | | <el-button type="primary" @click="jydPrint">打印检验单</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <div style="width: 100%; margin-left: 10px; display: flex"> |
| | | <div style="width: 40%; margin-right: 20px"> |
| | | <el-table id="ta" v-loading="loading1" ref="tb" :data="samplingList" @selection-change="handleSelectionChange" |
| | | border height="520px" :row-class-name="tableRowClassName"> |
| | | @current-change="handleCurrentChangess" border height="520px" :row-class-name="tableRowClassName"> |
| | | <el-table-column type="selection" width="40" align="center" :selectable="selectable" /> |
| | | <el-table-column label="体检号" align="center" prop="tjNumber" width="160px" /> |
| | | <el-table-column label="姓名" align="center" prop="cusName" width="80px" /> |
| | |
| | | </div> |
| | | <div style="width: 50%"> |
| | | <!-- v-if="this.rightTabShow" --> |
| | | <el-table :row-key="getRowKey" v-if="tableList.length > 0" v-loading="loading" :data="tableList" @selection-change="handleChange" |
| | | :span-method="objectSpanMethod" ref="tab1" :row-class-name="tableRowClassName" border height="520px"> |
| | | <el-table :key="tableKey" :row-key="getRowKey" v-if="tableList.length > 0" v-loading="loading" :data="tableList" |
| | | @selection-change="handleChange" :span-method="objectSpanMethod" ref="tab1" |
| | | :row-class-name="tableRowClassName" border height="520px"> |
| | | <el-table-column type="selection" width="40" align="center" /> |
| | | <!-- :selectable="selectEnable" --> |
| | | <!-- <el-table-column label="是否签收" align="center" prop="isSignFor" /> --> |
| | |
| | | piliangList: [], |
| | | msg: "", |
| | | getNumbr: null, |
| | | valueUrl: "ws://127.0.0.1/websocket", |
| | | valueUrl: "ws://127.0.0.1:6789/websocket", |
| | | webSocket: null, |
| | | list: [], |
| | | selectList: [], |
| | |
| | | proName: null, |
| | | }, |
| | | startTime: "", |
| | | tableKey: "", |
| | | pickerOptions: { |
| | | shortcuts: [ |
| | | { |
| | |
| | | loadingInstance.close(); |
| | | } |
| | | }, |
| | | |
| | | |
| | | jydPrint() { |
| | | const tjnumber = this.piliangList[0].tjNumber; |
| | | const viewNum = "1086792376946569216"; |
| | | const params = { viewNum, tjnumber }; |
| | | this.$tab.openPage("检验科导检单", "/report/clinical", params); |
| | | }, |
| | | getTruncatedName(proName) { |
| | | // 去掉所有空格 |
| | | const trimmedProName = proName.replace(/\s+/g, ""); |
| | |
| | | }, |
| | | /** 查询体检采样管理列表 */ |
| | | /** 查询体检采样管理列表 */ |
| | | getList() { |
| | | this.queryParams.compId = this.CheckBox.drugManufacturerId; |
| | | this.loading1 = true; |
| | | this.queryParams.isSignFor = this.tjStatus; |
| | | getList() { |
| | | this.queryParams.compId = this.CheckBox.drugManufacturerId; |
| | | this.loading1 = true; |
| | | this.queryParams.isSignFor = this.tjStatus; |
| | | |
| | | if (this.createTimeList) { |
| | | this.queryParams.beginTime = this.createTimeList[0]; |
| | | this.queryParams.endTime = this.createTimeList[1]; |
| | | } else { |
| | | this.queryParams.beginTime = null; |
| | | this.queryParams.endTime = null; |
| | | } |
| | | |
| | | getList(this.queryParams).then((response) => { |
| | | this.loading1 = false; |
| | | if (response.data && response.data.list && response.data.list.length > 0) { |
| | | this.samplingList = response.data.list; |
| | | this.total = response.data.total; |
| | | // 移除默认选中第一行的逻辑 |
| | | // this.$nextTick(() => { |
| | | // this.$refs.tb.toggleRowSelection(this.samplingList[0], true); // 默认选中第一行 |
| | | // this.fetchData(this.samplingList[0].tjNumber); // 刷新右侧表格 |
| | | // }); |
| | | } else { |
| | | this.samplingList = []; |
| | | this.tableList = []; |
| | | this.selectList = []; // 清空 selectList |
| | | this.ids = []; // 清空 ids |
| | | if (this.$refs.tab1) { |
| | | this.$refs.tab1.clearSelection(); // 清空右侧表格选中状态 |
| | | if (this.createTimeList) { |
| | | this.queryParams.beginTime = this.createTimeList[0]; |
| | | this.queryParams.endTime = this.createTimeList[1]; |
| | | } else { |
| | | this.queryParams.beginTime = null; |
| | | this.queryParams.endTime = null; |
| | | } |
| | | } |
| | | this.loading1 = false; |
| | | }); |
| | | }, |
| | | |
| | | getList(this.queryParams).then((response) => { |
| | | this.loading1 = false; |
| | | if (response.data && response.data.list && response.data.list.length > 0) { |
| | | this.samplingList = response.data.list; |
| | | this.total = response.data.total; |
| | | // 移除默认选中第一行的逻辑 |
| | | // this.$nextTick(() => { |
| | | // this.$refs.tb.toggleRowSelection(this.samplingList[0], true); // 默认选中第一行 |
| | | // this.fetchData(this.samplingList[0].tjNumber); // 刷新右侧表格 |
| | | // }); |
| | | } else { |
| | | this.samplingList = []; |
| | | this.tableList = []; |
| | | this.selectList = []; // 清空 selectList |
| | | this.ids = []; // 清空 ids |
| | | if (this.$refs.tab1) { |
| | | this.$refs.tab1.clearSelection(); // 清空右侧表格选中状态 |
| | | } |
| | | } |
| | | this.loading1 = false; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | |
| | | } |
| | | this.handleQuery(); // 重新查询 |
| | | }, |
| | | handleCurrentChangess(val) { |
| | | if (val != null) { |
| | | this.$refs.tb.toggleRowSelection(val, true); |
| | | this.handleSelectionChange(val); |
| | | } |
| | | }, |
| | | |
| | | handleSelectionChange(selection) { |
| | | this.piliangList = selection; |
| | |
| | | // 调试日志 |
| | | console.log(`当前选中数量: ${selectedCount}`); |
| | | console.log(`是否禁用选择: ${this.disableSelections}`); |
| | | |
| | | }, |
| | | |
| | | getRowKey(row) { |
| | |
| | | .then((response) => { |
| | | if (response.data) { |
| | | this.tableList = response.data; |
| | | this.tableKey = Date.now() |
| | | this.$nextTick(() => { |
| | | if (this.$refs.tab1) { |
| | | this.$refs.tab1.doLayout(); // 修改为正确的 ref 名称 |
| | | this.$refs.tab1.clearSelection(); // 清空选中状态 |
| | | const headerCheckbox = this.$refs.tab1.$el.querySelector('.el-table__header .el-checkbox'); |
| | | if (headerCheckbox) headerCheckbox.style.display = 'inline'; |
| | | |
| | | } |
| | | }); |
| | | resolve(this.tableList); |
| | | this.loading = false; |
| | | } else { |
| | | this.tableList = []; |
| | | this.selectList = []; |
| | |
| | | }); |
| | | }, |
| | | // 单选按钮 |
| | | // 单选按钮 |
| | | radioChange(value) { |
| | | this.loading = true; |
| | | this.queryParams.isSignFor = value; |
| | | getList(this.queryParams).then((response) => { |
| | | if (response.data) { |
| | | if (response.data.list == null) { |
| | | this.samplingList = []; |
| | | this.tableList = []; |
| | | this.loading = false; |
| | | } else { |
| | | this.samplingList = response.data.list; |
| | | this.loading = false; |
| | | // 移除默认选中第一行的逻辑 |
| | | // if (this.samplingList.length != 0) { |
| | | // this.$nextTick(() => { |
| | | // this.$refs.tb.toggleRowSelection(this.samplingList[0], true); |
| | | // }); |
| | | // } else { |
| | | // this.$refs.tb.clearSelection(); |
| | | // } |
| | | } |
| | | this.total = response.data.total; |
| | | this.loading = false; |
| | | } else { |
| | | this.samplingList = []; |
| | | this.tableList = []; |
| | | this.loading = false; |
| | | } |
| | | }); |
| | | }, |
| | | // 单选按钮 |
| | | radioChange(value) { |
| | | this.loading = true; |
| | | this.queryParams.isSignFor = value; |
| | | getList(this.queryParams).then((response) => { |
| | | if (response.data) { |
| | | if (response.data.list == null) { |
| | | this.samplingList = []; |
| | | this.tableList = []; |
| | | this.loading = false; |
| | | } else { |
| | | this.samplingList = response.data.list; |
| | | this.loading = false; |
| | | // 移除默认选中第一行的逻辑 |
| | | // if (this.samplingList.length != 0) { |
| | | // this.$nextTick(() => { |
| | | // this.$refs.tb.toggleRowSelection(this.samplingList[0], true); |
| | | // }); |
| | | // } else { |
| | | // this.$refs.tb.clearSelection(); |
| | | // } |
| | | } |
| | | this.total = response.data.total; |
| | | this.loading = false; |
| | | } else { |
| | | this.samplingList = []; |
| | | this.tableList = []; |
| | | this.loading = false; |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 默认接受四个值 { 当前行的值, 当前列的值, 行的下标, 列的下标 } |
| | | objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
| | |
| | | |
| | | <style> |
| | | #ta .el-table__header-wrapper .el-checkbox { |
| | | /* display: none; */ |
| | | display: none; |
| | | } |
| | | |
| | | .el-table .warning-row { |