Commit b694f8d5 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents e68aa329 f552279f
......@@ -660,13 +660,12 @@ export const logisticsDeliverySearchSchema: ISchema = {
}
}
},
invoicesType: {
invoicesTypeId: {
type: 'string',
// fetchSearch: PublicApi.getWarehouseInvoicesTypeAll,
// "x-component": 'SearchSelect',
"x-component": 'SearchSelect',
'x-component-props': {
placeholder: '单据类型',
fetchSearch: PublicApi.getWarehouseInvoicesTypeAll,
style: {
width: 160
}
......
......@@ -184,7 +184,7 @@ const processStock: React.FC<{}> = () => {
</Popconfirm>
),
[OuterAndInnerStatus.pending_add_logistics]: <Link to={`${ADD_LOGISTICS_PATH}?createType=3&id=${record.id}`}>新增物流单</Link>,
[OuterAndInnerStatus.pending_confirm_logistics]: <Link to={`${DETAIL_LOGISTICS_PATH}?id=${record.id}`}>查看物流单</Link>,
[OuterAndInnerStatus.pending_confirm_logistics]: <Link to={`${DETAIL_LOGISTICS_PATH}?id=${record.logisticsOrderId}`}>查看物流单</Link>,
[OuterAndInnerStatus.pending_confirm_deliver]: <Link to={`${PENDING_DELIVERD_PATH}/detail?id=${record.id}`}>发货</Link>,
[OuterAndInnerStatus.pending_add_process_in_warehouse]: (
<Link
......
......@@ -35,22 +35,22 @@ const Circulation: React.FC<Iprops> = (props) => {
)
})
}
</Steps>
</Steps>
</TabPane>
<TabPane tab="内部流转" key="2">
<Steps progressDot={customDot} style={{marginTop: '20px'}}>
{
innerTaskList && innerTaskList.map((item: Istatus) => {
return (
<Step title={item.taskName} status={item.isExecute == 1 ? 'finish' : 'wait'} description={item.roleName} key={item.step} />
<Step title={item.taskName} status={item.isExecute == 1 ? 'finish' : 'wait'} description={""} key={item.step} />
)
})
}
</Steps>
</TabPane>
</Tabs>
)
</Tabs>
)
}
export default Circulation
\ No newline at end of file
export default Circulation
import React, { useState, useEffect, useCallback } from 'react';
import { Modal, Spin } from 'antd';
import { PublicApi } from '@/services/api';
import EyePreview from '@/components/EyePreview';
import { BasicForm, TablePagination, SearchForm } from '../ModalForTable'
import { SearchForm } from '../ModalForTable'
import { createAsyncFormActions, FormEffectHooks } from '@formily/antd';
import { schema } from './schema';
import { getAuth } from '@/utils/auth';
import { useDebounceFn } from '@umijs/hooks';
import { Cascader } from 'antd';
const { onFieldInit$ } = FormEffectHooks
......@@ -22,13 +22,14 @@ const MALL_NAME = {
const ProcessProducts = ({visible, cancel, rowSelection, loading, ...restProps}) => {
const authInfo = getAuth();
const fetchData = useCallback(async (params: any) => {
console.log(params);
const customerCategoryId = params.customerCategoryId && Array.isArray(params.customerCategoryId) && params.customerCategoryId.pop();
// /product/commodity/common/getCommodityListByBuyer
const postData = {
shopType: ENTERPRISE_MALL[authInfo.memberType],
environment: 1,
memberId:authInfo.memberId,
...params,
customerCategoryId: customerCategoryId,
}
let res = await PublicApi.getProductCommodityCommonGetCommodityListByBuyer(postData);
return res;
......@@ -55,11 +56,11 @@ const ProcessProducts = ({visible, cancel, rowSelection, loading, ...restProps})
}
const effects = () => {
onFieldInit$('branchId').subscribe((fieldState) => {
onFieldInit$('brandId').subscribe((fieldState) => {
changeBrand({name: ''})
});
onFieldInit$('categoryId').subscribe((fieldState) => {
changeCategory({name: ''});
onFieldInit$('customerCategoryId').subscribe((fieldState) => {
changeCategory();
})
}
......@@ -69,30 +70,19 @@ const ProcessProducts = ({visible, cancel, rowSelection, loading, ...restProps})
if(res.code === 1000) {
options = res.data.map((item) => {return { label: item.name, value: item.id }})
}
actions.setFieldState("branchId", (state) => {
actions.setFieldState("brandId", (state) => {
state.props["x-component-props"]["options"] = options;
})
})
}
const changeCategory = (params) => {
PublicApi.getProductSelectGetSelectCustomerCategory(params).then(res => {
let options = []
if(res.code === 1000) {
options = res.data.map((item) => {return { label: item.name, value: item.id }})
}
actions.setFieldState("categoryId", (state) => {
state.props["x-component-props"]["options"] = options;
const changeCategory = () => {
PublicApi.getProductCustomerGetCustomerCategoryTree().then(res => {
actions.setFieldState("customerCategoryId", (state) => {
state.props["x-component-props"]["options"] = res.data;
})
})
}
const filterCategroyOption = (input, option) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
const onCategory = useDebounceFn((value) => {
changeCategory({name: value});
}, 500)
const filterBrandOption = (input, option) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
......@@ -116,14 +106,13 @@ const ProcessProducts = ({visible, cancel, rowSelection, loading, ...restProps})
<Spin spinning={loading}>
<SearchForm
request={fetchData}
components={{Cascader}}
schema={schema}
actions={actions}
effects={effects}
expressionScope={{
rowSelection: rowSelection,
columns: columns,
filterCategroyOption : filterCategroyOption,
onCategory: onCategory.run,
filterBrandOption: filterBrandOption,
onBrandSearch: onBrandSearch.run
}}
......
......@@ -62,7 +62,7 @@ export const schema = {
properties: {
customerCategoryId: {
type: 'string',
'x-component': 'Select',
'x-component': 'Cascader',
'x-component-props': {
placeholder: '请选择商品品类',
allowClear:true,
......@@ -70,16 +70,10 @@ export const schema = {
width: '200px',
margin: '0 20px 0 0'
},
showSearch: true,
optionFilterProp: "children",
filterOption: "{{filterCategroyOption}}",
onSearch: "{{onCategory}}"
// filterOption: {(input, option) =>
// option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
// }
fieldNames: { label: 'title', value: 'id', children: 'children' }
}
},
branchId: {
brandId: {
type: 'string',
'x-component': 'Select',
'x-component-props': {
......
This diff is collapsed.
......@@ -12,6 +12,11 @@ import { SelectGoodsColumns, ExternalListColumns, AfterSalesSelectGoodsColumns }
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import moment from 'moment';
import ModalTableOrder from './components/ModalTableOrder';
import StatusTag from '@/components/StatusTag';
import {
EXCHANGE_OUTER_STATUS_TAG_MAP,
EXCHANGE_INNER_STATUS_BADGE_MAP,
} from './constants';
const { TabPane } = Tabs;
const { Search } = Input;
const { Option } = Select;
......@@ -341,7 +346,7 @@ const AddLogistics: React.FC<{}> = () => {
obj.companyId = option.value
obj.companyName = option.children
setmemberInfo({ memberId: option.memberid, roleId: option.roleid })
}else {
} else {
obj.companyId = ''
obj.companyName = ''
}
......@@ -388,21 +393,21 @@ const AddLogistics: React.FC<{}> = () => {
})
break;
case 4:
PublicApi.getAsReplaceGoodsPageReturnCommodityByLogistics({ ...params, dataId: query.shipmentOrderId ? query.shipmentOrderId : query.relevanceOrderId }).then(res => {
PublicApi.getAsReplaceGoodsPageReturnCommodityByLogistics({ ...params, dataId: query.relevanceOrderId ? query.relevanceOrderId : query.shipmentOrderId }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
})
break;
case 5:
PublicApi.getAsReplaceGoodsPageReplaceCommodityByLogistics({ ...params, dataId: query.shipmentOrderId ? query.shipmentOrderId : query.relevanceOrderId }).then(res => {
PublicApi.getAsReplaceGoodsPageReplaceCommodityByLogistics({ ...params, dataId: query.relevanceOrderId ? query.relevanceOrderId : query.shipmentOrderId }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
})
break;
case 6:
PublicApi.getAsReturnGoodsPageCommodityByLogistics({ ...params, dataId: query.shipmentOrderId ? query.shipmentOrderId : query.relevanceOrderId }).then(res => {
PublicApi.getAsReturnGoodsPageCommodityByLogistics({ ...params, dataId: query.relevanceOrderId ? query.relevanceOrderId : query.shipmentOrderId }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
......@@ -748,14 +753,21 @@ const AddLogistics: React.FC<{}> = () => {
</Select>
</Form.Item>
<Form.Item label="单据时间" name='voucherTime'><span>{query.voucherTime && moment(query.voucherTime).format('YYYY-MM-DD HH:mm:ss')} </span></Form.Item>
{createType !== 1 &&
{(createType === 2 || createType === 3 ) ?
<Form.Item label="外部状态" name='externalState'>
{query.externalState === 1 ? <Badge status="warning" text='待提交' /> :
{
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='接收物流单' /> : ''
query.externalState === 3 ? <Badge status="error" text='不接收物流单' /> :
query.externalState === 4 ? <Badge status="success" text='接收物流单' /> : ''
}
</Form.Item>
:
(createType === 4 || createType === 5 || createType === 6) ?
<Form.Item label="外部状态" name='externalState'>
{/* <StatusTag type={EXCHANGE_OUTER_STATUS_TAG_MAP[record.outerStatus]} title={text} /> */}
</Form.Item>
: <></>
}
</Form>
</TabPane>
......
@import "../../member/components/index.less";
.count{
font-size: 24px;
color: #303133;
font-weight: 500;
}
.add-btn{
margin-bottom: 24px;
padding: 6px 0;
text-align: center;
background: #FAFBFC;
}
.alignCenter{
text-align: center;
}
.alignLeft{
text-align: left;
}
.hidden{
display: none;
}
.block{
display: block;
}
.selectBtn {
margin: 0 16px;
}
.filter-btn{
width : 112px;
margin: 0 0 0 16px;
}
.select {
width : 160px;
&:nth-last-of-type(1) {
margin-right: 0;
}
}
.mainCol {
background-color: #fff;
margin-bottom : 24px;
padding : 0 24px;
box-sizing : border-box;
&-title {
font-size : 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color : #303133;
padding : 20px 0;
}
&:nth-last-of-type(1) {
margin: 0;
}
&-row {
display : flex;
flex-wrap : wrap;
padding-bottom: 16px;
&-col {
display: flex;
width : calc(100% / 3);
padding: 16px 0;
&-option {
flex : 1;
font-size : 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color : #909399;
&:nth-last-of-type(1) {
flex : 3;
padding-right: 20px;
box-sizing : border-box;
color : #303133;
}
}
}
}
&-rows {
display : flex;
padding-bottom: 16px;
&-cols {
flex: 1;
.cols-main {
display: flex;
padding: 16px 0;
&:nth-last-of-type(1) {
padding-bottom: 0;
}
&-options {
flex : 1;
font-size : 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color : #909399;
&:nth-last-of-type(1) {
flex : 3;
padding-right: 20px;
box-sizing : border-box;
color : #303133;
}
}
}
}
}
}
\ No newline at end of file
@import "../../member/components/index.less";
.count{
font-size: 24px;
color: #303133;
font-weight: 500;
}
.add-btn{
margin-bottom: 24px;
padding: 6px 0;
text-align: center;
background: #FAFBFC;
}
.alignCenter{
text-align: center;
}
.alignLeft{
text-align: left;
}
.hidden{
display: none;
}
.block{
display: block;
}
.selectBtn {
margin: 0 16px;
}
.filter-btn{
width : 112px;
margin: 0 0 0 16px;
}
.select {
width : 160px;
&:nth-last-of-type(1) {
margin-right: 0;
}
}
.mainCol {
background-color: #fff;
margin-bottom : 24px;
padding : 0 24px;
box-sizing : border-box;
border-radius: 8px;
&-title {
font-size : 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color : #303133;
padding : 20px 0;
}
&:nth-last-of-type(1) {
margin: 0;
}
&-row {
display : flex;
flex-wrap : wrap;
padding-bottom: 16px;
&-col {
display: flex;
width : calc(100% / 3);
padding: 16px 0;
&-option {
flex : 1;
font-size : 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color : #909399;
&:nth-last-of-type(1) {
flex : 3;
padding-right: 20px;
box-sizing : border-box;
color : #303133;
}
}
}
}
&-rows {
display : flex;
padding-bottom: 16px;
&-cols {
flex: 1;
.cols-main {
display: flex;
padding: 16px 0;
&:nth-last-of-type(1) {
padding-bottom: 0;
}
&-options {
flex : 1;
font-size : 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color : #909399;
&:nth-last-of-type(1) {
flex : 3;
padding-right: 20px;
box-sizing : border-box;
color : #303133;
}
}
}
}
}
}
......@@ -346,7 +346,7 @@ const detailInfo: React.FC<{}> = () => {
{item.title}
</div>
<div className={style['cols-main-options']}>
<a>{item.value}</a>
<div>{item.value}</div>
</div>
</div>
);
......
......@@ -76,6 +76,7 @@ const company: React.FC<parmas> = (props) => {
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [excludeList, setExcludeList] = useState<Array<any>>([])
useEffect(() => {
console.log(pageStatus, 1008611)
let _title = pageStatus === PageStatus.PREVIEW ? '查看' : id ? '编辑' : '新建'
setHeaderTitle(`${_title}物流公司`)
if (id) {
......@@ -181,7 +182,7 @@ const company: React.FC<parmas> = (props) => {
const fetchData = (params) => {
if (visible) {
return new Promise(resolve => {
PublicApi.postMemberManageLogisticsPage({ ...params, excludeList }).then(res => {
PublicApi.postMemberManageLogisticsPage({ ...params, excludeList }, {ctlType: 'none'}).then(res => {
resolve(res.data)
})
})
......@@ -279,7 +280,7 @@ const company: React.FC<parmas> = (props) => {
</Form.Item>
</Col>
{
(pageStatus !== PageStatus.PREVIEW) &&
(pageStatus !== 'PREVIEW') &&
<Col span={18}>
<Row>
<Col span={6}></Col>
......
......@@ -98,27 +98,43 @@ const PayWaySetTemplate: React.FC<{}> = () => {
const onHnadleSubmit = () => {
let conditions = false;
let wayName = '';
payItem.forEach(item => {
if (item.id === 2 && item.isPitchOn === 1) {
if(item.payParametersAddListRequests.length > 0) {
conditions = true
try {
payItem.forEach(item => {
if (item.id === 2 && item.isPitchOn === 1) {
console.log(1)
if (item.payParametersAddListRequests.length > 0) {
conditions = true
} else {
conditions = false
wayName = `${item.way}缺少支付参数配置`
throw new Error
}
} else if (item.id === 1 && item.isPitchOn === 1) {
if (item.payParametersAddListRequests.length > 0 && item.payParametersList.length > 0) {
conditions = true
} else {
conditions = false
wayName = `${item.way}缺少支付参数配置`
throw new Error
}
} else if (item.id === 6 && item.isPitchOn === 1) {
if (item.payParametersAddListRequests.length > 0) {
const data = item.payParametersAddListRequests[0]
if (data.code && data.value && data.describe) {
conditions = true
} else {
conditions = false
wayName = `请配置${item.way}的参数`
throw new Error
}
}
} else {
conditions = false
wayName = item.way
return
}
} else if (item.id === 1 && item.isPitchOn === 1) {
if(item.payParametersAddListRequests.length > 0 && item.payParametersList.length > 0) {
conditions = true
} else {
conditions = false
wayName = item.way
return
}
} else {
conditions = true
}
})
})
} catch {
message.error(wayName)
}
if (conditions) {
PublicApi.postPayMemberQueryPlatformUpdate({
platformPayWays: payItem
......@@ -127,8 +143,6 @@ const PayWaySetTemplate: React.FC<{}> = () => {
history.push('/memberCenter/payandSettle/paySetting/payParamsSetting')
}
})
} else {
message.error(`请新增${wayName}的支付参数配置`)
}
}
......
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