Commit a17594d3 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

🐞 fix(物流能力): 修复BUG

parent 9530230c
......@@ -85,14 +85,16 @@ const Table: React.FC<Iprops> = (props: any) => {
const linkage = useLinkageUtils();
onFormMount$().subscribe(() => {
externalStatusFetch && externalStatusFetch.then(res => {
const _enum = res.data.map((item) => {return { label: item.name, value: item.state}})
linkage.enum('externalState',_enum)
linkage.enum('externalStatusList',_enum)
console.log(res, 10086)
const _enum = res.data.map((item) => { return { label: item.name, value: item.state } })
linkage.enum('externalState', _enum)
linkage.enum('externalStatusList', _enum)
linkage.enum('status', _enum);
})
interiorStatusFetch && interiorStatusFetch.then(res => {
const _enum = res.data.map((item) => {return { label: item.name, value: item.state}})
linkage.enum('interiorState',_enum)
linkage.enum('innerStatusList',_enum)
const _enum = res.data.map((item) => { return { label: item.name, value: item.state } })
linkage.enum('interiorState', _enum)
linkage.enum('innerStatusList', _enum)
})
})
......
......@@ -7,7 +7,6 @@ import { Context } from '@/pages/transaction/components/detailLayout/components/
import moment from 'moment';
import { ENTERPRISE_CENTER_URL } from '@/constants'
import { PublicApi } from '@/services/api';
import { ENTERPRISE_CENTER_URL } from '@/constants'
import { CheckCircleOutlined, LinkOutlined } from '@ant-design/icons';
import { EXTERNALSTATE_COLOR, INTERNALSTATE_COLOR } from '@/pages/transaction/components/stateColor';
import ProgressLayout from '@/pages/transaction/components/detailLayout/components/progressLayout';
......
......@@ -40,7 +40,7 @@ interface AddressFormProps {
/**
* detail
*/
detail?: () => Promise<unknown>,
detail?: () => Promise<unknown>,
};
const AddressForm: React.FC<AddressFormProps> = (props: any) => {
......@@ -70,12 +70,31 @@ const AddressForm: React.FC<AddressFormProps> = (props: any) => {
value: v.code,
}));
});
if (initialValue) {
const { provinceCode, cityCode } = initialValue
const cityData: any[] = data.find(v => v.code === provinceCode).areaResponses || []
formActions.setFieldState('cityCode', targetState => {
targetState.originData = cityData
targetState.props.enum = cityData.map(v => ({
label: v.name,
value: v.code,
}))
})
formActions.setFieldState('districtCode', targetState => {
const districtData: any[] = cityData.find(v => v.code === cityCode).areaResponses || []
targetState.originData = districtData
targetState.props.enum = districtData.map(v => ({
label: v.name,
value: v.code,
}))
})
}
})
}
useEffect(() => {
handleAddressSelesed()
}, [])
}, [initialValue])
const AddressLabel = (
<div className={styles.label}>
......
......@@ -65,13 +65,28 @@ const LogisticsBillQuery = () => {
]
const externalStatusFetch = () => {
return new Promise(resolve => {
PublicApi.getLogisticsOrderSubmitStatusList().then((res: any) => {
resolve({
data: res.data.map((item: any) => {
return {
name: item.message,
state: item.code,
}
})
})
})
})
}
return (
<Table
columns={columns}
schema={LOGISTICSBILLQUERYSCHEMA}
effects="logisticsOrderNo"
fetch={PublicApi.getLogisticsOrderConfirmPage}
// externalStatusFetch={PublicApi.getLogisticsOrderSubmitStatusList}
externalStatusFetch={externalStatusFetch()}
/>
)
}
......
......@@ -71,13 +71,28 @@ const WaitConfirmLogisticsBill = () => {
},
]
const externalStatusFetch = () => {
return new Promise(resolve => {
PublicApi.getLogisticsOrderSubmitStatusList().then((res: any) => {
resolve({
data: res.data.map((item: any) => {
return {
name: item.message,
state: item.code,
}
})
})
})
})
}
return (
<Table
columns={columns}
schema={LOGISTICSBILLQUERYSCHEMA}
effects="logisticsOrderNo"
fetch={PublicApi.getLogisticsOrderWaitConfirmPage}
// externalStatusFetch={PublicApi.getLogisticsOrderSubmitStatusList}
externalStatusFetch={externalStatusFetch()}
/>
)
}
......
......@@ -64,14 +64,27 @@ const LogisticsBillQuery = () => {
},
]
const externalStatusFetch = () => {
return new Promise(resolve => {
PublicApi.getLogisticsOrderSubmitStatusList().then((res: any) => {
resolve({
data: res.data.map((item: any) => {
return {
name: item.message,
state: item.code,
}
})
})
})
})
}
return (
<Table
columns={columns}
schema={LOGISTICSBILLQUERYSCHEMA}
effects="logisticsOrderNo"
fetch={PublicApi.getLogisticsOrderSubmitPage}
// externalStatusFetch={PublicApi.getLogisticsOrderSubmitStatusList}
externalStatusFetch={externalStatusFetch()}
/>
)
}
......
......@@ -2,6 +2,21 @@ import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { PublicApi } from '@/services/api';
const fetchData = () => {
return new Promise(resolve => {
PublicApi.getLogisticsSelectListMemberCompanyQuery().then((res: any) => {
resolve({
data: res.data.map((item: any) => {
return {
name: item.name,
state: item.id,
}
})
})
})
})
}
/** 快递单查询 */
export const LOGISTICSBILLQUERYSCHEMA: ISchema = {
type: 'object',
......@@ -44,13 +59,12 @@ export const LOGISTICSBILLQUERYSCHEMA: ISchema = {
inline: true
},
properties: {
shipperId: {
companyId: {
type: 'string',
'x-component': 'Select',
'x-component-props': {
placeholder: '发货方',
className: 'fixed-ant-selected-down',
fetchSearch: PublicApi.getLogisticsSelectListShipperSelect,
placeholder: '物流服务商',
fetchSearch: fetchData,
style: {
width: 160
}
......@@ -148,7 +162,7 @@ export const WAITSBUMITLOGISTICSBILLSCHEMA: ISchema = {
'x-component-props': {
placeholder: '物流服务商',
className: 'fixed-ant-selected-down',
fetchSearch: PublicApi.getLogisticsSelectListMemberCompanyQuery,
fetchSearch: fetchData,
style: {
width: 160
}
......
......@@ -95,6 +95,21 @@ const LogisticsBillQuery = () => {
},
]
const externalStatusFetch = () => {
return new Promise(resolve => {
PublicApi.getLogisticsOrderSubmitStatusList().then((res: any) => {
resolve({
data: res.data.map((item: any) => {
return {
name: item.message,
state: item.code,
}
})
})
})
})
}
return (
<Table
reload={reload}
......@@ -102,7 +117,7 @@ const LogisticsBillQuery = () => {
schema={WAITSBUMITLOGISTICSBILLSCHEMA}
effects="logisticsOrderNo"
fetch={PublicApi.getLogisticsOrderWaitSubmitPage}
// externalStatusFetch={PublicApi.getLogisticsOrderSubmitStatusList}
externalStatusFetch={externalStatusFetch()}
controllerBtns={
<Row>
<Col span={24}>
......
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