项目人员变动
This commit is contained in:
parent
f3bffa50ca
commit
1cfd216468
|
@ -7,9 +7,9 @@ VUE_APP_TITLE = '曲阳金隅安全智能管控平台'
|
||||||
# 接口地址
|
# 接口地址
|
||||||
#VUE_APP_API_BASEURL = http://1.203.161.103:2800/api
|
#VUE_APP_API_BASEURL = http://1.203.161.103:2800/api
|
||||||
#VUE_APP_WS_API = 'ws://localhost:8000'
|
#VUE_APP_WS_API = 'ws://localhost:8000'
|
||||||
VUE_APP_API_BASEURL = http://222.222.144.147:6013/api
|
# VUE_APP_API_BASEURL = http://222.222.144.147:6013/api
|
||||||
#VUE_APP_API_BASEURL = http://10.99.5.79:20309/api
|
#VUE_APP_API_BASEURL = http://10.99.5.79:20309/api
|
||||||
#VUE_APP_API_BASEURL = http://127.0.0.1:8001/api
|
VUE_APP_API_BASEURL = http://49.232.14.174:2226/api
|
||||||
#VUE_APP_BASEURL = http://127.0.0.1:8000
|
#VUE_APP_BASEURL = http://127.0.0.1:8000
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,16 @@ export default {
|
||||||
return await http.delete(
|
return await http.delete(
|
||||||
`${config.API_URL}/rpm/rpj/${id}/`);
|
`${config.API_URL}/rpm/rpj/${id}/`);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
logs: {
|
||||||
|
name: "日志",
|
||||||
|
req: async function (data) {
|
||||||
|
return await http.get(
|
||||||
|
`${config.API_URL}/rpm/rpj_log/`,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
/*相关方文件 */
|
/*相关方文件 */
|
||||||
rfile: {
|
rfile: {
|
||||||
|
@ -266,6 +275,14 @@ export default {
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
leave: {
|
||||||
|
name: "提前离厂",
|
||||||
|
req: async function (id,data) {
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/rpm/rpj_member/${id}/leave/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
update: {
|
update: {
|
||||||
name: "更新",
|
name: "更新",
|
||||||
req: async function (id, data) {
|
req: async function (id, data) {
|
||||||
|
|
|
@ -211,8 +211,10 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
apiObj: this.$API.system.user.list,
|
apiObj: this.$API.system.user.list,
|
||||||
params: {},
|
params: {is_active:true},
|
||||||
query: {},
|
query: {
|
||||||
|
is_active:true,
|
||||||
|
},
|
||||||
selection: [],
|
selection: [],
|
||||||
filterText: "",
|
filterText: "",
|
||||||
filterTexts: "",
|
filterTexts: "",
|
||||||
|
|
|
@ -14,6 +14,10 @@
|
||||||
<el-descriptions-item label="所属部门:">{{ form.belong_dept_name }}</el-descriptions-item>
|
<el-descriptions-item label="所属部门:">{{ form.belong_dept_name }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="相关方:">{{ form.rparty_name }}</el-descriptions-item>
|
<el-descriptions-item label="相关方:">{{ form.rparty_name }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
<el-button type="primary" size="small"
|
||||||
|
v-if="form.state==30||form.state==40"
|
||||||
|
@click="addWorker()">添加人员
|
||||||
|
</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top:8px" shadow="hover">
|
<el-card style="margin-top:8px" shadow="hover">
|
||||||
<scTable ref="fileTable" :data="rpjFileList" row-key="id" hidePagination stripe hideDo
|
<scTable ref="fileTable" :data="rpjFileList" row-key="id" hidePagination stripe hideDo
|
||||||
|
@ -56,22 +60,122 @@
|
||||||
<el-space v-else>否</el-space>
|
<el-space v-else>否</el-space>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="60">
|
<el-table-column label="操作" width="80">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link v-if="scope.row.blt_ == null" type="primary" size="small"
|
<el-button link v-if="scope.row.blt_ == null&&(form.state==30||form.state==40)" type="primary" size="small"
|
||||||
@click="bindCard(scope.row, 10)" v-auth="'blt_bind.create'">绑卡
|
@click="bindCard(scope.row, 10)" v-auth="'blt_bind.create'">绑卡
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button link type="primary" size="small"
|
||||||
|
v-if="form.state==30||form.state==40"
|
||||||
|
@click="leaveDialog(scope.row)">提前离厂
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="margin-top:8px" shadow="hover">
|
||||||
|
<scTable ref="table" :data="logLists" row-key="id" style="height:300px" stripe hideDo hidePagination>
|
||||||
|
<el-table-column label="#" fixed="left" type="index" width="50"></el-table-column>
|
||||||
|
<el-table-column label="变动人" prop="remployee_">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.remployee_.name }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="变动类型" prop="operation">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-space v-if="scope.row.operation === 'member_leave'">离厂</el-space>
|
||||||
|
<el-space v-else>进厂</el-space>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="变动时间" prop="create_time"></el-table-column>
|
||||||
|
<el-table-column label="处理人" prop="create_by_">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.create_by_.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-main>
|
</el-main>
|
||||||
<ScBind v-model="showBindBlt" :bindBtl="bindBtl" :bindType="bindType" :bindName="bindName"
|
<ScBind v-model="showBindBlt" :bindBtl="bindBtl" :bindType="bindType" :bindName="bindName"
|
||||||
:bindEmployee="bindEmployee" @success="showBindBltSuccess" @closed="showBindBltClose"></ScBind>
|
:bindEmployee="bindEmployee" @success="showBindBltSuccess" @closed="showBindBltClose"
|
||||||
|
></ScBind>
|
||||||
|
<el-dialog title="离厂" v-model="leaveVisible" width="30%" >
|
||||||
|
<el-form
|
||||||
|
ref="dialogForm"
|
||||||
|
label-width="80px"
|
||||||
|
>
|
||||||
|
<el-form-item label="离厂原因">
|
||||||
|
<el-input v-model="reason" type="text" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="leaveVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="preLeave" :loading="btnloading" :disabled="btnloading">确 定</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog v-model="workerVisible" title="添加项目人员">
|
||||||
|
<el-form ref="workerForm" :model="formworker" label-width="120px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="项目人员">
|
||||||
|
<el-select
|
||||||
|
v-model="formworker.remployee"
|
||||||
|
@change="selectWorker"
|
||||||
|
filterable
|
||||||
|
placeholder="选择项目人员"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in remployeeoptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="是否项目负责人">
|
||||||
|
<el-radio-group v-model="formworker.is_manager">
|
||||||
|
<el-radio :label="true">是</el-radio>
|
||||||
|
<el-radio :label="false">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="工作职责">
|
||||||
|
<el-input
|
||||||
|
v-model="formworker.duty"
|
||||||
|
type="text"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="证书">
|
||||||
|
<el-select
|
||||||
|
v-model="formworker.rcertificates"
|
||||||
|
multiple
|
||||||
|
placeholder="选择证书"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in certificatesOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="workerdialog = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submitWorker" :loading="btnloading" :disabled="btnloading">确 定</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ScBind from "@/components/scBind/index.vue";
|
import ScBind from "@/components/scBind/index.vue";
|
||||||
export default {
|
export default {
|
||||||
|
@ -87,10 +191,13 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
leaveVisible:false,
|
||||||
|
workerVisible:false,
|
||||||
loading: false,
|
loading: false,
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
showBindBlt: false,
|
showBindBlt: false,
|
||||||
|
btnloading:false,
|
||||||
state_: {
|
state_: {
|
||||||
10: "创建中",
|
10: "创建中",
|
||||||
20: "审批中",
|
20: "审批中",
|
||||||
|
@ -104,13 +211,23 @@ export default {
|
||||||
30: "保安保洁服务",
|
30: "保安保洁服务",
|
||||||
40: "其他",
|
40: "其他",
|
||||||
},
|
},
|
||||||
|
formworker : {
|
||||||
|
duty: "",
|
||||||
|
rcertificates: [],
|
||||||
|
rpj: "",
|
||||||
|
},
|
||||||
form: {},
|
form: {},
|
||||||
bindName: "",
|
bindName: "",
|
||||||
bindType: 10,
|
bindType: 10,
|
||||||
bindBtl: null,
|
bindBtl: null,
|
||||||
bindEmployee: '',
|
bindEmployee: '',
|
||||||
|
logLists:[],
|
||||||
rpjFileList: [],
|
rpjFileList: [],
|
||||||
memeberList: [],
|
memeberList: [],
|
||||||
|
remployeeoptions:[],
|
||||||
|
reason:"",
|
||||||
|
leaveId:"",
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -156,6 +273,7 @@ export default {
|
||||||
this.form = res;
|
this.form = res;
|
||||||
this.getRpjfileList();
|
this.getRpjfileList();
|
||||||
this.getMemberList();
|
this.getMemberList();
|
||||||
|
this.getLogs();
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
}).catch(e => { this.loading = false });
|
}).catch(e => { this.loading = false });
|
||||||
},
|
},
|
||||||
|
@ -169,9 +287,75 @@ export default {
|
||||||
getMemberList() {
|
getMemberList() {
|
||||||
this.$API.rpm.member.list.req({ rpj: this.form.id, page: 0 }).then((res) => {
|
this.$API.rpm.member.list.req({ rpj: this.form.id, page: 0 }).then((res) => {
|
||||||
this.memeberList = res;
|
this.memeberList = res;
|
||||||
console.log(res);
|
// console.log(res);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//人员变动操作日志
|
||||||
|
getLogs(){
|
||||||
|
this.$API.rpm.rpj.logs.req({ rpj: this.form.id, page: 0 }).then((res) => {
|
||||||
|
debugger;
|
||||||
|
this.logLists = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//调出项目人员列表
|
||||||
|
getremployee() {
|
||||||
|
this.$API.rpm.remployee.list.req({ page: 0, rparty: this.form.rparty }).then((res) => {
|
||||||
|
this.remployeeoptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//选择人员后,调出该人员的所有证书
|
||||||
|
selectWorker() {
|
||||||
|
this.$API.rpm.rcertificate.list
|
||||||
|
.req({ remployee: this.formworker.remployee, page: 0 })
|
||||||
|
.then((res) => {
|
||||||
|
this.certificatesOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
addWorker(row){
|
||||||
|
this.getremployee();
|
||||||
|
this.workerVisible = true;
|
||||||
|
},
|
||||||
|
//提交作业人员信息
|
||||||
|
submitWorker() {
|
||||||
|
this.btnloading = true;
|
||||||
|
this.formworker.rpj = this.form.id;
|
||||||
|
this.$refs.workerForm.validate(async (valid) => {
|
||||||
|
this.$API.rpm.member.create
|
||||||
|
.req(this.formworker)
|
||||||
|
.then((res) => {
|
||||||
|
this.$message.success("项目人员添加成功");
|
||||||
|
this.workerVisible = false;
|
||||||
|
this.btnloading = false;
|
||||||
|
this.getMemberList();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.btnloading = false;
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
leaveDialog(row){
|
||||||
|
debugger;
|
||||||
|
this.leaveVisible = true;
|
||||||
|
this.leaveId=row.id;
|
||||||
|
console.log(this.leaveId)
|
||||||
|
},
|
||||||
|
preLeave(){
|
||||||
|
debugger;
|
||||||
|
this.btnloading = true;
|
||||||
|
if(this.reason!=''){
|
||||||
|
this.$API.rpm.member.leave.req(this.leaveId,{reason:this.reason}).then(res=>{
|
||||||
|
this.leaveVisible = false;
|
||||||
|
this.btnloading = false;
|
||||||
|
}).catch(e=>{
|
||||||
|
this.btnloading = false;
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.btnloading = false;
|
||||||
|
this.$message.error("请填写离厂原因");
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -167,7 +167,7 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button :loading="submitLoading" v-for="item in operationBtn" :key="item.id" class="filter-item"
|
<el-button :loading="submitLoading" :disabled="submitLoading" v-for="item in operationBtn" :key="item.id" class="filter-item"
|
||||||
:type="item.attribute_type===2?'danger':'primary'" @click="operationSubmit(item.id)">
|
:type="item.attribute_type===2?'danger':'primary'" @click="operationSubmit(item.id)">
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
Loading…
Reference in New Issue