Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
zhangzhonghua
/
BoneHouse_Business_APP
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
61eab372
authored
Nov 24, 2022
by
peii
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
order
parent
ce6b3f46
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
460 additions
and
34 deletions
app/action/SelfAction.js
app/containers/home/HomePage.js
app/reducers/module/login.js
src/actions/action-types.ts
src/actions/userAction.ts
src/actions/utils.ts
src/components/form/index.tsx
src/components/form/select.tsx
src/pages/invoice/direct/components/filter.tsx
src/pages/invoice/distribution/components/filter.tsx
src/pages/mix_consume/form.tsx
src/pages/order/hoc/order.tsx
src/pages/order/self.formItem.ts
src/pages/order/self.tsx
src/pages/settlement/components/filter.tsx
src/reducers/user.ts
types/global.ts
app/action/SelfAction.js
View file @
61eab372
...
...
@@ -131,7 +131,7 @@ export const reqSelfSurgeryHospital = async (global_domain_config, params) => {
}
// 获取订单类型 params={access_token:'', value_set_code:'SUR_ORDER_TYPE'}
export
function
requestSelfOrderType
(
params
,
url
)
{
export
function
requestSelfOrderType
(
params
,
url
,
cb
=
()
=>
{}
)
{
return
(
dispatch
,
getState
)
=>
{
dispatch
(
requestListDataing
())
let
{
global_domain_config
}
=
getState
().
login
...
...
@@ -144,7 +144,7 @@ export function requestSelfOrderType(params, url) {
console
.
log
(
'获取订单类型 res====='
,
res
)
// 兼容老的接口,有的环境没有实现获取订单类型接口
if
(
res
.
status
===
404
)
{
return
dispatch
(
requestSelfOrderType
(
params
,
'/system/value_set/search'
))
return
dispatch
(
requestSelfOrderType
(
params
,
'/system/value_set/search'
,
cb
))
}
if
(
res
.
error_code
==
0
)
{
let
data
=
[]
...
...
@@ -159,13 +159,14 @@ export function requestSelfOrderType(params, url) {
data
=
res
.
data
.
sys_values
}
dispatch
(
requestListDataSuccess
(
data
))
cb
(
data
)
}
else
{
showWarnErrorMessage
(
dispatch
,
res
,
exitLoginStatus
,
requestListDataFail
)
}
})
.
catch
(
err
=>
{
if
(
!
url
)
{
requestSelfOrderType
(
params
,
'/system/value_set/search'
)
requestSelfOrderType
(
params
,
'/system/value_set/search'
,
cb
)
}
else
{
showErrorMessage
(
dispatch
,
err
,
requestListDataFail
,
'获取订单类型'
)
}
...
...
app/containers/home/HomePage.js
View file @
61eab372
...
...
@@ -50,7 +50,7 @@ class HomePage extends Component {
MOBILE_SELF_HELP_ORDER
:
{
icon
:
require
(
'../../images/self_order.png'
),
title
:
'自助下单'
,
page
:
'SelfOrder'
,
page
:
'SelfOrder
Page
'
,
params
:
{
isLendOrder
:
false
,
},
...
...
@@ -396,7 +396,7 @@ const mapDispatchToProps = dispatch => ({
dispatch
(
getLendOrderCodeValues
())
},
getOrganizationData
:
()
=>
{
dispatch
(
getOrganizations
())
dispatch
(
getOrganizations
(
null
,
{
success
:
()
=>
{}
}
))
},
})
...
...
app/reducers/module/login.js
View file @
61eab372
...
...
@@ -36,6 +36,7 @@ const defaultState = {
OBS_MOBILE_BM_DISPLAY
:
'00'
,
OBS_MOBILE_SUR_FOLLOWER_DISPLAY
:
'00'
,
OBS_MOBILE_DELIVERYMAN_DISPLAY
:
'00'
,
OBS_MOBILE_BOR_WARE_REQUIRED
:
'00'
},
sysValueSets
:
{
SUR_FEE_TYPE
:
[],
...
...
@@ -59,6 +60,7 @@ export const originSysProfiles = {
OBS_MOBILE_SUR_FOLLOWER_DISPLAY
:
'00'
,
// APP下单是否显示送货员权限
OBS_MOBILE_DELIVERYMAN_DISPLAY
:
'00'
,
OBS_MOBILE_BOR_WARE_REQUIRED
:
'00'
}
export
const
originSysValueSets
=
{
...
...
src/actions/action-types.ts
View file @
61eab372
...
...
@@ -2,7 +2,7 @@
* @FilePath: /BoneHouse_Business_APP/src/actions/action-types.ts
* @Author: PEII
* @Date: 2022-11-02 16:41:21
* @LastEditTime: 2022-11-
04 18:00:41
* @LastEditTime: 2022-11-
24 16:33:56
* @LastEditors: PEII
* @Vision: 1.0
* @Description:
...
...
@@ -12,3 +12,5 @@ export const GET_ORGANIZATIONS = 'GET_ORGANIZATIONS'
export
const
GET_CUSTOMERS
=
'GET_CUSTOMERS'
export
const
GET_COLLECT_SETTING
=
'GET_COLLECT_SETTING'
export
const
GET_DEPARTMENTS
=
'GET_DEPARTMENTS'
\ No newline at end of file
src/actions/userAction.ts
View file @
61eab372
...
...
@@ -2,17 +2,30 @@
* @FilePath: /BoneHouse_Business_APP/src/actions/userAction.ts
* @Author: PEII
* @Date: 2022-11-02 16:09:29
* @LastEditTime: 2022-11-
04 18:51:56
* @LastEditTime: 2022-11-
24 16:35:34
* @LastEditors: PEII
* @Vision: 1.0
* @Description:
*/
import
{
createApiAction
}
from
'./utils'
import
{
GET_ORGANIZATIONS
,
GET_CUSTOMERS
,
GET_COLLECT_SETTING
}
from
'./action-types'
import
{
GET_ORGANIZATIONS
,
GET_CUSTOMERS
,
GET_COLLECT_SETTING
,
GET_DEPARTMENTS
}
from
'./action-types'
import
api
from
'../services/api'
import
service
from
'../services/service'
/**
* @description: 获取组织
* @return {*}
*/
export
const
getOrganizations
=
createApiAction
(
GET_ORGANIZATIONS
,
api
.
getOrganizations
)
/**
* @description: 获取部门
* @return {*}
*/
export
const
getDepartments
=
createApiAction
(
GET_DEPARTMENTS
,
service
.
getDepartmentsBySellerAndOrg
)
export
const
getCustomers
=
createApiAction
(
GET_CUSTOMERS
,
api
.
getCustomers
)
export
const
getCollectSetting
=
createApiAction
(
GET_COLLECT_SETTING
,
api
.
getCollectSetting
)
src/actions/utils.ts
View file @
61eab372
...
...
@@ -38,6 +38,8 @@ export const createApiAction: IApiAction = (actionType: string, fn: Function) =>
return
(
params
=
{},
callback
=
{
success
:
<
U
>
(
p
:
U
)
=>
{},
fail
:
<
R
>
(
p
:
R
)
=>
{}
},
customActionType
=
actionType
)
=>
async
(
dispatch
:
Function
)
=>
{
try
{
console
.
log
({
type
:
`
${
customActionType
}
_REQUEST`
,
params
})
dispatch
({
type
:
`
${
customActionType
}
_REQUEST`
,
params
})
if
(
type
(
fn
)
!==
'Function'
)
{
throw
new
Error
(
`参数【
${
fn
.
toString
()}
】不是可调用函数`
)
...
...
src/components/form/index.tsx
View file @
61eab372
...
...
@@ -79,7 +79,7 @@ export default class Form extends Component<IProps> {
checkSubmit
()
{
const
{
fields
,
data
}
=
this
.
props
for
(
const
item
of
fields
)
{
if
(
isBlank
(
item
.
rules
))
continue
if
(
i
tem
.
show
===
false
||
i
sBlank
(
item
.
rules
))
continue
// 校验是否可以提交
for
(
const
rule
of
item
.
rules
)
{
...
...
@@ -124,6 +124,8 @@ export default class Form extends Component<IProps> {
<
ScrollView
style=
{
g
(
styles
,
'form'
)
}
>
<
KeyboardAvoidingView
style=
{
g
(
styles
,
'form-inner'
)
}
behavior=
"padding"
enabled
>
{
fields
.
map
(
item
=>
{
if
(
item
.
show
===
false
)
return
<></>
let
FormComponent
=
formComponents
[
item
.
type
]
||
Select
if
(
item
.
type
===
FieldType
.
CUSTOM
)
{
...
...
src/components/form/select.tsx
View file @
61eab372
...
...
@@ -70,7 +70,11 @@ export default class Select extends Component<IProps> {
}
// 换了options,表示依赖的项没有了,把当前设置为空
const
val
=
getText
(
item
,
value
)
if
(
isNotBlank
(
value
)
&&
isBlank
(
val
)
&&
R
.
complement
(
R
.
equals
)(
this
.
props
.
data
,
nextProps
.
data
))
{
if
(
isNotBlank
(
value
)
&&
isBlank
(
val
)
&&
(
R
.
complement
(
R
.
equals
)(
this
.
props
.
data
,
nextProps
.
data
)
||
isBlank
(
item
.
options
))
)
{
this
.
onChange
(
null
)
}
...
...
src/pages/invoice/direct/components/filter.tsx
View file @
61eab372
...
...
@@ -286,7 +286,7 @@ class Filter extends React.Component<IProps, IState> {
const
mapStateToProps
=
state
=>
({
userInfo
:
state
.
login
.
userInfo
,
sysProfiles
:
state
.
login
.
sysProfiles
,
organizations
:
state
.
login
.
organizations
,
organizations
:
state
.
user
.
organizations
,
})
const
mapDispatchToProps
=
dispatch
=>
({})
...
...
src/pages/invoice/distribution/components/filter.tsx
View file @
61eab372
...
...
@@ -257,7 +257,7 @@ class Filter extends React.Component<IProps, IState> {
const
mapStateToProps
=
state
=>
({
userInfo
:
state
.
login
.
userInfo
,
sysProfiles
:
state
.
login
.
sysProfiles
,
organizations
:
state
.
login
.
organizations
,
organizations
:
state
.
user
.
organizations
,
})
const
mapDispatchToProps
=
dispatch
=>
({})
...
...
src/pages/mix_consume/form.tsx
View file @
61eab372
...
...
@@ -546,7 +546,7 @@ class ConsumeForm extends Component<IProps, IState> {
const
mapStateToProps
=
state
=>
({
list
:
state
.
mixConsume
.
orders
,
userInfo
:
state
.
login
.
userInfo
,
organizations
:
state
.
login
.
organizations
,
organizations
:
state
.
user
.
organizations
,
sysProfiles
:
state
.
login
.
sysProfiles
,
})
...
...
src/pages/order/hoc/order.tsx
0 → 100644
View file @
61eab372
/*
* @FilePath: /BoneHouse_Business_APP/src/pages/order/hoc/order.tsx
* @Author: PEII
* @Date: 2022-11-22 16:47:26
* @LastEditTime: 2022-11-24 22:36:13
* @LastEditors: PEII
* @Vision: 1.0
* @Description: 订单类型form
*/
// @ts-nocheck
import
React
,
{
Component
}
from
'react'
import
*
as
R
from
'ramda'
import
{
g
,
getFormItem
,
isBlank
,
isNotBlank
,
show
,
getOrderSysProfile
}
from
'../../../utils/utils'
import
service
from
'../../../services/service'
import
api
from
'../../../services/api'
type
IProps
=
{
navigation
:
INavigation
userInfo
:
any
organizations
:
IOrganization
[]
allCustomers
:
{}
getCustomers
:
(
sellerCode
:
string
,
orgCode
:
string
)
=>
Promise
<
any
>
getCollectSetting
:
(
orgCode
,
customerCode
,
billToSiteCode
,
shipToSiteCode
)
=>
Promise
<
any
>
getOrderTypes
:
(
token
,
orgCode
)
=>
Promise
<
any
>
}
type
IState
=
{
data
:
{
[
key
:
string
]:
any
[]
}
formItems
:
IFormField
[]
doctorNames
:
string
[]
invs
:
{
string
:
any
[]
}
departments
:
{
string
:
any
[]
}
}
export
default
function
Order
(
WrapComponent
:
Component
<
IProps
,
IState
>
)
{
return
class
Order
extends
WrapComponent
{
constructor
(
props
)
{
super
(
props
)
this
.
setData
=
this
.
setData
.
bind
(
this
)
this
.
submitHandler
=
this
.
submitHandler
.
bind
(
this
)
}
state
=
{
data
:
{
sellerCode
:
this
.
props
.
userInfo
.
user_name
,
replaceItemFlag
:
'N'
,
Caller
:
'dingding'
,
},
invs
:
{},
orderTypes
:
{},
departments
:
{},
}
/**
* @description: 设置修改值
* @param {*} key
* @param {*} vlaue
* @return {*}
*/
setData
(
key
:
string
,
value
:
any
)
{
return
new
Promise
<
any
>
((
resolve
,
reject
)
=>
{
const
{
data
,
formItems
}
=
this
.
state
data
[
key
]
=
value
this
.
setState
({
data
},
()
=>
{
const
item
=
getFormItem
(
formItems
,
key
)
item
&&
item
.
callback
&&
item
.
callback
()
resolve
()
})
})
}
/**
* @description: 组织选择完回调
* @param {*}
* @return {*}
*/
async
setOrgCallback
()
{
const
{
show
}
=
getOrderSysProfile
(
'OBS_MOBILE_DEPARTMENT_DISPLAY'
)
this
.
getOrderTypes
()
// 设置完组织获取部门和客户
if
(
show
)
{
this
.
getDepartments
.
call
(
this
)
}
this
.
getCustomers
.
call
(
this
)
}
/**
* @description: 获取部门列表
* @param {*}
* @return {*}
*/
async
getDepartments
()
{
let
{
data
,
formItems
,
departments
}
=
this
.
state
const
{
orgCode
,
sellerCode
}
=
data
const
key
=
`
${
sellerCode
}${
orgCode
}
`
const
item
=
getFormItem
(
formItems
,
'departmentCode'
)
if
(
isBlank
(
departments
[
key
]))
{
item
.
loading
=
true
const
res
=
await
service
.
getDepartmentsBySellerAndOrg
({
orgCode
,
sellerCode
,
scopeFlag
:
'Y'
})
item
.
loading
=
false
departments
[
key
]
=
R
.
pathOr
([],
[
'data'
,
'relationships'
])(
res
)
}
item
.
options
=
R
.
map
(
R
.
applySpec
({
value
:
R
.
prop
(
'department_code'
),
label
:
R
.
prop
(
'department_name'
),
}),
)(
departments
[
key
]
||
[])
this
.
setState
({
formItems
,
departments
})
}
/**
* @description: 设置部门后回调
* @param {*}
* @return {*}
*/
async
setDepartmentCallback
()
{
const
{
data
,
formItems
,
departments
}
=
this
.
state
const
{
orgCode
,
sellerCode
,
departmentCode
}
=
data
const
key
=
`
${
sellerCode
}${
orgCode
}
`
const
dep
=
R
.
compose
(
R
.
find
(
R
.
propEq
(
'department_code'
,
departmentCode
)),
R
.
propOr
([],
key
))(
departments
)
console
.
log
(
dep
)
// 设置业务经理
const
bmItem
=
getFormItem
(
formItems
,
'businessManagerCode'
)
if
(
bmItem
.
show
)
{
bmItem
.
options
=
R
.
compose
(
R
.
map
(
R
.
applySpec
({
value
:
R
.
prop
(
'business_manager_code'
),
label
:
R
.
prop
(
'business_manager_name'
),
}),
),
R
.
propOr
([],
'business_manager_list'
),
)(
dep
)
}
// 设置跟台员
const
followerItem
=
getFormItem
(
formItems
,
'surgeryFollowerCode'
)
if
(
followerItem
.
show
)
{
followerItem
.
options
=
R
.
compose
(
R
.
map
(
R
.
applySpec
({
value
:
R
.
prop
(
'surgery_follower_code'
),
label
:
R
.
prop
(
'surgery_follower_name'
),
}),
),
R
.
propOr
([],
'surgery_follower_list'
),
)(
dep
)
}
// 设置送货员
const
item
=
getFormItem
(
formItems
,
'deliverymanCode'
)
if
(
item
.
show
)
{
item
.
options
=
R
.
compose
(
R
.
map
(
R
.
applySpec
({
value
:
R
.
prop
(
'deliveryman_code'
),
label
:
R
.
prop
(
'deliveryman_name'
),
}),
),
R
.
propOr
([],
'surgery_follower_list'
),
)(
dep
)
}
this
.
setState
({
formItems
})
}
/**
* @description: 获取客户列表
* @param {*}
* @return {*}
*/
async
getCustomers
()
{
const
{
data
,
formItems
,
allCustomers
}
=
this
.
state
const
{
orgCode
,
sellerCode
}
=
data
let
customers
=
R
.
propOr
([],
orgCode
)(
allCustomers
)
const
item
=
getFormItem
(
formItems
,
'customerCode'
)
if
(
isBlank
(
customers
))
{
item
.
loading
=
true
await
this
.
props
.
getCustomers
(
sellerCode
,
orgCode
)
item
.
loading
=
false
customers
=
R
.
propOr
([],
orgCode
)(
this
.
props
.
allCustomers
)
}
item
.
options
=
R
.
map
(
R
.
applySpec
({
label
:
R
.
prop
(
'customer_name'
),
value
:
R
.
prop
(
'customer_code'
),
}),
)(
customers
)
this
.
setState
({
formItems
})
}
/**
* @description: 客户选择完回调
* @param {*}
* @return {*}
*/
setCustomerCallback
()
{
const
{
formItems
,
data
,
allCustomers
}
=
this
.
state
const
{
orgCode
,
customerCode
}
=
data
const
customer
=
R
.
find
(
R
.
propEq
(
'customer_code'
,
customerCode
))(
allCustomers
[
orgCode
]
||
[])
const
item
=
getFormItem
(
formItems
,
'billToSiteCode'
)
if
(
isBlank
(
customer
))
{
item
.
options
=
[]
}
else
{
item
.
options
=
R
.
map
(
R
.
applySpec
({
label
:
R
.
prop
(
'bill_to_site_name'
),
value
:
R
.
prop
(
'bill_to_site_code'
),
shipToSites
:
R
.
propOr
([],
'ship_to_sites'
),
}),
)(
customer
.
bill_to_sites
)
}
this
.
setState
({
formItems
})
}
/**
* @description: 收单地点选择完回调
* @param {*}
* @return {*}
*/
setBillToSitesCallback
()
{
let
{
formItems
,
data
,
doctorNames
}
=
this
.
state
const
{
billToSiteCode
}
=
data
const
item
=
getFormItem
(
formItems
,
'shipToSiteCode'
)
const
billItem
=
getFormItem
(
formItems
,
'billToSiteCode'
)
const
billToSiteItem
=
R
.
find
(
R
.
propEq
(
'value'
,
billToSiteCode
))(
billItem
.
options
||
[])
const
doctorItem
=
getFormItem
(
formItems
,
'doctorName'
)
if
(
isBlank
(
billToSiteItem
))
{
item
.
options
=
[]
doctorNames
=
[]
doctorItem
.
options
=
[]
}
else
{
doctorNames
=
R
.
compose
(
R
.
filter
(
isNotBlank
),
R
.
uniq
,
R
.
pluck
(
'customer_name'
))(
billToSiteItem
.
shipToSites
)
doctorItem
.
options
=
R
.
map
(
R
.
applySpec
({
label
:
R
.
identity
,
value
:
R
.
identity
}))(
doctorNames
)
item
.
options
=
R
.
compose
(
R
.
map
(
R
.
applySpec
({
label
:
R
.
prop
(
'ship_to_site_name'
),
value
:
R
.
prop
(
'ship_to_site_code'
),
doctorName
:
R
.
prop
(
'customer_doctor'
),
authorization
:
R
.
prop
(
'authorization'
),
sal_seller_customer_product_authorization
:
R
.
prop
(
'sal_seller_customer_product_authorization'
),
}),
),
)(
billToSiteItem
.
shipToSites
||
[])
}
this
.
setState
({
formItems
,
doctorNames
})
}
/**
* @description: 收货地点选择完回调
* @param {*}
* @return {*}
*/
setShipToSiteCallback
()
{
const
{
shipToSiteCode
}
=
this
.
state
.
data
// 借货仓库依赖收货地址
if
(
isNotBlank
(
shipToSiteCode
))
{
this
.
getInventories
()
}
}
/**
* @description: 获取借货仓库
* @param {*}
* @return {*}
*/
async
getInventories
()
{
const
{
formItems
,
data
,
invs
}
=
this
.
state
const
{
orgCode
,
customerCode
,
billToSiteCode
,
shipToSiteCode
}
=
data
const
item
=
getFormItem
(
formItems
,
'collectSrcInvCode'
)
let
invRes
=
await
api
.
getCollectSetting
({
orgCode
,
customerCode
,
billToSiteCode
,
shipToSiteCode
,
processCode
:
'COLLECT'
,
})
item
.
options
=
R
.
compose
(
R
.
uniqBy
(
R
.
prop
(
'source_inv_code'
)),
R
.
map
(
R
.
applySpec
({
label
:
R
.
prop
(
'source_inv_name'
),
value
:
R
.
prop
(
'source_inv_code'
),
}),
),
R
.
propOr
([],
'data'
),
)(
invRes
)
this
.
setState
({
formItems
})
}
/**
* @description: 订单类型
* @return {*}
*/
async
getOrderTypes
()
{
let
{
data
,
orderTypes
,
formItems
}
=
this
.
state
const
{
token
}
=
this
.
props
if
(
isBlank
(
orderTypes
[
data
.
orgCode
]))
{
const
res
=
await
this
.
props
.
getOrderTypes
(
token
,
data
.
orgCode
)
orderTypes
[
data
.
orgCode
]
=
res
}
const
item
=
getFormItem
(
formItems
,
'orderTypeCode'
)
item
.
options
=
R
.
compose
(
R
.
uniqBy
(
R
.
prop
(
'value'
)),
R
.
map
(
R
.
applySpec
({
label
:
R
.
prop
(
'value_name'
),
value
:
R
.
prop
(
'value_code'
),
}),
),
)(
orderTypes
[
data
.
orgCode
]
||
[])
this
.
setState
({
formItems
})
}
/**
* @description:
* @param {*}
* @return {*}
*/
submitHandler
()
{
console
.
log
(
'submit'
)
}
render
()
{
return
super
.
render
()
}
}
}
src/pages/order/self.formItem.ts
View file @
61eab372
...
...
@@ -2,17 +2,24 @@
* @FilePath: /BoneHouse_Business_APP/src/pages/order/self.formItem.ts
* @Author: PEII
* @Date: 2022-10-27 15:10:32
* @LastEditTime: 2022-11-
02 12:16:05
* @LastEditTime: 2022-11-
24 21:12:12
* @LastEditors: PEII
* @Vision: 1.0
* @Description: 自助下单formItem数据
*/
// @ts-nocheck
import
*
as
R
from
'ramda'
import
{
FieldType
,
SelectMode
}
from
'../../enums'
import
{
IFormField
}
from
'bonehouse'
import
{
FieldType
,
SelectMode
}
from
'../../enums'
import
{
getOrderSysProfile
}
from
'../../utils/utils'
export
function
getSelfFormItems
():
IFormField
[]
{
const
srcInvProfile
=
getOrderSysProfile
(
'OBS_MOBILE_BOR_WARE_REQUIRED'
)
const
departmentProfile
=
getOrderSysProfile
(
'OBS_MOBILE_DEPARTMENT_DISPLAY'
)
const
businessManagerProfile
=
getOrderSysProfile
(
'OBS_MOBILE_BM_DISPLAY'
)
const
followerProfile
=
getOrderSysProfile
(
'OBS_MOBILE_SUR_FOLLOWER_DISPLAY'
)
const
deliverymanProfile
=
getOrderSysProfile
(
'OBS_MOBILE_DELIVERYMAN_DISPLAY'
)
return
[
{
field
:
'sellerCode'
,
...
...
@@ -40,7 +47,7 @@ export function getSelfFormItems(): IFormField[] {
value
:
R
.
prop
(
'org_code'
),
}),
),
R
.
uniqBy
(
R
.
prop
(
'org_code'
))
R
.
uniqBy
(
R
.
prop
(
'org_code'
))
,
)(
this
.
props
.
organizations
||
[])
})(),
placeholder
:
'请选择'
,
...
...
@@ -48,6 +55,47 @@ export function getSelfFormItems(): IFormField[] {
callback
:
this
.
setOrgCallback
.
bind
(
this
),
},
{
field
:
'departmentCode'
,
label
:
'部门'
,
type
:
FieldType
.
SELECT
,
placeholder
:
'请选择'
,
show
:
departmentProfile
.
show
,
options
:
[],
rules
:
[{
required
:
departmentProfile
.
required
,
message
:
'请选择客户'
}],
refrence
:
[
'orgCode'
],
callback
:
this
.
setDepartmentCallback
.
bind
(
this
),
},
{
field
:
'businessManagerCode'
,
label
:
'业务经理'
,
type
:
FieldType
.
SELECT
,
placeholder
:
'请选择'
,
show
:
businessManagerProfile
.
show
,
options
:
[],
rules
:
[{
required
:
businessManagerProfile
.
required
,
message
:
'请选择业务经理'
}],
refrence
:
[
'orgCode'
,
'departmentCode'
],
},
{
field
:
'surgeryFollowerCode'
,
label
:
'跟台员'
,
type
:
FieldType
.
SELECT
,
placeholder
:
'请选择'
,
show
:
followerProfile
.
show
,
options
:
[],
rules
:
[{
required
:
followerProfile
.
required
,
message
:
'请选择跟台员'
}],
refrence
:
[
'orgCode'
,
'departmentCode'
],
},
{
field
:
'deliverymanCode'
,
label
:
'送货员'
,
type
:
FieldType
.
SELECT
,
placeholder
:
'请选择'
,
show
:
deliverymanProfile
.
show
,
options
:
[],
rules
:
[{
required
:
deliverymanProfile
.
required
,
message
:
'请选择送货员'
}],
refrence
:
[
'orgCode'
,
'departmentCode'
],
},
{
field
:
'customerCode'
,
label
:
'客户'
,
type
:
FieldType
.
SELECT
,
...
...
@@ -80,10 +128,10 @@ export function getSelfFormItems(): IFormField[] {
{
field
:
'doctorName'
,
label
:
'主治医生'
,
type
:
FieldType
.
SELEC
T
,
options
:
[],
placeholder
:
'请
选择
'
,
refrence
:
[
'orgCode'
,
'customerCode'
,
'billToSiteCode'
,
'shipToSiteCode'
],
type
:
FieldType
.
TEX
T
,
//
options: [],
placeholder
:
'请
输入
'
,
//
refrence: ['orgCode', 'customerCode', 'billToSiteCode', 'shipToSiteCode'],
},
{
field
:
'surgeryDate'
,
...
...
@@ -99,15 +147,7 @@ export function getSelfFormItems(): IFormField[] {
type
:
FieldType
.
SELECT
,
placeholder
:
'请选择'
,
rules
:
[{
required
:
true
,
message
:
'请选择订单类型'
}],
options
:
R
.
compose
(
R
.
map
(
R
.
applySpec
({
label
:
R
.
prop
(
'valueName'
),
value
:
R
.
prop
(
'valueCode'
),
}),
),
R
.
pathOr
([],
[
'sysStore'
,
'sysValueSets'
,
'SUR_ORDER_TYPE'
]),
)(
this
.
props
),
options
:
[],
},
{
field
:
'products'
,
...
...
@@ -124,7 +164,9 @@ export function getSelfFormItems(): IFormField[] {
label
:
'借货仓库'
,
type
:
FieldType
.
SELECT
,
placeholder
:
'请选择'
,
show
:
srcInvProfile
.
show
,
options
:
[],
rules
:
[{
required
:
srcInvProfile
.
required
,
message
:
'请选择借货仓库'
}],
refrence
:
[
'orgCode'
,
'sellerCode'
,
'customerCode'
,
'billToSiteCode'
,
'shipToSiteCode'
],
},
{
...
...
@@ -171,5 +213,10 @@ export function getSelfFormItems(): IFormField[] {
type
:
FieldType
.
VOICE
,
placeholder
:
'还有什么要安排的,可录音备注哟!'
,
},
{
field
:
'imageUrl'
,
label
:
'添加图片'
,
type
:
FieldType
.
IMAGE
,
},
]
}
src/pages/order/self.tsx
View file @
61eab372
This diff is collapsed.
Click to expand it.
src/pages/settlement/components/filter.tsx
View file @
61eab372
...
...
@@ -267,7 +267,7 @@ class Filter extends React.Component<IProps, IState> {
const
mapStateToProps
=
state
=>
({
userInfo
:
state
.
login
.
userInfo
,
sysProfiles
:
state
.
login
.
sysProfiles
,
organizations
:
state
.
login
.
organizations
,
organizations
:
state
.
user
.
organizations
,
})
const
mapDispatchToProps
=
dispatch
=>
({})
...
...
src/reducers/user.ts
View file @
61eab372
...
...
@@ -2,7 +2,7 @@
* @FilePath: /BoneHouse_Business_APP/src/reducers/user.ts
* @Author: PEII
* @Date: 2022-11-02 16:02:14
* @LastEditTime: 2022-11-
04 18:39:31
* @LastEditTime: 2022-11-
24 16:32:06
* @LastEditors: PEII
* @Vision: 1.0
* @Description:
...
...
@@ -15,7 +15,7 @@ const initState = {
organizations
:
[],
inventories
:
[],
customers
:
{},
srcInvs
:
{}
,
srcInvs
:
[]
,
}
type
IAction
=
{
...
...
@@ -38,7 +38,6 @@ export const user = createReducer(initState, {
},
[
GET_COLLECT_SETTING
](
state
:
any
,
action
:
IAction
)
{
console
.
log
(
action
)
return
state
return
{...
state
,
srcInvs
:
action
.
payload
}
},
})
types/global.ts
View file @
61eab372
...
...
@@ -73,6 +73,7 @@ declare module 'bonehouse' {
order
?:
number
minuteInterval
?:
number
symmetric
?:
string
show
?:
boolean
[
key
:
string
]:
any
}
...
...
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