Commit dde0dbbb authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

Merge branch 'dev-srm' of http://10.0.0.22:3000/lingxi/lingxi-business-system into dev-srm

parents e5a855d9 e931ff72
......@@ -62,8 +62,8 @@
"core-js": "^3.6.5",
"crypto-js": "^4.0.0",
"god": "^0.2.4",
"lingxi-design": "^1.0.12",
"lingxi-design-ui": "^1.1.22",
"lingxi-design": "^1.0.14",
"lingxi-design-ui": "^1.1.23",
"lingxi-editor-core": "^1.0.7",
"lingxi-web": "^1.0.6",
"lint-staged": "^10.0.7",
......
......@@ -70,7 +70,7 @@ const RightContent: React.FC<{}> = (props) => {
const webSocketInit = useCallback(() => {
console.log(ws.current)
if (SOCKET_URL && /ws\:\/\//.test(SOCKET_URL) && (!ws.current || ws.current.readyState === 3) && userInfo) {
const url = `${SOCKET_URL}/report/websocket?memberId=${userInfo.memberId}&roleId=${userInfo.memberRoleId}&token=${userInfo.token}&source=${99}`
const url = `${SOCKET_URL}/report/websocket?memberId=${userInfo.memberId}&roleId=${userInfo.MemberManageRoleId}&token=${userInfo.token}&source=${99}`
ws.current = new WebSocket(url);
ws.current.onopen = (e) => {
console.log(e)
......
......@@ -9,7 +9,7 @@ import utils from '@/utils'
export default {
'menu.home': 'index',
'menu.memberManage': 'member',
'menu.memberManage.addMemberRole': 'addMemberRole',
'menu.memberManage.addMemberManageRole': 'addMemberManageRole',
'menu.memberManage.memberMenuManage': 'memberMenuManage',
'menu.logisticsManager': 'logistics',
}
\ No newline at end of file
}
......@@ -11,8 +11,8 @@ export default {
'menu.home': '首页',
'menu.memberManage': '会员角色权限配置',
'menu.memberManage.memberMenuManage': '会员菜单设置',
'menu.memberManage.memberRoleManage': '会员角色列表',
'menu.memberManage.addMemberRole': '新增会员角色',
'menu.memberManage.MemberManageRoleManage': '会员角色列表',
'menu.memberManage.addMemberManageRole': '新增会员角色',
'menu.memberManage.memberAuthManage': '会员权限管理',
'menu.memberManage.setMemberInfo': '会员注册设置',
'menu.memberManage.setMemberAuth': '设置会员权限',
......
......@@ -17,7 +17,7 @@ import EyePreview from '@/components/EyePreview';
import { STATUS_ENUM } from '@/constants';
const fetchData = async (params) => {
const { data } = await PublicApi.getMemberRolePage(params)
const { data } = await PublicApi.getMemberManageRolePage(params)
return data
}
......@@ -26,8 +26,8 @@ const MemberSystem: React.FC<{}> = () => {
const deleteItem = async (record) => {
// 删除该项
await PublicApi.postMemberRoleDelete({
memberRoleId: record.id
await PublicApi.postMemberManageRoleDelete({
MemberManageRoleId: record.id
})
ref.current.reload()
}
......@@ -37,7 +37,7 @@ const MemberSystem: React.FC<{}> = () => {
}
const handleStatus = async (record) => {
await PublicApi.postMemberRoleUpdatestatus({
await PublicApi.postMemberManageRoleUpdatestatus({
id: record.id,
status: record.status === 1 ? 0 : 1
})
......
......@@ -29,7 +29,7 @@ const TabFormErrors = (props) => {
}
const fetchMenuData = async () => {
const res = await PublicApi.getMemberRoleAuthTree()
const res = await PublicApi.getMemberManageRoleAuthTree()
return res
}
......@@ -52,7 +52,7 @@ const MemberDetail: React.FC<{}> = () => {
getTreeMaps,
} = useTreeTabs({
fetchMenuData,
fetchItemDetailData: ({id}) => PublicApi.getMemberRoleAuthButton({
fetchItemDetailData: ({id}) => PublicApi.getMemberManageRoleAuthButton({
menuId: id
})
})
......@@ -70,12 +70,12 @@ const MemberDetail: React.FC<{}> = () => {
// 编辑和预览模式下需回显数据
const fetchRoleMenuDetail = async (id) => {
// 10秒缓存
const res = await PublicApi.getMemberRoleGet({
memberRoleId: id
const res = await PublicApi.getMemberManageRoleGet({
MemberManageRoleId: id
}, { useCache: true, ttl: 10 * 1000 })
return res
}
// 储存的按钮数据
const [buttonInfos, setButtonInfos] = useState<any>([])
......@@ -106,13 +106,13 @@ const MemberDetail: React.FC<{}> = () => {
const treeCheckIds = treeActions.getSelectKeys()
const menuIds = [...buttonCheckIds, ...treeCheckIds]
if (pageStatus === PageStatus.EDIT) {
await PublicApi.postMemberRoleUpdate({
await PublicApi.postMemberManageRoleUpdate({
...values,
memberRoleId: id,
MemberManageRoleId: id,
menuIds
})
} else {
await PublicApi.postMemberRoleAdd({
await PublicApi.postMemberManageRoleAdd({
...values,
menuIds
})
......@@ -225,7 +225,7 @@ const MemberDetail: React.FC<{}> = () => {
/>
</Col>
</Row>
</TabsItem>
</Tabs>
</div>
......
......@@ -29,7 +29,7 @@ const formActions = createFormActions()
const treeActions = createTreeActions()
const fetchMenuData = async (params?) => {
const res = await PublicApi.getMemberOrgTree()
const res = await PublicApi.getMemberManageOrgTree()
return res
}
......@@ -52,9 +52,9 @@ const Organ: React.FC<{}> = () => {
} = useTreeTabs({
treeActions,
formActions,
deleteMenu: PublicApi.postMemberOrgDelete,
deleteMenu: PublicApi.postMemberManageOrgDelete,
fetchMenuData: fetchMenuData,
fetchItemDetailData: PublicApi.getMemberOrgGet
fetchItemDetailData: PublicApi.getMemberManageOrgGet
})
// 当拥有节点数据并且当前状态是编辑状态时 需回显表单
......@@ -63,7 +63,7 @@ const Organ: React.FC<{}> = () => {
const handleSubmitAllSetting = () => {
formActions.submit()
}
// 保存设置提交
const handleSubmit = (value) => {
// 去掉模拟的key, 为true的时候是编辑
......@@ -72,7 +72,7 @@ const Organ: React.FC<{}> = () => {
...value,
parentId: nodeRecord ? nodeRecord.parentId : 0,
}
const fn = editOrAdd ? PublicApi.postMemberOrgUpdate : PublicApi.postMemberOrgAdd
const fn = editOrAdd ? PublicApi.postMemberManageOrgUpdate : PublicApi.postMemberManageOrgAdd
fn(params).then(res => {
if (res.code === 1000) {
resetMenu()
......@@ -90,7 +90,7 @@ const Organ: React.FC<{}> = () => {
<h3 className="commonPanelTitle mb-30">选择要编辑的项目</h3>
{
treeData && treeData.length > 0
? <TabTree
? <TabTree
fetchData = {params => fetchMenuData(params)}
treeData={treeData}
toolsRender={toolsRender}
......@@ -101,7 +101,7 @@ const Organ: React.FC<{}> = () => {
:
<Button block type='primary' onClick={() => handleSelect()}>暂无菜单, 开始新增</Button>
}
</Col>
<Col span={16}>
{treeStatus !== FormState.FREE && <>
......
......@@ -18,7 +18,7 @@ import { STATUS_ENUM } from '@/constants';
// 模拟请求
const fetchData = async (params) => {
const { data } = await PublicApi.getMemberUserPage(params)
const { data } = await PublicApi.getMemberManageUserPage(params)
return data
}
......@@ -30,7 +30,7 @@ const UserSystem: React.FC<{}> = () => {
}
const deleteItem = (record) => {
// 删除该项
PublicApi.postMemberUserDelete({
PublicApi.postMemberManageUserDelete({
userId: record.userId
}).then(() => {
ref.current.reload()
......@@ -42,7 +42,7 @@ const UserSystem: React.FC<{}> = () => {
}
const handleStatus = (record) => {
PublicApi.postMemberUserUpdatestatus({
PublicApi.postMemberManageUserUpdatestatus({
userId: record.userId,
status: record.status === 1 ? 0 : 1
}).then(res => {
......
......@@ -156,7 +156,7 @@ export const UserDetailSchema:ISchema = {
type: 'string',
visible: false
},
memberRoleIds: {
MemberManageRoleIds: {
type: 'array:string',
"x-component": 'tableTagList',
"x-component-props": {
......@@ -171,8 +171,8 @@ export const UserDetailSchema:ISchema = {
}
]
},
}
}
}
}
\ No newline at end of file
}
......@@ -27,7 +27,7 @@ const titleRender = (title) => {
}
const fetchOriginTreeData = async (params?) => { // 平台后台树
const res = await PublicApi.getMemberOrgTree({}, { ttl: 10, useCache: true })
const res = await PublicApi.getMemberManageOrgTree({}, { ttl: 10, useCache: true })
return res
}
......@@ -42,7 +42,7 @@ const AddUser: React.FC<{}> = () => {
const { id, pageStatus } = usePageStatus()
const [roleSelection, roleSelectCtl] = useRowSelectionTable()
const [originSelectNode, setOriginSelectNode] = useState<any>()
const { data, loading, err, run } = useHttpRequest(id ? PublicApi.postMemberUserUpdate : PublicApi.postMemberUserAdd)
const { data, loading, err, run } = useHttpRequest(id ? PublicApi.postMemberManageUserUpdate : PublicApi.postMemberManageUserAdd)
const {
treeData: originTreeData,
} = useTreeTabs({
......@@ -50,24 +50,24 @@ const AddUser: React.FC<{}> = () => {
})
useEffect(() => {
if (id) {
PublicApi.getMemberUserGet({
PublicApi.getMemberManageUserGet({
userId: id
}).then(async res => {
const { data } = res
fetchOriginTreeData().then(({data: dataSource}) => {
setFormData({...data, orgName: getParentTreeTitles(dataSource, data.orgId), memberRoleIds: data.memberRoleIds.map((v,i) => {
setFormData({...data, orgName: getParentTreeTitles(dataSource, data.orgId), MemberManageRoleIds: data.memberRoleIds.map((v,i) => {
return {
id: v,
roleName: data.memberRoleNames[i]
}
})})
})})
})
})
}
}, [])
const onFinish = async (values:any) => {
values.memberRoleIds = values.memberRoleIds.map(v => v.id)
values.MemberManageRoleIds = values.MemberManageRoleIds.map(v => v.id)
values.password = encryptedByAES(values.password)
const omitValue = omit(values, ['orgName'])
const params = id ? {
......@@ -83,7 +83,7 @@ const AddUser: React.FC<{}> = () => {
// 角色确认弹窗
const roleConfirm = () => {
setRoleVisible(false)
userActions.setFieldValue('memberRoleIds', roleSelectCtl.selectRow)
userActions.setFieldValue('MemberManageRoleIds', roleSelectCtl.selectRow)
}
const handleSelectCancel = () => {
setRoleVisible(false)
......@@ -91,14 +91,14 @@ const AddUser: React.FC<{}> = () => {
const handleRoleBtn = () => {
setRoleVisible(true)
const selectRoles = userActions.getFieldValue('memberRoleIds')
const selectRoles = userActions.getFieldValue('MemberManageRoleIds')
roleSelectCtl.setSelectRow(selectRoles)
roleSelectCtl.setSelectedRowKeys(selectRoles.map(v => v.id))
}
// 模拟请求
const fetchUserList = async (params:any) => {
const data = await PublicApi.getMemberRolePage(params)
const data = await PublicApi.getMemberManageRolePage(params)
return data.data
}
......@@ -144,7 +144,7 @@ const AddUser: React.FC<{}> = () => {
setOriginVisible(true)
}
const connectCategory = pageStatus !== PageStatus.PREVIEW ?
const connectCategory = pageStatus !== PageStatus.PREVIEW ?
<div className='connectBtn' onClick={openOriginTree}><LinkOutlined style={{marginRight: 4}}/>关联</div>
:
''
......@@ -233,7 +233,7 @@ const AddUser: React.FC<{}> = () => {
</Modal>
</div>
</DetailPage>
);
};
......
......@@ -59,7 +59,7 @@ const AccountDetail: React.FC<{}> = () => {
title: '交易时间',
dataIndex: 'tradeTime',
key: 'tradeTime',
render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss")
render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss")
},
{
title: '交易金额(元)',
......@@ -91,11 +91,11 @@ const AccountDetail: React.FC<{}> = () => {
title: '序号',
dataIndex: 'id',
key: 'id',
render: (t, c, i) => i + 1
render: (t, c, i) => i + 1
},
{
title: '操作角色',
dataIndex: ['memberAssetAccount','parentMemberRoleName'],
dataIndex: ['memberAssetAccount','parentMemberManageRoleName'],
key: 'id',
},
{
......@@ -116,7 +116,7 @@ const AccountDetail: React.FC<{}> = () => {
title: '操作时间',
dataIndex: 'createTime',
key: 'createTime',
render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss")
render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss")
},
{
title: '意见',
......@@ -150,7 +150,7 @@ const AccountDetail: React.FC<{}> = () => {
backIcon={<ReutrnEle />}
extra={[
<Button
key="1"
key="1"
onClick={handleRelieve}
type="primary"
icon={details?.accountStatus === 1 ? <SettingOutlined /> : <StopOutlined />}
......@@ -257,8 +257,8 @@ const AccountDetail: React.FC<{}> = () => {
layout="vertical"
form={checkForm}
>
<Form.Item
name="remark"
<Form.Item
name="remark"
label={details?.accountStatus === 1 ? '会员冻结原因' : '会员解冻原因'}
rules={[
{
......
......@@ -49,8 +49,8 @@ const AccountLists: React.FC<{}> = () => {
},
{
title: '会员角色',
dataIndex: 'memberRoleName',
key: 'memberRoleName',
dataIndex: 'MemberManageRoleName',
key: 'MemberManageRoleName',
},
// {
// title: '会员等级',
......@@ -125,7 +125,7 @@ const AccountLists: React.FC<{}> = () => {
return {
memberType: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
memberRoleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
MemberManageRoleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
memberLevel: levels.map(item => ({ label: item.levelTag, value: item.level })),
}
}
......@@ -169,7 +169,7 @@ const AccountLists: React.FC<{}> = () => {
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberType', 'memberRoleId', 'memberLevel'],
['memberType', 'MemberManageRoleId', 'memberLevel'],
fetchSelectOptions,
);
}}
......
......@@ -48,7 +48,7 @@ export const searchSchema: ISchema = {
}
}
},
memberRoleId: {
MemberManageRoleId: {
type: 'string',
enum: [],
"x-component-props": {
......@@ -163,4 +163,4 @@ export const rechargeSchema: ISchema = {
}
}
}
}
\ No newline at end of file
}
......@@ -43,7 +43,7 @@ const CheckDetail: React.FC<{}> = () => {
if(code === 1000) {
let bankRes: any = await PublicApi.getSettleAccountsGetMemberAccountConfig({
memberId: data.memberId,
roleId: data.memberRoleId,
roleId: data.MemberManageRoleId,
})
setBankDetail(bankRes.data)
}
......
......@@ -50,7 +50,7 @@ const PaymentDetail: React.FC<{}> = () => {
if(code === 1000) {
let bankRes: any = await PublicApi.getSettleAccountsGetMemberAccountConfig({
memberId: data.memberId,
roleId: data.memberRoleId,
roleId: data.MemberManageRoleId,
})
setBankDetail(bankRes.data)
}
......
......@@ -7,9 +7,9 @@ import cx from 'classnames'
import ReutrnEle from '@/components/ReturnEle'
import styles from "./index.less"
import { PublicApi } from '@/services/api'
import {
GetProductCommodityGetCommodityResponse,
GetProductCommodityGetCommodityCheckRecordResponse,
import {
GetProductCommodityGetCommodityResponse,
GetProductCommodityGetCommodityCheckRecordResponse,
} from '@/services'
import moment from 'moment'
import { CaretDownOutlined, CaretUpOutlined } from '@ant-design/icons'
......@@ -34,7 +34,7 @@ const { Step } = Steps;
const { TabPane } = Tabs;
const viewProducts: React.FC<{}> = () => {
const [productDetail, setPorductDetail] = useState<any>()
const [checkRecord, setCheckRecord] = useState<GetProductCommodityGetCommodityCheckRecordResponse>()
const [fixStep, setFixStep] = useState(0)
......@@ -90,7 +90,7 @@ const viewProducts: React.FC<{}> = () => {
setLogisticResourceSendAddress(provinceName + cityName + districtName + address)
})
}, [productDetail])
const columns: ColumnType<any>[] = [
{
title: '序号',
......@@ -100,8 +100,8 @@ const viewProducts: React.FC<{}> = () => {
},
{
title: '角色',
dataIndex: 'memberRoleName',
key: 'memberRoleName',
dataIndex: 'MemberManageRoleName',
key: 'MemberManageRoleName',
},
{
title: '状态',
......@@ -137,7 +137,7 @@ const viewProducts: React.FC<{}> = () => {
title: '操作时间',
dataIndex: 'createTime',
key: 'createTime',
render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss")
render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss")
},
{
title: '意见',
......@@ -186,14 +186,14 @@ const viewProducts: React.FC<{}> = () => {
component = (<><span className="commonStatusValid"></span>审核通过</>)
else if (status === 3)
component = (<><span className="commonStatusInvalid"></span>审核不通过</>)
else
else
component = null
}else
if (status === 5)
component = (<span style={{ color: '#00B37A', padding: '2px 5px', background: 'rgba(235,247,242,1)', borderRadius: '4px' }}>已上架</span>)
component = (<span style={{ color: '#00B37A', padding: '2px 5px', background: 'rgba(235,247,242,1)', borderRadius: '4px' }}>已上架</span>)
else if (status === 6)
component = (<span style={{ padding: '2px 5px', background: 'rgba(244,245,247,1)', borderRadius: '4px' }}>已下架</span>)
else
else
component = null
return component
}
......@@ -220,7 +220,7 @@ const viewProducts: React.FC<{}> = () => {
<Descriptions.Item label="商品类型"><span className="commonStatusValid"></span>{renderCustomerCategoryType(productDetail?.customerCategory?.type)}</Descriptions.Item>
</Descriptions>
</>
const renderPriceType = (type: number) => {
if(type === 1 ) return '现货价格'
if(type === 2 ) return '价格需要询价'
......@@ -258,22 +258,22 @@ const viewProducts: React.FC<{}> = () => {
})
attributeByValue.map(_ => {
_col.push({
title: _.name,
dataIndex: _.name,
title: _.name,
dataIndex: _.name,
key: '索引'
})
})
}
if(item.goods?.id){ // 存在货品
_col.push({
title: '对应货品',
dataIndex: '对应货品',
key: '索引',
title: '对应货品',
dataIndex: '对应货品',
key: '索引',
})
}
}
_col.push({
title: product?.priceType===3?'所需积分':'单价(元)',
title: product?.priceType===3?'所需积分':'单价(元)',
dataIndex: '单价',
key: '单价',
render: (text, record) => {
......@@ -337,8 +337,8 @@ const viewProducts: React.FC<{}> = () => {
return <>
<p>
{
str === 'area'
?
str === 'area'
?
showDataSource.map((_item, _i) => <p key={_i}>{_item.provinceName+'/'+(_item.cityName||'')}</p>)
:
showDataSource.map((_item, _i) => <p key={_i}>{_item.name}</p>)
......@@ -412,7 +412,7 @@ const viewProducts: React.FC<{}> = () => {
</Col>
</Row>
{
productDetail?.commodityShopList?.length>0 &&
productDetail?.commodityShopList?.length>0 &&
<Row>
<Col span={4}>
<p>上架商城:</p>
......@@ -431,7 +431,7 @@ const viewProducts: React.FC<{}> = () => {
<Col span={8}>
<Card headStyle={{borderBottom:'none'}} title="物流信息" style={{height:'100%'}}>
{
renderDeliveryType(productDetail?.logistics?.deliveryType) &&
renderDeliveryType(productDetail?.logistics?.deliveryType) &&
<Row>
<Col span={4}>
<p>配送方式:</p>
......@@ -453,7 +453,7 @@ const viewProducts: React.FC<{}> = () => {
</Row>
}
{
productDetail?.logistics?.weight &&
productDetail?.logistics?.weight &&
<Row>
<Col span={4}>
<p>重量:</p>
......@@ -464,7 +464,7 @@ const viewProducts: React.FC<{}> = () => {
</Row>
}
{
logisticTemplateName &&
logisticTemplateName &&
<Row>
<Col span={4}>
<p>运费模版:</p>
......@@ -475,7 +475,7 @@ const viewProducts: React.FC<{}> = () => {
</Row>
}
{
logisticResourceCompanyName &&
logisticResourceCompanyName &&
<Row>
<Col span={4}>
<p>物流公司:</p>
......@@ -486,7 +486,7 @@ const viewProducts: React.FC<{}> = () => {
</Row>
}
{
logisticResourceSendAddress &&
logisticResourceSendAddress &&
<Row>
<Col span={4}>
<p>发货地址:</p>
......@@ -629,13 +629,13 @@ const viewProducts: React.FC<{}> = () => {
{/* 没有价格属性默认一行直接显示图片 */}
<div className={styles.productImgBox}>
{
productDetail?.unitPriceAndPicList[0].commodityPic.length>0 && productDetail?.unitPriceAndPicList[0].commodityPic.map((_item, index) =>
productDetail?.unitPriceAndPicList[0].commodityPic.length>0 && productDetail?.unitPriceAndPicList[0].commodityPic.map((_item, index) =>
<Image
key={index}
className={styles.imgItem}
width={104}
src={_item}
alt="商品图片"
src={_item}
alt="商品图片"
/>)
}
</div>
......@@ -662,13 +662,13 @@ const viewProducts: React.FC<{}> = () => {
<Divider />
<div className={styles.productImgBox}>
{
imageArrByImageRender.length>0 && imageArrByImageRender[index].map((_item, _index) =>
<Image
key={_index}
imageArrByImageRender.length>0 && imageArrByImageRender[index].map((_item, _index) =>
<Image
key={_index}
className={styles.imgItem}
width={104}
src={_item}
alt="商品图片"
src={_item}
alt="商品图片"
/>)
}
</div>
......@@ -682,7 +682,7 @@ const viewProducts: React.FC<{}> = () => {
<Card headStyle={{borderBottom:'none'}} title="商品描述">
{/* 文字区块 */}
{
productDetail?.commodityRemark?.word?.length>0 &&
productDetail?.commodityRemark?.word?.length>0 &&
<div className={cx(styles.descriptionBox, styles.descriptionWordBox)}>
{
productDetail?.commodityRemark?.word.map((_item, _index) =>
......@@ -693,7 +693,7 @@ const viewProducts: React.FC<{}> = () => {
}
{/* 视频区块 */}
{
productDetail?.commodityRemark?.video?.length>0 &&
productDetail?.commodityRemark?.video?.length>0 &&
<div className={styles.descriptionBox}>
{
productDetail?.commodityRemark?.video.map((_item, _index)=> <div key={_index} className={styles.videoItem}>
......@@ -706,14 +706,14 @@ const viewProducts: React.FC<{}> = () => {
}
{/* 图片区块 */}
{
productDetail?.commodityRemark?.image?.length>0 &&
productDetail?.commodityRemark?.image?.length>0 &&
<div className={styles.descriptionBox}>
{
productDetail?.commodityRemark?.image.map((_item, _index)=> _item &&
<Image
productDetail?.commodityRemark?.image.map((_item, _index)=> _item &&
<Image
key={_index}
width={180}
src={_item}
src={_item}
alt="商品图片描述"
className={styles.imgItem}
/>)
......
......@@ -227,7 +227,7 @@ const auditList: React.FC<PageProps> = props => {
});
return {
memberType: fetchSelectOptions(data.memberTypes),
roleId: fetchSelectOptions(data.memberRoles),
roleId: fetchSelectOptions(data.MemberManageRoles),
level: fetchSelectOptions(data.memberLevels),
source: fetchSelectOptions(data.memberSource),
};
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -53,7 +53,7 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => {
const processEnum = data.processEnum
useEffect(() => {
PublicApi.getPayPayWayList({memberId: data.supplyMembersId, memberRoleId: data.supplyMembersRoleId}).then(res => {
PublicApi.getPayPayWayList({memberId: data.supplyMembersId, MemberManageRoleId: data.supplyMembersRoleId}).then(res => {
const { code, data } = res
if (code === 1000) {
setPaylist(data)
......
......@@ -300,7 +300,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = (props) => {
return await Promise.all(asyncData.filter(v => v.memberPrice === undefined).map(async v => {
const {code, data} = await PublicApi.getMemberManageUpperCreditParamGet({
parentMemberId: v.memberId,
parentMemberRoleId: v.memberRoleId
parentMemberManageRoleId: v.MemberManageRoleId
}, {ttl: 60 * 1000, useCache: true})
return code === 1000 ? { value: (data.parameter * 100) + '%', id: v.id } : { value: '', id: 0 }
}
......
......@@ -23,7 +23,7 @@ const asyncPadDataForProduct = async (ctx: ISchemaFormActions | ISchemaFormAsync
const asyncPriceRequests: any[] = await Promise.all(productData.filter(v => v.memberPrice === undefined).map(async v => {
const {code, data} = await PublicApi.getMemberManageUpperCreditParamGet({
parentMemberId: v.memberId,
parentMemberRoleId: v.memberRoleId
parentMemberManageRoleId: v.MemberManageRoleId
}, {ttl: 60 * 1000, useCache: true})
return code === 1000 ? { value: (data.parameter * 100) + '%', id: v.id } : { value: '', id: 0 }
}
......@@ -55,12 +55,12 @@ const asyncPadDataForProduct = async (ctx: ISchemaFormActions | ISchemaFormAsync
// return v
// }))
// }
// 配送方式请求
// const asyncAddressRequests = productData.filter(v => v.distributeMode !== undefined)
}
export const createEffects = context => () => {
}
export const useModelTypeChange = (callback) => {
......@@ -136,7 +136,7 @@ export const useOrderFormInitEffect = (ctx: ISchemaFormActions | ISchemaFormAsyn
}
export const useProductAddress = (ctx: ISchemaFormActions | ISchemaFormAsyncActions) => {
fetchOrderApi.getProductAddressAll().then(data => {
ctx.setFieldState('deliveryAddresId', state => {
if (data.length > 0 && !state.value) {
......
import React, { useEffect, useState } from 'react';
import { Descriptions, Space, Button, Spin } from 'antd';
import { PublicApi } from '@/services/api';
interface BalanceProps {
/**
* 弹窗需要的数据值
*/
value: {[key: string]: any};
/**
* 关闭事件
*/
handleModalVisible: () => void;
/**
* 弹窗内确认事件
*/
handleConfirm: (values: {[key: string]: any}, modalName: string) => void;
/**
* 弹窗提交 loading
*/
submitLoading: boolean;
/**
* 采购商id
*/
purchaserId: number,
/**
* 采购商角色id
*/
purchaserRoleId: number,
};
const Balance: React.FC<BalanceProps> = ({
handleModalVisible,
handleConfirm,
value,
submitLoading,
purchaserId,
purchaserRoleId,
}) => {
const [balance, setBalance] = useState(0);
const [loading, setLoading] = useState(false);
const getPayAssetAccountGetUserBalance = () => {
if (!purchaserId || !purchaserRoleId) {
return;
}
setLoading(true);
PublicApi.getPayAssetAccountGetChildUserBalance({
childMemberId: `${purchaserId}`,
childMemberRoleId: `${purchaserRoleId}`,
}).then(res => {
if (res.code === 1000) {
setBalance(res.data);
}
}).finally(() => {
setLoading(false);
});
};
useEffect(() => {
getPayAssetAccountGetUserBalance();
}, []);
return (
<Spin spinning={loading}>
<Descriptions title="账户余额信息" column={1}>
<Descriptions.Item label="账户可用余额">{balance}</Descriptions.Item>
<Descriptions.Item label="当前退款金额">
<span style={{ color: '#EF6260' }}>{value.refundAmount}</span>
</Descriptions.Item>
</Descriptions>
<div style={{ marginTop: 20, textAlign: 'center' }}>
<Space>
<Button onClick={handleModalVisible}>
取消
</Button>
<Button
type="primary"
onClick={() => handleConfirm(value, 'balance')}
loading={submitLoading}
>
退款
</Button>
</Space>
</div>
</Spin>
)
};
export default Balance;
\ No newline at end of file
import React, { useEffect, useState } from 'react';
import { Descriptions, Space, Button, Spin } from 'antd';
import { PublicApi } from '@/services/api';
interface BalanceProps {
/**
* 弹窗需要的数据值
*/
value: {[key: string]: any};
/**
* 关闭事件
*/
handleModalVisible: () => void;
/**
* 弹窗内确认事件
*/
handleConfirm: (values: {[key: string]: any}, modalName: string) => void;
/**
* 弹窗提交 loading
*/
submitLoading: boolean;
/**
* 采购商id
*/
purchaserId: number,
/**
* 采购商角色id
*/
purchaserRoleId: number,
};
const Balance: React.FC<BalanceProps> = ({
handleModalVisible,
handleConfirm,
value,
submitLoading,
purchaserId,
purchaserRoleId,
}) => {
const [balance, setBalance] = useState(0);
const [loading, setLoading] = useState(false);
const getPayAssetAccountGetUserBalance = () => {
if (!purchaserId || !purchaserRoleId) {
return;
}
setLoading(true);
PublicApi.getPayAssetAccountGetChildUserBalance({
childMemberId: `${purchaserId}`,
childMemberManageRoleId: `${purchaserRoleId}`,
}).then(res => {
if (res.code === 1000) {
setBalance(res.data);
}
}).finally(() => {
setLoading(false);
});
};
useEffect(() => {
getPayAssetAccountGetUserBalance();
}, []);
return (
<Spin spinning={loading}>
<Descriptions title="账户余额信息" column={1}>
<Descriptions.Item label="账户可用余额">{balance}</Descriptions.Item>
<Descriptions.Item label="当前退款金额">
<span style={{ color: '#EF6260' }}>{value.refundAmount}</span>
</Descriptions.Item>
</Descriptions>
<div style={{ marginTop: 20, textAlign: 'center' }}>
<Space>
<Button onClick={handleModalVisible}>
取消
</Button>
<Button
type="primary"
onClick={() => handleConfirm(value, 'balance')}
loading={submitLoading}
>
退款
</Button>
</Space>
</div>
</Spin>
)
};
export default Balance;
......@@ -20,7 +20,7 @@ const fetchData = async (params:any) => {
return data.data
}
const MemberRoleManage: React.FC<{}> = () => {
const MemberManageRoleManage: React.FC<{}> = () => {
const ref = useRef<any>({})
const columns: ColumnType<{}>[] = [
......@@ -121,4 +121,4 @@ const MemberRoleManage: React.FC<{}> = () => {
)
}
export default MemberRoleManage
export default MemberManageRoleManage
......@@ -34,7 +34,7 @@ export interface RuleSettingProps {
const RuleSetting:React.FC<RuleSettingProps> = (props) => {
const { addSchemaAction, schema, formSubmit, onFieldChange = () => {} } = props
const [visibleChannelRroduct, setVisibleChannelRroduct] = useState(false)
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({customKey: 'memberRoleId'})
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({customKey: 'MemberManageRoleId'})
const [initValue, setInitialValue] = useState({})
const [membersLength, setMembersLength] = useState(0)
......@@ -43,23 +43,23 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
preview,
pageStatus
} = usePageStatus()
const fetchMembersList = async (params) => {
const res = await PublicApi.getMemberManageAllProviderPage(params)
const { code, data } = res
let _data = data.data.map(item => ({ ...item, memberRoleId: item.memberId + '_' + item.roleId }))
let _data = data.data.map(item => ({ ...item, MemberManageRoleId: item.memberId + '_' + item.roleId }))
return { totalCount: data.totalCount, data: _data }
}
// table删除商品
const handleDeleteTable = (id) => {
const value = addSchemaAction.getFieldValue('memberIds')
addSchemaAction.setFieldValue('memberIds', findItemAndDelete(value, id, 'memberRoleId'))
addSchemaAction.setFieldValue('memberIds', findItemAndDelete(value, id, 'MemberManageRoleId'))
}
const handleAddMemberBtn = () => {
const checkBoxs = addSchemaAction.getFieldValue('memberIds')
memberRowCtl.setSelectedRowKeys(checkBoxs.map(v => v.memberRoleId))
memberRowCtl.setSelectedRowKeys(checkBoxs.map(v => v.MemberManageRoleId))
memberRowCtl.setSelectRow(checkBoxs)
setVisibleChannelRroduct(true)
}
......@@ -68,37 +68,37 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
const tableAddButton = <Button style={{marginBottom: 16}} block icon={<PlusOutlined/>} onClick={handleAddMemberBtn} type='dashed'>选择指定会员</Button>
const tableColumns = [
{
{
dataIndex: 'memberId',
title: 'ID',
key: 'memberId'
},
{
dataIndex: 'memberName',
title: '会员名称',
{
dataIndex: 'memberName',
title: '会员名称',
key: 'memberName',
// render: (_, record) => <EyePreview url={`/memberCenter/commodityAbility/commodity/products/viewProducts?id=${record.id}`}>{_}</EyePreview>
// render: (_, record) => <EyePreview url={`/memberCenter/commodityAbility/commodity/products/viewProducts?id=${record.id}`}>{_}</EyePreview>
},
{
dataIndex: 'memberTypeName',
title: '会员类型',
{
dataIndex: 'memberTypeName',
title: '会员类型',
key: 'memberTypeName'
},
{
dataIndex: 'roleName',
title: '会员角色',
{
dataIndex: 'roleName',
title: '会员角色',
key: 'roleName'
},
{
dataIndex: 'levelTag',
title: '会员等级',
{
dataIndex: 'levelTag',
title: '会员等级',
key: 'levelTag',
render: (text, record) => <LevelBrand level={record.level} />
},
{
dataIndex: 'ctl',
title: '操作',
render: (_, record) => <Button type='link' onClick={() => handleDeleteTable(record.memberRoleId)}>删除</Button>
{
dataIndex: 'ctl',
title: '操作',
render: (_, record) => <Button type='link' onClick={() => handleDeleteTable(record.MemberManageRoleId)}>删除</Button>
}
]
......@@ -119,34 +119,34 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
}
const columnsSetProduct: any[] = [
{
dataIndex: 'memberRoleId',
{
dataIndex: 'MemberManageRoleId',
title: 'MRID',
key: 'memberRoleId',
key: 'MemberManageRoleId',
className: 'commonHide'
},
{
{
dataIndex: 'memberId',
title: 'ID',
key: 'memberId'
},
{
dataIndex: 'name',
title: '会员名称',
{
dataIndex: 'name',
title: '会员名称',
key: 'name'
},
{
dataIndex: 'memberTypeName',
{
dataIndex: 'memberTypeName',
title: '会员类型',
key: 'memberTypeName'
},
{
dataIndex: 'roleName',
title: '会员角色',
{
dataIndex: 'roleName',
title: '会员角色',
key: 'roleName'
},
{
dataIndex: 'levelTag',
{
dataIndex: 'levelTag',
title: '会员等级',
key: 'levelTag',
render: (text, record) => <LevelBrand level={record.level} />
......@@ -220,10 +220,10 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
const res = await PublicApi.getMemberManagePageitems({roleTypeEnum: '1'})
if (res.code === 1000) {
const { data = {} }: any = res
const {
memberTypes = [],
roles = [],
levels = [],
const {
memberTypes = [],
roles = [],
levels = [],
} = data
return {
......@@ -258,7 +258,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
const getBindingMembers = async ({id = '1', current = '1', pageSize = '10'}) => {
const res = await PublicApi.getOrderTradingRulesBackgroundMember({id, current, pageSize})
const { code, data } = res
let _data = data.data.map(item => ({ ...item, memberRoleId: item.memberId + '_' + item.roleId }))
let _data = data.data.map(item => ({ ...item, MemberManageRoleId: item.memberId + '_' + item.roleId }))
return { totalCount: data.totalCount, data: _data }
}
......@@ -283,7 +283,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
membersLength
}}
components={{
SelectProcesss,
SelectProcesss,
}}
effects={($, { setFieldState }) => {
FormEffectHooks.onFormInputChange$().subscribe(() => {
......@@ -306,8 +306,8 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
fetchTableData={params => fetchMembersList(params)}
formilyProps={
{
ctx: {
schema: formMember,
ctx: {
schema: formMember,
components: { ModalSearch: Search, SearchSelect, Submit } ,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
......@@ -325,7 +325,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
}
}
tableProps={{
rowKey: 'memberRoleId'
rowKey: 'MemberManageRoleId'
}}
/>
......@@ -335,4 +335,4 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
RuleSetting.defaultProps = {}
export default RuleSetting
\ No newline at end of file
export default RuleSetting
......@@ -105,7 +105,7 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
type: 'array:number',
"x-component": 'MultTable',
"x-component-props": {
rowKey: 'memberRoleId',
rowKey: 'MemberManageRoleId',
columns: "{{tableColumns}}",
prefix: "{{tableAddButton}}"
}
......
......@@ -52,8 +52,8 @@ const viewBrand: React.FC<{}> = () => {
},
{
title: '角色',
dataIndex: 'memberRoleName',
key: 'memberRoleName',
dataIndex: 'MemberManageRoleName',
key: 'MemberManageRoleName',
},
{
title: '状态',
......
......@@ -43,8 +43,8 @@ const CheckBrand: React.FC<{}> = () => {
},
{
title: '角色',
dataIndex: 'memberRoleName',
key: 'memberRoleName',
dataIndex: 'MemberManageRoleName',
key: 'MemberManageRoleName',
},
{
title: '状态',
......
......@@ -9659,10 +9659,10 @@ lines-and-columns@^1.1.6:
resolved "http://10.0.0.19:4873/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=
lingxi-design-ui@^1.1.19:
version "1.1.19"
resolved "http://10.0.0.19:4873/lingxi-design-ui/-/lingxi-design-ui-1.1.19.tgz#6e360011d9c4a8cd246127fd52b8d3032f39b226"
integrity sha512-IYTiAB1zR3EPI7iC9kYV+BI3MQaiI3eSppNKRD01K12MTyrtwaXSsDS/tSWvkLkEX3RCg87HsPAomuj8nvwDKQ==
lingxi-design-ui@^1.1.23:
version "1.1.23"
resolved "http://10.0.0.19:4873/lingxi-design-ui/-/lingxi-design-ui-1.1.23.tgz#519adb25e6f45766aec97534255f4197413567d0"
integrity sha512-Y/ko6Qy8torCJSUy+BCmQjEU2JdhxOK4/VxA08xhYg7Ix83BdwGYG1x7EZyF38IwYL2oYplM0Bc9oiW9ZoyYtg==
dependencies:
"@ant-design/icons" "^4.2.1"
"@ant-design/react-slick" "~0.26.1"
......@@ -9673,7 +9673,18 @@ lingxi-design-ui@^1.1.19:
react-slick "^0.26.1"
rgbaster "^2.1.1"
lingxi-design@^1.0.12, lingxi-design@^1.0.6:
lingxi-design@^1.0.14:
version "1.0.14"
resolved "http://10.0.0.19:4873/lingxi-design/-/lingxi-design-1.0.14.tgz#cb0780d4d70616ae574511a91e7c3f79017d4ea6"
integrity sha512-3ETODse8c13caqRyR0lXUsB2Jv5uwssCjGwOml270HHOyF0vmqN7/pOCnkSjewE0MsOyT6CzwFOAHJuidH45ug==
dependencies:
"@ant-design/icons" "^4.2.1"
lingxi-editor-core "^1.0.7"
lodash "^4.17.15"
react "^16.13.1"
react-dom "^16.13.1"
lingxi-design@^1.0.6:
version "1.0.12"
resolved "http://10.0.0.19:4873/lingxi-design/-/lingxi-design-1.0.12.tgz#e9a58e4330c603219b21145991942155f93d1f32"
integrity sha512-r5elokQwzDj/KhZhjUKXZreXXII/y796ILhnpAx1yJ5dDRxh0cOgveT911Tw5VJBVIddog8lGSWlEdurmgG39Q==
......
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