【update】 起草组报名
This commit is contained in:
@@ -37,8 +37,9 @@
|
||||
"pages/councilDetail/councilDetail",
|
||||
"pages/guestEditSignUpinfo/guestEditSignUpInfo",
|
||||
"pages/invoice/invoice",
|
||||
"pages/contacts/contacts"
|
||||
|
||||
"pages/contacts/contacts",
|
||||
"pages/signUpDraftTeamEntrance/signUpDraftTeamEntrance",
|
||||
"pages/signUpDraftTeamPage/signUpDraftTeamPage"
|
||||
],
|
||||
"window":{
|
||||
"backgroundTextStyle": "dark",
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
@@ -95,7 +95,10 @@ const UserApi = {
|
||||
getDraftContactsInfo: (params) => http.get(`${URL_CONFIG}drafting/payDraftingGroupSubitem/getItemById`, params),
|
||||
// 起草组联系人提交
|
||||
editDraftContactsInfo: (params) => http.post(`${URL_CONFIG}drafting/payDraftingGroupSubitem/editCompany`, params),
|
||||
|
||||
// 通过id查起草组信息(无权限接口)
|
||||
getDraftGroupInfoById: (params) => http.get(`${URL_CONFIG}drafting/payDraftingGroup/applyQueryById`, params),
|
||||
// 起草组报名(无权限接口)
|
||||
draftingGroupRegistration: (params) => http.post(`${URL_CONFIG}/drafting/payDraftingGroupSubitem/addByQRCode`, params)
|
||||
}
|
||||
|
||||
export default UserApi
|
||||
|
||||
@@ -83,8 +83,17 @@ Page({
|
||||
},
|
||||
// 提交
|
||||
formSubmit(e) {
|
||||
// 企业联系人1必填
|
||||
if (!this.data.personList[0].contactsId) {
|
||||
wx.showToast({
|
||||
title: '请选择企业联系人1',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return
|
||||
}
|
||||
// 企业联系人不能重复
|
||||
const personIds = this.data.personList.map(item => item.contactsId)
|
||||
const personIds = this.data.personList.filter(item => item.contactsId).map(item => item.contactsId)
|
||||
if (Array.from(new Set(personIds)).length !== personIds.length) {
|
||||
wx.showToast({
|
||||
title: '请选择不同的联系人',
|
||||
@@ -105,7 +114,7 @@ Page({
|
||||
// 工作组
|
||||
case 'work':
|
||||
// 联络人列表
|
||||
params.payWorkingGroupSubItemContactsList = this.data.personList
|
||||
params.payWorkingGroupSubItemContactsList = this.data.personList.filter(item => item.contactsId)
|
||||
UserApi.editWorkContactsInfo(params).then(res => {
|
||||
if (res.success) {
|
||||
wx.showToast({
|
||||
@@ -134,7 +143,7 @@ Page({
|
||||
// 起草组
|
||||
case 'draft':
|
||||
// 联络人列表
|
||||
params.payDraftingGroupSubItemContactsList = this.data.personList
|
||||
params.payDraftingGroupSubItemContactsList = this.data.personList.filter(item => item.contactsId)
|
||||
UserApi.editDraftContactsInfo(params).then(res => {
|
||||
if (res.success) {
|
||||
wx.showToast({
|
||||
@@ -161,7 +170,6 @@ Page({
|
||||
})
|
||||
break
|
||||
}
|
||||
UserApi.editWorkContactsInfo
|
||||
},
|
||||
goBack(){
|
||||
wx.navigateBack()
|
||||
@@ -254,7 +262,7 @@ Page({
|
||||
/**
|
||||
* 声明周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
onShow: function () {
|
||||
console.log('选择的用户', this.data.selectedPersonIndex, this.data.selectedPerson);
|
||||
if (this.data.selectedPersonIndex !== null && this.data.selectedPersonIndex !== undefined) {
|
||||
const { id, name } = this.data.selectedPerson || {}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
<!-- 备注 -->
|
||||
<view class="form-item textarea">
|
||||
<text class="item-label validate">备注</text>
|
||||
<text class="item-label">备注</text>
|
||||
<textarea placeholder="请输入备注" name="remarks" value="{{model.remarks}}" maxlength="200" />
|
||||
</view>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user