【fix-bug74480】 会议报名页面增加查询默认企业的信息
This commit is contained in:
@@ -14,7 +14,9 @@ const MeetingApi = {
|
||||
// 删除会议报名信息
|
||||
deleteSignUpInfo:(params) => http.get(`${URL_CONFIG}meeting/payMeetingSituation/contactsDelete`, params),
|
||||
// 编辑会议报名信息
|
||||
editContactsInfo:(params) => http.post(`${URL_CONFIG}meeting/payMeetingSituation/contactsEdit`, params)
|
||||
editContactsInfo:(params) => http.post(`${URL_CONFIG}meeting/payMeetingSituation/contactsEdit`, params),
|
||||
//通过企业id查询企业的相关发票信息
|
||||
queryCompanyInfoById:(params) => http.get(`${URL_CONFIG}company/payCompanyManagement/queryById`, params)
|
||||
}
|
||||
|
||||
export default MeetingApi
|
||||
|
||||
@@ -126,10 +126,9 @@ Page({
|
||||
UserApi.wxLogin(params).then(res => {
|
||||
if (res.success) { // 已经用手机号登录过,此时用微信快捷登录时,把微信的个人信息存进缓存(微信信息在缓存的userInfoTemp)
|
||||
wx.setStorageSync('userInfo', res.result.userInfo)
|
||||
wx.setStorage({
|
||||
key: 'X-Access-Token',
|
||||
data: res.result.token
|
||||
})
|
||||
wx.setStorageSync( 'X-Access-Token',
|
||||
res.result.token
|
||||
)
|
||||
wx.setStorageSync('authorize', true) // 设置有过微信授权
|
||||
wx.setStorage({
|
||||
key: 'avatarUrl',
|
||||
|
||||
@@ -614,7 +614,7 @@ Page({
|
||||
/*
|
||||
* 编辑
|
||||
* */
|
||||
edit(record){
|
||||
async edit(record){
|
||||
this.model = Object.assign({}, record)
|
||||
// 选中的身份
|
||||
const selectedIdentity = this.model.identity + ''
|
||||
@@ -634,18 +634,33 @@ Page({
|
||||
tt.checked = true
|
||||
}
|
||||
})
|
||||
// 通过接口获取全部的企业信息
|
||||
let companyInfo = await this.queryCompanyInfoById(this.model.companyId)
|
||||
// 然后和PC端一样对比字段的值,将没有的初始化复制
|
||||
let invoiceKeys = ['dutyCode', 'companyAddress', 'companyPhone', 'openingBank', 'bankAccount', 'linkBankNumber']
|
||||
let invoiceInfo = {}
|
||||
invoiceKeys.map(key => {
|
||||
if(this.model[key]) {
|
||||
invoiceInfo[key] = this.model[key]
|
||||
}
|
||||
})
|
||||
// 选中的参会单位
|
||||
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 selectedCompany = Object.assign({}, companyInfo, {
|
||||
id: this.model.companyId,
|
||||
companyName: this.model.companyName,
|
||||
}, invoiceInfo)
|
||||
|
||||
// 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
|
||||
@@ -674,10 +689,24 @@ Page({
|
||||
remark: this.model.remark // 备注
|
||||
})
|
||||
},
|
||||
// 通过id获取企业的信息
|
||||
queryCompanyInfoById(id) {
|
||||
return new Promise(resolve => {
|
||||
let result = {}
|
||||
MeetingApi.queryCompanyInfoById({id}).then(callRes => {
|
||||
if(callRes.success) {
|
||||
result = callRes.result || {}
|
||||
}
|
||||
}).finally(() => {
|
||||
resolve(result)
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: async function (options) {
|
||||
console.log(options, "------options-------")
|
||||
// options = {
|
||||
// id: "1682018325751480322",
|
||||
// meetingId: "1680850121742204930",
|
||||
@@ -745,12 +774,28 @@ Page({
|
||||
// TODO 好像拿不到企业的其他信息
|
||||
wx.getStorage({
|
||||
key: 'userInfo',
|
||||
success(res) {
|
||||
async success(res) {
|
||||
// 通过接口获取全部的企业信息
|
||||
let result = await that.queryCompanyInfoById(res.data.companyId)
|
||||
let selectedCompany = {
|
||||
companyName: result.companyName,
|
||||
dutyCode: result.dutyCode,
|
||||
companyAddress: result.companyAddress,
|
||||
companyPhone: result.companyPhone,
|
||||
openingBank: result.openingBank,
|
||||
bankAccount: result.bankAccount,
|
||||
linkBankNumber: result.linkBankNumber,
|
||||
id: res.data.companyId
|
||||
}
|
||||
that.setData({
|
||||
'selectedCompany.companyName': res.data.companyName,
|
||||
selectedCompany
|
||||
})
|
||||
|
||||
that.setData({
|
||||
// 'selectedCompany.companyName': res.data.companyName,
|
||||
// 'selectedCompany.id': res.data.companyId,
|
||||
'selectedPerson.name': res.data.name,
|
||||
'selectedPerson.id': res.data.id,
|
||||
'selectedCompany.id': res.data.companyId,
|
||||
phone: res.data.phone,
|
||||
'selectedPostPerson.id': res.data.id,
|
||||
'selectedPostPerson.name': res.data.name,
|
||||
|
||||
@@ -1227,20 +1227,36 @@ Page({
|
||||
}
|
||||
},
|
||||
// 编辑--用于信息的回显
|
||||
edit(record){
|
||||
async edit(record){
|
||||
this.model = Object.assign({}, record)
|
||||
|
||||
// 通过接口获取全部的企业信息
|
||||
let companyInfo = await this.queryCompanyInfoById(this.model.companyId)
|
||||
// 然后和PC端一样对比字段的值,将没有的初始化复制
|
||||
let invoiceKeys = ['dutyCode', 'companyAddress', 'companyPhone', 'openingBank', 'bankAccount', 'linkBankNumber']
|
||||
let invoiceInfo = {}
|
||||
invoiceKeys.map(key => {
|
||||
if(this.model[key]) {
|
||||
invoiceInfo[key] = this.model[key]
|
||||
}
|
||||
})
|
||||
// 选中的参会单位
|
||||
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 selectedCompany = Object.assign({}, companyInfo, {
|
||||
id: this.model.companyId,
|
||||
companyName: this.model.companyName,
|
||||
}, invoiceInfo)
|
||||
// 选中的参会单位
|
||||
// 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,
|
||||
@@ -1265,6 +1281,7 @@ Page({
|
||||
// 缴费方式
|
||||
this.updateRadioArr(this.data.paymentMethodList, this.model.payMode)
|
||||
updateObj.paymentMethodList = this.data.paymentMethodList
|
||||
updateObj.payMethod = this.model.payMode + ''
|
||||
// 是否选择发票的选中的索引 默认需要
|
||||
const index = this.data.needInvoiceList.findIndex(e => e.value === (this.model.needInvoice + '')) + ''
|
||||
updateObj.index = index
|
||||
@@ -1351,10 +1368,24 @@ Page({
|
||||
})
|
||||
|
||||
},
|
||||
// 通过id获取企业的信息
|
||||
queryCompanyInfoById(id) {
|
||||
return new Promise(resolve => {
|
||||
let result = {}
|
||||
MeetingApi.queryCompanyInfoById({id}).then(callRes => {
|
||||
if(callRes.success) {
|
||||
result = callRes.result || {}
|
||||
}
|
||||
}).finally(() => {
|
||||
resolve(result)
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
console.log("------options---------", options)
|
||||
// options = {
|
||||
// id: "1683047817135579138",
|
||||
// meetingId: "1681693843581128706",
|
||||
|
||||
Reference in New Issue
Block a user