Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
华润手术跟台
admin
Commits
1d76f3e5
提交
1d76f3e5
authored
11月 08, 2022
作者:
leon
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
临时调订单
上级
deb06025
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
54 行增加
和
21 行删除
+54
-21
index.ts
src/commonSchemaProperty/index.ts
+47
-5
schema.ts
src/views/order/operation-order/schema.ts
+3
-16
role.data.ts
src/views/system/role/role.data.ts
+4
-0
没有找到文件。
src/commonSchemaProperty/index.ts
浏览文件 @
1d76f3e5
...
...
@@ -5,12 +5,16 @@ import * as DistributorApi from '/@/api/system/distributorApi';
import
get
from
'lodash.get'
;
import
*
as
HospitalApi
from
'/@/api/system/hospitalApi'
;
import
*
as
DoctorApi
from
'/@/api/system/doctorApi'
;
import
*
as
UserApi
from
'/@/api/system/userApi'
;
import
{
StatusValEnum
as
DoctorStatusValEnum
}
from
'/@/views/system/doctor/schema'
;
import
{
StatusValEnum
as
UserStatusValEnum
}
from
'/@/views/system/user/schema'
;
import
{
RoleEnum
}
from
'/@/views/system/role/role.data'
;
import
{
useUserStore
}
from
'/@/store/modules/user'
;
interface
gerPropType
{
colProps
?:
any
;
onChange
?:
any
;
}
const
userStore
=
useUserStore
();
export
const
getDistributorText
=
(
text
)
=>
{
if
(
text
===
0
)
{
return
'供应商创建'
;
...
...
@@ -99,7 +103,9 @@ const getDoctorId = ({ colProps }) => {
componentProps
:
{
labelInValue
:
true
,
api
:
DoctorApi
.
all
,
params
:
{},
params
:
{
status
:
DoctorStatusValEnum
.
PASSED
,
},
resultField
:
'records'
,
labelField
:
'name'
,
valueField
:
'id'
,
...
...
@@ -108,6 +114,7 @@ const getDoctorId = ({ colProps }) => {
optionFilterProp
:
'label'
,
showSearch
:
true
,
disabled
:
true
,
immediate
:
false
,
},
colProps
,
component
:
'ApiSelect'
,
...
...
@@ -124,7 +131,6 @@ const getHospitalIdAndDoctorId = ({ colProps }) => {
getHospitalId
({
colProps
,
onChange
:
({
formActionType
,
formModel
,
e
})
=>
{
console
.
log
(
'onChange'
,
e
);
const
{
updateSchema
}
=
formActionType
;
updateSchema
([
{
field
:
'doctorId'
,
componentProps
:
{
params
:
{
hospitalId
:
e
.
value
}
}
},
...
...
@@ -136,4 +142,40 @@ const getHospitalIdAndDoctorId = ({ colProps }) => {
getDoctorId
({
colProps
}),
];
};
export
{
getDistributorId
,
getHospitalId
,
getDoctorId
,
getHospitalIdAndDoctorId
};
const
getSaleUserId
=
({
colProps
})
=>
{
return
{
field
:
'saleUserId'
,
label
:
'业务员'
,
defaultValue
:
undefined
,
form
:
{
itemProps
:
{
validateTrigger
:
'blur'
,
},
componentProps
:
{
labelInValue
:
true
,
api
:
UserApi
.
all
,
params
:
{
roel
:
RoleEnum
.
SALESMAN
,
status
:
UserStatusValEnum
.
PASSED
,
distributorId
:
userStore
.
getDistributorId
,
},
resultField
:
'records'
,
labelField
:
'name'
,
valueField
:
'id'
,
allowClear
:
false
,
placeholder
:
'业务员'
,
optionFilterProp
:
'label'
,
showSearch
:
true
,
},
colProps
,
component
:
'ApiSelect'
,
rules
:
[{
required
:
true
,
type
:
'object'
,
message
:
'请选择业务员'
}],
},
table
:
{
customRender
:
({
record
})
=>
{
return
get
(
record
,
'user.name'
);
},
},
};
};
export
{
getDistributorId
,
getHospitalId
,
getDoctorId
,
getHospitalIdAndDoctorId
,
getSaleUserId
};
src/views/order/operation-order/schema.ts
浏览文件 @
1d76f3e5
...
...
@@ -9,7 +9,7 @@
import
{
BasicColumn
}
from
'/@/components/Table'
;
import
{
FormSchema
}
from
'/@/components/Table'
;
import
{
useUserStore
}
from
'/@/store/modules/user'
;
import
{
getDistributorId
,
get
DoctorId
,
getHospitalId
,
getHospitalIdAndDocto
rId
}
from
'/@/commonSchemaProperty'
;
import
{
getDistributorId
,
get
HospitalIdAndDoctorId
,
getSaleUse
rId
}
from
'/@/commonSchemaProperty'
;
export
enum
YesNoEnum
{
YES
=
'是'
,
...
...
@@ -89,20 +89,7 @@ export const schema = {
table
:
{},
},
...
getHospitalIdAndDoctorId
({
colProps
}),
{
field
:
'saleUserId'
,
label
:
'业务员id'
,
defaultValue
:
undefined
,
form
:
{
componentProps
:
{
allowClear
:
true
,
placeholder
:
'业务员id'
,
},
colProps
,
component
:
'InputNumber'
,
},
table
:
{},
},
getSaleUserId
({
colProps
}),
{
field
:
'saleUserName'
,
label
:
'业务员名称'
,
...
...
@@ -417,7 +404,7 @@ const queryFields = [
'type'
,
'remark'
,
'deleteStatus'
,
'editorId'
,
//
'editorId',
'editorName'
,
'createTime'
,
'updateTime'
,
...
...
src/views/system/role/role.data.ts
浏览文件 @
1d76f3e5
import
{
BasicColumn
}
from
'/@/components/Table'
;
import
{
FormSchema
}
from
'/@/components/Table'
;
export
enum
RoleEnum
{
SALESMAN
=
'salesman'
,
}
export
const
columns
:
BasicColumn
[]
=
[
{
title
:
'角色名称'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论