|
@@ -111,6 +111,12 @@
|
|
|
</el-select>
|
|
|
</span>
|
|
|
</template>
|
|
|
+ <template v-if="ins == 6">
|
|
|
+ <el-select v-model="writeOffStatus" :placeholder="$t('defaultText.pleaseChoose')" @change="picks()" size="small" clearable>
|
|
|
+ <el-option label="正常" :value="0" ></el-option>
|
|
|
+ <el-option label="已核销" :value="1" ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
|
|
|
<!-- 按部门/项目筛选 -->
|
|
|
<!-- <el-select v-if="ins == 10" v-model="departmentOrProject" placeholder="请选择" size="small" @change="selcts(10)" style="margin-left:10px;width:120px">
|
|
@@ -588,6 +594,18 @@
|
|
|
<span style="padding-right: 15px;">{{scope.row.workingTime.toFixed(1)}}h</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="writeOffValue" :label="$t('heXiaoZhuangTai')" width="120">
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ {{ scope.row.writeOffValue == 1 ? '已核销' : '正常' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="writeOffUser" :label="$t('heXiaoRen')" width="120">
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <TranslationOpenDataText type='userName' :openid='scope.row.writeOffUser'></TranslationOpenDataText>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="writeOffTime" :label="$t('heXiaoShiJian')" width="160"></el-table-column>
|
|
|
+ <el-table-column prop="writeOffReason" :label="$t('heXiaoYanYing')" width="160"></el-table-column>
|
|
|
<el-table-column prop="overtimeHours" :label="$t('jia-ban-shi-chang')+'(h)'" width="100" fixed="right" align="right">
|
|
|
<template slot-scope="scope">
|
|
|
<span style="padding-right: 15px;">{{scope.row.overtimeHours.toFixed(1)}}h</span>
|
|
@@ -598,6 +616,12 @@
|
|
|
<span>¥{{scope.row.cost | numberToCurrency}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="cost" :label="$t('operation')" width="100" v-if="user.roleId == 9" fixed="right" align="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="writeOffOperation(scope.row, 'restore')" v-if="scope.row.writeOffValue == 1">{{ $t('huiFu') }}</el-button>
|
|
|
+ <el-button type="text" @click="writeOffOperation(scope.row, 'writeoff')" v-else>{{ $t('heXiao') }}</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<!-- 人员工时分配表 -->
|
|
@@ -734,7 +758,7 @@
|
|
|
<el-table-column prop="timelinessRate" :label="$t('timelyreportingrate')" min-width="200" align="center">
|
|
|
<template slot="header">
|
|
|
<span>{{ $t('timelyreportingrate') + $t('han-qing-jia') }}</span>
|
|
|
- <el-tooltip effect="dark" :content="'请假计为填报及时'" placement="top-start">
|
|
|
+ <el-tooltip effect="dark" :content="$t('qingJiaJiWeiTianBaoJiShi')" placement="top-start">
|
|
|
<i class="el-icon-question" style="color:#606266"></i>
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
@@ -877,7 +901,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" prop="whether" :label="补足工时" min-width="180">
|
|
|
+ <el-table-column align="center" prop="whether" :label=" $t('buZuGongShi')" min-width="180">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<el-button
|
|
@@ -1575,6 +1599,28 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 核销弹窗 -->
|
|
|
+ <el-dialog :title="$t('jiaBanHeXiao')" :visible.sync="writeOffOperationVisable" width="600px" :before-close="handleClose">
|
|
|
+ <div class="">
|
|
|
+ <div style="width: 100%;text-align:center;margin-bottom:20px;">{{ $t('heXiaoGongShiShu') }}:{{ writeOffOperationTransitionData.overtimeHours }} {{ $t('time.hour') }}</div>
|
|
|
+ <div>
|
|
|
+ <el-select v-model="writeOffOperationTransitionData.writeOffReason" filterable allow-create default-first-option :placeholder="$t('qingShuRuHeXiaoYuanYing')"
|
|
|
+ style="width: 100%;">
|
|
|
+ <el-option
|
|
|
+ v-for="item in writeOffOperationTransitionData.options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="writeOffOperationVisable = false">{{ $t('quXiao') }}</el-button>
|
|
|
+ <el-button type="primary" @click="editWriteOffOperation()">{{ $t('queDing') }}</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</section>
|
|
|
</template>
|
|
|
|
|
@@ -1809,7 +1855,12 @@ export default {
|
|
|
showUserTaskDialog:false,
|
|
|
userTaskData:[], //员工任务数据列表
|
|
|
userTasklistLoading:false,
|
|
|
- userTaskUserId:null
|
|
|
+ userTaskUserId:null,
|
|
|
+
|
|
|
+ // 核销变量
|
|
|
+ writeOffOperationVisable: false,
|
|
|
+ writeOffOperationTransitionData: {},
|
|
|
+ writeOffStatus: '',
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
@@ -1842,6 +1893,7 @@ export default {
|
|
|
this.getSubUserCustom()
|
|
|
},
|
|
|
filters: {
|
|
|
+
|
|
|
numberToCurrency(value) {
|
|
|
if (value == undefined || !value) return '0.00'
|
|
|
value = value.toFixed(2)
|
|
@@ -2977,6 +3029,9 @@ export default {
|
|
|
if(this.userId) {
|
|
|
obj.userId = this.userId
|
|
|
}
|
|
|
+ if(this.writeOffStatus != '') {
|
|
|
+ obj.writeOffValue = this.writeOffStatus
|
|
|
+ }
|
|
|
console.log(this.departmentIdArray, '加班情况统计表')
|
|
|
if(this.departmentIdArray.length != 0 && this.departmentIdArray[0] != ''){
|
|
|
let deptid = []
|
|
@@ -2995,7 +3050,14 @@ export default {
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
|
this.listLoading = false
|
|
|
- this.overTimeList = res.data
|
|
|
+ this.overTimeList = res.data.map(item => {
|
|
|
+ let obj = {
|
|
|
+ writeOffTime: '',
|
|
|
+ writeOffUser: '',
|
|
|
+ writeOffReason: '',
|
|
|
+ }
|
|
|
+ return item.writeOffValue == 0 ? { ...item, ...obj } : { ...item }
|
|
|
+ })
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -4158,6 +4220,36 @@ export default {
|
|
|
this.projectEstimatedWorkData = data.records
|
|
|
this.total = data.total
|
|
|
this.listLoading = false
|
|
|
+ },
|
|
|
+ writeOffOperation(item, type) {
|
|
|
+ const list = [
|
|
|
+ { label: this.$t('yiFaFangJIaBanGongShi'), value: this.$t('yiFaFangJIaBanGongShi') },
|
|
|
+ { label: this.$t('wuXiaoJiaBan'), value: this.$t('wuXiaoJiaBan') },
|
|
|
+ ]
|
|
|
+ if(type == 'restore') {
|
|
|
+ this.writeOffOperationTransitionData = { ...item, writeOffType: 0, writeOffReason: '', options: list }
|
|
|
+ this.editWriteOffOperation()
|
|
|
+ }
|
|
|
+ if(type == 'writeoff') {
|
|
|
+ this.writeOffOperationTransitionData = { ...item, writeOffType: 1, writeOffReason: '', options: list }
|
|
|
+ this.writeOffOperationVisable = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async editWriteOffOperation() {
|
|
|
+ const { reportId, writeOffType, writeOffReason } = this.writeOffOperationTransitionData
|
|
|
+ let parameter = {
|
|
|
+ reportId,
|
|
|
+ type: writeOffType,
|
|
|
+ }
|
|
|
+ writeOffType ? parameter.reason = writeOffReason : ''
|
|
|
+ let { data, code } = await this.postData('/report-write-off/writeOffReport', {
|
|
|
+ ...parameter
|
|
|
+ })
|
|
|
+ console.log(data, '<======= 操作')
|
|
|
+ if(code) {
|
|
|
+ this.writeOffOperationVisable = false
|
|
|
+ }
|
|
|
+ this.getList(6)
|
|
|
}
|
|
|
},
|
|
|
};
|