Commit 7cc913ae authored by Bill's avatar Bill

fix: 修改首页使用向导链接以及加工bug

parent 157e4c6d
......@@ -32,7 +32,7 @@ const useFormatData = () => {
const cacheInitialValue = useMemo<EditInititalValueType>(() => {
if(initialValue === null) {
return { source: 1 } as EditInititalValueType
return { source: 1, source1: 1 } as EditInititalValueType
}
const { summary, deliveryType, deliveryDate, processMemberId, processName, processRoleId, receiveAddress, receiveUserName, receiveUserTel, receiverAddressId, source, otherAsk, details } = initialValue;
const isOrder = source === 1;
......
......@@ -4,6 +4,12 @@
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ISchema } from '@formily/antd';
import { ORDER_TYPE } from '@/constants/order'
const ORDER_ENUM = ORDER_TYPE.filter(Boolean).map((_item, index) => ({
label: _item,
value: index + 1
}))
export const orderSchema: ISchema = {
type: 'object',
......@@ -12,48 +18,55 @@ export const orderSchema: ISchema = {
type: 'object',
'x-component': 'mega-layout',
properties: {
name: {
orderNo: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索商品名称',
placeholder: '搜索订单号',
align: 'flex-left',
tip: '输入商品名称进行搜索',
tip: '输入订单号进行搜索',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
inline:true,
full: true,
columns: 3,
},
properties: {
customerCategoryId: {
orderThe: {
type: 'string',
'x-component': 'Cascader',
'x-component-props': {
placeholder: '请选择商品品类',
allowClear:true,
style: {
width: '160px',
// margin: '0 20px 0 0'
},
fieldNames: { label: 'title', value: 'id', children: 'children' }
"x-component-props": {
placeholder: '订单摘要'
}
},
brandId: {
membersName: {
type: 'string',
// 'x-component': 'Select',
enum: [],
'x-component-props': {
placeholder: '请选择商品品牌',
allowClear:true,
showSearch: true,
optionFilterProp: "children",
"x-component-props": {
placeholder: "采购会员"
}
},
type: {
type: 'string',
enum: ORDER_ENUM,
"x-component-props": {
placeholder: '订单类型',
allowClear: true,
style: {
width: 150
}
}
},
"[startCreateTime, endCreateTime]": {
type: 'daterange',
"x-component-props": {
placeholder: ["下单开始时间", "下单结束时间"],
style: {
width: '300px'
}
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
......
......@@ -27,7 +27,7 @@ import ProductDrawer, { productSubmitType, productInfo } from './components/Prod
import { priceFormat } from '@/utils/numberFomat';
import { orderColumns, orderProductColumns } from './common/columns/orderColumn';
import { orderSchema } from './common/schemas/orderSchema'
import { GetOrderProcessingOrderListResponseDetail } from '@/services/OrderV2Api';
import { GetOrderProcessingOrderListRequest, GetOrderProcessingOrderListResponseDetail } from '@/services/OrderV2Api';
import { EnterpriceType, FileType, SubmitDataType, RestDataType, OtherAskType, SelectedProcessProductType } from './types';
import { history } from 'umi';
import moment from 'moment';
......@@ -587,8 +587,19 @@ const Create = () => {
// onSelectAll: onSelectAll
}
const handleFetchOrderList = useCallback(async (params: any) => {
const { data, code } = await PublicApi.getOrderProcessingOrderList(params as any);
const handleFetchOrderList = useCallback(async (params: GetOrderProcessingOrderListRequest) => {
const { startCreateTime, endCreateTime, ...rest } = params as any;
let postData = rest;
if (startCreateTime) {
const format = 'YYYY-MM-DD';
postData = {
...postData,
startCreateTime: moment(startCreateTime, format).valueOf(),
endCreateTime: moment(endCreateTime, format).valueOf(),
}
}
const { data, code } = await PublicApi.getOrderProcessingOrderList(postData as GetOrderProcessingOrderListRequest);
if (code === 1000) {
setFetchOrderData(data.data);
return data
......@@ -931,7 +942,7 @@ const Create = () => {
/>
<TableModal
modalType={"Drawer"}
width={920}
width={1000}
visible={processOrderVisible}
onClose={() => processOrderToggle(false)}
title={"选择加工订单"}
......
......@@ -18,10 +18,10 @@ type AbilityNameType = "orderAbility"
type isCheckedLayoutsType = {
id: number | null,
code: number,
code?: number,
name: string,
sort: number,
isShow?: boolean,
isShow?: boolean | ( 0 | 1 | number),
}
const collection2Obj = <T, >(list: T[], name: string, isCover?: boolean) => {
......
......@@ -49,11 +49,15 @@
cursor: pointer;
width: 148px;
.icon {
font-size: 22px;
color: #fff;
}
.text {
margin-left: 8px;
color: #fff;
}
}
......@@ -97,9 +97,9 @@ const Home: React.FC<{}> = () => {
return (
<PageHeaderWrapper title="首页">
<div className={styles.userGuaid} style={{display: visible ? 'block': 'none'}}>
{/* <div className={styles.userGuaid} style={{display: visible ? 'block': 'none'}}>
<UseGuaid/>
</div>
</div> */}
<div className={styles.container}>
<div className={styles.left}>
<UserCenter />
......@@ -115,10 +115,10 @@ const Home: React.FC<{}> = () => {
layouts={layout}
/>
</div>
<div className={styles.controller} onClick={() => setVisible((state) => !state)}>
<a href="https://www.yuque.com/shushangyun-lingxi/xr7ol7/eh909i" target="__blank" className={styles.controller}>
<CompassFilled className={styles.icon} />
<span className={styles.text}>使用向导</span>
</div>
</a>
</div>
<div className={styles.commonMargin}>
<LatestAnnounce />
......
......@@ -209,7 +209,7 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
// </div>
<div style={{position: "relative", }}>
<div >{child}</div>
<div style={{position: 'absolute', right: 0, top: 0}}>{ps}</div>
<div style={{position: 'absolute', right: 0, top: 4}}>{ps}</div>
</div>
)}
controlRender={
......
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