118 lines
2.6 KiB
Vue
118 lines
2.6 KiB
Vue
|
<template>
|
||
|
<view class="content">
|
||
|
<u-cell-group>
|
||
|
<u-cell title="重点工程名称" :value="info.OUTSOURCED_NAME"/>
|
||
|
<u-cell title="计划工期" :value="info.STARTTIME+ '至'+ info.ENDTIME"/>
|
||
|
<u-cell title="合同号" :value="info.CONTRACT_NUM"/>
|
||
|
<u-cell title="施工相关方" :value="info.UNITS_NAME"/>
|
||
|
<u-cell title="相关方单位工程负责人" :value="info.UNITS_PIC_NAME"/>
|
||
|
<u-cell title="相关方单位负责人手机" :value="info.UNITS_PHONE"/>
|
||
|
<u-cell title="经度" v-show="WORK_LONGITUDE" :value="WORK_LONGITUDE"/>
|
||
|
<u-cell title="纬度" v-show="WORK_LATITUDE" :value="WORK_LATITUDE"/>
|
||
|
</u-cell-group>
|
||
|
<view class="button">
|
||
|
<u-button
|
||
|
v-if="info.STATE==='-1'"
|
||
|
type="success"
|
||
|
@click="fnUpdateStateKeyProject('1')"
|
||
|
size="small"
|
||
|
text="工程开始"
|
||
|
/>
|
||
|
<u-button
|
||
|
v-if="info.STATE==='-2'"
|
||
|
type="error"
|
||
|
@click="fnUpdateStateKeyProject('2')"
|
||
|
size="small"
|
||
|
text="工程结束"
|
||
|
/>
|
||
|
<u-button
|
||
|
@click="fnBack"
|
||
|
size="small"
|
||
|
text="返回"
|
||
|
/>
|
||
|
</view>
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import {getKeyProjectsView,setKeyProjectsState} from "@/api"
|
||
|
export default {
|
||
|
|
||
|
data() {
|
||
|
return {
|
||
|
OUTSOURCED_ID: '',
|
||
|
KEYPROJECTCHECK_ID: '',
|
||
|
type: '',
|
||
|
info: {},
|
||
|
WORK_LONGITUDE: '', //经度
|
||
|
WORK_LATITUDE: '', //纬度
|
||
|
hiddenData: {},
|
||
|
popupShow: false,
|
||
|
videoShow: false,
|
||
|
videoSrc: ''
|
||
|
}
|
||
|
},
|
||
|
computed: {
|
||
|
userInfo() {
|
||
|
return this.$store.getters.getUserInfo
|
||
|
}
|
||
|
},
|
||
|
onLoad(options) {
|
||
|
this.OUTSOURCED_ID = options.OUTSOURCED_ID
|
||
|
this.fnGetData()
|
||
|
},
|
||
|
methods: {
|
||
|
async fnGetData() {
|
||
|
//获取重点工程详细信息
|
||
|
const resData = await getKeyProjectsView({
|
||
|
OUTSOURCED_ID: this.OUTSOURCED_ID,
|
||
|
});
|
||
|
this.info = resData.pd;
|
||
|
this.WORK_LONGITUDE = this.info.WORK_LONGITUDE; //经度
|
||
|
this.WORK_LATITUDE = this.info.WORK_LATITUDE; //纬度
|
||
|
},
|
||
|
//返回方法
|
||
|
fnBack() {
|
||
|
uni.$u.route({
|
||
|
type: 'navigateBack'
|
||
|
})
|
||
|
},
|
||
|
//工程开始
|
||
|
async fnUpdateStateKeyProject(state){
|
||
|
await setKeyProjectsState({
|
||
|
OUTSOURCED_ID: this.OUTSOURCED_ID,
|
||
|
OPERATOR: this.userInfo.PERSONNELMANAGEMENT_ID, //修改人
|
||
|
STATE:STATE
|
||
|
});
|
||
|
uni.$u.toast('提交成功')
|
||
|
setTimeout(() => {
|
||
|
this.fnBack()
|
||
|
}, 1000)
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss" scoped>
|
||
|
.content {
|
||
|
padding: 0 20upx;
|
||
|
background-color: #fff;
|
||
|
}
|
||
|
|
||
|
.button {
|
||
|
text-align: center;
|
||
|
margin-top: 40upx;
|
||
|
margin-bottom: 40upx;
|
||
|
display: flex;
|
||
|
justify-content: space-between;
|
||
|
|
||
|
button {
|
||
|
width: 45%;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
.ml-10:first-child {
|
||
|
margin-left: 0 !important;
|
||
|
}
|
||
|
</style>
|