<template>
|
<view>
|
<view class="main-box">
|
<view class="box" v-for="item in list">
|
<view class="box-title">基本信息</view>
|
<view class="box-single-row flex-row" v-for="rule in listRule">
|
<view style="flex: 1;">{{rule.label}}</view>
|
<view style="flex: 4;" v-if="!rule.event" >{{item[rule.attribute]}}</view>
|
<view style="flex: 4;color: cornflowerblue;" v-if="rule.event"
|
@click="check(rule.attribute,item[rule.attribute])">{{item[rule.attribute]}}</view>
|
</view>
|
</view>
|
</view>
|
|
<view class="main-box">
|
<view class="box">
|
<view class="box-title">流程动态</view>
|
<u-steps :current="1" direction="column">
|
<u-steps-item :title="`${item.title} ${item.time ? item.time : ''}`" :desc="item.msg" v-for="item in steps" />
|
</u-steps>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
steps: [],
|
list: [{
|
businessTripReasons: '沟通立库事宜',
|
businessTransportation$: '交通工具',
|
businessStartAddr$: '出发地',
|
businessEndAddr$: '目的地',
|
businessStartTimeDay$: '出发日期',
|
businessEndTimeDay$: '结束日期',
|
businessDuration$: '出差时长',
|
businessTripDays$: '出差天数',
|
businessPeers: '同行人',
|
userId$: '申请人',
|
orderId: '跟踪项目',
|
updateTime$: '更新时间',
|
updateId$: '更新人员',
|
settle: 1,
|
settle$: '申请通过',
|
businessNotes: '出差备注',
|
createTime$: '2023-11-06 08:51:24',
|
bgcolor: 'color:#24ab59'
|
}, ],
|
listRule: [
|
{
|
label: "客户名称",
|
attribute: "templateName",
|
event: true
|
},
|
{
|
label: "报价编号",
|
attribute: "orderNum",
|
},
|
{
|
label: "规划单号",
|
attribute: "planId$",
|
event: true
|
},
|
{
|
label: "规划单名称",
|
attribute: "planName$",
|
},
|
{
|
label: "进度",
|
attribute: "settle$",
|
},
|
{
|
label: "创建时间",
|
attribute: "createTime$",
|
},
|
|
{
|
label: "更新人员",
|
attribute: "updateUserId$",
|
},
|
{
|
label: "更新时间",
|
attribute: "updateTime$",
|
},
|
],
|
}
|
},
|
onLoad(option) {
|
let _this = this
|
_this.list = []
|
const eventChannel = this.getOpenerEventChannel();
|
eventChannel.on('priQuoteDetl', function(data) {
|
_this.list.push(data.data)
|
_this.settle = data.data.settle
|
if (data.data.settle == 1) {
|
_this.subTitle = '审批'
|
}
|
_this.getSetps()
|
})
|
},
|
methods: {
|
check(type,data) {
|
if (type == 'templateName') {
|
this.goCstmrDetl(this.list[0].cstmrId$)
|
} else if (type == 'planId$') {
|
this.goSaleMangeDetl(this.list[0].itemId)
|
} else {
|
|
}
|
},
|
goCstmrDetl(data) {
|
let _this = this
|
uni.navigateTo({
|
url: '/pages/business/saleManage/cstmrDetls',
|
success: function(res) {
|
res.eventChannel.emit('cstmr', {
|
data: data
|
})
|
}
|
})
|
},
|
goSaleMangeDetl(data) {
|
let _this = this
|
uni.navigateTo({
|
url: '/pages/business/plan/planDetails',
|
success: function(res) {
|
res.eventChannel.emit('saleManage', {
|
data: data
|
})
|
}
|
})
|
},
|
getSetps() {
|
this.steps = JSON.parse(this.list[0].settleMsg)
|
return
|
let _this = this
|
uni.request({
|
url: `${_this.baseUrl}/priOnline2/${_this.list[0].id}/auth`,
|
header: { 'token': uni.getStorageSync('token') },
|
success(res) {
|
res = res.data
|
console.log(JSON.parse(res.data.settleMsg));
|
_this.steps = JSON.parse(res.data.settleMsg)
|
}
|
})
|
}
|
}
|
}
|
</script>
|
|
<style>
|
.main-box {
|
border-radius: 20rpx;
|
padding: 8rpx;
|
}
|
|
.box {
|
margin: 16rpx 8rpx;
|
/* height: 200px; */
|
box-shadow: 0 0 5px #dddddd;
|
background-color: #FFF;
|
padding: 16rpx 32rpx;
|
position: relative;
|
border-radius: 20rpx;
|
font-size: 24rpx;
|
/* color: #bdbdbd; */
|
}
|
.box-single-row {
|
display: flex;
|
}
|
|
.floor {
|
height: 100rpx;
|
line-height: 100rpx;
|
width: 100%;
|
background-color: #fff;
|
position: fixed;
|
bottom: 0;
|
left: 0;
|
display: flex;
|
align-items: center;
|
text-align: center;
|
letter-spacing: 10rpx;
|
}
|
.default {
|
flex: 2;
|
}
|
.default:active {
|
background-color: #eff0f1;
|
}
|
.wran {
|
flex: 1;
|
background-color: #ff5722;
|
color: #fff;
|
}
|
.primary {
|
flex: 2;
|
background-color: #2d8cf0;
|
color: #fff;
|
}
|
.primary:active {
|
background-color: #007dea;
|
}
|
|
</style>
|