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
69622668
Commit
69622668
authored
Oct 18, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理副单位选择异常
parent
d3577472
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
89 additions
and
65 deletions
+89
-65
priceAttributeForm.tsx
...commodity/products/addProductsItem/priceAttributeForm.tsx
+2
-2
index.tsx
src/pages/systemSetting/parameterSetting/index.tsx
+55
-57
index.tsx
src/pages/transaction/purchaseOrder/index.tsx
+30
-3
index.ts
src/pages/transaction/saleOrder/agentOrder/apis/index.ts
+1
-1
index.tsx
src/pages/transaction/saleOrder/agentOrder/index.tsx
+1
-2
No files found.
src/pages/commodity/products/addProductsItem/priceAttributeForm.tsx
View file @
69622668
...
...
@@ -733,9 +733,9 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
value=
{
assistUnitValue
}
defaultActiveFirstOption=
{
false
}
filterOption=
{
false
}
onSearch=
{
handleUnitSearch
}
onSearch=
{
handle
Assist
UnitSearch
}
onChange=
{
(
value
,
option
)
=>
handleAssistUnitChange
(
value
,
option
)
}
onFocus=
{
()
=>
handleUnitSearch
(
null
)
}
onFocus=
{
()
=>
handle
Assist
UnitSearch
(
null
)
}
notFoundContent=
{
null
}
style=
{
{
width
:
'100%'
}
}
>
...
...
src/pages/systemSetting/parameterSetting/index.tsx
View file @
69622668
...
...
@@ -44,44 +44,45 @@ const ParameterSetting: React.FC<{}> = () => {
},
[])
useEffect
(()
=>
{
// if(autoReceiveVisible) {
// // 重组 配置配送时段数据
// PublicApi.getOrderParamGetDeliveryTime().then(res => {
// const { data } = res
// setShopLists(() => [...shopLists].map(item => {
// const filterData = data.filter(_item => _item.shopId === item.shopId)
// if(filterData.length) {
// return {
// ...item,
// ...filterData[0]
// }
// } else {
// return {...item}
// }
// }))
// })
// } else {
// 重组 自动确认数据和商城列表数据
PublicApi
.
getOrderParamGetReceiverDay
().
then
(
res
=>
{
const
{
data
}
=
res
setShopLists
(()
=>
[...
shopLists
].
map
(
item
=>
{
const
filterData
=
data
.
filter
(
_item
=>
_item
.
shopId
===
item
.
shopId
)
if
(
filterData
.
length
)
{
return
{
...
item
,
...
filterData
[
0
]
}
}
else
{
return
{...
item
}
let
fn
=
null
;
if
(
autoReceiveVisible
)
{
// 自动确认收货
fn
=
PublicApi
.
getOrderParamGetReceiverDay
}
else
if
(
forcastTimeVisible
)
{
// 预约时长
fn
=
PublicApi
.
getOrderParamGetAppointmentDay
}
else
if
(
expressTimeVisible
)
{
fn
=
PublicApi
.
getOrderParamGetDeliveryTime
}
fn
&&
fn
().
then
(
res
=>
{
const
{
data
}
=
res
setShopLists
(()
=>
[...
shopLists
].
map
(
item
=>
{
const
filterData
=
data
.
filter
(
_item
=>
_item
.
shopId
===
item
.
shopId
)
if
(
filterData
.
length
)
{
return
{
...
item
,
...
filterData
[
0
],
paramList
:
expressTimeVisible
?
filterData
[
0
][
'paramList'
].
map
(
param
=>
{
return
{
timeRange
:
[
moment
(
param
.
startTime
,
'HH:mm:ss'
),
moment
(
param
.
endTime
,
'HH:mm:ss'
)]
}
})
:
[]
}
}
else
{
return
{
...
item
,
days
:
null
,
status
:
0
}
}
}))
})
},
[
autoReceiveVisible
,
forcastTimeVisible
,
expressTimeVisible
])
}))
})
// }
},
[
autoReceiveVisible
,
forcastTimeVisible
])
useEffect
(()
=>
{
console
.
log
(
shopLists
)
},
[
shopLists
])
const
handleVisibleModalType
=
(
id
)
=>
{
if
(
id
===
1
)
{
...
...
@@ -137,6 +138,7 @@ const ParameterSetting: React.FC<{}> = () => {
}
const
onValuesChange
=
(
changeValue
,
values
,
index
)
=>
{
console
.
log
(
changeValue
,
values
,
index
)
setShopLists
(()
=>
[...
shopLists
].
map
(
item
=>
{
if
(
item
.
id
===
index
)
{
return
{
...
...
@@ -160,29 +162,25 @@ const ParameterSetting: React.FC<{}> = () => {
const
handleSubmit
=
async
(
type
?)
=>
{
console
.
log
(
shopLists
,
'shopLists'
)
let
codeNumber
=
null
setConfirmLoading
(
true
)
if
(
type
===
'autoReceive'
)
{
const
{
code
}
=
await
PublicApi
.
postOrderParamUpdateReceiverDay
([...
shopLists
])
if
(
code
===
1000
)
{
setAutoReceiveVisible
(
false
)
setForcastTimeVisible
(
false
)
setExpressTimeVisible
(
false
)
}
codeNumber
=
code
}
else
if
(
type
===
'forcastTime'
)
{
const
{
code
}
=
await
PublicApi
.
postOrderParamUpdateAppointmentDay
([...
shopLists
])
if
(
code
===
1000
)
{
setAutoReceiveVisible
(
false
)
setForcastTimeVisible
(
false
)
setExpressTimeVisible
(
false
)
}
codeNumber
=
code
}
else
if
(
type
===
'timeLine'
)
{
// const { code } = await PublicApi.postOrderParamUpdateDeliveryTime({ shopLists : [...shopLists] })
// if(code === 1000) {
// setAutoReceiveVisible(false)
// setForcastTimeVisible(false)
// setExpressTimeVisible(false)
// }
console
.
log
(
shopLists
,
'shop'
)
const
{
code
}
=
await
PublicApi
.
postOrderParamUpdateDeliveryTime
([...
shopLists
])
codeNumber
=
code
}
setConfirmLoading
(
false
)
if
(
codeNumber
===
1000
)
{
setAutoReceiveVisible
(
false
)
setForcastTimeVisible
(
false
)
setExpressTimeVisible
(
false
)
}
setConfirmLoading
(
false
)
}
const
onChange
=
()
=>
{}
...
...
@@ -272,7 +270,7 @@ const ParameterSetting: React.FC<{}> = () => {
shopLists
.
map
(
item
=>
(<
Card
style=
{
{
marginBottom
:
16
}
}
key=
{
item
.
id
}
>
<
div
className=
{
cx
(
styles
.
cardMain
,
styles
.
cardBodyMain
)
}
>
<
p
><
img
src=
{
item
.
logoUrl
}
alt=
{
item
.
name
}
/><
span
>
{
item
.
name
}
</
span
></
p
>
<
Switch
defaultChecked=
{
!!
item
.
status
}
onChange=
{
(
v
)
=>
onChangeReceiveStatus
(
v
,
item
.
id
)
}
/>
<
Switch
defaultChecked=
{
!!
item
.
status
}
checked=
{
!!
item
.
status
}
onChange=
{
(
v
)
=>
onChangeReceiveStatus
(
v
,
item
.
id
)
}
/>
</
div
>
{
!!
item
.
status
?
<
p
className=
{
styles
.
receiveDay
}
><
span
>
收货天数:
</
span
><
InputNumber
onChange=
{
(
v
)
=>
onChangeReceiveDays
(
v
,
item
.
id
)
}
value=
{
item
.
days
}
/></
p
>
:
null
}
</
Card
>))
...
...
@@ -303,7 +301,7 @@ const ParameterSetting: React.FC<{}> = () => {
shopLists
.
map
(
item
=>
(<
Card
style=
{
{
marginBottom
:
16
}
}
key=
{
item
.
id
}
>
<
div
className=
{
cx
(
styles
.
cardMain
,
styles
.
cardBodyMain
)
}
>
<
p
><
img
src=
{
item
.
logoUrl
}
alt=
{
item
.
name
}
/><
span
>
{
item
.
name
}
</
span
></
p
>
<
Switch
defaultChecked=
{
!!
item
.
status
}
onChange=
{
(
v
)
=>
onChangeReceiveStatus
(
v
,
item
.
id
)
}
/>
<
Switch
defaultChecked=
{
!!
item
.
status
}
checked=
{
!!
item
.
status
}
onChange=
{
(
v
)
=>
onChangeReceiveStatus
(
v
,
item
.
id
)
}
/>
</
div
>
{
!!
item
.
status
?
<
p
className=
{
styles
.
receiveDay
}
><
span
>
预约时长(天):
</
span
><
InputNumber
onChange=
{
(
v
)
=>
onChangeReceiveDays
(
v
,
item
.
id
)
}
value=
{
item
.
days
}
/></
p
>
:
null
}
</
Card
>))
...
...
@@ -334,12 +332,12 @@ const ParameterSetting: React.FC<{}> = () => {
shopLists
.
map
(
item
=>
(<
Card
style=
{
{
marginBottom
:
16
}
}
key=
{
item
.
id
}
>
<
div
className=
{
cx
(
styles
.
cardMain
,
styles
.
cardBodyMain
)
}
>
<
p
><
img
src=
{
item
.
logoUrl
}
alt=
{
item
.
name
}
/><
span
>
{
item
.
name
}
</
span
></
p
>
<
Switch
defaultChecked=
{
!!
item
.
status
}
onChange=
{
(
v
)
=>
onChangeReceiveStatus
(
v
,
item
.
id
)
}
/>
<
Switch
defaultChecked=
{
!!
item
.
status
}
checked=
{
!!
item
.
status
}
onChange=
{
(
v
)
=>
onChangeReceiveStatus
(
v
,
item
.
id
)
}
/>
</
div
>
{
!!
item
.
status
?
<
div
className=
{
styles
.
deadLine
}
>
<
Form
name=
"express_time_line_form"
autoComplete=
"off"
onValuesChange=
{
(
c
,
v
)
=>
onValuesChange
(
c
,
v
,
item
.
id
)
}
>
<
Form
name=
"express_time_line_form"
autoComplete=
"off"
onValuesChange=
{
(
c
,
v
)
=>
onValuesChange
(
c
,
v
,
item
.
id
)
}
initialValues=
{
{
deadLine
:
item
.
paramList
}
}
>
<
Form
.
List
name=
"deadLine"
>
{
(
fields
,
{
add
,
remove
})
=>
(
<>
...
...
src/pages/transaction/purchaseOrder/index.tsx
View file @
69622668
import
React
,
{
useState
,
useRef
,
useCallback
}
from
'react'
import
{
Card
,
Button
,
Modal
,
Row
,
Col
,
message
,
Dropdown
,
Menu
}
from
'antd'
import
{
Card
,
Button
,
Modal
,
Row
,
Col
,
message
}
from
'antd'
import
{
StandardTable
}
from
'god'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PublicApi
}
from
'@/services/api'
...
...
@@ -18,6 +18,7 @@ import ModalForm from '@/components/ModalForm'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
TableOperation
from
'@/components/TableOperation'
import
{
ORDER_TYPE_POINTS
}
from
'@/constants/order'
import
axios
from
'axios'
const
SelectStyles
=
styled
((
props
)
=>
<
div
className=
'select-list'
{
...
props
}
></
div
>)
`
.select_style_border {
...
...
@@ -80,6 +81,12 @@ const PurchaseOrder: React.FC<PurchaseOrderProps> = (props) => {
{
id
:
2
,
name
:
"退货"
},
{
id
:
3
,
name
:
"维修"
},
])
const
[
fetchParams
,
setFetchParams
]
=
useState
<
any
>
()
const
loadingTableData
=
(
params
)
=>
{
setFetchParams
(
params
)
return
fetchTableData
(
params
)
}
// 售后唤起弹窗
const
handleSaleAfter
=
({
orderId
,
orderType
})
=>
{
...
...
@@ -178,12 +185,32 @@ const PurchaseOrder: React.FC<PurchaseOrderProps> = (props) => {
}
}
const
controllerBtns
=
<
Button
style=
{
{
width
:
140
}
}
onClick=
{
()
=>
{}
}
type=
'default'
>
导出
</
Button
>
const
handleExport
=
async
()
=>
{
const
downloadLink
=
document
.
createElement
(
'a'
)
// const data = await PublicApi.getOrderBuyerExport({...fetchParams}, {extendsOptions: { responseType: "blob" }})
const
data
=
await
axios
.
get
(
'/order/buyer/export'
,
{
params
:
{...
fetchParams
},
headers
:
{
"Content-Type"
:
"application/vnd.ms-excel;charset=UTF-8"
},
responseType
:
'blob'
})
// @ts-ignore
let
blob
=
new
Blob
([
data
],
{
type
:
'application/vnd.ms-excel'
})
downloadLink
.
style
.
display
=
'none'
;
downloadLink
.
href
=
URL
.
createObjectURL
(
blob
);
downloadLink
.
download
=
'采购订单列表.xls'
document
.
body
.
appendChild
(
downloadLink
)
downloadLink
.
click
()
document
.
body
.
removeChild
(
downloadLink
)
}
const
controllerBtns
=
<
Button
style=
{
{
width
:
140
}
}
onClick=
{
handleExport
}
type=
'default'
>
导出
</
Button
>
return
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
fetchTableData=
{
params
=>
fetch
TableData
(
params
)
}
fetchTableData=
{
params
=>
loading
TableData
(
params
)
}
columns=
{
secondColumns
()
}
currentRef=
{
ref
}
controlRender=
{
...
...
src/pages/transaction/saleOrder/agentOrder/apis/index.ts
View file @
69622668
...
...
@@ -49,7 +49,7 @@ export const fetchOrderApi = {
/** 查看状态正常的会员服务消费者列表 */
async
getMemberConsumeLists
(
params
)
{
const
{
data
}
=
await
PublicApi
.
getMemberManage
LowerConsumerMemberPage
(
params
)
const
{
data
}
=
await
PublicApi
.
getMemberManage
OrderAgentMembers
(
params
)
return
data
},
...
...
src/pages/transaction/saleOrder/agentOrder/index.tsx
View file @
69622668
...
...
@@ -358,8 +358,7 @@ const AgentOrderDetail:React.FC<AgentOrderDetailProps> = (props) => {
const
handleMemberSearch
=
(
value
)
=>
{
if
(
value
)
{
fetchOrderApi
.
getMemberConsumeLists
({
name
:
value
}).
then
(
res
=>
{
const
{
data
}
=
res
fetchOrderApi
.
getMemberConsumeLists
({
name
:
value
}).
then
(
data
=>
{
addSchemaAction
.
setFieldState
(
'buyerMemberId'
,
state
=>
{
state
.
props
.
enum
=
data
.
map
(
item
=>
({
...
item
,
...
...
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