diff --git a/assets/js/http/signUp.js b/assets/js/http/signUp.js
index 9c2be2a..707e0fa 100644
--- a/assets/js/http/signUp.js
+++ b/assets/js/http/signUp.js
@@ -23,11 +23,15 @@ const signUpApi = {
uploadPayRecord: (params) => http.post(`${URL_CONFIG}meeting/payMeetingSituation/editTerminal`, params),
// 通过单位名称校验是否标协会员
validateStandard: (params) => http.get(`${URL_CONFIG}meeting/internalMeetingSituation/checkMember`, params),
- // 判断当前企业是否是内部企业
+ // 判断当前企业是否是内部企业
judgeInternalEnterprise: (params) => http.get(`${URL_CONFIG}company/payCompanyManagement/getInternalEnterprise`, params),
// 国际研讨会-判断当前的邀请码是否可用
judgeMeetingCode: (params) => http.get(`${URL_CONFIG}meeting/payMeetingSituation/validInvitationCode`, params),
+ // 报名的时候修改企业的信息
+ updateInvoiceBySignUp: (params) => http.post(`${URL_CONFIG}company/payCompanyManagement/updateInvoice`, params),
+
+
}
-export default signUpApi
\ No newline at end of file
+export default signUpApi
diff --git a/behavior/confirmInvoiceModal.js b/behavior/confirmInvoiceModal.js
new file mode 100644
index 0000000..09f763b
--- /dev/null
+++ b/behavior/confirmInvoiceModal.js
@@ -0,0 +1,123 @@
+// 发票信息模态框等相关操作的集合
+// 需要发票的类型
+export const InvoiceTypeEnums = {
+ noNeed: { name: '不需要', index: 0 },
+ plain: { name: '增值税普通发票', index: 1 },
+ special: { name: '增值税专用发票', index: 2 }
+}
+const commonArr = [
+ {name: '企业名称', key: 'companyName'},
+ {name: '信用代码', key: 'dutyCode'}
+]
+const specialArr = [
+ {name: '公司地址', key: 'companyAddress'},
+ {name: '公司电话', key: 'companyPhone'},
+ {name: '开户行', key: 'openingBank'},
+ {name: '银行账号', key: 'bankAccount'},
+ {name: '联行号', key: 'linkBankNumber'}
+]
+import signUpApi from '../assets/js/http/signUp'
+
+module.exports = Behavior({
+ data: {
+ // page-container 相关的配置
+ statusBarHeight: wx.getSystemInfoSync()['statusBarHeight'],
+ invoiceConfirmModalVisible: false,
+ duration: 300,
+ position: 'bottom',
+ round: false,
+ overlay: true,
+ customStyle: 'height: 60%;',
+ overlayStyle: '',
+ // 验证的相关信息
+ confirmArr: [],
+ confirmObj: {}
+
+ },
+ methods: {
+ showConfirmModal(obj, callback) {
+ console.log("----showConfirmModal-----")
+ this.data.confirmObj = {...obj}
+ let needInvoice = Number(obj.needInvoice)
+ let confirmArr = [...commonArr]
+ if (needInvoice === InvoiceTypeEnums.special.index) {
+ confirmArr = confirmArr.concat(specialArr)
+ }
+ // 将回调函数存储
+ this.confirmModalCallback = callback
+ this.setData({
+ invoiceConfirmModalVisible: true,
+ confirmObj: this.data.confirmObj,
+ confirmArr
+ })
+ },
+ /**
+ * 判断发票信息是否发生改变
+ * @param confirmObj ---form表单中的数据
+ * @param selectedCompany ---单位的初始化信息
+ * @returns {boolean} --返回是否发生改变
+ */
+ judgeInvoiceChange(confirmObj, selectedCompany) {
+ // 如果需要发票,判断当前的发票信息是否进行了修改,用于最后提交的时候判断是否请求接口,减少冗余的请求
+ let needInvoice = Number(confirmObj.needInvoice)
+ if(!needInvoice) {
+ return false
+ }
+ if (needInvoice) {
+ let changeInvoiceFlag = this.data.confirmArr.some(tt => {
+ if(selectedCompany[tt.key] !== confirmObj[tt.key]) {
+ return true
+ }
+ })
+ return changeInvoiceFlag
+ }
+ },
+ confirmModalCancel() {
+ this.setData({
+ invoiceConfirmModalVisible: false
+ })
+ },
+ confirmModalSureFunc() {
+ const formData = this.data.confirmObj
+ // 首先先判断发票信息有没有变化
+ let changeInvoiceFlag = this.judgeInvoiceChange(formData, this.data.selectedCompany)
+ if(!changeInvoiceFlag) {
+ this.setData({
+ invoiceConfirmModalVisible: false
+ })
+ this.confirmModalCallback && this.confirmModalCallback()
+ return
+ }
+
+ // 变化的时候请求接口
+ // 请求接口同步数据
+ const params = {
+ id: formData.companyId, // 企业id
+ needInvoice: formData.needInvoice,
+ companyName: formData.companyName,
+ dutyCode: formData.dutyCode
+ }
+ if (Number(formData.needInvoice) === InvoiceTypeEnums.special.index) {
+ params.companyAddress = formData.companyAddress
+ params.companyPhone = formData.companyPhone
+ params.openingBank = formData.openingBank
+ params.bankAccount = formData.bankAccount
+ params.linkBankNumber = formData.linkBankNumber
+ }
+ signUpApi.updateInvoiceBySignUp(params).then(res => {
+ if (res.success) {
+ this.setData({
+ invoiceConfirmModalVisible: false
+ })
+ this.confirmModalCallback && this.confirmModalCallback()
+ } else {
+ wx.showToast({
+ title: res.message,
+ icon: "none",
+ duration: 800,
+ });
+ }
+ })
+ }
+ }
+})
diff --git a/pages/companyList/companyList.js b/pages/companyList/companyList.js
index 5c8c495..dde4c37 100644
--- a/pages/companyList/companyList.js
+++ b/pages/companyList/companyList.js
@@ -117,10 +117,11 @@ Page({
// wx.navigateTo({
// url: `../signUpPageGuoji/signUpPageGuoji?company=${selectedCompany}`,
// })
-
-
- // 将上一个报名页面的企业回显
+
+
+ // 将上一个报名页面的企业回显
prevPage.setData({
+ 'selectedCompany': e.currentTarget.dataset.company,
'selectedCompany.companyName':e.currentTarget.dataset.company.companyName,
'selectedCompany.id':e.currentTarget.dataset.company.id,
})
@@ -139,6 +140,7 @@ Page({
})
} else{
prevPage.setData({
+ 'selectedCompany': e.currentTarget.dataset.company,
'selectedCompany.companyName':e.currentTarget.dataset.company.companyName,
'selectedCompany.id':e.currentTarget.dataset.company.id,
})
@@ -168,7 +170,7 @@ Page({
}
})
})
-
+
},
/**
* 生命周期函数--监听页面加载
diff --git a/pages/signUpPage/signUpPage.js b/pages/signUpPage/signUpPage.js
index ff55b08..7083e79 100644
--- a/pages/signUpPage/signUpPage.js
+++ b/pages/signUpPage/signUpPage.js
@@ -1,12 +1,23 @@
// pages/signUpPage/signUpPage.js
import signUpApi from '../../assets/js/http/signUp'
import MeetingApi from '../../assets/js/http/meetingApi'
+// 引入对发票信息 校验的方法
+let confirmInvoiceModalBehavior = require('../../behavior/confirmInvoiceModal.js')
import {
phoneReg,
postcode,
- compareDate
+ compareDate,
+ dutyCode
} from '../../utils/validate'
+
+const InvoiceTypeEnums = {
+ noNeed: { name: '不需要', index: 0 },
+ plain: { name: '增值税普通发票', index: 1 },
+ special: { name: '增值税专用发票', index: 2 }
+}
+
Page({
+ behaviors: [confirmInvoiceModalBehavior],
/**
* 页面的初始数据
*/
@@ -15,17 +26,17 @@ Page({
identifyList: [{
value: '2',
name: '参会人',
- disabled:false
+ disabled: false
},
{
value: '1',
name: '嘉宾',
- disabled:false
+ disabled: false
},
{
value: '3',
name: '内部企业',
- disabled:true
+ disabled: true
},
],
// 缴费方式
@@ -57,6 +68,16 @@ Page({
name: '增值税专用发票'
},
],
+ // 发票项目
+ invoiceProjectList: [{
+ value: '1',
+ name: '会议费'
+ },
+ {
+ value: '2',
+ name: '培训费'
+ },
+ ],
// 是否住酒店
needCheckInHotel: [{
value: '1',
@@ -71,6 +92,8 @@ Page({
selectedIdentity: '2',
// 是否选择发票的选中的索引 默认需要
index: -1,
+ // 发票项目选择的索引
+ invoiceProjectIndex: -1,
paymentMethod: '1',
// 抵达时间
arrivalTime: '请选择抵达时间',
@@ -116,52 +139,50 @@ Page({
})
},
// 内部企业是否禁用 只有参会单位是内部企业才能选 否则禁用内部企业
- setIdentityDisabled(bool){
- const identifyLiseSelect = [
- {
+ setIdentityDisabled(bool) {
+ const identifyLiseSelect = [{
value: '2',
name: '参会人',
- disabled:false
+ disabled: false
},
{
value: '1',
name: '嘉宾',
- disabled:false
+ disabled: false
},
{
value: '3',
name: '内部企业',
- disabled:false
+ disabled: false
},
]
- const identifyLiseSelectDisabled = [
- {
+ const identifyLiseSelectDisabled = [{
value: '2',
name: '参会人',
- disabled:false
+ disabled: false
},
{
value: '1',
name: '嘉宾',
- disabled:false
+ disabled: false
},
{
value: '3',
name: '内部企业',
- disabled:true
+ disabled: true
},
]
- if(bool){
+ if (bool) {
// bool为真 说明是内部企业可以选择内部企业
this.setData({
- 'identifyList':identifyLiseSelect
+ 'identifyList': identifyLiseSelect
})
- }else{
+ } else {
// 否则不能选中
console.log('不是内部i企业')
this.setData({
- 'identifyList':identifyLiseSelectDisabled
+ 'identifyList': identifyLiseSelectDisabled
})
}
},
@@ -211,6 +232,7 @@ Page({
// 确定
formSubmit(e) {
const formData = Object.assign({}, e.detail.value)
+
// 会议id
if (this.data.selectedMeeting.id) {
formData.meetingId = this.data.selectedMeeting.id
@@ -240,7 +262,7 @@ Page({
return
}
- if(!formData.companyId ){
+ if (!formData.companyId) {
wx.showToast({
title: '请选择参会单位',
icon: 'none',
@@ -248,7 +270,7 @@ Page({
})
return
}
- if(!formData.companyContactId ){
+ if (!formData.companyContactId) {
wx.showToast({
title: '请选择参会人',
icon: 'none',
@@ -292,6 +314,77 @@ Page({
})
return
}
+ // 20230720 新增需要判断当需要发票时,所有的发票信息是否填写
+ if(Number(formData.needInvoice)){
+ if (!formData.dutyCode) {
+ wx.showToast({
+ title: '请输入信用代码',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ // 验证企业信用代码是否正确
+ if(!dutyCode(formData.dutyCode)) {
+ wx.showToast({
+ title: '请输入正确的信用代码',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ if(Number(formData.needInvoice) === InvoiceTypeEnums.special.index) {
+ if (!formData.companyAddress) {
+ wx.showToast({
+ title: '请输入公司地址',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ if (!formData.companyPhone) {
+ wx.showToast({
+ title: '请输入公司电话',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ if (!formData.openingBank) {
+ wx.showToast({
+ title: '请输入开户行',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ if (!formData.bankAccount) {
+ wx.showToast({
+ title: '请输入银行账号',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ if (!formData.linkBankNumber) {
+ wx.showToast({
+ title: '请输入联行号',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ }
+ if (!formData.invoiceProject || formData.invoiceProject === -1) {
+ wx.showToast({
+ title: '请选择发票项目',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ formData.invoiceProject = this.data.invoiceProjectList[formData.invoiceProject].value
+ }
// 邮寄联系人
if (this.data.selectedPostPerson.id && formData.postContactId === undefined) {
wx.showToast({
@@ -333,57 +426,67 @@ Page({
}
}
- wx.showLoading({
- title: '加载中',
- mask: true
- })
- signUpApi.signUpMeeting(formData).then(res => {
- if (res.success) {
- wx.hideLoading({
+ let callback = () => {
+ wx.showLoading({
+ title: '加载中',
+ mask: true
+ })
+ signUpApi.signUpMeeting(formData).then(res => {
+ if (res.success) {
+ wx.hideLoading({})
+ wx.showToast({
+ title: '报名成功',
+ icon: 'loading',
+ duration: 1500
+ })
+ // 成功 清除缓存 跳转报名成功页面
+ wx.removeStorage({
+ key: 'selectedCompany',
+ })
+ wx.removeStorage({
+ key: 'meetingId',
+ })
+ wx.removeStorage({
+ key: 'currentMeetingInfo',
+ success() {
+ // 跳转报名成功页面
- })
- wx.showToast({
- title: '报名成功',
- icon: 'loading',
- duration: 1500
- })
- // 成功 清除缓存 跳转报名成功页面
- wx.removeStorage({
- key: 'selectedCompany',
- })
- wx.removeStorage({
- key: 'meetingId',
- })
- wx.removeStorage({
- key: 'currentMeetingInfo',
- success() {
- // 跳转报名成功页面
-
- if (!res.result) {
- wx.navigateTo({
- url: `../signUpSuccess/signUpSuccess?audit=${res.result}`,
- })
- } else {
- wx.navigateTo({
- url: `../signUpSuccess/signUpSuccess`,
- })
+ if (!res.result) {
+ wx.navigateTo({
+ url: `../signUpSuccess/signUpSuccess?audit=${res.result}`,
+ })
+ } else {
+ wx.navigateTo({
+ url: `../signUpSuccess/signUpSuccess`,
+ })
+ }
}
- }
- })
- } else {
+ })
+ } else {
+ wx.showToast({
+ title: res.message,
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ }).catch(e => {
wx.showToast({
- title: res.message,
- icon: 'none',
+ title: '操作失败',
+ icon: 'error',
duration: 2000
})
- }
- }).catch(e => {
- wx.showToast({
- title: '操作失败',
- icon: 'error',
- duration: 2000
})
- })
+ }
+ // 如果不需要发票
+ if(!Number(formData.needInvoice)) {
+ callback && callback()
+ return
+ }
+
+ //显示 校验发票信息的弹框
+ this.showConfirmModal(formData, callback)
+
+
},
// 选择参会单位
selectCompany() {
@@ -427,6 +530,46 @@ Page({
});
}
},
+ // 信用代码验证
+ validateDutyCode(e) {
+ console.log(e, 1111)
+ let value = e.detail.value
+ let {
+ message,
+ errmsg
+ } = e.currentTarget.dataset
+ if (value === '' || value === undefined) {
+ wx.showToast({
+ title: message,
+ icon: 'none',
+ duration: 800
+ })
+ // this.setData({
+ // flag: true
+ // })
+ return
+ } else if (dutyCode(value)) {
+ // this.setData({
+ // flag: false
+ // })
+ } else {
+ wx.showToast({
+ title: errmsg,
+ icon: 'none',
+ duration: 800
+ })
+ // this.setData({
+ // flag: true
+ // })
+ }
+ },
+ // 发票项目变化的时候触发的方法
+ invoiceProjectChange(e) {
+ console.log("------e--------", e)
+ this.setData({
+ invoiceProjectIndex: e.detail.value
+ })
+ },
// 根据会议id查询会议信息
queryMeetingInfo(id) {
MeetingApi.meetingDetail({
@@ -487,6 +630,7 @@ Page({
// 默认填写个人信息
// 从缓存中拿个人信息
+ // TODO 好像拿不到企业的其他信息
wx.getStorage({
key: 'userInfo',
success(res) {
@@ -577,6 +721,7 @@ Page({
},
+
/**
* 生命周期函数--监听页面初次渲染完成
*/
@@ -661,8 +806,12 @@ Page({
})
}
}).finally(() => {
- if(that.data.selectedIdentity) {
- that.changeIdentity({detail: {value: that.data.selectedIdentity}})
+ if (that.data.selectedIdentity) {
+ that.changeIdentity({
+ detail: {
+ value: that.data.selectedIdentity
+ }
+ })
}
})
}
diff --git a/pages/signUpPage/signUpPage.wxml b/pages/signUpPage/signUpPage.wxml
index 5547aea..5198a00 100644
--- a/pages/signUpPage/signUpPage.wxml
+++ b/pages/signUpPage/signUpPage.wxml
@@ -2,23 +2,23 @@
+
-
- 邮寄联系人:
-
-
+
+ 邮寄联系人:
+
+
-
- 邮寄地址:
-
-
+
+ 邮寄地址:
+
+
-
- 邮编:
-
-
+
+ 邮编:
+
+
-
+
- 是否住酒店:
+ 是否住酒店:
-
+
-
- 抵达时间:
-
-
- {{arrivalTime}}
-
-
-
+
+ 抵达时间:
+
+
+ {{arrivalTime}}
+
+
+
-
- 离开时间:
-
-
- {{departureTime}}
-
-
-
+
+ 离开时间:
+
+
+ {{departureTime}}
+
+
+
-
- 费用合计:
-
- {{meetingCost}}元
-
-
-
-
+
+ 备注:
+
+
-
+
+ 费用合计:
+
+ {{meetingCost}}元
+
+
+
+
+
+
+
+
+
+
+
+
+ 请确认以下发票信息是否正确?
+ 点击确认后该企业后续相关信息将替换成新的内容
+
+ {{item.name}} :
+ {{confirmObj[item.key]}}
+
+
+
+
+
+
+
+
+
diff --git a/pages/signUpPage/signUpPage.wxss b/pages/signUpPage/signUpPage.wxss
index 399e234..b728a3e 100644
--- a/pages/signUpPage/signUpPage.wxss
+++ b/pages/signUpPage/signUpPage.wxss
@@ -1,5 +1,5 @@
/* 报名页面 */
-page{
+page {
background-color: #F5F5F5;
}
@@ -10,6 +10,7 @@ page{
border: 1px solid #eee;
border-radius: 10px;
}
+
.wrap {
padding: 10px;
box-sizing: border-box;
@@ -24,9 +25,11 @@ page{
padding: 10rpx 20rpx;
box-sizing: border-box;
}
+
.form-item input {
text-align: right;
}
+
.form-item-radio {
margin-top: 20px;
width: 100%;
@@ -35,12 +38,13 @@ page{
padding: 10rpx 20rpx;
box-sizing: border-box;
}
+
.radio-label {
margin-bottom: 20px;
}
.item-label {
- width:120px;
+ width: 120px;
}
.text-right {
@@ -52,8 +56,9 @@ page{
margin: 20rpx 0;
line-height: 80rpx;
}
+
.btn-ok {
- width: 100%!important;
+ width: 100% !important;
height: 80rpx;
border-radius: 4px;
background-color: #069F99;
@@ -64,10 +69,86 @@ page{
}
-.validate::before{
+.validate::before {
content: '*';
font-size: 18px;
color: red;
position: absolute;
left: 40rpx;
}
+
+/* 用作模块的view 目的是少些判断 */
+.form-item-template {
+ margin-top: 20px;
+}
+
+/* 弹框中的面板信息 */
+.detail-page {
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+}
+
+.detail-page>.flex-content {
+ padding: 20px 55.66rpx 0;
+ background-color: #F9F9FB;
+ flex: 1;
+ overflow: auto;
+}
+
+.detail-page .top-notice {
+ font-weight: bold;
+ text-align: center;
+ font-size: 16px;
+ white-space: pre-wrap;
+ margin-bottom: 5px;
+}
+
+.detail-page .item-view {
+ display: flex;
+ align-items: center;
+ height: 40px;
+ padding: 10rpx 20rpx;
+ box-sizing: border-box;
+}
+
+.detail-page .item-view .label-box {
+ flex-basis: 90px;
+}
+.detail-page .item-view .value-box {
+ flex: 1;
+}
+
+/* 下面的按钮 */
+.btn-view {
+ height: 163rpx;
+ display: flex;
+ align-items: center;
+ /* background-color: #F7F7F7; */
+ padding: 0 29.33rpx;
+}
+
+.btn-view button {
+ line-height: 100%;
+ font-size: 16px;
+ letter-spacing: 2px;
+}
+
+.btn-view button+button {
+ margin-left: 30rpx;
+ background-color: #069f99;
+ color: #fff;
+ border: 0.66rpx solid #F7F7F7;
+ padding: 31rpx 0;
+ flex: 1;
+ width: 0;
+}
+
+
+.btn-view button.cancel {
+ color: #EA434F;
+ background-color: #fff;
+ border: 0.66rpx solid #F7F7F7;
+ padding: 31rpx 0;
+ width: 196.66rpx;
+}
diff --git a/pages/signUpPageGuoji/signUpPageGuoji.js b/pages/signUpPageGuoji/signUpPageGuoji.js
index 9c1eb68..524d6d3 100644
--- a/pages/signUpPageGuoji/signUpPageGuoji.js
+++ b/pages/signUpPageGuoji/signUpPageGuoji.js
@@ -1,16 +1,25 @@
// pages/signUpPageGuoji/signUpPageGuoji.js
import MeetingApi from "../../assets/js/http/meetingApi"
import signUpApi from "../../assets/js/http/signUp"
+// 引入对发票信息 校验的方法
+let confirmInvoiceModalBehavior = require('../../behavior/confirmInvoiceModal.js')
import {
phoneReg,
postcode,
- compareDate
+ compareDate,
+ dutyCode
} from '../../utils/validate'
import {
baseUrl,
URL_CONFIG
} from '../../assets/js/project.config.js'
+const InvoiceTypeEnums = {
+ noNeed: { name: '不需要', index: 0 },
+ plain: { name: '增值税普通发票', index: 1 },
+ special: { name: '增值税专用发票', index: 2 }
+}
Page({
+ behaviors: [confirmInvoiceModalBehavior],
/**
* 页面的初始数据
@@ -54,6 +63,8 @@ Page({
departureTime: '请选择离开时间',
// 是否选择发票的选中的索引
index: -1,
+ // 发票项目选择的索引
+ invoiceProjectIndex: -1,
// 是否需要用餐
haveMeal: '',
// 是否住酒店
@@ -103,6 +114,16 @@ Page({
name: '增值税专用发票'
},
],
+ // 发票项目
+ invoiceProjectList: [{
+ value: '1',
+ name: '会议费'
+ },
+ {
+ value: '2',
+ name: '培训费'
+ },
+ ],
// 是否
need: [{
value: '1',
@@ -340,7 +361,7 @@ Page({
let requestParams = {
randomCode: this.data.inviteCode
}
- // 会议id获取形式有多种
+ // 会议id获取形式有多种
if (this.data.selectedMeeting.id) {
requestParams.meetingId = this.data.selectedMeeting.id
} else {
@@ -578,6 +599,46 @@ Page({
}
]
},
+ // 信用代码验证
+ validateDutyCode(e) {
+ console.log(e, 1111)
+ let value = e.detail.value
+ let {
+ message,
+ errmsg
+ } = e.currentTarget.dataset
+ if (value === '' || value === undefined) {
+ wx.showToast({
+ title: message,
+ icon: 'none',
+ duration: 800
+ })
+ // this.setData({
+ // flag: true
+ // })
+ return
+ } else if (dutyCode(value)) {
+ // this.setData({
+ // flag: false
+ // })
+ } else {
+ wx.showToast({
+ title: errmsg,
+ icon: 'none',
+ duration: 800
+ })
+ // this.setData({
+ // flag: true
+ // })
+ }
+ },
+ // 发票项目变化的时候触发的方法
+ invoiceProjectChange(e) {
+ console.log("------e--------", e)
+ this.setData({
+ invoiceProjectIndex: e.detail.value
+ })
+ },
// 内部企业是否禁用 只有参会单位是内部企业才能选 否则禁用内部企业
setIdentityDisabled(bool) {
this.setData({
@@ -692,6 +753,78 @@ Page({
})
return
}
+ // 需要发票的时候 校验发票的信息
+ // 20230720 新增需要判断当需要发票时,所有的发票信息是否填写
+ if(Number(formData.needInvoice)){
+ if (!formData.dutyCode) {
+ wx.showToast({
+ title: '请输入信用代码',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ // 验证企业信用代码是否正确
+ if(!dutyCode(formData.dutyCode)) {
+ wx.showToast({
+ title: '请输入正确的信用代码',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ if(Number(formData.needInvoice) === InvoiceTypeEnums.special.index) {
+ if (!formData.companyAddress) {
+ wx.showToast({
+ title: '请输入公司地址',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ if (!formData.companyPhone) {
+ wx.showToast({
+ title: '请输入公司电话',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ if (!formData.openingBank) {
+ wx.showToast({
+ title: '请输入开户行',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ if (!formData.bankAccount) {
+ wx.showToast({
+ title: '请输入银行账号',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ if (!formData.linkBankNumber) {
+ wx.showToast({
+ title: '请输入联行号',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ }
+ if (!formData.invoiceProject || formData.invoiceProject === -1) {
+ wx.showToast({
+ title: '请选择发票项目',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ formData.invoiceProject = this.data.invoiceProjectList[formData.invoiceProject].value
+ }
// 不需要发票不校验
if (formData.identity == '2' && (this.data.selectedPostPerson.id == -'' || this.data.selectedPostPerson.id === undefined) && formData.needInvoice !== '0') {
wx.showToast({
@@ -882,7 +1015,7 @@ Page({
- // 会议id
+ // 会议id
if (this.data.selectedMeeting.id) {
formData.meetingId = this.data.selectedMeeting.id
} else {
@@ -915,57 +1048,64 @@ Page({
// 会议类型
// formData.meetingType = this.data.selectedMeeting.meetingType
console.log(formData);
- wx.showLoading({
- title: '加载中',
- mask: true
- })
- signUpApi.signUpMeeting(formData).then(res => {
- if (res.success) {
- wx.hideLoading({
-
- })
- // 成功 清除缓存 跳转报名成功页面
- wx.removeStorage({
- key: 'selectedCompany',
- })
- wx.removeStorage({
- key: 'selectedPerson',
- })
- wx.removeStorage({
- key: 'selectedPostPerson',
- })
- wx.removeStorage({
- key: 'meetingId',
- })
- wx.removeStorage({
- key: 'currentMeetingInfo',
- success() {
- // 跳转报名成功页面 res.result为true不需要审核
- if (!res.result) {
- wx.navigateTo({
- url: `../signUpSuccess/signUpSuccess?audit=${res.result}`,
- })
- } else {
- wx.navigateTo({
- url: `../signUpSuccess/signUpSuccess`,
- })
+ let callback = () => {
+ wx.showLoading({
+ title: '加载中',
+ mask: true
+ })
+ signUpApi.signUpMeeting(formData).then(res => {
+ if (res.success) {
+ wx.hideLoading({})
+ // 成功 清除缓存 跳转报名成功页面
+ wx.removeStorage({
+ key: 'selectedCompany',
+ })
+ wx.removeStorage({
+ key: 'selectedPerson',
+ })
+ wx.removeStorage({
+ key: 'selectedPostPerson',
+ })
+ wx.removeStorage({
+ key: 'meetingId',
+ })
+ wx.removeStorage({
+ key: 'currentMeetingInfo',
+ success() {
+ // 跳转报名成功页面 res.result为true不需要审核
+ if (!res.result) {
+ wx.navigateTo({
+ url: `../signUpSuccess/signUpSuccess?audit=${res.result}`,
+ })
+ } else {
+ wx.navigateTo({
+ url: `../signUpSuccess/signUpSuccess`,
+ })
+ }
}
- }
- })
- } else {
+ })
+ } else {
+ wx.showToast({
+ title: res.message,
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ }).catch(err => {
wx.showToast({
- title: res.message,
+ title: err.message,
icon: 'none',
duration: 2000
})
- }
- }).catch(err => {
- wx.showToast({
- title: err.message,
- icon: 'none',
- duration: 2000
})
- })
+ }
+ // 如果不需要发票
+ if(!Number(formData.needInvoice)) {
+ callback && callback()
+ return
+ }
+ //显示 校验发票信息的弹框
+ this.showConfirmModal(formData, callback)
},
/**
* 生命周期函数--监听页面加载
@@ -1054,4 +1194,4 @@ Page({
onShareAppMessage: function () {
}
-})
\ No newline at end of file
+})
diff --git a/pages/signUpPageGuoji/signUpPageGuoji.wxml b/pages/signUpPageGuoji/signUpPageGuoji.wxml
index bb9814e..3ea5c91 100644
--- a/pages/signUpPageGuoji/signUpPageGuoji.wxml
+++ b/pages/signUpPageGuoji/signUpPageGuoji.wxml
@@ -5,38 +5,34 @@
参会单位:
-
+
参会人:
-
+
-
+
手机号:
-
+
-
- 是否有邀请码:
- (如无邀请码,请选否)
-
-
-
-
-
-
+
+ 是否有邀请码:
+ (如无邀请码,请选否)
+
+
+
+
+
+
-
+
参会身份:
@@ -54,8 +50,7 @@
邀请码:
-
+
@@ -65,7 +60,7 @@
-
+
缴费方式:
@@ -73,43 +68,84 @@
-
+
是否需要发票:
-
+
{{index === -1 ? '请选择' :needInvoiceList[index].name }}
+
+
+
+ 企业名称:
+
+
+
+ 信用代码:
+
+
+
+
+
+ 公司地址:
+
+
+
+ 公司电话:
+
+
+
+ 开户行:
+
+
+
+ 银行账号:
+
+
+
+ 联行号:
+
+
+
+
+ 发票项目:
+
+
+ {{invoiceProjectIndex === -1 ? '请选择发票项目' : invoiceProjectList[invoiceProjectIndex].name }}
+
+
+
+
+
邮寄联系人:
-
+
邮寄地址:
-
+
邮编:
-
+
-
+
+ 备注:
+
+
费用合计:
{{meetingCosts}}元
@@ -153,7 +189,7 @@
@@ -167,7 +203,7 @@
@@ -181,14 +217,14 @@
- 入住酒店时间:
+ 入住酒店时间:
{{inHotelTime}}
@@ -217,7 +253,7 @@
@@ -250,7 +286,7 @@
@@ -267,14 +303,12 @@
离开站:
-
+
离开班次:
-
+
@@ -327,7 +361,7 @@
@@ -340,7 +374,7 @@
@@ -353,7 +387,7 @@
@@ -386,7 +420,7 @@
@@ -436,7 +470,7 @@
@@ -449,7 +483,7 @@
@@ -462,7 +496,7 @@
@@ -495,7 +529,7 @@
@@ -512,20 +546,22 @@
离开站:
-
+
离开班次:
-
+
同行人:
+
+ 备注:
+
+
@@ -553,7 +589,10 @@
-
+
+ 备注:
+
+
@@ -562,4 +601,23 @@
-
\ No newline at end of file
+
+
+
+
+
+
+ 请确认以下发票信息是否正确?
+ 点击确认后该企业后续相关信息将替换成新的内容
+
+ {{item.name}} :
+ {{confirmObj[item.key]}}
+
+
+
+
+
+
+
+
+
diff --git a/pages/signUpPageGuoji/signUpPageGuoji.wxss b/pages/signUpPageGuoji/signUpPageGuoji.wxss
index 337ed69..7b01545 100644
--- a/pages/signUpPageGuoji/signUpPageGuoji.wxss
+++ b/pages/signUpPageGuoji/signUpPageGuoji.wxss
@@ -91,4 +91,81 @@ page{
}
.primary-color {
color:#069F99!important;
-}
\ No newline at end of file
+}
+
+
+/* 用作模块的view 目的是少些判断 */
+.form-item-template {
+ margin-top: 20px;
+}
+
+/* 弹框中的面板信息 */
+.detail-page {
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+}
+
+.detail-page>.flex-content {
+ padding: 20px 55.66rpx 0;
+ background-color: #F9F9FB;
+ flex: 1;
+ overflow: auto;
+}
+
+.detail-page .top-notice {
+ font-weight: bold;
+ text-align: center;
+ font-size: 16px;
+ white-space: pre-wrap;
+ margin-bottom: 5px;
+}
+
+.detail-page .item-view {
+ display: flex;
+ align-items: center;
+ height: 40px;
+ padding: 10rpx 20rpx;
+ box-sizing: border-box;
+}
+
+.detail-page .item-view .label-box {
+ flex-basis: 90px;
+}
+.detail-page .item-view .value-box {
+ flex: 1;
+}
+
+/* 下面的按钮 */
+.btn-view {
+ height: 163rpx;
+ display: flex;
+ align-items: center;
+ /* background-color: #F7F7F7; */
+ padding: 0 29.33rpx;
+}
+
+.btn-view button {
+ line-height: 100%;
+ font-size: 16px;
+ letter-spacing: 2px;
+}
+
+.btn-view button+button {
+ margin-left: 30rpx;
+ background-color: #069f99;
+ color: #fff;
+ border: 0.66rpx solid #F7F7F7;
+ padding: 31rpx 0;
+ flex: 1;
+ width: 0;
+}
+
+
+.btn-view button.cancel {
+ color: #EA434F;
+ background-color: #fff;
+ border: 0.66rpx solid #F7F7F7;
+ padding: 31rpx 0;
+ width: 196.66rpx;
+}