Commit d5fd2d9e by chenjinjing

no message

parent 38e99881
......@@ -102,7 +102,7 @@ const UnitConfig = ["unitMemberType", "yuanXiaoBanXueLeiXing", "yuanXiaoZhuGuanB
"yuanXiaoBanGongFuZeRen", "yuanXiaoBanGongFuZeRenDianHua", "ZhuYaoFuZeRenYouXiang", "yuanXiaoKeYanFuZeRen", "yuanXiaoKeYanFuZeRenDianHua",
"jiaoXueFuZeRenXinMing", "jiaoXueFuZeRenDianHua", "kaishezhuanYe", "danWeiJianJie"];
export async function unitMemberDetails({id}) {
export async function unitMemberDetails({userId, id}) {
let oldInfo = await findOnce(TABLEENUM.用户表, {userId:id});
if (!oldInfo || !oldInfo.userId) throw new BizError(ERRORENUM.目标数据不存在);
let topInfo:any = extractData(oldInfo, ["session", "memberLevel"]);
......@@ -136,7 +136,17 @@ export async function unitMemberDetails({id}) {
});
})
return {topInfo, basicInfo, unitInfo, scientificResearch};
/**按钮权限 */
let userInfo = await findOnce(TABLEENUM.用户表, {userId});
let permission = [];
if (userInfo.adminLv.indexOf(ADMINLV.会员信息修改) > -1 ) {
permission.push(ADMINLV.会员信息修改);
}
if (userInfo.adminLv.indexOf(ADMINLV.单位会员申请表) > -1 ) {
permission.push(ADMINLV.单位会员申请表);
}
return {topInfo, basicInfo, unitInfo, scientificResearch, permission};
}
......@@ -296,7 +306,7 @@ const TopConfig = ["session", "memberLevel"];
const IndividualBasicConfig = ["userId", "name", "sex", "nation", "birth", "documentType", "documentId", "sheng", "shi", "qu", "phone", "mail", "addres", "photoUrl", "education", "uscc", "unitName"];
const SpecialityConfig = ["unitName", "duties", "workTitle", "profCategory", "studyResume", "workResume", "profAchievement", "otherEMP", "otherPROF"];
export async function individualMemberDetails({id}) {
export async function individualMemberDetails({userId, id}) {
let oldInfo = await findOnce(TABLEENUM.用户表, {userId:id});
if (!oldInfo || !oldInfo.userId) throw new BizError(ERRORENUM.目标数据不存在);
......@@ -323,7 +333,14 @@ export async function individualMemberDetails({id}) {
let otherAttachment:any = extractData(oldInfo, ["cardUrlJust", "cardUrlBack", "academicCERTUrl", "professionalCERTUrl", "auxiliaryMaterial"]);
return {topInfo, basicInfo, specialityInfo, otherAttachment};
/**按钮权限 */
let userInfo = await findOnce(TABLEENUM.用户表, {userId});
let permission = [];
if (userInfo.adminLv.indexOf(ADMINLV.会员信息修改) > -1 ) {
permission.push(ADMINLV.会员信息修改);
}
return {topInfo, basicInfo, specialityInfo, otherAttachment, permission};
}
......
......@@ -338,7 +338,7 @@ export async function outPutConfirmReceipt({exportColumns}) {
let selectFile = ["id", "unitName", "userId", "orderCycleStart", "orderCycleEnd", "money", "paymentMethod", "memberCategory", "paymentNum", "desc", "invoiceMail"];
let dbList = await find(TABLEENUM.订单表, findParam, selectFile);
let timeChnageList = ["orderCycleStart", "operationTime"];
let timeChnageList = []; //"orderCycleStart", "operationTime"
let dataList = [selectTitle];
for (let i = 0; i < dbList.length; i++) {
......@@ -365,11 +365,12 @@ export async function outPutConfirmReceipt({exportColumns}) {
value = "-";
}
}
if (key == "orderCycle") value = `${moment(info.orderCycleStart).format("YYYY-MM-DD")}${moment(info.orderCycleEnd).format("YYYY-MM-DD")}`;
if (value) {
if (timeChnageList.indexOf(key) != -1) value = moment(value).format("YYYY-MM-DD");
else if (key == "memberCategory") value = changeEnumValue(MEMBERTYPE, value);
else if (key == "orderCycle") value = `${moment(info.orderCycleStart).format("YYYY-MM-DD")}${moment(info.orderCycleEnd).format("YYYY-MM-DD")}`;
else if (key == "memberLevel") value = changeEnumValue(MEMBERLEVEL, value);
else if (key == "paymentMethod") value = changeEnumValue(PAYMENTTYPE, value);
}
subList.push(value);
}
......@@ -578,11 +579,12 @@ export async function backInvoice({id}) {
value = "-";
}
}
if (key == "orderCycle") value = `${moment(info.orderCycleStart).format("YYYY-MM-DD")}${moment(info.orderCycleEnd).format("YYYY-MM-DD")}`;
if (value) {
if (timeChnageList.indexOf(key) != -1) value = moment(value).format("YYYY-MM-DD");
else if (key == "memberCategory") value = changeEnumValue(MEMBERTYPE, value);
else if (key == "orderCycle") value = `${moment(info.orderCycleStart).format("YYYY-MM-DD")}${moment(info.orderCycleEnd).format("YYYY-MM-DD")}`;
else if (key == "memberLevel") value = changeEnumValue(MEMBERLEVEL, value);
else if (key == "paymentMethod") value = changeEnumValue(PAYMENTTYPE, value);
}
subList.push(value);
}
......@@ -766,11 +768,12 @@ export async function invoicedList({name, memberType, documentId, phone, mail, j
value = "-";
}
}
if (key == "orderCycle") value = `${moment(info.orderCycleStart).format("YYYY-MM-DD")}${moment(info.orderCycleEnd).format("YYYY-MM-DD")}`;
if (value) {
if (timeChnageList.indexOf(key) != -1) value = moment(value).format("YYYY-MM-DD");
else if (key == "memberCategory") value = changeEnumValue(MEMBERTYPE, value);
else if (key == "orderCycle") value = `${moment(info.orderCycleStart).format("YYYY-MM-DD")}${moment(info.orderCycleEnd).format("YYYY-MM-DD")}`;
else if (key == "memberLevel") value = changeEnumValue(MEMBERLEVEL, value);
else if (key == "paymentMethod") value = changeEnumValue(PAYMENTTYPE, value);
}
subList.push(value);
}
......@@ -1183,10 +1186,10 @@ export async function refundApprove({id, refundImgUrl}) {
else value = "待退款";
}
}
if (key == "orderCycle") value = `${moment(info.orderCycleStart).format("YYYY-MM-DD")}${moment(info.orderCycleEnd).format("YYYY-MM-DD")}`;
if (value) {
if (timeChnageList.indexOf(key) != -1) value = moment(value).format("YYYY-MM-DD");
else if (key == "memberCategory") value = changeEnumValue(MEMBERTYPE, value);
else if (key == "orderCycle") value = `${moment(info.orderCycleStart).format("YYYY-MM-DD")}${moment(info.orderCycleEnd).format("YYYY-MM-DD")}`;
}
subList.push(value);
}
......
......@@ -104,7 +104,7 @@ let permissionConfig = {
"党建工作_文字资料":{adminPermission:true, lv:ADMINLV.党建工作},
"分支机构_机构管理_工作动态":{adminPermission:true, lv:ADMINLV.分支机构},
"分支机构_机构管理_委员名单":{adminPermission:true, lv:ADMINLV.分支机构},
"分支机构_机构管理_下载管理":{adminPermission:true, lv:ADMINLV.分支机构}
"分支机构_机构管理_下载管理":{adminPermission:true, lv:ADMINLV.分支机构},
};
function routerFun(apiName, defaultParam, subUrl, param, bindBiz, notMiddleware, modelKey) {
......@@ -126,8 +126,6 @@ function routerFun(apiName, defaultParam, subUrl, param, bindBiz, notMiddleware,
}
let chackObjectList = [];
let checkStringMap = {};
let stringNotMustHaveKeys = [];
......
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