| | |
| | | </div> |
| | | </div> |
| | | <div style="display: flex; align-items: center; justify-content: space-between"> |
| | | <el-radio-group :key="'111'" v-model="currentTable" size="small"> |
| | | <el-radio-group :key="'111'" v-model="currentTable" size="small" @change="searchList"> |
| | | <el-radio-button label="ValueTable0"> 辅助工时 </el-radio-button> |
| | | <el-radio-button label="ValueTable1"> 产量工时 </el-radio-button> |
| | | </el-radio-group> |
| | |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" |
| | | key="tableData" |
| | | :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" |
| | | key="tableData0" |
| | | :height="'calc(100vh - 350px)'" v-if="currentTable == 'ValueTable1'" @pagination="pagination0"></lims-table> |
| | | </div> |
| | | <el-dialog :before-close="handleClose" :title="formData.id ? '编辑' : '录入数据'" :visible.sync="addVisible" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from "@/components/Table/value-table.vue"; |
| | | import { getYearAndMonthAndDays } from "@/utils/date"; |
| | | import { |
| | | selectAuxiliaryWorkingHoursDay, |
| | |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | export default { |
| | | components: { |
| | | ValueTable, |
| | | limsTable, |
| | | }, |
| | | dicts: ["sys_class_type"], |
| | |
| | | this.getCurrentWeekNumber(); |
| | | this.collectWorkingHours(); |
| | | this.selectshiftByUser(); |
| | | this.getList(); |
| | | this.getList0(); |
| | | this.searchList() |
| | | }, |
| | | methods: { |
| | | searchList() { |
| | | if (this.currentTable == 'ValueTable0') { |
| | | this.getList(); |
| | | } else { |
| | | this.getList0(); |
| | | } |
| | | }, |
| | | // 查询辅助工时列表 |
| | | getList(entity) { |
| | | this.tableLoading = true; |
| | | let param = {}; |
| | |
| | | param.dateTime = param.dateTime?.length > 0 ? JSON.stringify(param.dateTime) : null; |
| | | } |
| | | delete param.total; |
| | | console.log('11111111111111111') |
| | | selectAuxiliaryWorkingHoursDay({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | // 查询产量工时列表 |
| | | getList0(entity) { |
| | | this.tableLoading = true; |
| | | let param = {}; |
| | |
| | | param = { ...entity, ...this.page0 }; |
| | | } else { |
| | | param = { ...this.entity, ...this.page0 }; |
| | | param.dateTime = JSON.stringify(param.dateTime); |
| | | param.dateTime = param.dateTime?.length > 0 ? JSON.stringify(param.dateTime) : null |
| | | } |
| | | delete param.total; |
| | | delete param.state; |
| | | selectAuxiliaryOutputWorkingHours({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | |
| | | if (!this.formData.id) { |
| | | insertAuxiliaryWorkingHoursDay(this.formData).then((res) => { |
| | | this.addLoad = false; |
| | | if (res.code == 201) return; |
| | | this.$message.success("已提交"); |
| | | this.formData.number = ""; |
| | | this.formData.amount = ""; |
| | |
| | | } else { |
| | | updateAuxiliaryWorkingHoursDay(this.formData).then((res) => { |
| | | this.addLoad = false; |
| | | if (res.code == 201) return; |
| | | this.$message.success("操作成功"); |
| | | this.formData.number = ""; |
| | | this.formData.amount = ""; |
| | |
| | | }); |
| | | approve({ auxiliaryWorkingHoursDays: auxiliaryWorkingHoursDays }).then( |
| | | (res) => { |
| | | if (res.code === 201) { |
| | | return; |
| | | } |
| | | this.submitBatchCheckDialog(); |
| | | this.$message.success("操作成功"); |
| | | } |
| | |
| | | } else { |
| | | this.checkLoadY = false; |
| | | } |
| | | if (res.code == 201) return; |
| | | this.$message.success("操作成功"); |
| | | this.checkVisible = false; |
| | | this.refreshTable("page"); |
| | |
| | | } |
| | | entity.weekDay = this.entity.weekDay; |
| | | entity.name = this.entity.name; |
| | | entity.state = this.entity.state; |
| | | collectWorkingHours(entity).then((res) => { |
| | | this.totalInfo = res.data; |
| | | }); |