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

fix:处理发货单号无法跳转

parent cf6eff75
This diff is collapsed.
......@@ -87,7 +87,7 @@ export const PayInfoCell:React.FC<PayInfoCellProps> = ({
}
case 'select': {
const { options, ...rest } = formItemProps
console.log(originOptions)
// 支付方式
if (dataIndex === 'payWay') {
return <Select ref={formItemRef}
......@@ -97,7 +97,7 @@ export const PayInfoCell:React.FC<PayInfoCellProps> = ({
setChildOptions(result.payList.map(v => ({label: v.way, value: v.id})))
form.setFieldsValue({channel: ''})
save(e)
}}
}}
{...rest}
id={formId}
/>
......@@ -106,21 +106,22 @@ export const PayInfoCell:React.FC<PayInfoCellProps> = ({
// 需联动的内容
if (dataIndex === 'channel') {
return <Select
ref={formItemRef}
onChange={save}
ref={formItemRef}
onChange={save}
options={childOptions}
{...rest}
id={formId}
/>
}
}
}
console.log(type, originOptions, childOptions)
}
let childNode = children;
if (editable) {
childNode = (forceEdit) ? (
<Form.Item
......@@ -146,4 +147,4 @@ export const PayInfoCell:React.FC<PayInfoCellProps> = ({
PayInfoCell.defaultProps = {}
export default PayInfoCell
\ No newline at end of file
export default PayInfoCell
......@@ -63,7 +63,6 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
}, [sum, freePrice])
useEffect(() => {
// 存在商品 并且有选择收货地址,则开始计算运费
console.log(data,'ddd')
if (data && data.length > 0 && receiverAddressId) {
// 筛选配送方式为物流的商品并且使用了运费模板
const logsiticsDataMaps = data.filter(v => v.logistics && v.logistics.useTemplate && v.logistics.deliveryType === 1)
......@@ -206,6 +205,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
// theInvoiceInfo: value.theInvoiceInfo
}
// 校验是否选择支付渠道
console.log(params, 'params')
let judgementByPay = params.paymentInformationResponses.map(item => {
if(item.channel && item.payWay){
return true
......
......@@ -69,7 +69,6 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
// }, [])
useEffect(() => {
console.log(memberId, 'memberId')
// 当选择报价单/会员/商品时有memberId传入时 调用支付方式api
if(memberId) {
getPayLists(memberId)
......@@ -100,16 +99,14 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
...item,
...row,
});
console.log(newData)
console.log(productSumPrice)
ctx.setFieldValue('paymentInformationResponses', newData)
ctx.setFieldValue('paymentInfor+mationResponses', newData)
resolve({item, newData})
})
};
return [
columns,
components,
handleSave
]
}
\ No newline at end of file
}
......@@ -62,4 +62,4 @@ const SecondApprovedOrderDetail: React.FC = () => {
);
};
export default SecondApprovedOrderDetail;
\ No newline at end of file
export default SecondApprovedOrderDetail;
......@@ -69,7 +69,7 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'invoiceNumber',
key: 'invoiceNumber',
render: (text, record) => <Link to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.invoiceId}&preview=1`}>{text}</Link>
render: (text, record) => <Link to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.orderDeliveryDetailsId}&preview=1`}>{text}</Link>
},
// { title: '当前支付', align: 'center', dataIndex: 'currentPayments', render: (text, record) => text},
{
......
......@@ -22,10 +22,11 @@ const FirstApprovedOrderDetail: React.FC = () => {
// 提交表单
const handleSubmit = useCallback(() => {
approvedRef.current.actions.submit().then(async () => {
approvedRef.current.actions.submit().then(async (v) => {
const params = {
id: Number(id),
state: 1
state: v.values.state,
cause: v.values.cause,
}
const result = await run(params)
......@@ -62,4 +63,4 @@ const FirstApprovedOrderDetail: React.FC = () => {
);
};
export default FirstApprovedOrderDetail;
\ No newline at end of file
export default FirstApprovedOrderDetail;
......@@ -54,7 +54,13 @@ export const useSelfTable = () => {
},
{ title: '发货批次', align: 'center', dataIndex: 'shipmentBatch', key: 'shipmentBatch', render: text => text ? `第${text}次` : '' },
// @todo 发货单号跳转
{ title: '发货单号', align: 'center', dataIndex: 'invoiceNumber', key: 'invoiceNumber', render: text => <Link to={'/'}>{text}</Link> },
{
title: '发货单号',
align: 'center',
dataIndex: 'invoiceNumber',
key: 'invoiceNumber',
render: (text, record) => <Link to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.orderDeliveryDetailsId}&preview=1`}>{text}</Link>
},
// { title: '当前支付', align: 'center', dataIndex: 'currentPayments', render: (text, record) => text},
{
title: '订单类型',
......@@ -83,10 +89,10 @@ export const useSelfTable = () => {
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <>
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.ADD_LOGISTICS_ORDER &&
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.ADD_LOGISTICS_ORDER &&
<Button type='link' onClick={() => handleConfirm(record)}>新增物流单</Button>
}
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.DELIVERY_APPROVED_SUCCESS &&
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.DELIVERY_APPROVED_SUCCESS &&
<Button type='link' onClick={() => handlePreview(record)}>查看物流单</Button>
}
</>
......
......@@ -64,7 +64,13 @@ export const useSelfTable = () => {
},
{ title: '发货批次', align: 'center', dataIndex: 'shipmentBatch', key: 'shipmentBatch', render: text => text ? `第${text}次` : '' },
// @todo 发货单号跳转
{ title: '发货单号', align: 'center', dataIndex: 'invoiceNumber', key: 'invoiceNumber', render: text => <Link to={'/'}>{text}</Link> },
{
title: '发货单号',
align: 'center',
dataIndex: 'invoiceNumber',
key: 'invoiceNumber',
render: (text, record) => <Link to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.orderDeliveryDetailsId}&preview=1`}>{text}</Link>
},
{
title: '订单类型',
align: 'center',
......
......@@ -64,7 +64,13 @@ export const useSelfTable = () => {
},
{ title: '发货批次', align: 'center', dataIndex: 'shipmentBatch', key: 'shipmentBatch', render: text => text ? `第${text}次` : '' },
// @todo 发货单号跳转
{ title: '发货单号', align: 'center', dataIndex: 'invoiceNumber', key: 'invoiceNumber', render: text => <Link to={'/'}>{text}</Link> },
{
title: '发货单号',
align: 'center',
dataIndex: 'invoiceNumber',
key: 'invoiceNumber',
render: (text, record) => <Link to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.orderDeliveryDetailsId}&preview=1`}>{text}</Link>
},
{
title: '订单类型',
align: 'center',
......@@ -93,7 +99,7 @@ export const useSelfTable = () => {
key: 'ctl',
render: (text, record) => <>
{/* 支付结果确认到账= 待审核状态 */}
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.CONFIRM_RECEIPT &&
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.CONFIRM_RECEIPT &&
<Button type='link' onClick={() => handleConfirm(record)}>确认回单</Button>
}
</>
......
......@@ -22,10 +22,11 @@ const SecondApprovedOrderDetail: React.FC = () => {
// 提交表单
const handleSubmit = useCallback(() => {
approvedRef.current.actions.submit().then(async () => {
approvedRef.current.actions.submit().then(async (v) => {
const params = {
id: Number(id),
state: approvedRef.current.actions.getFieldValue('state')
state: v.values.state,
cause: v.values.cause,
}
const result = await run(params)
......@@ -62,4 +63,4 @@ const SecondApprovedOrderDetail: React.FC = () => {
);
};
export default SecondApprovedOrderDetail;
\ No newline at end of file
export default SecondApprovedOrderDetail;
......@@ -38,8 +38,8 @@ const Unevaluated: React.FC = () => {
{
title: '订单摘要',
dataIndex: 'orderThe',
align: 'center',
ellipsis: true,
align: 'center',
ellipsis: true,
},
{
title: '采购会员',
......@@ -61,7 +61,7 @@ const Unevaluated: React.FC = () => {
{
title: '订单类型',
dataIndex: 'type',
align: 'center',
align: 'center',
render: text => ORDER_TYPE2[text],
},
{
......@@ -144,4 +144,4 @@ const Unevaluated: React.FC = () => {
);
};
export default Unevaluated;
\ No newline at end of file
export default Unevaluated;
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