Commit e76ee40e authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents b4ed44b0 c4a467cf
......@@ -642,12 +642,13 @@ export const logisticsDeliverySearchSchema: ISchema = {
}
}
},
inventoryId: {
invoicesType: {
type: 'string',
"x-component": 'SearchSelect',
// fetchSearch: PublicApi.getWarehouseInvoicesTypeAll,
// "x-component": 'SearchSelect',
'x-component-props': {
placeholder: '单据类型',
fetchSearch: PublicApi.getWarehouseInvoicesTypeAll,
style: {
width: 160
}
......
......@@ -30,7 +30,7 @@ export interface ModalTableProps extends IStandardTableProps<any> {
export const logisticsDeliverySearchSchema: ISchema = {
type: 'object',
properties: {
invoicesNo: {
orderNo: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
......@@ -53,7 +53,7 @@ export const logisticsDeliverySearchSchema: ISchema = {
},
},
properties: {
orderNo: {
memberName: {
type: 'string',
"x-component-props": {
placeholder: '会员名称',
......@@ -62,7 +62,7 @@ export const logisticsDeliverySearchSchema: ISchema = {
}
}
},
invoicesAbstract: {
orderThe: {
type: 'string',
"x-component-props": {
placeholder: '单据摘要',
......@@ -71,7 +71,7 @@ export const logisticsDeliverySearchSchema: ISchema = {
}
}
},
"[startTransactionTime,endTransactionTime]": {
"[startCreateTime,endCreateTime]": {
type: 'string',
"x-component": "dateSelect",
"x-component-props": {
......@@ -283,7 +283,7 @@ const ModalTableOrder: React.FC<ModalTableProps> = (props) => {
useStateFilterSearchLinkageEffect(
$,
actions,
type === 1 ? 'invoicesNo' : 'applyNo',
type === 1 ? 'orderNo' : 'applyNo',
FORM_FILTER_PATH,
);
}
......
......@@ -24,6 +24,34 @@ export const SelectGoodsColumns: ColumnType<any>[] = [
}
]
export const AfterSalesSelectGoodsColumns: ColumnType<any>[] = [
{
title: '商品ID',
key: 'productId',
dataIndex: 'productId',
},
{
title: '商品名称',
key: 'productName',
dataIndex: 'productName',
},
{
title: '品类',
key: 'category',
dataIndex: 'category',
},
{
title: '订单编号',
key: 'orderNo',
dataIndex: 'orderNo',
},
{
title: '品牌',
key: 'brand',
dataIndex: 'brand',
}
]
export const ExternalListColumns: ColumnType<any>[] = [
{
title: '流转顺序号',
......
......@@ -8,7 +8,7 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { LinkOutlined, PlusOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
import ModalTable from '@/components/ModalTable';
import { SelectGoodsColumns, ExternalListColumns } from './components/columns';
import { SelectGoodsColumns, ExternalListColumns, AfterSalesSelectGoodsColumns } from './components/columns';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import moment from 'moment';
import ModalTableOrder from './components/ModalTableOrder';
......@@ -401,8 +401,6 @@ const AddLogistics: React.FC<{}> = () => {
}
})
break;
default:
break;
}
})
}
......@@ -474,6 +472,7 @@ const AddLogistics: React.FC<{}> = () => {
{
title: '单据时间',
dataIndex: 'applyTime',
render: (text: any) => <>{moment(text).format('YYYY-MM-DD HH:mm:ss')} </>
}
]
/** 选择发货单 列表数据 */
......@@ -489,20 +488,22 @@ const AddLogistics: React.FC<{}> = () => {
/**确定发货单 */
const handleShipping = () => {
const data = { ...query };
const selectRow = shippingRowCtl.selectRow[0]
data.shipmentOrderId = selectRow.id
data.shipmentOrderCode = selectRow.invoicesNo;//发货单号
data.receiverPhone = selectRow.phone;
data.receiverName = selectRow.receiverName;//收货方名称
data.receiverFullAddress = selectRow.fullAddress;
data.receiverMemberName = selectRow.memberName;
form.setFieldsValue({
shipmentOrderCode: selectRow.invoicesNo
})
setQuery({ ...data })
setId(selectRow.id)
setCreateType(1)
setshippingvisible(false);
if (shippingRowCtl.selectRow.length > 0) {
const selectRow = shippingRowCtl.selectRow[0]
data.shipmentOrderId = selectRow.id
data.shipmentOrderCode = selectRow.invoicesNo;//发货单号
data.receiverPhone = selectRow.phone;
data.receiverName = selectRow.receiverName;//收货方名称
data.receiverFullAddress = selectRow.fullAddress;
data.receiverMemberName = selectRow.memberName;
form.setFieldsValue({
shipmentOrderCode: selectRow.invoicesNo
})
setQuery({ ...data })
setId(selectRow.id)
setCreateType(1)
setshippingvisible(false);
}
}
/**确定对应订单号/售后单 */
......@@ -526,41 +527,44 @@ const AddLogistics: React.FC<{}> = () => {
/**确定选择对应订单号/售后单 */
const handleInvoices = (type: number) => {
const selectRow = invoicesRowCtl.selectRow[0]
const data = { ...query };
data.relevanceType = type;
setrelevanceType(type)
switch (type) {
case 1:
if (!data.shipmentOrderId) {
data.receiverPhone = selectRow.phone;
data.receiverName = selectRow.receiverName;//收货方名称
data.receiverAddressId = selectRow.receiverAddressId;
data.receiverFullAddress = selectRow.fullAddress;
data.receiverMemberName = selectRow.memberName;
if (invoicesRowCtl.selectRow.length > 0) {
const data = { ...query };
data.relevanceType = type;
setrelevanceType(type)
switch (type) {
case 1:
if (!data.shipmentOrderId) {
data.receiverPhone = selectRow.phone;
data.receiverName = selectRow.receiverName;//收货方名称
data.receiverAddressId = selectRow.receiverAddressId;
data.receiverFullAddress = selectRow.fullAddress;
data.receiverMemberName = selectRow.memberName;
}
data.relevanceOrderId = selectRow.id
}
data.relevanceOrderCode = selectRow.orderNo
form.setFieldsValue({
relevanceOrderCode: selectRow.orderNo
})
setQuery({ ...data });
setId(selectRow.id)
setCreateType(2)
break;
case 2:
conditions(selectRow)
setCreateType(4)
break;
case 3:
conditions(selectRow)
setCreateType(5)
break;
case 4:
conditions(selectRow)
setCreateType(6)
break;
data.relevanceOrderCode = selectRow.orderNo
form.setFieldsValue({
relevanceOrderCode: selectRow.orderNo
})
setQuery({ ...data });
setId(selectRow.id)
setCreateType(2)
break;
case 2:
conditions(selectRow)
setCreateType(4)
break;
case 3:
conditions(selectRow)
setCreateType(5)
break;
case 4:
conditions(selectRow)
setCreateType(6)
break;
}
setinvoicesvisible(false);
}
setinvoicesvisible(false);
}
const handleDelect = (idx: number) => {
......@@ -643,38 +647,43 @@ const AddLogistics: React.FC<{}> = () => {
/**跳转到售后/订单的详情 */
const jumpOrderDetail = (id: any) => {
switch (Number(createType)) {
case 1:
switch (Number(relevanceType)) {
case 1:
window.open(`/memberCenter/tranactionAbility/saleOrder/readyAddLogisticsOrder/preview?id=${id}`)
break;
case 2:
window.open(`/memberCenter/afterService/exchangeApplication/exchangePrAddLogistics/detail?id=${id}`)
break;
case 3:
window.open(`/memberCenter/afterService/exchangeManage/exchangePrAddLogistics/detail?id=${id}`)
break;
case 4:
window.open(`/memberCenter/afterService/returnApplication/returnPrAddLogistics/detail?id=${id}`)
break;
}
break;
case 2:
window.open(`/memberCenter/tranactionAbility/saleOrder/readyAddLogisticsOrder/preview?id=${id}`)
break;
case 3:
window.open(`/memberCenter/handling/confirm/pendingDelivered/detail?id=${id}`)
break;
case 4:
window.open(`/memberCenter/afterService/exchangeApplication/exchangePrAddLogistics/detail?id=${id}`)
break;
case 5:
window.open(`/memberCenter/afterService/exchangeManage/exchangePrAddLogistics/detail?id=${id}`)
break;
case 6:
window.open(`/memberCenter/afterService/returnApplication/returnPrAddLogistics/detail?id=${id}`)
break;
console.log(id, 1086)
if (id) {
switch (Number(createType)) {
case 1:
switch (Number(relevanceType)) {
case 1:
window.open(`/memberCenter/tranactionAbility/saleOrder/readyAddLogisticsOrder/preview?id=${id}`)
break;
case 2:
window.open(`/memberCenter/afterService/exchangeApplication/exchangePrAddLogistics/detail?id=${id}`)
break;
case 3:
window.open(`/memberCenter/afterService/exchangeManage/exchangePrAddLogistics/detail?id=${id}`)
break;
case 4:
window.open(`/memberCenter/afterService/returnApplication/returnPrAddLogistics/detail?id=${id}`)
break;
}
break;
case 2:
window.open(`/memberCenter/tranactionAbility/saleOrder/readyAddLogisticsOrder/preview?id=${id}`)
break;
case 3:
window.open(`/memberCenter/handling/confirm/pendingDelivered/detail?id=${id}`)
break;
case 4:
window.open(`/memberCenter/afterService/exchangeApplication/exchangePrAddLogistics/detail?id=${id}`)
break;
case 5:
window.open(`/memberCenter/afterService/exchangeManage/exchangePrAddLogistics/detail?id=${id}`)
break;
case 6:
window.open(`/memberCenter/afterService/returnApplication/returnPrAddLogistics/detail?id=${id}`)
break;
}
} else {
message.error('此订单id不存在!')
}
}
......@@ -705,7 +714,8 @@ const AddLogistics: React.FC<{}> = () => {
}
</Select>
</Form.Item>
<Form.Item label="物流单号" name='receiverName1'><span>{query.logisticsOrderNo}</span></Form.Item>
{query.logisticsOrderNo && <Form.Item label="物流单号" name='receiverName1'><span>{query.logisticsOrderNo}</span></Form.Item>}
<Form.Item label='对应发货单号' name='shipmentOrderCode'>
<Search disabled={!!history.location.query.createType} readOnly value={Object.keys(query).length > 0 ? query.shipmentOrderCode : undefined} enterButton={<><LinkOutlined /> 选择</>} onSearch={() => setshippingvisible(true)} />
{query.shipmentOrderCode && <Button type='link'
......@@ -730,13 +740,15 @@ 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>
<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>
{createType !== 1 &&
<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>
{/** 物流单明细 */}
......@@ -754,9 +766,11 @@ const AddLogistics: React.FC<{}> = () => {
{/** 运费 */}
<TabPane key='tab-3' tab='运费' forceRender>
<Form {...layout}>
<Form.Item label='运费'>
<span>{query.freightPrice}</span>
</Form.Item>
{query.freightPrice &&
<Form.Item label='运费'>
<span>{query.freightPrice}</span>
</Form.Item>
}
<Form.Item label='结算方式'>
<span>{query.settlementWay}</span>
</Form.Item>
......@@ -803,7 +817,7 @@ const AddLogistics: React.FC<{}> = () => {
<ModalTable
modalTitle='选择商品'
visible={visible}
columns={SelectGoodsColumns}
columns={(createType !== 4 && createType !== 5 && createType !== 6) ? SelectGoodsColumns : AfterSalesSelectGoodsColumns}
forceRender={true}
fetchTableData={(params) => fetchData(params)}
cancel={() => setvisible(false)}
......
......@@ -68,7 +68,7 @@ const PayWayTable: React.FC<payWayTableParams> = (props) => {
} else {
onEdit(value, idType, modifyIndex)
}
setedit({});
setmodalvisible(false);
}
......@@ -109,7 +109,7 @@ const PayWayTable: React.FC<payWayTableParams> = (props) => {
modalvisible={modalvisible}
edit={edit}
onOK={(value) => handleOk(value, type)}
onCancel={() => setmodalvisible(false)}
onCancel={() => { setmodalvisible(false); setedit({}); }}
/>
</>
)
......
......@@ -71,10 +71,10 @@ const SetUpModal: React.FC<setUpModalParams> = (props) => {
return (
<Modal
width={576}
title='新增参数配置'
title={`${Object.keys(edit).length > 0 ? `编辑` : '新增'}参数配置`}
visible={modalvisible}
onOk={handleOk}
onCancel={() => onCancel()}
onCancel={() => { onCancel(); form.resetFields(); }}
>
<Form
form={form}
......
......@@ -425,7 +425,7 @@ const Details: React.FC<parmas> = (props) => {
progressDot
current={data.externalState - 1}
>
{Object.keys(data).length > 0 && data.externalInquiryListStateResponses.map((item, index) => {
{(Object.keys(data).length > 0 && data.externalInquiryListStateResponses) && data.externalInquiryListStateResponses.map((item, index) => {
return (
<Step
key={index}
......@@ -443,7 +443,7 @@ const Details: React.FC<parmas> = (props) => {
progressDot
current={Number(data.interiorState - 1)}
>
{Object.keys(data).length > 0 && data.interiorRequisitionFormStateResponses.map((item, index) => {
{(Object.keys(data).length > 0 && data.interiorRequisitionFormStateResponses ) && data.interiorRequisitionFormStateResponses.map((item, index) => {
return (
<Step
key={index}
......
......@@ -39,6 +39,10 @@ const AddQuotes: React.FC<parmas> = (props) => {
memberRoleId: res.data.memberRoleId,
memberRoleName: res.data.memberRoleName
})
setaddress({
fullAddress: res.data.fullAddress,
fullAddressId: res.data.fullAddressId
})
}
})
}
......
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