master
Joe 2 years ago
parent d73a965437
commit 569b06cd13

@ -87,7 +87,7 @@ export default defineConfig({
plugins: ['duration'], plugins: ['duration'],
}, },
define: { define: {
'process.env.BASE_URL': 'http://xft-cms.popshejie.com/api', // 接口服务器地址 'process.env.BASE_URL': 'http://cms.gjxfc.com/api', // 接口服务器地址
}, },
/** /**
* @name * @name

@ -55,88 +55,258 @@ const Detail: React.FC<any> = () => {
]} ]}
> >
<ProCard style={{ marginBottom: 12 }}> <ProCard style={{ marginBottom: 12 }}>
<ProDescriptions <ProConfigProvider
editable={ valueTypeMap={{
access.businessSave && isEdit upload: {
? { render: (text) => {
onSave: async (key, record, originRow) => { return text.length > 0 ? text.map((e: any) =>
let pbcState = record.pbcState; <Image width={200} src={e.url}></Image>
if (key === 'pbcState') { ) : (
pbcState = record[key] ? 1 : 2; <span></span>
} );
//@ts-ignore },
await adminChangeBusinessInfoUsingPost({ renderFormItem: (text, props) => {
pbcId: info.pbcId, return (
[key]: record[key], <ProFormUploadButton
pbcState: key === 'pbcState' ? pbcState : undefined, {...props}
}) {...props?.fieldProps}
.then((res) => { icon={<PlusCircleOutlined style={{ fontSize: 30 }} />}
if (res.retcode) { title={<div style={{ marginTop: 10, fontSize: 12 }}></div>}
getInfo(); fieldProps={{
message.success('修改成功'); name: 'file',
return record; accept: 'image/*',
} else { listType: 'picture-card',
message.error('修改失败'); headers: {
return originRow; authorization: localStorage.getItem('token') ?? '',
},
beforeUpload(file: RcFile) {
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
message.error('图片大小不能超过2MB!');
}
return isLt2M;
},
onPreview: async (file) => {
console.log(file);
if (file.uid === '-1') {
window.open(file.url);
}
if (file.response && file.response.retcode) {
window.open(file.response.data);
}
},
}}
action={'/oss/imgUpload'}
onChange={(a: any) => {
props?.fieldProps.onChange(a.fileList);
}}
/>
);
},
},
}}
hashed={false}
>
<ProDescriptions
editable={
access.businessSave && isEdit
? {
onSave: async (key, record: any, originRow) => {
let pbcState = record.pbcState;
let pbcBusinessLogo = "";
let pbcBusinessImage = [];
let pbcBusinessPosterUrl = [];
if (key === 'pbcState') {
pbcState = record[key] ? 1 : 2;
}
if (
key === 'pbcBusinessLogo' &&
record[key] &&
record[key].length > 0
) {
if (record[key][0].uid === '-1') {
pbcBusinessLogo = record[key][0].url;
}
if (record[key][0].response && record[key][0].response.retcode) {
pbcBusinessLogo = record[key][0].response.data;
}
}
if (
key === 'pbcBusinessImage' &&
record[key] &&
record[key].length > 0
) {
for (let i = 0; i < record[key].length; i++) {
const element = record[key][i];
if (element.uid === '-1') {
pbcBusinessImage.push(element.url)
}
if (element.response && element.response.retcode) {
pbcBusinessImage.push(element.response.data)
}
} }
}
if (
key === 'pbcBusinessPosterUrl' &&
record[key] &&
record[key].length > 0
) {
for (let i = 0; i < record[key].length; i++) {
const element = record[key][i];
if (element.uid === '-1') {
pbcBusinessPosterUrl.push(element.url)
}
if (element.response && element.response.retcode) {
pbcBusinessPosterUrl.push(element.response.data)
}
}
}
//@ts-ignore
await adminChangeBusinessInfoUsingPost({
pbcId: info.pbcId,
[key]: record[key],
pbcState: key === 'pbcState' ? pbcState : undefined,
pbcBusinessLogo: key === 'pbcBusinessLogo' ? pbcBusinessLogo : undefined,
pbcBusinessImage: key === 'pbcBusinessImage' ? pbcBusinessImage.join(',') : undefined,
pbcBusinessPosterUrl: key === 'pbcBusinessPosterUrl' ? pbcBusinessPosterUrl.join(',') : undefined,
}) })
.catch(() => { .then((res) => {
return originRow; if (res.retcode) {
}); getInfo();
message.success('修改成功');
return record;
} else {
message.error('修改失败');
return originRow;
}
})
.catch(() => {
return originRow;
});
},
}
: undefined
}
bordered
title={
<>
<span style={{ marginRight: 20 }}></span>
{info.pbcBusinessState === 1 ? (
<Tag icon={<CheckCircleOutlined />} color="success">
</Tag>
) : (
<Tag icon={<InfoCircleOutlined />} color="default">
</Tag>
)}
</>
}
dataSource={{
pbcBusinessName: info.pbcBusinessName,
pbcBusinessType: info.pbcBusinessType,
pbcState: info.pbcState,
pbcBusinessContact: info.pbcBusinessContact,
pbcBusinessContactMobile: info.pbcBusinessContactMobile,
pbcBusinessLevel: info.pbcBusinessLevel,
pbcBusinessIntroduction: info.pbcBusinessIntroduction,
pbcBusinessLogo: info.pbcBusinessLogo ? [
{
uid: '-1',
name: 'image.png',
status: 'done',
url: info.pbcBusinessLogo,
}, },
]
: [],
pbcBusinessImage: info.pbcBusinessImage ? info.pbcBusinessImage.split(',').map((e, index) => {
return {
uid: '-' + (index+1),
name: 'image.png',
status: 'done',
url: e,
} }
: undefined }) : [],
} pbcBusinessPosterUrl: info.pbcBusinessPosterUrl ? info.pbcBusinessPosterUrl.split(',').map((e, index) => {
bordered return {
title={ uid: '-' + (index+1),
<> name: 'image.png',
<span style={{ marginRight: 20 }}></span> status: 'done',
{info.pbcBusinessState === 1 ? ( url: e,
<Tag icon={<CheckCircleOutlined />} color="success"> }
}) : [],
</Tag> }}
) : ( columns={[
<Tag icon={<InfoCircleOutlined />} color="default"> {
title: '商户名称',
</Tag> key: 'pbcBusinessName',
)} dataIndex: 'pbcBusinessName',
</> },
} {
column={3} title: '商户类别',
> key: 'pbcBusinessType',
<ProDescriptions.Item label="商户名称" dataIndex="pbcBusinessName"> dataIndex: 'pbcBusinessType',
{info.pbcBusinessName} valueEnum: Constants.pbcBusinessType
</ProDescriptions.Item> },
<ProDescriptions.Item {
label="商户类别" title: '商户状态',
dataIndex="pbcBusinessType" key: 'pbcState',
valueEnum={Constants.pbcBusinessType} dataIndex: 'pbcState',
> valueType: "switch",
{info.pbcBusinessType} fieldProps:{ checkedChildren: '启用', unCheckedChildren: '禁用' }
</ProDescriptions.Item> },
<ProDescriptions.Item {
label="商户状态" title: '联系人',
dataIndex="pbcState" key: 'pbcBusinessContact',
valueType="switch" dataIndex: 'pbcBusinessContact',
fieldProps={{ checkedChildren: '启用', unCheckedChildren: '禁用' }} },
> {
{info.pbcState === 1} title: '手机号',
</ProDescriptions.Item> key: 'pbcBusinessContactMobile',
<ProDescriptions.Item label="联系人" dataIndex="pbcBusinessContact"> dataIndex: 'pbcBusinessContactMobile',
{info.pbcBusinessContact} },
</ProDescriptions.Item> {
<ProDescriptions.Item label="手机号" dataIndex="pbcBusinessContactMobile"> title: '商户等级',
{info.pbcBusinessContactMobile} key: 'pbcBusinessLevel',
</ProDescriptions.Item> dataIndex: 'pbcBusinessLevel',
<ProDescriptions.Item valueType: "select",
label="商户等级" fieldProps: { options: ['1级', '2级', '3级', '4级', '5级'] }
dataIndex="pbcBusinessLevel" },
valueType="select" {
fieldProps={{ options: ['1级', '2级', '3级', '4级', '5级'] }} title: '商户简介',
> key: 'pbcBusinessIntroduction',
{info.pbcBusinessLevel} valueType: 'textarea',
</ProDescriptions.Item> span: 3,
</ProDescriptions> dataIndex: 'pbcBusinessIntroduction'
},
{
title: '商户LOGO',
key: 'pbcBusinessLogo',
dataIndex: 'pbcBusinessLogo',
span: 3,
valueType: 'upload',
fieldProps: {
max: 1
}
},
{
title: '商户图片',
key: 'pbcBusinessImage',
dataIndex: 'pbcBusinessImage',
span: 3,
valueType: 'upload',
},
{
title: '商户海报',
key: 'pbcBusinessPosterUrl',
dataIndex: 'pbcBusinessPosterUrl',
span: 3,
valueType: 'upload',
},
]}
column={3}
></ProDescriptions>
</ProConfigProvider>
</ProCard> </ProCard>
<ProCard style={{ marginBottom: 12 }}> <ProCard style={{ marginBottom: 12 }}>
<ProConfigProvider <ProConfigProvider
@ -216,7 +386,7 @@ const Detail: React.FC<any> = () => {
access.businessSave && isEdit access.businessSave && isEdit
? { ? {
onSave: async (key, record: any, originRow) => { onSave: async (key, record: any, originRow) => {
let pbcBusinessLicenseUrl = record.pbcState; let pbcBusinessLicenseUrl = "";
if ( if (
key === 'pbcBusinessLicenseUrl' && key === 'pbcBusinessLicenseUrl' &&
record[key] && record[key] &&
@ -288,6 +458,7 @@ const Detail: React.FC<any> = () => {
{ {
title: '经营范围', title: '经营范围',
key: 'pbcBusinessMainCategory', key: 'pbcBusinessMainCategory',
valueType: 'textarea',
span: 3, span: 3,
dataIndex: 'pbcBusinessMainCategory', dataIndex: 'pbcBusinessMainCategory',
}, },

@ -17,6 +17,21 @@ export async function agreeMemberApplicationUsingGet(
}); });
} }
/** 商户管理员删除用户的会员 单个 GET /b2b2c/pbcuserbusiness/businessAdminDeleteUserMember */
export async function businessAdminDeleteUserMemberUsingGet(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.businessAdminDeleteUserMemberUsingGETParams,
options?: { [key: string]: any },
) {
return request<API.AjaxResult>('/b2b2c/pbcuserbusiness/businessAdminDeleteUserMember', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}
/** 买家的商户会员列表,可以搜索已通过和未通过的商户 列表 POST /b2b2c/pbcuserbusiness/businessrecordlist */ /** 买家的商户会员列表,可以搜索已通过和未通过的商户 列表 POST /b2b2c/pbcuserbusiness/businessrecordlist */
export async function businessRecordListUsingPost( export async function businessRecordListUsingPost(
body: API.PbcUserBusinessSearchVO, body: API.PbcUserBusinessSearchVO,

@ -275,6 +275,11 @@ declare namespace API {
pbcId: number; pbcId: number;
}; };
type businessAdminDeleteUserMemberUsingGETParams = {
/** pbcId */
pbcId: number;
};
type buyerDeleteBusinessRecordUsingGETParams = { type buyerDeleteBusinessRecordUsingGETParams = {
/** pbcId */ /** pbcId */
pbcId: number; pbcId: number;
@ -787,6 +792,8 @@ declare namespace API {
pbcBusinessHeadUserNoBackUrl?: string; pbcBusinessHeadUserNoBackUrl?: string;
/** 商户负责人身份证国徽面图片 */ /** 商户负责人身份证国徽面图片 */
pbcBusinessHeadUserNoFrontUrl?: string; pbcBusinessHeadUserNoFrontUrl?: string;
/** 商户负责人身份证类型0是身份证1是港澳来往内地通行证2是台湾内地通行证 */
pbcBusinessHeadUserNoType?: number;
/** 商户图片 */ /** 商户图片 */
pbcBusinessImage?: string; pbcBusinessImage?: string;
/** 商户简介 */ /** 商户简介 */
@ -801,6 +808,8 @@ declare namespace API {
pbcBusinessMainCategory?: string; pbcBusinessMainCategory?: string;
/** 商户名称 */ /** 商户名称 */
pbcBusinessName?: string; pbcBusinessName?: string;
/** 商户海报地址 */
pbcBusinessPosterUrl?: string;
/** 商户省份 */ /** 商户省份 */
pbcBusinessProvince?: string; pbcBusinessProvince?: string;
/** 开业时间 */ /** 开业时间 */
@ -862,6 +871,8 @@ declare namespace API {
pbcBusinessHeadUserNoBackUrl?: string; pbcBusinessHeadUserNoBackUrl?: string;
/** 商户负责人身份证国徽面图片 */ /** 商户负责人身份证国徽面图片 */
pbcBusinessHeadUserNoFrontUrl?: string; pbcBusinessHeadUserNoFrontUrl?: string;
/** 商户负责人身份证类型0是身份证1是港澳来往内地通行证2是台湾内地通行证 */
pbcBusinessHeadUserNoType?: number;
/** 商户图片 */ /** 商户图片 */
pbcBusinessImage?: string; pbcBusinessImage?: string;
/** 商户简介 */ /** 商户简介 */
@ -874,6 +885,8 @@ declare namespace API {
pbcBusinessMainCategory?: string; pbcBusinessMainCategory?: string;
/** 商户名称 */ /** 商户名称 */
pbcBusinessName?: string; pbcBusinessName?: string;
/** 商户海报地址 */
pbcBusinessPosterUrl?: string;
/** 商户地址省份 */ /** 商户地址省份 */
pbcBusinessProvince?: string; pbcBusinessProvince?: string;
/** 公司开业时间 */ /** 公司开业时间 */
@ -937,6 +950,8 @@ declare namespace API {
pbcBusinessHeadUserNoBackUrl?: string; pbcBusinessHeadUserNoBackUrl?: string;
/** 商户负责人身份证国徽面图片 */ /** 商户负责人身份证国徽面图片 */
pbcBusinessHeadUserNoFrontUrl?: string; pbcBusinessHeadUserNoFrontUrl?: string;
/** 商户负责人身份证类型0是身份证1是港澳来往内地通行证2是台湾内地通行证 */
pbcBusinessHeadUserNoType?: number;
/** 商户图片 */ /** 商户图片 */
pbcBusinessImage?: string; pbcBusinessImage?: string;
/** 商户简介 */ /** 商户简介 */
@ -949,6 +964,8 @@ declare namespace API {
pbcBusinessMainCategory?: string; pbcBusinessMainCategory?: string;
/** 商户名称 */ /** 商户名称 */
pbcBusinessName?: string; pbcBusinessName?: string;
/** 商户海报地址 */
pbcBusinessPosterUrl?: string;
/** 商户地址省份 */ /** 商户地址省份 */
pbcBusinessProvince?: string; pbcBusinessProvince?: string;
/** 公司成立时间 */ /** 公司成立时间 */
@ -1000,6 +1017,8 @@ declare namespace API {
pbcBusinessDoorLabel?: string; pbcBusinessDoorLabel?: string;
/** 商户邮箱 */ /** 商户邮箱 */
pbcBusinessEmail?: string; pbcBusinessEmail?: string;
/** 商户负责人身份证类型0是身份证1是港澳来往内地通行证2是台湾内地通行证 */
pbcBusinessHeadUserNoType?: number;
/** 商户图片 */ /** 商户图片 */
pbcBusinessImage?: string; pbcBusinessImage?: string;
/** 商户简介 */ /** 商户简介 */
@ -1008,6 +1027,8 @@ declare namespace API {
pbcBusinessLogo?: string; pbcBusinessLogo?: string;
/** 商户主营范围 */ /** 商户主营范围 */
pbcBusinessMainCategory?: string; pbcBusinessMainCategory?: string;
/** 商户海报地址 */
pbcBusinessPosterUrl?: string;
/** 商户省份 */ /** 商户省份 */
pbcBusinessProvince?: string; pbcBusinessProvince?: string;
/** 主键 */ /** 主键 */
@ -1053,7 +1074,7 @@ declare namespace API {
type PbcBusinessStaticalDTO = { type PbcBusinessStaticalDTO = {
/** 按天1按月2 */ /** 按天1按月2 */
pbcQueryType?: number; pbcQueryType?: number;
pbcUserId?: string; pbcUserId?: number;
}; };
type PbcBusinessTeam_ = { type PbcBusinessTeam_ = {
@ -1345,7 +1366,7 @@ declare namespace API {
/** 商品中类 */ /** 商品中类 */
pbcProductParentCategoryName?: string; pbcProductParentCategoryName?: string;
/** 商品价格 */ /** 商品价格 */
pbcProductPrice?: number; pbcProductPrice?: string;
/** 货架号 */ /** 货架号 */
pbcProductShelfNumber?: string; pbcProductShelfNumber?: string;
/** 商品库存 */ /** 商品库存 */
@ -1448,7 +1469,7 @@ declare namespace API {
/** 商品中类 */ /** 商品中类 */
pbcProductParentCategoryName?: string; pbcProductParentCategoryName?: string;
/** 商品价格 */ /** 商品价格 */
pbcProductPrice?: number; pbcProductPrice?: string;
/** 货架号 */ /** 货架号 */
pbcProductShelfNumber?: string; pbcProductShelfNumber?: string;
/** 商品库存 */ /** 商品库存 */
@ -1535,6 +1556,8 @@ declare namespace API {
colorName?: string; colorName?: string;
/** 是否可见针对的是私密商品如果查询对象是会员且会员无权限查看值为0前端应不可点进去查看且图片是默认的值是1表示可见 */ /** 是否可见针对的是私密商品如果查询对象是会员且会员无权限查看值为0前端应不可点进去查看且图片是默认的值是1表示可见 */
isVisible?: number; isVisible?: number;
/** 商户手机号 */
pbcBusinessContactMobile?: string;
/** 商户id */ /** 商户id */
pbcBusinessId?: number; pbcBusinessId?: number;
/** 商户名称 */ /** 商户名称 */
@ -1578,7 +1601,7 @@ declare namespace API {
/** 商品中类 */ /** 商品中类 */
pbcProductParentCategoryName?: string; pbcProductParentCategoryName?: string;
/** 商品价格 */ /** 商品价格 */
pbcProductPrice?: number; pbcProductPrice?: string;
/** 货架号 */ /** 货架号 */
pbcProductShelfNumber?: string; pbcProductShelfNumber?: string;
/** 商品库存 */ /** 商品库存 */

Loading…
Cancel
Save