dev:暂存危大工程代码
This commit is contained in:
parent
49c6b0294e
commit
2fde503cef
@ -7,6 +7,10 @@
|
||||
</headers>
|
||||
<view :style="{ 'padding-top': statusBarHeight + 45 + 'px' }">
|
||||
<view class="plan-form">
|
||||
<view class="form-item b-bottom">
|
||||
<view class="form-lable">危大工程</view>
|
||||
<view class="">{{engineeringName}}</view>
|
||||
</view>
|
||||
<view class="form-item b-bottom">
|
||||
<view class="form-lable"><text class="tag">*</text>验收单位</view>
|
||||
<picker @change="bindPickerChangeEnterprise" :value="enterpriseIndex" range-key="enterpriseName" :range="enterpriseInfoList">
|
||||
@ -28,8 +32,8 @@
|
||||
<view class="form-item b-bottom">
|
||||
<view class="form-lable"><text class="tag">*</text>验收时间</view>
|
||||
<dateTimePicker :placeholder="'请选择验收时间'" :disabled="isDisabled"
|
||||
:start="getNowTime()" :fields="'minute'" :default-value="acceptanceTime"
|
||||
@change="bindPickerChange($event,'acceptanceTime')"
|
||||
:start="getNowTime()" :fields="'minute'" :default-value="planTime"
|
||||
@change="bindPickerChange($event,'planTime')"
|
||||
class="form-content">
|
||||
<view class="uni-input">
|
||||
<!-- <text>{{addForm.inspectTime}}</text> -->
|
||||
@ -39,7 +43,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="save-btn" @click="saveForm">保存</view>
|
||||
<view class="save-btn" @click="saveForm">提交验收申请</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -52,38 +56,26 @@
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
engineeringId: '',
|
||||
//验收人相关属性
|
||||
acceptanceIndex: '',
|
||||
acceptancePerson: '',
|
||||
acceptancePersonList: [],
|
||||
|
||||
//验收单位相关属性
|
||||
enterpriseId: '',
|
||||
enterpriseIndex: '',
|
||||
enterpriseInfoList: [],
|
||||
|
||||
projectSn: '',
|
||||
isDisabled: false,
|
||||
acceptanceTime: '',
|
||||
planTime: '',
|
||||
|
||||
statusBarHeight: 0,
|
||||
title: "下发验证任务",
|
||||
inspectTime:'',
|
||||
formData:{
|
||||
acceptanceRegion: "",
|
||||
acceptanceDescribe: "",
|
||||
imgFileList:[],
|
||||
acceptanceResult: 1,
|
||||
acceptanceType: "",
|
||||
dangerousEngineeringId: ""
|
||||
},
|
||||
textareaLengh: 0,
|
||||
typeIndex: "",
|
||||
typeList:[{
|
||||
id: 1,
|
||||
name: '施工条件验收'
|
||||
},{
|
||||
id: 2,
|
||||
name: '危大工程验收'
|
||||
}]
|
||||
|
||||
userInfo: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -93,8 +85,13 @@
|
||||
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight;
|
||||
},
|
||||
onLoad(val){
|
||||
console.log("========================");
|
||||
console.log(val);
|
||||
console.log("========================");
|
||||
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn
|
||||
this.formData.dangerousEngineeringId = val.id
|
||||
this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
|
||||
this.engineeringId = val.id
|
||||
this.engineeringName = val.name
|
||||
this.getEnterpriseInfoList()
|
||||
},
|
||||
watch:{
|
||||
@ -131,36 +128,42 @@
|
||||
uni.hideLoading()
|
||||
console.log("xmgl/xzDangerousEngineeringAcceptance/list",res);
|
||||
this.enterpriseInfoList = res.result;
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
saveForm(){
|
||||
// console.log(this.formData)
|
||||
let data = {
|
||||
aaa: this.formData.acceptanceDescribe,
|
||||
bbb: this.formData.acceptanceRegion,
|
||||
ccc: this.formData.acceptanceResult,
|
||||
projectSn: this.projectSn,
|
||||
engineeringId: this.engineeringId, //危大工程Id
|
||||
//申请验收相关属性
|
||||
applyAcceptanceUnitId: this.userInfo.userEnterpriseId, //申请验收单位id
|
||||
applyAcceptanceUserId: this.userInfo.userId, //申请验收人id
|
||||
//验收相关属性
|
||||
acceptanceUnitId: this.enterpriseId,
|
||||
acceptanceUserId: this.acceptancePerson.userId,
|
||||
planTime: this.planTime,
|
||||
}
|
||||
data.createUser = JSON.parse(uni.getStorageSync('userInfo')).userId;
|
||||
let arr = []
|
||||
this.formData.imgFileList.forEach(item=>{
|
||||
arr.push(item.url)
|
||||
})
|
||||
data.imageUrl = arr.join(',')
|
||||
if(data.acceptanceType == ""){
|
||||
console.log(data);
|
||||
if(!data.acceptanceUnitId){
|
||||
uni.showToast({
|
||||
title: '请选择验收类型!',
|
||||
title: '请选择验收单位',
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(data.acceptanceRegion == ""){
|
||||
if(!data.acceptanceUserId){
|
||||
uni.showToast({
|
||||
title: '请输入验收部位!',
|
||||
title: '请选择验收人',
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(!data.planTime){
|
||||
uni.showToast({
|
||||
title: '请选择验收时间',
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
@ -168,7 +171,7 @@
|
||||
}
|
||||
console.log(data)
|
||||
this.sendRequest({
|
||||
url:'xmgl/dangerousEngineeringAcceptanceCheck/add',
|
||||
url:'xmgl/xzDangerousEngineeringAcceptance/add',
|
||||
method:'post',
|
||||
data: data,
|
||||
success:res=>{
|
||||
@ -183,6 +186,19 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
bindPickerChange(e){
|
||||
this.planTime = e.f3
|
||||
},
|
||||
bindPickerChangePerson(e){
|
||||
this.acceptanceIndex = e.target.value
|
||||
this.acceptancePerson = this.acceptancePersonList[e.target.value]
|
||||
},
|
||||
bindPickerChangeEnterprise(e){
|
||||
this.enterpriseIndex = e.target.value
|
||||
this.enterpriseId = this.enterpriseInfoList[e.target.value].id
|
||||
},
|
||||
getNowTime() {
|
||||
let dateTime
|
||||
let yy = new Date().getFullYear()
|
||||
@ -194,23 +210,6 @@
|
||||
dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
|
||||
console.log(dateTime)
|
||||
return dateTime
|
||||
},
|
||||
|
||||
bindPickerChange(e){
|
||||
this.acceptanceTime = e.f3
|
||||
console.log(this.acceptanceTime);
|
||||
console.log("timetimetimetimetimetimetimetimetimetimetimetimetimetimetimetimetimetimetimetime");
|
||||
console.log(e);
|
||||
},
|
||||
bindPickerChangePerson(e){
|
||||
this.acceptanceIndex = e.target.value
|
||||
this.acceptancePerson = this.typeList[e.target.value]
|
||||
},
|
||||
bindPickerChangeEnterprise(e){
|
||||
this.enterpriseIndex = e.target.value
|
||||
this.enterpriseId = this.enterpriseInfoList[e.target.value].id
|
||||
console.log("=======================================================");
|
||||
console.log(this.enterpriseId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,23 +5,29 @@
|
||||
{{title}}
|
||||
</view>
|
||||
</headers>
|
||||
<view class="backlogList-admin" @click="jobTrial">
|
||||
<view class="backlogList-admin" v-for="item in listData" :key="item.id" @click="jobTrial(item)">
|
||||
<view class="backlogList backlogMargin">
|
||||
<span>
|
||||
危大工程名称:ssss
|
||||
危大工程名称:{{item.engineeringName}}
|
||||
</span>
|
||||
<span class="backlogList-span">待确认</span>
|
||||
<span class="backlogList-span" v-if="!item.acceptanceResult">待确认</span>
|
||||
<span class="backlogList-span" v-if="item.acceptanceResult === 1">合格</span>
|
||||
<span class="backlogList-span" v-if="item.acceptanceResult === 2">不合格</span>
|
||||
</view>
|
||||
<view class="backlogMargin">
|
||||
计划执行时间:ssss
|
||||
计划执行时间:{{item.planTime}}
|
||||
</view>
|
||||
<view class="backlogMargin">
|
||||
申请验收单位:ssss
|
||||
申请验收单位:{{item.applyAcceptanceUnitName}}
|
||||
</view>
|
||||
<view class="backlogMargin">
|
||||
申请验收人:ssss
|
||||
申请验收人:{{item.applyAcceptanceUserName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="no-data" v-if="listData.length === 0">
|
||||
<image class="img" src="/static/noData.png"></image>
|
||||
<text class="txt">暂无数据</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -30,13 +36,46 @@
|
||||
data() {
|
||||
return {
|
||||
title: "查看待办",
|
||||
listData: [],
|
||||
projectSn: '',
|
||||
userInfo: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn
|
||||
this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
|
||||
this.initData()
|
||||
},
|
||||
methods:{
|
||||
jobTrial(){
|
||||
initData(){
|
||||
this.sendRequest({
|
||||
url:'xmgl/xzDangerousEngineeringAcceptance/list',
|
||||
method:'get',
|
||||
data:{
|
||||
projectSn: this.projectSn,
|
||||
acceptanceUserId: this.userInfo.userId
|
||||
},
|
||||
success:res=>{
|
||||
uni.hideLoading()
|
||||
this.listData = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
jobTrial(item){
|
||||
console.log('sssssss');
|
||||
let checkRecord = {
|
||||
id: item.id,
|
||||
engineeringName: item.engineeringName,
|
||||
planTime: item.planTime,
|
||||
applyAcceptanceUnitName: item.applyAcceptanceUnitName,
|
||||
applyAcceptanceUserName: item.applyAcceptanceUserName
|
||||
}
|
||||
checkRecord = item
|
||||
uni.navigateTo({
|
||||
url:'./backlogTrial/backlogTrial'
|
||||
url:'./backlogTrial/backlogTrial?checkRecord='+encodeURIComponent(JSON.stringify(checkRecord))
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -67,6 +106,20 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.no-data{
|
||||
text-align: center;
|
||||
.img{
|
||||
display: block;
|
||||
height: 200rpx;
|
||||
width: 200rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 60rpx;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
.txt{
|
||||
color: #C0C4CC;
|
||||
}
|
||||
}
|
||||
|
||||
.backlogMargin{
|
||||
margin-bottom: 15px;
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
<view :style="{ 'padding-top': statusBarHeight + 45 + 'px' }">
|
||||
<view class="plan-form">
|
||||
<view style="background-color: #fff;border-bottom: 10px solid #068de8;padding:10px 10px 15px 10px">
|
||||
<view class="backlogMargin">危大工程名称: </view>
|
||||
<view class="backlogMargin">计划执行时间: </view>
|
||||
<view class="backlogMargin">申请验收单位: </view>
|
||||
<view class="backlogMargin">申请验收人: </view>
|
||||
<view class="backlogMargin">危大工程名称:{{checkRecord.engineeringName}}</view>
|
||||
<view class="backlogMargin">计划执行时间:{{checkRecord.planTime}}</view>
|
||||
<view class="backlogMargin">申请验收单位:{{checkRecord.applyAcceptanceUnitName}}</view>
|
||||
<view class="backlogMargin">申请验收人:{{checkRecord.applyAcceptanceUserName}}</view>
|
||||
</view>
|
||||
<view class="form-item b-bottom" style="justify-content: flex-start;">
|
||||
<view class="form-lable"><text class="tag">*</text>验收结果</view>
|
||||
@ -49,13 +49,20 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="save-btn" @click="saveForm">确 认</view>
|
||||
<u-popup :show="isPopupVisible" @close="closePopup" @open="isPopupVisible = true" z-index="9999">
|
||||
<!-- <u-popup :show="isPopupVisible" @close="closePopup" @open="isPopupVisible === true" z-index="9999">
|
||||
<view class="slot-content">
|
||||
<!-- 弹窗内容 -->
|
||||
弹窗内容
|
||||
这里是弹窗的内容
|
||||
<u-button @click="closePopup">关闭弹窗</u-button>
|
||||
</view>
|
||||
</u-popup>
|
||||
</u-popup> -->
|
||||
<!-- 分包单位弹窗 -->
|
||||
<!-- <view class="unitDialog" v-if="unitDialog" @click="unitDialog=false"> -->
|
||||
<view class="dialog-container" v-if="unitDialog">
|
||||
<view class="dialog-content">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -63,8 +70,11 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
unitDialog: false,
|
||||
checkRecord: {}, //验收记录
|
||||
|
||||
statusBarHeight: 0,
|
||||
isPopupVisible: false,
|
||||
isPopupVisible: true,
|
||||
title: "新增验收记录",
|
||||
formData: {
|
||||
acceptanceRegion: "",
|
||||
@ -89,7 +99,11 @@
|
||||
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight;
|
||||
},
|
||||
onLoad(val) {
|
||||
this.formData.dangerousEngineeringId = val.id
|
||||
// this.formData.dangerousEngineeringId = val.id
|
||||
this.checkRecord = JSON.parse(decodeURIComponent(val.checkRecord));
|
||||
console.log("===============onload===================");
|
||||
console.log(this.checkRecord);
|
||||
console.log("===============onload===================");
|
||||
},
|
||||
methods: {
|
||||
checkRadio(val) {
|
||||
@ -149,7 +163,6 @@
|
||||
})
|
||||
that.videoFileList = fileArr;
|
||||
}
|
||||
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
@ -171,13 +184,16 @@
|
||||
saveForm() {
|
||||
// console.log(this.formData)
|
||||
this.isPopupVisible = true
|
||||
// let data = {
|
||||
// acceptanceDescribe: this.formData.acceptanceDescribe,
|
||||
// acceptanceRegion: this.formData.acceptanceRegion,
|
||||
// acceptanceResult: this.formData.acceptanceResult,
|
||||
// acceptanceType: this.formData.acceptanceType,
|
||||
// dangerousEngineeringId: this.formData.dangerousEngineeringId
|
||||
// }
|
||||
this.unitDialog = true
|
||||
let data = {
|
||||
id: this.checkRecord.id,
|
||||
acceptanceResult: this.formData.acceptanceResult, //验收结果
|
||||
acceptanceDesc: this.formData.acceptanceDescribe, //验收描述
|
||||
photo: this.formData.imgFileList[0].url
|
||||
}
|
||||
console.log("===============================");
|
||||
console.log(data);
|
||||
console.log("===============================");
|
||||
// data.createUser = JSON.parse(uni.getStorageSync('userInfo')).userId;
|
||||
// let arr = []
|
||||
// this.formData.imgFileList.forEach(item=>{
|
||||
@ -186,7 +202,7 @@
|
||||
// data.imageUrl = arr.join(',')
|
||||
// console.log(data)
|
||||
// this.sendRequest({
|
||||
// url:'xmgl/dangerousEngineeringAcceptanceCheck/add',
|
||||
// url:'xmgl/xzDangerousEngineeringAcceptance/edit',
|
||||
// method:'post',
|
||||
// data: data,
|
||||
// success:res=>{
|
||||
@ -391,4 +407,21 @@
|
||||
.backlogMargin {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.dialog-container {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 111;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.dialog-content{
|
||||
width: 80%;
|
||||
height: 500rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -107,10 +107,10 @@
|
||||
},{
|
||||
id: 2,
|
||||
name: "工程资料"
|
||||
},{
|
||||
},/*{
|
||||
id: 3,
|
||||
name: "一般验收"
|
||||
},/*{
|
||||
},{
|
||||
id: 4,
|
||||
name: "验收表验收"
|
||||
},*/{
|
||||
@ -230,7 +230,7 @@
|
||||
}
|
||||
else if(this.activeIndex == 8){
|
||||
uni.navigateTo({
|
||||
url:'./addFinallyAcceptance?id='+this.detailId
|
||||
url:'./addFinallyAcceptance?id='+this.detailId+'&name='+this.detailData.engineeringName
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props:['detailId'],
|
||||
props:['detailId','detailData'],
|
||||
data() {
|
||||
return {
|
||||
finallyCheckList: [],
|
||||
@ -31,6 +31,9 @@
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods:{
|
||||
initData(){
|
||||
|
||||
@ -70,10 +70,10 @@
|
||||
<image class="moudle-icon" src="/static/safeMange/danger_project.png"></image>
|
||||
<text>危大工程</text>
|
||||
</view>
|
||||
<!-- <view class="moudle-item flex" @click="jumpPage(7)" v-if="COMPANY != 'sanjiang'">
|
||||
<view class="moudle-item flex" @click="jumpPage(7)" v-if="COMPANY != 'sanjiang'">
|
||||
<image class="moudle-icon" src="/static/safeMange/danger_check.png"></image>
|
||||
<text>危大验收</text>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <view class="moudle-item flex" @click="jumpPage(6)">
|
||||
<image class="moudle-icon" src="/static/safeMange/enterprise_examine.png"></image>
|
||||
<text>企业检查</text>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user