Commit 856c2e32 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

Merge branch 'v2-220318' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into v2-220318

parents 4a748929 c6e4d127
......@@ -6,7 +6,7 @@ module.exports = [
{ name: 'SearchV2', token: 'f3e6ec26764f54d06ba33f487ff42d7debeaef397e51dc395040447737eb2e66', categoryIds: [0], }, // 搜索服务V2
{ name: 'PurchaseV2', token: '84c81ef877863ad4e2c0ebb2c3b3e80f9539420f2fc0828ef33f5159e8423b2c', categoryIds: [0] }, // 采购服务V2
{ name: 'SettleV2', token: 'fed8d45aa92e7f0e382a3dcc5e0ef63f13f0badeabab76d6a6e2db49aa403346', categoryIds: [0] },
{ name: 'TransactionV2', token: '3ad04435494d01c359b9f07948338e019133a3e6c0fccdbe1bc3adc19cf1e0b1', categoryIds: [0] }, // 交易服务V2
{ name: 'TransactionV2', token: 'f8efd57dd9686fb8563dd3495b53a36bb5b2d24e5db48fecea43a7057de81bd7', categoryIds: [0] }, // 交易服务V2-318
{ name: 'ContractV2', token: 'bbf1f327cfe7c59d1e7fd9c5d25119829dd79d238b1f1c79ed97331e220721a4', categoryIds: [0] }, // 合同能力V2
{ name: 'OrderNewV2', token: '89202a7986a86e7306925203d7eea0d999af8bb98d70a210d217a470d44b2dba', categoryIds: [0], }, //订单服务V2 New
{ name: 'MemberV2', token: 'be87c2732cb1253f82fe6c27d6cca9982c7dca9b384e46cc2e797b5835846834', categoryIds: [0]}, //会员服务 V2
......
......@@ -16,6 +16,14 @@ export default [
component: '@/pages/transaction/dealAbility/inquiryOffer/waitAllotOrder',
},
{
/** 待分配询价单 */
path: '/memberCenter/tranactionAbility/inquiryOffer/waitAllotOrder/preview',
name: '询价单详情',
component: '@/pages/transaction/dealAbility/inquiryOffer/preview',
hideInMenu: true,
noMargin: true,
},
{
/** 询价单查询 */
path: '/memberCenter/tranactionAbility/inquiryOffer/inquirySearch',
name: '询价单查询',
......
......@@ -205,6 +205,24 @@ module.exports = {
BACK_GATEWAY: 'http://10.0.0.27:8100',
USE_ROUTE_CONFIG: true,
SOCKET_URL: 'ws://10.0.0.27:9880',
YAPI_URL: 'http://10.0.0.25:4000/'
YAPI_URL: 'http://10.0.0.25:4000/',
// 注 交付中心同事可不使用下面的ssh配置
ssh: JSON.stringify({
user: "root",
// Password optional, prompted if none given
password: "SsyLingxi@test666",
host: "10.0.0.27",
port: 22,
localRoot: path.resolve('./dist/'),
remoteRoot: "/home/www/platform/dist/",
// include: ["*", "**/*"], // this would upload everything except dot files
include: ["*"],
// e.g. exclude sourcemaps, and ALL files in node_modules (including dot files)
// exclude: ["dist/**/*.map", "node_modules/**", "node_modules/**/.*", ".git/**"],
// delete ALL existing files at destination before uploading, if true
deleteRemote: true,
// Passive mode is forced (EPSV command is not sent)
forcePasv: true
})
}
}
......@@ -7,6 +7,7 @@
"upload:25": "cross-env PRO_ENV=25 taskName=upload yarn scripts:build",
"upload:study": "cross-env PRO_ENV=study taskName=upload yarn scripts:build",
"upload:v2": "cross-env PRO_ENV=v2 taskName=upload yarn scripts:build",
"upload:v2-0318": "cross-env PRO_ENV=v2-0318 taskName=upload yarn scripts:build",
"upload:v2Preview": "cross-env PRO_ENV=v2Preview taskName=upload yarn scripts:build",
"upload:v2-demo": "cross-env PRO_ENV=v2-demo taskName=upload yarn scripts:build",
"upload:v2scm": "cross-env PRO_ENV=v2scm taskName=upload yarn scripts:build",
......
......@@ -39,6 +39,15 @@ const AreaSelect: React.FC<AreaSelectProps> = (props) => {
}
};
const handleResetChang = (newInnerValues: AreaSelectValueType[], index: number) => {
let i = index + 1;
while (i < newInnerValues.length) {
newInnerValues[i] = undefined;
i++;
}
newInnerValues = newInnerValues.filter(Boolean);
}
const handleSelectChange = (value: AreaSelectValueType, index: number) => {
let newInnerValues = [...innerValues];
......@@ -46,13 +55,11 @@ const AreaSelect: React.FC<AreaSelectProps> = (props) => {
// 如果是清空操作,则把当前层级之后的 选项 及 值 也清空
if (!value) {
let i = index + 1;
while (i < newInnerValues.length) {
newInnerValues[i] = undefined;
i++;
}
newInnerValues = newInnerValues.filter(Boolean);
handleResetChang(newInnerValues, index)
triggerChange([]);
} else {
handleResetChang(newInnerValues, index)
setInnerValues(newInnerValues);
}
// 全部选择了才触发 onChange
......
......@@ -14,7 +14,7 @@ export default {
'portalSystem.shi': '是',
'portalSystem.fou': '否',
'portalSystem.chaxun': '查询',
'portalSystem.menhuguanlixiangqing': '门管理详情',
'portalSystem.menhuguanlixiangqing': '门管理详情',
'portalSystem.jibenxinxi': '基本信息',
'portalSystem.mendianLOGO': '门店LOGO',
'portalSystem.lianxixinxi': '联系信息',
......@@ -29,9 +29,9 @@ export default {
'portalSystem.bianjimendian': '编辑门店',
'portalSystem.xinzengmendian': '新增门店',
'portalSystem.baocun': '保存',
'portalSystem.menhudaima': '门代码',
'portalSystem.menhudaima': '门代码',
'portalSystem.qingshuru': '请输入',
'portalSystem.qingshurumenhudaima': '请输入门代码',
'portalSystem.qingshurumenhudaima': '请输入门代码',
'portalSystem.qingshumendianmingcheng': '请输门店名称',
'portalSystem.qingxuanzeshengshiqu': '请选择省/市/区',
'portalSystem.qingtianxiexiangxidizhi': '请填写详细地址,路名、门牌号等',
......
......@@ -190,7 +190,7 @@ const PortalSystemAdded = (props) => {
</Form>
}
/>
<Prompt when={unsaved} message="{intl.formatMessage({id: 'dealAbility.ninhaiyouweibaocundenei'})}" />
<Prompt when={unsaved} message={intl.formatMessage({id: 'dealAbility.ninhaiyouweibaocundenei'})} />
</Context.Provider>
)
}
......
import React, { Fragment, useContext, useEffect, useMemo, useState } from 'react';
import CardLayout from '@/pages/transaction/components/card'
import { Button, Col, Radio, Row, Drawer, Empty } from 'antd';
import { Button, Col, Radio, Row, Drawer, Empty, Modal } from 'antd';
import style from './index.less';
import { DeleteOutlined, EditOutlined } from '@ant-design/icons';
import { DeleteOutlined, EditOutlined, ExclamationCircleOutlined } from '@ant-design/icons';
import { DELIVERY_SCHEMA } from './schema/delivery';
import { DISPATCH_SCHEMA } from './schema/dispatch';
import NiceForm from '@/components/NiceForm';
......@@ -110,6 +110,7 @@ const AddressLayout: React.FC<addressProps> = (props: addressProps) => {
}
const area = (areaSelect) => {
const [province, city, district, street] = areaSelect;
let newObj: addressInfo = {};
......@@ -139,10 +140,26 @@ const AddressLayout: React.FC<addressProps> = (props: addressProps) => {
onChange(params, type)
}
const handleColse = () => {
if (unsaved) {
Modal.confirm({
title: '提示',
icon: <ExclamationCircleOutlined />,
content: '您还有未保存的内容,是否确定要离开?',
onOk() {
setVisible(false);
setUnsaved(false)
},
});
} else {
setVisible(false)
}
}
const renderFooter = () => {
return (
<div style={{ textAlign: 'right' }}>
<Button style={{ marginRight: 8 }}>
<Button style={{ marginRight: 8 }} onClick={() => handleColse()}>
取消
</Button>
<Button type="primary" onClick={() => addressSchemaAction.submit()}>
......@@ -252,7 +269,7 @@ const AddressLayout: React.FC<addressProps> = (props: addressProps) => {
width={600}
destroyOnClose
closable
onClose={() => setVisible(false)}
onClose={() => handleColse()}
footer={renderFooter()}
>
<NiceForm
......
......@@ -4,6 +4,7 @@ import { Form, Row, Col, Input, FormInstance } from 'antd';
import CardLayout from '@/pages/transaction/components/card'
import UploadImage from '@/components/UploadImage';
import { Context } from '../add';
import { validatorByte } from '@/utils/regExp';
interface BasicProps {
/** form 实例 */
......@@ -18,7 +19,7 @@ const BasicLayout: React.FC<BasicProps> = (props: BasicProps) => {
const context = useContext(Context);
useEffect(() => {
if(context) {
if (context) {
setLogo(context.logo);
}
}, [context])
......@@ -30,11 +31,23 @@ const BasicLayout: React.FC<BasicProps> = (props: BasicProps) => {
>
<Row gutter={[48, 24]}>
<Col span={12}>
<Form.Item label={intl.formatMessage({ id: 'portalSystem.menhudaima', defaultMessage: '门户代码' })} name='code' rules={[{ required: true, message: intl.formatMessage({ id: 'portalSystem.qingshurumenhudaima', defaultMessage: '请输入门户代码' }) }]}>
<Input placeholder={intl.formatMessage({ id: 'portalSystem.qingshuru', defaultMessage: '请输入' })} maxLength={12} />
<Form.Item
label={intl.formatMessage({ id: 'portalSystem.menhudaima', defaultMessage: '门店代码' })}
name='code'
rules={[
{ required: true, message: intl.formatMessage({ id: 'portalSystem.qingshurumenhudaima', defaultMessage: '请输入门店代码' }) },
{ validator: (rule, value, callback) => validatorByte(rule, value, callback, 12) }
]}>
<Input placeholder={intl.formatMessage({ id: 'portalSystem.qingshuru', defaultMessage: '请输入' })} />
</Form.Item>
<Form.Item label={intl.formatMessage({ id: 'portalSystem.mendianmingcheng', defaultMessage: '门店名称' })} name='name' rules={[{ required: true, message: intl.formatMessage({ id: 'portalSystem.qingshumendianmingcheng', defaultMessage: '请输门店名称' }) }]}>
<Input placeholder={intl.formatMessage({ id: 'portalSystem.qingshuru', defaultMessage: '请输入' })} maxLength={20} />
<Form.Item
label={intl.formatMessage({ id: 'portalSystem.mendianmingcheng', defaultMessage: '门店名称' })}
name='name'
rules={[
{ required: true, message: intl.formatMessage({ id: 'portalSystem.qingshumendianmingcheng', defaultMessage: '请输门店名称' }) },
{ validator: (rule, value, callback) => validatorByte(rule, value, callback, 40) }
]}>
<Input placeholder={intl.formatMessage({ id: 'portalSystem.qingshuru', defaultMessage: '请输入' })} />
</Form.Item>
</Col>
<Col span={12}>
......
......@@ -25,7 +25,7 @@ export const DELIVERY_SCHEMA: ISchema = {
},
{
limitByte: true,
maxByte: 20
maxByte: 40
}
]
},
......
......@@ -26,7 +26,7 @@ export const DISPATCH_SCHEMA: ISchema = {
},
{
limitByte: true,
maxByte: 20
maxByte: 40
}
]
},
......
......@@ -4,32 +4,47 @@ import { getIntl, history } from 'umi';
import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview';
import moment from 'moment'
import { Row, Col, Button, Tag, Badge } from 'antd';
import { Row, Col, Button, Tag, Badge, Modal } from 'antd';
import { WAITALLOTORDERSCHEMA } from './schema';
import { EXTERNALSTATE_COLOR, INTERNALSTATE_COLOR } from '@/pages/transaction/components/stateColor';
import { getTransactionAuditProductQuotationList, getTransactionProductInquiryExternalStateEnum, getTransactionProductInquiryInteriorStateEnum, postTransactionProductQuotationtAuditAll } from '@/services/TransactionV2Api';
import { getTransactionProductInquiryExternalStateEnum, getTransactionProductInquiryInteriorStateEnum, getTransactionProductInquiryNotAssignedAssigned, getTransactionProductInquiryNotAssignedList, postTransactionProductInquiryNotAssignedAssignedBatch } from '@/services/TransactionV2Api';
const intl = getIntl();
const WaitAllotOrder = () => {
const ref = useRef<any>({});
const format = (text, fmt?: string) => {
return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</>
}
const [loading, setLoading] = useState<any>({});
const [rowkeys, setRowKeys] = useState<Array<number>>([]);
/** 批量审核 */
const fetchSubmitBatch = async () => {
const res = await postTransactionProductQuotationtAuditAll({ ids: rowkeys });
if (res.code === 1000) {
ref.current.reload();
setRowKeys([])
const fetchSubmitBatch = async (id?: string, index?: number) => {
let res = null;
if (id) {
setLoading({[index]: true})
res = await getTransactionProductInquiryNotAssignedAssigned({ inquiryId: id })
} else {
setLoading({load: true})
res = await postTransactionProductInquiryNotAssignedAssignedBatch({ idList: rowkeys });
}
if (res.code !== 1000) {
setLoading({})
return
}
setLoading({})
ref.current.reload();
Modal.success({
content: '询价单领取成功!',
});
setRowKeys([])
}
const columns: ColumnType<any>[] = [
{
title: intl.formatMessage({id: 'dealAbility.xunjiadanhao'}),
title: intl.formatMessage({ id: 'dealAbility.xunjiadanhao' }),
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/productInquiry/inquirySearch/preview?id=${record.id}`}>{text}</EyePreview>
url={`/memberCenter/tranactionAbility/inquiryOffer/waitAllotOrder/preview?id=${record.id}`}>{text}</EyePreview>
},
{
title: intl.formatMessage({ id: 'dealAbility.xunjiadanzhaiyao' }),
......@@ -42,40 +57,40 @@ const WaitAllotOrder = () => {
dataIndex: 'memberName',
},
{
title: intl.formatMessage({id: 'dealAbility.jiaofuriqi'}),
title: intl.formatMessage({ id: 'dealAbility.jiaofuriqi' }),
key: 'deliveryTime',
dataIndex: 'deliveryTime',
render: (text: any) => format(text)
},
{
title:intl.formatMessage({id: 'dealAbility.baojiajiezhishijian'}),
title: intl.formatMessage({ id: 'dealAbility.baojiajiezhishijian' }),
key: 'quotationAsTime',
dataIndex: 'quotationAsTime',
render: (text: any) => format(text)
},
{
title: intl.formatMessage({id: 'dealAbility.danjushijian'}),
title: intl.formatMessage({ id: 'dealAbility.danjushijian' }),
key: 'voucherTime',
dataIndex: 'voucherTime',
render: (text: any) => format(text)
},
{
title: intl.formatMessage({id: 'dealAbility.waibuzhuangtai'}),
title: intl.formatMessage({ id: 'dealAbility.waibuzhuangtai' }),
key: 'externalState',
dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={EXTERNALSTATE_COLOR[text]}>{record.externalStateName}</Tag>
},
{
title: intl.formatMessage({id: 'dealAbility.neibuzhuangtai'}),
title: intl.formatMessage({ id: 'dealAbility.neibuzhuangtai' }),
key: 'interiorState',
dataIndex: 'interiorState',
render: (text: any, record: any) => <Badge status={INTERNALSTATE_COLOR[text]} text={record.interiorStateName} />
},
{
title: intl.formatMessage({id: 'dealAbility.caozuo'}),
title: intl.formatMessage({ id: 'dealAbility.caozuo' }),
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button type='link'>领取</Button>
render: (text: any, record: any, index: number) => <Button type='link' loading={loading[index]} onClick={() => fetchSubmitBatch(record.id, index)}>领取</Button>
},
];
return (
......@@ -85,7 +100,7 @@ const WaitAllotOrder = () => {
schema={WAITALLOTORDERSCHEMA}
columns={columns}
effects="inquiryListNo"
fetch={getTransactionAuditProductQuotationList}
fetch={getTransactionProductInquiryNotAssignedList}
externalStatusFetch={getTransactionProductInquiryExternalStateEnum({ type: '2' })}
interiorStatusFetch={getTransactionProductInquiryInteriorStateEnum({ type: '2' })}
fetchRowkeys={(e) => setRowKeys(e)}
......@@ -93,8 +108,9 @@ const WaitAllotOrder = () => {
<Row>
<Col span={6}>
<Button
loading={loading?.load}
disabled={rowkeys.length === 0}
onClick={fetchSubmitBatch}
onClick={() => fetchSubmitBatch()}
>
批量领取
</Button>
......
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