| | |
| | | placeholder="全部" |
| | | size="small" |
| | | @change="refreshTable()" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="item in stateList" |
| | |
| | | :column="column" |
| | | :page="page" |
| | | :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 320px)'" |
| | | :height="'calc(100vh - 350px)'" |
| | | :isSelection="true" |
| | | v-if="currentTable == 'ValueTable0'" |
| | | @pagination="pagination" |
| | | :handleSelectionChange="handleSelectionChange" |
| | | ></lims-table> |
| | | <lims-table |
| | | :tableData="tableData0" |
| | | :column="column0" |
| | | :page="page0" |
| | | :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 320px)'" |
| | | :height="'calc(100vh - 350px)'" |
| | | v-if="currentTable == 'ValueTable1'" |
| | | @pagination="pagination0" |
| | | ></lims-table> |
| | |
| | | exportOutputHours, |
| | | } from "@/api/performance/manHour"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { checkPermi } from "@/utils/permission"; // 权限判断函数 |
| | | export default { |
| | | components: { |
| | | ValueTable, |
| | |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | current: 1, |
| | | }, |
| | | tableLoading: false, |
| | | tableData0: [], |
| | |
| | | page0: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | current: 1, |
| | | }, |
| | | shifList: [], |
| | | }; |
| | |
| | | this.getList0(); |
| | | }, |
| | | methods: { |
| | | checkPermi, |
| | | getList(entity) { |
| | | this.tableLoading = true; |
| | | let param = {}; |
| | |
| | | param = { ...entity, ...this.page }; |
| | | } else { |
| | | param = { ...this.entity, ...this.page }; |
| | | param.dateTime = JSON.stringify(param.dateTime); |
| | | } |
| | | delete param.total; |
| | | selectAuxiliaryWorkingHoursDay({ ...param }) |
| | |
| | | param = { ...entity, ...this.page0 }; |
| | | } else { |
| | | param = { ...this.entity, ...this.page0 }; |
| | | param.dateTime = JSON.stringify(param.dateTime); |
| | | } |
| | | delete param.total; |
| | | selectAuxiliaryOutputWorkingHours({ ...param }) |
| | |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination(current, size) { |
| | | this.page.current = current; |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | pagination0(current, size) { |
| | | this.page0.current = current; |
| | | this.getList(); |
| | | pagination0({ page, limit }) { |
| | | this.page0.current = page; |
| | | this.page0.size = limit; |
| | | this.getList0(); |
| | | }, |
| | | /** 将时间选择器默认选为当天的日期 */ |
| | | setDate() { |
| | |
| | | } |
| | | }, |
| | | batchCheck(e) { |
| | | this.$refs.ValueTable0.batchCheck(e); |
| | | const list = JSON.parse(JSON.stringify(this.ValueTable0Selected)); |
| | | const state = e === 0 ? "不批准" : "已批准"; |
| | | let auxiliaryWorkingHoursDays = []; |
| | | list.forEach((item) => { |
| | | delete item.orderBy; |
| | | item.state = state; |
| | | auxiliaryWorkingHoursDays.push(item); |
| | | }); |
| | | approve({ auxiliaryWorkingHoursDays: auxiliaryWorkingHoursDays }).then( |
| | | (res) => { |
| | | if (res.code === 201) { |
| | | return; |
| | | } |
| | | this.submitBatchCheckDialog(); |
| | | this.$message.success("操作成功"); |
| | | } |
| | | ); |
| | | }, |
| | | closeBatchCheckDialog() { |
| | | this.batchCheckDialog = false; |
| | |
| | | } |
| | | entity.weekDay = this.entity.weekDay; |
| | | entity.name = this.entity.name; |
| | | collectWorkingHours({ entity: entity }).then((res) => { |
| | | collectWorkingHours(entity).then((res) => { |
| | | this.totalInfo = res.data; |
| | | }); |
| | | }, |
| | |
| | | }, |
| | | getInfoByCode() { |
| | | if (this.formData.number) { |
| | | selectAuxiliaryWorkingHoursByNumber(this.formData.number).then( |
| | | (res) => { |
| | | this.auxiliaryWorking = res.data; |
| | | if (this.addVisible) { |
| | | this.formData.approvedWorkingHour = |
| | | this.auxiliaryWorking.approvedWorkingHour; |
| | | this.formData.auxiliaryProject = |
| | | this.auxiliaryWorking.auxiliaryProject; |
| | | } else if (this.title == "审核" && this.checkVisible) { |
| | | this.formData0.approvedWorkingHour = |
| | | this.auxiliaryWorking.approvedWorkingHour; |
| | | this.formData0.auxiliaryProject = |
| | | this.auxiliaryWorking.auxiliaryProject; |
| | | } |
| | | selectAuxiliaryWorkingHoursByNumber({ |
| | | number: this.formData.number, |
| | | }).then((res) => { |
| | | this.auxiliaryWorking = res.data; |
| | | if (this.addVisible) { |
| | | this.formData.approvedWorkingHour = |
| | | this.auxiliaryWorking.approvedWorkingHour; |
| | | this.formData.auxiliaryProject = |
| | | this.auxiliaryWorking.auxiliaryProject; |
| | | } else if (this.title == "审核" && this.checkVisible) { |
| | | this.formData0.approvedWorkingHour = |
| | | this.auxiliaryWorking.approvedWorkingHour; |
| | | this.formData0.auxiliaryProject = |
| | | this.auxiliaryWorking.auxiliaryProject; |
| | | } |
| | | ); |
| | | }); |
| | | } |
| | | }, |
| | | handleOut() { |
| | |
| | | this.outLoading = false; |
| | | }); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | // console.log(111, val); |
| | | this.ValueTable0Selected = val; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |