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
9b668ec5
Commit
9b668ec5
authored
Apr 30, 2025
by
武广
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-20250421-logistics' into 'master'
Feature 20250421 logistics See merge request
!120
parents
79379b6d
610dbe83
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
322 additions
and
1 deletion
+322
-1
config.js
config/config.js
+4
-0
changeLog.jsx
...eliveryOrder/components/LogisticsPhoneModal/changeLog.jsx
+50
-0
index.jsx
...ingDeliveryOrder/components/LogisticsPhoneModal/index.jsx
+79
-0
index.less
...ngDeliveryOrder/components/LogisticsPhoneModal/index.less
+35
-0
staticData.js
...eliveryOrder/components/LogisticsPhoneModal/staticData.js
+88
-0
index.jsx
src/pages/orderManage/pendingDeliveryOrder/index.jsx
+28
-1
service.js
src/pages/orderManage/pendingDeliveryOrder/service.js
+38
-0
No files found.
config/config.js
View file @
9b668ec5
...
...
@@ -53,6 +53,10 @@ export default {
dva
:
{
hmr
:
true
,
},
devServer
:
{
host
:
'
0.0.0.0
'
,
// 配置 IP,0.0.0.0 表示监听所有可用的网络接口
port
:
8001
,
// 配置端口号
},
hash
:
true
,
locale
:
{
default
:
'
zh-CN
'
,
//开启国际化配置,就必须要创建locales/zh-CN.ts 文件
...
...
src/pages/orderManage/pendingDeliveryOrder/components/LogisticsPhoneModal/changeLog.jsx
0 → 100644
View file @
9b668ec5
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=
{
840
}
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
0 → 100644
View file @
9b668ec5
import
React
,
{
useState
}
from
'
react
'
;
import
{
BetaSchemaForm
}
from
'
@ant-design/pro-components
'
;
import
{
notification
,
Button
}
from
'
antd
'
;
import
{
infoColumn
}
from
'
./staticData.js
'
;
import
{
layout
}
from
'
@/utils/bll
'
;
import
{
apiChangeReceiverMobile
}
from
'
../../service
'
;
import
ChangeLog
from
'
./changeLog.jsx
'
;
/**
* 更新收货人手机组件
*/
const
LogisticsPhone
=
props
=>
{
const
[
visibleLog
,
setVisibleLog
]
=
useState
(
false
);
const
refForm
=
React
.
useRef
();
const
{
record
}
=
props
;
const
closeModal
=
v
=>
{
refForm
?.
current
?.
resetFields
?.();
!
v
&&
props
.
onClose
(
false
);
};
const
submitForm
=
async
values
=>
{
const
res
=
await
apiChangeReceiverMobile
(
values
);
if
(
res
?.
success
)
{
notification
.
success
({
message
:
'
提交成功
'
,
});
props
.
onClose
(
true
);
}
};
const
getInfo
=
()
=>
new
Promise
(
resolve
=>
{
resolve
({
...
record
,
});
});
const
onShowLog
=
()
=>
{
setVisibleLog
(
true
);
};
return
(
props
.
visible
&&
(
<>
<
BetaSchemaForm
layoutType=
"ModalForm"
title=
"更新收货人手机"
open=
{
props
.
visible
}
width=
"600px"
modalProps=
{
{
maskClosable
:
true
,
destroyOnClose
:
true
,
}
}
request=
{
getInfo
}
formRef=
{
refForm
}
onOpenChange=
{
closeModal
}
layout=
"horizontal"
{
...
layout
}
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
)
}
/>
</>
)
);
};
export
default
LogisticsPhone
;
src/pages/orderManage/pendingDeliveryOrder/components/LogisticsPhoneModal/index.less
0 → 100644
View file @
9b668ec5
.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
0 → 100644
View file @
9b668ec5
import
React
from
'
react
'
;
export
const
infoColumn
=
[
{
title
:
'
订单号
'
,
dataIndex
:
'
orderNo
'
,
maxLength
:
50
,
fieldProps
:
{
disabled
:
true
,
},
},
{
title
:
'
收货人电话
'
,
dataIndex
:
'
receiverMobile
'
,
fieldProps
:
{
maxLength
:
11
,
},
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'
请填写收货人电话
'
},
{
pattern
:
/^1
[
3456789
]\d{9}
$/
,
message
:
'
请输入正确的手机号
'
,
},
],
extra
:
(
<
div
style
=
{{
color
:
'
#1890FF
'
}}
>
<
div
>
提示:
<
/div
>
<
div
>
1
、请谨慎修改,此功能仅在发货后,线下联系物流公司变更收货信息时填写,系统用于获取物流轨迹
<
/div
>
<
div
>
2
、格式为数字,请录入
11
位手机号
<
/div
>
<
/div
>
),
},
},
{
title
:
'
收货人姓名
'
,
dataIndex
:
'
receiverName
'
,
maxLength
:
100
,
fieldProps
:
{
disabled
:
true
,
},
},
{
title
:
'
收货地址
'
,
dataIndex
:
'
fullAddress
'
,
maxLength
:
50
,
fieldProps
:
{
disabled
:
true
,
},
},
];
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
:
240
,
render
:
(
text
,
record
)
=>
<
div
>
{
record
?.
operator
}
<
/div>
,
},
];
src/pages/orderManage/pendingDeliveryOrder/index.jsx
View file @
9b668ec5
...
...
@@ -15,10 +15,11 @@ import DelayDeliverGoods from './components/DelayDeliverGoods';
import
GoodsRemark
from
'
../components/GoodsRemark
'
;
import
MultiLogisticsModal
from
'
./components/MultiLogisticsModal
'
;
import
LogisticsPhoneModal
from
'
./components/LogisticsPhoneModal
'
;
import
{
queryToSend
,
queryExpress
,
getGoods
,
apiQueryReceiverDetail
,
downOrder
,
apiQueryOrderInfo
,
apiDeliveriesTraceList
,
...
...
@@ -37,10 +38,12 @@ const TableList = props => {
const
[
companys
,
setCompanys
]
=
useState
([]);
const
[
LogisticsModalVisible
,
handleModalVisible
]
=
useState
(
false
);
const
[
skuList
,
setSkuList
]
=
useState
([]);
const
[
itemRecord
,
setItemRecord
]
=
useState
({});
const
[
LogisticsData
,
setLogisticsData
]
=
useState
([{}]);
const
[
ShowUpdateBtn
]
=
useState
([
2
,
5
]);
const
[
LogisticsComList
,
setLogisticsComList
]
=
useState
({});
const
[
LogisticsComModalVisible
,
handleComModalVisible
]
=
useState
(
false
);
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
startTime
,
setStartTime
]
=
useState
(
moment
().
add
(
-
1
,
'
months
'
));
const
[
startTimeStr
,
setStartTimeStr
]
=
useState
(
moment
()
...
...
@@ -62,7 +65,12 @@ const TableList = props => {
// current && (current.diff(startTime, 'days') > 30 || current.diff(startTime, 'days') < 0);
const
multiLogisticsModalRef
=
useRef
();
const
actionRef
=
useRef
();
const
onClose
=
refresh
=>
{
setVisible
(
false
);
refresh
&&
actionRef
.
current
?.
reload
();
};
const
ref
=
useRef
(
FormInstance
);
const
handleCom
=
async
(
skuInfo
,
expressInfo
)
=>
{
const
tempObj
=
{
...
...
@@ -459,6 +467,24 @@ const TableList = props => {
{
props
.
type
===
2
?
'
更新物流信息
'
:
'
填写物流信息
'
}
</
Button
>
)
}
{
(
canEditable
&&
ShowUpdateBtn
.
includes
(
record
?.
skuSource
?.
value
))
||
props
.
type
!==
2
?
null
:
(
<
Button
type=
"primary"
style=
{
{
marginBottom
:
'
10px
'
,
}
}
onClick=
{
async
()
=>
{
const
res
=
await
apiQueryReceiverDetail
(
record
.
orderNo
);
if
(
res
.
data
)
{
setItemRecord
(
res
.
data
);
setVisible
(
true
);
}
}
}
>
更新收货人手机
</
Button
>
)
}
{
canEditable
&&
props
.
type
!==
2
&&
(
<
Button
type=
"primary"
...
...
@@ -609,6 +635,7 @@ const TableList = props => {
/>
<
MultiLogisticsModal
companys=
{
companys
}
ref=
{
multiLogisticsModalRef
}
/>
<
LogisticsPhoneModal
visible=
{
visible
}
record=
{
itemRecord
}
onClose=
{
onClose
}
/>
</
PageHeaderWrapper
>
);
};
...
...
src/pages/orderManage/pendingDeliveryOrder/service.js
View file @
9b668ec5
...
...
@@ -167,3 +167,41 @@ export function apiDeliveriesTraceList(data) {
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