From 803d80d363c8a144f0bf4811396c3b980d25ac0e Mon Sep 17 00:00:00 2001 From: fengchenchen Date: Sun, 23 Jul 2023 18:14:54 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90update=E3=80=91=20=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2=E5=8A=9F=E8=83=BD=E7=9A=84?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E3=80=81=E6=8A=A5=E5=90=8D=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BC=96=E8=BE=91=E3=80=81=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 3 +- assets/images/icon_delete.png | Bin 0 -> 1135 bytes assets/images/icon_edit.png | Bin 0 -> 1081 bytes assets/images/invoice.png | Bin 0 -> 1429 bytes assets/js/Enums/common.js | 19 ++ assets/js/http/meetingApi.js | 6 +- assets/js/http/userApi.js | 4 +- behavior/confirmInvoiceModal.js | 7 +- components/imageUpload/imageUpload.js | 42 ++- pages/home/home.js | 12 + pages/invoice/invoice.js | 125 ++++++++ pages/invoice/invoice.json | 4 + pages/invoice/invoice.wxml | 57 ++++ pages/invoice/invoice.wxss | 103 +++++++ pages/meeting/meeting.js | 67 +++- pages/meeting/meeting.wxml | 61 ++-- pages/meeting/meeting.wxss | 58 +++- pages/signUpEntrance/signUpEntrance.js | 4 +- pages/signUpPage/signUpPage.js | 219 +++++++++---- pages/signUpPage/signUpPage.json | 3 +- pages/signUpPage/signUpPage.wxml | 30 +- pages/signUpPageGuoji/signUpPageGuoji.js | 341 +++++++++++++++++++-- pages/signUpPageGuoji/signUpPageGuoji.json | 3 +- pages/signUpPageGuoji/signUpPageGuoji.wxml | 150 ++++----- 24 files changed, 1088 insertions(+), 230 deletions(-) create mode 100644 assets/images/icon_delete.png create mode 100644 assets/images/icon_edit.png create mode 100644 assets/images/invoice.png create mode 100644 assets/js/Enums/common.js create mode 100644 pages/invoice/invoice.js create mode 100644 pages/invoice/invoice.json create mode 100644 pages/invoice/invoice.wxml create mode 100644 pages/invoice/invoice.wxss diff --git a/app.json b/app.json index ebf59dd..b608c3c 100644 --- a/app.json +++ b/app.json @@ -35,7 +35,8 @@ "pages/standardBasicInfo/standardBasicInfo", "pages/council/council", "pages/councilDetail/councilDetail", - "pages/guestEditSignUpinfo/guestEditSignUpInfo" + "pages/guestEditSignUpinfo/guestEditSignUpInfo", + "pages/invoice/invoice" ], "window":{ "backgroundTextStyle": "dark", diff --git a/assets/images/icon_delete.png b/assets/images/icon_delete.png new file mode 100644 index 0000000000000000000000000000000000000000..568e51b987cb8b50a6c218ecc189836536cc7fc7 GIT binary patch literal 1135 zcmV-#1d#iQP)Px(DM>^@R7gwBl}~I{MHI$=-@JR@>+6H2tu*z|LN}NwF=4@q1dO@>2}{thfFPxm z3KAu>7ST{*fZCF35Ns(eC9oh;mj+>>MoDzzg2bQ^H^xMi6x#~@L*Ko3j(P9Z7FvSf z%Gumx&Yj=+=9@Ef#O%@8nGLJwug7e&umzY+ASIY-`d7&?OCet4L2^ktR^Ih?z9i^=72IJ#FFNvQQ|tNufN9O!x_SG0U7UzfiAPZlypeUz;iW&sj;C| z4jmL!n)h!<;pjjZSFDlPZ!qGq-AS(c9Akqucfdo}#D@AG?+qUvdC_6*5>@84I||DN z!f0%*oDQ04*rVoTUgc-^2`|{3ibcI80g6cbM;eeqbkF_MZ>I?tPmO{0d+Cf#| zcSk|_*)Se|33Lz`_Oj*&sFqm=dShsnOKE?x6peSHh=DLS8u5wkNh%(+6!YWl zYb&Z$ldH>-sUEVx>iSAnGPRoJ5$mct# zd+jQ%t!W;stiopj=_Ix6w~n&hilSgb{W=aa509and@JGi*}*qh~CI2M;MK-lgZqxQIyz| zlg7MYLFiK33%1DYVtzI}E!sdU488~ZM(8FGn&IR$r;nPqLc1w+p2)EIprwLmz%JyC zmKo)}y^n{fcn`)pL76!>N#QX!X}Sa5&7(p}6&`&_-e-^|%69*lUve_8d!L1j4SE+_C)7=()n-{|#=YqLat%Rr3G<002ovPDHLkV1jLu BCx`$5 literal 0 HcmV?d00001 diff --git a/assets/images/icon_edit.png b/assets/images/icon_edit.png new file mode 100644 index 0000000000000000000000000000000000000000..683ac402287c52d8700c07142fba26d5fff6e5f2 GIT binary patch literal 1081 zcmV-91jhS`P)Px&^GQTOR7gvm)oW;1bsWd>_vd%c`R}4OD{qrXltO*rgXl)s10jiuf*v?4Qsy?@ zoYR3zf~W`ULC^&^UF7z6bAJg+Dyk<^RCWbRD3LCfWlBSx8tH7g%l~qI-#9}}Mcvl- z(ShGNukVlZ`~5yYG2Uuxn;K0jejIFxq*L;AXBF+Ds%rRRO5<|V=_yglEfZF6=I00s zl6Hf&WT)po<)Oyxd2j4+d;7Go$gOZrtMSZ4cEXHOi85h(@P1>~m3(}D=3|39JEw=C zt#C#?Fjdl5-r~1SOmk8t#%!5=i+Cm5H@J(YrlHZ{OlC$%q1s_}nBC;0@66Mjb-kZ+ zrmQ%cTwEdC2Fzwl?h_x!&*fLv@4GgDgwV;`R0sCSfzYq`PKcKNO7iG5G z4en)!7MgLu8*2+kj(>S|IGw&Zj9jgguK~(1cL@0sgBck6yyCW4>W#cxF7X&x40Pw5 zZKksR*p*u?ft^m!d|Y^qRqOsZ_q&pT3nelg zw?w#gV9S7Fp^u!mjl)Nd@1eQ5Ksp@-VZ7M6;CaFAf>VZd=dcc{>J#)LEO|5&U0w5n z&>EfD6OuwqJA*(iLnYVkW$DtGwzi^hVzkI9Y0M%)zggUw!@8($ICA+x6BQK!58gL7 zB3N(oO9cwdy&uS02YPycpt;#6Xwh}yV$3y}X`#ePBTnahyq%hLy;nNDinev!fpe>Y ziexv*csEk2b)ctb{{?hX>VD8u2KNY#5!;q*-d?A^{?DsLf}+gUHn1lJp~Jo7Wv#i& zRX-;yOG`^hP*(ClAh!YRPN5#))ohS|gUYq1u9Y(hyjx~>$?1zA_RkDf*XPAPyO9 z%ICC$y1KtdLz8i(GU?w9%AN71Ic>_Bxybxtp=w|r(r<>}l#lXnv8=IwEa(UvWzr`E zQ$PptcEB7r0P|&bJ+R+UYu>{5sHyp9tmrwo;~UTdL12(iHZ>^g%>QVjGdJjW($H{r zJm?4QoNr?st^(?%WzbnzrVng zff!~%U*G7NeQ~!569mUm(AB=&IZDALu?LdC2Y3a@3*1;IdH%f!d_GycUx6C|e?hQI z!fAZ4ERbnHsqXZ_k?Px)Pf0{UR9HvNnN4gPMHI*XZ+6$a-q>;N;*hkZtvHke;?AKb=%K&~qzb{2rV1dr zMLoa)QRR$8#D`jBB`rb-2~nvMv=v3I#IeF4aY8*%2~|C$O+t;GWbO6N%tPbUjh!am zb%>(Ob-sT4fAcaQ2$LxDf@wUn|cM%WQZe2M&g3-NMZO;#`mU)=xJaeJb;M7Xhd3l zdgt!_FG+|EgLFHX-?%YnGR_L%`SV#HFqxunJGienEkG~FjqBIXjQV1u`P#yR`mMey z0*g3)d~pSEdiu#Ex%I%_;!Ohf{~thrWEe&7&dyb@_60P#`^1U+gmT&OZM&Fc)BR&l zQ~>Pl9!o@$ng0b)SY!4&$OK**2J@q{ZpMdFmhR0}e~jBRkaC`I_H4%Yyy3XPrhngP zz5-AWATwXBEiHeT%M6_%Azod9p?g6iJZ`6uOWE#MV0Js}w*ezrnp>#F12&s=!nt#K z-*wYT0QZdSdJGWY+tua9n_8=|kj;EUM2A|DJT+fk`e}6c@CTL#UVF>uhBmKZ%H9h<-|Who4G zyn^j8GeDqr(^iGogqbeyWCs5VjX#L+7L3i;YX(s1Qj`R+9jFILb&e}44DQJ!ai0HJ zKS656B^@DN!FH+}pjZ$os$eSsHA;v9Y+v--#e!)G%Plxq1!S(Vpvz!n3H%B`_FA?@Wr(I(o) zmnO5=j=pwwzBYlWHz7=-De)Kg&N4gt>EmJ5wzD6Pw$a?1eSTX#GdubLvxB*#pMbml jZ^u5OuNNe?={LlGFG1UD23z{_00000NkvXXu0mjfw^gYe literal 0 HcmV?d00001 diff --git a/assets/js/Enums/common.js b/assets/js/Enums/common.js new file mode 100644 index 0000000..3a95136 --- /dev/null +++ b/assets/js/Enums/common.js @@ -0,0 +1,19 @@ +export const InvoiceTypeEnums = { + noNeed: { name: '不需要', index: 0 }, + plain: { name: '增值税普通发票', index: 1 }, + special: { name: '增值税专用发票', index: 2 } +} +// 参会人员身份类型 +export const MeetIdentifyTypeEnums = { + guest: { name: '嘉宾', index: 1 }, + attendee: { name: '参会人', index: 2 }, + internal: { name: '内部企业', index: 3 } +} +// 嘉宾类型 +export const GuestTypeEnums = { + VIP: { name: 'VIP', index: 1 }, + speaker: { name: '演讲嘉宾', index: 2 }, + guestInvitation: { name: '特邀嘉宾', index: 3 }, + cooperative: { name: '合作伙伴', index: 4 }, + exhibitor: { name: '参展商', index: 5 }, +} diff --git a/assets/js/http/meetingApi.js b/assets/js/http/meetingApi.js index 3fd0330..683ce9d 100644 --- a/assets/js/http/meetingApi.js +++ b/assets/js/http/meetingApi.js @@ -10,7 +10,11 @@ const MeetingApi = { // 参会人信息 queryPersongInfoById:(params) => http.get(`${URL_CONFIG}meeting/payMeetingSituation/queryById`, params), // 国际研讨会编辑嘉宾信息 - editSignUpInfo:(params) => http.post(`${URL_CONFIG}meeting/payMeetingSituation/editGuestInfo`, params) + editSignUpInfo:(params) => http.post(`${URL_CONFIG}meeting/payMeetingSituation/editGuestInfo`, params), + // 删除会议报名信息 + deleteSignUpInfo:(params) => http.get(`${URL_CONFIG}meeting/payMeetingSituation/contactsDelete`, params), + // 编辑会议报名信息 + editContactsInfo:(params) => http.post(`${URL_CONFIG}meeting/payMeetingSituation/contactsEdit`, params) } export default MeetingApi diff --git a/assets/js/http/userApi.js b/assets/js/http/userApi.js index ff7ef01..4ffa26d 100644 --- a/assets/js/http/userApi.js +++ b/assets/js/http/userApi.js @@ -82,7 +82,9 @@ const UserApi = { // 手机号唯一校验 checkPhoneOnly: (params) => http.get(`${URL_CONFIG}/sys/duplicate/check`, params), // 企业端的会议文件的下载 - downFileDownWeb: (fileId,meetingId, params) => http.get(`${URL_CONFIG}meeting/payMeeting/userDownload/${fileId}/${meetingId}`,params) + downFileDownWeb: (fileId,meetingId, params) => http.get(`${URL_CONFIG}meeting/payMeeting/userDownload/${fileId}/${meetingId}`,params), + // 企业人员查询参与项目的邮寄信息 + getVoiceMailList: (fileId,meetingId, params) => http.get(`${URL_CONFIG}mail/payMailBill/contactsSearch`,params) } export default UserApi diff --git a/behavior/confirmInvoiceModal.js b/behavior/confirmInvoiceModal.js index 09f763b..424e871 100644 --- a/behavior/confirmInvoiceModal.js +++ b/behavior/confirmInvoiceModal.js @@ -22,6 +22,7 @@ module.exports = Behavior({ data: { // page-container 相关的配置 statusBarHeight: wx.getSystemInfoSync()['statusBarHeight'], + pageTitle: '会议报名', invoiceConfirmModalVisible: false, duration: 300, position: 'bottom', @@ -118,6 +119,10 @@ module.exports = Behavior({ }); } }) - } + }, + // 自定义头部的参数 + goBack(){ + wx.navigateBack() + }, } }) diff --git a/components/imageUpload/imageUpload.js b/components/imageUpload/imageUpload.js index b71eb25..1c1dd72 100644 --- a/components/imageUpload/imageUpload.js +++ b/components/imageUpload/imageUpload.js @@ -1,6 +1,9 @@ // components/imageUpload/imageUpload.js -import {baseUrl, URL_CONFIG} from '../../assets/js/project.config' +import { + baseUrl, + URL_CONFIG +} from '../../assets/js/project.config' Component({ /** * 组件的属性列表 @@ -17,11 +20,27 @@ Component({ value: 1 }, // 图片的回显 - initImgsList:{ - type:String + initImgsList: { + type: String + } + }, + observers: { + 'initImgsList': function (initImgsList) { + let initImgArr + if (!!this.data.initImgsList) { + initImgArr = this.data.initImgsList.split(',') + } + const arr = [] + if (initImgArr && initImgArr.length > 0) { + for (let index = 0; index < initImgArr.length; index++) { + arr.push(baseUrl + URL_CONFIG + 'sys/common/download/' + initImgArr[index]) + } + } + this.setData({ + tempFilePaths: arr + }) } }, - /** * 组件的初始数据 */ @@ -30,20 +49,19 @@ Component({ tempFilePaths: [] }, lifetimes: { - attached: function() { - console.log(' this.data.initImgsList', this.data.initImgsList); + attached: function () { let initImgArr - if(!!this.data.initImgsList){ + if (!!this.data.initImgsList) { initImgArr = this.data.initImgsList.split(',') } const arr = [] - if(initImgArr && initImgArr.length > 0){ + if (initImgArr && initImgArr.length > 0) { for (let index = 0; index < initImgArr.length; index++) { - arr.push( baseUrl + URL_CONFIG + 'sys/common/download/' + initImgArr[index]) - } + arr.push(baseUrl + URL_CONFIG + 'sys/common/download/' + initImgArr[index]) + } } this.setData({ - tempFilePaths:arr + tempFilePaths: arr }) console.log(this.data.tempFilePaths); }, @@ -129,7 +147,7 @@ Component({ //如果是最后一张,则隐藏等待中 if (count == tempFilePaths.length) { wx.hideToast(); - that.triggerEvent("getIds",imgids) + that.triggerEvent("getIds", imgids) } }, diff --git a/pages/home/home.js b/pages/home/home.js index c32a256..426c5ca 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -206,6 +206,8 @@ Page({ url = '../standardRouter/standardRouter' } else if (this.data.selectArr[index].val === '5') { // 合同 url = '../mineContract/mineContract' + } else if (this.data.selectArr[index].val === '7') { // 发票 + url = '../invoice/invoice' } isLogin( () => { wx.navigateTo({ @@ -394,6 +396,11 @@ Page({ text: '合同', val: '5', }, + { + path: '../../assets/images/invoice.png', + text: '发票', + val: '7', + } ] let menuArr = [{ @@ -427,6 +434,11 @@ Page({ text: '合同', val: '5', }, + { + path: '../../assets/images/invoice.png', + text: '发票', + val: '7', + } ] let searchParams = { pageNo: 1, diff --git a/pages/invoice/invoice.js b/pages/invoice/invoice.js new file mode 100644 index 0000000..4e3adc7 --- /dev/null +++ b/pages/invoice/invoice.js @@ -0,0 +1,125 @@ +import UserApi from '../../assets/js/http/userApi' +import { appName } from '../../assets/js/project.config' +Page({ + + /** + * 页面的初始数据 + */ + data: { + statusBarHeight: wx.getSystemInfoSync()['statusBarHeight'], + index: 0, + list: [], // 项目列表 + searchParams: { + pageNo: 1, + pageSize: 10, + needInvoice: '', // 是否需要发票 0 4 + pack: '', // 是否打包 0 1 + year: '', // 运行年份 + particularYear:'',// 资料网元的运行年份, + // 创建时间倒叙排序 + column:'createTime', + order:'desc' + }, + pageTitle:'发票' + }, + goBack(){ + wx.navigateBack() + }, + // 发票改变 + bindNeedInvoiceChange(e){ + this.data.searchParams.pageNo = 1 + if(e.detail.value == 0) { + this.setData({ + "searchParams.needInvoice": 1, + }) + }else{ + this.setData({ + "searchParams.needInvoice": 0, + }) + } + this.loadData() + }, + // 打包改变 + bindPackChange(e){ + this.data.searchParams.pageNo = 1 + if(e.detail.value == 0) { + this.setData({ + "searchParams.pack": 1, + }) + }else{ + this.setData({ + "searchParams.pack": 0, + }) + } + this.loadData() + }, + bindDateChange(e){ + this.data.searchParams.pageNo = 1 + // 资料网员的年份查询字段与其他的不一样 + if(this.data.type === 'ziliao'){ + this.setData({ + "searchParams.particularYear": e.detail.value + }) + }else{ + this.setData({ + "searchParams.year": e.detail.value + }) + } + this.loadData() + }, + // 项目详情 + projectDetail(e){ + let project = e.currentTarget.dataset.project + let num = project.postNo + // num = 'SF1632615984954' + wx.navigateTo({ + url: `plugin://kdPlugin/index?num=${num}&appName=${appName}`, + }) + // wx.navigateTo({ + // url: `../projectDetail/projectDetail?id=${e.currentTarget.dataset.project.id}&type=${this.data.type}&workingGroupId=${e.currentTarget.dataset.project.workingGroupId}`, + // }) + }, + loadData(){ + const that = this + wx.showToast({ + title: '加载中...', + icon: 'loading' + }) + + UserApi.getVoiceMailList(this.data.searchParams).then(res=>{ + if(res.success){ + // 搜索时,把原数据清空,重新筛选 + if(that.data.searchParams.pageNo === 1) { + that.setData({ + list: [] + }) + } + if(res.result.records && res.result.records.length){ + that.setData({ + list: [...that.data.list, ...res.result.records] + }) + } + } + }).catch(err=>{ + wx.showToast({ + title: '加载失败', + icon: 'none', + duration: 2000 + }) + }) + + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.loadData() + }, + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + this.data.searchParams.pageNo++ + this.loadData() + }, +}) diff --git a/pages/invoice/invoice.json b/pages/invoice/invoice.json new file mode 100644 index 0000000..ced5b27 --- /dev/null +++ b/pages/invoice/invoice.json @@ -0,0 +1,4 @@ +{ + "navigationStyle": "custom", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/invoice/invoice.wxml b/pages/invoice/invoice.wxml new file mode 100644 index 0000000..ca4b19a --- /dev/null +++ b/pages/invoice/invoice.wxml @@ -0,0 +1,57 @@ + + + + {{pageTitle}} + + + + + + + + + + + + + + + + + + + + + 项目名称:{{item.projectName }} + + 开票金额:{{item.invoiceAmount }} 元 + 项目负责人:{{item.principalName}} + 邮寄联系人:{{item.contactName}} + 状态:{{item.postStatus_dictText}} + + + + + + 暂无数据 + + + diff --git a/pages/invoice/invoice.wxss b/pages/invoice/invoice.wxss new file mode 100644 index 0000000..62e3d25 --- /dev/null +++ b/pages/invoice/invoice.wxss @@ -0,0 +1,103 @@ +/* pages/meeting/meeting.wxss */ +page { + background-color: #F5F5F5; +} +/* 头部筛选 start */ +.select-list { + border-top: 0.5px solid #F5F5F5; + height: 40px; + font-size: 14px; + display: flex; + align-items: center; + background-color: #fff; +} + +.select-item { + flex: 1; + display: flex; + align-items: center; + justify-content: center; +} + +.select-item image { + width: 11px; + height: 6px; + margin-left: 9px; +} +/* 头部筛选end */ +/* 列表start */ +.list{ + padding: 15px; +} +.list-item{ + height: auto; + background-color: #fff; + border-radius: 5px; + padding: 10px 15px; + display: flex; + justify-content: space-around; + align-items: center; + flex-direction: column; +} +.list-item:not(:first-child) { + margin-top: 10px; +} +.list-item .title{ + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; +} +.list-item .title text:nth-child(1){ + font-size: 14px; + color: #333; + flex: 1; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.list-item .title text:nth-child(2){ + font-size: 12px; + color: #999; + width: 70px; + text-align: right; + flex-shrink: 0; +} +.item-content { + width: 100%; + padding: 10rpx 0; + box-sizing: border-box; + font-size: 14px; + height: auto; + display: flex; +} +.item-content text{ + flex-shrink: 0; +} +.content-text{ + width: 100%; + color: #999; + font-size: 12px; + display: flex; + justify-content: space-between; + align-items: center; +} + +/* 字体颜色 */ +.color-gray { + color:#999 +} + +.color-green { + color:#069F99 +} + +.color-orange { + color: orange; +} +.half{ + color: burlywood; +} +.all{ + color: #069F99; +} diff --git a/pages/meeting/meeting.js b/pages/meeting/meeting.js index 9e2a0a2..41b33f3 100644 --- a/pages/meeting/meeting.js +++ b/pages/meeting/meeting.js @@ -36,7 +36,7 @@ Page({ {name:'培训会',value:'8'}, {name:'宣贯会',value:'9'} ], - + // 会议列表数据 meetingList: [], // 下拉框送搜索数据 @@ -155,9 +155,8 @@ Page({ // 会议类型筛选 bindTypeChange(e) { let index = this.data.meetingTypeList[e.detail.value].value - console.log(index); this.data.searchParams.pageNo = 1 - // 宣贯会 培训会 信息交流会 需要单独写查询条件 + // 宣贯会 培训会 信息交流会 需要单独写查询条件 if(index === '7'){ // 信息交流会 this.setData({ @@ -182,7 +181,7 @@ Page({ 'searchParams.meetingType': index }) } - + this.queryMeetingList() }, bindDateChange(e) { @@ -190,7 +189,7 @@ Page({ // ' ' + '00:00:00' + ' ' + '23:59:59' this.setData({ 'searchParams.meetingStartTime': e.detail.value , - 'searchParams.meetingEndTime': e.detail.value + 'searchParams.meetingEndTime': e.detail.value }) this.queryMeetingList() }, @@ -200,13 +199,12 @@ Page({ wx.navigateTo({ url: `../meetingDetailSigned/meetingDetailSigned?meetingInfo=${meetingInfo}`, // (已报名) }) - - // let meetingItem = e.currentTarget.dataset.meetinginfo + // let meetingItem = e.currentTarget.dataset.meetinginfo // 如果是去报名页面需要在缓存中存储会议信息 当报名结束后 需要清除缓存中的当前会议信息 meetingSignUpType 1 可报名 2报名 // if (meetingItem.meetingSignUpType === 1) { - // // 从消息报名的参会单位不可更改 + // // 从消息报名的参会单位不可更改 // wx.setStorage({ // key:'companyDisabled', // data:true @@ -227,7 +225,7 @@ Page({ // } // } // }) - // } + // } }, // 获取会议列表数据 @@ -246,7 +244,7 @@ Page({ }) } if (res.result.records && res.result.records.length) { - + if(this.data.meetingList.length > 0){ this.data.meetingList.forEach(tt => { tt.meetingTypeText = this.initMeetingType(tt) @@ -254,7 +252,6 @@ Page({ } res.result.records.forEach(tt => { tt.meetingTypeText = this.initMeetingType(tt) - console.log(tt); }) this.setData({ meetingList: [...this.data.meetingList, ...res.result.records] @@ -269,12 +266,60 @@ Page({ }) }) }, + // 删除会议报名的信息 + deleteMeetingInfo(e) { + let meetingInfo = e.currentTarget.dataset.meetinginfo + const params = {id: meetingInfo.situationId} + let that = this + wx.showModal({ + title: '提示', + content: '确定删除此报名信息吗?', + success: function (res) { + if (res.confirm) { + MeetingApi.deleteSignUpInfo(params).then(res => { + wx.showToast({ + title: res.message, + icon: "none", + duration: 800, + }); + if (res.success) { + that.data.searchParams.pageNo = 1 + that.queryMeetingList() + } + }) + } else if (res.cancel) { + return false; + } + } + }) + }, + // 编辑会议报名的信息 + editMeetingInfo(e) { + let meetingInfo = e.currentTarget.dataset.meetinginfo + const params = { + id: meetingInfo.situationId, // 报名信息的id + meetingId: meetingInfo.id, + meetingType: meetingInfo.meetingType, + } + console.log("---------params------", params) + // 国际研讨会去国际研讨会的报名 + if(params.meetingType !== 3){ + wx.navigateTo({ + url: `../signUpPage/signUpPage?meetingId=${params.meetingId}&id=${params.id}&ope=edit&page=meeting&options=${JSON.stringify(this.options)}`, + }) + }else{ + wx.navigateTo({ + url: `../signUpPageGuoji/signUpPageGuoji?meetingId=${params.meetingId}&id=${params.id}&ope=edit&page=meeting&options=${JSON.stringify(this.options)}`, + }) + } + }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { console.log(options); + this.options = options if (!!options.workingGroupId) { // 工作组的更多跳转 this.setData({ diff --git a/pages/meeting/meeting.wxml b/pages/meeting/meeting.wxml index ef29770..21e7cbf 100644 --- a/pages/meeting/meeting.wxml +++ b/pages/meeting/meeting.wxml @@ -8,27 +8,27 @@ - - - 状态 - - - - - - - - 会议类型 - - - - - - - 时间 - - - + + + 状态 + + + + + + + + 会议类型 + + + + + + + 时间 + + + @@ -38,7 +38,7 @@ - {{ item.meetingTypeText }} + {{ item.meetingTypeText }} @@ -48,12 +48,23 @@ 报名状态:{{ item.signUpStatus_dictText || '无'}} + + + + 编辑 + + + + 删除 + + + - 暂无数据 - + 暂无数据 + - + \ No newline at end of file diff --git a/pages/meeting/meeting.wxss b/pages/meeting/meeting.wxss index fb5b993..313d8b3 100644 --- a/pages/meeting/meeting.wxss +++ b/pages/meeting/meeting.wxss @@ -2,6 +2,7 @@ page { background-color: #F5F5F5; } + /* 头部筛选 start */ .select-list { border-top: 0.5px solid #F5F5F5; @@ -24,13 +25,15 @@ page { height: 6px; margin-left: 9px; } + /* 头部筛选end */ /* 列表start */ -.list{ +.list { padding: 15px; } -.list-item{ - height: 90px; + +.list-item { + min-height: 90px; background-color: #fff; border-radius: 5px; padding: 10px 15px; @@ -39,16 +42,20 @@ page { align-items: center; flex-direction: column; } + .list-item:not(:first-child) { margin-top: 10px; } -.list-item .title{ + +.list-item .title { width: 100%; display: flex; justify-content: space-between; align-items: center; + min-height: 50rpx; } -.list-item .title text:nth-child(1){ + +.list-item .title text:nth-child(1) { font-size: 14px; color: #333; flex: 1; @@ -56,20 +63,55 @@ page { text-overflow: ellipsis; white-space: nowrap; } -.list-item .title text:nth-child(2){ + +.list-item .title text:nth-child(2) { font-size: 12px; color: #999; width: 120px; text-align: right; flex-shrink: 0; } -.content-text{ + +.content-text { + min-height: 36rpx; width: 100%; color: #999; font-size: 12px; } -.content-text image{ + +.content-text image { width: 11px; height: 11px; margin-right: 10px; +} + +/* 列表页的操作按钮 */ +.content-btn { + margin-top: 10rpx; + padding-top: 10px; + border-top: 2rpx solid #f5f5f5; + border-top: 2rpx solid #f5f5f5; + display: flex; + align-items: center; + justify-content: flex-end; + flex-direction: row; + width: 100%; +} + +.content-btn .inner-btn-box { + display: flex; + align-items: center; + margin-left: 50rpx; +} + +.content-btn .inner-btn-box image { + width: 23rpx; + height: 24rpx; + margin-right: 8rpx; +} + +.content-btn .inner-btn-box text { + font-size: 24rpx; + font-weight: 300; + color: #069F99; } \ No newline at end of file diff --git a/pages/signUpEntrance/signUpEntrance.js b/pages/signUpEntrance/signUpEntrance.js index 9f6b469..eebd04d 100644 --- a/pages/signUpEntrance/signUpEntrance.js +++ b/pages/signUpEntrance/signUpEntrance.js @@ -165,7 +165,9 @@ Page({ }) let url = decodeURIComponent(options.q) let meetingId = url.split('=')[1] - // meetingId = '1571763536197734402' + // todo 开发直接测试 + // meetingId = '1681696011549757442' // 其他会议 + meetingId = '1681693843581128706' // 国际研讨会 this.queryMeetingDetail(meetingId) // this.queryMeetingDetail("1479397531946348545") diff --git a/pages/signUpPage/signUpPage.js b/pages/signUpPage/signUpPage.js index 7083e79..25c97d6 100644 --- a/pages/signUpPage/signUpPage.js +++ b/pages/signUpPage/signUpPage.js @@ -9,12 +9,9 @@ import { compareDate, dutyCode } from '../../utils/validate' - -const InvoiceTypeEnums = { - noNeed: { name: '不需要', index: 0 }, - plain: { name: '增值税普通发票', index: 1 }, - special: { name: '增值税专用发票', index: 2 } -} +import { + InvoiceTypeEnums +} from '../../assets/js/Enums/common.js' Page({ behaviors: [confirmInvoiceModalBehavior], @@ -118,7 +115,9 @@ Page({ // 扫码报名的 需要调用无限制接口 nolimitBool: false, // 会议费用 - meetingCost: '' + meetingCost: '', + // 备注信息 + remark: '', }, // 是否需要发票的选择 needInvoiceChange(e) { @@ -193,7 +192,6 @@ Page({ this.setData({ selectedIdentity: e.detail.value }) - console.log(e.detail.value); // 参会身份选择嘉宾和内部企业 会议费用为 0 if (e.detail.value === '2') { // 标协会议需要判断选中的企业是否是标协成员 @@ -375,7 +373,7 @@ Page({ return } } - if (!formData.invoiceProject || formData.invoiceProject === -1) { + if (formData.invoiceProject === undefined || formData.invoiceProject === -1) { wx.showToast({ title: '请选择发票项目', icon: 'none', @@ -431,11 +429,22 @@ Page({ title: '加载中', mask: true }) - signUpApi.signUpMeeting(formData).then(res => { + let func + let lastPage // 上一个调换的页面,用于记录编辑成功后返回哪个页面 + const isEdit = this.isEdit + if(isEdit) { + func = MeetingApi.editContactsInfo + formData.id = this.model.id // 编辑参会人的信息 + lastPage = this.lastPage + } else { + func = signUpApi.signUpMeeting + } + func(formData).then(res => { if (res.success) { wx.hideLoading({}) + let message = isEdit ? '编辑成功' : '报名成功' wx.showToast({ - title: '报名成功', + title: message, icon: 'loading', duration: 1500 }) @@ -449,15 +458,22 @@ Page({ wx.removeStorage({ key: 'currentMeetingInfo', success() { - // 跳转报名成功页面 - - if (!res.result) { - wx.navigateTo({ - url: `../signUpSuccess/signUpSuccess?audit=${res.result}`, - }) + // 非编辑页面跳转到下一页 + if(!isEdit) { + // 跳转报名成功页面 + if (!res.result) { + wx.navigateTo({ + url: `../signUpSuccess/signUpSuccess?audit=${res.result}`, + }) + } else { + wx.navigateTo({ + url: `../signUpSuccess/signUpSuccess`, + }) + } } else { + // 编辑页面跳转到会议列表页 wx.navigateTo({ - url: `../signUpSuccess/signUpSuccess`, + url: lastPage, }) } } @@ -504,7 +520,6 @@ Page({ if (flag) { return } - console.log('选择参会单位', this.data.nolimitBool); if (this.data.nolimitBool) { wx.navigateTo({ url: `../companyList/companyList?nolimit=nolimt`, @@ -532,7 +547,6 @@ Page({ }, // 信用代码验证 validateDutyCode(e) { - console.log(e, 1111) let value = e.detail.value let { message, @@ -565,7 +579,6 @@ Page({ }, // 发票项目变化的时候触发的方法 invoiceProjectChange(e) { - console.log("------e--------", e) this.setData({ invoiceProjectIndex: e.detail.value }) @@ -575,12 +588,15 @@ Page({ MeetingApi.meetingDetail({ id: id }).then(res => { - console.log(res); if (res.success) { this.setData({ selectedMeeting: res.result, meetingCost: res.result.meetingCosts }) + // 编辑的时候判断是否是标协会员,费用是否需要修改 + if(this.isEdit) { + this.judgeMemberCompany(this, res.result) + } // 存储会议信息 wx.setStorage({ key: 'currentMeetingInfo', @@ -595,10 +611,80 @@ Page({ }) }) }, + /* + * 编辑 + * */ + edit(record){ + this.model = Object.assign({}, record) + // 选中的身份 + const selectedIdentity = this.model.identity + '' + // 参会身份选中状态的处理 + this.data.identifyList.map(tt => { + if (tt.value === selectedIdentity) { + tt.checked = true + } + }) + // 是否选择发票的选中的索引 默认需要 + const index = this.data.needInvoiceList.findIndex(e => e.value === (this.model.needInvoice + '')) + '' + // 缴费方式 + const paymentMethod = this.model.payMode + // 缴费方式选中状态的处理 + this.data.paymentMethodList.map(tt => { + if (tt.value === paymentMethod + '') { + tt.checked = true + } + }) + // 选中的参会单位 + const selectedCompany = { + id:this.model.companyId, + companyName:this.model.companyName, + // 写入发票的信息,因为需要回显 + dutyCode:this.model.dutyCode, // 信用代码 + companyAddress:this.model.companyAddress, // 公司地址 + companyPhone:this.model.companyPhone, // 公司电话 + openingBank:this.model.openingBank, // 开户行 + bankAccount:this.model.bankAccount, // 银行账号 + linkBankNumber:this.model.linkBankNumber // 联行号 + } + const selectedPerson = { + id:this.model.companyContactTemporaryId, + name:this.model.companyContactName + } + // 发票项目选择的索引 + const invoiceProjectIndex = this.data.invoiceProjectList.findIndex(e => e.value === (this.model.invoiceProject + '')) + // 回显邮寄联系人 + const selectedPostPerson = { + id: this.model.postContactId, + name: this.model.postContactName, + contactAddress: this.model.postContactAddress, // 邮寄地址 + postalCode: this.model.postCode, // 邮编 + } + + this.setData({ + selectedCompany, + selectedPerson, + phone: this.model.phone, + selectedIdentity, // 参会身份 + identifyList: this.data.identifyList, // 参会身份选中 + paymentMethod, // 缴费方式 + paymentMethodList: this.data.paymentMethodList, // 缴费方式信息选中 + index, // 是否需要发票 + invoiceProjectIndex, // 发票项目 + selectedPostPerson, // 邮寄联系人信息 + remark: this.model.remark // 备注 + }) + }, /** * 生命周期函数--监听页面加载 */ - onLoad: function (options) { + onLoad: async function (options) { + // options = { + // id: "1682018325751480322", + // meetingId: "1680850121742204930", + // meetingType: 1, + // page: 'meeting', + // ope: 'edit' + // } if (options.type) { this.setData({ indexMsg: options.type, @@ -609,10 +695,33 @@ Page({ nolimitBool: true }) } + this.setData({ + pageTitle: options.id ? '编辑报名信息' : '会议报名' + }) + if(options.id){ + this.isEdit = options.ope === 'edit' + this.lastPage = `../${options.page}/${options.page}` + // 对上一个页面的参数进行处理 + this.lastOptions = options.options && JSON.parse(options.options) || {} + let str = '' + Object.keys(this.lastOptions).forEach((tt, i) => { + if( i > 0) { + str += `&${tt}=${this.lastOptions[tt]}` + } else { + str += `?${tt}=${this.lastOptions[tt]}` + } + }) + this.lastPage += str + // 通过id获取参会人信息 + MeetingApi.queryPersongInfoById({id: options.id}).then(res => { + if(res.success){ + this.edit(res.result) + } + }) + } // this.queryMeetingInfo('1455359606691979265') if (options.meetingId) { - console.log(options.meetingId, 'options.meetingId'); - this.queryMeetingInfo(options.meetingId) + await this.queryMeetingInfo(options.meetingId) this.setData({ meetingId: options.meetingId }) @@ -634,7 +743,6 @@ Page({ wx.getStorage({ key: 'userInfo', success(res) { - console.log(res); that.setData({ 'selectedCompany.companyName': res.data.companyName, 'selectedPerson.name': res.data.name, @@ -653,7 +761,6 @@ Page({ }, // 手机号验证 validatePhone(e) { - console.log(e); let value = e.detail.value let { message, @@ -720,7 +827,37 @@ Page({ } }, - + /** + * 判断是否是标协会员的单位 进行费用的重置 + * @param that--原方法里面就是this实例 + * @param meetingObj -- 原方法是获取的currentMeetingInfo信息 + */ + judgeMemberCompany(that, meetingObj) { + // 标协会议需要判断单位是否是会员单位 + if (that.data.selectedCompany.companyName && meetingObj.meetingType + '' === '2') { + signUpApi.validateStandard({ + companyName: that.data.selectedCompany.companyName + }).then(result => { + if (result.result) { + that.setData({ + meetingCost: meetingObj.meetingCostsVip + }) + } else { + that.setData({ + meetingCost: meetingObj.meetingCosts + }) + } + }).finally(() => { + if (that.data.selectedIdentity) { + that.changeIdentity({ + detail: { + value: that.data.selectedIdentity + } + }) + } + }) + } + }, /** * 生命周期函数--监听页面初次渲染完成 @@ -742,7 +879,6 @@ Page({ wx.getStorage({ key: 'userInfo', success(res) { - console.log(res); that.setData({ 'selectedCompany.companyName': res.data.companyName, 'selectedPerson.name': res.data.name, @@ -791,30 +927,7 @@ Page({ that.setData({ selectedMeeting: res.data }) - // 标协会议需要判断单位是否是会员单位 - if (that.data.selectedCompany.companyName && res.data.meetingType + '' === '2') { - signUpApi.validateStandard({ - companyName: that.data.selectedCompany.companyName - }).then(result => { - if (result.result) { - that.setData({ - meetingCost: res.data.meetingCostsVip - }) - } else { - that.setData({ - meetingCost: res.data.meetingCosts - }) - } - }).finally(() => { - if (that.data.selectedIdentity) { - that.changeIdentity({ - detail: { - value: that.data.selectedIdentity - } - }) - } - }) - } + that.judgeMemberCompany(that, res.data) } }) diff --git a/pages/signUpPage/signUpPage.json b/pages/signUpPage/signUpPage.json index 7b5888c..2afe5c6 100644 --- a/pages/signUpPage/signUpPage.json +++ b/pages/signUpPage/signUpPage.json @@ -1,4 +1,5 @@ { "navigationBarTitleText": "会议报名", + "navigationStyle": "custom", "usingComponents": {} -} \ No newline at end of file +} diff --git a/pages/signUpPage/signUpPage.wxml b/pages/signUpPage/signUpPage.wxml index 5198a00..8042096 100644 --- a/pages/signUpPage/signUpPage.wxml +++ b/pages/signUpPage/signUpPage.wxml @@ -1,4 +1,12 @@ + + + + {{pageTitle}} + + + +
@@ -25,7 +33,7 @@ @@ -39,7 +47,7 @@ @@ -112,42 +120,42 @@ 邮编: - - + + - + - + 备注: -