Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
华润手术跟台
admin
Commits
36de5255
提交
36de5255
authored
11月 08, 2022
作者:
袁伟伟
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
http://git.xinwangdao.com/china-resources-surgical/admin
上级
4b664079
bd15d7a0
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
216 行增加
和
28 行删除
+216
-28
index.ts
src/commonSchemaProperty/index.ts
+106
-2
componentMap.ts
src/components/Form/src/componentMap.ts
+3
-0
Test.vue
src/views/order/components/Test.vue
+18
-0
enum.ts
src/views/order/enum.ts
+24
-0
drawer.vue
src/views/order/operation-order/drawer.vue
+7
-3
schema.ts
src/views/order/operation-order/schema.ts
+58
-23
没有找到文件。
src/commonSchemaProperty/index.ts
浏览文件 @
36de5255
...
...
@@ -8,7 +8,12 @@ import * as DoctorApi from '/@/api/system/doctorApi';
import
*
as
UserApi
from
'/@/api/system/userApi'
;
import
{
StatusValEnum
as
DoctorStatusValEnum
}
from
'/@/views/system/doctor/enum'
;
import
{
StatusValEnum
as
UserStatusValEnum
}
from
'/@/views/system/user/enum'
;
import
{
StatusValEnum
as
ReceiverStatusValEnum
}
from
'/@/views/system/receiver/enum'
;
import
{
RoleEnum
}
from
'/@/views/system/role/enum'
;
import
*
as
ThirdApi
from
'/@/api/system/thirdApi'
;
import
*
as
ReceiverApi
from
'/@/api/system/receiverApi'
;
import
{
useUserStore
}
from
'/@/store/modules/user'
;
const
userStore
=
useUserStore
();
interface
gerPropType
{
colProps
?:
any
;
onChange
?:
any
;
...
...
@@ -105,6 +110,7 @@ const getDoctorId = ({ colProps }) => {
api
:
DoctorApi
.
all
,
params
:
{
status
:
DoctorStatusValEnum
.
PASSED
,
distributorId
:
userStore
.
getIsDistributor
?
userStore
.
getDistributorId
:
undefined
,
},
resultField
:
'records'
,
labelField
:
'name'
,
...
...
@@ -132,7 +138,7 @@ const getHospitalIdAndDoctorId = ({ colProps }) => {
colProps
,
onChange
:
({
formActionType
,
formModel
,
e
})
=>
{
const
{
updateSchema
}
=
formActionType
;
updateSchema
([{
field
:
'doctorId'
,
componentProps
:
{
params
:
{
hospitalId
:
e
.
value
,
disabled
:
false
}
}
}]);
updateSchema
([{
field
:
'doctorId'
,
componentProps
:
{
params
:
{
hospitalId
:
e
.
value
},
disabled
:
false
}
}]);
formModel
.
doctorId
=
undefined
;
// 清空医生
},
}),
...
...
@@ -154,6 +160,7 @@ const getSaleUserId = ({ colProps }) => {
params
:
{
role
:
RoleEnum
.
SALESMAN
,
status
:
UserStatusValEnum
.
PASSED
,
distributorId
:
userStore
.
getIsDistributor
?
userStore
.
getDistributorId
:
undefined
,
},
resultField
:
'records'
,
labelField
:
'realName'
,
...
...
@@ -174,4 +181,101 @@ const getSaleUserId = ({ colProps }) => {
},
};
};
export
{
getDistributorText
,
getDistributorId
,
getHospitalId
,
getDoctorId
,
getHospitalIdAndDoctorId
,
getSaleUserId
};
const
getProductLineName
=
({
colProps
})
=>
{
return
{
field
:
'productLineName'
,
label
:
'产品线'
,
defaultValue
:
undefined
,
form
:
{
itemProps
:
{
validateTrigger
:
'blur'
,
},
componentProps
:
{
labelInValue
:
true
,
api
:
ThirdApi
.
line
,
params
:
{},
// resultField: 'records',
labelField
:
'name'
,
valueField
:
'name'
,
allowClear
:
false
,
placeholder
:
'产品线'
,
optionFilterProp
:
'label'
,
showSearch
:
true
,
},
colProps
,
component
:
'ApiSelect'
,
rules
:
[{
required
:
true
,
type
:
'object'
,
message
:
'请选择产品线!'
}],
},
table
:
{
customRender
:
({
record
})
=>
get
(
record
,
'name'
)
||
'(已删除/不存在)'
,
},
};
};
const
getReceiverId
=
({
colProps
})
=>
{
return
{
field
:
'receiveId'
,
label
:
'收货人'
,
defaultValue
:
undefined
,
form
:
{
itemProps
:
{
validateTrigger
:
'blur'
,
},
componentProps
:
({
formModel
})
=>
{
return
{
labelInValue
:
true
,
api
:
()
=>
{
return
ReceiverApi
.
all
().
then
((
res
)
=>
{
// @ts-ignore
res
.
forEach
((
item
)
=>
{
item
.
mergeLabel
=
`
${
item
.
receiveName
}
-
${
item
.
address
}
`
;
});
return
res
;
});
},
onChange
:
(
e
:
any
)
=>
{
const
opt
=
e
.
option
;
if
(
formModel
.
receiveName
)
{
formModel
.
receiveName
=
opt
.
receiveName
;
}
if
(
formModel
.
receivePhone
)
{
formModel
.
receivePhone
=
opt
.
receivePhone
;
}
if
(
formModel
.
address
)
{
formModel
.
address
=
opt
.
address
;
}
},
params
:
{
status
:
ReceiverStatusValEnum
.
PASSED
,
distributorId
:
userStore
.
getIsDistributor
?
userStore
.
getDistributorId
:
undefined
,
},
// resultField: 'records',
labelField
:
'mergeLabel'
,
valueField
:
'id'
,
allowClear
:
false
,
placeholder
:
'收货人'
,
optionFilterProp
:
'label'
,
showSearch
:
true
,
};
},
colProps
,
component
:
'ApiSelect'
,
rules
:
[{
required
:
true
,
type
:
'object'
,
message
:
'请选择收货人!'
}],
},
table
:
{
customRender
:
({
record
})
=>
record
.
receiveName
||
'(已删除/不存在)'
,
},
};
};
export
{
getDistributorText
,
getDistributorId
,
getHospitalId
,
getDoctorId
,
getHospitalIdAndDoctorId
,
getSaleUserId
,
getProductLineName
,
getReceiverId
,
};
src/components/Form/src/componentMap.ts
浏览文件 @
36de5255
...
...
@@ -32,8 +32,11 @@ import { StrengthMeter } from '/@/components/StrengthMeter';
import
{
IconPicker
}
from
'/@/components/Icon'
;
import
{
CountdownInput
}
from
'/@/components/CountDown'
;
import
Test
from
'/@/views/order/components/Test.vue'
;
const
componentMap
=
new
Map
<
ComponentType
,
Component
>
();
componentMap
.
set
(
'Test'
,
Test
);
componentMap
.
set
(
'Input'
,
Input
);
componentMap
.
set
(
'InputGroup'
,
Input
.
Group
);
componentMap
.
set
(
'InputPassword'
,
Input
.
Password
);
...
...
src/views/order/components/Test.vue
0 → 100644
浏览文件 @
36de5255
<
template
>
<a-button
@
click=
"add"
>
加加加
</a-button>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
}
from
'vue'
;
const
emit
=
defineEmits
([
'change'
]);
defineProps
({
count
:
Number
,
});
const
count
=
ref
(
0
);
const
add
=
()
=>
{
count
.
value
++
;
emit
(
'change'
,
count
.
value
);
};
</
script
>
<
style
scoped
lang=
"less"
></
style
>
src/views/order/enum.ts
0 → 100644
浏览文件 @
36de5255
// 物流方式枚举
export
enum
logisticsValEnum
{
SELF
=
'SELF'
,
BAR
=
'SELF'
,
EXPRESS
=
'EXPRESS'
,
SPECIALLY_ASSIGNED
=
'SPECIALLY_ASSIGNED'
,
TRAIN
=
'TRAIN'
,
FLY
=
'FLY'
,
}
export
enum
logisticsLabelEnum
{
SELF
=
'自提'
,
BAR
=
'大巴'
,
EXPRESS
=
'快递'
,
SPECIALLY_ASSIGNED
=
'专人配送'
,
TRAIN
=
'火车'
,
FLY
=
'空运'
,
}
export
const
logisticsEnumOptions
:
any
[]
=
[];
for
(
const
key
in
logisticsLabelEnum
)
{
logisticsEnumOptions
.
push
({
value
:
key
,
label
:
logisticsLabelEnum
[
key
],
});
}
src/views/order/operation-order/drawer.vue
浏览文件 @
36de5255
...
...
@@ -5,7 +5,7 @@
showFooter
:confirmDisabled=
"getConfirmDisabled"
:title=
"getTitle"
width=
"
10
00px"
width=
"
6
00px"
@
ok=
"handleSubmit"
>
<a-spin
:spinning=
"isLoading"
>
...
...
@@ -21,8 +21,7 @@
import
{
useAsyncState
}
from
'@vueuse/core'
;
import
*
as
OperationOrderApi
from
'/@/api/order/operationOrderApi'
;
import
{
OperationOrder
}
from
'/@/api/model/operationOrder'
;
import
{
useUserStore
}
from
'/@/store/modules/user'
;
const
userStore
=
useUserStore
();
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
isUpdate
=
ref
(
true
);
const
entityId
=
ref
(
0
);
...
...
@@ -50,6 +49,11 @@
);
const
[
registerDrawer
,
{
setDrawerProps
,
closeDrawer
}]
=
useDrawerInner
(
async
(
data
)
=>
{
updateSchema
([
{
field
:
'address'
,
componentProps
:
{
disabled
:
true
}
},
{
field
:
'receivePhone'
,
componentProps
:
{
disabled
:
true
}
},
{
field
:
'receiveName'
,
componentProps
:
{
disabled
:
true
}
},
]);
await
resetFields
();
setDrawerProps
({
confirmLoading
:
false
});
isUpdate
.
value
=
!!
data
?.
isUpdate
;
...
...
src/views/order/operation-order/schema.ts
浏览文件 @
36de5255
...
...
@@ -9,7 +9,14 @@
import
{
BasicColumn
}
from
'/@/components/Table'
;
import
{
FormSchema
}
from
'/@/components/Table'
;
import
{
useUserStore
}
from
'/@/store/modules/user'
;
import
{
getDistributorId
,
getHospitalIdAndDoctorId
,
getSaleUserId
}
from
'/@/commonSchemaProperty'
;
import
{
getDistributorId
,
getHospitalIdAndDoctorId
,
getSaleUserId
,
getProductLineName
,
getReceiverId
,
}
from
'/@/commonSchemaProperty'
;
import
{
logisticsEnumOptions
}
from
'/@/views/order/enum'
;
export
enum
YesNoEnum
{
YES
=
'是'
,
...
...
@@ -37,7 +44,7 @@ for (const key in StatusEnum) {
}
const
colProps
=
{
xs
:
{
span
:
24
},
sm
:
{
span
:
24
},
lg
:
{
span
:
8
}
};
const
colPropsInDrawer
=
{
span
:
12
};
const
colPropsInDrawer
=
{
span
:
24
};
export
const
schema
=
{
model
:
'OperationOrder'
,
...
...
@@ -74,17 +81,23 @@ export const schema = {
},
table
:
{},
},
getProductLineName
({
colProps
}),
{
field
:
'product
LineName
'
,
label
:
'产品
线名称
'
,
field
:
'product
SelectField
'
,
label
:
'产品'
,
defaultValue
:
undefined
,
form
:
{
componentProps
:
{
allowClear
:
true
,
placeholder
:
'产品线名称'
,
componentProps
:
()
=>
{
return
{
allowClear
:
true
,
placeholder
:
'选择产品'
,
onChange
:
(
e
)
=>
{
console
.
log
(
'e'
,
e
);
},
};
},
colProps
,
component
:
'
Inpu
t'
,
component
:
'
Tes
t'
,
},
table
:
{},
},
...
...
@@ -118,6 +131,20 @@ export const schema = {
},
table
:
{},
},
{
field
:
'HospitalName'
,
label
:
'医院名称'
,
defaultValue
:
undefined
,
form
:
{
componentProps
:
{
allowClear
:
true
,
placeholder
:
'医院名称'
,
},
colProps
,
component
:
'Input'
,
},
table
:
{},
},
{
field
:
'surgicalName'
,
label
:
'手术名称'
,
...
...
@@ -144,13 +171,14 @@ export const schema = {
placeholder
:
'手术时间'
,
format
:
'YYYY-MM-DD HH:mm:ss'
,
showTime
:
true
,
rules
:
[{
required
:
true
,
message
:
'请选择手术时间'
}],
},
},
table
:
{},
},
{
field
:
'deliveryTime'
,
label
:
'送达时间'
,
label
:
'
期望
送达时间'
,
defaultValue
:
undefined
,
form
:
{
colProps
,
...
...
@@ -160,22 +188,24 @@ export const schema = {
placeholder
:
'送达时间'
,
format
:
'YYYY-MM-DD HH:mm:ss'
,
showTime
:
true
,
rules
:
[{
required
:
true
,
message
:
'请选择送达时间'
}],
},
},
table
:
{},
},
{
field
:
'needTool'
,
label
:
'
是否需要
配套工具'
,
label
:
'配套工具'
,
defaultValue
:
'NO'
,
form
:
{
componentProps
:
{
allowClear
:
true
,
placeholder
:
'
是否需要
配套工具'
,
placeholder
:
'配套工具'
,
options
:
YesNoEnumOptions
,
},
colProps
,
component
:
'Select'
,
rules
:
[{
required
:
true
,
message
:
'请选择'
}],
},
table
:
{
customRender
:
({
text
})
=>
{
...
...
@@ -190,14 +220,17 @@ export const schema = {
defaultValue
:
undefined
,
form
:
{
componentProps
:
{
options
:
logisticsEnumOptions
,
allowClear
:
true
,
placeholder
:
'物流方式'
,
},
colProps
,
component
:
'Input'
,
component
:
'Select'
,
rules
:
[{
required
:
true
,
message
:
'请选择物流方式'
}],
},
table
:
{},
},
getReceiverId
({
colProps
}),
{
field
:
'receiveName'
,
label
:
'接收人姓名'
,
...
...
@@ -205,7 +238,7 @@ export const schema = {
form
:
{
componentProps
:
{
allowClear
:
true
,
placeholder
:
'接收人姓名'
,
//
placeholder: '接收人姓名',
},
colProps
,
component
:
'Input'
,
...
...
@@ -219,7 +252,7 @@ export const schema = {
form
:
{
componentProps
:
{
allowClear
:
true
,
placeholder
:
'接收人电话'
,
//
placeholder: '接收人电话',
},
colProps
,
component
:
'Input'
,
...
...
@@ -233,7 +266,7 @@ export const schema = {
form
:
{
componentProps
:
{
allowClear
:
true
,
placeholder
:
'收货地址'
,
//
placeholder: '收货地址',
},
component
:
'InputTextArea'
,
colProps
:
{
span
:
24
},
...
...
@@ -393,7 +426,7 @@ const queryFields = [
'saleUserName'
,
'doctorId'
,
'doctorName'
,
'surgicalName'
,
//
'surgicalName',
'surgicalTime'
,
'deliveryTime'
,
'needTool'
,
...
...
@@ -413,20 +446,22 @@ const editFields = [
// 'distributorId',
// 'orderSn',
'productLineName'
,
'productSelectField'
,
'hospitalId'
,
'saleUserId'
,
'saleUserName'
,
'doctorId'
,
'doctorName'
,
'surgicalName'
,
'saleUserId'
,
// 'saleUserName',
// 'doctorName',
// 'surgicalName',
'surgicalTime'
,
'deliveryTime'
,
'needTool'
,
'logisticsMode'
,
'receiveId'
,
'receiveName'
,
'receivePhone'
,
'address'
,
'status'
,
//
'status',
// 'type',
'remark'
,
// 'deleteStatus',
...
...
@@ -441,7 +476,7 @@ const tableFields = [
'saleUserName'
,
'doctorId'
,
'doctorName'
,
'surgicalName'
,
//
'surgicalName',
'surgicalTime'
,
'deliveryTime'
,
'needTool'
,
...
...
@@ -468,7 +503,7 @@ const descriptionFields = [
'saleUserName'
,
'doctorId'
,
'doctorName'
,
'surgicalName'
,
//
'surgicalName',
'surgicalTime'
,
'deliveryTime'
,
'needTool'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论