Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
shenshaokai
jinfa-platform
Commits
df583036
Commit
df583036
authored
Apr 13, 2022
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 更换代客下单选择商品和商品详情的接口
parent
0347cbe3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
13 deletions
+16
-13
index.tsx
...nsaction/saleOrder/agentPurchaseOrder/commodity/index.tsx
+9
-7
index.tsx
...on/saleOrder/agentPurchaseOrder/commodityDetail/index.tsx
+4
-2
usePurchaseOrder.ts
...on/saleOrder/agentPurchaseOrder/hooks/usePurchaseOrder.ts
+3
-4
No files found.
src/pages/transaction/saleOrder/agentPurchaseOrder/commodity/index.tsx
View file @
df583036
/*
* @Author: GHua
* @Date: 2022-03-29 17:42:11
* @LastEditTime: 2022-04-1
1 10:56:04
* @LastEditors:
GHua
* @LastEditTime: 2022-04-1
3 17:35:11
* @LastEditors:
Please set LastEditors
* @Description: 代客下单(进货单下单)- 商品列表
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
...
...
@@ -24,10 +24,10 @@ import {
}
from
'@linkseeks/lingxi-mall-components'
import
FilterBar
from
'../components/FilterBar'
import
{
postSearchShopSelfGetCommodityList
,
postSearchShopSelfGetC
ustomerC
ommodityList
,
getSearchShopSelfGetCustomerAttributeByCategoryId
,
getSearchShopStoreGetCustomerAttributeByCategoryId
,
postSearchShopStoreGetCommodityList
,
postSearchShopStoreGetC
ustomerC
ommodityList
,
}
from
'@/services/SearchV2Api'
import
'@linkseeks/lingxi-mall-components/dist/index.esm.css'
import
useAgentInfo
from
'../hooks/useAgentInfo'
...
...
@@ -92,7 +92,9 @@ const AgentCommodity: React.FC = () => {
pageSize
:
size
?
size
:
pageSize
,
priceTypeList
:
[
1
],
provinceCode
:
DEFAULT_CITY
.
provinceCode
,
cityCode
:
DEFAULT_CITY
.
cityCode
cityCode
:
DEFAULT_CITY
.
cityCode
,
customerMemberId
:
agentPurchaseOrderInfo
?.
memberId
,
customerMemberRoleId
:
agentPurchaseOrderInfo
?.
roleId
,
}
if
(
location
.
query
?.
carriageType
)
{
...
...
@@ -112,11 +114,11 @@ const AgentCommodity: React.FC = () => {
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
mall
:
param
.
storeId
=
agentPurchaseOrderInfo
?.
storeId
postFn
=
postSearchShopStoreGetCommodityList
postFn
=
postSearchShopStoreGetC
ustomerC
ommodityList
break
;
case
LAYOUT_TYPE
.
own
:
param
.
memberId
=
userInfo
?.
memberId
postFn
=
postSearchShopSelfGetCommodityList
postFn
=
postSearchShopSelfGetC
ustomerC
ommodityList
break
;
default
:
break
;
...
...
src/pages/transaction/saleOrder/agentPurchaseOrder/commodityDetail/index.tsx
View file @
df583036
...
...
@@ -24,7 +24,7 @@ import isEmpty from 'lodash/isEmpty'
import
IconFont
from
'@/utils/iconfont'
import
cx
from
'classnames'
import
{
getSearchShopStoreGetCommodityDetail
,
getSearchShopStoreGetC
ustomerC
ommodityDetail
,
GetSearchShopStoreGetCommodityDetailResponse
,
PostSearchShopStoreGetCommodityListResponseDetail
,
}
from
"@/services/SearchV2Api"
;
...
...
@@ -291,13 +291,15 @@ const CommodityDetail: React.FC = (props: any) => {
const
fetchDetail
=
()
=>
{
const
params
:
any
=
{
commodityId
:
id
,
customerMemberId
:
agentPurchaseOrderInfo
?.
memberId
,
customerMemberRoleId
:
agentPurchaseOrderInfo
?.
roleId
,
}
let
headers
:
any
=
{
type
,
shopId
:
mallId
,
}
getSearchShopStoreGetCommodityDetail
(
params
,
{
headers
}).
then
(
async
(
res
)
=>
{
getSearchShopStoreGetC
ustomerC
ommodityDetail
(
params
,
{
headers
}).
then
(
async
(
res
)
=>
{
if
(
res
.
code
===
1000
)
{
const
data
=
res
.
data
setErrorInfo
(
null
)
...
...
src/pages/transaction/saleOrder/agentPurchaseOrder/hooks/usePurchaseOrder.ts
View file @
df583036
...
...
@@ -10,8 +10,8 @@ import { getMessage } from "../utils"
/*
* @Author: GHua
* @Date: 2022-04-02 10:05:25
* @LastEditTime: 2022-04-
07 16:29:29
* @LastEditors:
GHua
* @LastEditTime: 2022-04-
13 17:26:16
* @LastEditors:
Please set LastEditors
* @Description:
*/
interface
UsePurchaseOrderProps
{
...
...
@@ -42,7 +42,7 @@ interface UsePurchaseOrderReturn {
}
const
usePurchaseOrder
=
(
props
:
UsePurchaseOrderProps
):
UsePurchaseOrderReturn
=>
{
const
{
customerMemberId
,
customerMemberRoleId
,
customerMemberLevel
,
mallId
,
orderId
}
=
props
const
{
customerMemberId
,
customerMemberRoleId
,
mallId
,
orderId
}
=
props
const
[
purchaseCount
,
setPurchaseCount
]
=
useState
<
number
>
(
0
)
const
[
purchaseList
,
setPurchaseList
]
=
useState
<
any
[]
>
([])
...
...
@@ -111,7 +111,6 @@ const usePurchaseOrder = (props: UsePurchaseOrderProps): UsePurchaseOrderReturn
const
params
:
any
=
{
customerMemberId
,
customerMemberRoleId
,
customerMemberLevel
,
}
if
(
orderId
)
{
...
...
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