452 lines
8.5 KiB
Vue
Raw Normal View History

2024-04-25 22:33:57 +08:00
<template>
<view class="deetailPage">
<headers :showBack="true">
<view class="headerName">
进度管理系统
</view>
</headers>
<view class="content" v-if="isPass">
<view class="title">
进度详情
</view>
<view class="type">
2024-05-22 20:52:14 +08:00
<view class="textColor">
<text>所属承包商</text>
<text class="textStyle">{{itemFrom.enterpriseName || ""}}</text>
</view>
2024-04-25 22:33:57 +08:00
</view>
<view class="type">
2024-05-22 20:52:14 +08:00
<view class="textColor">
<text>所属厂区</text>
<text class="textStyle">{{itemFrom.regionName || ""}}</text>
</view>
2024-04-25 22:33:57 +08:00
</view>
<view class="type">
2024-05-22 20:52:14 +08:00
<view class="textColor">
<text>分部分项工程</text>
<text class="textStyle">{{itemFrom.taskName || ""}}</text>
</view>
2024-04-25 22:33:57 +08:00
</view>
<view class="type">
2024-05-22 20:52:14 +08:00
<view class="textColor">
<text>上报时间</text>
<text class="textStyle">{{itemFrom.uploadDate || ""}}</text>
</view>
2024-04-25 22:33:57 +08:00
</view>
<view class="type">
2024-05-22 20:52:14 +08:00
<view class="textColor">
<text>上报进度</text>
<text class="textStyle">{{itemFrom.progressRatio || 0}}%</text>
</view>
2024-04-25 22:33:57 +08:00
</view>
<view class="type">
<view class="textColor">反馈内容</view>
<view class="type-area">
<view>{{itemFrom.feedbackContent || ""}}</view>
</view>
</view>
<view class="type">
<view class="textColor">图片</view>
<view class="type-img">
<image :src="item" mode="" v-for="(item,index) in itemFrom.imgList" :key="index"></image>
</view>
</view>
<view class="type">
2024-05-22 20:52:14 +08:00
<view class="textColor">是否有延期误工事件<span
class="textStyle">{{itemFrom.hasDelayEvent == 1 ? "是" : "否"}}</span></view>
2024-04-25 22:33:57 +08:00
</view>
<view class="type">
<view class="textColor">延期误工原因</view>
<view class="type-area">
<view>{{itemFrom.delayEventReason || ""}}</view>
</view>
</view>
</view>
<view class="content" v-else>
<view class="title">
进度详情
</view>
<view class="b-bottom">
<view class="name">驳回原因</view>
2024-05-22 20:52:14 +08:00
<textarea auto-height @input='supplementTextarea' :value="form.feedbackContent"
placeholder="多行输入"></textarea>
2024-04-25 22:33:57 +08:00
</view>
</view>
<view class="btn-box" v-if="isPass && ![2,3].includes(itemFrom.auditType)">
<view class="btn-box">
<view class="cancle-btn" @click="isPass = false">驳回</view>
<view class="pass-btn" @click="passAudit">通过</view>
</view>
</view>
<view class="addProgess" v-if="!isPass && ![2,3].includes(itemFrom.auditType)" @click="submitAudit">
提交
</view>
</view>
</template>
<script>
export default {
data() {
return {
itemFrom: {},
userInfo: {},
tableData: [],
projectSn: '',
isPass: true,
form: {
feedbackContent: ''
}
}
},
onLoad(option) {
this.itemFrom = JSON.parse(option.obj);
2024-05-22 20:52:14 +08:00
if (this.itemFrom) {
2024-04-25 22:33:57 +08:00
this.filterItemForm();
}
this.userInfo = JSON.parse(uni.getStorageSync('userInfo'));
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
},
methods: {
// 提交审核
2024-05-22 20:52:14 +08:00
submitAudit() {
2024-04-25 22:33:57 +08:00
// 获取统计信息
this.sendRequest({
url: "xmgl/xzTaskProgressContent/edit",
data: {
id: this.itemFrom.id,
auditType: 3,
rejectReason: this.form.feedbackContent
},
method: "post",
success(res) {
uni.showToast({
title: '驳回审核'
})
2024-05-22 20:52:14 +08:00
setTimeout(function() {
2024-04-25 22:33:57 +08:00
uni.navigateBack({
delta: 1
})
2024-05-22 20:52:14 +08:00
}, 1000)
2024-04-25 22:33:57 +08:00
}
})
},
// 通过审核
2024-05-22 20:52:14 +08:00
passAudit() {
2024-04-25 22:33:57 +08:00
// 获取统计信息
this.sendRequest({
url: "xmgl/xzTaskProgressContent/edit",
data: {
id: this.itemFrom.id,
auditType: 2
},
method: "post",
success(res) {
uni.showToast({
title: '提交成功'
})
2024-05-22 20:52:14 +08:00
setTimeout(function() {
2024-04-25 22:33:57 +08:00
uni.navigateBack({
delta: 1
})
2024-05-22 20:52:14 +08:00
}, 1000)
2024-04-25 22:33:57 +08:00
}
})
},
//反馈内容
supplementTextarea(e) {
this.form.feedbackContent = e.detail.value
},
2024-05-22 20:52:14 +08:00
filterItemForm() {
2024-04-25 22:33:57 +08:00
console.log(this.itemFrom)
2024-05-22 20:52:14 +08:00
if (this.itemFrom.image) {
2024-04-25 22:33:57 +08:00
let imgArr = JSON.parse(this.itemFrom.image);
let dealArr = [];
imgArr.map(item => {
2024-05-22 20:52:14 +08:00
if (item.url.indexOf("http") == -1) {
2024-04-25 22:33:57 +08:00
dealArr.push(this.url_config + 'image/' + item.url)
} else {
dealArr.push(item.url)
}
})
this.itemFrom.imgList = dealArr
}
}
}
}
</script>
<style lang="less">
.btn-box {
position: fixed;
bottom: 30rpx;
left: 0;
line-height: 96rpx;
display: flex;
justify-content: center;
width: 100%;
height: 96rpx;
color: #fff;
text-align: center;
2024-05-22 20:52:14 +08:00
2024-04-25 22:33:57 +08:00
.cancle-btn {
// flex: 1;
width: 45%;
height: 100%;
// background: #DD4907;
background-color: transparent;
color: #EF636A;
border: 2rpx solid #EE6B73;
border-top-left-radius: 8rpx;
border-bottom-left-radius: 8rpx;
}
2024-05-22 20:52:14 +08:00
2024-04-25 22:33:57 +08:00
.pass-btn {
// flex: 1;
width: 45%;
height: 100%;
background: #127FEC;
border-top-right-radius: 8rpx;
border-bottom-right-radius: 8rpx;
}
}
2024-05-22 20:52:14 +08:00
2024-04-25 22:33:57 +08:00
.b-bottom {
border-top: 2rpx solid #f0f0f0;
display: flex;
height: 200rpx;
2024-05-24 15:45:40 +08:00
// line-height: 80rpx;
2024-04-25 22:33:57 +08:00
padding-top: 40rpx;
2024-05-24 15:45:40 +08:00
margin: 0 20rpx;
2024-05-22 20:52:14 +08:00
2024-04-25 22:33:57 +08:00
.inputFrom {
width: 80%;
margin-left: 40rpx;
}
2024-05-22 20:52:14 +08:00
2024-04-25 22:33:57 +08:00
.name {
width: 20%;
}
2024-05-22 20:52:14 +08:00
2024-04-25 22:33:57 +08:00
.icon-right {
margin-left: 16rpx;
width: 16rpx;
height: 32rpx;
}
2024-05-22 20:52:14 +08:00
2024-04-25 22:33:57 +08:00
}
2024-05-22 20:52:14 +08:00
2024-04-25 22:33:57 +08:00
.content {
width: 100%;
box-sizing: border-box;
padding: 20rpx 16rpx;
.title {
margin: 20rpx;
font-weight: bold;
font-size: 28rpx;
}
.type {
color: #9f9f9f;
margin: 40rpx 20rpx 0 20rpx;
font-size: 28rpx;
2024-05-22 20:52:14 +08:00
.textColor {
display: flex;
2024-05-23 20:06:14 +08:00
// align-items: center;
2024-05-22 20:52:14 +08:00
justify-content: space-between;
text:nth-child(1) {
white-space: nowrap;
}
.textStyle {
color: #000;
overflow-wrap: anywhere;
}
2024-04-25 22:33:57 +08:00
}
2024-05-22 20:52:14 +08:00
.type-img {
2024-04-25 22:33:57 +08:00
margin-top: 20rpx;
display: flex;
flex-wrap: wrap;
2024-05-22 20:52:14 +08:00
image {
2024-04-25 22:33:57 +08:00
width: 80rpx;
height: 80rpx;
margin-right: 20rpx;
}
}
2024-05-22 20:52:14 +08:00
.type-area {
2024-04-25 22:33:57 +08:00
background-color: #F6F6F6;
border-radius: 6rpx;
padding: 15rpx;
color: #626677;
margin-top: 20rpx;
}
}
2024-05-22 20:52:14 +08:00
.record-content {
.record-item {
2024-04-25 22:33:57 +08:00
display: flex;
background-color: #F6F6F6;
border-radius: 6rpx;
padding: 15rpx;
2024-05-22 20:52:14 +08:00
image {
2024-04-25 22:33:57 +08:00
width: 30rpx;
height: 30rpx;
margin-top: 5rpx;
margin-left: 20rpx;
margin-right: 70rpx;
}
2024-05-22 20:52:14 +08:00
.item-text {
2024-04-25 22:33:57 +08:00
display: flex;
flex-direction: column;
margin-right: auto;
2024-05-22 20:52:14 +08:00
text:nth-child(1) {
2024-04-25 22:33:57 +08:00
margin-bottom: 20rpx;
}
}
2024-05-22 20:52:14 +08:00
.record-status {
2024-04-25 22:33:57 +08:00
width: 100rpx;
height: 40rpx;
line-height: 40rpx;
text-align: center;
font-size: 24rpx;
color: white;
border-radius: 30rpx;
}
2024-05-22 20:52:14 +08:00
.pass-status {
2024-04-25 22:33:57 +08:00
background-color: #5382F6;
}
2024-05-22 20:52:14 +08:00
.noPass-status {
2024-04-25 22:33:57 +08:00
background-color: #EB3B43;
}
}
2024-05-22 20:52:14 +08:00
.record-item:not(:last-child) {
2024-04-25 22:33:57 +08:00
margin-bottom: 40rpx;
}
}
2024-05-22 20:52:14 +08:00
2024-04-25 22:33:57 +08:00
.line {
border-bottom: 1px solid #e6e6e6;
margin-top: 60rpx;
}
.container {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
font-size: 28rpx;
margin-top: 40rpx;
}
.table-header {
display: flex;
background-color: #f7f8fa;
text-align: center;
height: 70rpx;
line-height: 70rpx;
}
.header-cell {
flex: 1;
border: 1px solid #f0f0f0;
}
.table-body {
display: flex;
flex-direction: column;
text-align: center;
}
.table-row {
display: flex;
height: 70rpx;
line-height: 70rpx;
}
.table-cell {
flex: 1;
border: 1px solid #f0f0f0;
width: 50rpx;
white-space: nowrap;
/* 防止换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
/* 超出部分显示省略号 */
}
.addProgess {
width: 50%;
background: #5181f6;
text-align: center;
margin: auto;
height: 60rpx;
color: #fff;
border-radius: 40rpx;
line-height: 60rpx;
margin-top: 110rpx;
font-size: 28rpx;
}
.closeProgess {
width: 50%;
text-align: center;
margin: auto;
height: 60rpx;
border-radius: 40rpx;
line-height: 60rpx;
margin-top: 110rpx;
font-size: 28rpx;
background: #f7f8fa;
color: #8c8c8c;
}
.greenText {
color: green !important;
}
.blueText {
color: #5181f6 !important;
}
.redText {
color: red !important;
}
}
2024-05-22 20:52:14 +08:00
2024-04-25 22:33:57 +08:00
.addProgess {
width: 70%;
background: #5181f6;
text-align: center;
margin: 0 auto;
margin-top: auto;
height: 80rpx;
color: #fff;
border-radius: 40rpx;
line-height: 80rpx;
font-size: 28rpx;
position: fixed;
bottom: 30rpx;
left: 120rpx;
display: flex;
justify-content: center;
}
2024-05-22 20:52:14 +08:00
</style>