Commit 0730aebf authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents c094c005 f9e832fd
......@@ -102,7 +102,10 @@ const Examine: React.FC<Iprops> = ({
}
}).finally(() => {
msg();
}).catch((err) => {
});
};
const onFinishFailed = (errorInfo: any) => {
console.log('Failed:', errorInfo);
......
......@@ -3,7 +3,7 @@ import { history } from 'umi'
import { formatTimeString } from '@/utils'
import EyePreview from '@/components/EyePreview'
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
import CustomTag from '@/pages/procurement/components/CustomTag'
import CustomTag from '@/pages/procurement/components/customTag'
import CustomBadge from '@/pages/procurement/components/customBadge'
import { CALLFORBID_TYPE, PURCHASE_TYPE } from '@/constants'
......
......@@ -144,7 +144,9 @@ const contractexecutionList = () => {
...params,
}).then(res => {
resolve(res.data)
})
}).catch((err) => {
resolve([])
});
})
}
return (
......
......@@ -82,7 +82,9 @@ const DetailedList: React.FC<Iprops> = ({
} else {
}
})
}).catch((err) => {
resolve([])
});
})
}
return (
......
......@@ -83,7 +83,9 @@ const DrawerModal: React.FC<Iprops> = ({
console.log(res.data, '请求查看付款明细')
resolve(res)
}
})
}).catch((err) => {
resolve([])
});
})
}
......
......@@ -90,6 +90,8 @@ const Details = (props: any) => {
}
}).finally(() => {
setListLoading(false);
}).catch((err) => {
resolve([])
});
}
/* 执行请款的选中 */
......
......@@ -56,7 +56,9 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
let { data } = res || {}
setAttribute(data)
}
})
}).catch((err) => {
});
}
/**选择报价商品回调 */
......
......@@ -55,7 +55,9 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
return new Promise(resolve => {
PublicApi.getProductCommodityCommonGetCommodityListBySeller({ ...params, environment: 1, shopType: 1 }).then(res => {
resolve(res.data)
})
}).catch((err) => {
resolve([])
});
})
}
/** 关闭 */
......
......@@ -75,7 +75,9 @@ const DetailedList: React.FC<Iprops> = ({
} else {
}
})
}).catch((err) => {
resolve([])
});
})
}
return (
......
......@@ -110,7 +110,9 @@ const PopupDrawer: React.FC<Iprops> = ({
setpayAmount(payAmount)
setorderAmount(orderAmount)
}
})
}).catch((err) => {
resolve([])
});
})
}
......
......@@ -157,6 +157,8 @@ const purchaseList: React.FC<Iprops> = ({
}
}).finally(() => {
setListLoading(false);
}).catch((err) => {
});
}
......
......@@ -76,6 +76,8 @@ const situationList: React.FC<Iprops> = ({ contractId }) => {
}
}).finally(() => {
setListLoading(false);
}).catch((err) => {
});
}
const rowSelection: any = {
......
......@@ -128,7 +128,9 @@ const Details = (props: any) => {
setcontractNo(basics.contractNo)
setcontractAbstract(contractAbstract)
}
})
}).catch((err) => {
});
}
useEffect(() => {
let tab = []
......
......@@ -7,8 +7,8 @@ import {
SaveOutlined,
} from '@ant-design/icons'
import ReutrnEle from '@/components/ReturnEle';
import AddInfo from './components/info'
import InfoTable from './components/table'
import AddInfo from './components/Info'
import InfoTable from './components/Table'
import { PublicApi } from '@/services/api';
const formActions = createFormActions();
......
......@@ -6,7 +6,7 @@ import { ArrowLeftOutlined } from '@ant-design/icons';
import { history } from 'umi';
import { PublicApi } from '@/services/api';
import Examine from '../../components/examine'
import Materials from './components/materials'
import Materials from './components/Materials'
import ColumnsList from './components/ColumnsList'
import Basic from '../../components/detailCard/basic'
const { Link } = Anchor;
......
......@@ -86,6 +86,7 @@ const AddInfo = (props: any) => {
basicsData.expectPayTime = moment(key.expectPayTime);
basicsData.payParam = key.payParam;
basicsData.payRatio = key.payRatio;
console.log(basicsData, 'basicsData')
setBasics(basicsData)
setIndex(key.Index);
attrValueForm.setFieldsValue(basicsData);
......@@ -122,6 +123,7 @@ const AddInfo = (props: any) => {
orderTime: basicsData.orderTime,
moneyPayWay: basics.moneyPayWay,
payWay: basicsData.payWay,
payParam: basicsData.payParam,
sourceType: basicsData.sourceType,
moneyPayChannel: basics.moneyPayChannel,
expectPayTime: moment(basicsData.expectPayTime),
......
......@@ -45,10 +45,7 @@ const Editbill: React.FC<{}> = (props: any) => {
const submit = async () => {
const basicsVO = await currentBasic.current.get();
const detailList = await Object.keys(detailData.current).length != 0 ? await detailData.current.get() : [];
let msg = message.loading({
content: '正在操作',
duration: 0,
});
let data = {
basics: basicsVO.data,
detailList: detailList,
......@@ -61,8 +58,13 @@ const Editbill: React.FC<{}> = (props: any) => {
history.push('/memberCenter/contract/funds/addbill')
}
}).finally(() => {
msg();
}).catch((err) => {
// resolve([]);
});
setTimeout(() => {
setLoading(false);
}, 2000)
}
}
......
......@@ -97,6 +97,8 @@ const Submitpayment: React.FC<{}> = () => {
...params,
}).then(res => {
resolve(res.data)
}).catch(err => {
console.log(err)
})
})
......
......@@ -205,6 +205,8 @@ const QueryList = () => {
}
}).finally(() => {
msg();
}).catch((err) => {
// reject();
});
};
......
import React, { useState, useRef, useEffect } from 'react'
import { Button, Card, Tabs, message } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import Information from './components/information'
import Information from './components/Information'
import FormList from './components/FormList'
import Fromtable from './components/fromtable'
import ContractText from './components/contractText'
import ContractText from './components/ContractText'
import { PublicApi } from '@/services/api';
import { history } from 'umi'
import {
......
......@@ -121,7 +121,9 @@ const Details = (props: any) => {
setcontractAbstract(contractAbstract)
setcontractNo(basics.contractNo)
}
})
}).catch((err) => {
});
}
const onDownload = (file: any) => {
window.location.href = `/api/contract/contractTemplate/downloadContract?contractName=${file.contractName}&contractUrl=${file.contractUrl}`
......@@ -248,7 +250,9 @@ const Details = (props: any) => {
setbidAmount(bidAmount)
setListData(res.data.data)
setassociatedCategory(res.data.data[0].setassociatedCategory)
})
}).catch((err) => {
});
}
// 展开/收起的回调
const onExpand = expandedKeys => {
......
......@@ -50,6 +50,7 @@ const FormList = (props: any) => {
render: (_, item, index) => <DatePicker
style={{ width: '100%' }}
format="YYYY-MM-DD"
value={item.expectPayTime}
onChange={(e) => onSelectChange(e, 'expectPayTime', index)}
/>
},
......@@ -120,7 +121,6 @@ const FormList = (props: any) => {
/* 添加 */
const addtable = () => {
const data = [...PlanList];
if (keys) {
data.push(keys);
setkeys('');
......@@ -205,7 +205,11 @@ const FormList = (props: any) => {
setPlanList(item)
}
useEffect(() => {
payPlanList.map(item => {
item.expectPayTime = moment(item.expectPayTime)
})
setPlanList(payPlanList)
console.log(payPlanList)
}, [payPlanList])
useEffect(() => {
currentRef.current = {
......
......@@ -26,12 +26,22 @@ const Information = (props: any) => {
PublicApi.getContractManageGetContractNo(data).then(res => {
console.log(res.data)
if (res.code === 1000) {
basic.contractNo = res.data
basic.contractNo = res.data;
const rangePicker = [];
let startTime = moment(basic.startTime)
let endTime = moment(basic.endTime);
rangePicker.push(startTime, endTime);
basic.rangePicker = rangePicker;
attrValueForm.setFieldsValue(basic)
}
})
}).catch((err) => {
});
} else {
const rangePicker = [];
let startTime = moment(basic.startTime)
let endTime = moment(basic.endTime);
rangePicker.push(startTime, endTime);
basic.rangePicker = rangePicker;
attrValueForm.setFieldsValue(basic)
}
}
......@@ -144,7 +154,7 @@ const Information = (props: any) => {
labelAlign="left"
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
name="range-picker"
name="rangePicker"
{...rangeConfig}
>
<RangePicker style={{ width: '100%' }}
......
......@@ -3,10 +3,10 @@ import { Button, Card, Tabs, Form } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api';
import { history } from 'umi'
import Information from './components/information'
import Information from './components/Information'
import FormList from './components/FormList';
import Fromtable from './components/Fromtable'
import ContractText from './components/contractText'
import ContractText from './components/ContractText'
import {
SaveOutlined,
} from '@ant-design/icons'
......@@ -42,7 +42,9 @@ const Editing: React.FC<{}> = (props: any) => {
setpayPlanList(payPlanList)
setcontractText(contractText)
}
})
}).catch((err) => {
});
}
/* 查询购物料 */
const getMaterielList = () => {
......@@ -54,7 +56,9 @@ const Editing: React.FC<{}> = (props: any) => {
if (res.code === 1000) {
setpurchaseMaterielList(res.data.data)
}
})
}).catch((err) => {
console.log(err)
});
}
useEffect(() => {
getDetail();
......@@ -87,7 +91,9 @@ const Editing: React.FC<{}> = (props: any) => {
} else {
setbtnType(false)
}
}))
})).catch((err) => {
console.log(err)
});
}
}
......
......@@ -57,7 +57,8 @@ const AddContract: React.FC<parmas> = (props) => {
useEffect(() => {
PublicApi.getContractContractTemplateExample().then(res => {
setFileExampleUrl(res.data)
})
}).catch((err) => {
});
}, [])
/**新增&修改 */
......@@ -67,14 +68,16 @@ const AddContract: React.FC<parmas> = (props) => {
setTimeout(() => {
history.goBack()
}, 1000)
})
}).catch((err) => {
});
} else {
parmas.id = id;
await PublicApi.postContractContractTemplateUpdate(parmas).then(res => {
setTimeout(() => {
history.goBack()
}, 1000)
})
}).catch((err) => {
});
}
}
......@@ -131,7 +134,8 @@ const AddContract: React.FC<parmas> = (props) => {
form.setFieldsValue(res.data)
}
})
}).catch((err) => {
});
}
}, [id])
......@@ -149,7 +153,8 @@ const AddContract: React.FC<parmas> = (props) => {
if (res.code === 1000) {
window.open(res.data.contractUrl)
}
})
}).catch((err) => {
});
}
......
......@@ -38,7 +38,9 @@ const ClassSearch = () => {
return new Promise((resolve, reject) => {
PublicApi.getContractContractParamPage({ ...filterParams, ...params }).then(res => {
resolve(res.data)
})
}).catch(() => {
reject();
});
})
}
// 搜索
......
......@@ -99,7 +99,9 @@ const Template: React.FC<{}> = () => {
return new Promise((resolve, reject) => {
PublicApi.getContractContractTemplatePage({ ...params }).then(res => {
resolve(res.data)
})
}).catch(() => {
reject();
});
})
}
......
......@@ -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