【update】 起草组列表和详情、跳转会议

This commit is contained in:
danshihao
2024-01-15 10:58:07 +08:00
parent 500e51096b
commit d2a8498a27
5 changed files with 116 additions and 40 deletions
+47 -3
View File
@@ -9,10 +9,11 @@ Page({
*/
data: {
statusBarHeight: wx.getSystemInfoSync()['statusBarHeight'],
type:'',//区别是哪个项目的项目详情 work工作组
type:'',//区别是哪个项目的项目详情 work工作组 draft起草组
form: {},
id: '', // 在工作组id,项目id
id: '', // 在工作组id,项目id,起草组id
workingGroupId: '', //工作组id
draftingGroupId: '', //起草组id
showMeeting: false, // 会议信息的显隐
showProjectData:true, // 项目资料的显示隐藏
projectFileList: [], // 项目资料文件
@@ -34,8 +35,17 @@ Page({
},
// 获取更多会议信息数据
goMoreMeeting() {
let params = ''
switch(this.data.type) {
case 'work':
params = `workingGroupId=${this.data.workingGroupId}`
break
case 'draft':
params = `draftingGroupId=${this.data.draftingGroupId}`
break
}
wx.navigateTo({
url: `../meeting/meeting?workingGroupId=${this.data.workingGroupId}`,
url: `../meeting/meeting?` + params,
})
},
// 会议详情
@@ -120,6 +130,7 @@ Page({
}
this.data.id = options.id
this.data.workingGroupId = options.workingGroupId
this.data.draftingGroupId = options.draftingGroupId
if (options.type == 'work') { // 工作组项目有会议详情
this.setData({
showMeeting: true,
@@ -127,6 +138,39 @@ Page({
})
MeetingApi.meetingList({
workingGroupProjectId: this.data.id,
meetingType: 1, // 工作组会议
meetingSignUpType: 0, // 显示所有会议
column: 'createTime',
order: 'desc'
}).then(res => {
if (res.success) {
if (res.result.records && res.result.records.length <= 2) {
this.setData({
meetingList: res.result.records
})
} else if (res.result.records && res.result.records.length > 2) {
this.setData({
meetingList: res.result.records.slice(0, 2)
})
}
}
}).catch(err => {
wx.showToast({
title: '加载失败',
icon: 'none',
duration: 2000
})
})
} else if (options.type === 'draft') {
// 起草组项目有会议详情
this.setData({
showMeeting: true,
pageTitle:'起草组详情'
})
MeetingApi.meetingList({
draftingGroupProjectId: this.data.id,
meetingType: 7, // 起草组会议
meetingSignUpType: 0, // 显示所有会议
column: 'createTime',
order: 'desc'
}).then(res => {
+36 -29
View File
@@ -11,7 +11,7 @@
<text>项目名称</text>
<text>{{form.chargeProject}}</text>
</view>
<view>
<view wx:if="{{type !== 'draft'}}">
<text>款项用途</text>
<!-- 需求文档上写的固定的 资料网费-->
<text>{{form.chargeUse_dictText}}</text>
@@ -24,39 +24,45 @@
<text>项目负责人</text>
<text>{{form.principalName}}</text>
</view>
<view>
<text>应付金额</text>
<text>{{form.receivableAmount ? form.receivableAmount + '元' : ''}}</text>
</view>
<view>
<text>实付金额</text>
<text>{{form.paidAmount ? form.paidAmount + '元' : ''}}</text>
</view>
<block wx:if="{{type !== 'draft'}}">
<view>
<text>应付金额</text>
<text>{{form.receivableAmount ? form.receivableAmount + '元' : ''}}</text>
</view>
<view>
<text>实付金额</text>
<text>{{form.paidAmount ? form.paidAmount + '元' : ''}}</text>
</view>
</block>
<view>
<text>企业联系人</text>
<text>{{form.contactsTemporaryName}}</text>
</view>
<view>
<text>邮寄联系人</text>
<text>{{form.mailContactsTemporaryName}}</text>
</view>
<view>
<text>打包</text>
<text>{{form.pack_dictText}}</text>
</view>
<block wx:if="{{type !== 'draft'}}">
<view>
<text>邮寄联系人</text>
<text>{{form.mailContactsTemporaryName}}</text>
</view>
<view>
<text>打包</text>
<text>{{form.pack_dictText}}</text>
</view>
</block>
<!-- 工作组项目展示 -->
<view style="height:auto" wx:if="{{type === 'work' }}">
<view style="height:auto" wx:if="{{type === 'work' || type === 'draft' }}">
<text>任务及目标</text>
<text>{{form.missionAndObjectives || ''}}</text>
</view>
<view>
<text>需要发票</text>
<text>{{form.needInvoice_dictText}}</text>
</view>
<view>
<text>付款方式</text>
<text>{{form.chargeWay_dictText}}</text>
</view>
<block wx:if="{{type !== 'draft'}}">
<view>
<text>需要发票</text>
<text>{{form.needInvoice_dictText}}</text>
</view>
<view>
<text>付款方式</text>
<text>{{form.chargeWay_dictText}}</text>
</view>
</block>
<!-- 付款方式为合同才有 -->
<view wx:if="{{form.chargeWay === 2}}">
<text>合同</text>
@@ -113,7 +119,8 @@
</view>
<text class="no-data" style="height: 50px;" wx:if="{{!form.paymentRecord}}">暂无到账记录!</text>
</view>
<view class="basic-info" style="margin-top: 10px;">
<!-- 起草组不显示开票邮寄信息 -->
<view class="basic-info" style="margin-top: 10px;" wx:if="{{type !== 'draft'}}">
<view class="title">
<text>开票邮寄信息</text>
</view>
@@ -154,5 +161,5 @@
<text class="no-data" style="height: 50px;" wx:if="{{!form.mailBill}}">暂无邮寄记录!</text>
</view>
</view>
<!-- 工作组展示 -->
<view class="tip" wx:if="{{type === 'work' }}">在研项目和各种分发资料请到pc端查看</view>
<!-- 工作组、起草组展示 -->
<view class="tip" wx:if="{{type === 'work' || type === 'draft' }}">在研项目和各种分发资料请到pc端查看</view>