| | |
| | | </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 style="display: flex; align-items: center"> |
| | | <p style="font-size: 14px; margin-right: 30px"> |
| | | 总工时汇总:<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{ |
| | | totalInfo["产量工时汇总"] + totalInfo["辅助工时汇总"] |
| | | ? Number( |
| | | totalInfo["产量工时汇总"] + totalInfo["辅助工时汇总"] |
| | | ).tofixed(4) |
| | | : 0 |
| | | }}</span> 产量工时汇总:<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{ |
| | | totalInfo["产量工时汇总"] |
| | | ? Number(totalInfo["产量工时汇总"]).tofixed(4) |
| | | : 0 |
| | | }}</span> 辅助工时汇总:<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{ |
| | | totalInfo["辅助工时汇总"] |
| | | ? Number(totalInfo["辅助工时汇总"]).tofixed(4) |
| | | : 0 |
| | | }}</span> |
| | | </p> |
| | | <!-- <p style="font-size: 14px; margin-right: 30px">--> |
| | | <!-- 总工时汇总:<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{--> |
| | | <!-- totalInfo["产量工时汇总"] + totalInfo["辅助工时汇总"]--> |
| | | <!-- ? Number(--> |
| | | <!-- totalInfo["产量工时汇总"] + totalInfo["辅助工时汇总"]--> |
| | | <!-- ).tofixed(4)--> |
| | | <!-- : 0--> |
| | | <!-- }}</span> 产量工时汇总:<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{--> |
| | | <!-- totalInfo["产量工时汇总"]--> |
| | | <!-- ? Number(totalInfo["产量工时汇总"]).tofixed(4)--> |
| | | <!-- : 0--> |
| | | <!-- }}</span> 辅助工时汇总:<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{--> |
| | | <!-- totalInfo["辅助工时汇总"]--> |
| | | <!-- ? Number(totalInfo["辅助工时汇总"]).tofixed(4)--> |
| | | <!-- : 0--> |
| | | <!-- }}</span>--> |
| | | <!-- </p>--> |
| | | <el-button v-show="currentTable == 'ValueTable0' && |
| | | checkPermi(['performance:manHour:workTimeManagement:add']) |
| | | " size="small" type="primary" @click="openAdd">录入数据</el-button> |
| | |
| | | </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" |
| | |
| | | down: false, |
| | | addFileVisible: false, |
| | | weekList: [ |
| | | { label: "周一", value: "周一", type: "primary" }, |
| | | { label: "周二", value: "周二", type: "primary" }, |
| | | { label: "周三", value: "周三", type: "primary" }, |
| | | { label: "周四", value: "周四", type: "primary" }, |
| | | { label: "周五", value: "周五", type: "primary" }, |
| | | { label: "周六", value: "周六", type: "primary" }, |
| | | { label: "周日", value: "周日", type: "primary" }, |
| | | { label: "周一", value: "1", type: "primary" }, |
| | | { label: "周二", value: "2", type: "primary" }, |
| | | { label: "周三", value: "3", type: "primary" }, |
| | | { label: "周四", value: "4", type: "primary" }, |
| | | { label: "周五", value: "5", type: "primary" }, |
| | | { label: "周六", value: "6", type: "primary" }, |
| | | { label: "周日", value: "0", type: "primary" }, |
| | | ], |
| | | currentTable: "ValueTable0", |
| | | addVisible: false, |
| | |
| | | label: "班次", |
| | | prop: "shift", |
| | | dataType: "tag", |
| | | formatData: this.shifList, |
| | | formatData: (params) => { |
| | | if (this.shifList.find(m => m.value == params)) { |
| | | return this.shifList.find(m => m.value == params).label |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | }, |
| | | { label: "周次", prop: "week" }, |
| | | { label: "星期", prop: "weekDay" }, |
| | | { |
| | | label: "星期", |
| | | prop: "weekDay", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | return this.weekList.find(m => m.value == params).label |
| | | }, |
| | | }, |
| | | { label: "创建时间", prop: "createTime" }, |
| | | { label: "日期", prop: "dateTime" }, |
| | | { |
| | |
| | | }, |
| | | mounted() { |
| | | this.getCurrentWeekNumber(); |
| | | this.collectWorkingHours(); |
| | | // 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 = {}; |
| | |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | // 查询产量工时列表 |
| | | getList0(entity) { |
| | | this.tableLoading = true; |
| | | let param = {}; |
| | |
| | | param.dateTime = param.dateTime?.length > 0 ? JSON.stringify(param.dateTime) : null |
| | | } |
| | | delete param.total; |
| | | delete param.state; |
| | | selectAuxiliaryOutputWorkingHours({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | |
| | | this.page0.current = 1; |
| | | this.getList0(entity); |
| | | } |
| | | this.collectWorkingHours(); |
| | | // this.collectWorkingHours(); |
| | | }, |
| | | refresh() { |
| | | this.entity = {}; |
| | | this.entity.dateTime = [] |
| | | this.setDate() |
| | | this.refreshTable(); |
| | | }, |
| | | openAdd() { |
| | |
| | | this.formData.auxiliaryProject = ""; |
| | | this.addVisible = false; |
| | | this.refreshTable("page"); |
| | | this.collectWorkingHours(); |
| | | // this.collectWorkingHours(); |
| | | }); |
| | | } else { |
| | | updateAuxiliaryWorkingHoursDay(this.formData).then((res) => { |
| | |
| | | this.formData.nonproductiveTime = ""; |
| | | this.formData.auxiliaryProject = ""; |
| | | this.refreshTable("page"); |
| | | this.collectWorkingHours(); |
| | | // this.collectWorkingHours(); |
| | | }); |
| | | } |
| | | }, |
| | |
| | | submitBatchCheckDialog() { |
| | | this.batchCheckDialog = false; |
| | | this.refreshTable("page"); |
| | | this.collectWorkingHours(); |
| | | // this.collectWorkingHours(); |
| | | }, |
| | | submitCheck(e) { |
| | | if (!this.formData0.number) { |
| | |
| | | this.$message.success("操作成功"); |
| | | this.checkVisible = false; |
| | | this.refreshTable("page"); |
| | | this.collectWorkingHours(); |
| | | // this.collectWorkingHours(); |
| | | }); |
| | | }, |
| | | getCurrentWeekNumber(now = new Date()) { |
| | |
| | | } |
| | | entity.weekDay = this.entity.weekDay; |
| | | entity.name = this.entity.name; |
| | | entity.state = this.entity.state; |
| | | collectWorkingHours(entity).then((res) => { |
| | | this.totalInfo = res.data; |
| | | }); |