| | |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | {{ row.checkindate?row.checkindate.substring(0,11):'/' }} |
| | | {{ row.checkindate ? row.checkindate.substring(0, 11) : '/' }} |
| | | </template> |
| | | </el-table-column> |
| | | |
| | |
| | | prop="deductcount" |
| | | label="扣除时长(小时)" |
| | | sortable="custom" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isEdit"> |
| | | <el-input |
| | | v-model="dialogForm.deductcount" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | style="width: 100%" |
| | | /> |
| | | </div> |
| | | <div v-else>{{ row.deductcount }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | prop="deductmoney" |
| | | label="扣除薪资(元)" |
| | | sortable="custom" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isEdit"> |
| | | <el-input |
| | | v-model="dialogForm.deductmoney" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | style="width: 100%" |
| | | /> |
| | | </div> |
| | | <div v-else>{{ row.deductmoney }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-input--> |
| | | <!-- v-model="dialogForm.deductcount"--> |
| | | <!-- oninput="value=value.replace(/[^0-9.]/g,'')"--> |
| | | <!-- style="width: 200px"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | prop="timimoney" |
| | | label="计时工资(元)" |
| | | sortable="custom" |
| | | /> |
| | | |
| | | <el-table-column |
| | | label="结算工资(元)" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | {{ parseFloat((parseFloat(row.timimoney)-parseFloat(row.deductmoney)).toFixed(2)) }} |
| | | {{ parseFloat((parseFloat(row.timimoney) - parseFloat(row.deductmoney)).toFixed(2)) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | <div class="operationClass"> |
| | | <el-tooltip class="item" effect="dark" content="编辑" placement="top"> |
| | | <i |
| | | v-if="row.leve!==0" |
| | | v-if="!row.isEdit" |
| | | class="el-icon-edit-outline" |
| | | :style="{color:$store.state.settings.theme}" |
| | | @click="edit('edit',row)" |
| | | /> |
| | | </el-tooltip> |
| | | |
| | | <el-tooltip class="item" effect="dark" content="保存" placement="top"> |
| | | <i |
| | | v-if="row.isEdit" |
| | | class="el-icon-circle-check" |
| | | style="cursor: pointer;" |
| | | :style="{color:$store.state.settings.theme}" |
| | | @click="save(row)" |
| | | /> |
| | | </el-tooltip> |
| | | |
| | | <el-tooltip class="item" effect="dark" content="取消" placement="top"> |
| | | <i |
| | | v-if="row.isEdit" |
| | | class="el-icon-circle-close" |
| | | style="cursor: pointer;margin-left: 15px;" |
| | | :style="{color:$store.state.settings.theme}" |
| | | @click="cancel(row)" |
| | | /> |
| | | </el-tooltip> |
| | | |
| | | <!-- <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">--> |
| | | <!-- <i--> |
| | | <!-- v-if="row.leve!==0"--> |
| | |
| | | <!-- </el-tooltip>--> |
| | | </div> |
| | | </template> |
| | | |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | |
| | | rows: this.form.rows |
| | | } |
| | | const res = await DailyWageReportSearch(data) |
| | | res.data.forEach(i => { |
| | | i.isEdit = false |
| | | }) |
| | | this.tableData = res.data |
| | | this.total = res.count |
| | | }, |
| | |
| | | }, |
| | | // 修改按钮 |
| | | async edit(operation, row) { |
| | | this.dialogForm = { ...row } |
| | | row.isEdit = true |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | this.$nextTick(() => { |
| | | this.dialogForm = { ...row } |
| | | // this.operation = operation |
| | | // this.dialogVisible = true |
| | | // this.$nextTick(() => { |
| | | // this.dialogForm = { ...row } |
| | | // }) |
| | | }, |
| | | save(row) { |
| | | if (this.dialogForm.deductcount.toString().trim().length === 0) { |
| | | return this.$message.info('扣除时长的最小值为零!') |
| | | } |
| | | if (this.dialogForm.deductmoney.toString().trim().length === 0) { |
| | | return this.$message.info('扣除薪资的最小值为零!') |
| | | } |
| | | |
| | | DailyWageReportUpdate(this.dialogForm, 'Update').then(res => { |
| | | if (res.code === '200') { |
| | | this.$notify.success('修改成功!') |
| | | row.isEdit = false |
| | | this.getDailyWageReportSearch() |
| | | } else { |
| | | this.$notify.error('修改失败!') |
| | | } |
| | | }) |
| | | }, |
| | | cancel(row) { |
| | | row.isEdit = false |
| | | this.getDailyWageReportSearch() |
| | | }, |
| | | // 删除按钮 |
| | | // async del(row) { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | async download() { |
| | | async download() { |
| | | let tempDate = this.form.creatdate |
| | | if (tempDate.length > 0) { |
| | | tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1]) |