Commit 7f160a5f by chenjinjing

Merge branch 'master' of http://123.207.147.179:8888/node_server/wenHuaBu_adminServer

# Conflicts:
#	src/config/errorEnum.ts
parents 8e436939 ff3908f7
...@@ -196,7 +196,7 @@ export async function unpaidList({name, memberType, documentId, phone, mail, joi ...@@ -196,7 +196,7 @@ export async function unpaidList({name, memberType, documentId, phone, mail, joi
* 会员级别/职务:【普通会员、理事会员、常务理事会员】 * 会员级别/职务:【普通会员、理事会员、常务理事会员】
* @param pageNumber 当前页 * @param pageNumber 当前页
*/ */
export async function getRenewalPeriod({name, memberType, documentId, phone, mail, joinStartTime, joinEndTime, memberLevel, duties, pageNumber}) { export async function getRenewalPeriod({name, memberType, documentId, phone, mail, joinStartTime, joinEndTime, memberLevel, pageNumber}) {
const NowMs = new Date().valueOf(); const NowMs = new Date().valueOf();
let selectParam:any = { let selectParam:any = {
"$or":[ "$or":[
......
...@@ -24,10 +24,10 @@ export async function login({loginId, pwd}) { ...@@ -24,10 +24,10 @@ export async function login({loginId, pwd}) {
let selectParam = { "$or":[{loginId:loginId}, {phone:loginId}] }; let selectParam = { "$or":[{loginId:loginId}, {phone:loginId}] };
let userInfo = await findOnce(TABLEENUM.用户表, selectParam); let userInfo = await findOnce(TABLEENUM.用户表, selectParam);
if (userInfo.isBlackUser == STATE.) throw new BizError(ERRORENUM.黑名单用户不允许登录, "您的会员服务已过期,如需恢复请联系秘书处:010-86208681");
if (!userInfo || !userInfo.userId) throw new BizError(ERRORENUM.账号或密码错误); if (!userInfo || !userInfo.userId) throw new BizError(ERRORENUM.账号或密码错误);
if (userInfo.isBlackUser == STATE.) throw new BizError(ERRORENUM.黑名单用户不允许登录, "您的会员服务已过期,如需恢复请联系秘书处:010-86208681");
if (userInfo.isInput && !userInfo.inputUserChangePwd) { if (userInfo.isInput && !userInfo.inputUserChangePwd) {
return { return {
isInput:userInfo.isInput, isInput:userInfo.isInput,
...@@ -85,7 +85,12 @@ export async function changePwd({phone, pwd, confirmation, code}) { ...@@ -85,7 +85,12 @@ export async function changePwd({phone, pwd, confirmation, code}) {
if (pwd.search(/^[A-Za-z0-9]{6,18}$/) < 0) throw new BizError(ERRORENUM.密码只能由618位字符和数字组成); if (pwd.search(/^[A-Za-z0-9]{6,18}$/) < 0) throw new BizError(ERRORENUM.密码只能由618位字符和数字组成);
if (pwd != confirmation) throw new BizError(ERRORENUM.两次密码不一致); if (pwd != confirmation) throw new BizError(ERRORENUM.两次密码不一致);
let userInfo = await findOnce(TABLEENUM.用户表, {phone}, ["userId"]); let codeInfo = await findOnce(TABLEENUM.验证码表, {codeNum:code, phone, type:CODETYPE.修改密码, isUse:false});
if (!codeInfo || !codeInfo.codeNum) {
throw new BizError(ERRORENUM.验证码错误);
}
let userInfo = await findOnce(TABLEENUM.用户表, {phone}, ["userId", "isInput", "inputUserChangePwd"]);
if (!userInfo || !userInfo.userId) throw new BizError(ERRORENUM.手机号不正确); if (!userInfo || !userInfo.userId) throw new BizError(ERRORENUM.手机号不正确);
// let pwdStr = generatePwd(userInfo.userId, pwd); todo // let pwdStr = generatePwd(userInfo.userId, pwd); todo
let pwdStr = pwd; let pwdStr = pwd;
...@@ -95,6 +100,7 @@ export async function changePwd({phone, pwd, confirmation, code}) { ...@@ -95,6 +100,7 @@ export async function changePwd({phone, pwd, confirmation, code}) {
} }
await updateOneData(TABLEENUM.用户表, {userId:userInfo.userId}, updateInfo); await updateOneData(TABLEENUM.用户表, {userId:userInfo.userId}, updateInfo);
await updateOneData(TABLEENUM.验证码表, {codeNum:code, phone, type:CODETYPE.修改密码, isUse:false}, {isUse:true});
return successResult(); return successResult();
} }
......
...@@ -60,3 +60,5 @@ function getExcel(filePath) { ...@@ -60,3 +60,5 @@ function getExcel(filePath) {
return {sheetMap, sheetList} return {sheetMap, sheetList}
} }
...@@ -686,6 +686,7 @@ export enum OOSCODE { ...@@ -686,6 +686,7 @@ export enum OOSCODE {
单位会员详情, 单位会员详情,
注册信息, 注册信息,
退款凭证 = 18, 退款凭证 = 18,
退款确认
} }
...@@ -748,3 +749,12 @@ export enum ISRECEIVE { ...@@ -748,3 +749,12 @@ export enum ISRECEIVE {
未收到款项_xg其他 = 1, 未收到款项_xg其他 = 1,
提供账户_zkh需退款_ykh 提供账户_zkh需退款_ykh
} }
/**
* 订单审批
*/
export enum ORDEREXAMINE {
用户提交 = 1,
退回
}
\ No newline at end of file
...@@ -61,7 +61,10 @@ export enum ERRORENUM { ...@@ -61,7 +61,10 @@ export enum ERRORENUM {
用户没有在此活动对象内, 用户没有在此活动对象内,
黑名单用户不允许登录, 黑名单用户不允许登录,
该订单未被退回, 该订单未被退回,
当前变更申请未发生变化 当前变更申请未发生变化,
不可重复提交,
订单非退回状态,
该类型退款无需确认
} }
export enum ERRORCODEENUM { export enum ERRORCODEENUM {
......
...@@ -495,10 +495,18 @@ const ModelArray = [ ...@@ -495,10 +495,18 @@ const ModelArray = [
//2.0新加 //2.0新加
invoiceMail:'String',//发票邮箱 invoiceMail:'String',//发票邮箱
desc:'String',//描述 desc:'String',//描述
isReceive:{type:"Number"},//退回理由中的是否受到款项【财务核对页收款退回】 ISRECEIVE isReceive:{type:"Number", default:0},//退回理由中的是否受到款项【财务核对页收款退回】 ISRECEIVE
returnsReasons:'String',//退回理由中的退回理由描述【财务核对页收款退回】 returnsReasons:'String',//退回理由中的退回理由描述【财务核对页收款退回】
//退款信息
refundName:"String",
refundBankCarId:"String",
refundBankName:"String",
refundDesc:"String",
isReplenishReturnInfo:{type:'Boolean', default:false},//是否补充退款信息 isReplenishReturnInfo:{type:'Boolean', default:false},//是否补充退款信息
refundSuccessful:{type:"Boolean", default:false},//退款确认
refundImgUrl:"String"
} }
}, },
{ {
...@@ -584,7 +592,19 @@ const ModelArray = [ ...@@ -584,7 +592,19 @@ const ModelArray = [
userId:{type:'String'},//活动报名用户id userId:{type:'String'},//活动报名用户id
enrollUrl:{type:'String'}//报名表位置 enrollUrl:{type:'String'}//报名表位置
} }
},
{
tableName:TABLEENUM.订单审批历史表,//会员
source:TABLESOURCEENUM.mongo,
schema:{
orderId:{type:'String', index:true},//订单表 外键
operationTime:{ type:'Number' },//操作时间
operationBehavior:{ type:'Number'},//操作行为 枚举 ORDEREXAMINE
isReceiveMoney:{type:'Boolean', default:false},//是否收到款项
remarks:{ type:'String' },//备注
refundImgUrl:"String"//退款确认发票地址
} }
},
]; ];
......
...@@ -95,18 +95,18 @@ export const Config = { ...@@ -95,18 +95,18 @@ export const Config = {
subUrl:'/order/invoice/examine/upinvoice', subUrl:'/order/invoice/examine/upinvoice',
param:[ param:[
{key:"id", type:"String", desc:"订单id"}, {key:"id", type:"String", desc:"订单id"},
{key:"invoiceUrl", type:"String", desc:"发票地址"}, // {key:"invoiceUrl", type:"String", desc:"发票地址"},
], ],
bindBiz:orderBiz.upInvoice bindBiz:orderBiz.upInvoice
}, },
{ // {
apiName:"待开发票-退回发票", // apiName:"待开发票-退回发票", 弃用
subUrl:'/order/invoice/examine/backinvoice', // subUrl:'/order/invoice/examine/backinvoice',
param:[ // param:[
{key:"id", type:"String", desc:"订单id"} // {key:"id", type:"String", desc:"订单id"}
], // ],
bindBiz:orderBiz.backInvoice // bindBiz:orderBiz.backInvoice
}, // },
{ {
apiName:"发票管理-已开发票", apiName:"发票管理-已开发票",
subUrl:'/order/invoice/examine/invoicedlist', subUrl:'/order/invoice/examine/invoicedlist',
...@@ -141,6 +141,31 @@ export const Config = { ...@@ -141,6 +141,31 @@ export const Config = {
], ],
bindBiz:orderBiz.invoicePop bindBiz:orderBiz.invoicePop
}, },
{
apiName:"退款列表",
subUrl:'/order/refundlist',
param:[
{key:"pageNumber", type:"Number", desc:"当前页"},
],
bindBiz:orderBiz.refundList
},
{
apiName:"退款确认",
subUrl:'/order/refundapprove',
param:[
{key:"id", type:"String", desc:"订单id"},
{key:"refundImgUrl", type:"String", desc:"订单id"},
],
bindBiz:orderBiz.refundApprove
},
// {
// apiName:"审批历史",
// subUrl:'/order/approve/log',
// param:[
// {key:"id", type:"String", desc:"订单id"},
// ],
// bindBiz:orderBiz.
// },
], ],
"会员个人页":[ "会员个人页":[
{ {
...@@ -204,15 +229,24 @@ export const Config = { ...@@ -204,15 +229,24 @@ export const Config = {
param:[ param:[
{key:"id", type:"String", desc:"会员缴费列表返回id"}, {key:"id", type:"String", desc:"会员缴费列表返回id"},
], ],
bindBiz:orderBiz. bindBiz:orderBiz.reasonInfo
}, },
{ {
apiName:"退款信息", apiName:"退款信息",
subUrl:'/order/refund/accountinfo', subUrl:'/order/refund/accountinfo',
param:[ param:[
{key:"id", type:"String", desc:"会员缴费列表返回id"}, {key:"id", type:"String", desc:"会员缴费列表返回id"},
{key:"form", type:"Object", sub:
{
refundName:{type:"String", desc:"姓名"},
refundBankCarId:{typs:"String", desc:"银行账号"},
refundBankName:{type:"String", desc:"银行开户行"},
refundDesc:{type:"String", desc:"备注"},
},
desc:"表单"
}
], ],
bindBiz:orderBiz. bindBiz:orderBiz.accountInfo
}, },
], ],
......
...@@ -28,7 +28,7 @@ export async function setRouter(httpServer){ ...@@ -28,7 +28,7 @@ export async function setRouter(httpServer){
if (Look) { if (Look) {
await getDoc(); await getDoc();
// await initDoc(portalRouter.FirstName, portalRouter.Config, portalRouter.FirstRouter);//网站编辑 // await initDoc(portalRouter.FirstName, portalRouter.Config, portalRouter.FirstRouter);//网站编辑
await initDoc(publicRouter.FirstName, publicRouter.Config, publicRouter.FirstRouter);//公用组件 // await initDoc(publicRouter.FirstName, publicRouter.Config, publicRouter.FirstRouter);//公用组件
// await initDoc(memberRouter.FirstName, memberRouter.Config, memberRouter.FirstRouter);//用户路由 // await initDoc(memberRouter.FirstName, memberRouter.Config, memberRouter.FirstRouter);//用户路由
// await initDoc(officalWebsiteRouter.FirstName, officalWebsiteRouter.Config, officalWebsiteRouter.FirstRouter);//官网路由 // await initDoc(officalWebsiteRouter.FirstName, officalWebsiteRouter.Config, officalWebsiteRouter.FirstRouter);//官网路由
await initDoc(orderRouter.FirstName, orderRouter.Config, orderRouter.FirstRouter);//会费相关 await initDoc(orderRouter.FirstName, orderRouter.Config, orderRouter.FirstRouter);//会费相关
......
...@@ -99,9 +99,15 @@ export function getTodayMs() { ...@@ -99,9 +99,15 @@ export function getTodayMs() {
export function generateWXOrderId(memberType, userId) { export function generateWXOrderId(memberType, userId) {
let thisDate = new Date(); let thisDate = new Date();
return `${md5(`${memberType}${userId}${Math.random() * 100}${thisDate.valueOf()}${Math.floor(Math.random() * 1000)}`)}` return `${md5(`${memberType}${userId}${Math.random() * 100}${thisDate.valueOf()}${Math.floor(Math.random() * 1000)}`)}`;
} }
/**
* 倒推 届次
*/
export function getSessionByEdition(jie, ci) {
}
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment