246 lines
5.4 KiB
Vue
246 lines
5.4 KiB
Vue
|
|
<template>
|
||
|
|
<div class="page">
|
||
|
|
<topBar
|
||
|
|
v-if="topList.length > 0"
|
||
|
|
:topList="topList"
|
||
|
|
:moren="moren"
|
||
|
|
></topBar>
|
||
|
|
<div class="main">
|
||
|
|
<div class="maintable">
|
||
|
|
<el-table
|
||
|
|
:data="tableData"
|
||
|
|
style="width: 100%"
|
||
|
|
:header-cell-style="{ background: '#EEEEEE' }"
|
||
|
|
:row-class-name="tableRowClassName"
|
||
|
|
>
|
||
|
|
<el-table-column
|
||
|
|
width="200px"
|
||
|
|
align="center"
|
||
|
|
:formatter="checkTypeList"
|
||
|
|
prop="serviceType"
|
||
|
|
:label="$t('MN_F_T_414')"
|
||
|
|
>
|
||
|
|
</el-table-column>
|
||
|
|
<el-table-column
|
||
|
|
align="center"
|
||
|
|
prop="serviceRadio"
|
||
|
|
:label="$t('MN_F_T_415') + '(%)'"
|
||
|
|
>
|
||
|
|
<template slot-scope="scope">
|
||
|
|
<el-input
|
||
|
|
clearable
|
||
|
|
class="theinput"
|
||
|
|
:disabled="ifupdate"
|
||
|
|
v-model="scope.row.serviceRadio"
|
||
|
|
></el-input>
|
||
|
|
</template>
|
||
|
|
</el-table-column>
|
||
|
|
<el-table-column
|
||
|
|
align="center"
|
||
|
|
prop="assessmentType"
|
||
|
|
label="考核类型"
|
||
|
|
>
|
||
|
|
<template slot-scope="scope">
|
||
|
|
<el-select
|
||
|
|
clearable
|
||
|
|
:disabled="ifupdate"
|
||
|
|
v-model="scope.row.assessmentType"
|
||
|
|
>
|
||
|
|
<el-option
|
||
|
|
v-for="item in ssessmentTypeList"
|
||
|
|
:key="item.value"
|
||
|
|
:label="item.label"
|
||
|
|
:value="item.value"
|
||
|
|
></el-option>
|
||
|
|
</el-select>
|
||
|
|
</template>
|
||
|
|
</el-table-column>
|
||
|
|
</el-table>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="footer">
|
||
|
|
<div style="margin: 0 auto">
|
||
|
|
<el-button class="thebtn btn1" @click="ifupdate = false">{{
|
||
|
|
$t("ENU_CONTROL_TYPE_2")
|
||
|
|
}}</el-button>
|
||
|
|
<el-button class="thebtn btn2" @click="savedate">{{
|
||
|
|
$t("PER_DA_12")
|
||
|
|
}}</el-button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
import topBar from "@/components/topBar";
|
||
|
|
import {
|
||
|
|
getServiceList,
|
||
|
|
updateService,
|
||
|
|
getServiceTypeList,
|
||
|
|
getAssessmentType,
|
||
|
|
} from "@/api/bonus";
|
||
|
|
|
||
|
|
export default {
|
||
|
|
name: "Fwbt",
|
||
|
|
components: {
|
||
|
|
topBar,
|
||
|
|
},
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
moren: "fwbt",
|
||
|
|
topList: [
|
||
|
|
{
|
||
|
|
name: this.$t("MN_F_T_412"),
|
||
|
|
path: "bonus",
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: this.$t("MN_F_T_114"),
|
||
|
|
path: "ztpz",
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: this.$t("MN_F_T_413"),
|
||
|
|
path: "kzpz",
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: this.$t("MN_F_T_116"),
|
||
|
|
path: "fdfh",
|
||
|
|
},
|
||
|
|
|
||
|
|
{
|
||
|
|
name: this.$t("MN_F_T_117"),
|
||
|
|
path: "fwbt",
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: this.$t("MN_F_T_118"),
|
||
|
|
path: "jjkx",
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: this.$t("MN_F_T_119"),
|
||
|
|
path: "ydpz",
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: this.$t("MN_F_T_120"),
|
||
|
|
path: "hqjf",
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: this.$t("MN_F_T_121"),
|
||
|
|
path: "njjf",
|
||
|
|
},
|
||
|
|
],
|
||
|
|
tableData: [
|
||
|
|
{
|
||
|
|
name: "asads",
|
||
|
|
put: 2,
|
||
|
|
},
|
||
|
|
],
|
||
|
|
ifupdate: true,
|
||
|
|
serviceTypeList: [],
|
||
|
|
ssessmentTypeList: [],
|
||
|
|
};
|
||
|
|
},
|
||
|
|
created() {
|
||
|
|
this.getServiceList();
|
||
|
|
this.getServiceTypeList();
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
//获取服务补贴列表
|
||
|
|
getServiceList() {
|
||
|
|
getServiceList().then((res) => {
|
||
|
|
this.tableData = res.rows;
|
||
|
|
});
|
||
|
|
},
|
||
|
|
//获取服务补贴类型枚举列表
|
||
|
|
getServiceTypeList() {
|
||
|
|
getServiceTypeList().then((res) => {
|
||
|
|
this.serviceTypeList = res.data;
|
||
|
|
});
|
||
|
|
//考核类型下拉选
|
||
|
|
getAssessmentType().then((res) => {
|
||
|
|
this.ssessmentTypeList = res.data;
|
||
|
|
});
|
||
|
|
},
|
||
|
|
//服务补贴类型对应枚举查询
|
||
|
|
checkTypeList(row) {
|
||
|
|
let state = "";
|
||
|
|
this.serviceTypeList.forEach((item) => {
|
||
|
|
if (item.value == row.serviceType) {
|
||
|
|
state = item.label;
|
||
|
|
}
|
||
|
|
});
|
||
|
|
return state;
|
||
|
|
},
|
||
|
|
//保存
|
||
|
|
savedate() {
|
||
|
|
this.ifupdate = true;
|
||
|
|
updateService({ bdBonusServiceList: this.tableData }).then((res) => {
|
||
|
|
if (res.code == 200) {
|
||
|
|
this.$message({
|
||
|
|
message: res.msg,
|
||
|
|
type: "success",
|
||
|
|
});
|
||
|
|
} else {
|
||
|
|
this.$message({
|
||
|
|
message: res.msg,
|
||
|
|
type: "warning",
|
||
|
|
});
|
||
|
|
}
|
||
|
|
this.getServiceList();
|
||
|
|
});
|
||
|
|
},
|
||
|
|
tableRowClassName({ row, rowIndex }) {
|
||
|
|
if (rowIndex % 2 == 1) {
|
||
|
|
return "warning-row";
|
||
|
|
} else if (rowIndex % 2 == 0) {
|
||
|
|
return "success-row";
|
||
|
|
}
|
||
|
|
return "";
|
||
|
|
},
|
||
|
|
},
|
||
|
|
};
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="scss" scoped>
|
||
|
|
::v-deep .el-table thead {
|
||
|
|
color: #000000;
|
||
|
|
}
|
||
|
|
::v-deep .el-table .warning-row {
|
||
|
|
background: #f9f9f9;
|
||
|
|
}
|
||
|
|
|
||
|
|
::v-deep .theinput .el-input__inner {
|
||
|
|
width: 30% !important;
|
||
|
|
}
|
||
|
|
|
||
|
|
::v-deep .el-table .success-row {
|
||
|
|
background: #ffffff;
|
||
|
|
}
|
||
|
|
.page {
|
||
|
|
padding: 20px;
|
||
|
|
background: #f9f9f9;
|
||
|
|
font-size: 14px;
|
||
|
|
.main {
|
||
|
|
background: #ffffff;
|
||
|
|
border-radius: 8px;
|
||
|
|
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||
|
|
}
|
||
|
|
.footer {
|
||
|
|
display: flex;
|
||
|
|
margin-top: 20px;
|
||
|
|
.thebtn {
|
||
|
|
width: 120px;
|
||
|
|
height: 48px;
|
||
|
|
color: #ffffff;
|
||
|
|
font-size: 14px;
|
||
|
|
font-weight: bold;
|
||
|
|
}
|
||
|
|
.btn1 {
|
||
|
|
background: #4391fd;
|
||
|
|
margin-right: 80px;
|
||
|
|
}
|
||
|
|
.btn2 {
|
||
|
|
background: #ffad41;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</style>
|