Commit ffe6d9b4 authored by GuanHua's avatar GuanHua
parents f64a1b8c a57249f5
......@@ -52,7 +52,7 @@
"bizcharts": "^4.0.14",
"copy-to-clipboard": "^3.3.1",
"crypto-js": "^4.0.0",
"god": "0.2.2",
"god": "0.2.4",
"immutability-helper": "^3.1.1",
"lingxi-design": "^1.0.8",
"lingxi-design-ui": "^1.1.16",
......
......@@ -3,7 +3,7 @@ import {StandardTable} from 'god';
import NestTable from '@/components/NestTable';
import { IStandardTableProps } from 'god/dist/src/standard-table';
import { Row, Col, Modal } from 'antd';
import { productModalSchema, productModalByMemberSchema, memberModalSchema, inquirySchema, demandSchema, enquirySchema, mergeOrderSchema, goodsModalSchema, demandNumberSchema, logisticsDeliverySearchSchema, addOrderModalSchema , logisticsSelectGoodsSearchSchema} from './schema';
import { productModalSchema, productModalByMemberSchema, memberModalSchema, inquirySchema, demandSchema, enquirySchema, mergeOrderSchema, goodsModalSchema, demandNumberSchema, logisticsDeliverySearchSchema, addOrderModalSchema , logisticsSelectGoodsSearchSchema, SelectRfqOrderSearchSchema} from './schema';
import Search from '../NiceForm/components/Search';
import SearchSelect from '../NiceForm/components/SearchSelect';
import Submit from '../NiceForm/components/Submit';
......@@ -18,7 +18,7 @@ export interface ModalTableProps extends IStandardTableProps<any> {
cancel?(),
visible?: boolean,
resetModal?: object,
modalType?: 'productByDefault' | 'productByMember' | 'memberByDefault' | 'inquiryByDefault' | 'demandByDefault' | 'enquiryModel' | 'MergeOrderByDefault' | 'goodsModalSchema' | 'demandNumberSchema' | 'logisticsDelivery' | 'addOrderModalSchema' | 'selectGoodsSchema' | 'none' ,
modalType?: 'productByDefault' | 'productByMember' | 'memberByDefault' | 'inquiryByDefault' | 'demandByDefault' | 'enquiryModel' | 'MergeOrderByDefault' | 'goodsModalSchema' | 'demandNumberSchema' | 'logisticsDelivery' | 'addOrderModalSchema' | 'selectGoodsSchema' | 'selectRfqOrder' | 'none' ,
useNestTable?: boolean, // 是否使用嵌套表格
nestColumns?: any[],
nestTableProps?: any,
......@@ -85,6 +85,9 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
case 'selectGoodsSchema': {
return logisticsSelectGoodsSearchSchema
}
case 'selectRfqOrder': {
return SelectRfqOrderSearchSchema
}
case 'none': {
return {}
}
......
......@@ -28,13 +28,13 @@ export const productModalByMemberSchema: ISchema = {
},
},
properties: {
customerCategoryId: {
categoryId: {
type: 'string',
"x-component": 'SearchSelect',
"x-component-props": {
placeholder: '请选择品类',
className: 'fixed-ant-selected-down', // 该类强制将显示的下拉框出现在select下, 只有这里出现问题, ??
fetchSearch: PublicApi.getProductSelectGetMemberCategory,
fetchSearch: PublicApi.getProductSelectGetSelectCustomerCategory,
style: {
width: 160
}
......@@ -45,7 +45,7 @@ export const productModalByMemberSchema: ISchema = {
"x-component": 'SearchSelect',
"x-component-props": {
placeholder: '请选择品牌',
fetchSearch: PublicApi.getProductSelectGetMemberBrand,
fetchSearch: PublicApi.getProductSelectGetSelectBrand,
style: {
width: 160
}
......@@ -715,7 +715,6 @@ export const logisticsSelectGoodsSearchSchema: ISchema = {
"x-component": 'SearchSelect',
'x-component-props': {
placeholder: '商品品类',
fetchSearch: PublicApi.getWarehouseInvoicesTypeAll,
style: {
width: 160
}
......@@ -734,3 +733,69 @@ export const logisticsSelectGoodsSearchSchema: ISchema = {
}
}
}
/** 选择询价单 */
export const SelectRfqOrderSearchSchema: ISchema = {
type: 'object',
properties: {
orderNo: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '询价单号',
align: 'flex-left',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
memberName: {
type: 'string',
"x-component-props": {
placeholder: '询价会员',
style: {
width: 160
}
}
},
details: {
type: 'string',
'x-component-props': {
placeholder: '询价单摘要',
style: {
width: 160
}
},
},
"[startDocumentTime,endDocumentTime]": {
type: 'string',
"x-component": "dateSelect",
"x-component-props": {
placeholder: '单据时间(全部)',
}
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
import { ColumnType } from 'antd/lib/table/interface';
import moment from 'moment'
export const SelectGoodsColumns: ColumnType<any>[] = [
{
......@@ -32,27 +33,45 @@ export const ExternalListColumns: ColumnType<any>[] = [
},
{
title: '操作角色',
key: 'roleName',
dataIndex: 'roleName',
key: 'operatorRoleName',
dataIndex: 'operatorRoleName',
},
{
title: '状态',
key: 'status',
dataIndex: 'status',
render:(text:any, record:any, index:number) => {
return (
text === 1 ? '待提交':
text === 2 ? '待确认':
text === 3 ? '不接收物流单':
'接收物流单'
)
}
},
{
title: '操作',
key: 'operationalProcess',
dataIndex: 'operationalProcess',
key: 'type',
dataIndex: 'type',
render:(text:any, record:any, index:number) => {
return (
text === 1 ? '提交物流单':'确认物流单'
)
}
},
{
title: '操作时间',
key: 'brand',
dataIndex: 'brand',
key: 'operateTime',
dataIndex: 'operateTime',
render:(text:any, record:any) => {
return(
moment(text).format('YYYY-MM-DD HH:mm:ss')
)
}
},
{
title: '审核意见',
key: 'brand',
dataIndex: 'brand',
key: 'remark',
dataIndex: 'remark',
}
]
......@@ -296,9 +296,12 @@ const AddLogistics: React.FC<{}> = () => {
externalState: res.data.status,
shipperAddressId: res.data.shipperAddressId,
shipperFullAddress: res.data.shipperFullAddress,
externalList: res.data.externalList
logisticsOrderLogList: res.data.logisticsOrderLogList
}
form.setFieldsValue(obj)
const list = [...res.data.detailList];
goodsRowCtl.setSelectRow(list)
goodsRowCtl.setSelectedRowKeys(list.map(v => v.productId));
setQuery(obj)
setId(query.id)
setCreateType(res.data.createType)
......@@ -332,7 +335,7 @@ const AddLogistics: React.FC<{}> = () => {
case 1:
case 2:
case 3:
PublicApi.getWarehouseInvoicesProductList({ ...params, invoicesId: query.shipmentOrderId }).then((res: any) => {
PublicApi.getWarehouseInvoicesProductList({ ...params, invoicesId: query.relevanceOrderId ? query.relevanceOrderId : query.shipmentOrderId }).then((res: any) => {
if (res.code === 1000) {
res.data.data.forEach(item => {
item.category = item.categoryName
......@@ -351,7 +354,7 @@ const AddLogistics: React.FC<{}> = () => {
})
break;
case 5:
PublicApi.getAsReplaceGoodsPageReplaceCommodityByLogistics({ ...params, dataId: query.relevanceOrderId}).then(res => {
PublicApi.getAsReplaceGoodsPageReplaceCommodityByLogistics({ ...params, dataId: query.relevanceOrderId }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
......@@ -373,14 +376,15 @@ const AddLogistics: React.FC<{}> = () => {
/**确定选择商品 */
const handleConfirm = () => {
const selectRow = goodsRowCtl.selectRow;
console.log(selectRow)
const arr: any[] = []
selectRow.forEach((item: any) => {
arr.push({
productId: item.id,
productName: item.productName,
categoryName: item.category,
brandName: item.brand,
unitName: item.unit,
categoryName: item.category ? item.category : item.categoryName,
brandName: item.brand ? item.brand : item.brandName,
unitName: item.unit ? item.unit : item.unitName,
amount: item.amount,
carton: item.carton,
weight: item.weight,
......@@ -538,9 +542,6 @@ const AddLogistics: React.FC<{}> = () => {
const handleVisible = () => {
console.log(query)
if (query.shipmentOrderCode || query.relevanceOrderCode) {
const list = [...detailList];
goodsRowCtl.setSelectRow(list)
goodsRowCtl.setSelectedRowKeys(list.map(v => v.productId));
setvisible(true)
} else {
message.error('请先选择要操作的对应发货单号或对应订单号/售后单')
......@@ -695,8 +696,14 @@ const AddLogistics: React.FC<{}> = () => {
}
</Select>
</Form.Item>
<Form.Item label="单据时间" name='voucherTime'><span>{moment(query.voucherTime).format('YYYY-MM-DD HH:mm:ss')} </span></Form.Item>
<Form.Item label="外部状态" name='externalState'><span>{query.externalState}</span></Form.Item>
<Form.Item label="单据时间" name='voucherTime'><span>{query.voucherTime && moment(query.voucherTime).format('YYYY-MM-DD HH:mm:ss')} </span></Form.Item>
<Form.Item label="外部状态" name='externalState'>
{ query.externalState === 1 ? <Badge status="warning" text='待提交' /> :
query.externalState === 2 ? <Badge status="processing" text='待确认' /> :
query.externalState === 3 ? <Badge status="error" text='不接收物流单' /> :
query.externalState === 4 ? <Badge status="success" text='接收物流单' /> : ''
}
</Form.Item>
</Form>
</TabPane>
{/** 物流单明细 */}
......@@ -726,7 +733,7 @@ const AddLogistics: React.FC<{}> = () => {
<TabPane key='tab-4' tab='流转记录' forceRender>
<Table
columns={ExternalListColumns}
dataSource={query.externalList}
dataSource={query.logisticsOrderLogList}
/>
</TabPane>
</Tabs>
......
This diff is collapsed.
......@@ -244,13 +244,6 @@ const OrderList: React.FC<ListProps> = (props) => {
}
}, [])
//生命周期
useEffect(() => {
ref.current.reload()
return () => {
}
}, [TimeRange])
const onDefaultChange = (id: any, checked: boolean) => {
console.log(id, checked)
columns.forEach((v, index) => {
......
......@@ -33,7 +33,6 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
const [goodsList, setgoodsList] = useState<any>([]);
const [inquiryGoods, setinquiryGoods] = useState<any>([]);
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'id' });
const [customerCategory, setcustomerCategory] = useState<any>([]);
const [brand, setbrand] = useState<any>([]);
const [form] = Form.useForm()
const handleOkAddMember = () => {
......@@ -185,21 +184,6 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
}
}, [editData])
useEffect(() => {
if (visibleChannelMember) {
PublicApi.getProductSelectGetSelectCustomerCategory({ name }).then(res => {
if (res.code === 1000) {
setcustomerCategory(res.data)
}
})
PublicApi.getProductSelectGetSelectBrand({ name }).then(res => {
if (res.code === 1000) {
setbrand(res.data)
}
})
}
}, [visibleChannelMember])
return (
<div className={styles.revise_style}>
<Button disabled={type === 3} block type='dashed' onClick={addGoods}><PlusOutlined />添加商品</Button>
......
......@@ -61,18 +61,7 @@ const BasicInfo: React.FC<queryProps> = (props) => {
render: (text: any, record: any) => format(text)
}
]
const formSearch: ISchema = {
type: 'object',
properties: {
name: {
type: 'string',
"x-component": 'Search',
"x-component-props": {
placeholder: '请输入会员名称'
}
}
}
}
// 模拟数据
const fetchMemberList = async (params) => {
return new Promise((resolve, reject) => {
......@@ -179,11 +168,8 @@ const BasicInfo: React.FC<queryProps> = (props) => {
columns={columnsSetMember}
rowSelection={inquiryRowSelection}
fetchTableData={params => fetchMemberList(params)}
formilyProps={
{
ctx: { schema: formSearch }
}
}
modalType='selectRfqOrder'
searchName='orderNo'
tableProps={{
rowKey: 'orderId',
}}
......
const tokenList = [
{ 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 => ({
serverUrl: 'http://10.0.0.25:4000/',
typesOnly: false,
reactHooks: {
enabled: false,
},
outputFilePath: `src/services/${v.name}Api`,
requestFunctionFilePath: 'request.ts',
dataKey: 'data',
projects: [
{
token: v.token,
categories: [
{
id: v.categoryIds,
getRequestFunctionName(interfaceInfo, changeCase) {
return changeCase.camelCase(interfaceInfo.method + interfaceInfo.path)
},
},
]
}
],
}))
export default getConfigMap(tokenList)
const tokenList = [
{ 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 => ({
serverUrl: 'http://10.0.0.25:4000/',
typesOnly: false,
reactHooks: {
enabled: false,
},
outputFilePath: `src/services/${v.name}Api`,
requestFunctionFilePath: '@/utils/request.ts',
dataKey: 'data',
projects: [
{
token: v.token,
categories: [
{
id: v.categoryIds,
getRequestFunctionName(interfaceInfo, changeCase) {
return changeCase.camelCase(interfaceInfo.method + interfaceInfo.path)
},
},
]
}
],
}))
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