Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
merchant-manage-ui
Commits
9eddec8d
Commit
9eddec8d
authored
Apr 22, 2025
by
guang.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加变更订单收货人手机号功能
parent
f12c8e56
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
212 additions
and
28 deletions
+212
-28
changeLog.jsx
...eliveryOrder/components/LogisticsPhoneModal/changeLog.jsx
+50
-0
index.jsx
...ingDeliveryOrder/components/LogisticsPhoneModal/index.jsx
+42
-23
index.less
...ngDeliveryOrder/components/LogisticsPhoneModal/index.less
+35
-0
staticData.js
...eliveryOrder/components/LogisticsPhoneModal/staticData.js
+40
-1
index.jsx
src/pages/orderManage/pendingDeliveryOrder/index.jsx
+7
-4
service.js
src/pages/orderManage/pendingDeliveryOrder/service.js
+38
-0
No files found.
src/pages/orderManage/pendingDeliveryOrder/components/LogisticsPhoneModal/changeLog.jsx
0 → 100644
View file @
9eddec8d
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
{
Modal
,
Table
,
Button
}
from
'
antd
'
;
import
{
logColumn
}
from
'
./staticData.js
'
;
import
{
apiQueryModifyReceiverMobileLog
}
from
'
../../service
'
;
/**
* 更新收货人手机历史记录
*/
const
ChangeLog
=
props
=>
{
const
refForm
=
React
.
useRef
();
const
{
orderNo
}
=
props
;
const
[
dataSource
,
setDataSource
]
=
useState
([]);
const
closeModal
=
v
=>
{
refForm
?.
current
?.
resetFields
?.();
!
v
&&
props
.
onClose
(
false
);
};
const
getDataSource
=
async
()
=>
{
const
res
=
await
apiQueryModifyReceiverMobileLog
(
orderNo
);
if
(
res
?.
success
)
{
setDataSource
(
res
?.
data
?.
records
||
[]);
}
};
useEffect
(()
=>
{
if
(
props
.
visible
)
{
getDataSource
();
}
},
[
props
.
visible
]);
return
(
props
.
visible
&&
(
<
Modal
open=
{
props
.
visible
}
width=
{
800
}
onCancel=
{
()
=>
closeModal
(
false
)
}
footer=
{
[
<
Button
key=
"close"
onClick=
{
()
=>
closeModal
(
false
)
}
>
关闭
</
Button
>,
]
}
>
<
Table
pagination=
{
false
}
columns=
{
logColumn
}
dataSource=
{
dataSource
}
/>
</
Modal
>
)
);
};
export
default
ChangeLog
;
src/pages/orderManage/pendingDeliveryOrder/components/LogisticsPhoneModal/index.jsx
View file @
9eddec8d
import
React
from
'
react
'
;
import
React
,
{
useState
}
from
'
react
'
;
import
{
BetaSchemaForm
}
from
'
@ant-design/pro-components
'
;
import
{
BetaSchemaForm
}
from
'
@ant-design/pro-components
'
;
import
{
notification
}
from
'
antd
'
;
import
{
notification
,
Button
}
from
'
antd
'
;
import
{
infoColumn
}
from
'
./staticData.js
'
;
import
{
infoColumn
}
from
'
./staticData.js
'
;
import
{
layout
}
from
'
@/utils/bll
'
;
import
{
layout
}
from
'
@/utils/bll
'
;
import
{
apiDeliveriesEdit
}
from
'
../../service
'
;
import
{
apiChangeReceiverMobile
}
from
'
../../service
'
;
import
ChangeLog
from
'
./changeLog.jsx
'
;
/**
/**
* 更新收货人手机组件
* 更新收货人手机组件
*/
*/
const
LogisticsPhone
=
props
=>
{
const
LogisticsPhone
=
props
=>
{
const
[
visibleLog
,
setVisibleLog
]
=
useState
(
false
);
const
refForm
=
React
.
useRef
();
const
refForm
=
React
.
useRef
();
const
{
record
}
=
props
;
const
{
record
}
=
props
;
const
closeModal
=
v
=>
{
const
closeModal
=
v
=>
{
...
@@ -16,9 +18,7 @@ const LogisticsPhone = props => {
...
@@ -16,9 +18,7 @@ const LogisticsPhone = props => {
!
v
&&
props
.
onClose
(
false
);
!
v
&&
props
.
onClose
(
false
);
};
};
const
submitForm
=
async
values
=>
{
const
submitForm
=
async
values
=>
{
const
params
=
values
;
const
res
=
await
apiChangeReceiverMobile
(
values
);
params
.
id
=
record
.
id
;
const
res
=
await
apiDeliveriesEdit
(
params
);
if
(
res
?.
success
)
{
if
(
res
?.
success
)
{
notification
.
success
({
notification
.
success
({
message
:
'
提交成功
'
,
message
:
'
提交成功
'
,
...
@@ -34,25 +34,44 @@ const LogisticsPhone = props => {
...
@@ -34,25 +34,44 @@ const LogisticsPhone = props => {
});
});
});
});
const
onShowLog
=
()
=>
{
setVisibleLog
(
true
);
};
return
(
return
(
props
.
visible
&&
(
props
.
visible
&&
(
<
BetaSchemaForm
<>
layoutType=
"ModalForm"
<
BetaSchemaForm
title=
"更新收货人手机"
layoutType=
"ModalForm"
open=
{
props
.
visible
}
title=
"更新收货人手机"
width=
"600px"
open=
{
props
.
visible
}
modalProps=
{
{
width=
"600px"
maskClosable
:
true
,
modalProps=
{
{
destroyOnClose
:
true
,
maskClosable
:
true
,
}
}
destroyOnClose
:
true
,
request=
{
getInfo
}
}
}
formRef=
{
refForm
}
request=
{
getInfo
}
onOpenChange=
{
closeModal
}
formRef=
{
refForm
}
layout=
"horizontal"
onOpenChange=
{
closeModal
}
{
...
layout
}
layout=
"horizontal"
onFinish=
{
submitForm
}
{
...
layout
}
columns=
{
infoColumn
}
onFinish=
{
submitForm
}
/>
columns=
{
infoColumn
}
submitter=
{
{
render
:
(
p
,
doms
)
=>
[
<
Button
htmlType=
"button"
onClick=
{
onShowLog
}
key=
"edit"
>
变更记录
</
Button
>,
...
doms
,
],
}
}
/>
<
ChangeLog
visible=
{
visibleLog
}
orderNo=
{
record
.
orderNo
}
onClose=
{
()
=>
setVisibleLog
(
false
)
}
/>
</>
)
)
);
);
};
};
...
...
src/pages/orderManage/pendingDeliveryOrder/components/LogisticsPhoneModal/index.less
0 → 100644
View file @
9eddec8d
.sku-list-module {
margin-bottom: 20px;
padding: 10px 20px;
border: 1px solid #f2f2f2;
&__index {
margin-bottom: 5px;
font-weight: 700;
font-size: 14px;
}
}
.sku-list-box {
padding-bottom: 10px;
.sku-list {
display: flex;
// padding-bottom: 19px;
&__goods-name {
flex: 1;
margin-bottom: 0 !important;
}
&__goods-count {
width: 100px;
margin-bottom: 5px !important;
}
}
}
.operation {
font-size: 24px;
text-align: center;
> * {
margin: 0 10px;
}
}
src/pages/orderManage/pendingDeliveryOrder/components/LogisticsPhoneModal/staticData.js
View file @
9eddec8d
...
@@ -11,7 +11,7 @@ export const infoColumn = [
...
@@ -11,7 +11,7 @@ export const infoColumn = [
},
},
{
{
title
:
'
收货人电话
'
,
title
:
'
收货人电话
'
,
dataIndex
:
'
receiver
Phon
e
'
,
dataIndex
:
'
receiver
Mobil
e
'
,
fieldProps
:
{
fieldProps
:
{
maxLength
:
11
,
maxLength
:
11
,
},
},
...
@@ -51,3 +51,42 @@ export const infoColumn = [
...
@@ -51,3 +51,42 @@ export const infoColumn = [
},
},
},
},
];
];
export
const
logColumn
=
[
{
title
:
'
序号
'
,
dataIndex
:
'
orderNo
'
,
key
:
'
orderNo
'
,
width
:
80
,
render
:
(
text
,
record
,
index
)
=>
<
div
>
{
index
+
1
}
<
/div>
,
},
{
title
:
'
变更时间
'
,
dataIndex
:
'
createdAt
'
,
key
:
'
createdAt
'
,
width
:
200
,
},
{
title
:
'
变更前
'
,
dataIndex
:
'
oldVal
'
,
key
:
'
oldVal
'
,
width
:
150
,
},
{
title
:
'
变更后
'
,
dataIndex
:
'
newVal
'
,
key
:
'
newVal
'
,
width
:
150
,
},
{
title
:
'
操作人
'
,
dataIndex
:
'
orderNo
'
,
key
:
'
orderNo
'
,
width
:
200
,
render
:
(
text
,
record
)
=>
(
<
div
>
{
record
?.
operator
}
{
record
?.
operateTypeDesc
}
<
/div
>
),
},
];
src/pages/orderManage/pendingDeliveryOrder/index.jsx
View file @
9eddec8d
...
@@ -19,7 +19,7 @@ import LogisticsPhoneModal from './components/LogisticsPhoneModal';
...
@@ -19,7 +19,7 @@ import LogisticsPhoneModal from './components/LogisticsPhoneModal';
import
{
import
{
queryToSend
,
queryToSend
,
queryExpress
,
queryExpress
,
getGoods
,
apiQueryReceiverDetail
,
downOrder
,
downOrder
,
apiQueryOrderInfo
,
apiQueryOrderInfo
,
apiDeliveriesTraceList
,
apiDeliveriesTraceList
,
...
@@ -473,9 +473,12 @@ const TableList = props => {
...
@@ -473,9 +473,12 @@ const TableList = props => {
style=
{
{
style=
{
{
marginBottom
:
'
10px
'
,
marginBottom
:
'
10px
'
,
}
}
}
}
onClick=
{
()
=>
{
onClick=
{
async
()
=>
{
setItemRecord
(
record
);
const
res
=
await
apiQueryReceiverDetail
(
record
.
orderNo
);
setVisible
(
true
);
if
(
res
.
data
)
{
setItemRecord
(
res
.
data
);
setVisible
(
true
);
}
}
}
}
}
>
>
更新收货人手机
更新收货人手机
...
...
src/pages/orderManage/pendingDeliveryOrder/service.js
View file @
9eddec8d
...
@@ -167,3 +167,41 @@ export function apiDeliveriesTraceList(data) {
...
@@ -167,3 +167,41 @@ export function apiDeliveriesTraceList(data) {
prefix
:
config
.
kdspApi
,
prefix
:
config
.
kdspApi
,
});
});
}
}
/**
* 查询订单收货信息
* @see http://yapi.quantgroups.com/project/389/interface/api/72539
*/
export
function
apiQueryReceiverDetail
(
orderNo
)
{
return
request
.
get
(
'
/api/merchants/orders/receiver/detail
'
,
{
params
:
{
orderNo
},
prefix
:
config
.
kdspApi
,
});
}
/**
* 获取商家修改收件人手机号操作日志
* @see http://yapi.quantgroups.com/project/389/interface/api/72544
*/
export
function
apiQueryModifyReceiverMobileLog
(
orderNo
)
{
const
transformedParam
=
{
pageNo
:
1
,
pageSize
:
100
,
orderNo
,
};
return
request
.
get
(
'
/api/merchants/orders/modify-receiver-mobile/page
'
,
{
prefix
:
config
.
kdspApi
,
params
:
transformedParam
,
});
}
/**
* 修改收件人手机号
* @see http://yapi.quantgroups.com/project/389/interface/api/72549
*/
export
function
apiChangeReceiverMobile
(
params
)
{
return
request
.
post
(
'
/api/merchants/orders/receiver-mobile/edit
'
,
{
prefix
:
config
.
kdspApi
,
data
:
params
,
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment