提交 191d0ffc 作者: 翁进城

Merge branch 'develop' of http://git.mmcuav.cn/root/sharefly-admin-uav into develop

...@@ -11,6 +11,7 @@ RUN npm run build ...@@ -11,6 +11,7 @@ RUN npm run build
# nginx # nginx
FROM nginx:alpine as production FROM nginx:alpine as production
VOLUME ["/var/log/nginx/"] VOLUME ["/var/log/nginx/"]
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
ENV NODE_ENV production ENV NODE_ENV production
# Set working directory to nginx asset directory # Set working directory to nginx asset directory
COPY --from=builder /app/dist /usr/share/nginx/html COPY --from=builder /app/dist /usr/share/nginx/html
......
...@@ -4,7 +4,7 @@ metadata: ...@@ -4,7 +4,7 @@ metadata:
name: admin-deployment name: admin-deployment
namespace: default namespace: default
spec: spec:
# minReadySeconds: 120 minReadySeconds: 5
revisionHistoryLimit: 2 revisionHistoryLimit: 2
replicas: 1 replicas: 1
selector: selector:
...@@ -21,9 +21,6 @@ spec: ...@@ -21,9 +21,6 @@ spec:
volumeMounts: volumeMounts:
- name: log-of-nginx - name: log-of-nginx
mountPath: /var/log/nginx mountPath: /var/log/nginx
- name: localtime
mountPath: /etc/localtime
readOnly: true
resources: resources:
limits: limits:
memory: 512Mi memory: 512Mi
...@@ -34,6 +31,3 @@ spec: ...@@ -34,6 +31,3 @@ spec:
- name: log-of-nginx - name: log-of-nginx
hostPath: hostPath:
path: /var/log/nginx path: /var/log/nginx
- name: localtime
hostPath:
path: /etc/localtime
...@@ -14,4 +14,4 @@ patches: ...@@ -14,4 +14,4 @@ patches:
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag: 9802f6a9d578255792107915a86e29239fe30fd1 newTag: 465e507b3079097b231424c6de372ba1ba672b14
...@@ -15,3 +15,5 @@ export type BackEndLoginType = InterFunction< ...@@ -15,3 +15,5 @@ export type BackEndLoginType = InterFunction<
>; >;
// 上传图片 // 上传图片
export type uploadOssType = InterFunction<any, { filePath: string }>; export type uploadOssType = InterFunction<any, { filePath: string }>;
// 断电上传
export type uploadOssBPType = InterFunction<any, any>;
...@@ -411,12 +411,13 @@ export type serviceOrderType = InterItemFunction< ...@@ -411,12 +411,13 @@ export type serviceOrderType = InterItemFunction<
orderName: string; orderName: string;
orderNo: string; orderNo: string;
orderStatus: number; orderStatus: number;
images: string[]; coverPlan: string;
orderAmt: number; orderAmt: number;
phoneNum: string; phoneNum: string;
uid: string; uid: string;
createdTime: string; createdTime: string;
userName: string; userName: string;
nickName: string;
}[] }[]
>; >;
// 服务-订单字典 // 服务-订单字典
......
...@@ -89,6 +89,7 @@ export type ProductSpecListType = InterItemFunction< ...@@ -89,6 +89,7 @@ export type ProductSpecListType = InterItemFunction<
specName: string; specName: string;
versionDesc: string; versionDesc: string;
productSkuId: number; productSkuId: number;
priceList: any;
}[] }[]
>; >;
//产品-规格-新增 //产品-规格-新增
......
import axios from '../request'; import axios from '../request';
import { BackEndLoginType, uploadOssType } from '~/api/interface/commonType'; import { BackEndLoginType, uploadOssBPType, uploadOssType } from '~/api/interface/commonType';
export class CommonAPI { export class CommonAPI {
// 用户登录 // 用户登录
...@@ -8,4 +8,7 @@ export class CommonAPI { ...@@ -8,4 +8,7 @@ export class CommonAPI {
// 上传图片 // 上传图片
static uploadOss: uploadOssType = (data) => axios.post('/pms/upload/oss', data); static uploadOss: uploadOssType = (data) => axios.post('/pms/upload/oss', data);
// 断点上传
static uploadOssBP: uploadOssBPType = (data) => axios.post('/pms/upload/breakpoint', data);
} }
...@@ -175,16 +175,16 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({ ...@@ -175,16 +175,16 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({
getProductSpecList(id); getProductSpecList(id);
}; };
// // 选项来源选中 // // 选项来源选中
// const handleSourceSelect = (id: number | string) => { const handleSourceSelect = (id: number | string) => {
// const values: any[] = skuForm.getFieldValue('specIds'); const values: any[] = skuForm.getFieldValue('specIds');
// const obj = optionSource.find((v: sourceEntity) => v.id === id); const obj = productSpecList.find((v) => v.id === id);
// if (!obj?.priceList) { if (!obj?.priceList) {
// message.warning('所选规格来源未配置好价格,请配置好SKU价格后重新选择!'); message.warning('所选规格来源未配置好价格,请配置好SKU价格后重新选择!');
// const index: number = values.findIndex((i: number) => i === id); const index: number = values.findIndex((i: number) => i === id);
// values.splice(index, 1); values.splice(index, 1);
// } }
// skuForm.setFieldValue('specIds', values); skuForm.setFieldValue('specIds', values);
// }; };
// // 规格来源切换 // // 规格来源切换
const skuSourceRadioChange = (e: RadioChangeEvent) => { const skuSourceRadioChange = (e: RadioChangeEvent) => {
setIsCustomProd(e.target.value === 1); setIsCustomProd(e.target.value === 1);
...@@ -226,8 +226,7 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({ ...@@ -226,8 +226,7 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({
setProductSpecList(result.list || []); setProductSpecList(result.list || []);
if (result.list) { if (result.list) {
const ids: number[] = result.list.reduce((pre: number[], cur) => { const ids: number[] = result.list.reduce((pre: number[], cur) => {
// return cur.priceList ? [...pre, cur.id] : pre; return cur.priceList || goodsType === 1 ? [...pre, cur.id] : pre;
return [...pre, cur.id];
}, []); }, []);
skuForm.setFieldValue('specIds', ids); skuForm.setFieldValue('specIds', ids);
} }
...@@ -597,7 +596,7 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({ ...@@ -597,7 +596,7 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({
placeholder='请选择选项来源' placeholder='请选择选项来源'
allowClear allowClear
mode='multiple' mode='multiple'
// onSelect={handleSourceSelect} onSelect={handleSourceSelect}
> >
{productSpecList.map((item: any) => ( {productSpecList.map((item: any) => (
<Select.Option value={item.id} key={item.id} disabled={item.disabled}> <Select.Option value={item.id} key={item.id} disabled={item.disabled}>
......
...@@ -77,10 +77,12 @@ export const Uploader: React.FC<PropsType> = (props) => { ...@@ -77,10 +77,12 @@ export const Uploader: React.FC<PropsType> = (props) => {
// 上传到服务器 // 上传到服务器
const formData = new FormData(); const formData = new FormData();
formData.append('uploadFile', res.file); formData.append('uploadFile', res.file);
CommonAPI.uploadOss(formData).then( CommonAPI.uploadOssBP(formData).then(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore // @ts-ignore
(val: { result: { filePath: string } }) => { //(val: { result: { filePath: string } }) => {
({ result }) => {
console.log(result);
setFileList([ setFileList([
...fileList, ...fileList,
{ {
...@@ -89,7 +91,8 @@ export const Uploader: React.FC<PropsType> = (props) => { ...@@ -89,7 +91,8 @@ export const Uploader: React.FC<PropsType> = (props) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore // @ts-ignore
name: res.file.name, name: res.file.name,
url: val.result.filePath, // url: val.result.filePath,
url: result,
}, },
]); ]);
onChange?.([ onChange?.([
...@@ -100,7 +103,8 @@ export const Uploader: React.FC<PropsType> = (props) => { ...@@ -100,7 +103,8 @@ export const Uploader: React.FC<PropsType> = (props) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore // @ts-ignore
name: res.file.name, name: res.file.name,
url: val.result.filePath, // url: val.result.filePath,
url: result,
}, },
]); ]);
}, },
......
...@@ -159,6 +159,7 @@ const AddEditModal: React.FC<propType> = (props) => { ...@@ -159,6 +159,7 @@ const AddEditModal: React.FC<propType> = (props) => {
fileUpload fileUpload
fileLength={1} fileLength={1}
fileSize={10} fileSize={10}
fileType={['image/png', 'image/jpeg', 'image/jpg', 'image/gif', 'image/bmp']}
onChange={(e) => form.setFieldValue('surfaceUrl', e[0].url)} onChange={(e) => form.setFieldValue('surfaceUrl', e[0].url)}
defaultFileList={data?.surfaceUrl ? [{ url: data?.surfaceUrl }] : []} defaultFileList={data?.surfaceUrl ? [{ url: data?.surfaceUrl }] : []}
> >
......
...@@ -170,7 +170,7 @@ const GoodsList = () => { ...@@ -170,7 +170,7 @@ const GoodsList = () => {
if (result) { if (result) {
const options = result.map((v) => ({ id: v.id, name: v.directoryName })); const options = result.map((v) => ({ id: v.id, name: v.directoryName }));
searchColumns[1].options = options; searchColumns[1].options = options;
setSearchColumns(searchColumns); setSearchColumns([...searchColumns]);
} }
}); });
}; };
......
...@@ -165,11 +165,11 @@ const RentList = () => { ...@@ -165,11 +165,11 @@ const RentList = () => {
}; };
//获取目录列表 //获取目录列表
const getDirectoryList = () => { const getDirectoryList = () => {
CategoryManageAPI.getDirectoryListClone({ type: 4 }).then(({ result }) => { CategoryManageAPI.getDirectoryListClone({ type: 2 }).then(({ result }) => {
if (result) { if (result) {
const options = result.map((v) => ({ id: v.id, name: v.directoryName })); const options = result.map((v) => ({ id: v.id, name: v.directoryName }));
searchColumns[1].options = options; searchColumns[1].options = options;
setSearchColumns(searchColumns); setSearchColumns([...searchColumns]);
} }
}); });
}; };
......
...@@ -2,8 +2,7 @@ import { useEffect, useState } from 'react'; ...@@ -2,8 +2,7 @@ import { useEffect, useState } from 'react';
import SearchBox from '~/components/search-box'; import SearchBox from '~/components/search-box';
import { Button, Image, Table } from 'antd'; import { Button, Image, Table } from 'antd';
import { ColumnsType } from 'antd/es/table'; import { ColumnsType } from 'antd/es/table';
import { useNavigate } from 'react-router-dom'; // import { useNavigate } from 'react-router-dom';
import qs from 'query-string';
import { OrderManageAPI } from '~/api'; import { OrderManageAPI } from '~/api';
import { InterDataType, InterReqType, PaginationProps } from '~/api/interface'; import { InterDataType, InterReqType, PaginationProps } from '~/api/interface';
import { serviceOrderStatusType, serviceOrderType } from '~/api/interface/orderManageType'; import { serviceOrderStatusType, serviceOrderType } from '~/api/interface/orderManageType';
...@@ -27,7 +26,7 @@ const statusCodeButtonList = [ ...@@ -27,7 +26,7 @@ const statusCodeButtonList = [
function ServiceOrderView() { function ServiceOrderView() {
// 路由钩子 // 路由钩子
const navigate = useNavigate(); // const navigate = useNavigate();
// 当前选择的是第几个按钮 // 当前选择的是第几个按钮
const [statusCodeButtonIndex, setStatusCodeButtonIndex] = useState<number>(0); const [statusCodeButtonIndex, setStatusCodeButtonIndex] = useState<number>(0);
// 表格分页配置 // 表格分页配置
...@@ -49,7 +48,7 @@ function ServiceOrderView() { ...@@ -49,7 +48,7 @@ function ServiceOrderView() {
width: 250, width: 250,
render: (_text, record) => ( render: (_text, record) => (
<div style={{ display: 'flex', alignItems: 'center' }}> <div style={{ display: 'flex', alignItems: 'center' }}>
{/*<Image src={record.images[0]} style={{ width: 48, height: 48 }} />*/} <Image src={record.coverPlan} style={{ width: 48, height: 48 }} />
<div style={{ marginLeft: 10, textAlign: 'left', lineHeight: '16px' }}> <div style={{ marginLeft: 10, textAlign: 'left', lineHeight: '16px' }}>
<div style={{ color: '#1677ff' }}>{record.orderName}</div> <div style={{ color: '#1677ff' }}>{record.orderName}</div>
<div>订单编号:{record.orderNo}</div> <div>订单编号:{record.orderNo}</div>
...@@ -72,12 +71,12 @@ function ServiceOrderView() { ...@@ -72,12 +71,12 @@ function ServiceOrderView() {
{ {
title: '买家', title: '买家',
align: 'center', align: 'center',
width: '130px', width: '150px',
render: (_text, record) => ( render: (_text, record) => (
<> <>
<div>{record.uid}</div> <div>{record.uid}</div>
<div> <div>
{record.userName}({record.phoneNum}) {record.userName || record.nickName}({record.phoneNum})
</div> </div>
</> </>
), ),
...@@ -143,9 +142,9 @@ function ServiceOrderView() { ...@@ -143,9 +142,9 @@ function ServiceOrderView() {
}); });
}; };
// 跳转订单详情 // 跳转订单详情
const handleDetail = (record: TableType[0]) => { // const handleDetail = (record: TableType[0]) => {
navigate(`/orderManage/serviceOrder/detail?${qs.stringify({ id: record.id })}`); // navigate(`/orderManage/serviceOrder/detail?${qs.stringify({ id: record.id })}`);
}; // };
//服务订单列表 //服务订单列表
const getServiceOrderList = (query?: serviceOrderTypeParameters) => { const getServiceOrderList = (query?: serviceOrderTypeParameters) => {
OrderManageAPI.getServiceOrderList({ OrderManageAPI.getServiceOrderList({
......
...@@ -70,10 +70,10 @@ const ProduceDetailView = React.lazy( ...@@ -70,10 +70,10 @@ const ProduceDetailView = React.lazy(
() => import('~/pages/mallManage/produceManage/produceDetail'), () => import('~/pages/mallManage/produceManage/produceDetail'),
); //产品详情 ); //产品详情
const MakeListView = React.lazy(() => import('~/pages/mallManage/makeManage/makeList')); const MakeListView = React.lazy(() => import('~/pages/mallManage/makeManage/makeList'));
const IndustryListView = React.lazy(() => import('~/pages/mallManage/industryManage/industryList')); //行业列表 // const IndustryListView = React.lazy(() => import('~/pages/mallManage/industryManage/industryList')); //行业列表
const IndustryDetailView = React.lazy( // const IndustryDetailView = React.lazy(
() => import('~/pages/mallManage/industryManage/industryDetail'), // () => import('~/pages/mallManage/industryManage/industryDetail'),
); //行业详情 // ); //行业详情
// 订单 // 订单
const ProductOrderView = React.lazy(() => import('src/pages/orderManage/productOrder')); //销售订单 const ProductOrderView = React.lazy(() => import('src/pages/orderManage/productOrder')); //销售订单
...@@ -371,25 +371,25 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -371,25 +371,25 @@ export const routerList: Array<RouteObjectType> = [
title: '品牌管理', title: '品牌管理',
}, },
}, },
{ // {
path: '/mallManage/industryList', // path: '/mallManage/industryList',
element: withLoadingComponent(<IndustryListView />), // element: withLoadingComponent(<IndustryListView />),
meta: { // meta: {
id: 10180, // id: 10180,
icon: <SmileOutlined />, // icon: <SmileOutlined />,
title: '行业方案', // title: '行业方案',
}, // },
}, // },
{ // {
path: '/mallManage/industryDetail', // path: '/mallManage/industryDetail',
element: withLoadingComponent(<IndustryDetailView />), // element: withLoadingComponent(<IndustryDetailView />),
meta: { // meta: {
id: 10190, // id: 10190,
icon: <SmileOutlined />, // icon: <SmileOutlined />,
title: '行业详情', // title: '行业详情',
hidden: true, // hidden: true,
}, // },
}, // },
], ],
}, },
{ {
......
...@@ -11,6 +11,7 @@ export default defineConfig({ ...@@ -11,6 +11,7 @@ export default defineConfig({
host: '0.0.0.0', host: '0.0.0.0',
proxy: { proxy: {
'/api': { '/api': {
// target: 'http://192.168.3.111:8099', // 后端女pms
// target: 'http://192.168.3.111:8077', // 后端女oms // target: 'http://192.168.3.111:8077', // 后端女oms
// target: 'http://192.168.3.17:8099', // 狗旺 // target: 'http://192.168.3.17:8099', // 狗旺
target: 'https://test.iuav.shop', target: 'https://test.iuav.shop',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论