提交 191d0ffc 作者: 翁进城

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

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