|
@@ -113,6 +113,10 @@
|
|
|
<el-form-item style="float:right;" v-if="user.dingdingUserid != null && permissions.structureImport">
|
|
|
<el-link type="primary" :underline="false" @click="showCorpDDSyncDialog">{{ $t('synchronizetheaddressbook') }}</el-link>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
+ <el-form-item style="float:right;" v-if="permissions.structureExport">
|
|
|
+ <el-link type="primary" :underline="false" @click="showWorkTypeDialog">自定义工种</el-link>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
<el-form-item style="float:right;">
|
|
|
<span style="color: #666666">{{ $t('jiao-se') }}</span>
|
|
@@ -121,16 +125,27 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item style="float:right;">
|
|
|
- <span style="color: #666666">{{ $t('state.states') }}</span>
|
|
|
- <el-select v-model="status" :placeholder="$t('defaultText.pleaseChoose')" @change="getUser()" style="width: 120px" size="small">
|
|
|
+ <span style="color: #666666">工种</span>
|
|
|
+ <el-select v-model="workTypeId" :placeholder="$t('defaultText.pleaseChoose')" @change="getUser()" style="width: 120px" clearable size="small">
|
|
|
<el-option
|
|
|
- v-for="item in states"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
+ v-for="item in workTypeList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item style="float:right;">
|
|
|
+ <span style="color: #666666">{{ $t('state.states') }}</span>
|
|
|
+ <el-select v-model="status" :placeholder="$t('defaultText.pleaseChoose')" @change="getUser()" style="width: 120px" size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="item in states"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item style="float:right;">
|
|
|
<div style="width: 300px;display: inline-block;margin-top: 4px">
|
|
|
<el-input v-model="keyword" class="input-with-select" placeholder="请输入" clearable="true" size="small">
|
|
@@ -173,6 +188,8 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="jobNumber" :label="$t('Worknumber')" ></el-table-column>
|
|
|
+ <el-table-column prop="workType" label="工种" ></el-table-column>
|
|
|
+ <el-table-column label="性别" ><template slot-scope="scope"><div>{{ scope.row.gender == 1 ? '男' : "女" }}</div></template></el-table-column>
|
|
|
<el-table-column prop="phone" :label="$t('shou-ji')" width="120"></el-table-column>
|
|
|
<el-table-column prop="departmentName" :label="$t('lable.department')" width="220">
|
|
|
<template slot-scope="scope">
|
|
@@ -236,7 +253,42 @@
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</div>
|
|
|
-
|
|
|
+ <!-- 工种列表 -->
|
|
|
+ <el-dialog title="工种管理" :visible.sync="isganttshow" width="50%" :before-close="handleClose">
|
|
|
+ <div>
|
|
|
+ <el-table :data="workTypeList" style="width: 100%">
|
|
|
+ <el-table-column type="index" width="180" label="序号">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="工种名称" width="180">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="mini" @click="updateWorkType(scope.row)">编辑</el-button>
|
|
|
+ <el-button size="mini" @click="deleteWorkType(scope.row)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="isganttshow = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="isganttshowWk = true; title = '新增工种'; workType = {}">新增</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 编辑工种 -->
|
|
|
+ <el-dialog :title="title" :visible.sync="isganttshowWk" width="30%">
|
|
|
+ <div>
|
|
|
+ <el-form ref="form" :model="workType" label-width="80px">
|
|
|
+ <el-form-item label="工种名称">
|
|
|
+ <el-input v-model="workType.name" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="isganttshowWk = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click=" saveWorkType()">确定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
<!-- 修正工时所属部门 -->
|
|
|
<el-dialog title="修正工时" :visible.sync="workingHoursDialog" width="650px" :before-close="handleClose">
|
|
|
<div>
|
|
@@ -341,6 +393,16 @@
|
|
|
<el-form-item :label="$t('Worknumber')" prop="jobNumber">
|
|
|
<el-input v-model="insertForm.jobNumber" :placeholder="$t('peaseenterthe')" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="工种" prop="workTypeId">
|
|
|
+ <el-select v-model="insertForm.workTypeId" placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in workTypeList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item :label="$t('monthcost')" prop="monthCost" v-if="insertForm.salaryType == 0 && permissions.structurePersonnel&&user.timeType.isSecretSalary==0">
|
|
|
<el-input v-model="insertForm.monthCost" id="mc" @input="oninput" :placeholder="$t('yuechengben')" clearable @keyup.native="restrictNumber('mc')"></el-input>
|
|
|
<span style="color:orange;font-size:12px;">{{ $t('yuegongzuoo') }}{{timeType.monthDays}}{{ $t('time.day') }},{{$t('meitian')}}{{timeType.allday}}{{ $t('xiaoshi') }}</span>
|
|
@@ -801,6 +863,8 @@ export default {
|
|
|
window.onresize = function temp() {
|
|
|
that.tableHeight = window.innerHeight - 195;
|
|
|
};
|
|
|
+
|
|
|
+ this.getAllWorkType()
|
|
|
this.initDrag([
|
|
|
{
|
|
|
type: "LR",
|
|
@@ -840,6 +904,11 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ isganttshow: false,
|
|
|
+ isganttshowWk: false,
|
|
|
+ workTypeId: null,
|
|
|
+ workTypeList: [], //所有工种集合
|
|
|
+ workType:{},
|
|
|
isSyncContact: false,
|
|
|
showSyncDDDialog: false,
|
|
|
transferActiveDialogFlag:false,
|
|
@@ -2420,6 +2489,7 @@ export default {
|
|
|
status: this.status,
|
|
|
// role: this.role
|
|
|
roleId: this.roleId,
|
|
|
+ workTypeId: this.workTypeId,
|
|
|
onlyDirect: this.onlyDirect ? "1" : "0",
|
|
|
cursor: this.nextCursor, // 游标
|
|
|
matchingType: this.integer
|
|
@@ -2508,6 +2578,79 @@ export default {
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
},
|
|
|
+ showWorkTypeDialog(){
|
|
|
+ this.getAllWorkType()
|
|
|
+ this.isganttshow=true;
|
|
|
+ },
|
|
|
+ //获取所有的工种
|
|
|
+ getAllWorkType(){
|
|
|
+ this.http.post("/user-work-type/getAll",{},
|
|
|
+ res=>{
|
|
|
+ if(res.code =='ok'){
|
|
|
+ this.workTypeList=res.data.map(item=>{
|
|
|
+ return{
|
|
|
+ id: parseInt(item.id),
|
|
|
+ name: item.name
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(this.workTypeList)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ updateWorkType(row) {
|
|
|
+ this.isganttshowWk = true
|
|
|
+ this.title = "编辑工种"
|
|
|
+ this.workType = row
|
|
|
+ },
|
|
|
+ deleteWorkType(row) {
|
|
|
+ this.http.post("/user-work-type/delete", { id: row.id },
|
|
|
+ res => {
|
|
|
+ console.log("=======", res.code)
|
|
|
+ if (res.code === 'ok') {
|
|
|
+ this.getAllWorkType()
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '删除成功',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: res.msg,
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ saveWorkType() {
|
|
|
+
|
|
|
+ if(this.workType.name==null){
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '工种名不能为空',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ this.http.post("/user-work-type/updateOrInsert", this.workType,
|
|
|
+ res => {
|
|
|
+ if (res.code == 'ok') {
|
|
|
+ this.isganttshowWk = false
|
|
|
+ this.getAllWorkType()
|
|
|
+ this.workType = {}
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '该工种已存在',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
|
|
|
// 新增、编辑人员
|
|
|
openInsertDialog(row, roleNameFlg) {
|
|
@@ -2572,10 +2715,12 @@ export default {
|
|
|
plate3: res.data.plate3,
|
|
|
plate4: res.data.plate4,
|
|
|
plate5: res.data.plate5,
|
|
|
- jobNumber: res.data.jobNumber
|
|
|
+ jobNumber: res.data.jobNumber,
|
|
|
+ workTypeId: res.data.workTypeId
|
|
|
};
|
|
|
this.$set(this.insertForm, 'inductionDate', res.data.inductionDate)
|
|
|
this.getUserCustomConfig(1);
|
|
|
+ this.getAllWorkType()
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -2656,11 +2801,13 @@ export default {
|
|
|
this.submitLoading = false;
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
form = {
|
|
|
name: this.insertForm.name,
|
|
|
phone: this.insertForm.phone,
|
|
|
// role: this.insertForm.role,
|
|
|
roleId: this.insertForm.roleId,
|
|
|
+ workTypeId: this.insertForm.workTypeId,
|
|
|
monthCost: this.insertForm.monthCost,
|
|
|
cost: this.insertForm.cost,
|
|
|
salaryType: this.insertForm.salaryType,
|
|
@@ -2674,6 +2821,8 @@ export default {
|
|
|
plate4: this.insertForm.plate4,
|
|
|
plate5: this.insertForm.plate5,
|
|
|
jobNumber: this.insertForm.jobNumber,
|
|
|
+ workTypeId: this.insertForm.workTypeId
|
|
|
+
|
|
|
};
|
|
|
if (this.insertForm.isActive == 0) {
|
|
|
form.inactiveDate = this.insertForm.inactiveDate;
|
|
@@ -2902,7 +3051,7 @@ export default {
|
|
|
position: this.insertForm.position,
|
|
|
certJson: this.insertForm.certJson,
|
|
|
inductionDate: this.insertForm.inductionDate,
|
|
|
- jobNumber: this.insertForm.jobNumber,
|
|
|
+ jobNumber: this.insertForm.jobNumber
|
|
|
};
|
|
|
if (this.insertForm.departmentId != null) {
|
|
|
form.departmentId =
|