|
@@ -32,7 +32,7 @@
|
|
<el-link type="primary" :underline="false" @click="exportDialog = true;exportMonth = date;">数据导出</el-link>
|
|
<el-link type="primary" :underline="false" @click="exportDialog = true;exportMonth = date;">数据导出</el-link>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item style="float:right;" v-if="permissions.financialCustom">
|
|
<el-form-item style="float:right;" v-if="permissions.financialCustom">
|
|
- <el-link type="primary" :underline="false" @click="showItemDialog">自定义薪资项</el-link>
|
|
|
|
|
|
+ <el-link type="primary" :underline="false" @click="showItemDialog()">自定义薪资项</el-link>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item style="float:right;" v-if="user.timeType.financeAudit == '1' && permissions.setFinanceAuditor">
|
|
<el-form-item style="float:right;" v-if="user.timeType.financeAudit == '1' && permissions.setFinanceAuditor">
|
|
<el-link type="primary" :underline="false" @click="reviewerVisible = true">设置审核人</el-link>
|
|
<el-link type="primary" :underline="false" @click="reviewerVisible = true">设置审核人</el-link>
|
|
@@ -164,8 +164,7 @@
|
|
ref="table"
|
|
ref="table"
|
|
:height="300" style="width: 100%;">
|
|
:height="300" style="width: 100%;">
|
|
<el-table-column prop="name" label="姓名" sortable width="150"></el-table-column>
|
|
<el-table-column prop="name" label="姓名" sortable width="150"></el-table-column>
|
|
- <el-table-column :prop="headerCols[index]" :label="item" sortable show-overflow-tooltip v-for="(item, index) in tblCols"
|
|
|
|
- :key="index">
|
|
|
|
|
|
+ <el-table-column :prop="headerCols[index]" :label="item" sortable show-overflow-tooltip v-for="(item, index) in tblCols" :key="index" width="130px" align="center">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<!-- <el-table-column prop="monthCost" label="customCols.monthCost" width="150"></el-table-column>
|
|
<!-- <el-table-column prop="monthCost" label="customCols.monthCost" width="150"></el-table-column>
|
|
<el-table-column prop="bonus" :label="customCols.bonus" ></el-table-column>
|
|
<el-table-column prop="bonus" :label="customCols.bonus" ></el-table-column>
|
|
@@ -197,7 +196,7 @@
|
|
{{index==0?scope.row.customField1:(index==1?scope.row.customField2:(index==2?scope.row.customField3:''))}}
|
|
{{index==0?scope.row.customField1:(index==1?scope.row.customField2:(index==2?scope.row.customField3:''))}}
|
|
</template>
|
|
</template>
|
|
</el-table-column> -->
|
|
</el-table-column> -->
|
|
- <el-table-column prop="totalCost" label="总成本" ></el-table-column>
|
|
|
|
|
|
+ <el-table-column prop="totalCost" label="总成本"></el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
<el-form :inline="true" >
|
|
<el-form :inline="true" >
|
|
@@ -317,21 +316,86 @@
|
|
</div>
|
|
</div>
|
|
</el-dialog> -->
|
|
</el-dialog> -->
|
|
|
|
|
|
- <el-dialog title="自定义薪资项" show-header="false" v-if="itemDialog" :visible.sync="itemDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
|
|
|
|
|
|
+ <el-dialog title="自定义薪资项" show-header="false" v-if="itemDialog" :visible.sync="itemDialog" :close-on-click-modal="false" customClass="customWidth" width="500px" top="20px">
|
|
<div style="margin-left:30px;">
|
|
<div style="margin-left:30px;">
|
|
<!-- 111 -->
|
|
<!-- 111 -->
|
|
- <span style="color:#999;">薪资表包含以下数据</span>
|
|
|
|
- <p><el-input v-model="customCols.monthCost" placeholder="请输入自定义薪资项名称" style="width:200px;" maxlength="8"></el-input></p>
|
|
|
|
- <p><el-input v-model="customCols.bonus" placeholder="请输入自定义薪资项名称" style="width:200px;" maxlength="8"></el-input></p>
|
|
|
|
- <p><el-input v-model="customCols.allowance" placeholder="请输入自定义薪资项名称" style="width:200px;" maxlength="8"></el-input></p>
|
|
|
|
- <p><el-input v-model="customCols.insuranceOld" placeholder="请输入自定义薪资项名称" style="width:200px;" maxlength="8"></el-input></p>
|
|
|
|
- <p><el-input v-model="customCols.insuranceMedical" placeholder="请输入自定义薪资项名称" style="width:200px;" maxlength="8"></el-input></p>
|
|
|
|
- <p><el-input v-model="customCols.insuranceLosejob" placeholder="请输入自定义薪资项名称" style="width:200px;" maxlength="8"></el-input></p>
|
|
|
|
- <p><el-input v-model="customCols.insuranceInjury" placeholder="请输入自定义薪资项名称" style="width:200px;" maxlength="8"></el-input></p>
|
|
|
|
- <p><el-input v-model="customCols.houseFund" placeholder="请输入自定义薪资项名称" style="width:200px;" maxlength="8"></el-input></p>
|
|
|
|
- <p><el-input v-model="customCols.field1" placeholder="请输入自定义薪资项1名称" style="width:200px;" maxlength="8"></el-input></p>
|
|
|
|
- <p><el-input v-model="customCols.field2" placeholder="请输入自定义薪资项2名称" style="width:200px;" maxlength="8"></el-input></p>
|
|
|
|
- <p><el-input v-model="customCols.field3" placeholder="请输入自定义薪资项3名称" style="width:200px;" maxlength="8"></el-input></p>
|
|
|
|
|
|
+ <p><el-input size="medium" v-model.trim="customCols.monthCost" placeholder="请输入自定义薪资项名称" style="width:200px;margin-right:20px" maxlength="8"></el-input>
|
|
|
|
+ <template v-if="customCols.monthCost != null && customCols.monthCost != ''">
|
|
|
|
+ 计入总成本
|
|
|
|
+ <el-radio size="medium" v-model="customCols.monthCostCalculate" :label="1" style="margin-right:10px;margin-left:10px">是</el-radio>
|
|
|
|
+ <el-radio size="medium" v-model="customCols.monthCostCalculate" :label="0">否</el-radio>
|
|
|
|
+ </template>
|
|
|
|
+ </p>
|
|
|
|
+ <p><el-input size="medium" v-model.trim="customCols.bonus" placeholder="请输入自定义薪资项名称" style="width:200px;margin-right:20px" maxlength="8"></el-input>
|
|
|
|
+ <template v-if="customCols.bonus != null && customCols.bonus != ''">
|
|
|
|
+ 计入总成本
|
|
|
|
+ <el-radio size="medium" v-model="customCols.bonusCalculate" :label="1" style="margin-right:10px;margin-left:10px">是</el-radio>
|
|
|
|
+ <el-radio size="medium" v-model="customCols.bonusCalculate" :label="0">否</el-radio>
|
|
|
|
+ </template>
|
|
|
|
+ </p>
|
|
|
|
+ <p><el-input size="medium" v-model.trim="customCols.allowance" placeholder="请输入自定义薪资项名称" style="width:200px;margin-right:20px" maxlength="8"></el-input>
|
|
|
|
+ <template v-if="customCols.allowance != null && customCols.allowance != ''">
|
|
|
|
+ 计入总成本
|
|
|
|
+ <el-radio size="medium" v-model="customCols.allowanceCalculate" :label="1" style="margin-right:10px;margin-left:10px">是</el-radio>
|
|
|
|
+ <el-radio size="medium" v-model="customCols.allowanceCalculate" :label="0">否</el-radio>
|
|
|
|
+ </template>
|
|
|
|
+ </p>
|
|
|
|
+ <p><el-input size="medium" v-model.trim="customCols.insuranceOld" placeholder="请输入自定义薪资项名称" style="width:200px;margin-right:20px" maxlength="8"></el-input>
|
|
|
|
+ <template v-if="customCols.insuranceOld != null && customCols.insuranceOld != ''">
|
|
|
|
+ 计入总成本
|
|
|
|
+ <el-radio size="medium" v-model="customCols.insuranceOldCalculate" :label="1" style="margin-right:10px;margin-left:10px">是</el-radio>
|
|
|
|
+ <el-radio size="medium" v-model="customCols.insuranceOldCalculate" :label="0">否</el-radio>
|
|
|
|
+ </template>
|
|
|
|
+ </p>
|
|
|
|
+ <p><el-input size="medium" v-model.trim="customCols.insuranceMedical" placeholder="请输入自定义薪资项名称" style="width:200px;margin-right:20px" maxlength="8"></el-input>
|
|
|
|
+ <template v-if="customCols.insuranceMedical != null && customCols.insuranceMedical != ''">
|
|
|
|
+ 计入总成本
|
|
|
|
+ <el-radio size="medium" v-model="customCols.insuranceMedicalCalculate" :label="1" style="margin-right:10px;margin-left:10px">是</el-radio>
|
|
|
|
+ <el-radio size="medium" v-model="customCols.insuranceMedicalCalculate" :label="0">否</el-radio>
|
|
|
|
+ </template>
|
|
|
|
+ </p>
|
|
|
|
+ <p><el-input size="medium" v-model.trim="customCols.insuranceLosejob" placeholder="请输入自定义薪资项名称" style="width:200px;margin-right:20px" maxlength="8"></el-input>
|
|
|
|
+ <template v-if="customCols.insuranceLosejob != null && customCols.insuranceLosejob != ''">
|
|
|
|
+ 计入总成本
|
|
|
|
+ <el-radio size="medium" v-model="customCols.insuranceLosejobCalculate" :label="1" style="margin-right:10px;margin-left:10px">是</el-radio>
|
|
|
|
+ <el-radio size="medium" v-model="customCols.insuranceLosejobCalculate" :label="0">否</el-radio>
|
|
|
|
+ </template>
|
|
|
|
+ </p>
|
|
|
|
+ <p><el-input size="medium" v-model.trim="customCols.insuranceInjury" placeholder="请输入自定义薪资项名称" style="width:200px;margin-right:20px" maxlength="8"></el-input>
|
|
|
|
+ <template v-if="customCols.insuranceInjury != null && customCols.insuranceInjury != ''">
|
|
|
|
+ 计入总成本
|
|
|
|
+ <el-radio size="medium" v-model="customCols.insuranceInjuryCalculate" :label="1" style="margin-right:10px;margin-left:10px">是</el-radio>
|
|
|
|
+ <el-radio size="medium" v-model="customCols.insuranceInjuryCalculate" :label="0">否</el-radio>
|
|
|
|
+ </template>
|
|
|
|
+ </p>
|
|
|
|
+ <p><el-input size="medium" v-model.trim="customCols.houseFund" placeholder="请输入自定义薪资项名称" style="width:200px;margin-right:20px" maxlength="8"></el-input>
|
|
|
|
+ <template v-if="customCols.houseFund != null && customCols.houseFund != ''">
|
|
|
|
+ 计入总成本
|
|
|
|
+ <el-radio size="medium" v-model="customCols.houseFundCalculate" :label="1" style="margin-right:10px;margin-left:10px">是</el-radio>
|
|
|
|
+ <el-radio size="medium" v-model="customCols.houseFundCalculate" :label="0">否</el-radio>
|
|
|
|
+ </template>
|
|
|
|
+ </p>
|
|
|
|
+ <p><el-input size="medium" v-model.trim="customCols.field1" placeholder="请输入自定义薪资项1名称" style="width:200px;margin-right:20px" maxlength="8"></el-input>
|
|
|
|
+ <template v-if="customCols.field1 != null && customCols.field1 != ''">
|
|
|
|
+ 计入总成本
|
|
|
|
+ <el-radio size="medium" v-model="customCols.field1Calculate" :label="1" style="margin-right:10px;margin-left:10px">是</el-radio>
|
|
|
|
+ <el-radio size="medium" v-model="customCols.field1Calculate" :label="0">否</el-radio>
|
|
|
|
+ </template>
|
|
|
|
+ </p>
|
|
|
|
+ <p><el-input size="medium" v-model.trim="customCols.field2" placeholder="请输入自定义薪资项2名称" style="width:200px;margin-right:20px" maxlength="8"></el-input>
|
|
|
|
+ <template v-if="customCols.field2 != null && customCols.field2 != ''">
|
|
|
|
+ 计入总成本
|
|
|
|
+ <el-radio size="medium" v-model="customCols.field2Calculate" :label="1" style="margin-right:10px;margin-left:10px">是</el-radio>
|
|
|
|
+ <el-radio size="medium" v-model="customCols.field2Calculate" :label="0">否</el-radio>
|
|
|
|
+ </template>
|
|
|
|
+ </p>
|
|
|
|
+ <p><el-input size="medium" v-model.trim="customCols.field3" placeholder="请输入自定义薪资项3名称" style="width:200px;margin-right:20px" maxlength="8"></el-input>
|
|
|
|
+ <template v-if="customCols.field3 != null && customCols.field3 != ''">
|
|
|
|
+ 计入总成本
|
|
|
|
+ <el-radio size="medium" v-model="customCols.field3Calculate" :label="1" style="margin-right:10px;margin-left:10px">是</el-radio>
|
|
|
|
+ <el-radio size="medium" v-model="customCols.field3Calculate" :label="0">否</el-radio>
|
|
|
|
+ </template>
|
|
|
|
+ </p>
|
|
</div>
|
|
</div>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button type="primary" @click="itemDialog = false" >关闭</el-button>
|
|
<el-button type="primary" @click="itemDialog = false" >关闭</el-button>
|
|
@@ -444,6 +508,12 @@
|
|
float:right;
|
|
float:right;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
|
|
+<style>
|
|
|
|
+.customWidth .el-dialog__body{
|
|
|
|
+ padding-top: 0;
|
|
|
|
+ padding-bottom: 0;
|
|
|
|
+}
|
|
|
|
+</style>
|
|
<script>
|
|
<script>
|
|
import { error } from 'dingtalk-jsapi';
|
|
import { error } from 'dingtalk-jsapi';
|
|
import util from "../../common/js/util";
|
|
import util from "../../common/js/util";
|
|
@@ -474,6 +544,7 @@ import { error } from 'dingtalk-jsapi';
|
|
customFieldList:[],
|
|
customFieldList:[],
|
|
itemDialog: false,
|
|
itemDialog: false,
|
|
customCols:{},
|
|
customCols:{},
|
|
|
|
+ customColsi:{},
|
|
// showNPDialog: false,
|
|
// showNPDialog: false,
|
|
npUserList:[],
|
|
npUserList:[],
|
|
hasNoProjectUsers: false,
|
|
hasNoProjectUsers: false,
|
|
@@ -853,6 +924,33 @@ import { error } from 'dingtalk-jsapi';
|
|
// field2 : this.customCols.field2,
|
|
// field2 : this.customCols.field2,
|
|
// field3 : this.customCols.field3
|
|
// field3 : this.customCols.field3
|
|
// }
|
|
// }
|
|
|
|
+ if(this.customCols.field1 != null && this.customCols.field1 != ''){
|
|
|
|
+ if(this.customCols.field1Calculate == null){
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请选择是否计入总成本',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.customCols.field2 != null && this.customCols.field2 != ''){
|
|
|
|
+ if(this.customCols.field1Calculate == null){
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请选择是否计入总成本',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.customCols.field3 != null && this.customCols.field3 != ''){
|
|
|
|
+ if(this.customCols.field1Calculate == null){
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请选择是否计入总成本',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.http.post('/finance-tblcuscol/save', this.customCols,
|
|
this.http.post('/finance-tblcuscol/save', this.customCols,
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
@@ -862,6 +960,11 @@ import { error } from 'dingtalk-jsapi';
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
},
|
|
},
|
|
showItemDialog() {
|
|
showItemDialog() {
|
|
|
|
+ // console.log(this.customColsi, '后台纯的')
|
|
|
|
+ // console.log(this.customCols, '用来编辑的')
|
|
|
|
+ this.customCols = JSON.parse(JSON.stringify(this.customColsi))
|
|
|
|
+ // console.log(this.customColsi, '后台纯的')
|
|
|
|
+ // console.log(this.customCols, '用来编辑的')
|
|
this.itemDialog = true;
|
|
this.itemDialog = true;
|
|
// this.customFieldList = {field1:null,field2:null, field3:null};
|
|
// this.customFieldList = {field1:null,field2:null, field3:null};
|
|
// if (this.customCols.field1 !== undefined) {
|
|
// if (this.customCols.field1 !== undefined) {
|
|
@@ -879,24 +982,25 @@ import { error } from 'dingtalk-jsapi';
|
|
this.http.post('/finance-tblcuscol/getAll', {companyId: this.user.companyId},
|
|
this.http.post('/finance-tblcuscol/getAll', {companyId: this.user.companyId},
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
- this.customCols = res.data;
|
|
|
|
|
|
+ console.log("获取自定义字段",res.data);
|
|
|
|
+ this.customColsi = res.data;
|
|
this.tblCols = [];
|
|
this.tblCols = [];
|
|
- this.tblCols.push(this.customCols.monthCost);
|
|
|
|
- this.tblCols.push(this.customCols.bonus);
|
|
|
|
- this.tblCols.push(this.customCols.allowance);
|
|
|
|
- this.tblCols.push(this.customCols.insuranceOld);
|
|
|
|
- this.tblCols.push(this.customCols.insuranceMedical);
|
|
|
|
- this.tblCols.push(this.customCols.insuranceLosejob);
|
|
|
|
- this.tblCols.push(this.customCols.insuranceInjury);
|
|
|
|
- this.tblCols.push(this.customCols.houseFund);
|
|
|
|
- if (this.customCols.field1 != null) {
|
|
|
|
- this.tblCols.push(this.customCols.field1);
|
|
|
|
|
|
+ this.tblCols.push(this.customColsi.monthCost);
|
|
|
|
+ this.tblCols.push(this.customColsi.bonus);
|
|
|
|
+ this.tblCols.push(this.customColsi.allowance);
|
|
|
|
+ this.tblCols.push(this.customColsi.insuranceOld);
|
|
|
|
+ this.tblCols.push(this.customColsi.insuranceMedical);
|
|
|
|
+ this.tblCols.push(this.customColsi.insuranceLosejob);
|
|
|
|
+ this.tblCols.push(this.customColsi.insuranceInjury);
|
|
|
|
+ this.tblCols.push(this.customColsi.houseFund);
|
|
|
|
+ if (this.customColsi.field1 != null) {
|
|
|
|
+ this.tblCols.push(this.customColsi.field1);
|
|
}
|
|
}
|
|
- if (this.customCols.field2 != null) {
|
|
|
|
- this.tblCols.push(this.customCols.field2);
|
|
|
|
|
|
+ if (this.customColsi.field2 != null) {
|
|
|
|
+ this.tblCols.push(this.customColsi.field2);
|
|
}
|
|
}
|
|
- if (this.customCols.field3 != null) {
|
|
|
|
- this.tblCols.push(this.customCols.field3);
|
|
|
|
|
|
+ if (this.customColsi.field3 != null) {
|
|
|
|
+ this.tblCols.push(this.customColsi.field3);
|
|
}
|
|
}
|
|
}});
|
|
}});
|
|
|
|
|