Commit d24e613d authored by XieZhiXiong's avatar XieZhiXiong
parents 41afa775 eca4ffe3
......@@ -54,6 +54,14 @@ const HandlingRoute = {
component: '@/pages/handling/assign/detail',
hideInMenu: true
},
// 修改
{
path: '/memberCenter/handling/assign/tobeAddQuery/edit',
name: 'assignProductionEdit',
icon: 'smile',
component: '@/pages/handling/assign/add',
hideInMenu: true
},
// 指派生产通知单 -> 待审核通知单(一级)
{
path: '/memberCenter/handling/assign/pendingFirst',
......
......@@ -127,6 +127,13 @@ const LogisticsRoute: RouterChild = {
path: '/memberCenter/logisticsAbility/logisticsSubmit',
name: 'logisticsSubmit',
routes: [
// 新增
{
path: '/memberCenter/logisticsAbility/logisticsSubmit/addLogistics',
name: 'addToOrderSubmit',
component: '@/pages/logistics/addLogistics',
hideInMenu: true
},
// 快递单查询
{
path: '/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList',
......
......@@ -18,15 +18,9 @@ const payandSettleRoute: RouterChild = {
name: 'paySetting',
routes: [
// 会员支付参数配置
// {
// path:'/memberCenter/payandSettle/paySetting/payParamsSetting',
// name:'payParamsSetting',
// component:'@/pages/payandSettle/paySetting1'
// },
{
path:'/memberCenter/payandSettle/paySetting/payParamsSetting',
name:'payParamsSetting',
hideInMenu: true,
component:'@/pages/payandSettle/paySetting'
},
]
......
......@@ -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 } from './schema';
import { productModalSchema, productModalByMemberSchema, memberModalSchema, inquirySchema, demandSchema, enquirySchema, mergeOrderSchema, goodsModalSchema, demandNumberSchema, logisticsDeliverySearchSchema, addOrderModalSchema , logisticsSelectGoodsSearchSchema} 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' | 'none' ,
modalType?: 'productByDefault' | 'productByMember' | 'memberByDefault' | 'inquiryByDefault' | 'demandByDefault' | 'enquiryModel' | 'MergeOrderByDefault' | 'goodsModalSchema' | 'demandNumberSchema' | 'logisticsDelivery' | 'addOrderModalSchema' | 'selectGoodsSchema' | 'none' ,
useNestTable?: boolean, // 是否使用嵌套表格
nestColumns?: any[],
nestTableProps?: any,
......@@ -82,6 +82,9 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
case 'addOrderModalSchema': {
return addOrderModalSchema
}
case 'selectGoodsSchema': {
return logisticsSelectGoodsSearchSchema
}
case 'none': {
return {}
}
......
......@@ -673,3 +673,64 @@ export const logisticsDeliverySearchSchema: ISchema = {
}
}
}
export const logisticsSelectGoodsSearchSchema: ISchema = {
type: 'object',
properties: {
productName: {
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: {
brand: {
type: 'string',
"x-component-props": {
placeholder: '商品品牌',
style: {
width: 160
}
}
},
category: {
type: 'string',
"x-component": 'SearchSelect',
'x-component-props': {
placeholder: '商品品类',
fetchSearch: PublicApi.getWarehouseInvoicesTypeAll,
style: {
width: 160
}
},
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
......@@ -491,6 +491,7 @@ export default {
'menu.handling.confirm.createProcessInvoice': '新建加工发货单',
'menu.handling.confirm.createLogisticsOrder': '新建物流单',
'menu.handling.confirm.pendingReceiptDetail': '待确认回单生产通知单详情',
'menu.handling.assign.assignProductionEdit': '修改生产通知单',
// 售后能力
'menu.afterService': '售后',
'menu.afterService.exchangeApplication': '换货申请',
......
......@@ -30,26 +30,26 @@ const { getSettleAccountsPlatformConfigGetMemberSettlementStrategyDetail } = Pub
const common_columns: any = [
{ title: 'ID', dataIndex: 'memberId' },
{
title: '会员名称',
dataIndex: 'name',
{
title: '会员名称',
dataIndex: 'name',
render: (text: string, record: any) => {
return record.name || record.memberName
}
},
{ title: '会员类型', dataIndex: 'memberTypeName' },
{ title: '会员角色', dataIndex: 'roleName' },
{
title: '会员等级',
dataIndex: 'levelTag',
{
title: '会员等级',
dataIndex: 'levelTag',
render: (text: string, record: any) => {
return record.levelTag || record.levelName
}
}
},
]
const MemberSettleAdd: React.FC = () => {
const [visible, setVisible] = useState(false)
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'memberId' });
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'id' });
const [initialValue, setInitialValue] = useState({});
const { id, preview } = usePageStatus();
const [submitLoading, setSubmitLoading ] = useState(false);
......@@ -58,28 +58,28 @@ const MemberSettleAdd: React.FC = () => {
const tableAddButton = () => {
return (
<div>
<Button
onClick={() => setVisible(true)}
style={{marginBottom: 16}}
block
icon={<PlusOutlined/>}
<Button
onClick={() => setVisible(true)}
style={{marginBottom: 16}}
block
icon={<PlusOutlined/>}
type='dashed'
>
选择适用会员
</Button>
</Button>
</div>
)
}
const columns = common_columns.concat(
[
{
title: '操作',
{
title: '操作',
render: (text, record) => {
return (
<div onClick={() => handleRemove(record.memberId)}>删除</div>
)
}
}
}
]
);
......@@ -133,8 +133,8 @@ const MemberSettleAdd: React.FC = () => {
const serviceActions = isAdd
? PublicApi.postSettleAccountsPlatformConfigAddMemberSettlementStrategy
: PublicApi.postSettleAccountsPlatformConfigUpdateMemberSettlementStrategy
const postData = {...tempData, id: id || 0 }
const postData = {...tempData, id: id || 0 }
setSubmitLoading(true);
setUnsaved(false);
......@@ -196,7 +196,7 @@ const MemberSettleAdd: React.FC = () => {
message.error({content: res.message})
}
}
getInfo();
}
......@@ -222,13 +222,13 @@ const MemberSettleAdd: React.FC = () => {
onSubmit={values => handleSubmit(values)}
schema={addSchema}
effects={() => {
useAsyncSelect(
"settlementOrderType",
useAsyncSelect(
"settlementOrderType",
fetchOptions(PublicApi.getSettleAccountsCommonGetStrategySettlementOrderType)
)
}}
/>
<ModalTable
modalTitle='选择适用会员'
confirm={handleOkAddMember}
......@@ -238,11 +238,11 @@ const MemberSettleAdd: React.FC = () => {
rowSelection={memberRowSelection}
fetchTableData={params => fetchMemberData(params)}
tableProps={{
rowKey: 'memberId',
rowKey: 'id',
}}
formilyProps={
{
ctx: {
ctx: {
schema: memberSchema,
actions: formActions,
components: { ModalSearch: Search, SearchSelect, Submit } ,
......@@ -269,4 +269,4 @@ const MemberSettleAdd: React.FC = () => {
)
}
export default MemberSettleAdd
\ No newline at end of file
export default MemberSettleAdd
......@@ -11,7 +11,7 @@ import { ArrowUpOutlined, DeleteOutlined, PlusOutlined, ArrowDownOutlined, Caret
import { addTempalteIdToList } from '../../../../utils'
import styles from './index.less'
interface advertItemType {
interface AdvertItemType {
/**
* ID
*/
......@@ -54,7 +54,7 @@ interface advertItemType {
interface AdvertSettingPropsType {
advertList: advertItemType[];
advertList: AdvertItemType[];
onChange: Function;
type: 'top' | 'banner' | 'interact' | 'category';
templateid: number;
......@@ -64,7 +64,7 @@ interface AdvertSettingPropsType {
const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref) => {
const { advertList = [], templateid, type, categoryid, templateType } = props
const [list, setList] = useState<advertItemType[]>(advertList)
const [list, setList] = useState<AdvertItemType[]>(advertList)
const [confirmLoading, setConfirmLoading] = useState<boolean>(false)
const [newProps, setNewProps] = useState(props)
......@@ -87,10 +87,10 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
setNewProps(newProps)
}
const sortUp = (index: number, item: advertItemType) => {
let newList = JSON.parse(JSON.stringify(list))
let tempItem = JSON.parse(JSON.stringify(item))
let temp = newList[index - 1]
const sortUp = (index: number, item: AdvertItemType) => {
const newList = JSON.parse(JSON.stringify(list))
const tempItem = JSON.parse(JSON.stringify(item))
const temp = newList[index - 1]
newList[index - 1] = item
newList[index - 1].sort = temp.sort
newList[index] = temp
......@@ -99,10 +99,10 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
changeNewProps('advertList', newList)
}
const sortDown = (index: number, item: advertItemType) => {
let newList = JSON.parse(JSON.stringify(list))
let temp = newList[index + 1]
let tempItem = JSON.parse(JSON.stringify(item))
const sortDown = (index: number, item: AdvertItemType) => {
const newList = JSON.parse(JSON.stringify(list))
const temp = newList[index + 1]
const tempItem = JSON.parse(JSON.stringify(item))
newList[index + 1] = item
newList[index + 1].sort = temp.sort
newList[index] = temp
......@@ -112,7 +112,7 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
}
const addSliderItem = () => {
let newList = JSON.parse(JSON.stringify(list))
const newList = JSON.parse(JSON.stringify(list))
let sort = 0
if (newList.length <= 0) {
sort = 1
......@@ -120,7 +120,7 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
sort = newList[newList.length - 1].sort + 1
}
let tempItem: any = {
const tempItem: any = {
templateId: Number(templateid),
type: getAdvertType(type),
name: '',
......@@ -140,7 +140,7 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
}
const handleDeleteItem = (index: number) => {
let newList = JSON.parse(JSON.stringify(list))
const newList = JSON.parse(JSON.stringify(list))
newList.splice(index, 1)
let sort = 1
newList.map(item => {
......@@ -152,7 +152,7 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
}
const handleExpand = (sort: number, state: boolean) => {
let newList = JSON.parse(JSON.stringify(list))
const newList = JSON.parse(JSON.stringify(list))
newList.map(item => {
if (item.sort === sort) {
item.expand = state
......@@ -162,7 +162,7 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
}
const handleKeyChange = (value: string, sort: number, key: string) => {
let newList = JSON.parse(JSON.stringify(list))
const newList = JSON.parse(JSON.stringify(list))
newList.map(item => {
if (item.sort === sort) {
item[key] = value
......@@ -193,9 +193,10 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
return
}
setConfirmLoading(true)
let newParam: any = JSON.parse(JSON.stringify(newProps))
const newParam: any = JSON.parse(JSON.stringify(newProps))
newParam.advertList = newParam.advertList.map((item) => {
if (!item.link && !item.link.startsWith('http://') && !item.link.startsWith('https://')) {
console.log(item.link, "item.link")
if (item.link && !item.link.startsWith('http://') && !item.link.startsWith('https://')) {
item.link = `http://${item.link}`
}
return item
......@@ -247,7 +248,7 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
reject()
return
}
let param: any = {
const param: any = {
templateId: templateid,
type: getAdvertType(type),
adverts: addTempalteIdToList(advertList, templateid)
......@@ -293,7 +294,7 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
<div className={styles.advert_setting_line_name} onClick={() => handleExpand(item.sort, !item.expand)}>
<span>{item.name}</span>
{
!!item.expand ? <CaretUpOutlined className={styles.icon} /> : <CaretDownOutlined className={styles.icon} />
item.expand ? <CaretUpOutlined className={styles.icon} /> : <CaretDownOutlined className={styles.icon} />
}
</div>
{
......@@ -319,10 +320,10 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
<div className={styles.advert_setting_line_addItem_line}>
<div className={styles.advert_setting_line_addItem_line_label}>链接</div>
<div className={styles.advert_setting_line_addItem_line_brief}>
<Input
className={styles.advert_setting_line_addItem_input}
value={item.link}
onChange={(e) => handleKeyChange(e.target.value, item.sort, 'link')}
<Input
className={styles.advert_setting_line_addItem_input}
value={item.link}
onChange={(e) => handleKeyChange(e.target.value, item.sort, 'link')}
/>
</div>
</div>
......@@ -344,4 +345,6 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
)
})
export default AdvertSetting
\ No newline at end of file
AdvertSetting.displayName = "AdvertSetting"
export default AdvertSetting
import React, { useState, useEffect, useCallback } from 'react'
import React, { useState, useEffect } from 'react'
import { clearSelectedStatus, changeProps } from 'lingxi-editor-core'
import { Row, Col, Button, Input, Pagination, Select, Form, message, Modal } from 'antd'
import SettingList from '../../../../components/SettingList'
......@@ -207,6 +207,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
changeProps({
props: {
linkdisable: true,
templateid,
categoryid,
goodsList: newList
......
......@@ -127,7 +127,7 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
const fetchShopInfo = () => {
return new Promise((resolve) => {
const param: any = {
memberId,
memberId,
roleId: memberRoleId
}
PublicApi.getTemplateShopFindShop(param).then(res => {
......
This diff is collapsed.
......@@ -282,6 +282,36 @@ const Detail: React.FC<{}> = () => {
}
}
/**
* 手工发货
*/
const handleManualDeliver = (value) => {
const postData = {
produceNoticeOrderId: id,
manualDeliverBO: value,
}
PublicApi.postEnhanceProcessToBeDeliveryManualDeliver(postData)
.then(({data, code}) => {
if(code === 1000) {
getInfo()
}
})
}
/**
* 手工收货
*/
const handleManualReceiver = () => {
const postData = {
id: id,
}
PublicApi.postEnhanceSupplierToBeReceiveManualReceive(postData)
.then(({data, code}) => {
if(code === 1000) {
getInfo()
}
})
}
return (
<PageHeaderWrapper
title={
......@@ -331,14 +361,32 @@ const Detail: React.FC<{}> = () => {
}
{
// 这里手工发货需要某个字段值去判断
pathname === (PENDING_DELIVERD_PATH + "/detail")
pathname === (PENDING_DELIVERD_PATH + "/detail") && info && info.outerTaskType === 29 && info.innerStatus < 21
? (
<DeliverGood mode="view">
<DeliverGood mode="edit" handleManualDeliver={handleManualDeliver} deliveryType={info.deliveryType}>
<Button loading={loading} type="primary" >手工发货</Button>
</DeliverGood>
)
: null
}
{
// 手工收货
pathname === (ASSIGN_PENDING_RECEIVE_DETAIL) && info && info.outerTaskType === 29 && info.innerStatus == 21
? (
<DeliverGood
mode="view"
deliveryType={info.deliveryType}
deliveryAddress={info.manualDeliverBO?.deliveryAddress}
deliveryTime={info.manualDeliverBO?.deliveryTime}
deliveryNo={info.manualDeliverBO?.deliveryNo}
logisticsName={info.manualDeliverBO?.logisticsName}
handleManualReceiver={handleManualReceiver}
>
<Button type="primary" >确认手工收货</Button>
</DeliverGood>
)
: null
}
</Col>
</Row>
</PageHeader>
......@@ -357,23 +405,28 @@ const Detail: React.FC<{}> = () => {
</div>
{/* 这里全部是走 非手工发货,当有手工发货按钮是,此时下面收发货明细隐藏 */}
<div style={{marginTop: '20px'}}>
<ReceiptDeliveryDetailsCard>
<StatisticsTab tab="收发货统计" columns={receiveColumns(info.source === 2 ? 'product' : 'order')} dataSource={info.details}></StatisticsTab>
{
info.pnoReceiveDeliverDetailDOList &&
info.pnoReceiveDeliverDetailDOList.length > 0
? <DetailTab
tab="收发货明细"
columns={pnoReceiveDeliverDetailDOListColumns}
dataSource={info.pnoReceiveDeliverDetailDOList}
handleConfirm={handleConfirm}
/>
: null
}
{
info && info.outerTaskType !== 29
? <div style={{marginTop: '20px'}}>
<ReceiptDeliveryDetailsCard>
<StatisticsTab tab="收发货统计" columns={receiveColumns(info.source === 2 ? 'product' : 'order')} dataSource={info.details}></StatisticsTab>
{
info.pnoReceiveDeliverDetailDOList &&
info.pnoReceiveDeliverDetailDOList.length > 0
? <DetailTab
tab="收发货明细"
columns={pnoReceiveDeliverDetailDOListColumns}
dataSource={info.pnoReceiveDeliverDetailDOList}
handleConfirm={handleConfirm}
/>
: null
}
</ReceiptDeliveryDetailsCard>
</div>
: null
}
</ReceiptDeliveryDetailsCard>
</div>
<div style={{marginTop: '20px'}}>
<DeliveryInfomation
deliveryDate={info.deliveryDate}
......
......@@ -328,3 +328,6 @@ export const DELIEVER_AND_RECEIVE_INNER_STATUS = {
'8_1': 5,
'8_2': 6
}
// 用户当前的会员类型:1-企业会员,2-企业个人会员,3-渠道企业会员,4-渠道个人会员
export const ENTERPRISE_MALL = {"1": 1, "2": 1, "3": 3, '4': 4}; // 根据当前用户角色查询商城
import React, { useState } from 'react';
import { message } from 'antd';
export const useRowSelection = (options) => {
const { type = 'checkbox', primaryKey = "id", func, ...others } = options;
const [selectedKeys, setSelectedKeys] = useState([]);
const [hasSelectedRows, setSelectedRows] = useState<any[]>([]);
const [loading, setLoading] = useState(false);
const rowSelection = {
type: type,
selectedRowKeys: selectedKeys,
onSelect: async (record: any, selected: boolean, selectedRows: any[], nativeEvent) => {
const tempKey = record[primaryKey];
if(type === 'radio') {
setSelectedKeys(record[tempKey]);
setSelectedRows(selectedRows);
return ;
}
let newArray = [];
if(selected) {
newArray = hasSelectedRows.concat(record);
} else {
// 如果是删除, 那么我们直接筛选key
newArray = hasSelectedRows.filter((item) => record[primaryKey] !== item[primaryKey] );
}
if(func) {
setLoading(true)
const {isSuccess, data} = await func(newArray);
setLoading(false);
if(!isSuccess) {
message.info(data.tips);
return;
}
}
setSelectedKeys(newArray.map((item) => item[primaryKey]));
setSelectedRows(newArray);
},
onSelectAll: async (selected: boolean, selectedRows: any[], changeRows: any[]) => {
let newArray = [];
if(selected) {
newArray = hasSelectedRows.concat(changeRows);
} else {
// 如果是删除, 那么我们直接筛选key
const removekeys = changeRows.map((item) => item[primaryKey]);
newArray = hasSelectedRows.filter((item) => !removekeys.includes(item[primaryKey]));
}
if(func && selected) {
setLoading(true)
const {isSuccess, data} = await func(newArray);
setLoading(false);
if(!isSuccess) {
message.info(data.tips);
return;
}
}
setSelectedKeys(newArray.map((item) => item[primaryKey]));
setSelectedRows(newArray);
},
...others,
}
return { rowSelection, loading, hasSelectedRows, selectedKeys, setSelectedRows, setSelectedKeys };
}
import React, { useState, useCallback } from 'react';
import { Button, Modal, DatePicker, Row, Col } from 'antd';
import NiceForm from '@/components/NiceForm';
import { createAsyncFormActions } from '@formily/antd';
import { createAsyncFormActions, FormEffectHooks } from '@formily/antd';
import { PublicApi } from '@/services/api';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import styles from './index.less';
import { Link } from 'umi'
const formActions = createAsyncFormActions();
interface Iprops {
children: React.ReactNode,
mode: 'view' | 'edit'
mode: 'view' | 'edit',
handleManualDeliver?: (value: any) => void
handleManualReceiver?: () => void
deliveryType: 1 | 2,
deliveryAddress?: string,
deliveryTime?: string
deliveryNo?: string
logisticsName?: string
}
const schema = {
type: 'object',
properties: {
layout: {
type: "object",
"x-component": "mega-layout",
"x-component-props": {
"labelAlign": "top",
"full": true
const getSchema = (type) => {
const others = type == 1
? {
deliveryNo: {
type: 'string',
title: '发货单号',
"x-rules": [
{
required: true,
message: '请填写发货单号'
},
{
limitByte: true, // 自定义校验规则
maxByte: 20,
}
]
},
properties: {
address: {
type: 'string',
"title": "发货地址",
enum: [],
"x-rules": [
{
required: true,
message: '请选择发货地址'
}
]
},
time: {
type: 'time',
title: '发货时间',
"x-component": 'DatePicker',
"x-rules": [
{
required: true,
message: '请选择发货时间'
}
]
logisticsName: {
type: 'string',
title: '物流公司',
enum: [],
"x-rules": [
{
required: true,
message: '请选择物流公司'
}
]
},
logisticsCode: {
type: 'string',
display: false
}
}
: {}
return {
type: 'object',
properties: {
layout: {
type: "object",
"x-component": "mega-layout",
"x-component-props": {
"labelAlign": "top",
"full": true
},
no: {
type: 'string',
title: '发货单号',
"x-rules": [
{
required: true,
message: '请填写发货单号'
properties: {
deliveryAddress: {
type: 'string',
"title": "发货地址",
enum: [],
"x-rules": [
{
required: true,
message: '请选择发货地址'
}
]
},
deliveryTime: {
type: 'string',
title: '发货时间',
"x-component": 'DatePicker',
"x-component-props": {
format: 'YYYY-MM-DD HH:mm:ss'
},
{
limitByte: true, // 自定义校验规则
maxByte: 20,
}
]
},
company: {
type: 'string',
title: '物流公司',
enum: [],
"x-rules": [
{
required: true,
message: '请选择物流公司'
}
]
"x-rules": [
{
required: true,
message: '请选择发货时间'
}
]
},
...others,
}
}
}
}
}
const DeliverGood: React.FC<Iprops> = (props) => {
const { mode,} = props;
const { mode,} = props;
const [visible, setVisible] = useState(false);
const schema = getSchema(props.deliveryType)
const handleOk = () => {
if(mode === 'edit') {
formActions.submit()
} else {
setVisible(false);
props.handleManualReceiver()
}
}
const handleCancel = () => {
setVisible(false);
}
const handleSubmit = (value) => {
setVisible(false);
const {deliveryTime, ...rest} = value;
if(props.handleManualDeliver) {
props.handleManualDeliver({...rest, deliveryTime: deliveryTime.valueOf() });
}
}
const fetchDelieverAddress = useCallback(async () => {
......@@ -100,7 +127,7 @@ const DeliverGood: React.FC<Iprops> = (props) => {
return data.data.map((item) => {
return {
label: item.fullAddress + " / " + item.shipperName + " / " + item.phone,
value: item.id
value: item.fullAddress + " / " + item.shipperName + " / " + item.phone,
}
})
}
......@@ -108,13 +135,12 @@ const DeliverGood: React.FC<Iprops> = (props) => {
}, [])
const fetchCompany = useCallback(async() => {
// /logistics/select/listCompany
const { data, code } = await PublicApi.getLogisticsSelectListCompany({cooperateType: '2'});
if(code === 1000) {
return data.map((item) => {
return {
label: item.name,
value: item.id
value: item.name
}
})
}
......@@ -133,7 +159,7 @@ const DeliverGood: React.FC<Iprops> = (props) => {
title="发货处理"
onOk={handleOk}
onCancel={handleCancel}
>
>
{
mode === 'edit'
? <NiceForm
......@@ -141,34 +167,40 @@ const DeliverGood: React.FC<Iprops> = (props) => {
components={{DatePicker}}
onSubmit={handleSubmit}
effects={($, actions) => {
useAsyncSelect("address", fetchDelieverAddress);
useAsyncSelect("company", fetchCompany)
// effects();
useAsyncSelect("deliveryAddress", fetchDelieverAddress);
useAsyncSelect("logisticsName", fetchCompany);
}}
schema={schema}
/>
: <div>
<Row className={styles.row}>
<Col className={styles.label} span={4}>发货地址:</Col>
<Col>广东省广州市海珠区新港东路1068号中州中心北塔6楼</Col>
<Col>{props.deliveryAddress}</Col>
</Row>
<Row className={styles.row}>
<Col className={styles.label} span={4}>发货时间:</Col>
<Col>2020-05-20 08:00</Col>
</Row>
<Row className={styles.row}>
<Col className={styles.label} span={4}>物流单号:</Col>
<Col><Link to={'/'}>WL0954548</Link></Col>
</Row>
<Row className={styles.row}>
<Col className={styles.label} span={4}>物流公司:</Col>
<Col>顺丰</Col>
<Col>{props.deliveryTime}</Col>
</Row>
{
props.deliveryType === 1
? <>
<Row className={styles.row}>
<Col className={styles.label} span={4}>物流单号:</Col>
<Col><a href="https://www.kuaidi100.com/">{props.deliveryNo}</a></Col>
</Row>
<Row className={styles.row}>
<Col className={styles.label} span={4}>物流公司:</Col>
<Col>{props.logisticsName}</Col>
</Row>
</>
: null
}
</div>
}
</Modal>
</div>
)
}
export default DeliverGood
\ No newline at end of file
export default DeliverGood
......@@ -10,7 +10,7 @@ const actions = createAsyncFormActions();
const { onFieldInit$, onFieldMount$ } = FormEffectHooks
const EnterPrise = ({visible, cancel, ...restProps}) => {
const [selectRow, memberRowCtl] = useRowSelectionTable({ customKey: 'memberId', type: 'radio' });
const [selectRow, memberRowCtl] = useRowSelectionTable({ customKey: 'id', type: 'radio'});
const fetchData = useCallback(async (params: any) => {
let res = await PublicApi.getMemberManageLowerPageBynamerole(params);
return res;
......
......@@ -132,7 +132,7 @@ export const schema = {
"x-component": "Table",
"x-component-props": {
"columns": columns,
"rowKey": "memberId",
"rowKey": "id",
"pagination":false,
"rowSelection": "{{rowSelection}}"
}
......
......@@ -58,6 +58,9 @@ const ProcessProducts = ({visible, cancel, rowSelection, ...restProps}) => {
price: item.price, //单价,
hasProcessNum: item.processNum || 0,
fullId: item.id, //订单商品唯一id
shopId: record.shopId,
memberId: item.memberId,
memberRoleId: item.memberRoleId,
}
}
)
......
import React, { useState, useEffect, useCallback } from 'react';
import { Modal} from 'antd';
import { Modal, Spin } from 'antd';
import { PublicApi } from '@/services/api';
import EyePreview from '@/components/EyePreview';
import { BasicForm, TablePagination, SearchForm } from '../ModalForTable'
......@@ -18,7 +18,7 @@ const MALL_NAME = {
"3": "渠道商城",
"4": "渠道自有商城"
}
const ProcessProducts = ({visible, cancel, rowSelection, ...restProps}) => {
const ProcessProducts = ({visible, cancel, rowSelection, loading, ...restProps}) => {
const authInfo = getAuth();
const fetchData = useCallback(async (params: any) => {
console.log(params);
......@@ -36,16 +36,16 @@ const ProcessProducts = ({visible, cancel, rowSelection, ...restProps}) => {
const columns = [
{ title: 'ID', dataIndex: 'id'},
{ title: '商品名称', dataIndex: 'name'},
{
title: '上架商城',
dataIndex: 'shop',
{
title: '上架商城',
dataIndex: 'shop',
render: (text, record) => {
return MALL_NAME[authInfo.memberType]
}
},
{ title: '品类', dataIndex: 'customerCategoryName'},
{ title: '品牌', dataIndex: 'brandName'}
]
]
const onOk = () => {
// restProps.onOk(setSelectRow)
......@@ -89,20 +89,23 @@ const ProcessProducts = ({visible, cancel, rowSelection, ...restProps}) => {
>
{
visible
? <SearchForm
request={fetchData}
schema={schema}
actions={actions}
effects={effects}
expressionScope={{rowSelection: rowSelection, columns: columns}}
></SearchForm>
?
<Spin spinning={loading}>
<SearchForm
request={fetchData}
schema={schema}
actions={actions}
effects={effects}
expressionScope={{rowSelection: rowSelection, columns: columns}}
/>
</Spin>
: null
}
</Modal>
)
}
export default ProcessProducts
\ No newline at end of file
export default ProcessProducts
......@@ -149,9 +149,13 @@ const Query: React.FC<{}> = (props) => {
{
actionMap[pathname]
}
{
pathname === ASSIGN_TO_BE_ADD_QUERY
? <a onClick={() => handleUpdateOrDelete('delete', {id: record.id})}>删除</a>
? <Space>
<Link to={`${ASSIGN_TO_BE_ADD_QUERY}/edit?id=${record.id}`}>修改</Link>
<a onClick={() => handleUpdateOrDelete('delete', {id: record.id})}>删除</a>
</Space>
: null
}
</Space>
......@@ -295,7 +299,7 @@ const Query: React.FC<{}> = (props) => {
let searchData = {
...rest,
startTime: st,
endTtime: et
endTime: et
}
ref.current.reload(searchData)
}, [ref])
......
......@@ -207,7 +207,7 @@ const Query: React.FC<{}> = (props) => {
let searchData = {
...rest,
startTime: st,
endTtime: et
endTime: et
}
ref.current.reload(searchData)
......
import { ColumnType } from 'antd/lib/table/interface';
export const SelectGoodsColumns: ColumnType<any>[] = [
{
title: '商品ID',
key: 'productId',
dataIndex: 'productId',
},
{
title: '商品名称',
key: 'productName',
dataIndex: 'productName',
},
{
title: '品类',
key: 'category',
dataIndex: 'category',
},
{
title: '品牌',
key: 'brand',
dataIndex: 'brand',
}
]
.revise_style {
:global {
.ant-form-item-label {
width: 174px;
label {
color:#6B778C
}
}
.ant-form-item-control {
width: 500px;
.ant-form-item-control-input-content {
position: relative;
.ant-btn-link {
position: absolute;
right: -120px;
}
.ant-picker {
width: 100%;
}
}
.ant-input-group-addon {
.ant-input-search-button {
background-color: #6B778C;
border-color: #6B778C;
}
}
}
.ant-radio-group-solid {
.ant-radio-button-wrapper-checked {
background: #6B778C;
border-color: #6B778C;
&:hover {
background: #6B778C;
border-color: #6B778C;
}
}
}
}
.upload_item {
padding: 5px 8px;
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #FAFBFC;
.upload_left {
display: flex;
align-items: center;
color: #303133;
:global {
.anticon-file-word {
color: #4279df;
font-size: 20px;
margin-right: 8px;
}
}
}
.upload_right {
color: #00B37A;
cursor: pointer;
:global {
.anticon-delete {
margin-left: 19px;
color: #C0C4CC;
}
}
}
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -184,8 +184,6 @@ const ModalTableOrder: React.FC<ModalTableProps> = (props) => {
form.setFieldsValue({
radio: type
})
// console.log('执行')
// fetchData()
}, [type])
const fetchData = (parmas?: any) => {
......
......@@ -25,13 +25,13 @@ const Category: React.FC<CategoryPropsType> = (props) => {
useEffect(() => {
let getCategoryFn
let params: any = {}
const params: any = {}
let headers = {}
switch (type) {
case LAYOUT_TYPE.mall:
if (mallTemplateId) {
params.templateId = mallTemplateId
getCategoryFn = PublicApi.getTemplatePlatformFindAllCategoryTree
getCategoryFn = PublicApi.getTemplateWebCategoryWebFindEnterpriseCategoryTree
fetchCategoryList(getCategoryFn, params, type)
}
break
......
......@@ -4,8 +4,10 @@
margin: 0 auto;
z-index: 9;
.anchor {
position: absolute;
overflow: hidden;
top: 20px;
width: 88px;
left: -128px;
......@@ -82,4 +84,4 @@
}
}
}
}
\ No newline at end of file
}
......@@ -464,20 +464,22 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
* 获取支付方式
* @param memberId
*/
const getPayWayListByMemberId = (memberId: number) => {
const getPayWayListByMemberId = (memberId: number, memberRoleId: number) => {
return new Promise((resolve, reject) => {
if (!memberId) {
resolve([])
return
}
const param: any = {
memberId
memberId,
memberRoleId
}
PublicApi.getPayPayWayList(param).then(res => {
if (res.code === 1000) {
resolve(initPayWayList(res.data))
} else {
resolve([])
message.error(res.message)
reject()
}
})
})
......@@ -593,7 +595,11 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
orderList: buyOrderlist
}]
}
buyOrderInfo.payWayList = await getPayWayListByMemberId(selectItem.memberId)
try {
buyOrderInfo.payWayList = await getPayWayListByMemberId(selectItem.memberId, selectItem.memberRoleId)
} catch (error) {
return
}
const param: any = {
productIds,
......
This diff is collapsed.
......@@ -434,7 +434,7 @@ const Details: React.FC<parmas> = (props) => {
{
Object.keys(data).length > 0 &&
<>
{type !== 'quote' ?
{type === 'rfq' ?
<TabPane tab="外部流转" key="1">
<Steps
style={{ padding: '20px 0' }}
......@@ -578,7 +578,7 @@ const Details: React.FC<parmas> = (props) => {
</div>
<div className={style.item_wrap}>
{
type !== 'quote' ?
type === 'rfq' ?
<>
<div className={style.mainCol_title}>外部流转记录</div>
<Table columns={flowRecord.external} rowKey='id' pagination={false} dataSource={data.externalInquiryListLogResponses} />
......
......@@ -28,7 +28,7 @@ class SiteStore implements ISiteModule {
siteId: this.siteId
}
const res = await PublicApi.getTemplatePlatformFindUseTemplateBySite(param)
const res = await PublicApi.getTemplateWebPageTemplateWebFindEnterpriseTemplate(param)
runInAction(() => {
this.mallTemplateInfo = res.data || {}
this.mallTemplateId = this.mallTemplateInfo.id
......
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