- *{{
+ *{{
$t("message.laborMange.pleaseChoose") +
$t("message.laborMange.picture")
}}:
-
+
-
+
- {{ $t("message.laborMange.confirm") }}
+ {{ $t("message.laborMange.confirm")
+ }}
{{
$t("message.laborMange.cancel")
}}
@@ -2421,8 +1816,10 @@ import {
getGroupListApi,
checkImgLibraryApi,
updateMemberDetailDataList,
+ getTeamInfoList
} from "@/assets/js/api/laborPerson.js";
import { getProjectConfigListApi } from "@/assets/js/api/project.js";
+import { isJSON } from "@/util/nowDate/index";
import { selectUserDevAuthorityByUserIdApi } from "@/assets/js/api/configManage";
import QRCode from "qrcodejs2";
import { VueCropper } from "vue-cropper";
@@ -2432,6 +1829,20 @@ export default {
},
data() {
return {
+ personTypeList: [
+ {
+ id: 1,
+ title: "施工人员",
+ },
+ {
+ id: 2,
+ title: "管理人员",
+ },
+ {
+ id: 3,
+ title: "临时人员",
+ },
+ ],
cropperEditTitle: "",
dateOfIssue: "",
radio: "",
@@ -2512,14 +1923,14 @@ export default {
this.getProjectConfig();
},
mounted() {
- new QRCode("workerQRcode", {
- width: 100,
- height: 100, // 高度
- text: this.userId, // 二维码内容
- render: "canvas", // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
- // background: '#f0f',
- // foreground: '#ff0'
- });
+ // new QRCode("workerQRcode", {
+ // width: 100,
+ // height: 100, // 高度
+ // text: this.userId, // 二维码内容
+ // render: "canvas", // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
+ // // background: '#f0f',
+ // // foreground: '#ff0'
+ // });
},
methods: {
devTypeChange(e) {
@@ -2754,7 +2165,8 @@ export default {
//fixed 改成字符串
// this.workerInfo.ufaceDevId.push(arr[i]);
// console.log(this.workerInfo.ufaceDevId)
- id = parseInt(arr[i]);
+ id = parseInt(arr[i]);
+ console.log(1111, id);
for (let j = 0; j < this.ufaceDevAllList.length; j++) {
// console.log(this.ufaceDevAllList[j].id, id)
if (this.ufaceDevAllList[j].id == id) {
@@ -2777,7 +2189,6 @@ export default {
console.log("arr", arr);
this.workerInfo.ufaceDevGroupId = arr;
let id = "";
-
for (let i = 0; i < arr.length; i++) {
id = parseInt(arr[i]);
for (let j = 0; j < this.uGroupAllList.length; j++) {
@@ -2849,7 +2260,7 @@ export default {
};
});
// item.fileList = [{ }];
- } else if(item.photoUrl.indexOf("*") != -1) {
+ } else if (item.photoUrl.indexOf("*") != -1) {
item.fileList = item.photoUrl.split("*").map((item) => {
return {
name: item,
@@ -2899,7 +2310,7 @@ export default {
};
});
// item.fileList = [{ }];
- } else if(item.photoUrl.indexOf("*") != -1) {
+ } else if (item.photoUrl.indexOf("*") != -1) {
item.fileList = item.photoUrl.split("*").map((item) => {
return {
name: item,
@@ -2944,8 +2355,8 @@ export default {
//获取管理人员 职务类型 所属企业下拉
if (data.workerInfo.personType == 2) {
this.selectJobList();
- this.getProjectList();
}
+ this.getProjectList();
} else {
this.$message.error(res.message);
}
@@ -2969,12 +2380,32 @@ export default {
getEnterpriseInfoList(data).then((res) => {
if (res.code == 200) {
this.enterpriseListData = res.result;
+ this.getTeamList()
} else {
this.$message.error(this.$t("message.laborMange.queryFails"));
}
});
},
-
+ //获取企业的 - 班组列表
+ getTeamList() {
+ let data = {
+ enterpriseId: this.workerInfo.enterpriseId,
+ projectSn: this.projectSn,
+ };
+ getTeamInfoList(data).then((res) => {
+ this.teamListData = res.result.list;
+ // console.log(res.result.list)
+ const find = res.result.list.find(item => item.id == this.workerInfo.teamId);
+ if(find){
+ this.workerInfo.teamId = find.id;
+ this.workerInfo.teamName = find.teamName;
+ } else {
+ this.workerInfo.teamId = "";
+ this.workerInfo.teamName = "";
+ }
+
+ });
+ },
//返回上一页
goBack() {
this.$router.go(-1);
@@ -3002,7 +2433,12 @@ export default {
data.ufaceDevGroupId = "";
}
delete data.addTime;
- editWorkerInfo(data).then((res) => {
+ updateMemberDetailDataList({
+ ...data,
+ contractInfo: JSON.stringify(this.contractList),
+ insuranceInfo: JSON.stringify(this.insuranceInfo),
+ specialCertificateInfo: JSON.stringify(this.specialCertificateInfo),
+ }).then((res) => {
if (res.code == 200) {
this.$message.success(this.$t("message.laborMange.editSuccess"));
this.basicInfoStatus = false;
@@ -3042,13 +2478,22 @@ export default {
} else if (this.workerInfo.devType == 2) {
data.ufaceDevGroupId = this.workerInfo.ufaceDevGroupId.join(",");
data.ufaceDevId = "";
+ } else {
+ data.ufaceDevGroupId = "";
+ data.ufaceDevId = "";
}
delete data.addTime;
if (data.ruleId == "") {
data.ruleId = 0;
}
+
console.log("------------------2");
- editWorkerInfo(data).then((res) => {
+ updateMemberDetailDataList({
+ ...data,
+ contractInfo: JSON.stringify(this.contractList),
+ insuranceInfo: JSON.stringify(this.insuranceInfo),
+ specialCertificateInfo: JSON.stringify(this.specialCertificateInfo),
+ }).then((res) => {
if (res.code == 200) {
this.$message.success(this.$t("message.laborMange.editSuccess"));
this.detailInfoStatus = false;
@@ -3623,7 +3068,8 @@ export default {
data.contractList = [];
}
this.pactInfoStatus = false;
- this.contractList = JSON.parse(data.contractList); //合同信息
+ console.log(222222, data.contractList)
+ this.contractList = isJSON(data.contractList) ? JSON.parse(data.contractList) : data.contractList; //合同信息
} else if (type == 5) {
this.workerInfo = this.originalData.workerInfo;
this.getWorkerInfo();
@@ -3660,13 +3106,16 @@ export default {
if (this.certificateList[index].certificateType == "") {
this.$message.error(
this.$t("message.laborMange.pleaseChoose") +
- this.$t("message.laborMange.certificateType")
+ this.$t("message.laborMange.certificateType")
);
return;
}
- let findItem = this.certificateTypeList.find(item => item.id == this.certificateList[index].certificateType);
- if(findItem){
- this.certificateList[index].certificateTypeName = findItem.dictionaryName
+ let findItem = this.certificateTypeList.find(
+ (item) => item.id == this.certificateList[index].certificateType
+ );
+ if (findItem) {
+ this.certificateList[index].certificateTypeName =
+ findItem.dictionaryName;
}
let requestData = {
...this.workerInfo,
@@ -3731,7 +3180,7 @@ export default {
if (this.insuranceList[index].state == "") {
this.$message.error(
this.$t("message.laborMange.pleaseChoose") +
- this.$t("message.laborMange.insurancePurchaseStatus")
+ this.$t("message.laborMange.insurancePurchaseStatus")
);
return;
}
@@ -4038,7 +3487,7 @@ export default {
},
//处罚记录 切换
- handleClick() {},
+ handleClick() { },
//滚动事件
handleScroll(e) {
@@ -4067,14 +3516,17 @@ export default {
display: flex;
align-items: center;
}
+
.flex3 {
display: flex;
align-items: center;
justify-content: space-between;
}
+
.flex2 {
display: flex;
}
+
.personDetails {
width: 100%;
height: 100%;
@@ -4097,9 +3549,11 @@ export default {
// margin-bottom: 50px;
padding: 0 40px;
box-sizing: border-box;
+
.img_wrap {
text-align: center;
margin-right: 30px;
+
// height: 146px;
img {
width: 105px;
@@ -4108,6 +3562,7 @@ export default {
}
}
}
+
.table {
margin-bottom: 40px;
}
@@ -4117,18 +3572,23 @@ export default {
font-size: 28px;
font-weight: 600;
}
+
.time {
line-height: 28px;
}
+
.workType {
line-height: 28px;
}
+
.team1 {
line-height: 28px;
}
+
.team2 {
line-height: 28px;
}
+
.number {
line-height: 28px;
}
@@ -4154,43 +3614,52 @@ export default {
height: 100%;
text-align: center;
border-left: 1px solid #bbbbbb;
+
div {
height: 40px;
line-height: 40px;
cursor: pointer;
}
}
+
.checkedClass {
color: #5181f6;
}
+
.hide {
width: 90%;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
+
.img-list {
.form-label {
margin-bottom: 20px;
+
span {
color: #f56c6c;
}
}
+
.radio-box {
padding: 0 30px;
}
+
/deep/.el-radio {
display: inline-flex;
align-items: center;
margin-right: 30px;
margin-bottom: 20px;
}
+
.btn-box {
margin-top: 30px;
display: flex;
justify-content: space-around;
}
}
+
::v-deep .el-input__inner {
line-height: 1px !important;
}