Commit ee5765c4 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents 96cc8220 4dcc1be6
......@@ -28,5 +28,6 @@
.vscode
config/base.config.json
src/global/config/global.d.ts
src/services/*Api.ts
\ No newline at end of file
src/global/config/global.d.ts
src/services/*Api.ts
src/services/*Api
......@@ -75,7 +75,7 @@
"react-reconciler": "^0.25.1",
"rgbaster": "^2.1.1",
"typescript": "^3.9.7",
"umi": "^3.2.16",
"umi": "3.2.28",
"video-react": "^0.14.1",
"yorkie": "^2.0.0"
},
......@@ -92,7 +92,7 @@
"fs-extra": "^9.0.1",
"glob": "^7.1.6",
"god-upload-scp": "^1.2.0",
"god-yapi2ts": "^1.6.0",
"god-yapi2ts": "1.9.0",
"gulp": "^4.0.2",
"gulp-git": "^2.10.1",
"http-proxy-middleware": "^1.0.5",
......
This diff is collapsed.
......@@ -48,7 +48,8 @@ const InputNumber: React.FC<InputNumberPropsType> = (props) => {
const handleChange = (e) => {
const { value } = e.target;
const reg = /^\d*?$/;
const reg = /^\d*([.]?\d{0,3})$/
// console.log(reg.test(value), value)
if (reg.test(value)) {
onChange(value, 'change')
}
......@@ -56,15 +57,21 @@ const InputNumber: React.FC<InputNumberPropsType> = (props) => {
const handleBlur = (e) => {
const { value } = e.target;
if (value === "") {
let num: string = value
const reg = /^\d*(.$)/
if(reg.test(num)) {
num = value.replace('.', "")
}
console.log(num, "num")
if (num === "") {
onChange(minCount, 'blur')
} else {
if(Number(value) < minCount) {
if(Number(num) < minCount) {
onChange(minCount, 'blur')
} else if(Number(value) > maxCount) {
} else if(Number(num) > maxCount) {
onChange(maxCount, 'blur')
} else {
onChange(value, 'blur')
onChange(num, 'blur')
}
}
}
......@@ -72,7 +79,7 @@ const InputNumber: React.FC<InputNumberPropsType> = (props) => {
return (
<div className={styles.input_number}>
<div className={cx(styles.input_number_item, styles.reduce, value <= minCount ? styles.disable : '')} onClick={handleReduce}><MinusOutlined /></div>
<input disabled={disabled} maxLength={8} className={styles.input_number_input} value={value} onChange={handleChange} onBlur={handleBlur} />
<input disabled={disabled} maxLength={12} className={styles.input_number_input} value={value} onChange={handleChange} onBlur={handleBlur} />
<div className={cx(styles.input_number_item, styles.add, value >= maxCount ? styles.disable : '')} onClick={handleAdd}><PlusOutlined /></div>
</div>
)
......
......@@ -124,6 +124,11 @@
}
}
// 去除sogou浏览器自动加的密码软盘图标
input::-webkit-input-safebox-button{
display: none;
}
// 设置formitem的*号到字段label前
.ant-form-item-label>label.ant-form-item-required::before {
order: 10;
......
......@@ -18,6 +18,7 @@ import { useTreeTabs } from '@/hooks/useTreeTabs';
import { useHttpRequest } from '@/hooks/useHttpRequest';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ReutrnEle from '@/components/ReturnEle';
import { encryptedByAES } from '@/utils/cryptoAes';
const titleRender = (title) => {
if (title === PageStatus.PREVIEW) return '查看用户'
......@@ -70,6 +71,7 @@ const AddUser: React.FC<{}> = () => {
const onFinish = async (values: any) => {
values.memberRoleIds = values.memberRoleIds.map(v => v.id)
values.password = encryptedByAES(values.password);
const omitValue = omit(values, ['orgName'])
const params = id ? {
...omitValue,
......
......@@ -46,7 +46,11 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
onRef(logisticsFormRef)
if(history.location.query?.id){
setDeliveryType(productInfoByEdit.logistics?.deliveryType)
const { deliveryType, carriageType, useTemplate } = productInfoByEdit.logistics
setDeliveryType(deliveryType)
setCarriageType(carriageType)
setIsTemplate(useTemplate)
setTemplate(useTemplate)
logisticsForm.setFieldsValue(productInfoByEdit.logistics)
}else{
logisticsForm.setFieldsValue({deliveryType:1, carriageType:1})
......
......@@ -93,8 +93,6 @@ const Category: React.FC<CategoryPropsType> = (props) => {
break
case LAYOUT_TYPE.shopList:
getCategoryListFn = PublicApi.getProductPlatformGetCategoryTree
default:
break
}
getCategoryListFn && getCategoryListFn(param, { headers }).then((res) => {
if (res.code === 1000) {
......@@ -175,7 +173,6 @@ const Category: React.FC<CategoryPropsType> = (props) => {
return {
title: <span className={styles.sub_category_title}>{thirdCategoryItem.title}</span>,
name: thirdCategoryItem.title,
isLastNode: true,
key: thirdCategoryItem.id,
children: []
}
......@@ -189,9 +186,10 @@ const Category: React.FC<CategoryPropsType> = (props) => {
}
const handleSelect = (selectedKeys, info) => {
const { title, isLastNode, name } = info.node
console.log(info)
const { title, children, name } = info.node
setSelectedKeys(selectedKeys)
if (isLastNode) {
if (children.length === 0) {
if (lastCategoryId !== selectedKeys[0]) {
setLastCategoryId(selectedKeys[0])
}
......
......@@ -93,6 +93,10 @@ const PointsMall: React.FC<CommodityPropsType> = (props) => {
param.priceType = 3
getFn = PublicApi.postSearchShopChannelGetCommodityList
break
case LAYOUT_TYPE.shop:
param.storeId = shopId
getFn = PublicApi.postSearchShopScoreGetCommodityList
break
default:
getFn = PublicApi.postSearchShopScoreGetCommodityList
break
......
......@@ -33,7 +33,11 @@ const AccountDetail: React.FC<{}> = () => {
setDetails(data)
if(code === 1000) {
let bankRes = await PublicApi.getSettleAccountsCorporateAccountConfig({memberId: data.memberId + ''})
setBankDetail(bankRes.data)
if(bankRes.code === 1000) {
setBankDetail(bankRes.data)
} else {
message.error(bankRes.message)
}
}
}
......
import React, {useState, useRef, useEffect} from 'react'
import { history } from 'umi'
import { Button, Form, Card, Modal, Select, Table, Checkbox, Row, Col, Tooltip, Slider, InputNumber, Avatar } from 'antd'
import { Button, Form, Card, Modal, Select, Table, Checkbox, Row, Col, Tooltip, Slider, InputNumber, Avatar, message } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
PlusOutlined,
......@@ -38,10 +38,14 @@ const AddRepository:React.FC<{}> = (props) => {
if (params['applyMember']) {
params['applyMember'] = params['applyMember']
}
await PublicApi.postWarehouseFreightSpaceAdd(params)
setTimeout(() => {
history.goBack(-1)
}, 1000)
if(!params['isAllMemberShare'] && !params['applyMember']?.length) {
message.error('请选择指定会员')
} else {
await PublicApi.postWarehouseFreightSpaceAdd(params)
setTimeout(() => {
history.goBack(-1)
}, 1000)
}
}
return (
......
......@@ -24,11 +24,11 @@ const Commodity: React.FC = () => {
* 获取收藏的商品列表
*/
const fetchCollectCommodityList = () => {
let param = {
const param: any = {
current,
pageSize
}
//@ts-ignore
PublicApi.getSearchShopCommodityCollectGetCommodityCollectList(param).then(res => {
if (res.code === 1000) {
setList(res.data.data)
......@@ -38,16 +38,18 @@ const Commodity: React.FC = () => {
}
const linkToDetail = (detail) => {
let el = document.createElement('a')
const el = document.createElement('a')
switch (detail.type) {
case 1:
case 2:
el.href = `/shop/commodity/detail?id=${detail.commodity.id}&shopId=${btoa(JSON.stringify({ shopId: detail.storeId, memberId: detail.memberId }))}`;
el.href = `/shop/commodity/detail?id=${detail.commodity.id}&shopId=${btoa(JSON.stringify({ shopId: detail.commodity.storeId, memberId: detail.commodity.memberId, roleId: detail.commodity.memberRoleId }))}`;
break
case 3:
el.href = `${GlobalConfig.channelRootRoute}/commodity/detail?id=${detail.commodity.id}&channelId=${btoa(JSON.stringify({ memberId: detail.channelMemberId }))}`;
break
case 4:
el.href = `${GlobalConfig.ichannelRootRoute}/commodity/detail?id=${detail.commodity.id}&channelId=${btoa(JSON.stringify({ memberId: detail.channelMemberId }))}`;
break
case 5:
el.href = `${GlobalConfig.channelRootRoute}/commodity/detail?id=${detail.commodity.id}&channelId=${btoa(JSON.stringify({ memberId: detail.channelMemberId }))}`;
break
......@@ -104,7 +106,7 @@ const Commodity: React.FC = () => {
content: `是否要取消收藏?`,
onOk: () => {
return new Promise((resolve, reject) => {
let param: any = {
const param: any = {
commodityId: detail.commodity.id,
type: detail.type
}
......
......@@ -96,6 +96,9 @@
border: none!important;
box-shadow: 0 0 0 0 #fff;
}
&::-webkit-input-safebox-button{
display: none;
}
}
}
......
......@@ -330,7 +330,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
render: () => '是'
},
{
title: '金额',
title: creditsCommodity ? '所需积分小计' : '金额',
dataIndex: 'money',
align: 'center',
key: 'money',
......
......@@ -431,7 +431,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
render: () => '是'
},
{
title: '金额',
title: creditsCommodity ? '所需积分小计' : '金额',
dataIndex: 'money',
align: 'center',
key: 'money',
......
......@@ -33,6 +33,13 @@ const addressSchema: ISchema = {
{
required: true,
message: '请选择开具类型'
},
],
"x-linkages": [
{
type: 'value:visible',
target: 'taxNo',
condition: "{{$value === 1}}"
}
]
},
......
......@@ -63,6 +63,7 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
}, [sum, freePrice])
useEffect(() => {
// 存在商品 并且有选择收货地址,则开始计算运费
console.log(data,'ddd')
if (data && data.length > 0 && receiverAddressId) {
// 筛选配送方式为物流的商品并且使用了运费模板
const logsiticsDataMaps = data.filter(v => v.logistics && v.logistics.useTemplate && v.logistics.deliveryType === 1)
......
......@@ -12,7 +12,6 @@ import { Link, history, Helmet } from 'umi'
import ScanLoginWrap from './components/ScanLoginWrap';
// import leftPicture from '../../../mockStatic/image_ad.png'
import { PublicApi } from '@/services/api'
import { GetManageContentImageFindAllByUseSceneAndPositionResponse } from '@/services/PassApi'
import wechat from '../../../mockStatic/Wechat.png'
import qq from '../../../mockStatic/QQ.png'
import alipay from '../../../mockStatic/Alipay.png'
......@@ -20,7 +19,7 @@ import LoginWrap from './components/LoginWrap'
const User: React.FC = () => {
const [isScanQrCode, setIsScanQrCode] = useState(false)
const [sceneList, setSceneList] = useState<GetManageContentImageFindAllByUseSceneAndPositionResponse>()
const [sceneList, setSceneList] = useState<any>()
const handleGuideLogin = (param: boolean) => {
setIsScanQrCode(param)
......
import * as LogisticsApi from './LogisticsApi'
import * as PassApi from './PassApi'
import * as WarehouseApi from './WarehouseApi'
import * as MemberApi from './MemberApi'
import * as MemberApi from './memberApi'
import * as ProductApi from './ProductApi'
import * as TemplateApi from './TemplateApi'
import * as PayApi from './PayApi'
......@@ -9,8 +9,8 @@ import * as SearchApi from './SearchApi'
import * as OrderApi from './OrderApi'
import * as SettleApi from './SettleApi'
import * as AfterService from './AfterServiceApi'
import * as EnhanceApi from './EnhanceApi';
import * as ReportApi from './ReportApi';
import * as EnhanceApi from './EnhanceApi';
import * as ReportApi from './ReportApi';
/**
* 可在这里写入自定义的接口
......
const tokenList = [
{ name: 'Pass', token: 'b063a0a29fb1a570d9f00eaabbdd8ccfe8e6e10e24739441990cc1098e79b601' }, // 业务中台管理平台
{ name: 'Warehouse', token: '7c8f235d95f6224ceb97c4d832b09658f9a75fb8721a95699b230af0733d7fa4' }, // 仓库服务
{ name: 'Logistics', token: '8d14d945507d1f8cd89afe139ca6d111bbad25f702fafe0aec59d3c9cd2e0ffe' }, // 物流服务
{ name: 'Member', token: 'c0e920f071595a73ba234b6fa6cfe42192d3d740d59f030caa2c7f0f08777d78' }, // 商户会员管理服务
{ name: 'Product', token: 'dbfeae0baf614a6dd8f1de2b1403444cdfa9c052a3757da6a0d6d7d52fb26178' }, // 商品服务
{ name: 'Template', token: '7ec923520215c7e2f771867cb4d29cafbf823daf0fb2d3d9fa70b57a523c8bfb' }, // 店铺模板服务
{ name: 'Pay', token: '34608cd33222b1650795459d73b8eb0b260eb92cf5e8d1e646f85a4875e36f05' }, // 支付服务
{ name: 'Search', token: 'ca19f532efba91f7773cbfbd526b798c6ac83df670071e97d72c50dca1d53a48' }, // 搜索服务
{ name: 'Order', token: '31b93b223421ca52389b088a7457c651fab7c1bf658fc7dd38d0689d09c8e235' }, //订单服务
{ name: 'Settle', token: 'fffbeeaaa198c285955997c606bc279fc6950fea118580c786f2c73eecccaa6a' }, //结算服务
{ name: 'AfterService', token: '39db719680bf1b3db21bc1deda933cde16d17559e9676bf848ec96c1320e68df' }, // '售后服务'
// { name: '', token: 'c0e920f071595a73ba234b6fa6cfe42192d3d740d59f030caa2c7f0f08777d78' } // 商户会员管理服务
{ name: 'Enhance', token: '594a7e7ff17f6f40fb9fb726c1da9a3f282a926a8d386eb6cbfd668a3f75f251'}, // 加工服务
{ name: 'Report', token: '69ee5a79363c763ded1a2eb42952a5181ffcdfc5ffb93b6e1e22ac92a25b38bf'}, // 报表服务
{ name: 'Pass', token: 'b063a0a29fb1a570d9f00eaabbdd8ccfe8e6e10e24739441990cc1098e79b601', categoryIds: [0], }, // 业务中台管理平台
{ name: 'Warehouse', token: '7c8f235d95f6224ceb97c4d832b09658f9a75fb8721a95699b230af0733d7fa4', categoryIds: [0], }, // 仓库服务
{ name: 'Logistics', token: '8d14d945507d1f8cd89afe139ca6d111bbad25f702fafe0aec59d3c9cd2e0ffe', categoryIds: [0], }, // 物流服务
{ name: 'Member', token: 'c0e920f071595a73ba234b6fa6cfe42192d3d740d59f030caa2c7f0f08777d78', categoryIds: [0], }, // 商户会员管理服务
{ name: 'Product', token: 'dbfeae0baf614a6dd8f1de2b1403444cdfa9c052a3757da6a0d6d7d52fb26178', categoryIds: [0], }, // 商品服务
{ name: 'Template', token: '7ec923520215c7e2f771867cb4d29cafbf823daf0fb2d3d9fa70b57a523c8bfb', categoryIds: [0], }, // 店铺模板服务
{ name: 'Pay', token: '34608cd33222b1650795459d73b8eb0b260eb92cf5e8d1e646f85a4875e36f05', categoryIds: [0], }, // 支付服务
{ name: 'Search', token: 'ca19f532efba91f7773cbfbd526b798c6ac83df670071e97d72c50dca1d53a48', categoryIds: [0], }, // 搜索服务
{ name: 'Order', token: '31b93b223421ca52389b088a7457c651fab7c1bf658fc7dd38d0689d09c8e235', categoryIds: [0], }, //订单服务
{ name: 'Settle', token: 'fffbeeaaa198c285955997c606bc279fc6950fea118580c786f2c73eecccaa6a', categoryIds: [0], }, //结算服务
{ name: 'AfterService', token: '39db719680bf1b3db21bc1deda933cde16d17559e9676bf848ec96c1320e68df', categoryIds: [0], }, // '售后服务'
{ name: 'Enhance', token: '594a7e7ff17f6f40fb9fb726c1da9a3f282a926a8d386eb6cbfd668a3f75f251', categoryIds: [0], }, // 加工服务
{ name: 'Report', token: '69ee5a79363c763ded1a2eb42952a5181ffcdfc5ffb93b6e1e22ac92a25b38bf', categoryIds: [0], }, // 报表服务
]
const getConfigMap = (tokens) => tokens.map(v => ({
......@@ -21,7 +20,7 @@ const getConfigMap = (tokens) => tokens.map(v => ({
reactHooks: {
enabled: false,
},
outputFilePath: `src/services/${v.name}Api.ts`,
outputFilePath: `src/services/${v.name}Api`,
requestFunctionFilePath: 'request.ts',
dataKey: 'data',
projects: [
......@@ -29,7 +28,7 @@ const getConfigMap = (tokens) => tokens.map(v => ({
token: v.token,
categories: [
{
id: 0,
id: v.categoryIds,
getRequestFunctionName(interfaceInfo, changeCase) {
return changeCase.camelCase(interfaceInfo.method + interfaceInfo.path)
},
......@@ -39,4 +38,4 @@ const getConfigMap = (tokens) => tokens.map(v => ({
],
}))
export default getConfigMap(tokenList)
\ No newline at end of file
export default getConfigMap(tokenList)
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