Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
folacin-front
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
ynby
folacin-front
Commits
eac1da0a
Commit
eac1da0a
authored
Jul 07, 2021
by
gengchunlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
叶酸发放登记
parent
928fec35
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
208 additions
and
128 deletions
+208
-128
index.js
src/api/index.js
+7
-4
Home.vue
src/views/Home.vue
+1
-2
folviteApply.vue
src/views/indexComponent/folviteApply/folviteApply.vue
+17
-24
addFolviteDistribution.vue
...folviteDistribution/components/addFolviteDistribution.vue
+125
-83
folviteDistribution.vue
...ndexComponent/folviteDistribution/folviteDistribution.vue
+7
-7
addSupply.vue
...iews/indexComponent/supplyManage/components/addSupply.vue
+51
-8
No files found.
src/api/index.js
View file @
eac1da0a
...
...
@@ -41,8 +41,8 @@ export default {
fetchAllEnum
(
params
)
{
//获取所有枚举值
return
fetch
(
`/basic-info/v1/basic-info/basic-sys-enum/all-enum`
,
params
)
},
fetchAreaByCode
(
areaCode
)
{
//根据区域编码获取下级地区
return
fetch
(
`/v1/folacin-admin/sys-dict-area/child-area/
${
areaCode
}
`
)
fetchAreaByCode
(
params
)
{
//根据区域编码获取下级地区
return
fetch
(
`/v1/folacin-admin/sys-dict-area/child-area/
${
params
.
areaCode
}
`
)
},
//知情同意书
fetchConsentInfo
()
{
//查询单位的知情同意书
...
...
@@ -168,8 +168,11 @@ export default {
//叶酸发放登记
folviteDistributionManage
:
{
fetchFolviteDistributionList
(
params
)
{
//叶酸发放登记列表
return
fetch
(
'/
stock-info/v1/stock-info/stock-apply-record
'
,
params
)
return
fetch
(
'/
v1/folacin-admin/folacin-resident-info/grant-page
'
,
params
)
},
fetchAddFolviteDistribution
(
params
)
{
return
fetch
(
'/v1/folacin-admin/folacin-resident-info/direct-grant'
,
params
,
'post'
,
'josn'
)
}
},
//物资调拨管理
allocationManagement
:
{
...
...
@@ -213,7 +216,7 @@ export default {
},
folviteApplyManage
:
{
fetchFolviteApplyList
(
params
)
{
//叶酸申请列表
return
fetch
(
'/v1/folacin-admin/folacin-resident-apply'
,
params
)
return
fetch
(
'/v1/folacin-admin/folacin-resident-
info/
apply'
,
params
)
},
},
fyManage
:
{
...
...
src/views/Home.vue
View file @
eac1da0a
...
...
@@ -55,8 +55,7 @@
created
()
{
//获取妇幼权限和登录基本信息
// document.cookie = 'bGNnd3lwdF9hdA=8f26b5cc-1d66-4b31-8b86-26d916209e1e;'//昆明市
document
.
cookie
=
'bGNnd3lwdF9hdA=a551a5a0-aa58-45fe-be4a-9304aa60b594;'
//云南省
document
.
cookie
=
'bGNnd3lwdF9hdA=15b5e2ce-5b70-48ab-9731-42397aabfec6;'
//云南省
let
cookieToken
=
getCookie
(
'bGNnd3lwdF9hdA'
)
if
(
cookieToken
)
{
//根据cookie获取token并调用接口获取菜单并设置初始选中菜单
window
.
sessionStorage
.
setItem
(
'token'
,
'bearer'
+
' '
+
cookieToken
);
...
...
src/views/indexComponent/folviteApply/folviteApply.vue
View file @
eac1da0a
...
...
@@ -2,10 +2,10 @@
<div
class=
"inStockManage"
>
<a-form
layout=
"inline"
class=
"search_form"
>
<a-form-item
label=
"领取状态"
>
<a-select
v-model=
"searchForm.
factoryId
"
placeholder=
"请选择"
style=
"width: 250px"
>
<a-select
v-model=
"searchForm.
status
"
placeholder=
"请选择"
style=
"width: 250px"
>
<a-select-option
value=
""
>
全部
</a-select-option>
<a-select-option
v-for=
"item in
allFactoryInfo"
:key=
"item.id"
:value=
"item.id
"
>
{{
item
.
factory
Name
}}
<a-select-option
v-for=
"item in
statusList"
:key=
"item.enumValue"
:value=
"item.enumValue
"
>
{{
item
.
enum
Name
}}
</a-select-option>
</a-select>
</a-form-item>
...
...
@@ -53,53 +53,53 @@
</div>
</template>
<
script
>
import
{
isEmptyParams
}
from
"../../utils/common"
;
import
{
getEnumByFlag
,
isEmptyParams
}
from
"../../utils/common"
;
import
moment
from
'moment'
const
columns
=
[
{
title
:
'女方姓名'
,
dataIndex
:
'
medicine
Name'
,
dataIndex
:
'
woman
Name'
,
ellipsis
:
true
},
{
title
:
'证件类型'
,
dataIndex
:
'
typeNam
e'
,
dataIndex
:
'
womenCertificateTyp
e'
,
ellipsis
:
true
},
{
title
:
'证件号码'
,
width
:
'120px'
,
dataIndex
:
'
factoryName
'
,
dataIndex
:
'
womenIdCard
'
,
ellipsis
:
true
},
{
title
:
'男方姓名'
,
dataIndex
:
'
batchNumber
'
,
dataIndex
:
'
manName
'
,
ellipsis
:
true
},
{
title
:
'证件类型'
,
dataIndex
:
'
specs
'
,
dataIndex
:
'
menCertificateType
'
,
ellipsis
:
true
},
{
title
:
'证件号码'
,
width
:
'120px'
,
scopedSlots
:
{
customRender
:
'expireDateS'
},
dataIndex
:
'menIdCard'
},
{
title
:
'联系电话'
,
dataIndex
:
'
isHistoryNam
e'
,
dataIndex
:
'
telephon
e'
,
ellipsis
:
true
},
{
title
:
'领取状态'
,
dataIndex
:
's
pecs
'
,
dataIndex
:
's
tatusName
'
,
ellipsis
:
true
},
{
title
:
'领取日期'
,
dataIndex
:
'
stockNum
'
,
dataIndex
:
'
provideDate
'
,
ellipsis
:
true
},
{
...
...
@@ -116,11 +116,9 @@
return
{
// 搜索框对象
searchForm
:
{
medicalName
:
''
,
factoryId
:
''
,
produceDate
:
undefined
status
:
''
,
},
allFactoryInfo
:
[],
statusList
:
[],
pagination
:
{
pageIndex
:
1
,
pageSize
:
10
,
...
...
@@ -133,16 +131,11 @@
}
},
created
()
{
this
.
statusList
=
getEnumByFlag
(
'folacin_resident_info_status'
)
this
.
getFolviteApplyList
()
this
.
getAllFactory
()
},
methods
:
{
getAllFactory
()
{
let
par
=
{}
this
.
$api
.
common
.
fetchAllFactory
(
par
).
then
(({
data
=
[]})
=>
{
this
.
allFactoryInfo
=
data
})
},
searchList
()
{
this
.
pagination
.
pageIndex
=
1
this
.
getFolviteApplyList
()
...
...
src/views/indexComponent/folviteDistribution/components/addFolviteDistribution.vue
View file @
eac1da0a
...
...
@@ -20,31 +20,30 @@
<a-button
slot=
"extra"
>
身份证识别
</a-button>
<a-row
:gutter=
"16"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"姓名"
prop=
"
sendContact
"
>
<a-input
placeholder=
"请输入姓名"
v-model=
"formData.
sendContact
"
></a-input>
<a-form-model-item
label=
"姓名"
prop=
"
womanName
"
>
<a-input
placeholder=
"请输入姓名"
v-model=
"formData.
womanName
"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"证件类型"
prop=
"sendPhone"
>
<a-select
v-model=
"formData.receiveUnitId"
placeholder=
"请选择"
@
click
.
native=
"getChildUnitList"
>
<a-select-option
v-for=
"item in childUnitList"
:key=
"item.id"
:value=
"item.id"
<a-form-model-item
label=
"证件类型"
prop=
"womenCertificateType"
>
<a-select
v-model=
"formData.womenCertificateType"
placeholder=
"请选择"
>
<a-select-option
v-for=
"item in certificateTypeList"
:key=
"item.enumValue"
:value=
"item.enumValue"
>
{{
item
.
unit
Name
}}
{{
item
.
enum
Name
}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"证件号码"
prop=
"
sendDate
"
>
<a-input
placeholder=
"请输入证件号码"
v-model=
"formData.
sendContact
"
></a-input>
<a-form-model-item
label=
"证件号码"
prop=
"
womenIdCard
"
>
<a-input
placeholder=
"请输入证件号码"
v-model=
"formData.
womenIdCard
"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"是否曾经怀孕"
prop=
"
receiveUnitId
"
>
<a-radio-group
v-model=
"formData.
sendContac
t"
@
change=
"onChangePregnant"
>
<a-form-model-item
label=
"是否曾经怀孕"
prop=
"
oncePregnant
"
>
<a-radio-group
v-model=
"formData.
oncePregnan
t"
@
change=
"onChangePregnant"
>
<a-radio
:value=
"1"
>
否
</a-radio>
...
...
@@ -55,8 +54,8 @@
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"孕次"
prop=
"
sendContact
"
v-if=
"womanPregnant"
>
<a-input
v-toInt
placeholder=
"请输入"
v-model=
"formData.
sendContact
"
></a-input>
<a-form-model-item
label=
"孕次"
prop=
"
pregnantNum
"
v-if=
"womanPregnant"
>
<a-input
v-toInt
placeholder=
"请输入"
v-model=
"formData.
pregnantNum
"
></a-input>
</a-form-model-item>
</a-col>
</a-row>
...
...
@@ -69,26 +68,26 @@
<a-button
slot=
"extra"
>
身份证识别
</a-button>
<a-row
:gutter=
"16"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"姓名"
prop=
"
sendContact
"
>
<a-input
placeholder=
"请输入姓名"
v-model=
"formData.
sendContact
"
></a-input>
<a-form-model-item
label=
"姓名"
prop=
"
manName
"
>
<a-input
placeholder=
"请输入姓名"
v-model=
"formData.
manName
"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"证件类型"
prop=
"
sendPhon
e"
>
<a-select
v-model=
"formData.
receiveUnitId
"
placeholder=
"请选择"
<a-form-model-item
label=
"证件类型"
prop=
"
menCertificateTyp
e"
>
<a-select
v-model=
"formData.
menCertificateType
"
placeholder=
"请选择"
@
click
.
native=
"getChildUnitList"
>
<a-select-option
v-for=
"item in c
hildUnit
List"
:key=
"item.
id"
:value=
"item.id
"
<a-select-option
v-for=
"item in c
ertificateType
List"
:key=
"item.
enumValue"
:value=
"item.enumValue
"
>
{{
item
.
unit
Name
}}
{{
item
.
enum
Name
}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"证件号码"
prop=
"
sendDate
"
>
<a-input
placeholder=
"请输入证件号码"
v-model=
"formData.
sendContact
"
></a-input>
<a-form-model-item
label=
"证件号码"
prop=
"
menIdCard
"
>
<a-input
placeholder=
"请输入证件号码"
v-model=
"formData.
menIdCard
"
></a-input>
</a-form-model-item>
</a-col>
</a-row>
...
...
@@ -100,39 +99,38 @@
</div>
<a-row
:gutter=
"16"
>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"联系电话"
prop=
"
sendContact
"
:labelCol=
"
{span: 3}"
<a-form-model-item
label=
"联系电话"
prop=
"
telephone
"
:labelCol=
"
{span: 3}"
:wrapperCol="{span: 8}">
<a-input
placeholder=
"请输入联系电话"
v-model=
"formData.
sendContact
"
></a-input>
<a-input
placeholder=
"请输入联系电话"
v-model=
"formData.
telephone
"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"现住地址"
prop=
"
sendPhon
e"
:labelCol=
"
{span: 3}"
<a-form-model-item
label=
"现住地址"
prop=
"
presentCod
e"
:labelCol=
"
{span: 3}"
:wrapperCol="{span: 20}">
<a-input
placeholder=
"请输入现住地址"
v-model=
"formData.
sendPhon
e"
></a-input>
<a-input
placeholder=
"请输入现住地址"
v-model=
"formData.
presentCod
e"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"详细地址"
prop=
"
sendDate
"
:labelCol=
"
{span: 3}"
<a-form-model-item
label=
"详细地址"
prop=
"
nowAddress
"
:labelCol=
"
{span: 3}"
:wrapperCol="{span: 20}">
<a-input
placeholder=
"请输入详细地址"
v-model=
"formData.
sendPhone
"
></a-input>
<a-input
placeholder=
"请输入详细地址"
v-model=
"formData.
nowAddress
"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"签署方式"
prop=
"receiveUnitId"
>
<a-select
v-model=
"formData.receiveUnitId"
placeholder=
"请选择"
@
click
.
native=
"getChildUnitList"
>
<a-select-option
v-for=
"item in childUnitList"
:key=
"item.id"
:value=
"item.id"
<a-form-model-item
label=
"签署方式"
prop=
"signedMode"
>
<a-select
v-model=
"formData.signedMode"
placeholder=
"请选择"
disabled
>
<a-select-option
v-for=
"item in signedModeList"
:key=
"item.enumValue"
:value=
"item.enumValue"
>
{{
item
.
unit
Name
}}
{{
item
.
enum
Name
}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"签署日期"
prop=
"
sendContact
"
>
<a-date-picker
v-model=
"formData.p
roduce
Date"
format=
"YYYY-MM-DD"
style=
"width: 100%"
/>
<a-form-model-item
label=
"签署日期"
prop=
"
parentDate
"
>
<a-date-picker
v-model=
"formData.p
arent
Date"
format=
"YYYY-MM-DD"
style=
"width: 100%"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"21"
:offset=
"3"
>
...
...
@@ -141,6 +139,11 @@
<div
slot=
"title"
style=
"text-align: center;padding: 10px 0px"
>
<span
style=
"color: #262626;font-size: 14px"
>
知情同意书
</span>
</div>
<div>
<div
v-html=
"bookHtmlContent.content"
>
</div>
</div>
</a-card>
</a-form-model-item>
</a-col>
...
...
@@ -171,17 +174,17 @@
<div
style=
"clear: both"
></div>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"发放日期"
prop=
"
sendContact
"
>
<a-date-picker
v-model=
"formData.pro
duc
eDate"
format=
"YYYY-MM-DD"
style=
"width: 100%"
/>
<a-form-model-item
label=
"发放日期"
prop=
"
provideDate
"
>
<a-date-picker
v-model=
"formData.pro
vid
eDate"
format=
"YYYY-MM-DD"
style=
"width: 100%"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"发放医生"
prop=
"
receiveUnit
Id"
>
<a-select
v-model=
"formData.
receiveUnit
Id"
placeholder=
"请选择"
@
click
.
native=
"getChildUnitList"
>
<a-select-option
v-for=
"item in c
hildUnit
List"
:key=
"item.
id"
:value=
"item.id
"
<a-form-model-item
label=
"发放医生"
prop=
"
provideDoctor
Id"
>
<a-select
v-model=
"formData.
provideDoctor
Id"
placeholder=
"请选择"
@
click
.
native=
"getChildUnitList"
>
<a-select-option
v-for=
"item in c
ertificateType
List"
:key=
"item.
enumValue"
:value=
"item.enumValue
"
>
{{
item
.
unit
Name
}}
{{
item
.
enum
Name
}}
</a-select-option>
</a-select>
</a-form-model-item>
...
...
@@ -228,8 +231,8 @@
</a-form-model-item>
</a-col>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"备注"
prop=
"
sendDate
"
:labelCol=
"{span: 3}"
:wrapperCol=
"{span: 20}"
>
<a-textarea
placeholder=
"请输入备注"
v-model=
"formData.
sendPhone
"
:rows=
"5"
></a-textarea>
<a-form-model-item
label=
"备注"
prop=
"
remarks
"
:labelCol=
"{span: 3}"
:wrapperCol=
"{span: 20}"
>
<a-textarea
placeholder=
"请输入备注"
v-model=
"formData.
remarks
"
:rows=
"5"
></a-textarea>
</a-form-model-item>
</a-col>
</a-form-model>
...
...
@@ -244,7 +247,7 @@
</template>
<
script
>
import
{
checkPhone
,
closedDetail
}
from
"../../../utils/common"
;
import
{
checkPhone
,
closedDetail
,
getEnumByFlag
}
from
"../../../utils/common"
;
import
moment
from
'moment'
let
vm
=
this
...
...
@@ -258,33 +261,70 @@
spinning
:
false
,
// 弹窗内表单
formData
:
{
detailedList
:
[],
sendUnitId
:
undefined
,
sendUnitName
:
undefined
,
receiveUnitId
:
undefined
,
sendDate
:
undefined
,
sendContact
:
undefined
,
sendPhone
:
undefined
,
relationType
:
undefined
,
purchasePhone
:
undefined
,
womanName
:
undefined
,
womenCertificateType
:
'1'
,
womenIdCard
:
undefined
,
oncePregnant
:
1
,
pregnantNum
:
undefined
,
manName
:
undefined
,
menCertificateType
:
'1'
,
menIdCard
:
undefined
,
telephone
:
undefined
,
presentCode
:
undefined
,
nowAddress
:
undefined
,
signedMode
:
'1'
,
parentDate
:
undefined
,
provideDate
:
undefined
,
provideDoctorId
:
undefined
,
provideRecordList
:
[],
remarks
:
undefined
,
},
childUnitList
:
[],
formRules
:
{
sendUnitName
:
[
{
required
:
true
,
message
:
'请选择发货单位'
}
womanName
:
[
{
required
:
true
,
message
:
'请输入姓名'
}
],
womenCertificateType
:
[
{
required
:
true
,
message
:
'请选择证件类型'
}
],
womenIdCard
:
[
{
required
:
true
,
message
:
'请输入证件号码'
}
],
oncePregnant
:
[
{
required
:
true
,
message
:
'请选择是否曾经怀孕'
}
],
pregnantNum
:
[
{
required
:
true
,
message
:
'请输入孕次'
}
],
manName
:
[
{
required
:
true
,
message
:
'请输入姓名'
}
],
menCertificateType
:
[
{
required
:
true
,
message
:
'请选择证件类型'
}
],
relationType
:
[
{
required
:
true
,
message
:
'请
选择出库类型
'
}
menIdCard
:
[
{
required
:
true
,
message
:
'请
输入证件号码
'
}
],
purchaseP
hone
:
[
{
required
:
true
,
message
:
'请
填写收货人
电话'
},
telep
hone
:
[
{
required
:
true
,
message
:
'请
输入联系
电话'
},
{
validator
:
checkPhone
},
],
receiveUnitId
:
[
{
required
:
true
,
message
:
'请选择
收货单位
'
}
presentCode
:
[
{
required
:
true
,
message
:
'请选择
选择现住地址
'
}
],
sendDate
:
[
{
required
:
true
,
message
:
'请选择出库日期'
}
nowAddress
:
[
{
required
:
true
,
message
:
'请输入详细地址'
}
],
signedMode
:
[
{
required
:
true
,
message
:
'请选择签署方式'
}
],
parentDate
:
[
{
required
:
true
,
message
:
'请选择签署日期'
}
],
provideDate
:
[
{
required
:
true
,
message
:
'请选择发放日期'
}
],
provideDoctorId
:
[
{
required
:
true
,
message
:
'请选择发放医生'
}
],
sendNum
:
[
{
required
:
true
,
message
:
'请填写分配数量'
},
...
...
@@ -301,26 +341,31 @@
},
},
],
sendContact
:
[
{
required
:
true
,
message
:
'请填写发货人'
}
],
sendPhone
:
[
{
required
:
true
,
message
:
'请填写联系电话'
},
{
validator
:
checkPhone
},
remarks
:
[
{
required
:
true
,
message
:
'请输入备注'
}
],
},
womanPregnant
:
false
,
//是否怀孕
options
:
{
penColor
:
"#000"
,
//画笔颜色
},
certificateTypeList
:
[],
signedModeList
:
[],
bookHtmlContent
:
''
}
},
created
()
{
this
.
certificateTypeList
=
getEnumByFlag
(
'folacin_resident_info_certificate_type'
)
this
.
signedModeList
=
getEnumByFlag
(
'folacin_resident_info_signed_mode'
)
this
.
getSelectedMedical
()
this
.
formData
.
sendUnitId
=
this
.
unitInfo
.
id
this
.
formData
.
sendUnitName
=
this
.
unitInfo
.
unitName
this
.
getBookHtmlContent
()
},
methods
:
{
getBookHtmlContent
()
{
//获取用户知情书模板
this
.
$api
.
common
.
fetchConsentInfo
().
then
(({
data
})
=>
{
this
.
bookHtmlContent
=
data
})
},
//------签字-----------
reWrite
()
{
this
.
$refs
.
signaturePad
.
clearSignature
();
...
...
@@ -422,19 +467,16 @@
});
});
params
.
detailedList
=
detailedList
;
this
.
$api
.
stockManage
.
fetchDispatchGoods
(
params
).
then
(({
code
})
=>
{
this
.
$api
.
folviteDistributionManage
.
fetchAddFolviteDistribution
(
params
).
then
(({
code
})
=>
{
this
.
spinning
=
false
;
if
(
code
===
'SUCCESS'
)
{
this
.
$message
.
success
(
'调拨分配成功!'
);
// window.history.go(-1)
this
.
$message
.
success
(
'发放成功!'
);
this
.
goBack
()
}
else
{
// this.$message.error('调拨分配失败!')
}
});
}).
catch
(()
=>
{
this
.
spinning
=
false
})
}
}
else
{
return
false
;
}
});
},
...
...
src/views/indexComponent/folviteDistribution/folviteDistribution.vue
View file @
eac1da0a
...
...
@@ -55,22 +55,22 @@
},
{
title
:
'姓名'
,
dataIndex
:
'
residentId
'
,
dataIndex
:
'
womanName
'
,
ellipsis
:
true
},
{
title
:
'证件号码'
,
width
:
'120px'
,
dataIndex
:
'
residentI
d'
,
dataIndex
:
'
womenIdCar
d'
,
ellipsis
:
true
},
{
title
:
'联系电话'
,
dataIndex
:
'
residentId
'
,
dataIndex
:
'
telephone
'
,
ellipsis
:
true
},
{
title
:
'发放数量
(瓶)
'
,
title
:
'发放数量'
,
dataIndex
:
'number'
,
ellipsis
:
true
},
...
...
@@ -81,12 +81,12 @@
},*/
{
title
:
'现住址'
,
dataIndex
:
'
residentId
'
,
dataIndex
:
'
nowAddress
'
,
ellipsis
:
true
},
{
title
:
'
登记人
'
,
dataIndex
:
'provideDoctor
Id
'
,
title
:
'
发放医生
'
,
dataIndex
:
'provideDoctor
Name
'
,
ellipsis
:
true
},
{
...
...
src/views/indexComponent/supplyManage/components/addSupply.vue
View file @
eac1da0a
...
...
@@ -35,8 +35,15 @@
<a-col
:span=
"12"
>
<a-form-model-item
label=
"联系地址"
prop=
"areaCode"
>
<allAreaSelect
v-model=
"formData.areaCode"
></allAreaSelect>
{{
formData
.
areaName
}}
<!--
<allAreaSelect
v-model=
"formData.areaCode"
></allAreaSelect>
{{
formData
.
areaName
}}
-->
<a-cascader
v-model=
"formData.areaCode"
change-on-select
:options=
"areaInfo"
:fieldNames=
"fieldNames"
:load-data=
"loadAreaData"
@
click
.
native=
"initLoadAreaData"
placeholder=
"请选择"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"24"
>
...
...
@@ -105,31 +112,67 @@
{
required
:
true
,
message
:
'请输入详细地址'
,
trigger
:
'change'
}
],
},
queryParams
:
{}
queryParams
:
{},
areaInfo
:
[],
fieldNames
:
{
label
:
'areaName'
,
value
:
'areaCode'
,
children
:
'children'
},
}
},
created
()
{
this
.
queryParams
=
this
.
$route
.
query
;
if
(
this
.
queryParams
.
modeType
===
"update"
)
{
this
.
$api
.
common
.
fetchSupplyById
(
this
.
queryParams
.
id
).
then
(
res
=>
{
if
(
res
.
code
===
'SUCCESS'
)
{
this
.
formData
=
res
.
data
;
this
.
$api
.
common
.
fetchSupplyById
(
this
.
queryParams
.
id
).
then
(({
data
,
code
})
=>
{
if
(
code
===
'SUCCESS'
)
{
this
.
areaInfo
=
[{
areaCode
:
data
.
areaCode
,
areaName
:
data
.
areaName
}]
const
{
areaCode
,
...
others
}
=
data
this
.
formData
=
{...
others
};
this
.
formData
.
areaCode
=
[
areaCode
]
}
}).
catch
(()
=>
{
});
}
else
{
this
.
initLoadAreaData
()
}
},
methods
:
{
initLoadAreaData
()
{
this
.
areaInfo
=
[]
this
.
loadAreaData
([{
areaCode
:
0
}])
},
loadAreaData
(
selectedOptions
)
{
const
targetOption
=
selectedOptions
[
selectedOptions
.
length
-
1
];
targetOption
.
loading
=
true
;
this
.
$api
.
common
.
fetchAreaByCode
({
areaCode
:
targetOption
.
areaCode
}).
then
(({
data
=
[]})
=>
{
targetOption
.
loading
=
false
;
data
.
forEach
(
item
=>
{
item
[
'isLeaf'
]
=
false
})
if
(
targetOption
.
areaCode
==
0
)
{
this
.
areaInfo
=
[...
data
]
}
else
{
targetOption
.
children
=
[...
data
]
this
.
areaInfo
=
[...
this
.
areaInfo
]
}
console
.
log
(
this
.
areaInfo
)
})
},
// 弹窗确定按钮
submitForm
()
{
let
vm
=
this
;
this
.
$refs
.
formRef
.
validate
(
valid
=>
{
if
(
valid
)
{
vm
.
subLoad
=
true
const
{
areaCode
,
areaName
,
...
others
}
=
vm
.
formData
let
areaInfo
=
areaCode
[
areaCode
.
length
-
1
]
let
par
=
{
...
vm
.
formData
areaCode
:
areaInfo
,
...
others
};
if
(
this
.
queryParams
.
modeType
===
'add'
)
{
vm
.
$api
.
common
.
fetchAddSupply
(
par
).
then
(
res
=>
{
...
...
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