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
fe759723
Commit
fe759723
authored
Jun 11, 2025
by
罗成兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取用户信息
parent
5d2a9635
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
2083 additions
and
1948 deletions
+2083
-1948
canvas.vue
folacin-app/src/views/canvas/canvas.vue
+1
-1
index.vue
folacin-app/src/views/index/index.vue
+1
-1
receiveApply.vue
folacin-app/src/views/receiveApply/receiveApply.vue
+574
-489
.env.dev
folacin-pc/.env.dev
+2
-2
Home.vue
folacin-pc/src/views/Home.vue
+1
-1
addFolviteDistribution.vue
...folviteDistribution/components/addFolviteDistribution.vue
+828
-780
folviteDistributionDetail.vue
...viteDistribution/components/folviteDistributionDetail.vue
+187
-181
folviteDistribution.vue
...ndexComponent/folviteDistribution/folviteDistribution.vue
+482
-466
common.js
folacin-pc/src/views/utils/common.js
+7
-27
No files found.
folacin-app/src/views/canvas/canvas.vue
View file @
fe759723
...
...
@@ -6,7 +6,7 @@
</
template
>
</van-nav-bar>
<div
class=
"height_44"
></div>
<vue-esign
ref=
"esign"
:isCrop=
"false"
:width=
"400"
:height=
"
7
00"
/>
<vue-esign
ref=
"esign"
:isCrop=
"false"
:width=
"400"
:height=
"
6
00"
/>
<div
class=
"btn"
>
<div
class=
"btn_right"
@
click=
"handleReset"
>
<img
src=
"../../assets/images/abrase.png"
alt=
""
>
...
...
folacin-app/src/views/index/index.vue
View file @
fe759723
...
...
@@ -31,7 +31,7 @@ export default {
scrollPosition
:
0
,
userInfo
:
{
account
:
null
,
token
:
"
52d30e396dff44eca2f51f614e42a8c0
"
,
token
:
"
44c1ef4e-de9e-4d32-9af4-3c0196e1ec83
"
,
userId
:
null
,
residentId
:
null
,
nickName
:
null
,
...
...
folacin-app/src/views/receiveApply/receiveApply.vue
View file @
fe759723
<
template
>
<div
class=
"receiveApply"
>
<!-- 头部 -->
<van-nav-bar
fixed
title=
"叶酸领取申请"
>
<template
#
left
>
<img
src=
"../../assets/images/back.png"
alt=
""
@
click=
"goBack"
/>
</
template
>
</van-nav-bar>
<!-- 警告提示部分 -->
<div
class=
"warning"
>
<img
src=
"../../assets/images/warning.png"
alt=
""
/>
<span>
请完整准确填写下列内容,所有内容只用于本次领取申请
</span>
</div>
<!-- 表单部分 -->
<div
class=
"form_block"
>
<div
class=
"item_box"
>
<p
style=
"font-size: 15px"
><span>
*
</span>
申领单位:{{ applyUnitInfo.unitName }}
</p>
</div>
<div
class=
"title_info"
>
<div
class=
"line"
></div>
<div
class=
"title"
>
女方信息
</div>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
v-model
.
trim=
"formData.womanName"
label=
"姓名"
placeholder=
"请输入女方姓名"
/>
</div>
<div
class=
"tags"
>
<div
class=
"receiveApply"
>
<!-- 头部 -->
<van-nav-bar
fixed
title=
"叶酸领取申请"
>
<template
#
left
>
<img
src=
"../../assets/images/back.png"
alt=
""
@
click=
"goBack"
/>
</
template
>
</van-nav-bar>
<!-- 警告提示部分 -->
<div
class=
"warning"
>
<img
src=
"../../assets/images/warning.png"
alt=
""
/>
<span>
请完整准确填写下列内容,所有内容只用于本次领取申请
</span>
</div>
<!-- 表单部分 -->
<div
class=
"form_block"
>
<div
class=
"item_box"
>
<p
style=
"font-size: 15px"
><span>
*
</span>
申领单位:{{ applyUnitInfo.unitName }}
</p>
</div>
<div
class=
"title_info"
>
<div
class=
"line"
></div>
<div
class=
"title"
>
女方信息
</div>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
v-model
.
trim=
"formData.womanName"
label=
"姓名"
placeholder=
"请输入女方姓名"
/>
</div>
<div
class=
"tags"
>
<span>
<span
class=
"sign"
>
*
</span>
<span>
证件类型
</span>
</span>
<div>
<van-tag
plain
@
click=
"hanleTags1(1)"
:class=
"formData.womenCertificateType === 1 ? 'active' : ''"
>
身份证
</van-tag>
<van-tag
plain
@
click=
"hanleTags1(2)"
:class=
"formData.womenCertificateType === 2 ? 'active' : ''"
>
护照
</van-tag>
<van-tag
plain
@
click=
"hanleTags1(3)"
:class=
"formData.womenCertificateType === 3 ? 'active' : ''"
>
无证件
</van-tag>
</div>
</div>
<div
class=
"item_box"
v-if=
"formData.womenCertificateType!=3"
>
<span>
*
</span>
<van-field
v-model
.
trim=
"formData.womenIdCard"
label=
"证件号码"
placeholder=
"请输入证件号码"
@
change=
"womenIdCardChange"
/>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
v-model=
"formData.birthDate"
label=
"出生日期"
placeholder=
"出生日期"
disabled
@
click=
"birthDateShow=true"
/>
<van-popup
v-model=
"birthDateShow"
position=
"bottom"
>
<van-datetime-picker
type=
"date"
v-model=
"formData.birthDateObj"
title=
"请选择出生日期"
@
confirm=
"birthDateConfirm"
@
cancel=
"birthDateShow = false"
:min-date=
"minDate"
:max-date=
"maxDate"
/>
</van-popup>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
type=
"number"
v-model
.
trim=
"formData.height"
@
blur=
"onBlur(1,formData.height)"
label=
"身高(cm)"
placeholder=
"请输入身高,范围100cm-200cm"
/>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
type=
"number"
v-model
.
trim
.
toFixed
(
2
)="
formData
.
weight
"
@
blur=
"onBlur(2,formData.weight)"
label=
"体重(kg)"
placeholder=
"请输入体重,1000以内数值"
/>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
type=
"number"
v-model
.
trim
.
toFixed
(
2
)="
formData
.
bmi
"
disabled
label=
"BMI"
/>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
type=
"number"
v-model=
"formData.provideNumber"
label=
"领取数量(瓶)"
placeholder=
"请输入领取数量,1-999之间"
/>
</div>
<div
class=
"split"
></div>
<div
class=
"title_info"
>
<div
class=
"line"
></div>
<div
class=
"title"
>
其他信息
</div>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
type=
"number"
v-model
.
trim=
"formData.telephone"
label=
"联系电话"
placeholder=
"请输入联系电话"
/>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
is-link
readonly
label=
"现住地址"
placeholder=
"点击选择"
@
click=
"showPopup = true"
/>
</div>
<div
class=
"item_box"
style=
"font-size: 14px;margin-left: 20px"
@
click=
"showPopup = true"
>
{{ formData.presentName }}
</div>
<van-popup
v-model=
"showPopup"
position=
"bottom"
round
>
<!-- <van-area v-model="formData.presentCode" title="地区" :area-list="areaList" @confirm="handleConfirm"-->
<!-- @cancel="showPopup = false"/>-->
<van-cascader
v-model=
"formData.presentCode"
title=
"请选择现住地址"
:options=
"optionsList"
@
close=
"showPopup = false"
@
change=
"areaChange"
@
finish=
"areaFinish"
/>
</van-popup>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
v-model
.
trim=
"formData.nowAddress"
label=
"详细地址"
placeholder=
"请输入详细地址"
/>
</div>
<div
class=
"item_box border_none"
>
<span>
*
</span>
<van-field
is-link
readonly
label=
"签名知情同意书"
placeholder=
"去签名"
@
click=
"handleRouter"
v-model=
"formData.isSignedName"
/>
</div>
<div
class=
"split"
></div>
<div
class=
"submit_btn_block"
>
<van-button
@
click=
"handleSubmit"
>
提交申请
</van-button>
</div>
<div>
<van-tag
plain
@
click=
"hanleTags1(1)"
:class=
"formData.womenCertificateType === 1 ? 'active' : ''"
>
身份证
</van-tag>
<van-tag
plain
@
click=
"hanleTags1(2)"
:class=
"formData.womenCertificateType === 2 ? 'active' : ''"
>
护照
</van-tag>
<van-tag
plain
@
click=
"hanleTags1(3)"
:class=
"formData.womenCertificateType === 3 ? 'active' : ''"
>
无证件
</van-tag>
</div>
</div>
<div
class=
"item_box"
v-if=
"formData.womenCertificateType!=3"
>
<span>
*
</span>
<van-field
v-model
.
trim=
"formData.womenIdCard"
label=
"证件号码"
placeholder=
"请输入证件号码"
@
change=
"womenIdCardChange"
/>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
v-model=
"formData.birthDate"
label=
"出生日期"
placeholder=
"出生日期"
disabled
@
click=
"birthDateShow=true"
/>
<van-popup
v-model=
"birthDateShow"
position=
"bottom"
>
<van-datetime-picker
type=
"date"
v-model=
"formData.birthDateObj"
title=
"请选择出生日期"
@
confirm=
"birthDateConfirm"
@
cancel=
"birthDateShow = false"
:min-date=
"minDate"
:max-date=
"maxDate"
/>
</van-popup>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
type=
"number"
v-model
.
trim=
"formData.height"
@
blur=
"onBlur(1,formData.height)"
label=
"身高(cm)"
placeholder=
"请输入身高,范围100cm-200cm"
/>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
type=
"number"
v-model
.
trim
.
toFixed
(
2
)="
formData
.
weight
"
@
blur=
"onBlur(2,formData.weight)"
label=
"体重(kg)"
placeholder=
"请输入体重,1000以内数值"
/>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
type=
"number"
v-model
.
trim
.
toFixed
(
2
)="
formData
.
bmi
"
disabled
label=
"BMI"
/>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
type=
"number"
v-model=
"formData.provideNumber"
label=
"领取数量(瓶)"
placeholder=
"请输入领取数量,1-999之间"
/>
</div>
<div
class=
"split"
></div>
<div
class=
"title_info"
>
<div
class=
"line"
></div>
<div
class=
"title"
>
其他信息
</div>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
type=
"number"
v-model
.
trim=
"formData.telephone"
label=
"联系电话"
placeholder=
"请输入联系电话"
/>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
is-link
readonly
label=
"户籍地址"
placeholder=
"点击选择"
@
click=
"showPopup1 = true"
/>
</div>
<div
class=
"item_box"
style=
"font-size: 14px;margin-left: 20px"
@
click=
"showPopup1 = true"
>
{{ formData.registeredCodeName }}
</div>
<van-popup
v-model=
"showPopup1"
position=
"bottom"
round
>
<van-cascader
v-model=
"formData.registeredCode"
title=
"请选择户籍地址"
:options=
"optionsList1"
@
close=
"showPopup1 = false"
@
change=
"(val)=>{areaChange(val,'registeredCode')}"
@
finish=
"(val)=>{areaFinish(val,'registeredCode')}"
/>
</van-popup>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
v-model
.
trim=
"formData.permanentAddress"
label=
"户籍详细地址"
placeholder=
"请输入详细地址"
/>
</div>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
is-link
readonly
label=
"现住地址"
placeholder=
"点击选择"
@
click=
"showPopup = true"
/>
</div>
<div
class=
"item_box"
style=
"font-size: 14px;margin-left: 20px"
@
click=
"showPopup = true"
>
{{ formData.presentCodeName }}
</div>
<van-popup
v-model=
"showPopup"
position=
"bottom"
round
>
<van-cascader
v-model=
"formData.presentCode"
title=
"请选择现住地址"
:options=
"optionsList"
@
close=
"showPopup = false"
@
change=
"(val)=>{areaChange(val,'presentCode')}"
@
finish=
"(val)=>{areaFinish(val,'presentCode')}"
/>
</van-popup>
<div
class=
"item_box"
>
<span>
*
</span>
<van-field
v-model
.
trim=
"formData.nowAddress"
label=
"现住详细地址"
placeholder=
"请输入详细地址"
/>
</div>
<div
class=
"item_box border_none"
>
<span>
*
</span>
<van-field
is-link
readonly
label=
"签名知情同意书"
placeholder=
"去签名"
@
click=
"handleRouter"
v-model=
"formData.isSignedName"
/>
</div>
<div
class=
"split"
></div>
<div
class=
"submit_btn_block"
>
<van-button
@
click=
"handleSubmit"
>
提交申请
</van-button>
</div>
</div>
</div>
</template>
<
script
>
import
{
isEmpty
,
validateCard
,
validatePhone
,
getDateStr
}
from
'../../utils/common'
...
...
@@ -144,385 +171,443 @@ import {Dialog} from 'vant'
import
{
addReceiveApply
,
getChildAreaByParentCode
}
from
'@/axios/api'
export
default
{
data
()
{
return
{
// 表单信息
formData
:
{
birthDate
:
undefined
,
womanName
:
""
,
womenCertificateType
:
1
,
presentName
:
undefined
,
height
:
undefined
,
weight
:
undefined
,
bmi
:
undefined
,
question
:
''
,
telephone
:
''
,
recommendEat
:
""
,
birthDateObj
:
new
Date
(),
presentCode
:
''
,
womenIdCard
:
''
,
nowAddress
:
''
,
provideNumber
:
undefined
},
optionsList
:
[],
showPopup
:
false
,
scrollPosition
:
0
,
applyUnitInfo
:
{
unitName
:
""
},
birthDateShow
:
false
,
minDate
:
new
Date
(
1950
,
0
,
1
),
maxDate
:
new
Date
(),
indexArr
:
[],
}
},
created
()
{
this
.
getChildArea
(
0
,
0
);
data
()
{
return
{
// 表单信息
formData
:
{
birthDate
:
undefined
,
womanName
:
""
,
womenCertificateType
:
1
,
presentCodeName
:
undefined
,
registeredCodeName
:
undefined
,
height
:
undefined
,
weight
:
undefined
,
bmi
:
undefined
,
question
:
''
,
telephone
:
''
,
recommendEat
:
""
,
birthDateObj
:
new
Date
(),
registeredCode
:
''
,
permanentAddress
:
''
,
presentCode
:
''
,
womenIdCard
:
''
,
nowAddress
:
''
,
provideNumber
:
undefined
},
optionsList
:
[],
optionsList1
:
[],
showPopup
:
false
,
showPopup1
:
false
,
scrollPosition
:
0
,
applyUnitInfo
:
{
unitName
:
""
},
birthDateShow
:
false
,
minDate
:
new
Date
(
1950
,
0
,
1
),
maxDate
:
new
Date
(),
indexArr
:
[],
indexArr1
:
[],
}
},
created
()
{
this
.
getChildArea
(
0
,
0
,
'registeredCode'
);
this
.
getChildArea
(
0
,
0
,
'presentCode'
);
},
watch
:
{
'formData.height'
:
{
deep
:
true
,
handler
:
function
(
newV
,
oldV
)
{
this
.
heightWeightChange
();
}
},
watch
:
{
'formData.height'
:
{
deep
:
true
,
handler
:
function
(
newV
,
oldV
)
{
this
.
heightWeightChange
();
}
},
'formData.weight'
:
{
deep
:
true
,
handler
:
function
(
newValue
,
oldValue
)
{
this
.
heightWeightChange
();
'formData.weight'
:
{
deep
:
true
,
handler
:
function
(
newValue
,
oldValue
)
{
this
.
heightWeightChange
();
}
}
},
activated
()
{
let
applyUnitInfo
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'applyUnitInfo'
));
if
(
applyUnitInfo
)
{
this
.
applyUnitInfo
=
applyUnitInfo
;
}
if
(
!
this
.
$route
.
meta
.
isBack
)
{
sessionStorage
.
removeItem
(
'esignImg'
);
this
.
getUserInfo
();
}
else
{
this
.
getIsEsign
();
window
.
scrollTo
(
0
,
this
.
scrollPosition
);
}
},
methods
:
{
getChildArea
(
areaCode
,
areaLevel
,
filed
)
{
getChildAreaByParentCode
(
areaCode
).
then
(
res
=>
{
if
(
res
.
code
===
'SUCCESS'
)
{
let
optionsList
=
[];
let
areaList
=
res
.
data
;
if
(
areaList
!=
null
)
{
let
index
=
0
;
let
length
=
0
;
if
(
filed
==
'presentCode'
)
{
length
=
this
.
indexArr
.
length
;
}
else
{
length
=
this
.
indexArr1
.
length
;
}
}
},
activated
()
{
let
applyUnitInfo
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'applyUnitInfo'
));
if
(
applyUnitInfo
)
{
this
.
applyUnitInfo
=
applyUnitInfo
;
}
if
(
!
this
.
$route
.
meta
.
isBack
)
{
sessionStorage
.
removeItem
(
'esignImg'
);
this
.
getUserInfo
();
}
else
{
this
.
getIsEsign
();
window
.
scrollTo
(
0
,
this
.
scrollPosition
);
}
},
methods
:
{
getChildArea
(
areaCode
,
areaLevel
)
{
getChildAreaByParentCode
(
areaCode
).
then
(
res
=>
{
if
(
res
.
code
===
'SUCCESS'
)
{
let
optionsList
=
[];
let
areaList
=
res
.
data
;
if
(
areaList
!=
null
)
{
let
index
=
0
;
let
length
=
this
.
indexArr
.
length
;
areaList
.
forEach
(
area
=>
{
let
item
=
{
text
:
area
.
areaName
,
value
:
area
.
areaCode
,
index
:
index
,
areaLevel
:
area
.
areaLevel
,
children
:
[]
};
if
(
length
==
4
)
{
delete
item
.
children
;
}
optionsList
.
push
(
item
)
index
++
;
})
if
(
areaLevel
==
0
)
{
this
.
optionsList
=
optionsList
;
}
else
{
if
(
this
.
indexArr
.
length
==
1
)
{
this
.
optionsList
[
this
.
indexArr
[
0
]].
children
=
optionsList
;
}
if
(
this
.
indexArr
.
length
==
2
)
{
this
.
optionsList
[
this
.
indexArr
[
0
]].
children
[
this
.
indexArr
[
1
]].
children
=
optionsList
;
}
if
(
this
.
indexArr
.
length
==
3
)
{
this
.
optionsList
[
this
.
indexArr
[
0
]].
children
[
this
.
indexArr
[
1
]].
children
[
this
.
indexArr
[
2
]].
children
=
optionsList
;
}
if
(
this
.
indexArr
.
length
==
4
)
{
this
.
optionsList
[
this
.
indexArr
[
0
]].
children
[
this
.
indexArr
[
1
]].
children
[
this
.
indexArr
[
2
]].
children
[
this
.
indexArr
[
3
]].
children
=
optionsList
;
}
}
}
}
}).
catch
(
res
=>
{
areaList
.
forEach
(
area
=>
{
let
item
=
{
text
:
area
.
areaName
,
value
:
area
.
areaCode
,
index
:
index
,
areaLevel
:
area
.
areaLevel
,
children
:
[]
};
if
(
length
==
4
)
{
delete
item
.
children
;
}
optionsList
.
push
(
item
)
index
++
;
})
},
areaChange
(
val
)
{
this
.
formData
.
presentName
=
val
.
selectedOptions
.
map
((
item
)
=>
item
.
text
).
join
(
'/'
);
let
indexArr
=
[];
val
.
selectedOptions
.
forEach
(
item
=>
{
indexArr
.
push
(
item
.
index
);
});
if
(
indexArr
.
length
==
5
)
{
this
.
showPopup
=
false
;
return
;
}
console
.
log
(
this
.
formData
)
this
.
indexArr
=
indexArr
;
this
.
getChildArea
(
val
.
value
,
val
.
areaLevel
);
}
,
areaFinish
(
val
)
{
this
.
formData
.
presentName
=
val
.
selectedOptions
.
map
((
item
)
=>
item
.
text
).
join
(
'/'
);
}
,
//计算BMI值
heightWeightChange
()
{
let
height
=
null
,
weight
=
null
;
if
(
this
.
formData
.
height
)
{
height
=
Number
(
this
.
formData
.
height
);
}
if
(
this
.
formData
.
weight
)
{
weight
=
Number
(
this
.
formData
.
weight
);
}
if
(
height
!=
null
&&
height
!=
0
)
{
if
(
weight
!=
null
)
{
this
.
formData
.
bmi
=
(
weight
/
((
height
/
100
)
*
(
height
/
100
))).
toFixed
(
2
);
if
(
filed
==
'presentCode'
)
{
if
(
areaLevel
==
0
)
{
this
.
optionsList
=
optionsList
;
}
else
{
if
(
this
.
indexArr
.
length
==
1
)
{
this
.
optionsList
[
this
.
indexArr
[
0
]].
children
=
optionsList
;
}
}
}
,
onBlur
(
type
,
value
)
{
if
(
value
)
{
if
(
type
==
1
)
{
this
.
formData
.
height
=
Number
(
value
).
toFixed
(
2
);
}
else
{
this
.
formData
.
weight
=
Number
(
value
).
toFixed
(
2
);
if
(
this
.
indexArr
.
length
==
2
)
{
this
.
optionsList
[
this
.
indexArr
[
0
]].
children
[
this
.
indexArr
[
1
]].
children
=
optionsList
;
}
}
}
,
womenIdCardChange
()
{
if
(
!
this
.
formData
.
womenIdCard
)
{
return
}
let
womenIdCard
=
this
.
formData
.
womenIdCard
.
trim
();
this
.
formData
.
womenIdCard
=
womenIdCard
;
if
(
this
.
formData
.
womenCertificateType
==
1
)
{
let
length
=
womenIdCard
.
length
;
if
(
length
==
15
|
length
==
18
)
{
let
year
=
this
.
formData
.
womenIdCard
.
substring
(
6
,
10
);
let
moth
=
this
.
formData
.
womenIdCard
.
substring
(
10
,
12
);
let
day
=
this
.
formData
.
womenIdCard
.
substring
(
12
,
14
);
this
.
formData
.
birthDate
=
year
+
"-"
+
moth
+
"-"
+
day
;
this
.
formData
.
birthDateObj
=
new
Date
(
Number
(
year
),
Number
(
moth
)
-
1
,
Number
(
day
));
if
(
this
.
indexArr
.
length
==
3
)
{
this
.
optionsList
[
this
.
indexArr
[
0
]].
children
[
this
.
indexArr
[
1
]].
children
[
this
.
indexArr
[
2
]].
children
=
optionsList
;
}
if
(
this
.
indexArr
.
length
==
4
)
{
this
.
optionsList
[
this
.
indexArr
[
0
]].
children
[
this
.
indexArr
[
1
]].
children
[
this
.
indexArr
[
2
]].
children
[
this
.
indexArr
[
3
]].
children
=
optionsList
;
}
}
}
else
{
if
(
areaLevel
==
0
)
{
this
.
optionsList1
=
optionsList
;
}
else
{
if
(
this
.
indexArr1
.
length
==
1
)
{
this
.
optionsList1
[
this
.
indexArr1
[
0
]].
children
=
optionsList
;
}
if
(
this
.
indexArr1
.
length
==
2
)
{
this
.
optionsList1
[
this
.
indexArr1
[
0
]].
children
[
this
.
indexArr1
[
1
]].
children
=
optionsList
;
}
if
(
this
.
indexArr1
.
length
==
3
)
{
this
.
optionsList1
[
this
.
indexArr1
[
0
]].
children
[
this
.
indexArr1
[
1
]].
children
[
this
.
indexArr1
[
2
]].
children
=
optionsList
;
}
if
(
this
.
indexArr1
.
length
==
4
)
{
this
.
optionsList1
[
this
.
indexArr1
[
0
]].
children
[
this
.
indexArr1
[
1
]].
children
[
this
.
indexArr1
[
2
]].
children
[
this
.
indexArr1
[
3
]].
children
=
optionsList
;
}
}
}
}
}
,
birthDateConfirm
(
date
)
{
this
.
birthDateShow
=
false
;
this
.
formData
.
birthDate
=
getDateStr
(
date
);
}).
catch
(
res
=>
{
})
},
areaChange
(
val
,
filed
)
{
this
.
formData
[
filed
+
"Name"
]
=
val
.
selectedOptions
.
map
((
item
)
=>
item
.
text
).
join
(
'/'
);
let
indexArr
=
[];
val
.
selectedOptions
.
forEach
(
item
=>
{
indexArr
.
push
(
item
.
index
);
});
if
(
indexArr
.
length
==
5
)
{
if
(
filed
==
'presentCode'
)
{
this
.
showPopup
=
false
;
}
else
{
this
.
showPopup1
=
false
;
}
,
// 返回
goBack
()
{
this
.
$router
.
push
(
'provideUnit'
);
return
;
}
if
(
filed
==
'presentCode'
)
{
this
.
indexArr
=
indexArr
;
}
else
{
this
.
indexArr1
=
indexArr
;
}
this
.
getChildArea
(
val
.
value
,
val
.
areaLevel
,
filed
);
}
,
areaFinish
(
val
,
field
)
{
this
.
formData
[
field
+
"Name"
]
=
val
.
selectedOptions
.
map
((
item
)
=>
item
.
text
).
join
(
'/'
);
},
//计算BMI值
heightWeightChange
()
{
let
height
=
null
,
weight
=
null
;
if
(
this
.
formData
.
height
)
{
height
=
Number
(
this
.
formData
.
height
);
}
if
(
this
.
formData
.
weight
)
{
weight
=
Number
(
this
.
formData
.
weight
);
}
if
(
height
!=
null
&&
height
!=
0
)
{
if
(
weight
!=
null
)
{
this
.
formData
.
bmi
=
(
weight
/
((
height
/
100
)
*
(
height
/
100
))).
toFixed
(
2
);
}
,
// 选择tags标签
hanleTags1
(
val
)
{
this
.
formData
.
womenCertificateType
=
val
;
},
// 地区选择确定按钮
handleConfirm
(
val
)
{
this
.
showPopup
=
false
;
this
.
formData
.
presentName
=
val
.
map
((
item
)
=>
item
.
name
).
join
(
'/'
);
this
.
formData
.
presentCode
=
val
[
2
].
code
;
}
}
,
onBlur
(
type
,
value
)
{
if
(
value
)
{
if
(
type
==
1
)
{
this
.
formData
.
height
=
Number
(
value
).
toFixed
(
2
);
}
else
{
this
.
formData
.
weight
=
Number
(
value
).
toFixed
(
2
);
}
,
// 签名知情同意书
handleRouter
()
{
this
.
$router
.
push
(
'informedConsentForm'
);
}
}
,
womenIdCardChange
()
{
if
(
!
this
.
formData
.
womenIdCard
)
{
return
}
let
womenIdCard
=
this
.
formData
.
womenIdCard
.
trim
();
this
.
formData
.
womenIdCard
=
womenIdCard
;
if
(
this
.
formData
.
womenCertificateType
==
1
)
{
let
length
=
womenIdCard
.
length
;
if
(
length
==
15
|
length
==
18
)
{
let
year
=
this
.
formData
.
womenIdCard
.
substring
(
6
,
10
);
let
moth
=
this
.
formData
.
womenIdCard
.
substring
(
10
,
12
);
let
day
=
this
.
formData
.
womenIdCard
.
substring
(
12
,
14
);
this
.
formData
.
birthDate
=
year
+
"-"
+
moth
+
"-"
+
day
;
this
.
formData
.
birthDateObj
=
new
Date
(
Number
(
year
),
Number
(
moth
)
-
1
,
Number
(
day
));
}
,
// 提交申请
handleSubmit
()
{
if
(
isEmpty
(
this
.
formData
.
womanName
))
{
this
.
$toast
.
tips
(
'请输入女方姓名'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
womenCertificateType
))
{
this
.
$toast
.
tips
(
'请选择女方证件类型'
);
return
false
;
}
else
{
if
(
this
.
formData
.
womenCertificateType
!=
3
)
{
if
(
isEmpty
(
this
.
formData
.
womenIdCard
))
{
this
.
$toast
.
tips
(
'请输入女方证件号码'
);
return
false
;
}
else
{
if
(
validateCard
(
this
.
formData
.
womenCertificateType
,
this
.
formData
.
womenIdCard
))
{
this
.
$toast
.
tips
(
'请输入正确的证件号码'
);
return
false
;
}
if
(
this
.
formData
.
womenIdCard
.
length
>
50
)
{
this
.
$toast
.
tips
(
'证件号码不得超过50位'
);
return
false
;
}
}
}
else
{
this
.
formData
.
womenIdCard
=
null
;
}
}
if
(
isEmpty
(
this
.
formData
.
height
)
||
this
.
formData
.
height
<
100
||
this
.
formData
.
height
>
200
)
{
this
.
$toast
.
tips
(
'请输入身高,范围100cm-200cm'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
weight
)
||
this
.
formData
.
weight
<
0
||
this
.
formData
.
weight
>
1000
)
{
this
.
$toast
.
tips
(
'请输入体重,1000以内的数值'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
provideNumber
))
{
this
.
$toast
.
tips
(
'请输入领取数量'
);
return
false
;
}
if
(
this
.
formData
.
provideNumber
<=
0
||
this
.
formData
.
provideNumber
>
999
)
{
this
.
$toast
.
tips
(
'领取数量在1-999之间'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
birthDate
))
{
this
.
$toast
.
tips
(
'请输入出生日期'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
telephone
))
{
this
.
$toast
.
tips
(
'请输入联系电话'
);
return
false
;
}
if
(
validatePhone
(
this
.
formData
.
telephone
))
{
this
.
$toast
.
tips
(
'请输入正确的电话号码'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
presentCode
))
{
this
.
$toast
.
tips
(
'请选择现住地址'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
nowAddress
))
{
this
.
$toast
.
tips
(
'请输入详细地址'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
isSignedName
))
{
this
.
$toast
.
tips
(
'请先签订知情同意书'
);
return
false
;
}
if
(
this
.
formData
.
womanName
.
length
>
15
)
{
this
.
$toast
.
tips
(
'姓名不得超过15个字'
);
return
false
;
}
}
,
birthDateConfirm
(
date
)
{
this
.
birthDateShow
=
false
;
this
.
formData
.
birthDate
=
getDateStr
(
date
);
}
,
// 返回
goBack
()
{
this
.
$router
.
push
(
'provideUnit'
);
}
,
// 选择tags标签
hanleTags1
(
val
)
{
this
.
formData
.
womenCertificateType
=
val
;
},
// 地区选择确定按钮
handleConfirm
(
val
)
{
this
.
showPopup
=
false
;
this
.
formData
.
presentCodeName
=
val
.
map
((
item
)
=>
item
.
name
).
join
(
'/'
);
this
.
formData
.
presentCode
=
val
[
2
].
code
;
}
,
// 签名知情同意书
handleRouter
()
{
this
.
$router
.
push
(
'informedConsentForm'
);
}
,
// 提交申请
handleSubmit
()
{
if
(
isEmpty
(
this
.
formData
.
womanName
))
{
this
.
$toast
.
tips
(
'请输入女方姓名'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
womenCertificateType
))
{
this
.
$toast
.
tips
(
'请选择女方证件类型'
);
return
false
;
}
else
{
if
(
this
.
formData
.
womenCertificateType
!=
3
)
{
if
(
isEmpty
(
this
.
formData
.
womenIdCard
))
{
this
.
$toast
.
tips
(
'请输入女方证件号码'
);
return
false
;
}
else
{
if
(
validateCard
(
this
.
formData
.
womenCertificateType
,
this
.
formData
.
womenIdCard
))
{
this
.
$toast
.
tips
(
'请输入正确的证件号码'
);
return
false
;
}
if
(
this
.
formData
.
nowAddress
.
length
>
10
0
)
{
this
.
$toast
.
tips
(
'详细地址不得超过100个字
'
);
return
false
;
if
(
this
.
formData
.
womenIdCard
.
length
>
5
0
)
{
this
.
$toast
.
tips
(
'证件号码不得超过50位
'
);
return
false
;
}
Dialog
.
confirm
({
title
:
'提示'
,
message
:
'确定要提交该申请么?'
,
}).
then
(()
=>
{
let
createUnitId
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'applyUnitInfo'
)).
unitId
;
let
userInfo
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfo'
));
let
applySignId
=
sessionStorage
.
getItem
(
'esignImgId'
);
let
params
=
{
nowAddress
:
this
.
formData
.
nowAddress
,
telephone
:
this
.
formData
.
telephone
,
womenIdCard
:
this
.
formData
.
womenIdCard
,
womanName
:
this
.
formData
.
womanName
,
residentId
:
userInfo
.
userId
,
residentMobile
:
userInfo
.
account
,
createUnitId
:
createUnitId
,
birthDate
:
this
.
formData
.
birthDate
,
height
:
this
.
formData
.
height
,
weight
:
this
.
formData
.
weight
,
womenCertificateType
:
this
.
formData
.
womenCertificateType
,
presentCode
:
this
.
formData
.
presentCode
,
applySignId
:
applySignId
,
question
:
this
.
formData
.
question
,
recommendEat
:
this
.
formData
.
recommendEat
,
provideNumber
:
this
.
formData
.
provideNumber
,
bmi
:
0
,
};
let
height
=
null
,
weight
=
null
;
if
(
this
.
formData
.
height
)
{
height
=
Number
(
this
.
formData
.
height
);
}
if
(
this
.
formData
.
weight
)
{
weight
=
Number
(
this
.
formData
.
weight
);
}
if
(
weight
!=
0
)
{
params
.
bmi
=
(
weight
/
((
height
/
100
)
*
(
height
/
100
))).
toFixed
(
2
);
}
if
(
!
params
.
question
&&
this
.
formData
.
bmi
<
28
)
{
params
.
recommendEat
=
"1颗/天(0.4mg/天)"
;
}
this
.
$toast
.
submit
();
addReceiveApply
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
'SUCCESS'
)
{
this
.
$toast
.
success
(
'操作成功'
);
this
.
$router
.
push
(
'receiveDetail'
);
}
}).
catch
(()
=>
{
this
.
$toast
.
close
();
});
}).
catch
(()
=>
{
return
false
;
});
}
}
else
{
this
.
formData
.
womenIdCard
=
null
;
}
,
getIsEsign
()
{
let
imgUrl
=
window
.
sessionStorage
.
getItem
(
'esignImg'
);
if
(
isEmpty
(
imgUrl
))
{
this
.
formData
.
isSignedName
=
''
;
}
else
{
this
.
formData
.
isSignedName
=
'已签名'
;
this
.
formData
.
isSigned
=
1
;
this
.
$forceUpdate
();
}
}
if
(
isEmpty
(
this
.
formData
.
height
)
||
this
.
formData
.
height
<
100
||
this
.
formData
.
height
>
200
)
{
this
.
$toast
.
tips
(
'请输入身高,范围100cm-200cm'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
weight
)
||
this
.
formData
.
weight
<
0
||
this
.
formData
.
weight
>
1000
)
{
this
.
$toast
.
tips
(
'请输入体重,1000以内的数值'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
provideNumber
))
{
this
.
$toast
.
tips
(
'请输入领取数量'
);
return
false
;
}
if
(
this
.
formData
.
provideNumber
<=
0
||
this
.
formData
.
provideNumber
>
999
)
{
this
.
$toast
.
tips
(
'领取数量在1-999之间'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
birthDate
))
{
this
.
$toast
.
tips
(
'请输入出生日期'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
telephone
))
{
this
.
$toast
.
tips
(
'请输入联系电话'
);
return
false
;
}
if
(
validatePhone
(
this
.
formData
.
telephone
))
{
this
.
$toast
.
tips
(
'请输入正确的电话号码'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
registeredCode
))
{
this
.
$toast
.
tips
(
'请选择户籍地址'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
permanentAddress
))
{
this
.
$toast
.
tips
(
'请输入户籍详细地址'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
presentCode
))
{
this
.
$toast
.
tips
(
'请选择现住地址'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
nowAddress
))
{
this
.
$toast
.
tips
(
'请输入现住详细地址'
);
return
false
;
}
if
(
isEmpty
(
this
.
formData
.
isSignedName
))
{
this
.
$toast
.
tips
(
'请先签订知情同意书'
);
return
false
;
}
if
(
this
.
formData
.
womanName
.
length
>
15
)
{
this
.
$toast
.
tips
(
'姓名不得超过15个字'
);
return
false
;
}
if
(
this
.
formData
.
nowAddress
.
length
>
100
)
{
this
.
$toast
.
tips
(
'详细地址不得超过100个字'
);
return
false
;
}
Dialog
.
confirm
({
title
:
'提示'
,
message
:
'确定要提交该申请么?'
,
}).
then
(()
=>
{
let
createUnitId
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'applyUnitInfo'
)).
unitId
;
let
userInfo
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfo'
));
let
applySignId
=
sessionStorage
.
getItem
(
'esignImgId'
);
let
params
=
{
nowAddress
:
this
.
formData
.
nowAddress
,
telephone
:
this
.
formData
.
telephone
,
womenIdCard
:
this
.
formData
.
womenIdCard
,
womanName
:
this
.
formData
.
womanName
,
residentId
:
userInfo
.
userId
,
residentMobile
:
userInfo
.
account
,
createUnitId
:
createUnitId
,
birthDate
:
this
.
formData
.
birthDate
,
height
:
this
.
formData
.
height
,
weight
:
this
.
formData
.
weight
,
womenCertificateType
:
this
.
formData
.
womenCertificateType
,
presentCode
:
this
.
formData
.
presentCode
,
applySignId
:
applySignId
,
question
:
this
.
formData
.
question
,
recommendEat
:
this
.
formData
.
recommendEat
,
provideNumber
:
this
.
formData
.
provideNumber
,
bmi
:
0
,
registeredCode
:
this
.
formData
.
registeredCode
,
permanentAddress
:
this
.
formData
.
permanentAddress
,
};
let
height
=
null
,
weight
=
null
;
if
(
this
.
formData
.
height
)
{
height
=
Number
(
this
.
formData
.
height
);
}
,
getUserInfo
()
{
let
lastRecord
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"lastRecord"
));
if
(
!
lastRecord
)
{
return
;
}
let
{
question
,
recommendEat
,
presentCode
,
womenCertificateType
,
womanName
,
womenIdCard
,
birthDate
,
height
,
weight
,
bmi
,
telephone
,
nowAddress
,
provideNumber
,
presentCodeName
}
=
lastRecord
;
if
(
!
womenCertificateType
)
{
return
;
}
this
.
formData
.
question
=
question
;
this
.
formData
.
recommendEat
=
recommendEat
;
this
.
formData
.
womanName
=
womanName
;
this
.
formData
.
womenCertificateType
=
womenCertificateType
;
this
.
formData
.
womenIdCard
=
womenIdCard
;
this
.
formData
.
birthDate
=
birthDate
;
this
.
formData
.
height
=
height
;
this
.
formData
.
weight
=
weight
;
this
.
formData
.
bmi
=
bmi
;
this
.
formData
.
telephone
=
telephone
;
this
.
formData
.
nowAddress
=
nowAddress
;
this
.
formData
.
provideNumber
=
provideNumber
;
this
.
formData
.
presentName
=
presentCodeName
;
this
.
formData
.
presentCode
=
presentCode
;
if
(
!
presentCodeName
)
{
this
.
formData
.
presentCode
=
null
;
}
if
(
this
.
formData
.
birthDate
)
{
let
dateArr
=
this
.
formData
.
birthDate
.
split
(
"-"
);
this
.
formData
.
birthDateObj
=
new
Date
(
Number
(
dateArr
[
0
]),
Number
(
dateArr
[
1
])
-
1
,
Number
(
dateArr
[
2
]));
}
if
(
this
.
formData
.
weight
)
{
weight
=
Number
(
this
.
formData
.
weight
);
}
,
},
beforeRouteEnter
(
to
,
from
,
next
)
{
if
(
from
.
name
===
'informedConsentForm'
)
{
to
.
meta
.
isBack
=
true
;
}
else
{
to
.
meta
.
isBack
=
false
;
if
(
weight
!=
0
)
{
params
.
bmi
=
(
weight
/
((
height
/
100
)
*
(
height
/
100
))).
toFixed
(
2
);
}
if
(
!
params
.
question
&&
this
.
formData
.
bmi
<
28
)
{
params
.
recommendEat
=
"1颗/天(0.4mg/天)"
;
}
next
();
this
.
$toast
.
submit
();
addReceiveApply
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
'SUCCESS'
)
{
this
.
$toast
.
success
(
'操作成功'
);
this
.
$router
.
push
(
'receiveDetail'
);
}
}).
catch
(()
=>
{
this
.
$toast
.
close
();
});
}).
catch
(()
=>
{
return
false
;
});
}
,
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
scrollPosition
=
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
;
next
();
getIsEsign
()
{
let
imgUrl
=
window
.
sessionStorage
.
getItem
(
'esignImg'
);
if
(
isEmpty
(
imgUrl
))
{
this
.
formData
.
isSignedName
=
''
;
}
else
{
this
.
formData
.
isSignedName
=
'已签名'
;
this
.
formData
.
isSigned
=
1
;
this
.
$forceUpdate
();
}
}
,
getUserInfo
()
{
let
lastRecord
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"lastRecord"
));
if
(
!
lastRecord
)
{
return
;
}
let
{
question
,
recommendEat
,
presentCode
,
womenCertificateType
,
womanName
,
womenIdCard
,
birthDate
,
height
,
weight
,
bmi
,
telephone
,
nowAddress
,
provideNumber
,
presentCodeName
,
registeredCodeName
,
registeredCode
,
permanentAddress
}
=
lastRecord
;
if
(
!
womenCertificateType
)
{
return
;
}
this
.
formData
.
question
=
question
;
this
.
formData
.
recommendEat
=
recommendEat
;
this
.
formData
.
womanName
=
womanName
;
this
.
formData
.
womenCertificateType
=
womenCertificateType
;
this
.
formData
.
womenIdCard
=
womenIdCard
;
this
.
formData
.
birthDate
=
birthDate
;
this
.
formData
.
height
=
height
;
this
.
formData
.
weight
=
weight
;
this
.
formData
.
bmi
=
bmi
;
this
.
formData
.
telephone
=
telephone
;
this
.
formData
.
nowAddress
=
nowAddress
;
this
.
formData
.
provideNumber
=
provideNumber
;
this
.
formData
.
presentCodeName
=
presentCodeName
;
this
.
formData
.
presentCode
=
presentCode
;
this
.
formData
.
registeredCode
=
registeredCode
;
this
.
formData
.
registeredCodeName
=
registeredCodeName
;
this
.
formData
.
permanentAddress
=
permanentAddress
;
if
(
!
presentCodeName
)
{
this
.
formData
.
presentCode
=
null
;
}
if
(
!
registeredCodeName
)
{
this
.
formData
.
registeredCode
=
null
;
}
if
(
this
.
formData
.
birthDate
)
{
let
dateArr
=
this
.
formData
.
birthDate
.
split
(
"-"
);
this
.
formData
.
birthDateObj
=
new
Date
(
Number
(
dateArr
[
0
]),
Number
(
dateArr
[
1
])
-
1
,
Number
(
dateArr
[
2
]));
}
}
,
},
beforeRouteEnter
(
to
,
from
,
next
)
{
if
(
from
.
name
===
'informedConsentForm'
)
{
to
.
meta
.
isBack
=
true
;
}
else
{
to
.
meta
.
isBack
=
false
;
}
next
();
}
,
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
scrollPosition
=
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
;
next
();
}
,
}
</
script
>
<
style
lang=
"less"
scoped
>
...
...
folacin-pc/.env.dev
View file @
fe759723
...
...
@@ -3,8 +3,8 @@ NODE_ENV = dev
VUE_APP_BASE_URL2222= https://beta-ysservice.yiboshi.com
VUE_APP_BASE_URL22 = https://ys-service.yiboshi.com
VUE_APP_BASE_URL4 = http://59.230.237.90:8115
VUE_APP_BASE_URL
2
= http://127.0.0.1:8083
VUE_APP_BASE_URL = https://beta-cqbp-yesuan.yiboshi.com:86/service-api
VUE_APP_BASE_URL = http://127.0.0.1:8083
VUE_APP_BASE_URL
33
= https://beta-cqbp-yesuan.yiboshi.com:86/service-api
VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com
VUE_APP_KEY_WORD = 'XwKsGlMcdPMEhR1B'
...
...
folacin-pc/src/views/Home.vue
View file @
fe759723
...
...
@@ -47,7 +47,7 @@ export default {
},
created
()
{
//获取妇幼权限和登录基本信息
let
cookieToken
=
"
dd21a4cd-844a-47df-8627-d0dff82482c1
"
;
let
cookieToken
=
"
44c1ef4e-de9e-4d32-9af4-3c0196e1ec83
"
;
if
(
process
.
env
.
NODE_ENV
!=
"dev"
)
{
cookieToken
=
getCookie
(
'bGNnd3lwdF9hdA'
);
}
...
...
folacin-pc/src/views/indexComponent/folviteDistribution/components/addFolviteDistribution.vue
View file @
fe759723
<
template
>
<div>
<a-spin
tip=
"加载中..."
:spinning=
"spinning"
>
<a-card>
<div
style=
"font-size: 18px;font-weight: 600"
>
<span>
叶酸发放登记
</span>
</div>
<a-form-model
ref=
"formRef"
:model=
"formData"
:rules=
"formRules"
:labelCol=
"
{span: 6}"
:wrapperCol="{span: 16}">
<div
style=
"margin: 30px 0px"
>
<div
class=
"divider_my"
><span
class=
"midText"
>
居民信息
</span></div>
</div>
<div
style=
"clear: both"
></div>
<a-card
size=
"small"
:headStyle=
"
{background: '#FAFAFA'}">
<div
slot=
"title"
>
<img
class=
"title_img"
src=
"../../../../../static/images/user_info_index.png"
>
<span
class=
"title_font"
>
女方信息
</span>
</div>
<a-button
slot=
"extra"
class=
"ant-table-btn"
@
click=
"getWomenIdCardInfo"
>
身份证识别
</a-button>
<a-row
:gutter=
"16"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"姓名"
prop=
"womanName"
>
<a-input
v-toInputNum=
"
{num: 15}" @keyup.enter.native="nextFocus(1)" ref="input1"
placeholder="请输入姓名,最多可输入15个字"
:disabled="disabled"
v-model="formData.womanName">
</a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"证件类型"
prop=
"womenCertificateType"
>
<a-select
v-model=
"formData.womenCertificateType"
placeholder=
"请选择"
@
keyup
.
enter
.
native=
"nextFocus(2)"
ref=
"input2"
:disabled=
"disabled"
@
change=
"changeWomenCardType"
>
<a-select-option
v-for=
"item in certificateTypeList"
:key=
"item.enumValue"
:value=
"item.enumValue"
>
{{
item
.
enumName
}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<div>
<a-spin
tip=
"加载中..."
:spinning=
"spinning"
>
<a-card>
<div
style=
"font-size: 18px;font-weight: 600"
>
<span>
叶酸发放登记
</span>
</div>
<a-form-model
ref=
"formRef"
:model=
"formData"
:rules=
"formRules"
:labelCol=
"
{span: 6}"
:wrapperCol="{span: 16}">
<div
style=
"margin: 30px 0px"
>
<div
class=
"divider_my"
><span
class=
"midText"
>
居民信息
</span></div>
</div>
<div
style=
"clear: both"
></div>
<a-card
size=
"small"
:headStyle=
"
{background: '#FAFAFA'}">
<div
slot=
"title"
>
<img
class=
"title_img"
src=
"../../../../../static/images/user_info_index.png"
>
<span
class=
"title_font"
>
女方信息
</span>
</div>
<a-button
slot=
"extra"
class=
"ant-table-btn"
@
click=
"getWomenIdCardInfo"
>
身份证识别
</a-button>
<a-row
:gutter=
"16"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"姓名"
prop=
"womanName"
>
<a-input
v-toInputNum=
"
{num: 15}" @keyup.enter.native="nextFocus(1)" ref="input1"
placeholder="请输入姓名,最多可输入15个字"
:disabled="disabled"
v-model="formData.womanName">
</a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"证件类型"
prop=
"womenCertificateType"
>
<a-select
v-model=
"formData.womenCertificateType"
placeholder=
"请选择"
@
keyup
.
enter
.
native=
"nextFocus(2)"
ref=
"input2"
:disabled=
"disabled"
@
change=
"changeWomenCardType"
>
<a-select-option
v-for=
"item in certificateTypeList"
:key=
"item.enumValue"
:value=
"item.enumValue"
>
{{
item
.
enumName
}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
v-if=
"formData.womenCertificateType!=3"
>
<a-form-model-item
label=
"证件号码"
prop=
"womenIdCard"
>
<a-input
placeholder=
"请输入证件号码"
@
blur=
"womenIdCardChange"
style=
"width: 100%"
@
keyup
.
enter
.
native=
"nextFocus(3)"
ref=
"input3"
v-model=
"formData.womenIdCard"
:disabled=
"disabled"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"出生日期"
prop=
"birthDate"
>
<a-date-picker
style=
"width: 100%"
placeholder=
"请输入出生日期"
format=
"YYYY-MM-DD"
ref=
"input4"
@
change=
"nextFocus(4)"
value-format=
"yyyy-MM-DD"
:disabled=
"disabled"
v-model=
"formData.birthDate"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
v-if=
"formData.womenCertificateType!=3"
>
<a-form-model-item
label=
"证件号码"
prop=
"womenIdCard"
>
<a-input
placeholder=
"请输入证件号码"
@
blur=
"womenIdCardChange"
style=
"width: 100%"
@
keyup
.
enter
.
native=
"nextFocus(3)"
ref=
"input3"
v-model=
"formData.womenIdCard"
:disabled=
"disabled"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"出生日期"
prop=
"birthDate"
>
<a-date-picker
style=
"width: 100%"
placeholder=
"请输入出生日期"
format=
"YYYY-MM-DD"
ref=
"input4"
@
change=
"nextFocus(4)"
value-format=
"yyyy-MM-DD"
:disabled=
"disabled"
v-model=
"formData.birthDate"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"身高"
prop=
"height"
>
<a-input
type=
"number"
placeholder=
"请输入身高,范围100cm-200cm"
@
keyup
.
enter
.
native=
"nextFocus(5)"
ref=
"input5"
@
blur=
"onBlur(1,formData.height)"
:disabled=
"disabled"
v-model=
"formData.height"
suffix=
"cm"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"体重"
prop=
"weight"
>
<a-input
type=
"number"
placeholder=
"请输入体重,范围30kg-180kg"
@
keyup
.
enter
.
native=
"nextFocus(6)"
ref=
"input6"
@
blur=
"onBlur(2,formData.weight)"
:disabled=
"disabled"
v-model=
"formData.weight"
suffix=
"kg"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"BMI"
prop=
"bmi"
>
<a-input
v-model=
"formData.bmi"
disabled
>
</a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-card>
<a-card
size=
"small"
:headStyle=
"
{background: '#FAFAFA'}" style="margin-top: 16px">
<div
slot=
"title"
>
<img
class=
"title_img"
src=
"../../../../../static/images/user_info_index.png"
>
<span
class=
"title_font"
>
问卷
<p
style=
"font-size: 14px;display:inline;color: red;margin-left: 10px"
>
请提示用户:如新鲜蔬果摄入少、血液叶酸水平低、备孕时间短,请酌情增补每日叶酸服用量。
</p></span>
</div>
<a-row
:gutter=
"16"
style=
"margin-left: 150px"
>
<a-col
:span=
"12"
>
<span
style=
"font-weight: bold"
>
符合以下情况的,请在□里打√:
</span>
<a-form-model-item
label=
""
prop=
"checkedList"
>
<a-checkbox-group
style=
"width: 100%"
v-model=
"checkedList"
:options=
"plainOptions"
@
change=
"onChange"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<p
style=
"font-size: 20px;margin-top: 15%"
>
建议服用:
{{
formData
.
recommendEat
}}
</p>
</a-col>
</a-row>
</a-card>
<a-card
size=
"small"
:headStyle=
"
{background: '#FAFAFA'}" style="margin-top: 16px">
<div
slot=
"title"
>
<img
class=
"title_img"
src=
"../../../../../static/images/user_info_index.png"
>
<span
class=
"title_font"
>
其他信息
</span>
</div>
<a-row
:gutter=
"16"
>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"联系电话"
prop=
"telephone"
:labelCol=
"
{span: 3}"
:wrapperCol="{span: 8}">
<a-input
placeholder=
"请输入联系电话"
v-model=
"formData.telephone"
@
keyup
.
enter
.
native=
"nextFocus(7)"
ref=
"input7"
:disabled=
"disabled"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"现住地址"
prop=
"presentCode"
:labelCol=
"
{span: 3}"
:wrapperCol="{span: 20}">
<DocAddress
v-model=
"formData.presentCode"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row
:gutter=
"16"
>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"详细地址"
prop=
"nowAddress"
:labelCol=
"
{span: 3}"
:wrapperCol="{span: 20}">
<a-input
@
keyup
.
enter
.
native=
"nextFocus(9)"
ref=
"input9"
v-toInputNum=
"
{num: 100}"
placeholder="请输入详细地址,最多可输入100个字"
v-model="formData.nowAddress"
:disabled="disabled">
</a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<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
.
enumName
}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"签署日期"
prop=
"parentDate"
>
<a-date-picker
v-model=
"formData.parentDate"
format=
"yyyy-MM-DD"
@
change=
"nextFocus(10)"
ref=
"input10"
value-format=
"yyyy-MM-DD"
:disabled=
"disabled"
style=
"width: 100%"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
:offset=
"3"
v-if=
"this.routerParams.routerFlag == 'applyGrant'"
>
<a-form-model-item
:wrapperCol=
"
{span: 16}">
<div
style=
"border: 1px dashed #EEEEEE;text-align: center"
>
<div
class=
"sign"
>
签字
</div>
<img
style=
"height: 100px;margin-top: 20px;width: auto;transform: rotate(-90deg);"
:src=
"formData.applySignUrl"
>
</div>
</a-form-model-item>
</a-col>
</a-row>
</a-card>
<div
style=
"margin: 30px 0px"
>
<div
class=
"divider_my"
><span
class=
"midText"
>
发放信息
</span></div>
</div>
<div
style=
"clear: both"
></div>
<a-row>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"发放日期"
prop=
"provideDate"
>
<a-date-picker
v-model=
"formData.provideDate"
value-format=
"yyyy-MM-DD"
@
change=
"nextFocus(11)"
ref=
"input11"
format=
"YYYY-MM-DD"
style=
"width: 100%"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"发放数量"
prop=
"provideNumber"
>
<a-input
type=
"number"
placeholder=
"请输入发放数量"
@
keyup
.
enter
.
native=
"nextFocus(12)"
ref=
"input12"
v-model=
"formData.provideNumber"
suffix=
"瓶"
></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"发放医生"
prop=
"provideDoctorId"
>
<a-select
v-model=
"formData.provideDoctorId"
placeholder=
"请选择"
@
keyup
.
enter
.
native=
"nextFocus(13)"
ref=
"input13"
>
<a-select-option
v-for=
"item in doctorInfoList"
:key=
"item.id"
:value=
"item.id"
>
{{
item
.
staffName
}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"备注"
prop=
"remarks"
:labelCol=
"
{span: 3}" :wrapperCol="{span: 20}">
<a-textarea
placeholder=
"请输入备注,最多可输入500字"
v-model=
"formData.remarks"
:rows=
"5"
@
keyup
.
enter
.
native=
"nextFocus(14)"
ref=
"input14"
:maxLength=
"500"
></a-textarea>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"身高"
prop=
"height"
>
<a-input
type=
"number"
placeholder=
"请输入身高,范围100cm-200cm"
@
keyup
.
enter
.
native=
"nextFocus(5)"
ref=
"input5"
@
blur=
"onBlur(1,formData.height)"
:disabled=
"disabled"
v-model=
"formData.height"
suffix=
"cm"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"体重"
prop=
"weight"
>
<a-input
type=
"number"
placeholder=
"请输入体重,范围30kg-180kg"
@
keyup
.
enter
.
native=
"nextFocus(6)"
ref=
"input6"
@
blur=
"onBlur(2,formData.weight)"
:disabled=
"disabled"
v-model=
"formData.weight"
suffix=
"kg"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"BMI"
prop=
"bmi"
>
<a-input
v-model=
"formData.bmi"
disabled
>
</a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-card>
<a-card
size=
"small"
:headStyle=
"
{background: '#FAFAFA'}" style="margin-top: 16px">
<div
slot=
"title"
>
<img
class=
"title_img"
src=
"../../../../../static/images/user_info_index.png"
>
<span
class=
"title_font"
>
问卷
<p
style=
"font-size: 14px;display:inline;color: red;margin-left: 10px"
>
请提示用户:如新鲜蔬果摄入少、血液叶酸水平低、备孕时间短,请酌情增补每日叶酸服用量。
</p></span>
</div>
<a-row
:gutter=
"16"
style=
"margin-left: 150px"
>
<a-col
:span=
"12"
>
<span
style=
"font-weight: bold"
>
符合以下情况的,请在□里打√:
</span>
<a-form-model-item
label=
""
prop=
"checkedList"
>
<a-checkbox-group
style=
"width: 100%"
v-model=
"checkedList"
:options=
"plainOptions"
@
change=
"onChange"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<p
style=
"font-size: 20px;margin-top: 15%"
>
建议服用:
{{
formData
.
recommendEat
}}
</p>
</a-col>
</a-row>
</a-card>
<a-card
size=
"small"
:headStyle=
"
{background: '#FAFAFA'}" style="margin-top: 16px">
<div
slot=
"title"
>
<img
class=
"title_img"
src=
"../../../../../static/images/user_info_index.png"
>
<span
class=
"title_font"
>
其他信息
</span>
</div>
<a-row
:gutter=
"16"
>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"联系电话"
prop=
"telephone"
:labelCol=
"
{span: 3}"
:wrapperCol="{span: 8}">
<a-input
placeholder=
"请输入联系电话"
v-model=
"formData.telephone"
@
keyup
.
enter
.
native=
"nextFocus(7)"
ref=
"input7"
:disabled=
"disabled"
></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row
:gutter=
"16"
>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"户籍地址"
prop=
"registeredCode"
:labelCol=
"
{span: 3}"
:wrapperCol="{span: 20}">
<a-row>
<a-col
:span=
"12"
>
<DocAddress
v-model=
"formData.registeredCode"
/>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
""
prop=
"permanentAddress"
:labelCol=
"
{span: 3}">
<a-input
@
keyup
.
enter
.
native=
"nextFocus(9)"
ref=
"input9"
v-toInputNum=
"
{num: 100}"
placeholder="详细地址,最多可输入100个字"
v-model="formData.permanentAddress"
:disabled="disabled">
</a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model-item>
</a-col>
</a-row>
<a-row
:gutter=
"16"
>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"现住地址"
prop=
"presentCode"
:labelCol=
"
{span: 3}"
:wrapperCol="{span: 20}">
<a-row>
<a-col
:span=
"12"
>
<DocAddress
v-model=
"formData.presentCode"
/>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
""
prop=
"nowAddress"
:labelCol=
"
{span: 3}">
<a-input
@
keyup
.
enter
.
native=
"nextFocus(10)"
ref=
"input10"
v-toInputNum=
"
{num: 100}"
placeholder="详细地址,最多可输入100个字"
v-model="formData.nowAddress"
:disabled="disabled">
</a-input>
</a-form-model-item>
</a-col>
</a-form-model>
</a-row>
</a-form-model-item>
</a-col>
</a-row>
<a-row
:gutter=
"16"
>
<a-col
:span=
"12"
>
<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
.
enumName
}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"签署日期"
prop=
"parentDate"
>
<a-date-picker
v-model=
"formData.parentDate"
format=
"yyyy-MM-DD"
@
change=
"nextFocus(11)"
ref=
"input11"
value-format=
"yyyy-MM-DD"
:disabled=
"disabled"
style=
"width: 100%"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row
:gutter=
"16"
>
<a-col
:span=
"12"
:offset=
"3"
v-if=
"this.routerParams.routerFlag == 'applyGrant'"
>
<a-form-model-item
:wrapperCol=
"
{span: 16}">
<div
style=
"border: 1px dashed #EEEEEE;text-align: center"
>
<div
class=
"sign"
>
签字
</div>
<img
style=
"height: 100px;margin-top: 20px;width: auto;transform: rotate(-90deg);"
:src=
"formData.applySignUrl"
>
</div>
</a-form-model-item>
</a-col>
</a-row>
</a-card>
<div
style=
"margin: 30px 0px"
>
<div
class=
"divider_my"
><span
class=
"midText"
>
发放信息
</span></div>
</div>
<div
style=
"clear: both"
></div>
<a-row>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"发放日期"
prop=
"provideDate"
>
<a-date-picker
v-model=
"formData.provideDate"
value-format=
"yyyy-MM-DD"
@
change=
"nextFocus(12)"
ref=
"input12"
format=
"YYYY-MM-DD"
style=
"width: 100%"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"发放数量"
prop=
"provideNumber"
>
<a-input
type=
"number"
placeholder=
"请输入发放数量"
@
keyup
.
enter
.
native=
"nextFocus(13)"
ref=
"input13"
v-model=
"formData.provideNumber"
suffix=
"瓶"
></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"发放医生"
prop=
"provideDoctorId"
>
<a-select
v-model=
"formData.provideDoctorId"
placeholder=
"请选择"
@
keyup
.
enter
.
native=
"nextFocus(14)"
ref=
"input14"
>
<a-select-option
v-for=
"item in doctorInfoList"
:key=
"item.id"
:value=
"item.id"
>
{{
item
.
staffName
}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"备注"
prop=
"remarks"
:labelCol=
"
{span: 3}" :wrapperCol="{span: 20}">
<a-textarea
placeholder=
"请输入备注,最多可输入500字"
v-model=
"formData.remarks"
:rows=
"5"
@
keyup
.
enter
.
native=
"nextFocus(15)"
ref=
"input15"
:maxLength=
"500"
></a-textarea>
</a-form-model-item>
</a-col>
</a-form-model>
<!-- 选择叶酸种类弹框-->
<div>
<in-stock-manage-info
ref=
"inStockManageInfo"
@
selectedIdList=
"getChecked"
v-if=
"readyGetChecked"
:menuId=
"routerParams.menuId"
></in-stock-manage-info>
</div>
<div
style=
"text-align: center;margin-top: 16px"
>
<a-button
class=
"ant-table-btn"
@
click=
"goBack"
>
取消
</a-button>
<a-button
type=
"primary"
:loading=
"spinning"
@
click=
"addMaterialDis"
style=
"margin-left: 8px"
>
确认
</a-button>
</div>
</a-card>
</a-spin>
</div>
<!-- 选择叶酸种类弹框-->
<div>
<in-stock-manage-info
ref=
"inStockManageInfo"
@
selectedIdList=
"getChecked"
v-if=
"readyGetChecked"
:menuId=
"routerParams.menuId"
></in-stock-manage-info>
</div>
<div
style=
"text-align: center;margin-top: 16px"
>
<a-button
class=
"ant-table-btn"
@
click=
"goBack"
>
取消
</a-button>
<a-button
type=
"primary"
:loading=
"spinning"
@
click=
"addMaterialDis"
style=
"margin-left: 8px"
>
确认
</a-button>
</div>
</a-card>
</a-spin>
</div>
</
template
>
...
...
@@ -237,561 +266,580 @@ import {cardType} from "../../../utils/dropDownCollection";
import
moment
from
'moment'
import
InStockManageInfo
from
"./inStockManageInfo"
;
import
DocAddress
from
"../../../components/DocAddress.vue"
;
let
vm
=
this
export
default
{
components
:
{
InStockManageInfo
,
DocAddress
},
data
()
{
let
unitInfo
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'unitInfo'
));
let
userInfo
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'userInfo'
));
let
date
=
moment
(
new
Date
()).
format
(
'YYYY-MM-DD'
);
return
{
modelType
:
""
,
userInfo
:
userInfo
,
unitInfo
:
unitInfo
,
indeterminate
:
true
,
checkedList
:
[],
plainOptions
:
[],
checkAll
:
false
,
spinning
:
false
,
// 弹窗内表单
formData
:
{
weight
:
null
,
height
:
null
,
bmi
:
""
,
womanName
:
""
,
womenCertificateType
:
'1'
,
womenIdCard
:
undefined
,
oncePregnant
:
''
,
pregnantNum
:
undefined
,
manName
:
undefined
,
menIdCard
:
undefined
,
telephone
:
undefined
,
presentCode
:
undefined
,
nowAddress
:
""
,
signedMode
:
'2'
,
parentDate
:
date
,
provideDate
:
date
,
provideDoctorId
:
userInfo
.
relationId
,
provideNumber
:
""
,
provideRecordList
:
[],
remarks
:
undefined
,
birthDate
:
""
,
recommendEat
:
"1颗/天(0.4mg/天)"
,
question
:
""
},
cardType
,
disabled
:
false
,
formRules
:
{
womanName
:
[
{
required
:
true
,
message
:
'请输入姓名'
,
trigger
:
'change'
}
],
womenCertificateType
:
[
{
required
:
true
,
message
:
'请选择证件类型'
}
],
womenIdCard
:
[
{
required
:
true
,
message
:
'请输入证件号码'
},
{
pattern
:
/^
[
1-9
]\d{5}(
18|19|20
)\d{2}((
0
[
1-9
])
|
(
1
[
0-2
]))(([
0-2
][
1-9
])
|10|20|30|31
)\d{3}[
0-9Xx
]
$/
,
message
:
'请输入正确的身份证号'
}
],
provideNumber
:
[
{
required
:
true
,
message
:
'请输入发放数量'
},
{
validator
:
this
.
checkProvideNumber
,
trigger
:
'blur'
},
],
birthDate
:
[
{
required
:
true
,
message
:
'请输入出生日期'
}
],
height
:
[
{
required
:
true
,
message
:
'请输入身高,范围100cm-200cm'
},
{
validator
:
this
.
checkHeightWeight
},
],
weight
:
[
{
required
:
true
,
message
:
'请输入体重,范围30kg-180kg'
},
{
validator
:
this
.
checkHeightWeight
},
],
manName
:
[
{
required
:
true
,
message
:
'请输入姓名'
}
],
menCertificateType
:
[
{
required
:
true
,
message
:
'请选择证件类型'
}
],
menIdCard
:
[
{
required
:
true
,
message
:
'请输入证件号码'
},
{
pattern
:
/^
[
1-9
]\d{5}(
18|19|20
)\d{2}((
0
[
1-9
])
|
(
1
[
0-2
]))(([
0-2
][
1-9
])
|10|20|30|31
)\d{3}[
0-9Xx
]
$/
,
message
:
'请输入正确的身份证号'
}
],
telephone
:
[
{
required
:
true
,
message
:
'请输入联系电话'
},
{
validator
:
checkPhone
},
],
nowAddress
:
[
{
required
:
true
,
message
:
'请输入详细地址'
}
],
signedMode
:
[
{
required
:
true
,
message
:
'请选择签署方式'
}
],
parentDate
:
[
{
required
:
true
,
message
:
'请选择签署日期'
}
],
provideDate
:
[
{
required
:
true
,
message
:
'请选择发放日期'
}
],
provideDoctorId
:
[
{
required
:
true
,
message
:
'请选择发放医生'
}
],
presentCode
:
[
{
required
:
true
,
message
:
'请选现住地址'
,
trigger
:
'change'
}
],
sendNumber
:
[
{
required
:
true
,
message
:
'请输入发放数量'
}
]
},
womanPregnant
:
false
,
//是否怀孕
options
:
{
penColor
:
"#000"
,
//画笔颜色
},
certificateTypeList
:
[],
signedModeList
:
[],
bookHtmlContent
:
''
,
modalinfo
:
{
selectedRowKeys
:
[]
},
readyGetChecked
:
true
,
doctorInfoList
:
[],
areaInfo
:
[],
fieldNames
:
{
label
:
'areaName'
,
value
:
'areaCode'
,
children
:
'children'
},
routerParams
:
{}
components
:
{
InStockManageInfo
,
DocAddress
},
data
()
{
let
unitInfo
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'unitInfo'
));
let
userInfo
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'userInfo'
));
let
date
=
moment
(
new
Date
()).
format
(
'YYYY-MM-DD'
);
return
{
modelType
:
""
,
userInfo
:
userInfo
,
unitInfo
:
unitInfo
,
indeterminate
:
true
,
checkedList
:
[],
plainOptions
:
[],
checkAll
:
false
,
spinning
:
false
,
// 弹窗内表单
formData
:
{
weight
:
null
,
height
:
null
,
bmi
:
""
,
womanName
:
""
,
womenCertificateType
:
'1'
,
womenIdCard
:
undefined
,
oncePregnant
:
''
,
pregnantNum
:
undefined
,
manName
:
undefined
,
menIdCard
:
undefined
,
telephone
:
undefined
,
registeredCode
:
undefined
,
permanentAddress
:
""
,
presentCode
:
undefined
,
nowAddress
:
""
,
signedMode
:
'2'
,
parentDate
:
date
,
provideDate
:
date
,
provideDoctorId
:
userInfo
.
relationId
,
provideNumber
:
""
,
provideRecordList
:
[],
remarks
:
undefined
,
birthDate
:
""
,
recommendEat
:
"1颗/天(0.4mg/天)"
,
question
:
""
},
cardType
,
disabled
:
false
,
formRules
:
{
womanName
:
[
{
required
:
true
,
message
:
'请输入姓名'
,
trigger
:
'change'
}
],
womenCertificateType
:
[
{
required
:
true
,
message
:
'请选择证件类型'
}
],
womenIdCard
:
[
{
required
:
true
,
message
:
'请输入证件号码'
},
{
pattern
:
/^
[
1-9
]\d{5}(
18|19|20
)\d{2}((
0
[
1-9
])
|
(
1
[
0-2
]))(([
0-2
][
1-9
])
|10|20|30|31
)\d{3}[
0-9Xx
]
$/
,
message
:
'请输入正确的身份证号'
}
],
provideNumber
:
[
{
required
:
true
,
message
:
'请输入发放数量'
},
{
validator
:
this
.
checkProvideNumber
,
trigger
:
'blur'
},
],
birthDate
:
[
{
required
:
true
,
message
:
'请输入出生日期'
}
],
height
:
[
{
required
:
true
,
message
:
'请输入身高,范围100cm-200cm'
},
{
validator
:
this
.
checkHeightWeight
},
],
weight
:
[
{
required
:
true
,
message
:
'请输入体重,范围30kg-180kg'
},
{
validator
:
this
.
checkHeightWeight
},
],
manName
:
[
{
required
:
true
,
message
:
'请输入姓名'
}
],
menCertificateType
:
[
{
required
:
true
,
message
:
'请选择证件类型'
}
],
menIdCard
:
[
{
required
:
true
,
message
:
'请输入证件号码'
},
{
pattern
:
/^
[
1-9
]\d{5}(
18|19|20
)\d{2}((
0
[
1-9
])
|
(
1
[
0-2
]))(([
0-2
][
1-9
])
|10|20|30|31
)\d{3}[
0-9Xx
]
$/
,
message
:
'请输入正确的身份证号'
}
],
telephone
:
[
{
required
:
true
,
message
:
'请输入联系电话'
},
{
validator
:
checkPhone
},
],
nowAddress
:
[
{
required
:
true
,
message
:
'请输入详细地址'
}
],
signedMode
:
[
{
required
:
true
,
message
:
'请选择签署方式'
}
],
parentDate
:
[
{
required
:
true
,
message
:
'请选择签署日期'
}
],
provideDate
:
[
{
required
:
true
,
message
:
'请选择发放日期'
}
],
provideDoctorId
:
[
{
required
:
true
,
message
:
'请选择发放医生'
}
],
presentCode
:
[
{
required
:
true
,
message
:
'请选现住地址'
,
trigger
:
'change'
}
],
registeredCode
:
[
{
required
:
true
,
message
:
'请选择户籍地址'
,
trigger
:
'change'
}
],
permanentAddress
:
[
{
required
:
true
,
message
:
'请输入详细地址'
,
trigger
:
'change'
}
],
sendNumber
:
[
{
required
:
true
,
message
:
'请输入发放数量'
}
]
},
womanPregnant
:
false
,
//是否怀孕
options
:
{
penColor
:
"#000"
,
//画笔颜色
},
certificateTypeList
:
[],
signedModeList
:
[],
bookHtmlContent
:
''
,
modalinfo
:
{
selectedRowKeys
:
[]
},
readyGetChecked
:
true
,
doctorInfoList
:
[],
areaInfo
:
[],
fieldNames
:
{
label
:
'areaName'
,
value
:
'areaCode'
,
children
:
'children'
},
routerParams
:
{}
}
},
created
()
{
this
.
routerParams
=
this
.
$route
.
query
;
this
.
certificateTypeList
=
getEnumByFlag
(
'folacin_resident_info_certificate_type'
)
this
.
signedModeList
=
getEnumByFlag
(
'folacin_resident_info_signed_mode'
)
let
questionEnum
=
getEnumByFlag
(
'folacin_resident_info_question'
);
questionEnum
.
forEach
(
enums
=>
{
this
.
plainOptions
.
push
({
label
:
enums
.
enumName
,
value
:
enums
.
enumValue
});
});
this
.
getBookHtmlContent
()
this
.
getAllDoctorList
()
this
.
modelType
=
this
.
routerParams
.
routerFlag
;
if
(
this
.
modelType
==
'applyGrant'
||
this
.
modelType
==
'updateRecord'
)
{
//从申请过来的发放
if
(
this
.
modelType
==
'applyGrant'
)
{
//this.disabled = true;
this
.
getApplyDetail
()
}
else
{
this
.
getStockListDetail
()
}
}
else
{
//由新增过来的发放
this
.
formData
.
presentCode
=
this
.
unitInfo
.
areaCode
this
.
formData
.
registeredCode
=
this
.
unitInfo
.
areaCode
}
},
mounted
()
{
let
input
=
this
.
$refs
[
"input1"
];
if
(
this
.
ApiUtils
.
isNotBlank
(
input
))
{
input
.
focus
();
}
},
watch
:
{},
methods
:
{
nextFocus
(
index
)
{
let
input
=
this
.
$refs
[
"input"
+
(
index
+
1
)];
if
(
this
.
ApiUtils
.
isBlank
(
input
))
{
index
=
1
;
input
=
this
.
$refs
[
"input"
+
index
];
}
input
.
focus
();
},
onBlur
(
type
,
value
)
{
if
(
value
)
{
if
(
type
==
1
)
{
this
.
formData
.
height
=
Number
(
value
).
toFixed
(
2
);
}
else
{
this
.
formData
.
weight
=
Number
(
value
).
toFixed
(
2
);
}
this
.
formData
.
bmi
=
!
this
.
formData
.
height
||
this
.
formData
.
height
==
0
?
'-'
:
this
.
formData
.
weight
/
this
.
formData
.
height
?
(
this
.
formData
.
weight
/
((
this
.
formData
.
height
/
100
)
*
(
this
.
formData
.
height
/
100
))).
toFixed
(
2
)
:
'-'
;
if
(
this
.
formData
.
bmi
>=
28
&&
this
.
checkedList
.
length
==
0
)
{
this
.
formData
.
recommendEat
=
"2颗/天(0.8mg/天)"
;
}
if
(
this
.
formData
.
bmi
<
28
&&
this
.
checkedList
.
length
==
0
)
{
this
.
formData
.
recommendEat
=
"1颗/天(0.4mg/天)"
;
}
}
},
created
()
{
this
.
routerParams
=
this
.
$route
.
query
;
this
.
certificateTypeList
=
getEnumByFlag
(
'folacin_resident_info_certificate_type'
)
this
.
signedModeList
=
getEnumByFlag
(
'folacin_resident_info_signed_mode'
)
let
questionEnum
=
getEnumByFlag
(
'folacin_resident_info_question'
);
questionEnum
.
forEach
(
enums
=>
{
this
.
plainOptions
.
push
({
label
:
enums
.
enumName
,
value
:
enums
.
enumValue
});
});
this
.
getBookHtmlContent
()
this
.
getAllDoctorList
()
this
.
modelType
=
this
.
routerParams
.
routerFlag
;
if
(
this
.
modelType
==
'applyGrant'
||
this
.
modelType
==
'updateRecord'
)
{
//从申请过来的发放
if
(
this
.
modelType
==
'applyGrant'
)
{
//this.disabled = true;
this
.
getApplyDetail
()
}
else
{
this
.
getStockListDetail
()
}
}
else
{
//由新增过来的发放
this
.
formData
.
presentCode
=
this
.
unitInfo
.
areaCode
onChange
(
checkedList
)
{
this
.
formData
.
recommendEat
=
"2颗/天(0.8mg/天)"
;
if
(
this
.
formData
.
bmi
>=
28
&&
checkedList
.
length
==
0
)
{
this
.
formData
.
recommendEat
=
"2颗/天(0.8mg/天)"
;
}
if
(
this
.
formData
.
bmi
<
28
&&
checkedList
.
length
==
0
)
{
this
.
formData
.
recommendEat
=
"1颗/天(0.4mg/天)"
;
}
checkedList
.
forEach
(
x
=>
{
if
(
x
==
'3'
)
{
this
.
formData
.
recommendEat
=
"10颗/天(4mg/天)"
;
}
if
(
x
==
'4'
)
{
this
.
formData
.
recommendEat
=
"13颗/天(5.2mg/天)"
;
}
})
},
mounted
()
{
let
input
=
this
.
$refs
[
"input1"
];
if
(
this
.
ApiUtils
.
isNotBlank
(
input
))
{
input
.
focus
();
checkHeightWeight
(
rule
,
value
,
callback
)
{
let
msg
=
rule
.
field
==
"height"
?
"请输入身高,范围100cm-200cm"
:
"请输入体重,范围30kg-180kg"
if
(
value
==
null
)
{
callback
(
new
Error
(
msg
));
}
else
{
if
(
rule
.
field
==
"height"
)
{
if
(
value
<
100
||
value
>
200
)
{
callback
(
new
Error
(
msg
));
return
}
}
else
{
if
(
value
<
30
||
value
>
180
)
{
callback
(
new
Error
(
msg
));
return
;
}
}
callback
()
}
},
watch
:
{},
methods
:
{
nextFocus
(
index
)
{
let
input
=
this
.
$refs
[
"input"
+
(
index
+
1
)];
if
(
this
.
ApiUtils
.
isBlank
(
input
))
{
index
=
1
;
input
=
this
.
$refs
[
"input"
+
index
];
}
input
.
focus
();
},
onBlur
(
type
,
value
)
{
if
(
value
)
{
if
(
type
==
1
)
{
this
.
formData
.
height
=
Number
(
value
).
toFixed
(
2
);
}
else
{
this
.
formData
.
weight
=
Number
(
value
).
toFixed
(
2
);
}
this
.
formData
.
bmi
=
!
this
.
formData
.
height
||
this
.
formData
.
height
==
0
?
'-'
:
this
.
formData
.
weight
/
this
.
formData
.
height
?
(
this
.
formData
.
weight
/
((
this
.
formData
.
height
/
100
)
*
(
this
.
formData
.
height
/
100
))).
toFixed
(
2
)
:
'-'
;
if
(
this
.
formData
.
bmi
>=
28
&&
this
.
checkedList
.
length
==
0
)
{
this
.
formData
.
recommendEat
=
"2颗/天(0.8mg/天)"
;
}
if
(
this
.
formData
.
bmi
<
28
&&
this
.
checkedList
.
length
==
0
)
{
this
.
formData
.
recommendEat
=
"1颗/天(0.4mg/天)"
;
}
}
},
onChange
(
checkedList
)
{
this
.
formData
.
recommendEat
=
"2颗/天(0.8mg/天)"
;
if
(
this
.
formData
.
bmi
>=
28
&&
checkedList
.
length
==
0
)
{
this
.
formData
.
recommendEat
=
"2颗/天(0.8mg/天)"
;
}
if
(
this
.
formData
.
bmi
<
28
&&
checkedList
.
length
==
0
)
{
this
.
formData
.
recommendEat
=
"1颗/天(0.4mg/天)"
;
}
checkedList
.
forEach
(
x
=>
{
if
(
x
==
'3'
)
{
this
.
formData
.
recommendEat
=
"10颗/天(4mg/天)"
;
}
if
(
x
==
'4'
)
{
this
.
formData
.
recommendEat
=
"13颗/天(5.2mg/天)"
;
}
})
},
checkHeightWeight
(
rule
,
value
,
callback
)
{
let
msg
=
rule
.
field
==
"height"
?
"请输入身高,范围100cm-200cm"
:
"请输入体重,范围30kg-180kg"
if
(
value
==
null
)
{
callback
(
new
Error
(
msg
));
}
else
{
if
(
rule
.
field
==
"height"
)
{
if
(
value
<
100
||
value
>
200
)
{
callback
(
new
Error
(
msg
));
return
}
}
else
{
if
(
value
<
30
||
value
>
180
)
{
callback
(
new
Error
(
msg
));
return
;
}
}
callback
()
}
},
checkProvideNumber
(
rule
,
value
,
callback
)
{
if
(
value
==
null
||
value
<
1
||
value
>
999
)
{
callback
(
new
Error
(
'请输入1-999的整数值'
));
}
else
{
callback
()
}
},
//获取申请详情
getApplyDetail
()
{
this
.
spinning
=
true
;
this
.
$api
.
folviteDistributionManage
.
fetchApplyDetail
(
this
.
routerParams
.
id
).
then
(({
data
=
[],
code
})
=>
{
this
.
formData
=
{
applyId
:
data
.
id
,
height
:
data
.
height
,
weight
:
data
.
weight
,
birthDate
:
data
.
birthDate
,
womanName
:
data
.
womanName
,
womenCertificateType
:
data
.
womenCertificateType
.
toString
(),
womenIdCard
:
data
.
womenIdCard
,
provideNumber
:
data
.
provideNumber
,
telephone
:
data
.
telephone
,
presentCode
:
data
.
presentCode
,
nowAddress
:
data
.
nowAddress
,
signedMode
:
data
.
signedMode
?
data
.
signedMode
.
toString
()
:
"1"
,
applySignUrl
:
data
.
applySignUrl
,
parentDate
:
data
.
parentDate
,
provideDate
:
data
.
provideDate
||
moment
(
new
Date
()).
format
(
'yyyy-MM-DD'
),
remarks
:
data
.
remarks
,
provideDoctorId
:
this
.
userInfo
.
relationId
,
recommendEat
:
data
.
recommendEat
,
question
:
data
.
question
,
bmi
:
data
.
bmi
}
if
(
this
.
formData
.
question
)
{
this
.
checkedList
=
this
.
formData
.
question
.
split
(
","
);
}
this
.
changeWomenCardType
()
this
.
changeMenCardType
()
this
.
spinning
=
false
;
}).
catch
(()
=>
{
this
.
spinning
=
false
})
},
getStockListDetail
()
{
this
.
spinning
=
true
;
let
par
=
{
residentId
:
this
.
routerParams
.
id
,
menuId
:
this
.
routerParams
.
menuId
}
this
.
$api
.
folviteDistributionManage
.
fetchFolviteDistributionDetail
(
par
).
then
(({
data
=
[],
code
})
=>
{
this
.
formData
=
{
id
:
data
.
id
,
height
:
data
.
height
,
weight
:
data
.
weight
,
birthDate
:
data
.
birthDate
,
womanName
:
data
.
womanName
,
womenCertificateType
:
data
.
womenCertificateType
.
toString
(),
womenIdCard
:
data
.
womenIdCard
,
oncePregnant
:
+
data
.
oncePregnant
,
pregnantNum
:
data
.
pregnantNum
,
provideNumber
:
data
.
provideNumber
,
telephone
:
data
.
telephone
,
presentCode
:
data
.
presentCode
,
nowAddress
:
data
.
nowAddress
,
signedMode
:
data
.
signedMode
?
data
.
signedMode
.
toString
()
:
"1"
,
applySignUrl
:
data
.
applySignUrl
,
parentDate
:
data
.
parentDate
,
provideDate
:
data
.
provideDate
||
moment
(
new
Date
()).
format
(
'yyyy-MM-DD'
),
provideDoctorId
:
this
.
userInfo
.
relationId
,
provideRecordList
:
data
.
provideRecordList
,
remarks
:
data
.
remarks
,
recommendEat
:
data
.
recommendEat
,
}
this
.
formData
.
bmi
=
!
this
.
formData
.
height
||
this
.
formData
.
height
==
0
?
'-'
:
this
.
formData
.
weight
/
this
.
formData
.
height
?
(
this
.
formData
.
weight
/
((
this
.
formData
.
height
/
100
)
*
(
this
.
formData
.
height
/
100
))).
toFixed
(
2
)
:
'-'
;
if
(
this
.
formData
.
bmi
>=
28
)
{
this
.
formData
.
recommendEat
=
"2颗/天(0.8mg/天)"
;
}
if
(
!
this
.
disabled
)
{
this
.
formData
.
recommendEat
=
data
.
recommendEat
;
}
if
(
data
.
question
)
{
let
questionList
=
data
.
question
.
split
(
","
);
this
.
checkedList
=
questionList
;
}
if
(
this
.
formData
.
womenCertificateType
==
'1'
)
{
let
length
=
this
.
formData
.
womenIdCard
.
length
;
if
(
length
==
15
|
length
==
18
)
{
let
year
=
this
.
formData
.
womenIdCard
.
substring
(
6
,
10
);
let
moth
=
this
.
formData
.
womenIdCard
.
substring
(
10
,
12
);
let
day
=
this
.
formData
.
womenIdCard
.
substring
(
12
,
14
);
this
.
formData
.
birthDate
=
year
+
"-"
+
moth
+
"-"
+
day
;
}
}
this
.
formData
.
recommendEat
=
data
.
recommendEat
;
this
.
changeWomenCardType
()
this
.
changeMenCardType
()
this
.
spinning
=
false
;
}).
catch
(()
=>
{
this
.
spinning
=
false
})
},
getLastRecord
()
{
this
.
$api
.
folviteDistributionManage
.
fetchLastRecord
(
this
.
formData
.
womenIdCard
).
then
(({
data
=
[],
code
})
=>
{
if
(
data
==
null
)
{
return
;
}
this
.
formData
.
womanName
=
data
.
residentName
;
this
.
formData
.
telephone
=
data
.
telephone
;
this
.
formData
.
presentCode
=
data
.
presentCode
;
this
.
formData
.
nowAddress
=
data
.
nowAddress
;
}).
catch
(()
=>
{
})
},
getWomenIdCardInfo
()
{
GetUserInfoByCardDevice
().
then
(
res
=>
{
let
{
cardno
,
name
,
born
}
=
res
;
this
.
formData
.
womanName
=
name
;
this
.
formData
.
womenCertificateType
=
'1'
;
this
.
formData
.
womenIdCard
=
cardno
;
let
year
=
born
.
substring
(
0
,
4
);
let
moth
=
born
.
substring
(
4
,
6
);
let
day
=
born
.
substring
(
6
,
8
);
this
.
formData
.
birthDate
=
year
+
"-"
+
moth
+
"-"
+
day
;
})
},
getBookHtmlContent
()
{
//获取用户知情书模板
let
par
=
{
menuId
:
this
.
routerParams
.
menuId
}
this
.
$api
.
common
.
fetchConsentInfo
(
par
).
then
(({
data
})
=>
{
if
(
this
.
$api
.
utils
.
isBlank
(
data
))
{
this
.
bookHtmlContent
=
{
content
:
""
}
}
else
{
this
.
bookHtmlContent
=
data
;
}
})
},
getAllDoctorList
()
{
let
par
=
{
menuId
:
this
.
menuId
}
this
.
$api
.
common
.
fetchAllDoctor
(
par
).
then
(({
data
})
=>
{
this
.
doctorInfoList
=
data
checkProvideNumber
(
rule
,
value
,
callback
)
{
if
(
value
==
null
||
value
<
1
||
value
>
999
)
{
callback
(
new
Error
(
'请输入1-999的整数值'
));
}
else
{
callback
()
}
},
//获取申请详情
getApplyDetail
()
{
this
.
spinning
=
true
;
this
.
$api
.
folviteDistributionManage
.
fetchApplyDetail
(
this
.
routerParams
.
id
).
then
(({
data
=
[],
code
})
=>
{
this
.
formData
=
{
applyId
:
data
.
id
,
height
:
data
.
height
,
weight
:
data
.
weight
,
birthDate
:
data
.
birthDate
,
womanName
:
data
.
womanName
,
womenCertificateType
:
data
.
womenCertificateType
.
toString
(),
womenIdCard
:
data
.
womenIdCard
,
provideNumber
:
data
.
provideNumber
,
telephone
:
data
.
telephone
,
registeredCode
:
data
.
registeredCode
,
permanentAddress
:
data
.
permanentAddress
,
presentCode
:
data
.
presentCode
,
nowAddress
:
data
.
nowAddress
,
signedMode
:
data
.
signedMode
?
data
.
signedMode
.
toString
()
:
"1"
,
applySignUrl
:
data
.
applySignUrl
,
parentDate
:
data
.
parentDate
,
provideDate
:
data
.
provideDate
||
moment
(
new
Date
()).
format
(
'yyyy-MM-DD'
),
remarks
:
data
.
remarks
,
provideDoctorId
:
this
.
userInfo
.
relationId
,
recommendEat
:
data
.
recommendEat
,
question
:
data
.
question
,
bmi
:
data
.
bmi
}
if
(
this
.
formData
.
question
)
{
this
.
checkedList
=
this
.
formData
.
question
.
split
(
","
);
}
this
.
changeWomenCardType
()
this
.
changeMenCardType
()
this
.
spinning
=
false
;
}).
catch
(()
=>
{
this
.
spinning
=
false
})
},
getStockListDetail
()
{
this
.
spinning
=
true
;
let
par
=
{
residentId
:
this
.
routerParams
.
id
,
menuId
:
this
.
routerParams
.
menuId
}
this
.
$api
.
folviteDistributionManage
.
fetchFolviteDistributionDetail
(
par
).
then
(({
data
=
[],
code
})
=>
{
this
.
formData
=
{
id
:
data
.
id
,
height
:
data
.
height
,
weight
:
data
.
weight
,
birthDate
:
data
.
birthDate
,
womanName
:
data
.
womanName
,
womenCertificateType
:
data
.
womenCertificateType
.
toString
(),
womenIdCard
:
data
.
womenIdCard
,
oncePregnant
:
+
data
.
oncePregnant
,
pregnantNum
:
data
.
pregnantNum
,
provideNumber
:
data
.
provideNumber
,
telephone
:
data
.
telephone
,
registeredCode
:
data
.
registeredCode
,
permanentAddress
:
data
.
permanentAddress
,
presentCode
:
data
.
presentCode
,
nowAddress
:
data
.
nowAddress
,
signedMode
:
data
.
signedMode
?
data
.
signedMode
.
toString
()
:
"1"
,
applySignUrl
:
data
.
applySignUrl
,
parentDate
:
data
.
parentDate
,
provideDate
:
data
.
provideDate
||
moment
(
new
Date
()).
format
(
'yyyy-MM-DD'
),
provideDoctorId
:
this
.
userInfo
.
relationId
,
provideRecordList
:
data
.
provideRecordList
,
remarks
:
data
.
remarks
,
recommendEat
:
data
.
recommendEat
,
}
this
.
formData
.
bmi
=
!
this
.
formData
.
height
||
this
.
formData
.
height
==
0
?
'-'
:
this
.
formData
.
weight
/
this
.
formData
.
height
?
(
this
.
formData
.
weight
/
((
this
.
formData
.
height
/
100
)
*
(
this
.
formData
.
height
/
100
))).
toFixed
(
2
)
:
'-'
;
if
(
this
.
formData
.
bmi
>=
28
)
{
this
.
formData
.
recommendEat
=
"2颗/天(0.8mg/天)"
;
}
if
(
!
this
.
disabled
)
{
this
.
formData
.
recommendEat
=
data
.
recommendEat
;
}
if
(
data
.
question
)
{
let
questionList
=
data
.
question
.
split
(
","
);
this
.
checkedList
=
questionList
;
}
if
(
this
.
formData
.
womenCertificateType
==
'1'
)
{
let
length
=
this
.
formData
.
womenIdCard
.
length
;
if
(
length
==
15
|
length
==
18
)
{
let
year
=
this
.
formData
.
womenIdCard
.
substring
(
6
,
10
);
let
moth
=
this
.
formData
.
womenIdCard
.
substring
(
10
,
12
);
let
day
=
this
.
formData
.
womenIdCard
.
substring
(
12
,
14
);
this
.
formData
.
birthDate
=
year
+
"-"
+
moth
+
"-"
+
day
;
}
}
this
.
formData
.
recommendEat
=
data
.
recommendEat
;
this
.
changeWomenCardType
()
this
.
changeMenCardType
()
this
.
spinning
=
false
;
}).
catch
(()
=>
{
this
.
spinning
=
false
})
},
getLastRecord
()
{
this
.
$api
.
folviteDistributionManage
.
fetchLastRecord
(
this
.
formData
.
womenIdCard
).
then
(({
data
=
[],
code
})
=>
{
if
(
data
==
null
)
{
return
;
}
this
.
formData
.
womanName
=
data
.
residentName
;
this
.
formData
.
telephone
=
data
.
telephone
;
this
.
formData
.
presentCode
=
data
.
presentCode
;
this
.
formData
.
nowAddress
=
data
.
nowAddress
;
this
.
formData
.
registeredCode
=
data
.
registeredCode
;
this
.
formData
.
permanentAddress
=
data
.
permanentAddress
;
}).
catch
(()
=>
{
})
},
getWomenIdCardInfo
()
{
GetUserInfoByCardDevice
().
then
(
res
=>
{
let
{
cardno
,
name
,
born
}
=
res
;
this
.
formData
.
womanName
=
name
;
this
.
formData
.
womenCertificateType
=
'1'
;
this
.
formData
.
womenIdCard
=
cardno
;
let
year
=
born
.
substring
(
0
,
4
);
let
moth
=
born
.
substring
(
4
,
6
);
let
day
=
born
.
substring
(
6
,
8
);
this
.
formData
.
birthDate
=
year
+
"-"
+
moth
+
"-"
+
day
;
})
},
getBookHtmlContent
()
{
//获取用户知情书模板
let
par
=
{
menuId
:
this
.
routerParams
.
menuId
}
this
.
$api
.
common
.
fetchConsentInfo
(
par
).
then
(({
data
})
=>
{
if
(
this
.
$api
.
utils
.
isBlank
(
data
))
{
this
.
bookHtmlContent
=
{
content
:
""
}
}
else
{
this
.
bookHtmlContent
=
data
;
}
})
},
getAllDoctorList
()
{
let
par
=
{
menuId
:
this
.
menuId
}
this
.
$api
.
common
.
fetchAllDoctor
(
par
).
then
(({
data
})
=>
{
this
.
doctorInfoList
=
data
})
},
getChecked
(
val
)
{
this
.
readyGetChecked
=
false
this
.
$refs
.
inStockManageInfo
.
visible
=
false
this
.
modalinfo
.
selectedRowKeys
=
[...
val
]
this
.
getSelectedMedical
(
val
)
},
changeWomenCardType
()
{
let
cardInfo
=
this
.
cardType
.
filter
(
item
=>
item
.
id
==
this
.
formData
.
womenCertificateType
)
this
.
formRules
.
womenIdCard
=
cardInfo
[
0
].
rule
;
this
.
$refs
[
"input3"
].
focus
();
},
changeMenCardType
()
{
let
cardInfo
=
this
.
cardType
.
filter
(
item
=>
item
.
id
==
this
.
formData
.
menCertificateType
)
this
.
formRules
.
menIdCard
=
cardInfo
[
0
].
rule
;
},
getSelectedMedical
(
val
)
{
//获取被选中的药具
if
(
val
.
length
>
0
)
{
let
par
=
{
idList
:
val
.
join
(
','
),
menuId
:
this
.
routerParams
.
menuId
}
this
.
$api
.
stockManage
.
fetchMedicalListByIds
(
par
).
then
(({
data
=
[]})
=>
{
this
.
formData
.
provideRecordList
=
data
})
}
},
addMaterialDis
()
{
//发放
let
vm
=
this
;
this
.
$refs
.
formRef
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
checkedList
.
length
>
0
)
{
let
questionList
=
""
;
this
.
checkedList
.
forEach
(
x
=>
{
questionList
+=
x
+
","
;
})
},
save
()
{
const
{
isEmpty
,
data
}
=
this
.
$refs
.
signaturePad
.
saveSignature
();
},
getChecked
(
val
)
{
this
.
readyGetChecked
=
false
this
.
$refs
.
inStockManageInfo
.
visible
=
false
this
.
modalinfo
.
selectedRowKeys
=
[...
val
]
this
.
getSelectedMedical
(
val
)
},
changeWomenCardType
()
{
let
cardInfo
=
this
.
cardType
.
filter
(
item
=>
item
.
id
==
this
.
formData
.
womenCertificateType
)
this
.
formRules
.
womenIdCard
=
cardInfo
[
0
].
rule
;
this
.
$refs
[
"input3"
].
focus
();
},
changeMenCardType
()
{
let
cardInfo
=
this
.
cardType
.
filter
(
item
=>
item
.
id
==
this
.
formData
.
menCertificateType
)
this
.
formRules
.
menIdCard
=
cardInfo
[
0
].
rule
;
},
getSelectedMedical
(
val
)
{
//获取被选中的药具
if
(
val
.
length
>
0
)
{
let
par
=
{
idList
:
val
.
join
(
','
),
menuId
:
this
.
routerParams
.
menuId
}
this
.
$api
.
stockManage
.
fetchMedicalListByIds
(
par
).
then
(({
data
=
[]})
=>
{
this
.
formData
.
provideRecordList
=
data
this
.
formData
.
question
=
questionList
.
substring
(
0
,
questionList
.
length
-
1
);
}
else
{
this
.
formData
.
question
=
""
;
}
this
.
spinning
=
true
;
let
params
=
{};
const
{
id
,
parentDate
,
provideNumber
,
provideDate
,
registeredCode
,
presentCode
,
provideDoctorId
,
...
others
}
=
vm
.
formData
let
parentTime
=
moment
(
parentDate
).
format
(
'YYYY-MM-DD'
)
let
provideTme
=
moment
(
provideDate
).
format
(
'YYYY-MM-DD'
)
let
presentCodeInfo
=
""
,
registeredCodeInfo
=
""
;
if
(
presentCode
!=
null
&&
presentCode
.
length
>
1
)
{
presentCodeInfo
=
presentCode
;
}
else
{
presentCodeInfo
=
this
.
unitInfo
.
areaCode
;
}
if
(
registeredCode
!=
null
&&
registeredCode
.
length
>
1
)
{
registeredCodeInfo
=
registeredCode
;
}
else
{
registeredCodeInfo
=
this
.
unitInfo
.
areaCode
;
}
let
provideDoctorInfo
=
vm
.
doctorInfoList
.
filter
(
item
=>
item
.
id
==
provideDoctorId
)
params
=
{
id
:
id
,
parentDate
:
parentTime
,
provideDate
:
provideTme
,
registeredCode
:
registeredCodeInfo
,
presentCode
:
presentCodeInfo
,
provideDoctorId
:
provideDoctorInfo
[
0
].
id
,
provideDoctorName
:
provideDoctorInfo
[
0
].
staffName
,
provideNumber
:
provideNumber
,
...
others
}
params
.
menuId
=
this
.
routerParams
.
menuId
;
let
msg
=
this
.
modelType
==
'updateRecord'
?
'确定提交修改吗?'
:
'确定提交发放吗?'
this
.
$confirm
({
title
:
msg
,
okType
:
'success'
,
onOk
:
()
=>
{
if
(
this
.
modelType
==
'applyGrant'
)
{
params
.
applyId
=
vm
.
formData
.
applyId
this
.
$api
.
folviteApplyManage
.
addApplyGrant
(
params
).
then
(({
code
})
=>
{
vm
.
spinning
=
false
;
if
(
code
===
'SUCCESS'
)
{
this
.
$message
.
success
(
'发放成功!'
);
this
.
goBack
()
}
}).
catch
(()
=>
{
vm
.
spinning
=
false
});
return
;
}
if
(
this
.
modelType
==
'updateRecord'
)
{
this
.
$api
.
folviteApplyManage
.
addFolviteDistributionByApply
(
params
).
then
(({
code
})
=>
{
vm
.
spinning
=
false
;
if
(
code
===
'SUCCESS'
)
{
this
.
$message
.
success
(
'修改成功!'
);
this
.
goBack
()
}
}).
catch
(()
=>
{
vm
.
spinning
=
false
})
}
},
addMaterialDis
()
{
//发放
let
vm
=
this
;
this
.
$refs
.
formRef
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
checkedList
.
length
>
0
)
{
let
questionList
=
""
;
this
.
checkedList
.
forEach
(
x
=>
{
questionList
+=
x
+
","
;
})
this
.
formData
.
question
=
questionList
.
substring
(
0
,
questionList
.
length
-
1
);
}
else
{
this
.
formData
.
question
=
""
;
}
this
.
spinning
=
true
;
let
params
=
{};
const
{
id
,
parentDate
,
provideNumber
,
provideDate
,
presentCode
,
provideDoctorId
,
...
others
}
=
vm
.
formData
let
parentTime
=
moment
(
parentDate
).
format
(
'YYYY-MM-DD'
)
let
provideTme
=
moment
(
provideDate
).
format
(
'YYYY-MM-DD'
)
let
presentCodeInfo
=
""
;
if
(
presentCode
!=
null
&&
presentCode
.
length
>
1
)
{
presentCodeInfo
=
presentCode
;
}
else
{
presentCodeInfo
=
this
.
unitInfo
.
areaCode
;
}
let
provideDoctorInfo
=
vm
.
doctorInfoList
.
filter
(
item
=>
item
.
id
==
provideDoctorId
)
params
=
{
id
:
id
,
parentDate
:
parentTime
,
provideDate
:
provideTme
,
presentCode
:
presentCodeInfo
,
provideDoctorId
:
provideDoctorInfo
[
0
].
id
,
provideDoctorName
:
provideDoctorInfo
[
0
].
staffName
,
provideNumber
:
provideNumber
,
...
others
}
params
.
menuId
=
this
.
routerParams
.
menuId
;
let
msg
=
this
.
modelType
==
'updateRecord'
?
'确定提交修改吗?'
:
'确定提交发放吗?'
this
.
$confirm
({
title
:
msg
,
okType
:
'success'
,
onOk
:
()
=>
{
if
(
this
.
modelType
==
'applyGrant'
)
{
params
.
applyId
=
vm
.
formData
.
applyId
this
.
$api
.
folviteApplyManage
.
addApplyGrant
(
params
).
then
(({
code
})
=>
{
vm
.
spinning
=
false
;
if
(
code
===
'SUCCESS'
)
{
this
.
$message
.
success
(
'发放成功!'
);
this
.
goBack
()
}
}).
catch
(()
=>
{
vm
.
spinning
=
false
});
return
;
}
if
(
this
.
modelType
==
'updateRecord'
)
{
this
.
$api
.
folviteApplyManage
.
addFolviteDistributionByApply
(
params
).
then
(({
code
})
=>
{
vm
.
spinning
=
false
;
if
(
code
===
'SUCCESS'
)
{
this
.
$message
.
success
(
'修改成功!'
);
this
.
goBack
()
}
}).
catch
(()
=>
{
vm
.
spinning
=
false
})
return
;
}
this
.
$api
.
folviteDistributionManage
.
fetchAddFolviteDistribution
(
params
).
then
(({
code
})
=>
{
vm
.
spinning
=
false
;
if
(
code
===
'SUCCESS'
)
{
vm
.
$message
.
success
(
'发放成功!'
);
this
.
goBack
()
}
}).
catch
(()
=>
{
vm
.
spinning
=
false
})
},
onCancel
:
()
=>
{
vm
.
spinning
=
false
;
},
});
}
});
},
womenIdCardChange
()
{
if
(
!
this
.
formData
.
womenIdCard
)
{
return
}
if
(
this
.
modelType
==
'add'
)
{
this
.
getLastRecord
();
}
let
womenIdCard
=
this
.
formData
.
womenIdCard
.
trim
();
this
.
formData
.
womenIdCard
=
womenIdCard
;
if
(
this
.
formData
.
womenCertificateType
==
1
)
{
let
length
=
womenIdCard
.
length
;
if
(
length
==
15
|
length
==
18
)
{
let
year
=
this
.
formData
.
womenIdCard
.
substring
(
6
,
10
);
let
moth
=
this
.
formData
.
womenIdCard
.
substring
(
10
,
12
);
let
day
=
this
.
formData
.
womenIdCard
.
substring
(
12
,
14
);
this
.
formData
.
birthDate
=
year
+
"-"
+
moth
+
"-"
+
day
;
return
;
}
this
.
$api
.
folviteDistributionManage
.
fetchAddFolviteDistribution
(
params
).
then
(({
code
})
=>
{
vm
.
spinning
=
false
;
if
(
code
===
'SUCCESS'
)
{
vm
.
$message
.
success
(
'发放成功!'
);
this
.
goBack
()
}
}
}).
catch
(()
=>
{
vm
.
spinning
=
false
})
},
onCancel
:
()
=>
{
vm
.
spinning
=
false
;
},
});
}
});
},
womenIdCardChange
()
{
if
(
!
this
.
formData
.
womenIdCard
)
{
return
}
if
(
this
.
modelType
==
'add'
)
{
this
.
getLastRecord
();
}
let
womenIdCard
=
this
.
formData
.
womenIdCard
.
trim
();
this
.
formData
.
womenIdCard
=
womenIdCard
;
if
(
this
.
formData
.
womenCertificateType
==
1
)
{
let
length
=
womenIdCard
.
length
;
if
(
length
==
15
|
length
==
18
)
{
let
year
=
this
.
formData
.
womenIdCard
.
substring
(
6
,
10
);
let
moth
=
this
.
formData
.
womenIdCard
.
substring
(
10
,
12
);
let
day
=
this
.
formData
.
womenIdCard
.
substring
(
12
,
14
);
this
.
formData
.
birthDate
=
year
+
"-"
+
moth
+
"-"
+
day
;
}
}
},
//打开库存弹框
openStockModel
()
{
this
.
readyGetChecked
=
true
let
vm
=
this
this
.
$nextTick
(()
=>
{
vm
.
$refs
.
inStockManageInfo
.
visible
=
true
;
})
},
goBack
()
{
this
.
formData
=
{};
if
(
process
.
env
.
NODE_ENV
!==
"dev"
)
{
window
.
top
.
postMessage
({
messageType
:
'THIRD_PAGECHANGE'
,
name
:
`
${
this
.
routerParams
.
menuCode
}
`
,
source
:
"yesuan"
},
'*'
);
return
;
}
if
(
this
.
routerParams
.
routerFlag
==
"applyGrant"
)
{
this
.
$router
.
push
(
"/Home/folviteApply"
);
closedDetail
(
'/inStock/addMaterialDistribution'
,
'/Home/folviteApply'
);
}
else
{
this
.
$router
.
push
(
"/Home/folviteDistribution"
);
closedDetail
(
'/inStock/addMaterialDistribution'
,
'/Home/folviteDistribution'
)
}
},
}
},
//打开库存弹框
openStockModel
()
{
this
.
readyGetChecked
=
true
let
vm
=
this
this
.
$nextTick
(()
=>
{
vm
.
$refs
.
inStockManageInfo
.
visible
=
true
;
})
},
goBack
()
{
this
.
formData
=
{};
if
(
process
.
env
.
NODE_ENV
!==
"dev"
)
{
window
.
top
.
postMessage
({
messageType
:
'THIRD_PAGECHANGE'
,
name
:
`
${
this
.
routerParams
.
menuCode
}
`
,
source
:
"yesuan"
},
'*'
);
return
;
}
if
(
this
.
routerParams
.
routerFlag
==
"applyGrant"
)
{
this
.
$router
.
push
(
"/Home/folviteApply"
);
closedDetail
(
'/inStock/addMaterialDistribution'
,
'/Home/folviteApply'
);
}
else
{
this
.
$router
.
push
(
"/Home/folviteDistribution"
);
closedDetail
(
'/inStock/addMaterialDistribution'
,
'/Home/folviteDistribution'
)
}
},
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.title_img {
display: inline-block;
width: 24px;
height: 24px;
margin-top: -5px;
margin-left: 10px;
display: inline-block;
width: 24px;
height: 24px;
margin-top: -5px;
margin-left: 10px;
}
.title_font {
font-family: PingFang SC;
color: #595959;
font-weight: 600;
font-size: 16px;
line-height: 22px;
margin: 16px 0px 16px 18px;
font-family: PingFang SC;
color: #595959;
font-weight: 600;
font-size: 16px;
line-height: 22px;
margin: 16px 0px 16px 18px;
}
</
style
>
...
...
@@ -799,44 +847,44 @@ export default {
<
style
lang=
"less"
>
.book {
.ant-card-head-title {
padding: 0px !important;
}
.ant-card-head-title {
padding: 0px !important;
}
}
.sign {
position: absolute;
background: #FFF1F0;
border-radius: 0px 0px 24px 0px;
width: 60px;
height: 40px;
padding: 0px 16px;
position: absolute;
background: #FFF1F0;
border-radius: 0px 0px 24px 0px;
width: 60px;
height: 40px;
padding: 0px 16px;
}
.opt {
float: right;
margin-top: 10px;
float: right;
margin-top: 10px;
}
.table_input {
.ant-table-tbody > tr > td {
padding: 5px !important;
overflow-wrap: break-word;
}
.ant-table-tbody > tr > td {
padding: 5px !important;
overflow-wrap: break-word;
}
}
.modal_table {
.ant-form-item {
margin-bottom: 0px !important;
}
.ant-form-item {
margin-bottom: 0px !important;
}
}
.ant-checkbox-group-item {
display: block;
margin-top: 20px;
display: block;
margin-top: 20px;
}
.ant-checkbox-group {
width: 100%;
width: 100%;
}
</
style
>
folacin-pc/src/views/indexComponent/folviteDistribution/components/folviteDistributionDetail.vue
View file @
fe759723
<
template
>
<div>
<a-spin
tip=
"加载中..."
:spinning=
"spinning"
>
<a-card>
<div>
<div>
<span
style=
"font-size: 18px;font-weight: 600;color: #262626"
>
叶酸发放登记
</span>
</div>
<div
style=
"margin: 30px 0px"
>
<div
class=
"divider_my"
><span
class=
"midText"
>
居民信息
</span></div>
</div>
<div
style=
"clear: both"
></div>
<div
style=
"margin-top: 16px"
>
<div
class=
"detail_title"
>
<div
class=
"divider_my_dashed"
>
<span
class=
"midText"
style=
"font-size: 14px;color: #FF4D80;"
>
女方信息
</span>
</div>
<div
style=
"clear: both"
></div>
</div>
<a-descriptions
bordered
class=
"folvite_title"
>
<a-descriptions-item
label=
"姓名"
>
{{
detailInfo
.
womanName
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"证件类型"
>
{{
detailInfo
.
womenCertificateTypeName
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"证件号码"
>
{{
detailInfo
.
womenIdCard
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"出生日期"
>
{{
detailInfo
.
birthDate
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"身高"
>
{{
detailInfo
.
height
?
detailInfo
.
height
+
"cm"
:
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"体重"
>
{{
detailInfo
.
weight
?
detailInfo
.
weight
+
"kg"
:
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"BMI"
>
{{
detailInfo
.
bmi
?
detailInfo
.
bmi
:
'--'
}}
</a-descriptions-item>
</a-descriptions>
<div
class=
"detail_title"
style=
"border-top: 0px"
>
<div
class=
"divider_my_dashed"
>
<span
class=
"midText"
style=
"font-size: 14px;color: #FF4D80;"
>
其他信息
</span>
</div>
<div
style=
"clear: both"
></div>
</div>
<a-descriptions
bordered
class=
"folvite_title"
>
<a-descriptions-item
label=
"联系电话"
>
{{
detailInfo
.
telephone
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"现在住址"
>
{{
detailInfo
.
presentCodeName
||
'--'
}}
</a-descriptions-item>
<div>
<a-spin
tip=
"加载中..."
:spinning=
"spinning"
>
<a-card>
<div>
<div>
<span
style=
"font-size: 18px;font-weight: 600;color: #262626"
>
叶酸发放登记
</span>
</div>
<div
style=
"margin: 30px 0px"
>
<div
class=
"divider_my"
><span
class=
"midText"
>
居民信息
</span></div>
</div>
<div
style=
"clear: both"
></div>
<div
style=
"margin-top: 16px"
>
<div
class=
"detail_title"
>
<div
class=
"divider_my_dashed"
>
<span
class=
"midText"
style=
"font-size: 14px;color: #FF4D80;"
>
女方信息
</span>
</div>
<div
style=
"clear: both"
></div>
</div>
<a-descriptions
bordered
class=
"folvite_title"
:column=
"6"
>
<a-descriptions-item
label=
"姓名"
:span=
"2"
>
{{
detailInfo
.
womanName
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"证件类型"
:span=
"2"
>
{{
detailInfo
.
womenCertificateTypeName
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"证件号码"
:span=
"2"
>
{{
detailInfo
.
womenIdCard
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"出生日期"
:span=
"2"
>
{{
detailInfo
.
birthDate
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"联系电话"
:span=
"2"
>
{{
detailInfo
.
telephone
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"身高"
:span=
"2"
>
{{
detailInfo
.
height
?
detailInfo
.
height
+
"cm"
:
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"体重"
:span=
"2"
>
{{
detailInfo
.
weight
?
detailInfo
.
weight
+
"kg"
:
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"BMI"
:span=
"2"
>
{{
detailInfo
.
bmi
?
detailInfo
.
bmi
:
'--'
}}
</a-descriptions-item>
</a-descriptions>
<div
class=
"detail_title"
style=
"border-top: 0px"
>
<div
class=
"divider_my_dashed"
>
<span
class=
"midText"
style=
"font-size: 14px;color: #FF4D80;"
>
其他信息
</span>
</div>
<div
style=
"clear: both"
></div>
</div>
<a-descriptions
bordered
class=
"folvite_title"
:column=
"6"
>
<a-descriptions-item
label=
"户籍地址"
:span=
"2"
>
{{
detailInfo
.
registeredCodeName
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"户籍地址详细"
:span=
"2"
>
{{
detailInfo
.
permanentAddress
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"现住址"
:span=
"2"
>
{{
detailInfo
.
presentCodeName
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"详细地址
"
>
{{
detailInfo
.
nowAddress
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"签署方式"
:span=
"detailInfo.source == 2 ? 2: 1
"
>
{{
detailInfo
.
signedModeName
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"签署日期"
:span=
"detailInfo.source == 2 ? 2: 1
"
>
{{
detailInfo
.
parentDate
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"上传照片"
v-if=
"detailInfo.source !=
2"
>
<img
style=
"cursor: pointer"
width=
"120px"
height=
"120px"
:src=
"detailInfo.consentUrl"
@
click=
"showVisible=true"
/>
</a-descriptions-item>
<a-descriptions-item
label=
"签名"
v-if=
"detailInfo.source == 2
"
>
<img
style=
"margin-left: 30px;width: auto;height: 80px;transform: rotate(-90deg)"
:src=
"detailInfo.applySignUrl"
>
</a-descriptions-item>
</a-descriptions>
</div>
<a-descriptions-item
label=
"现住址详细"
:span=
"2
"
>
{{
detailInfo
.
nowAddress
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"签署方式"
:span=
"2
"
>
{{
detailInfo
.
signedModeName
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"签署日期"
:span=
"2
"
>
{{
detailInfo
.
parentDate
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"上传照片"
v-if=
"detailInfo.source != 2"
:span=
"
2"
>
<img
style=
"cursor: pointer"
width=
"120px"
height=
"120px"
:src=
"detailInfo.consentUrl"
@
click=
"showVisible=true"
/>
</a-descriptions-item>
<a-descriptions-item
label=
"签名"
v-if=
"detailInfo.source == 2"
:span=
"4
"
>
<img
style=
"margin-left: 30px;width: auto;height: 80px;transform: rotate(-90deg)"
:src=
"detailInfo.applySignUrl"
>
</a-descriptions-item>
</a-descriptions>
</div>
<div
style=
"margin: 30px 0px"
>
<div
class=
"divider_my"
><span
class=
"midText"
>
问卷
</span></div>
<div
style=
"clear: both"
></div>
</div>
<a-descriptions
bordered
class=
"folvite_title
"
>
<a-descriptions-item
label=
"结果"
>
<div
v-if=
"checkedList&&checkedList.length>0"
>
<p
v-for=
"item in checkedList "
>
{{
item
}}
</p>
</div>
<p
v-else
>
--
</p>
</a-descriptions-item>
<a-descriptions-item
label=
"建议服用
"
>
{{
detailInfo
.
recommendEat
||
'--'
}}
</a-descriptions-item>
</a-descriptions>
<!--发放信息-->
<div
style=
"margin: 30px 0px"
>
<div
class=
"divider_my"
><span
class=
"midText"
>
发放信息
</span></div>
<div
style=
"clear: both"
></div>
</div>
<a-descriptions
bordered
:column=
"3"
class=
"folvite_title"
>
<a-descriptions-item
label=
"发放日期"
>
{{
detailInfo
.
provideDate
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"发放数量"
>
{{
detailInfo
.
provideNumber
?
detailInfo
.
provideNumber
+
"瓶"
:
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"发放医生"
>
{{
detailInfo
.
provideDoctorName
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"备注"
>
{{
detailInfo
.
remarks
||
'--'
}}
</a-descriptions-item>
</a-descriptions>
</div>
<div
style=
"text-align: center;margin-top: 40px"
>
<a-button
class=
"ant-table-btn"
@
click=
"goBack"
>
关闭
</a-button>
</div>
</a-card>
</a-spin>
<a-modal
title=
"查看知情同意书"
:visible=
"showVisible"
@
cancel=
"showVisible = false"
@
ok=
"showVisible=false"
loading=
"true"
:maskClosable=
"false"
width=
"800px"
>
<div>
<img
style=
"width: 100%"
:src=
"detailInfo.consentUrl"
height=
"100%"
/>
</div>
</a-modal>
</div>
<div
style=
"margin: 30px 0px"
>
<div
class=
"divider_my"
><span
class=
"midText"
>
问卷
</span></div>
<div
style=
"clear: both"
></div>
</div>
<a-descriptions
bordered
class=
"folvite_title"
:column=
"4
"
>
<a-descriptions-item
label=
"结果"
:span=
"2"
>
<div
v-if=
"checkedList&&checkedList.length>0"
>
<p
v-for=
"item in checkedList "
>
{{
item
}}
</p>
</div>
<p
v-else
>
--
</p>
</a-descriptions-item>
<a-descriptions-item
label=
"建议服用"
:span=
"2
"
>
{{
detailInfo
.
recommendEat
||
'--'
}}
</a-descriptions-item>
</a-descriptions>
<!--发放信息-->
<div
style=
"margin: 30px 0px"
>
<div
class=
"divider_my"
><span
class=
"midText"
>
发放信息
</span></div>
<div
style=
"clear: both"
></div>
</div>
<a-descriptions
bordered
:column=
"3"
class=
"folvite_title"
>
<a-descriptions-item
label=
"发放日期"
>
{{
detailInfo
.
provideDate
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"发放数量"
>
{{
detailInfo
.
provideNumber
?
detailInfo
.
provideNumber
+
"瓶"
:
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"发放医生"
>
{{
detailInfo
.
provideDoctorName
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"备注"
>
{{
detailInfo
.
remarks
||
'--'
}}
</a-descriptions-item>
</a-descriptions>
</div>
<div
style=
"text-align: center;margin-top: 40px"
>
<a-button
class=
"ant-table-btn"
@
click=
"goBack"
>
关闭
</a-button>
</div>
</a-card>
</a-spin>
<a-modal
title=
"查看知情同意书"
:visible=
"showVisible"
@
cancel=
"showVisible = false"
@
ok=
"showVisible=false"
loading=
"true"
:maskClosable=
"false"
width=
"800px"
>
<div>
<img
style=
"width: 100%"
:src=
"detailInfo.consentUrl"
height=
"100%"
/>
</div>
</a-modal>
</div>
</
template
>
<
script
>
import
{
getEnumByFlag
}
from
"../../../utils/common"
;
export
default
{
data
()
{
return
{
routerParams
:
{},
detailInfo
:
{},
spinning
:
false
,
bookHtmlContent
:
{
content
:
undefined
},
showVisible
:
false
,
plainOptions
:
{},
checkedList
:
[],
data
()
{
return
{
routerParams
:
{},
detailInfo
:
{},
spinning
:
false
,
bookHtmlContent
:
{
content
:
undefined
},
showVisible
:
false
,
plainOptions
:
{},
checkedList
:
[],
}
},
created
()
{
let
questionEnum
=
getEnumByFlag
(
'folacin_resident_info_question'
);
questionEnum
.
forEach
(
enums
=>
{
this
.
plainOptions
[
"key"
+
enums
.
enumValue
]
=
enums
.
enumName
;
});
this
.
routerParams
=
this
.
$route
.
query
;
this
.
getStockListDetail
()
this
.
getBookHtmlContent
()
},
methods
:
{
getBookHtmlContent
()
{
//获取用户知情书模板
let
par
=
{
menuId
:
this
.
routerParams
.
menuId
}
this
.
$api
.
common
.
fetchConsentInfo
(
par
).
then
(({
data
})
=>
{
if
(
this
.
$api
.
utils
.
isBlank
(
data
))
{
this
.
bookHtmlContent
=
{
content
:
""
}
}
else
{
this
.
bookHtmlContent
=
data
;
}
})
},
created
()
{
let
questionEnum
=
getEnumByFlag
(
'folacin_resident_info_question'
);
questionEnum
.
forEach
(
enums
=>
{
this
.
plainOptions
[
"key"
+
enums
.
enumValue
]
=
enums
.
enumName
;
});
this
.
routerParams
=
this
.
$route
.
query
;
this
.
getStockListDetail
()
this
.
getBookHtmlContent
()
getStockListDetail
()
{
this
.
spinning
=
true
let
par
=
{
residentId
:
this
.
routerParams
.
id
,
}
this
.
$api
.
folviteDistributionManage
.
fetchFolviteDistributionDetail
(
par
).
then
(({
data
=
[],
code
})
=>
{
this
.
spinning
=
false
;
this
.
detailInfo
=
data
;
if
(
data
.
question
)
{
let
questionList
=
data
.
question
.
split
(
","
);
questionList
.
forEach
(
x
=>
{
this
.
checkedList
.
push
(
this
.
plainOptions
[
"key"
+
x
]);
})
}
}).
catch
(
res
=>
{
this
.
spinning
=
false
;
})
},
methods
:
{
getBookHtmlContent
()
{
//获取用户知情书模板
let
par
=
{
menuId
:
this
.
routerParams
.
menuId
}
this
.
$api
.
common
.
fetchConsentInfo
(
par
).
then
(({
data
})
=>
{
if
(
this
.
$api
.
utils
.
isBlank
(
data
))
{
this
.
bookHtmlContent
=
{
content
:
""
}
}
else
{
this
.
bookHtmlContent
=
data
;
}
})
},
getStockListDetail
()
{
this
.
spinning
=
true
let
par
=
{
residentId
:
this
.
routerParams
.
id
,
}
this
.
$api
.
folviteDistributionManage
.
fetchFolviteDistributionDetail
(
par
).
then
(({
data
=
[],
code
})
=>
{
this
.
spinning
=
false
;
this
.
detailInfo
=
data
;
if
(
data
.
question
)
{
let
questionList
=
data
.
question
.
split
(
","
);
questionList
.
forEach
(
x
=>
{
this
.
checkedList
.
push
(
this
.
plainOptions
[
"key"
+
x
]);
})
}
}).
catch
(
res
=>
{
this
.
spinning
=
false
;
})
},
goBack
()
{
if
(
process
.
env
.
NODE_ENV
==
"dev"
)
{
this
.
$router
.
push
(
"/Home/folviteDistribution"
);
}
else
{
window
.
top
.
postMessage
({
messageType
:
'THIRD_PAGECHANGE'
,
name
:
`
${
this
.
routerParams
.
menuCode
}
`
,
source
:
"yesuan"
},
'*'
)
}
},
goBack
()
{
if
(
process
.
env
.
NODE_ENV
==
"dev"
)
{
this
.
$router
.
push
(
"/Home/folviteDistribution"
);
}
else
{
window
.
top
.
postMessage
({
messageType
:
'THIRD_PAGECHANGE'
,
name
:
`
${
this
.
routerParams
.
menuCode
}
`
,
source
:
"yesuan"
},
'*'
)
}
},
},
}
</
script
>
<
style
lang=
"less"
scoped
>
...
...
folacin-pc/src/views/indexComponent/folviteDistribution/folviteDistribution.vue
View file @
fe759723
<
template
>
<div
class=
"inStockManage"
>
<a-form
layout=
"inline"
class=
"search_form"
>
<a-form-item
label=
"姓名"
>
<a-input
v-model=
"searchForm.womanName"
placeholder=
"请输入姓名"
style=
"width: 250px"
></a-input>
</a-form-item>
<a-form-item
label=
"证件号码"
>
<a-input
v-model=
"searchForm.womenIdCard"
placeholder=
"请输入证件号码"
style=
"width: 250px;margin-right: 10px"
></a-input>
<a-button
class=
"search_btn ant-table-btn"
@
click=
"getIdCardInfo"
>
读卡识别
</a-button>
</a-form-item>
<a-form-item
label=
"联系电话"
>
<a-input
v-model=
"searchForm.telephone"
placeholder=
"请输入联系电话"
style=
"width: 250px"
></a-input>
</a-form-item>
<a-form-item
label=
"发放日期"
>
<date-range-picker
:date
.
sync=
"searchForm.date"
></date-range-picker>
</a-form-item>
<a-form-item>
<a-button
type=
"primary"
icon=
"search"
class=
"search_btn"
style=
"margin-left: 10px"
@
click=
"searchList"
>
搜索
</a-button>
<a-button
class=
"search_btn ant-table-btn"
icon=
"sync"
style=
"margin-left: 10px"
@
click=
"restSearchForm"
>
清空
</a-button>
</a-form-item>
<div
class=
"inStockManage"
>
<a-form
layout=
"inline"
class=
"search_form"
>
<a-form-item
label=
"姓名"
>
<a-input
v-model=
"searchForm.womanName"
placeholder=
"请输入姓名"
style=
"width: 250px"
></a-input>
</a-form-item>
<a-form-item
label=
"证件号码"
>
<a-input
v-model=
"searchForm.womenIdCard"
placeholder=
"请输入证件号码"
style=
"width: 250px;margin-right: 10px"
></a-input>
<a-button
class=
"search_btn ant-table-btn"
@
click=
"getIdCardInfo"
>
读卡识别
</a-button>
</a-form-item>
<a-form-item
label=
"联系电话"
>
<a-input
v-model=
"searchForm.telephone"
placeholder=
"请输入联系电话"
style=
"width: 250px"
></a-input>
</a-form-item>
<a-form-item
label=
"发放日期"
>
<date-range-picker
:date
.
sync=
"searchForm.date"
></date-range-picker>
</a-form-item>
<a-form-item>
<a-button
type=
"primary"
icon=
"search"
class=
"search_btn"
style=
"margin-left: 10px"
@
click=
"searchList"
>
搜索
</a-button>
<a-button
class=
"search_btn ant-table-btn"
icon=
"sync"
style=
"margin-left: 10px"
@
click=
"restSearchForm"
>
清空
</a-button>
</a-form-item>
<a-button
type=
"primary"
class=
"search_btn"
style=
"float: right"
@
click=
"share"
v-if=
"showQrCode"
>
发放二维码
</a-button>
<a-button
type=
"primary"
class=
"search_btn"
style=
"float: right;margin-right: 20px"
@
click=
"toAdd"
>
发放登记
</a-button>
<div
style=
"clear: both"
></div>
</a-form>
<div
style=
"margin-top: 16px;margin-bottom: 10px"
></div>
<a-button
type=
"primary"
class=
"search_btn"
style=
"float: right"
@
click=
"share"
v-if=
"showQrCode"
>
发放二维码
</a-button>
<a-button
type=
"primary"
class=
"search_btn"
style=
"float: right;margin-right: 20px"
@
click=
"toAdd"
>
发放登记
</a-button>
<div
style=
"clear: both"
></div>
</a-form>
<div
style=
"margin-top: 16px;margin-bottom: 10px"
></div>
<a-table
:dataSource=
"tableData"
:columns=
"columns"
rowKey=
"id"
:loading=
"loading"
:pagination=
"false"
:scroll=
"
{ x: 1}"
>
<template
slot=
"expireDateS"
slot-scope=
"record"
>
{{
record
.
expireDate
|
formatDate
}}
</
template
>
<
template
slot=
"nowAddress"
slot-scope=
"text, record"
>
<a-tooltip
placement=
"top"
>
<template
slot=
"title"
>
<span>
{{
(
record
.
presentCodeName
||
""
)
+
record
.
nowAddress
}}
</span>
</
template
>
<span
class=
"ellipsis"
>
{{ (record.presentCodeName || "") + record.nowAddress }}
</span>
</a-tooltip>
</template>
<
template
slot=
"action"
slot-scope=
"record"
>
<a-button
class=
"ant-table-btn"
size=
"small"
@
click=
"toDetail(record)"
>
查看
</a-button>
<a-button
style=
"margin-left: 10px"
class=
"ant-table-btn"
size=
"small"
@
click=
"updateRecord(record)"
>
修改
</a-button>
<a-popconfirm
placement=
"top"
@
confirm=
"deleteRecord(record)"
cancelText=
"取消"
okText=
"确认"
>
<template
slot=
"title"
>
<p>
确认删除吗?
</p>
</
template
>
<a-button
style=
"margin-left: 10px"
class=
"ant-table-btn"
size=
"small"
>
删除
</a-button>
</a-popconfirm>
<a-button
class=
"ant-table-btn"
v-if=
"record.source===1&&record.isSigned===2"
size=
"small"
style=
"margin-left: 10px"
@
click=
"uploadConsentInfo(record)"
>
签署同意书
</a-button>
<a-button
class=
"ant-table-btn"
v-else
size=
"small"
style=
"margin-left: 10px"
@
click=
"showConsentInfo(record)"
>
已签同意书
</a-button>
</template>
</a-table>
<a-modal
title=
"上传知情同意书"
:visible=
"visible"
@
cancel=
"onCancel"
@
ok=
"onsubmit"
:maskClosable=
"false"
width=
"600px"
>
<span>
上传知情同意书:
</span>
<a-upload
style=
"display: inline"
name=
"file"
list-type=
"picture-card"
accept=
".jpg,.png"
:multiple=
"true"
:action=
"uploadAction"
:headers=
"headers"
@
reject=
"handleReject"
@
preview=
"preview"
@
change=
"handleChange"
:file-list=
"fileList"
>
<div>
<!--<a-icon type="plus"/>-->
<div
class=
"ant-upload-text"
>
上传本地文件
</div>
</div>
</a-upload>
<div>
<br/>
温馨提示:请上传JPG、PNG格式图片,图片大小不超过5M
<br/>
<a-table
:dataSource=
"tableData"
:columns=
"columns"
rowKey=
"id"
:loading=
"loading"
:pagination=
"false"
:scroll=
"
{ x: 1}"
>
<template
slot=
"expireDateS"
slot-scope=
"record"
>
{{
record
.
expireDate
|
formatDate
}}
</
template
>
<
template
slot=
"nowAddress"
slot-scope=
"text, record"
>
<a-tooltip
placement=
"top"
>
<template
slot=
"title"
>
<span>
{{
(
record
.
presentCodeName
||
""
)
+
record
.
nowAddress
}}
</span>
</
template
>
<span
class=
"ellipsis"
>
{{ (record.presentCodeName || "") + record.nowAddress }}
</span>
</a-tooltip>
</template>
<
template
slot=
"registeredCode"
slot-scope=
"text, record"
>
<a-tooltip
placement=
"top"
>
<template
slot=
"title"
>
<span>
{{
(
record
.
registeredCodeName
||
""
)
+
record
.
permanentAddress
}}
</span>
</
template
>
<span
class=
"ellipsis"
>
{{ (record.registeredCodeName || "") + record.permanentAddress }}
</span>
</a-tooltip>
</template>
<
template
slot=
"action"
slot-scope=
"record"
>
<a-button
class=
"ant-table-btn"
size=
"small"
@
click=
"toDetail(record)"
>
查看
</a-button>
<a-button
style=
"margin-left: 10px"
class=
"ant-table-btn"
size=
"small"
@
click=
"updateRecord(record)"
>
修改
</a-button>
<a-popconfirm
placement=
"top"
@
confirm=
"deleteRecord(record)"
cancelText=
"取消"
okText=
"确认"
>
<template
slot=
"title"
>
<p>
确认删除吗?
</p>
</
template
>
<a-button
style=
"margin-left: 10px"
class=
"ant-table-btn"
size=
"small"
>
删除
</a-button>
</a-popconfirm>
<a-button
class=
"ant-table-btn"
v-if=
"record.source===1&&record.isSigned===2"
size=
"small"
style=
"margin-left: 10px"
@
click=
"uploadConsentInfo(record)"
>
签署同意书
</a-button>
<a-button
class=
"ant-table-btn"
v-else
size=
"small"
style=
"margin-left: 10px"
@
click=
"showConsentInfo(record)"
>
已签同意书
</a-button>
</template>
</a-table>
<a-modal
title=
"上传知情同意书"
:visible=
"visible"
@
cancel=
"onCancel"
@
ok=
"onsubmit"
:maskClosable=
"false"
width=
"600px"
>
<span>
上传知情同意书:
</span>
<a-upload
style=
"display: inline"
name=
"file"
list-type=
"picture-card"
accept=
".jpg,.png"
:multiple=
"true"
:action=
"uploadAction"
:headers=
"headers"
@
reject=
"handleReject"
@
preview=
"preview"
@
change=
"handleChange"
:file-list=
"fileList"
>
<div>
<!--<a-icon type="plus"/>-->
<div
class=
"ant-upload-text"
>
上传本地文件
</div>
</div>
</a-upload>
<div>
<br/>
温馨提示:请上传JPG、PNG格式图片,图片大小不超过5M
<br/>
</div>
</a-modal>
<!--:getContainer="getContainer"-->
<a-modal
title=
"查看知情同意书"
:visible=
"showVisible"
@
cancel=
"showVisible = false"
cancelText=
"关闭"
:footer=
"null"
loading=
"true"
:maskClosable=
"false"
width=
"600px"
>
<div
v-if=
"currentRow.source==1"
>
<img
style=
"width: 100%"
:src=
"consentUrl"
height=
"100%"
/>
</div>
<div
v-else
>
<div>
<div
v-html=
"consentInfo"
style=
"width: 100%"
>
</div>
<div
style=
"float: right;margin-right: 50px"
>
<div
style=
""
>
签名:
<img
style=
"width:50px;height: 120px;transform: rotate(-90deg);margin-left: 60px"
:src=
"applySignUrl"
/></div>
<div>
签署日期:
<span
style=
"margin-left: 8px"
>
{{ currentRow.parentDate }}
</span></div>
</div>
<div
style=
"clear: both"
></div>
</div>
</div>
<br><br>
<a-button
style=
"margin-left:80%"
type=
"danger"
@
click=
"showVisible = false"
>
关闭
</a-button>
<br>
</a-modal>
<a-pagination
v-if=
"pagination.total > 0"
:total=
"pagination.total"
show-size-changer
show-quick-jumper
v-model=
"pagination.pageIndex"
:page-size=
"pagination.pageSize"
:page-size-options=
"pagination.pageSizeOptions"
@
showSizeChange=
"showSizeChange"
@
change=
"change"
:showTotal=
"() => `共 ${pagination.total} 条`"
/>
</div>
</a-modal>
<!--:getContainer="getContainer"-->
<a-modal
title=
"查看知情同意书"
:visible=
"showVisible"
@
cancel=
"showVisible = false"
cancelText=
"关闭"
:footer=
"null"
loading=
"true"
:maskClosable=
"false"
width=
"600px"
>
<div
v-if=
"currentRow.source==1"
>
<img
style=
"width: 100%"
:src=
"consentUrl"
height=
"100%"
/>
</div>
<div
v-else
>
<div>
<div
v-html=
"consentInfo"
style=
"width: 100%"
>
</div>
<div
style=
"float: right;margin-right: 50px"
>
<div
style=
""
>
签名:
<img
style=
"width:50px;height: 120px;transform: rotate(-90deg);margin-left: 60px"
:src=
"applySignUrl"
/></div>
<div>
签署日期:
<span
style=
"margin-left: 8px"
>
{{ currentRow.parentDate }}
</span></div>
</div>
<div
style=
"clear: both"
></div>
</div>
</div>
<br><br>
<a-button
style=
"margin-left:80%"
type=
"danger"
@
click=
"showVisible = false"
>
关闭
</a-button>
<br>
</a-modal>
<a-pagination
v-if=
"pagination.total > 0"
:total=
"pagination.total"
show-size-changer
show-quick-jumper
v-model=
"pagination.pageIndex"
:page-size=
"pagination.pageSize"
:page-size-options=
"pagination.pageSizeOptions"
@
showSizeChange=
"showSizeChange"
@
change=
"change"
:showTotal=
"() => `共 ${pagination.total} 条`"
/>
<a-modal
title=
""
:visible=
"qrCodeShow"
@
cancel=
"qrCodeShow = false"
cancelText=
"关闭"
:footer=
"null"
loading=
"true"
:maskClosable=
"false"
width=
"600px"
>
<div
ref=
"printContent"
style=
"text-align: center;margin-top: 10%"
>
<h2>
叶酸手机申请领取二维码(使用医站到家APP扫码领取)
</h2>
<img
width=
"80%"
:src=
"qrCodeUrl"
style=
"margin-left: 20px"
>
<br>
<center
style=
"font-size:18px "
>
{{ unitInfo.unitName }}
</center>
<br>
<br>
</div>
<center
@
click=
"qrCodePrint"
style=
"cursor: pointer"
>
<a-button>
打印
</a-button>
</center>
<a-modal
title=
""
:visible=
"qrCodeShow"
@
cancel=
"qrCodeShow = false"
cancelText=
"关闭"
:footer=
"null"
loading=
"true"
:maskClosable=
"false"
width=
"600px"
>
<div
ref=
"printContent"
style=
"text-align: center;margin-top: 10%"
>
<h2>
叶酸手机申请领取二维码(使用医站到家APP扫码领取)
</h2>
<img
width=
"80%"
:src=
"qrCodeUrl"
style=
"margin-left: 20px"
>
<br>
<center
style=
"font-size:18px "
>
{{ unitInfo.unitName }}
</center>
<br>
<br>
</div>
<center
@
click=
"qrCodePrint"
style=
"cursor: pointer"
>
<a-button>
打印
</a-button>
</center>
</a-modal>
</div>
</a-modal>
</div>
</template>
<
script
>
import
QRCode
from
'qrcode'
...
...
@@ -165,341 +173,349 @@ import {GetUserInfoByCardDevice, isEmptyParams} from "../../utils/common";
import
dateRangePicker
from
"../../components/dateRangePicker.vue"
;
const
columns
=
[
{
title
:
'发放日期'
,
dataIndex
:
'provideDate'
,
width
:
'140px'
{
title
:
'发放日期'
,
dataIndex
:
'provideDate'
,
width
:
'140px'
},
{
title
:
'姓名'
,
dataIndex
:
'womanName'
,
width
:
'100px'
,
ellipsis
:
true
,
},
{
title
:
'证件类型'
,
dataIndex
:
'womenCertificateTypeName'
,
width
:
'100px'
},
{
title
:
'证件号码'
,
dataIndex
:
'womenIdCard'
,
width
:
'180px'
},
{
title
:
'发放数量'
,
dataIndex
:
'provideNumber'
,
width
:
'100px'
},
{
title
:
'联系电话'
,
dataIndex
:
'telephone'
,
width
:
'140px'
},
{
title
:
'发放医生'
,
dataIndex
:
'provideDoctorName'
,
width
:
'180px'
},
{
title
:
'类型'
,
dataIndex
:
'sourceName'
,
width
:
'140px'
},
{
title
:
'户籍地址'
,
// dataIndex: 'nowAddress',
key
:
'registeredCode'
,
ellipsis
:
true
,
scopedSlots
:
{
customRender
:
'registeredCode'
},
},
{
title
:
'现住址'
,
// dataIndex: 'nowAddress',
key
:
'nowAddress'
,
ellipsis
:
true
,
scopedSlots
:
{
customRender
:
'nowAddress'
},
},
{
title
:
'操作'
,
fixed
:
'right'
,
align
:
'left'
,
width
:
"300px"
,
scopedSlots
:
{
customRender
:
'action'
},
},
]
export
default
{
components
:
{
dateRangePicker
},
data
()
{
return
{
// 搜索框对象
searchForm
:
{
date
:
[],
womenName
:
""
,
womenIdCard
:
undefined
,
telephone
:
""
},
pagination
:
{
pageIndex
:
1
,
pageSize
:
10
,
total
:
0
,
pageSizeOptions
:
[
'10'
,
'20'
,
'30'
,
'40'
,
'50'
],
},
columns
,
tableData
:
[],
loading
:
false
,
visible
:
false
,
showVisible
:
false
,
previewVisible
:
false
,
consentUrl
:
""
,
applySignUrl
:
""
,
consentInfo
:
""
,
headers
:
{
Authorization
:
sessionStorage
.
getItem
(
"token"
)
},
uploadAction
:
process
.
env
.
VUE_APP_BASE_URL
+
process
.
env
.
VUE_APP_SERVICE_API
+
"/v1/folacin-admin/sys-pictures-info/upload-img"
,
fileList
:
[],
formData
:
{
consentId
:
""
,
id
:
""
},
currentRow
:
{},
menuId
:
undefined
,
qrCodeShow
:
false
,
qrCodeUrl
:
""
,
unitInfo
:
{
unitName
:
""
},
printDisplay
:
'none'
,
showQrCode
:
process
.
env
.
VUE_APP_SHOW_QR_CODE
==
'true'
}
},
created
()
{
this
.
routerParams
=
this
.
$route
.
query
;
if
(
this
.
routerParams
.
menuId
)
{
window
.
sessionStorage
.
setItem
(
'menuId'
,
this
.
routerParams
.
menuId
);
this
.
menuId
=
this
.
routerParams
.
menuId
;
}
this
.
getDataList
();
},
methods
:
{
getIdCardInfo
()
{
GetUserInfoByCardDevice
().
then
(
res
=>
{
let
{
cardno
,
name
,
address
}
=
res
;
this
.
searchForm
.
womenIdCard
=
cardno
})
},
{
title
:
'姓名'
,
dataIndex
:
'womanName'
,
width
:
'100px'
,
ellipsis
:
true
,
searchList
()
{
this
.
pagination
.
pageIndex
=
1
;
this
.
getDataList
();
},
{
title
:
'证件类型'
,
dataIndex
:
'womenCertificateTypeName'
,
width
:
'100px'
getDataList
()
{
this
.
loading
=
true
let
pars
=
isEmptyParams
(
this
.
searchForm
)
let
par
=
{
...
pars
,
provideDateStart
:
this
.
searchForm
.
date
[
0
],
provideDateEnd
:
this
.
searchForm
.
date
[
1
],
pageIndex
:
this
.
pagination
.
pageIndex
,
pageSize
:
this
.
pagination
.
pageSize
,
menuId
:
this
.
menuId
}
this
.
$api
.
folviteDistributionManage
.
fetchFolviteDistributionList
(
par
).
then
(({
data
=
{}})
=>
{
const
{
dataList
=
[],
total
=
0
}
=
data
;
this
.
tableData
=
dataList
this
.
pagination
.
total
=
total
this
.
loading
=
false
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
{
title
:
'证件号码'
,
dataIndex
:
'womenIdCard'
,
width
:
'180px'
// 分页
showSizeChange
(
pageNum
,
pageSize
)
{
this
.
pagination
.
pageIndex
=
1
;
this
.
pagination
.
pageSize
=
pageSize
;
this
.
getDataList
()
},
{
title
:
'发放数量'
,
dataIndex
:
'provideNumber'
,
width
:
'100px'
change
(
pageNum
,
pageSize
)
{
this
.
pagination
.
pageIndex
=
pageNum
;
this
.
pagination
.
pageSize
=
pageSize
;
this
.
getDataList
()
},
{
title
:
'联系电话'
,
dataIndex
:
'telephone'
,
width
:
'140px'
restSearchForm
()
{
this
.
searchForm
=
{
idCar
:
undefined
,
date
:
[]
}
this
.
searchList
()
},
{
title
:
'发放医生'
,
dataIndex
:
'provideDoctorName'
,
width
:
'180px'
toAdd
()
{
if
(
process
.
env
.
NODE_ENV
==
"dev"
)
{
this
.
$router
.
push
({
path
:
'/folviteDistribution/add'
,
query
:
{
routerFlag
:
'add'
,
menuId
:
this
.
menuId
}})
}
else
{
let
now_location
=
escape
(
process
.
env
.
VUE_APP_LOCATION
+
`folviteDistribution/add?menuId=
${
this
.
menuId
}
&menuCode=
${
this
.
routerParams
.
menuName
}
&routerFlag=add`
)
window
.
top
.
postMessage
({
messageType
:
'THIRD_PAGEADD'
,
title
:
`发放登记`
,
url
:
now_location
},
'*'
)
}
},
{
title
:
'类型'
,
dataIndex
:
'sourceName'
,
width
:
'140px'
toDetail
(
record
)
{
if
(
process
.
env
.
NODE_ENV
==
"dev"
)
{
let
par
=
{
menuId
:
this
.
menuId
,
id
:
record
.
id
}
this
.
$router
.
push
({
path
:
'/folviteDistribution/detail'
,
query
:
par
})
}
else
{
let
now_location
=
escape
(
process
.
env
.
VUE_APP_LOCATION
+
`folviteDistribution/detail?menuId=
${
this
.
menuId
}
&menuCode=
${
this
.
routerParams
.
menuName
}
&id=
${
record
.
id
}
&source=
${
record
.
source
}
`
)
window
.
top
.
postMessage
({
messageType
:
'THIRD_PAGEADD'
,
title
:
`查看详情`
,
url
:
now_location
},
'*'
)
}
},
{
title
:
'现住址'
,
// dataIndex: 'nowAddress',
key
:
'nowAddress'
,
ellipsis
:
true
,
scopedSlots
:
{
customRender
:
'nowAddress'
},
updateRecord
(
record
)
{
if
(
process
.
env
.
NODE_ENV
==
"dev"
)
{
let
params
=
{
id
:
record
.
id
,
routerFlag
:
'updateRecord'
,
menuId
:
this
.
menuId
}
this
.
$router
.
push
({
path
:
'/folviteDistribution/add'
,
query
:
params
})
}
else
{
let
now_location
=
escape
(
process
.
env
.
VUE_APP_LOCATION
+
`folviteDistribution/add?menuId=
${
this
.
menuId
}
&menuCode=
${
this
.
routerParams
.
menuName
}
&routerFlag=updateRecord&id=`
+
record
.
id
)
window
.
top
.
postMessage
({
messageType
:
'THIRD_PAGEADD'
,
title
:
`叶酸发放登记修改-`
+
record
.
womanName
,
url
:
now_location
},
'*'
)
}
},
{
title
:
'操作'
,
fixed
:
'right'
,
align
:
'left'
,
width
:
"300px"
,
scopedSlots
:
{
customRender
:
'action'
},
deleteRecord
(
record
)
{
this
.
$api
.
folviteDistributionManage
.
fetchFolviteDelete
(
record
.
id
).
then
(({
data
=
[],
code
})
=>
{
if
(
code
==
'SUCCESS'
)
{
this
.
$message
.
success
(
"删除成功!"
);
this
.
getDataList
();
}
else
{
this
.
$message
.
error
(
"删除失败!"
);
}
})
},
]
export
default
{
components
:
{
dateRangePicker
},
data
()
{
return
{
// 搜索框对象
searchForm
:
{
date
:
[],
womenName
:
""
,
womenIdCard
:
undefined
,
telephone
:
""
},
pagination
:
{
pageIndex
:
1
,
pageSize
:
10
,
total
:
0
,
pageSizeOptions
:
[
'10'
,
'20'
,
'30'
,
'40'
,
'50'
],
},
columns
,
tableData
:
[],
loading
:
false
,
visible
:
false
,
showVisible
:
false
,
previewVisible
:
false
,
consentUrl
:
""
,
applySignUrl
:
""
,
consentInfo
:
""
,
headers
:
{
Authorization
:
sessionStorage
.
getItem
(
"token"
)
},
uploadAction
:
process
.
env
.
VUE_APP_BASE_URL
+
process
.
env
.
VUE_APP_SERVICE_API
+
"/v1/folacin-admin/sys-pictures-info/upload-img"
,
fileList
:
[],
formData
:
{
consentId
:
""
,
id
:
""
},
currentRow
:
{},
menuId
:
undefined
,
qrCodeShow
:
false
,
qrCodeUrl
:
""
,
unitInfo
:
{
unitName
:
""
},
printDisplay
:
'none'
,
showQrCode
:
process
.
env
.
VUE_APP_SHOW_QR_CODE
==
'true'
uploadConsentInfo
(
row
)
{
this
.
formData
.
id
=
row
.
id
;
this
.
visible
=
true
;
},
showConsentInfo
(
row
)
{
this
.
currentRow
=
row
;
this
.
showVisible
=
true
;
let
par
=
{
menuId
:
this
.
menuId
,
residentId
:
row
.
id
}
this
.
$api
.
folviteDistributionManage
.
fetchFolviteDistributionDetail
(
par
).
then
(({
data
=
[],
code
})
=>
{
this
.
consentUrl
=
data
.
consentUrl
;
this
.
applySignUrl
=
data
.
applySignUrl
;
})
if
(
row
.
source
==
2
)
{
let
par
=
{
menuId
:
this
.
menuId
}
this
.
$api
.
common
.
fetchConsentInfoShow
(
par
).
then
(({
data
})
=>
{
if
(
this
.
$api
.
utils
.
isNoBlank
(
data
))
{
this
.
consentInfo
=
data
.
content
;
}
})
}
},
created
()
{
this
.
routerParams
=
this
.
$route
.
query
;
if
(
this
.
routerParams
.
menuId
)
{
window
.
sessionStorage
.
setItem
(
'menuId'
,
this
.
routerParams
.
menuId
);
this
.
menuId
=
this
.
routerParams
.
menuId
;
handleChange
(
info
)
{
let
fileList
=
[...
info
.
fileList
];
fileList
=
fileList
.
slice
(
-
1
);
let
isFail
=
false
;
fileList
=
fileList
.
map
(
file
=>
{
if
(
file
.
response
)
{
if
(
file
.
response
.
code
!=
'SUCCESS'
)
{
isFail
=
true
;
return
;
}
this
.
consentUrl
=
file
.
response
.
data
.
trueDownloadUrl
;
this
.
formData
.
consentId
=
file
.
response
.
data
.
id
;
}
this
.
getDataList
();
return
file
;
});
if
(
isFail
)
{
this
.
formData
.
consentId
=
""
;
this
.
$message
.
warning
(
"文件上传失败"
);
return
;
}
if
(
fileList
.
length
==
0
)
{
this
.
formData
.
consentId
=
""
;
}
this
.
fileList
=
fileList
;
},
methods
:
{
getIdCardInfo
()
{
GetUserInfoByCardDevice
().
then
(
res
=>
{
let
{
cardno
,
name
,
address
}
=
res
;
this
.
searchForm
.
womenIdCard
=
cardno
})
},
searchList
()
{
this
.
pagination
.
pageIndex
=
1
;
this
.
getDataList
();
},
getDataList
()
{
this
.
loading
=
true
let
pars
=
isEmptyParams
(
this
.
searchForm
)
let
par
=
{
...
pars
,
provideDateStart
:
this
.
searchForm
.
date
[
0
],
provideDateEnd
:
this
.
searchForm
.
date
[
1
],
pageIndex
:
this
.
pagination
.
pageIndex
,
pageSize
:
this
.
pagination
.
pageSize
,
menuId
:
this
.
menuId
}
this
.
$api
.
folviteDistributionManage
.
fetchFolviteDistributionList
(
par
).
then
(({
data
=
{}})
=>
{
const
{
dataList
=
[],
total
=
0
}
=
data
;
this
.
tableData
=
dataList
this
.
pagination
.
total
=
total
this
.
loading
=
false
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
// 分页
showSizeChange
(
pageNum
,
pageSize
)
{
this
.
pagination
.
pageIndex
=
1
;
this
.
pagination
.
pageSize
=
pageSize
;
this
.
getDataList
()
},
change
(
pageNum
,
pageSize
)
{
this
.
pagination
.
pageIndex
=
pageNum
;
this
.
pagination
.
pageSize
=
pageSize
;
this
.
getDataList
()
},
restSearchForm
()
{
this
.
searchForm
=
{
idCar
:
undefined
,
date
:
[]
}
this
.
searchList
()
},
toAdd
()
{
if
(
process
.
env
.
NODE_ENV
==
"dev"
)
{
this
.
$router
.
push
({
path
:
'/folviteDistribution/add'
,
query
:
{
routerFlag
:
'add'
,
menuId
:
this
.
menuId
}})
}
else
{
let
now_location
=
escape
(
process
.
env
.
VUE_APP_LOCATION
+
`folviteDistribution/add?menuId=
${
this
.
menuId
}
&menuCode=
${
this
.
routerParams
.
menuName
}
&routerFlag=add`
)
window
.
top
.
postMessage
({
messageType
:
'THIRD_PAGEADD'
,
title
:
`发放登记`
,
url
:
now_location
},
'*'
)
}
},
toDetail
(
record
)
{
if
(
process
.
env
.
NODE_ENV
==
"dev"
)
{
let
par
=
{
menuId
:
this
.
menuId
,
id
:
record
.
id
}
this
.
$router
.
push
({
path
:
'/folviteDistribution/detail'
,
query
:
par
})
}
else
{
let
now_location
=
escape
(
process
.
env
.
VUE_APP_LOCATION
+
`folviteDistribution/detail?menuId=
${
this
.
menuId
}
&menuCode=
${
this
.
routerParams
.
menuName
}
&id=
${
record
.
id
}
&source=
${
record
.
source
}
`
)
window
.
top
.
postMessage
({
messageType
:
'THIRD_PAGEADD'
,
title
:
`查看详情`
,
url
:
now_location
},
'*'
)
}
},
updateRecord
(
record
)
{
if
(
process
.
env
.
NODE_ENV
==
"dev"
)
{
let
params
=
{
id
:
record
.
id
,
routerFlag
:
'updateRecord'
,
menuId
:
this
.
menuId
}
this
.
$router
.
push
({
path
:
'/folviteDistribution/add'
,
query
:
params
})
}
else
{
let
now_location
=
escape
(
process
.
env
.
VUE_APP_LOCATION
+
`folviteDistribution/add?menuId=
${
this
.
menuId
}
&menuCode=
${
this
.
routerParams
.
menuName
}
&routerFlag=updateRecord&id=`
+
record
.
id
)
window
.
top
.
postMessage
({
messageType
:
'THIRD_PAGEADD'
,
title
:
`叶酸发放登记修改-`
+
record
.
womanName
,
url
:
now_location
},
'*'
)
}
},
deleteRecord
(
record
)
{
this
.
$api
.
folviteDistributionManage
.
fetchFolviteDelete
(
record
.
id
).
then
(({
data
=
[],
code
})
=>
{
if
(
code
==
'SUCCESS'
)
{
this
.
$message
.
success
(
"删除成功!"
);
this
.
getDataList
();
}
else
{
this
.
$message
.
error
(
"删除失败!"
);
}
})
},
uploadConsentInfo
(
row
)
{
this
.
formData
.
id
=
row
.
id
;
this
.
visible
=
true
;
},
showConsentInfo
(
row
)
{
this
.
currentRow
=
row
;
this
.
showVisible
=
true
;
let
par
=
{
menuId
:
this
.
menuId
,
residentId
:
row
.
id
}
this
.
$api
.
folviteDistributionManage
.
fetchFolviteDistributionDetail
(
par
).
then
(({
data
=
[],
code
})
=>
{
this
.
consentUrl
=
data
.
consentUrl
;
this
.
applySignUrl
=
data
.
applySignUrl
;
})
if
(
row
.
source
==
2
)
{
let
par
=
{
menuId
:
this
.
menuId
}
this
.
$api
.
common
.
fetchConsentInfoShow
(
par
).
then
(({
data
})
=>
{
if
(
this
.
$api
.
utils
.
isNoBlank
(
data
))
{
this
.
consentInfo
=
data
.
content
;
}
})
}
},
handleChange
(
info
)
{
let
fileList
=
[...
info
.
fileList
];
fileList
=
fileList
.
slice
(
-
1
);
let
isFail
=
false
;
fileList
=
fileList
.
map
(
file
=>
{
if
(
file
.
response
)
{
if
(
file
.
response
.
code
!=
'SUCCESS'
)
{
isFail
=
true
;
return
;
}
this
.
consentUrl
=
file
.
response
.
data
.
trueDownloadUrl
;
this
.
formData
.
consentId
=
file
.
response
.
data
.
id
;
}
return
file
;
});
if
(
isFail
)
{
this
.
formData
.
consentId
=
""
;
this
.
$message
.
warning
(
"文件上传失败"
);
return
;
}
if
(
fileList
.
length
==
0
)
{
this
.
formData
.
consentId
=
""
;
}
this
.
fileList
=
fileList
;
},
handleReject
(
info
)
{
this
.
$message
.
warning
(
'请上传JPG、PNG格式图片'
);
return
false
;
},
preview
(
val
)
{
window
.
open
(
val
.
response
.
data
.
trueDownloadUrl
)
},
onCancel
()
{
this
.
visible
=
false
;
this
.
fileList
=
[];
this
.
formData
.
consentId
=
null
;
},
onsubmit
()
{
if
(
this
.
currentRow
.
source
==
1
)
{
this
.
visible
=
false
;
return
;
}
if
(
this
.
$api
.
utils
.
isBlank
(
this
.
formData
.
consentId
))
{
this
.
$message
.
warning
(
'请上传文件'
);
return
;
}
let
par
=
{
...
this
.
formData
,
menuId
:
this
.
menuId
}
this
.
$api
.
folviteDistributionManage
.
fetchFolviteUploadConsent
(
par
).
then
(
res
=>
{
if
(
res
.
code
===
'SUCCESS'
)
{
this
.
fileList
=
[];
this
.
formData
.
consentId
=
""
;
this
.
searchList
();
this
.
visible
=
false
;
}
})
},
share
()
{
this
.
qrCodeShow
=
true
;
//不是一个链接APP不给回调,就用一下公司域名吧
let
url
=
"https://www.yiboshi.com?"
+
this
.
unitInfo
.
id
;
QRCode
.
toDataURL
(
url
,
{
width
:
500
,
height
:
400
,
margin
:
2
})
.
then
(
qrCodeUrl
=>
{
this
.
qrCodeUrl
=
qrCodeUrl
;
}).
catch
(
err
=>
{
// console.error(err);
});
},
qrCodePrint
()
{
this
.
printDisplay
=
'block'
;
this
.
$print
(
this
.
$refs
.
printContent
);
// window.print("
<
H1
>
HAHA
<
/H1>"
)
;
handleReject
(
info
)
{
this
.
$message
.
warning
(
'请上传JPG、PNG格式图片'
);
return
false
;
},
preview
(
val
)
{
window
.
open
(
val
.
response
.
data
.
trueDownloadUrl
)
},
onCancel
()
{
this
.
visible
=
false
;
this
.
fileList
=
[];
this
.
formData
.
consentId
=
null
;
},
onsubmit
()
{
if
(
this
.
currentRow
.
source
==
1
)
{
this
.
visible
=
false
;
return
;
}
if
(
this
.
$api
.
utils
.
isBlank
(
this
.
formData
.
consentId
))
{
this
.
$message
.
warning
(
'请上传文件'
);
return
;
}
let
par
=
{
...
this
.
formData
,
menuId
:
this
.
menuId
}
this
.
$api
.
folviteDistributionManage
.
fetchFolviteUploadConsent
(
par
).
then
(
res
=>
{
if
(
res
.
code
===
'SUCCESS'
)
{
this
.
fileList
=
[];
this
.
formData
.
consentId
=
""
;
this
.
searchList
();
this
.
visible
=
false
;
}
})
},
share
()
{
this
.
qrCodeShow
=
true
;
//不是一个链接APP不给回调,就用一下公司域名吧
let
url
=
"https://www.yiboshi.com?"
+
this
.
unitInfo
.
id
;
QRCode
.
toDataURL
(
url
,
{
width
:
500
,
height
:
400
,
margin
:
2
})
.
then
(
qrCodeUrl
=>
{
this
.
qrCodeUrl
=
qrCodeUrl
;
}).
catch
(
err
=>
{
// console.error(err);
});
},
mounted
()
{
let
that
=
this
;
window
.
addEventListener
(
"message"
,
function
(
data
)
{
that
.
getDataList
();
});
let
timer
=
setInterval
(
res
=>
{
let
unitInfo
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'unitInfo'
));
if
(
unitInfo
)
{
that
.
unitInfo
=
unitInfo
;
clearInterval
(
timer
)
}
},
500
)
qrCodePrint
()
{
this
.
printDisplay
=
'block'
;
this
.
$print
(
this
.
$refs
.
printContent
);
// window.print("
<
H1
>
HAHA
<
/H1>"
)
;
}
},
mounted
()
{
let
that
=
this
;
window
.
addEventListener
(
"message"
,
function
(
data
)
{
that
.
getDataList
();
});
let
timer
=
setInterval
(
res
=>
{
let
unitInfo
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'unitInfo'
));
if
(
unitInfo
)
{
that
.
unitInfo
=
unitInfo
;
clearInterval
(
timer
)
}
},
500
)
}
}
</
script
>
<
style
lang=
"less"
scoped
>
// 文件上传样式
.ant-upload-select-picture-card i {
font-size: 32px;
color: #999;
font-size: 32px;
color: #999;
}
.ant-upload-select-picture-card .ant-upload-text {
margin-top: 6px;
color: #666;
margin-top: 6px;
color: #666;
}
.btn_space {
margin-right: 5px;
margin-right: 5px;
}
/* .search_form {
...
...
@@ -509,11 +525,11 @@ export default {
padding: 30px;
}*/
.ellipsis {
display: block;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
///deep/ .ant-table-tbody{
...
...
folacin-pc/src/views/utils/common.js
View file @
fe759723
...
...
@@ -105,30 +105,6 @@ export const timeFormat = (time, format = 'YYYY-MM-DD') => {
return
atime
}
/**
* 非空判断 已挂载到原型上$isNot
* 解决Vue Template模板中无法使用可选链的问题
* eg:
* let ces = {
data: {
data1: {
name: '测试'
}
}
}
let b = this.$isNot(ces, 'data', 'data1', 'name') //测试
{{$isNot(ces, 'data', 'data1', 'name')}} //测试
*/
// export const optionalChaining = (obj, ...rest) => {
// let tmp = obj;
// for (let key in rest) {
// let name = rest[key];
// tmp = tmp?.[name]; //es11可选链
// }
// return tmp ?? "未知";
// };
// 校验手机号
export
const
checkPhone
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
==
''
||
value
==
undefined
)
{
...
...
@@ -231,18 +207,22 @@ export function areCodeTrans(areaCode) {
//末尾填充0实现
return
areCodeTrans2
(
areaCode
);
}
areaCode
=
areaCode
.
replaceAll
(
"0000000000"
,
""
);
areaCode
=
areaCode
.
replaceAll
(
"00000000"
,
""
);
areaCode
=
areaCode
.
replaceAll
(
"000000"
,
""
);
areaCode
=
areaCode
.
replaceAll
(
"000"
,
""
);
//末尾不填充0实现
if
(
areaCode
.
length
>=
2
)
{
areaCodeList
.
push
(
areaCode
.
substring
(
0
,
2
))
}
if
(
areaCode
.
length
>=
4
)
{
areaCodeList
.
push
(
areaCode
.
substring
(
0
,
4
))
areaCodeList
.
push
(
areaCode
.
substring
(
0
,
4
)
+
"00000000"
)
}
if
(
areaCode
.
length
>=
6
)
{
areaCodeList
.
push
(
areaCode
.
substring
(
0
,
6
))
areaCodeList
.
push
(
areaCode
.
substring
(
0
,
6
)
+
"000000"
)
}
if
(
areaCode
.
length
>=
9
)
{
areaCodeList
.
push
(
areaCode
.
substring
(
0
,
9
))
areaCodeList
.
push
(
areaCode
.
substring
(
0
,
9
)
+
"000"
)
}
if
(
areaCode
.
length
>=
12
)
{
areaCodeList
.
push
(
areaCode
)
...
...
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