flx:整改 新增违章人员
This commit is contained in:
parent
4915918b8c
commit
0bacb70abb
@ -11,7 +11,7 @@
|
||||
<view class="tabType" @click="changeTab(2)" :class="checkedTab==2?'checkedTab':'noCheckTab'">审批流程</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="content record" :style="{paddingTop: mobileTopHeight + 100 + 'px'}" v-if="checkedTab==1">
|
||||
<view class="type flex2">
|
||||
<view class="textColor">检查部位</view>
|
||||
@ -172,6 +172,10 @@
|
||||
</li>
|
||||
</ul>
|
||||
<view class="table_content" v-show="item.isShow">
|
||||
<view class="message imgList" style="font-size: 14px;" v-if="item.type == 1 && item.violatorId">
|
||||
<span>违章人员:</span>
|
||||
<span>{{ personList.find(ele => ele.id == item.violatorId).workerName }}</span>
|
||||
</view>
|
||||
<view class="imgList" v-if="Array.isArray(item.fileUrl)">
|
||||
<ul>
|
||||
<li class="img-item" v-for="(item2, index2) in item.fileUrl" :key="index2">
|
||||
@ -226,7 +230,9 @@
|
||||
recordType: 1, // 1为质量问题 2为排查记录
|
||||
id: '',
|
||||
btnEditAuth: true,
|
||||
btnDeleteAuth: true
|
||||
btnDeleteAuth: true,
|
||||
projectSn: "",
|
||||
personList: [],
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
@ -241,6 +247,8 @@
|
||||
this.id = option.id;
|
||||
this.userInfo = JSON.parse(uni.getStorageSync('userInfo'));
|
||||
this.entryType = Number(option.type)
|
||||
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
|
||||
this.getPointAreaFn();
|
||||
},
|
||||
onShow() {
|
||||
this.getBasicInfo();
|
||||
@ -251,15 +259,30 @@
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.mobileTopHeight = res.statusBarHeight ? res.statusBarHeight : 0;
|
||||
uni.setStorageSync('systemInfo',res)
|
||||
uni.setStorageSync('systemInfo', res)
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
console.log('this.mobileTopHeight',this.mobileTopHeight)
|
||||
console.log('this.mobileTopHeight', this.mobileTopHeight)
|
||||
},
|
||||
methods: {
|
||||
// 获取违章人员列表
|
||||
getPointAreaFn() {
|
||||
let requestData = {
|
||||
projectSn: this.projectSn,
|
||||
};
|
||||
this.sendRequest({
|
||||
url: 'xmgl/workerInfo/getLaborManagementInfoList',
|
||||
method: 'post',
|
||||
data: requestData,
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
this.personList = res.result;
|
||||
},
|
||||
})
|
||||
},
|
||||
// 重新提交
|
||||
resubmitCheckRecord(){
|
||||
resubmitCheckRecord() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/projectEnd/qualityManage/editIssue?id=' + this.id
|
||||
})
|
||||
@ -465,17 +488,18 @@
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.fixedheader{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 2;
|
||||
.headerName{
|
||||
z-index: 1;
|
||||
}
|
||||
.fixedheader {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 2;
|
||||
|
||||
.headerName {
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -658,7 +682,7 @@
|
||||
.backBtn .btn-option:active {
|
||||
background-color: rgba(65, 129, 254, 0.8);
|
||||
}
|
||||
|
||||
|
||||
.editBtn {
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
@ -669,6 +693,7 @@
|
||||
box-sizing: border-box;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.editBtn .btn-delete {
|
||||
width: 50%;
|
||||
line-height: 40px;
|
||||
@ -676,13 +701,15 @@
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
.editBtn .btn-resubmit{
|
||||
|
||||
.editBtn .btn-resubmit {
|
||||
width: 50%;
|
||||
line-height: 40px;
|
||||
background-color: #5382F6;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pass_wrap {
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
|
||||
@ -11,14 +11,15 @@
|
||||
<form @submit="formSubmit">
|
||||
<view class="flex type">
|
||||
<view class="name"><text class="star">*</text>{{title}}时间:</view>
|
||||
<dateTimePiccker :placeholder="startTime" :start="startTime" fields="minute" disabled @change="bindPickerChange($event,'startTime')" class="dateTimePiccker">
|
||||
<view class="uni-input uni-select cl" v-if="rectifyTime===''">
|
||||
请选择 <image class="icon-right" src="/static/icon-right.png"></image>
|
||||
</view>
|
||||
<view class="uni-input uni-select" v-else>{{rectifyTime}}
|
||||
<image class="icon-right" src="/static/icon-right.png"></image>
|
||||
</view>
|
||||
</dateTimePiccker>
|
||||
<dateTimePiccker :placeholder="startTime" :start="startTime" fields="minute" disabled
|
||||
@change="bindPickerChange($event,'startTime')" class="dateTimePiccker">
|
||||
<view class="uni-input uni-select cl" v-if="rectifyTime===''">
|
||||
请选择 <image class="icon-right" src="/static/icon-right.png"></image>
|
||||
</view>
|
||||
<view class="uni-input uni-select" v-else>{{rectifyTime}}
|
||||
<image class="icon-right" src="/static/icon-right.png"></image>
|
||||
</view>
|
||||
</dateTimePiccker>
|
||||
<!-- <u-picker mode="time" v-model="show" :params="params"></u-picker>
|
||||
<picker @change="bindPickerChange" mode="date" :value="rectifyTime" class="picker">
|
||||
<view class="uni-input uni-select cl" v-if="rectifyTime===''">
|
||||
@ -29,58 +30,74 @@
|
||||
</view>
|
||||
</picker> -->
|
||||
</view>
|
||||
|
||||
|
||||
<view class="type flex" v-if="title != '整改'">
|
||||
<view class=" name">{{title}}结果:</view>
|
||||
<view class="flex">
|
||||
<text :class="status==1?'status':''">{{type == 1 ? '未整改':'不合格'}}</text>
|
||||
<switch :checked="status==2" @change="switchChange"
|
||||
style="margin: 0 10px;transform: scale(0.74,0.7)" />
|
||||
<text :class="status==2?'status':''">{{type == 1 ? '已整改':'合格'}}</text>
|
||||
<view class="flex">
|
||||
<text :class="status==1?'status':''">{{type == 1 ? '未整改':'不合格'}}</text>
|
||||
<switch :checked="status==2" @change="switchChange"
|
||||
style="margin: 0 10px;transform: scale(0.74,0.7)" />
|
||||
<text :class="status==2?'status':''">{{type == 1 ? '已整改':'合格'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-form-item">
|
||||
<view class="uni-form-label">
|
||||
<text class="star">*</text>补充说明
|
||||
</view>
|
||||
<view class="uni-form-input">
|
||||
<textarea class="textarea" maxlength="-1" placeholder-class="cl" name="inspectContent"
|
||||
@input='changeTextarea' :value="content" placeholder="请输入"></textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-form-item">
|
||||
<view class="uni-form-label">
|
||||
<text class="star" v-if="type == 1">*</text>附件
|
||||
</view>
|
||||
<view class="uni-form-input imgBox_wrap">
|
||||
<view class="imgBox" v-show="fileList.length>0" v-for="(item,index) in fileList" :key="index">
|
||||
<image :src="url_config+'image/'+item.url" class="img"></image>
|
||||
<view @click="deleteImg(item)" class="deleteImg">×</view>
|
||||
<view class="type flex" v-if="title == '整改'">
|
||||
<view class="uni-form-label">
|
||||
<text class="star">*</text>违章人员
|
||||
</view>
|
||||
<picker mode="selector" :range="personList" range-key="workerName" @change="handleChangeRegion"
|
||||
filterable>
|
||||
<view class="picker">
|
||||
<view class="" style="color: #c0c4cc; font-size: 28rpx;" v-if="!violatorId">
|
||||
请选择
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
{{workerName}}
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="addImgBox" @click="selectImg" v-if="fileList.length<5">
|
||||
<image src="/static/icon-add.png" class="icon-add"></image>
|
||||
<view class="uni-form-item">
|
||||
<view class="uni-form-label">
|
||||
<text class="star">*</text>补充说明
|
||||
</view>
|
||||
<view class="uni-form-input">
|
||||
<textarea class="textarea" maxlength="-1" placeholder-class="cl" name="inspectContent"
|
||||
@input='changeTextarea' :value="content" placeholder="请输入"></textarea>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex btn_wrap">
|
||||
<button class="deleteBtn" @click="deleteFn">取消</button>
|
||||
<button form-type="submit" type="primary" class="submitBtn">提交</button>
|
||||
</view>
|
||||
<!-- <view v-if="type==2 || type==3" class="flex btn_wrap">
|
||||
<view class="uni-form-item">
|
||||
<view class="uni-form-label">
|
||||
<text class="star" v-if="type == 1">*</text>附件
|
||||
</view>
|
||||
<view class="uni-form-input imgBox_wrap">
|
||||
<view class="imgBox" v-show="fileList.length>0" v-for="(item,index) in fileList" :key="index">
|
||||
<image :src="url_config+'image/'+item.url" class="img"></image>
|
||||
<view @click="deleteImg(item)" class="deleteImg">×</view>
|
||||
</view>
|
||||
<view class="addImgBox" @click="selectImg" v-if="fileList.length<5">
|
||||
<image src="/static/icon-add.png" class="icon-add"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex btn_wrap">
|
||||
<button class="deleteBtn" @click="deleteFn">取消</button>
|
||||
<button form-type="submit" type="primary" class="submitBtn">提交</button>
|
||||
</view>
|
||||
<!-- <view v-if="type==2 || type==3" class="flex btn_wrap">
|
||||
<button class="deleteBtn" @click="audit(3)">不通过</button>
|
||||
<button form-type="submit" type="primary" class="submitBtn">通过</button>
|
||||
</view> -->
|
||||
</form>
|
||||
</form>
|
||||
|
||||
</view>
|
||||
<canversCom v-if="openImg" @imgUrl="imgUrl" :imgList="imgList"></canversCom>
|
||||
</view>
|
||||
<canversCom v-if="openImg" @imgUrl="imgUrl" :imgList="imgList"></canversCom>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import canversCom from "@/pages/videoManage/component/canversCom.vue"
|
||||
import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
||||
import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
||||
export default {
|
||||
components: {
|
||||
canversCom,
|
||||
@ -111,12 +128,17 @@ import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
||||
createId: '',
|
||||
createUser: '',
|
||||
qualityId: '',
|
||||
userInfo:'',
|
||||
startTime: ""
|
||||
userInfo: '',
|
||||
startTime: "",
|
||||
violatorId: "",
|
||||
workerName: "",
|
||||
personList: [],
|
||||
projectSn: "",
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.userInfo= JSON.parse(uni.getStorageSync('userInfo'))
|
||||
this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
|
||||
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
|
||||
this.startTime = this.$formatDates(new Date().getTime(), 'yyyy-MM-dd HH:mm:ss');
|
||||
this.rectifyTime = this.$formatDates(new Date().getTime(), 'yyyy-MM-dd HH:mm:ss');
|
||||
this.id = option.id;
|
||||
@ -125,6 +147,7 @@ import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
||||
this.createId = option.createId
|
||||
if (option.type == 1) {
|
||||
this.title = '整改'
|
||||
this.getPointAreaFn();
|
||||
} else if (option.type == 2) {
|
||||
this.title = '复查'
|
||||
} else if (option.type == 3) {
|
||||
@ -133,6 +156,29 @@ import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取违章人员列表
|
||||
getPointAreaFn() {
|
||||
let requestData = {
|
||||
projectSn: this.projectSn,
|
||||
};
|
||||
this.sendRequest({
|
||||
url: 'xmgl/workerInfo/getLaborManagementInfoList',
|
||||
method: 'post',
|
||||
data: requestData,
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
this.personList = res.result;
|
||||
},
|
||||
})
|
||||
},
|
||||
// 切换违章人员
|
||||
handleChangeRegion(e) {
|
||||
let index = e.detail.value;
|
||||
let findItem = this.personList[index];
|
||||
this.violatorId = findItem.id;
|
||||
this.workerName = findItem.workerName;
|
||||
console.info(this.enterpriseList, 'enlist')
|
||||
},
|
||||
imgUrl(val) {
|
||||
this.openImg = false
|
||||
this.imgUpload(val)
|
||||
@ -163,10 +209,10 @@ import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
||||
changeTextarea(e) {
|
||||
this.content = e.detail.value;
|
||||
},
|
||||
bindPickerChange(e,t) {
|
||||
console.log('时间选择e',e);
|
||||
console.log('时间选择t',t);
|
||||
if(t=='startTime'){
|
||||
bindPickerChange(e, t) {
|
||||
console.log('时间选择e', e);
|
||||
console.log('时间选择t', t);
|
||||
if (t == 'startTime') {
|
||||
this.rectifyTime = e.f3;
|
||||
}
|
||||
},
|
||||
@ -293,7 +339,10 @@ import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (this.violatorId == "" && this.type == 1) {
|
||||
this.$message.error("请选择违章人员");
|
||||
return;
|
||||
}
|
||||
let time = this.getNewDate()
|
||||
|
||||
let data = {
|
||||
@ -303,6 +352,7 @@ import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
||||
qualityId: this.id,
|
||||
rectifyTime: this.rectifyTime,
|
||||
type: this.type,
|
||||
violatorId: this.violatorId,
|
||||
fileUrl: JSON.stringify(this.fileList),
|
||||
createUser: this.userInfo.userId
|
||||
}
|
||||
@ -326,7 +376,7 @@ import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
||||
mask: true,
|
||||
})
|
||||
setTimeout(() => {
|
||||
|
||||
|
||||
uni.navigateBack({
|
||||
url: './list'
|
||||
})
|
||||
@ -528,4 +578,4 @@ import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
||||
.btn_wrap {
|
||||
margin-top: 100px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@ -171,6 +171,10 @@
|
||||
</li>
|
||||
</ul>
|
||||
<view class="table_content" v-show="item.isShow">
|
||||
<view class="message imgList" style="font-size: 14px;" v-if="item.type == 1 && item.violatorId">
|
||||
<span>违章人员:</span>
|
||||
<span>{{ personList.find(ele => ele.id == item.violatorId).workerName }}</span>
|
||||
</view>
|
||||
<view class="imgList">
|
||||
<ul>
|
||||
<li class="img-item" v-for="(item2, index2) in item.fileUrl" :key="index2">
|
||||
@ -225,7 +229,9 @@
|
||||
recordType: 1, // 1为安全问题 2为排查记录
|
||||
id: '',
|
||||
btnEditAuth: true,
|
||||
btnDeleteAuth: true
|
||||
btnDeleteAuth: true,
|
||||
projectSn: "",
|
||||
personList:[],
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
@ -240,6 +246,8 @@
|
||||
this.id = option.id;
|
||||
this.userInfo = JSON.parse(uni.getStorageSync('userInfo'));
|
||||
this.entryType = Number(option.type)
|
||||
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
|
||||
this.getPointAreaFn();
|
||||
},
|
||||
onShow() {
|
||||
this.getBasicInfo();
|
||||
@ -257,6 +265,21 @@
|
||||
console.log('this.mobileTopHeight',this.mobileTopHeight)
|
||||
},
|
||||
methods: {
|
||||
// 获取违章人员列表
|
||||
getPointAreaFn() {
|
||||
let requestData = {
|
||||
projectSn: this.projectSn,
|
||||
};
|
||||
this.sendRequest({
|
||||
url: 'xmgl/workerInfo/getLaborManagementInfoList',
|
||||
method: 'post',
|
||||
data: requestData,
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
this.personList = res.result;
|
||||
},
|
||||
})
|
||||
},
|
||||
// 重新提交
|
||||
resubmitCheckRecord() {
|
||||
uni.navigateTo({
|
||||
|
||||
@ -39,6 +39,22 @@
|
||||
<text :class="status==2?'status':''">{{type == 1 ? '已整改':'合格'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="type flex" v-if="title == '整改'">
|
||||
<view class="uni-form-label">
|
||||
<text class="star">*</text>违章人员
|
||||
</view>
|
||||
<picker mode="selector" :range="personList" range-key="workerName" @change="handleChangeRegion"
|
||||
filterable>
|
||||
<view class="picker">
|
||||
<view class="" style="color: #c0c4cc; font-size: 28rpx;" v-if="!violatorId">
|
||||
请选择
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
{{workerName}}
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="uni-form-item">
|
||||
<view class="uni-form-label">
|
||||
<text class="star">*</text>补充说明
|
||||
@ -112,19 +128,26 @@ import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
||||
createUser: '',
|
||||
qualityId: '',
|
||||
userInfo:'',
|
||||
startTime: ""
|
||||
startTime: "",
|
||||
|
||||
violatorId: "",
|
||||
workerName: "",
|
||||
personList: [],
|
||||
projectSn: "",
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.startTime = this.$formatDates(new Date().getTime(), 'yyyy-MM-dd HH:mm:ss');
|
||||
this.rectifyTime = this.$formatDates(new Date().getTime(), 'yyyy-MM-dd HH:mm:ss');
|
||||
this.userInfo= JSON.parse(uni.getStorageSync('userInfo'))
|
||||
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
|
||||
this.id = option.id;
|
||||
this.type = Number(option.type);
|
||||
this.stateId = Number(option.stateId);
|
||||
this.createId = option.createId
|
||||
if (option.type == 1) {
|
||||
this.title = '整改'
|
||||
this.getPointAreaFn();
|
||||
} else if (option.type == 2) {
|
||||
this.title = '复查'
|
||||
} else if (option.type == 3) {
|
||||
@ -133,6 +156,29 @@ import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取违章人员列表
|
||||
getPointAreaFn() {
|
||||
let requestData = {
|
||||
projectSn: this.projectSn,
|
||||
};
|
||||
this.sendRequest({
|
||||
url: 'xmgl/workerInfo/getLaborManagementInfoList',
|
||||
method: 'post',
|
||||
data: requestData,
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
this.personList = res.result;
|
||||
},
|
||||
})
|
||||
},
|
||||
// 切换违章人员
|
||||
handleChangeRegion(e) {
|
||||
let index = e.detail.value;
|
||||
let findItem = this.personList[index];
|
||||
this.violatorId = findItem.id;
|
||||
this.workerName = findItem.workerName;
|
||||
console.info(this.enterpriseList, 'enlist')
|
||||
},
|
||||
imgUrl(val) {
|
||||
this.openImg = false
|
||||
this.imgUpload(val)
|
||||
@ -293,7 +339,11 @@ import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if (this.violatorId == "" && this.type == 1) {
|
||||
this.$message.error("请选择违章人员");
|
||||
return;
|
||||
}
|
||||
let time = this.getNewDate()
|
||||
|
||||
let data = {
|
||||
@ -302,6 +352,7 @@ import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
||||
status: this.status,
|
||||
qualityId: this.id,
|
||||
rectifyTime: this.rectifyTime,
|
||||
violatorId: this.violatorId,
|
||||
type: this.type,
|
||||
fileUrl: JSON.stringify(this.fileList),
|
||||
createUser: this.userInfo.userId
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user