Commit aa899207 authored by 罗成兵's avatar 罗成兵

测试BU修改

parent 57789e22
NODE_ENV = test
VUE_APP_BASE_URL = http://123.56.183.13:8083
VUE_APP_BASE_URL1 = http://123.56.183.13:8083
VUE_APP_BASE_URL = https://beta-ysservice.yiboshi.com
VUE_APP_LOCATION = https://beta-yesuan.yiboshi.com/#/
VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com
VUE_APP_KEY_WORD = 'XwKsGlMcdPMEhR1B'
......@@ -10,7 +10,7 @@
"build:yueyang": "vue-cli-service build --mode yueyang"
},
"dependencies": {
"ant-design-vue": "^1.6.4",
"ant-design-vue": "^1.7.8",
"axios": "^0.19.2",
"compression-webpack-plugin": "5.0.0",
"core-js": "^3.6.5",
......
......@@ -53,6 +53,9 @@ export default {
fetchConsentInfo(params) {//查询单位的知情同意书
return fetch(`/v1/folacin-admin/folacin-consent-info/consent`, params)
},
fetchConsentInfoShow(params) {//查询单位的知情同意书
return fetch(`/v1/folacin-admin/folacin-consent-info/consent-info`, params)
},
fetchAddConsentInfo(params) {//新增单位的知情同意书
return fetch(`/v1/folacin-admin/folacin-consent-info`, params, "post", "json")
},
......
......@@ -13,7 +13,7 @@ import 'ant-design-vue/dist/antd.less'
// import 'nprogress/nprogress.css'
import './antd/register'
import api from './api'
import {optionalChaining} from "./views/utils/common";
// import {optionalChaining} from "./views/utils/common";
import Moment from 'moment';
import './views/utils/directives/debounce'
import './views/utils/directives/throttle'
......@@ -25,7 +25,7 @@ import {message, modal} from 'ant-design-vue'
const {confirm} = modal
Vue.prototype.$api = api;
Vue.prototype.$isNot = optionalChaining; // 非空判断,为空返回 "未知"
// Vue.prototype.$isNot = optionalChaining; // 非空判断,为空返回 "未知"
Vue.prototype.$message= message
Vue.prototype.$confirm= confirm
Vue.filter('formatDate', function(value) {// 定义全局时间戳过滤器
......
......@@ -11,11 +11,6 @@
<a-input placeholder="请输入用户名" v-model="formData.username" size="large" @keyup.enter="login">
<a-icon slot="prefix" type="user"/>
</a-input>
<!-- <a-select v-model="formData.username" size="large" @change="userChange">-->
<!-- <a-select-option v-for="(i,index) in userList" :key="i.userName" :value="index">-->
<!-- {{ i.unitName + "(" + i.userName + ")" }}-->
<!-- </a-select-option>-->
<!-- </a-select>-->
</a-form-model-item>
<a-form-model-item prop="password">
<a-input-password placeholder="请输入密码" v-model="formData.password" size="large"
......@@ -60,7 +55,9 @@ export default {
data() {
return {
userList: [],
formData: {},
formData: {
password:"YNybs2021?"
},
formRules: {},
captchaVerificationVis: true,
captchaVerification: {},
......@@ -70,9 +67,6 @@ export default {
created() {
},
methods: {
userChange(value) {
this.formData.password = "YNybs2021?";
},
login() {
this.loading = true;
let fromData = new FormData();
......
......@@ -89,20 +89,11 @@
title: '确定提交吗?',
okType: 'success',
onOk: () => {
if (this.modeType === "add") {
vm.$api.common.fetchAddConsentInfo(this.formData).then(res => {
if (res.code === 'SUCCESS') {
vm.$message.success('操作成功!')
}
})
} else {
vm.$api.common.fetchUpdateConsentInfo(this.formData).then(res => {
if (res.code === 'SUCCESS') {
vm.$message.success('操作成功!')
}
})
}
},
onCancel: () => {
},
......
......@@ -5,7 +5,7 @@
<a-select v-model="searchForm.status" placeholder="请选择" style="width: 250px">
<a-select-option value="">全部</a-select-option>
<a-select-option v-for="item in statusList" :key="item.enumValue" :value="item.enumValue">
{{item.enumName}}
{{ item.enumName }}
</a-select-option>
</a-select>
</a-form-item>
......@@ -18,7 +18,9 @@
<a-input v-model="searchForm.telephone" placeholder="请输入联系电话" style="width: 250px"></a-input>
</a-form-item>
<a-button type="primary" icon="search" class="search_btn" @click="searchList">搜索</a-button>
<a-button class="search_btn ant-table-btn" icon="sync" style="margin-left: 10px" @click="restSearchForm">清空</a-button>
<a-button class="search_btn ant-table-btn" icon="sync" style="margin-left: 10px" @click="restSearchForm">
清空
</a-button>
<div style="clear: both"></div>
</a-form>
......@@ -31,11 +33,14 @@
:scroll="{ x: 1}"
>
<template slot="expireDateS" slot-scope="record">
{{record.expireDate | formatDate}}
{{ record.expireDate | formatDate }}
</template>
<template slot="action" slot-scope="record">
<a-button class="ant-table-btn" size="small" @click="toDetail(record)" :disabled="record.status===2">发放</a-button>
<a-button style="margin-left: 5px" class="ant-table-btn" size="small" @click="deleteConfirm(record)" :disabled="record.status===2">删除
<a-button class="ant-table-btn" size="small" @click="toDetail(record)" :disabled="record.status===2">
发放
</a-button>
<a-button style="margin-left: 5px" class="ant-table-btn" size="small" @click="deleteConfirm(record)"
:disabled="record.status===2">删除
</a-button>
</template>
</a-table>
......@@ -54,210 +59,214 @@
</div>
</template>
<script>
import {getEnumByFlag, isEmptyParams} from "../../utils/common";
import moment from 'moment'
import {getEnumByFlag, isEmptyParams} from "../../utils/common";
import moment from 'moment'
const columns = [
{
title: '女方姓名',
dataIndex: 'womanName',
width:"140px"
},
{
title: '证件类型',
dataIndex: 'womenCertificateTypeName',
width:'140px'
},
{
title: '证件号码',
width: '220px',
dataIndex: 'womenIdCard',
},
// {
// title: '男方姓名',
// dataIndex: 'manName',
// width: '140px'
// },
// {
// title: '证件类型',
// dataIndex: 'menCertificateTypeName',
// width: '140px'
// },
// {
// title: '证件号码',
// width: '220px',
// dataIndex: 'menIdCard'
// },
{
title: '联系电话',
dataIndex: 'telephone',
width: '180px'
const columns = [
{
title: '女方姓名',
dataIndex: 'womanName',
width: "140px"
},
{
title: '证件类型',
dataIndex: 'womenCertificateTypeName',
width: '140px'
},
{
title: '证件号码',
width: '220px',
dataIndex: 'womenIdCard',
},
// {
// title: '男方姓名',
// dataIndex: 'manName',
// width: '140px'
// },
// {
// title: '证件类型',
// dataIndex: 'menCertificateTypeName',
// width: '140px'
// },
// {
// title: '证件号码',
// width: '220px',
// dataIndex: 'menIdCard'
// },
{
title: '联系电话',
dataIndex: 'telephone',
width: '180px'
},
{
title: '领取状态',
dataIndex: 'statusName',
width: '100px'
},
{
title: '领取日期',
dataIndex: 'provideDate',
width: '120px'
},
{
title: '操作',
align: 'center',
fixed: 'right',
width: 140,
scopedSlots: {customRender: 'action'},
},
]
export default {
components: {},
data() {
return {
// 搜索框对象
searchForm: {
status: '',
},
statusList: [],
pagination: {
pageIndex: 1,
pageSize: 10,
total: 0,
pageSizeOptions: ['10', '20', '30', '40', '50'],
},
columns,
tableData: [],
loading: false,
routerParams: {},
menuId: undefined
}
},
created() {
this.routerParams = this.$route.query;
if (this.routerParams.menuId) {
window.sessionStorage.setItem('menuId', this.routerParams.menuId)
this.menuId = this.routerParams.menuId
}
this.getEnumListInfo()
this.getFolviteApplyList()
},
methods: {
getEnumListInfo() {
if (window.sessionStorage.getItem('allEnum')) {
this.statusList = getEnumByFlag("folacin_resident_infopc_status");
} else {
let par = {
menuId: this.menuId
}
this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => {
window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList))
window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo));
this.statusList = getEnumByFlag("folacin_resident_infopc_status");
})
}
},
{
title: '领取状态',
dataIndex: 'statusName',
width: '100px'
searchList() {
this.pagination.pageIndex = 1
this.getFolviteApplyList()
},
{
title: '领取日期',
dataIndex: 'provideDate',
width:'120px'
getFolviteApplyList() {
this.loading = true
let pars = isEmptyParams(this.searchForm)
let par = {
...pars,
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize,
menuId: this.menuId
}
this.$api.folviteApplyManage.fetchFolviteApplyList(par).then(({data = {}}) => {
const {dataList = [], total = 0} = data
this.tableData = dataList
this.pagination.total = total
this.loading = false
}).catch(() => {
this.loading = false
})
},
{
title: '操作',
align: 'center',
fixed: 'right',
width: 140,
scopedSlots: {customRender: 'action'},
// 分页
showSizeChange(pageNum, pageSize) {
this.pagination.pageIndex = 1;
this.pagination.pageSize = pageSize;
this.getFolviteApplyList()
},
]
export default {
components: {},
data() {
return {
// 搜索框对象
searchForm: {
status: '',
},
statusList: [],
pagination: {
pageIndex: 1,
pageSize: 10,
total: 0,
pageSizeOptions: ['10', '20', '30', '40', '50'],
},
columns,
tableData: [],
loading: false,
routerParams: {},
menuId: undefined
}
change(pageNum, pageSize) {
this.pagination.pageIndex = pageNum;
this.pagination.pageSize = pageSize;
this.getFolviteApplyList()
},
created() {
this.routerParams = this.$route.query
if (this.routerParams.menuId) {
window.sessionStorage.setItem('menuId', this.routerParams.menuId)
this.menuId = this.routerParams.menuId
restSearchForm() {
this.searchForm = {
breedId: undefined,
medicalName: '',
factoryId: '',
produceDate: undefined
}
this.getEnumListInfo()
this.getFolviteApplyList()
this.searchList()
},
methods: {
getEnumListInfo() {
if (window.sessionStorage.getItem('allEnum')) {
this.statusList = getEnumByFlag("folacin_resident_infopc_status");
} else {
// 删除按钮
deleteConfirm(record) {
let vm = this
this.$confirm({
title: '确定删除该条数据吗?',
okType: 'danger',
onOk: () => {
let par = {
menuId: this.menuId
id: record.id,
menuId: vm.menuId
}
this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => {
window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList))
window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo));
this.statusList = getEnumByFlag("folacin_resident_infopc_status");
this.$api.folviteApplyManage.delFolviteApplyById(par).then(res => {
if (res.code === 'SUCCESS') {
this.pagination.pageIndex = 1;
this.searchList()
this.$message.success('删除成功!')
}
})
}
},
searchList() {
this.pagination.pageIndex = 1
this.getFolviteApplyList()
},
getFolviteApplyList() {
this.loading = true
let pars = isEmptyParams(this.searchForm)
let par = {
...pars,
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize,
},
onCancel: () => {
this.$message.info('已取消删除!');
},
});
},
toDetail(record) {
if (process.env.NODE_ENV == "dev") {
let params = {
id: record.id,
routerFlag: 'update',
menuId: this.menuId
}
this.$api.folviteApplyManage.fetchFolviteApplyList(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.getFolviteApplyList()
},
change(pageNum, pageSize) {
this.pagination.pageIndex = pageNum;
this.pagination.pageSize = pageSize;
this.getFolviteApplyList()
},
restSearchForm() {
this.searchForm = {
breedId: undefined,
medicalName: '',
factoryId: '',
produceDate: undefined
}
this.searchList()
},
// 删除按钮
deleteConfirm(record) {
let vm = this
this.$confirm({
title: '确定删除该条数据吗?',
okType: 'danger',
onOk: () => {
let par = {
id: record.id,
menuId: vm.menuId
}
this.$api.folviteApplyManage.delFolviteApplyById(par).then(res => {
if (res.code === 'SUCCESS') {
this.pagination.pageIndex = 1;
this.searchList()
this.$message.success('删除成功!')
}
})
},
onCancel: () => {
this.$message.info('已取消删除!');
},
});
},
toDetail(record) {
let now_location = escape(process.env.VUE_APP_LOCATION+`folviteDistribution/add?menuId=${this.menuId}&menuCode=${this.routerParams.menuName}&routerFlag=update`)
window.top.postMessage({messageType:'THIRD_PAGEADD',title:`叶酸申请`,url:now_location}, '*')
// let params = {
// id: record.id,
// routerFlag: 'update',
// menuId: this.menuId
// }
// this.$router.push({path: '/folviteDistribution/add', query: params})
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=update&id=` + record.id)
window.top.postMessage({messageType: 'THIRD_PAGEADD', title: `叶酸申请`, url: now_location}, '*')
}
},
}
}
},
}
</script>
<style lang="less" scoped>
// 文件上传样式
.ant-upload-select-picture-card i {
font-size: 32px;
color: #999;
}
// 文件上传样式
.ant-upload-select-picture-card i {
font-size: 32px;
color: #999;
}
.ant-upload-select-picture-card .ant-upload-text {
margin-top: 6px;
color: #666;
}
.ant-upload-select-picture-card .ant-upload-text {
margin-top: 6px;
color: #666;
}
.btn_space {
margin-right: 5px;
}
.btn_space {
margin-right: 5px;
}
/* .search_form {
margin-top: -17px;
border: 1px solid rgba(255,77,128, .2);
border-top: 0px;
padding: 30px;
}*/
/* .search_form {
margin-top: -17px;
border: 1px solid rgba(255,77,128, .2);
border-top: 0px;
padding: 30px;
}*/
</style>
......@@ -50,21 +50,23 @@
<a-col :span="12">
<a-form-model-item label="出生日期" prop="birthDate">
<a-date-picker style="width: 100%" placeholder="请输入出生日期" format="YYYY-MM-DD"
value-format="yyyy-MM-DD"
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="请输入体重,100-1000的整数"
<a-input type="number" placeholder="请输入身高,1000以内的数值"
@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 placeholder="请输入体重,100-1000的整数"
<a-input type="number" placeholder="请输入体重,1000以内的数值"
@blur="onBlur(2,formData.weight)" :disabled="disabled"
v-model="formData.weight" suffix="kg"
></a-input>
</a-form-model-item>
......@@ -72,79 +74,18 @@
<a-col :span="12">
<a-form-model-item label="BMI" prop="bmi">
<a-input
:value="formData.weight/formData.height?(formData.weight/(formData.height/100)).toFixed(2):'-'"
v-model="formData.bmi"
disabled>1
</a-input>
</a-form-model-item>
</a-col>
<!-- <a-col :span="12">-->
<!-- <a-form-model-item label="是否曾经怀孕" prop="oncePregnant">-->
<!-- <a-radio-group v-model="formData.oncePregnant" @change="onChangePregnant"-->
<!-- :disabled="disabled">-->
<!-- <a-radio :value="1">-->
<!-- 是-->
<!-- </a-radio>-->
<!-- <a-radio :value="2">-->
<!-- 否-->
<!-- </a-radio>-->
<!-- </a-radio-group>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <a-form-model-item label="孕次" prop="pregnantNum" v-if="formData.oncePregnant==1">-->
<!-- <a-input v-toInt placeholder="请输入" v-model="formData.pregnantNum"-->
<!-- :disabled="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">男方信息</span>-->
<!-- </div>-->
<!-- <a-button slot="extra" class="ant-table-btn" @click="getMenIdCardInfo">身份证识别</a-button>-->
<!-- <a-row :gutter="16">-->
<!-- <a-col :span="12">-->
<!-- <a-form-model-item label="姓名" prop="manName">-->
<!-- <a-input-->
<!-- v-toInputNum="{num: 15}"-->
<!-- placeholder="请输入姓名,最多可输入15个字"-->
<!-- v-model="formData.manName"-->
<!-- :disabled="disabled"></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <a-form-model-item label="证件类型" prop="menCertificateType">-->
<!-- <a-select v-model="formData.menCertificateType"-->
<!-- placeholder="请选择"-->
<!-- :disabled="disabled"-->
<!-- @change="changeMenCardType"-->
<!-- >-->
<!-- <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">-->
<!-- <a-form-model-item label="证件号码" prop="menIdCard">-->
<!-- <a-input placeholder="请输入证件号码" v-model="formData.menIdCard"-->
<!-- :disabled="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: 10px;display:inline;color: red;margin-left: 10px">请提示用户:如新鲜蔬果摄入少、血液叶酸水平低、备孕时间短,请酌情增补每日叶酸服用量。</p></span>
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">
......@@ -174,8 +115,6 @@
<a-col :span="24">
<a-form-model-item label="现住地址" prop="presentCode" :labelCol="{span: 3}"
:wrapperCol="{span: 20}">
<!--<a-input placeholder="请输入现住地址" v-model="formData.presentCode"></a-input>-->
<!--@click.native="initLoadAreaData"-->
<a-cascader v-model="formData.presentCode"
change-on-select
:disabled="disabled"
......@@ -235,11 +174,12 @@
</div>
</a-form-model-item>
</a-col>-->
<a-col :span="21" :offset="3" v-if="this.routerParams.routerFlag == 'update'">
<a-form-model-item :wrapperCol="{span: 23}">
<a-col :span="12" :offset="3" v-if="this.routerParams.routerFlag == 'update'">
<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" :src="formData.applySignUrl">
<img style="height: 100px;margin-top: 20px;width: auto;transform: rotate(-90deg);"
:src="formData.applySignUrl">
</div>
</a-form-model-item>
</a-col>
......@@ -367,6 +307,7 @@ export default {
let userInfo = JSON.parse(window.sessionStorage.getItem('userInfo'));
let date = moment(new Date()).format('YYYY-MM-DD');
return {
userInfo: userInfo,
unitInfo: unitInfo,
indeterminate: true,
checkedList: [],
......@@ -375,6 +316,7 @@ export default {
spinning: false,
// 弹窗内表单
formData: {
bmi: "",
womanName: undefined,
womenCertificateType: '1',
womenIdCard: undefined,
......@@ -385,7 +327,7 @@ export default {
menIdCard: undefined,
telephone: undefined,
presentCode: undefined,
nowAddress: unitInfo.unitAddress,
nowAddress: "",
signedMode: '2',
parentDate: date,
provideDate: date,
......@@ -393,7 +335,7 @@ export default {
provideRecordList: [],
remarks: undefined,
birthDate: "",
recommendEat: "2颗/天(0.8mg/天)",
recommendEat: "1颗/天(0.4mg/天)",
question: ""
},
cardType,
......@@ -416,11 +358,11 @@ export default {
{required: true, message: '请输入出生日期'}
],
height: [
{required: true, message: '请输入体重,100-1000的整数'},
{required: true, message: '请输入身高,1000以内的数值'},
{validator: this.checkHeightWeight},
],
weight: [
{required: true, message: '请输入体重,100-1000的整数'},
{required: true, message: '请输入体重,1000以内的数值'},
{validator: this.checkHeightWeight},
],
// oncePregnant: [
......@@ -526,7 +468,25 @@ export default {
}
},
methods: {
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/天)";
}
}
},
onChange(checkedList) {
this.formData.recommendEat = "1颗/天(0.4mg/天)";
if (this.formData.bmi >= 28 && checkedList.length == 0) {
this.formData.recommendEat = "2颗/天(0.8mg/天)";
return;
}
this.formData.recommendEat = "2颗/天(0.8mg/天)";
checkedList.forEach(x => {
if (x == '3') {
......@@ -538,30 +498,37 @@ export default {
})
},
checkHeightWeight(rule, value, callback) {
if (value == null || value < 100 || value > 1000) {
callback(new Error('请输入体重,100-1000的整数'));
if (value == null || value < 0 || value > 1000) {
if (rule.field == "height") {
callback(new Error('请输入身高,1000以内的数值'));
} else {
callback(new Error('请输入体重,1000以内的数值'));
}
} else {
callback()
}
},
getStockListDetail() {
this.spinning = true
this.spinning = true;
let par = {
residentId: this.routerParams.id,
menuId: this.routerParams.menuId
}
this.$api.folviteDistributionManage.fetchFolviteDistributionDetail(par).then(({data = [], code}) => {
// this.formData = {}
this.areaInfo = [{areaCode: data.presentCode, areaName: data.presentCodeName}]
this.areaInfo = [{areaCode: data.presentCode, areaName: data.presentCodeName}];
this.formData = {
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,
manName: data.manName,
menCertificateType: data.menCertificateType.toString(),
menIdCard: data.menIdCard,
// manName: data.manName,
// menCertificateType: data.menCertificateType.toString(),
// menIdCard: data.menIdCard,
telephone: data.telephone,
presentCode: [data.presentCode],
nowAddress: data.nowAddress,
......@@ -569,13 +536,25 @@ export default {
applySignUrl: data.applySignUrl,
parentDate: data.parentDate,
provideDate: moment(new Date()).format('yyyy-MM-DD'),
provideDoctorId: data.provideDoctorId,
provideDoctorId: this.userInfo.relationId,
provideRecordList: data.provideRecordList,
remarks: data.remarks,
remarks: data.remarks
}
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.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.changeWomenCardType()
this.changeMenCardType()
this.spinning = false
}).catch(() => {
this.spinning = false
......@@ -693,9 +672,6 @@ export default {
questionList += x + ",";
})
this.formData.question = questionList.substring(0, questionList.length - 1);
} else {
this.$message.success('请选择问卷内容!');
return;
}
this.spinning = true;
let params = {};
......@@ -721,7 +697,7 @@ export default {
provideDoctorName: provideDoctorInfo[0].staffName,
...others
}
params.menuId = this.routerParams.menuId
params.menuId = this.routerParams.menuId;
if (this.routerParams.routerFlag == 'update') {
params.applyId = this.routerParams.id
this.$api.folviteApplyManage.addFolviteDistributionByApply(params).then(({code}) => {
......@@ -805,7 +781,7 @@ export default {
width: 24px;
height: 24px;
margin-top: -5px;
margin-left: 20px;
margin-left: 10px;
}
.title_font {
......
......@@ -37,10 +37,10 @@
<!-- {{detailInfo.pregnantNum || '&#45;&#45;'}}-->
<!-- </a-descriptions-item>-->
<a-descriptions-item label="身高">
{{detailInfo.height || '--'}}
{{detailInfo.height?detailInfo.height+"cm":'--'}}
</a-descriptions-item>
<a-descriptions-item label="体重">
{{detailInfo.weight || '--'}}
{{detailInfo.weight?detailInfo.weight+"kg":'--'}}
</a-descriptions-item>
</a-descriptions>
<!-- <div class="detail_title" style="border-top: 0px">-->
......@@ -73,6 +73,7 @@
<a-descriptions-item label="现在住址">
{{detailInfo.presentCodeName || '--'}}
</a-descriptions-item>
<a-descriptions-item label="详细地址">
{{detailInfo.nowAddress || '--'}}
</a-descriptions-item>
......@@ -86,6 +87,9 @@
<img style="cursor: pointer" width="120px" height="120px" :src="detailInfo.consentUrl"
@click="showVisible=true"/>
</a-descriptions-item>
<a-descriptions-item label="签名" v-if="routerParams.source == 2">
<img style="width: auto;height: 80px" :src="detailInfo.applySignUrl">
</a-descriptions-item>
</a-descriptions>
<!-- <div class="card_info">
<a-card class="book" :headStyle="{background: '#FAFAFA'}" v-if="routerParams.source == 2">
......@@ -98,9 +102,6 @@
</div>
</a-card>
</div>-->
<div v-if="routerParams.source == 2">
<img style="width: 100%;height: 160px" :src="detailInfo.applySignUrl">
</div>
<!-- <a-descriptions bordered layout="vertical" class="no_border">-->
<!-- <a-descriptions-item label="上传照片">-->
<!-- {{detailInfo.batchNumber || '&#45;&#45;'}}-->
......@@ -112,8 +113,8 @@
<div class="divider_my"><span class="midText">发放信息</span></div>
</div>
<div style="clear: both"></div>
<a-descriptions bordered :column="2" class="folvite_title">
<a-descriptions-item label="发放日期">
<a-descriptions bordered :column="3" class="folvite_title">
<a-descriptions-item label="发放日期" >
{{detailInfo.provideDate || '--'}}
</a-descriptions-item>
<a-descriptions-item label="发放医生">
......
<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="证件号码">
<!--v-price="{digit:4}"-->
<a-input v-model="searchForm.womenIdCard" placeholder="请输入证件号码" style="width: 250px"></a-input>
<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>
<a-button class="search_btn ant-table-btn" @click="getIdCardInfo">读卡识别</a-button>
<a-button type="primary" icon="search" class="search_btn" style="margin-left: 10px" @click="searchList">
搜索
</a-button>
......@@ -26,12 +32,18 @@
:pagination="false"
:scroll="{ x: 1}"
>
<template slot="expireDateS" slot-scope="record">
{{record.expireDate | formatDate}}
{{ 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 type="link" size="small" @click="openChildModal(record)">人工发放</a-button>-->
<a-button class="ant-table-btn" size="small" @click="toDetail(record)">查看</a-button>
<a-button class="ant-table-btn" v-if="record.source===1&&record.isSigned===2" size="small"
style="margin-left: 10px"
......@@ -42,7 +54,7 @@
</a-button>
</template>
</a-table>
<a-modal title="上传知情同意书" :visible="visible" @cancel="visible = false" @ok="onsubmit"
<a-modal title="上传知情同意书" :visible="visible" @cancel="onCancel" @ok="onsubmit"
:maskClosable="false"
width="600px">
<span>上传知情同意书:</span>
......@@ -73,10 +85,9 @@
</div>
</a-modal>
<!--:getContainer="getContainer"-->
<a-modal title="查看知情同意书" :visible="showVisible" @cancel="showVisible = false" @ok="onsubmit"
<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%"/>
......@@ -85,14 +96,18 @@
<div>
<div v-html="consentInfo" style="width: 100%">
</div>
<div style="float: right;margin-right: 10px">
<div style="height: 60px">签名: <img style="width:200px;height: 40px;display: inline-block"
:src="applySignUrl" height="100%"/></div>
<div>签署日期:<span style="margin-left: 8px">{{currentRow.parentDate}}</span></div>
<div style="float: right;margin-right: 50px">
<div style="">签名: <img
style="width:30px;height: 150px;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"
......@@ -109,252 +124,283 @@
</div>
</template>
<script>
import {GetUserInfoByCardDevice, isEmptyParams} from "../../utils/common";
import moment from 'moment'
import {GetUserInfoByCardDevice, isEmptyParams} from "../../utils/common";
import moment from 'moment'
const columns = [
{
title: '发放日期',
dataIndex: 'provideDate',
width: '140px'
},
{
title: '姓名',
dataIndex: 'womanName',
width: '140px'
},
{
title: '证件号码',
dataIndex: 'womenIdCard',
width: '180px'
},
{
title: '联系电话',
dataIndex: 'telephone',
width: '140px'
},
/* {
title: '发放时期',
width: '120px',
scopedSlots: {customRender: 'expireDateS'},
},*/
{
title: '现住址',
dataIndex: 'nowAddress',
width: '220px'
const columns = [
{
title: '发放日期',
dataIndex: 'provideDate',
width: '140px'
},
{
title: '姓名',
dataIndex: 'womanName',
width: '100px'
},
{
title: '证件类型',
dataIndex: 'womenCertificateTypeName',
width: '100px'
},
{
title: '证件号码',
dataIndex: 'womenIdCard',
width: '180px'
},
{
title: '联系电话',
dataIndex: 'telephone',
width: '140px'
},
/* {
title: '发放时期',
width: '120px',
scopedSlots: {customRender: 'expireDateS'},
},*/
{
title: '现住址',
// dataIndex: 'nowAddress',
key: 'nowAddress',
width: '200px',
ellipsis: true,
scopedSlots: {customRender: 'nowAddress'},
},
{
title: '发放医生',
dataIndex: 'provideDoctorName',
width: '180px'
},
{
title: '类型',
dataIndex: 'sourceName',
width: '140px'
},
{
title: '操作',
fixed: 'right',
align: 'left',
width: "240px",
scopedSlots: {customRender: 'action'},
},
]
export default {
components: {},
data() {
return {
// 搜索框对象
searchForm: {
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 + "/v1/folacin-admin/sys-pictures-info/upload-img",
fileList: [],
formData: {
consentId: "",
id: ""
},
currentRow: {},
menuId: undefined
}
},
created() {
this.routerParams = this.$route.query;
if (this.routerParams.menuId) {
window.sessionStorage.setItem('menuId', this.routerParams.menuId);
this.menuId = this.routerParams.menuId;
}
this.getFolviteDistributionList();
},
methods: {
getIdCardInfo() {
GetUserInfoByCardDevice().then(res => {
let {cardno, name, address} = res;
this.searchForm.womenIdCard = cardno
})
},
{
title: '发放医生',
dataIndex: 'provideDoctorName',
width: '180px'
searchList() {
this.pagination.pageIndex = 1
this.getFolviteDistributionList()
},
{
title: '类型',
dataIndex: 'sourceName',
width: '140px'
getFolviteDistributionList() {
this.loading = true
let pars = isEmptyParams(this.searchForm)
let par = {
...pars,
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: '操作',
fixed: 'right',
align: 'left',
width: "240px",
scopedSlots: {customRender: 'action'},
// 分页
showSizeChange(pageNum, pageSize) {
this.pagination.pageIndex = 1;
this.pagination.pageSize = pageSize;
this.getFolviteDistributionList()
},
]
export default {
components: {},
data() {
return {
// 搜索框对象
searchForm: {
womenIdCard: undefined
},
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 + "/v1/folacin-admin/sys-pictures-info/upload-img",
fileList: [],
formData: {
consentId: "",
id: ""
},
currentRow: {},
menuId: undefined
}
change(pageNum, pageSize) {
this.pagination.pageIndex = pageNum;
this.pagination.pageSize = pageSize;
this.getFolviteDistributionList()
},
created() {
this.routerParams = this.$route.query;
if (this.routerParams.menuId) {
window.sessionStorage.setItem('menuId', this.routerParams.menuId);
this.menuId = this.routerParams.menuId
restSearchForm() {
this.searchForm = {
idCar: undefined
}
this.getFolviteDistributionList()
this.searchList()
},
methods: {
getIdCardInfo() {
GetUserInfoByCardDevice().then(res => {
let {cardno, name, address} = res;
this.searchForm.womenIdCard = cardno
})
},
searchList() {
this.pagination.pageIndex = 1
this.getFolviteDistributionList()
},
getFolviteDistributionList() {
this.loading = true
let pars = isEmptyParams(this.searchForm)
let par = {
...pars,
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.getFolviteDistributionList()
},
change(pageNum, pageSize) {
this.pagination.pageIndex = pageNum;
this.pagination.pageSize = pageSize;
this.getFolviteDistributionList()
},
restSearchForm() {
this.searchForm = {
idCar: undefined
}
this.searchList()
},
// getContainer() {
// return window.parent.document.body
// },
toAdd() {
// getContainer() {
// return window.parent.document.body
// },
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}, '*')
this.$router.push({path: '/folviteDistribution/add', query: {routerFlag: 'add',menuId: this.menuId}})
},
toDetail(record) {
// 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}, '*')
}
},
toDetail(record) {
if (process.env.NODE_ENV == "dev") {
let par = {
menuId: this.menuId,
...record
}
this.$router.push({path: '/folviteDistribution/detail', query: par})
},
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.fetchConsentInfo(par).then(({data}) => {
if (this.$api.utils.isNoBlank(data)) {
this.consentInfo = data.content;
}
})
}
},
handleChange(info) {
let fileList = [...info.fileList];
fileList = fileList.slice(-1);
fileList = fileList.map(file => {
if (file.response) {
this.consentUrl = file.response.data.trueDownloadUrl;
this.formData.consentId = file.response.data.id;
}
return file;
});
this.fileList = fileList;
},
preview(val) {
window.open(val.response.data.trueDownloadUrl)
},
onsubmit() {
if (this.currentRow.source == 1) {
this.visible = false;
return;
}
if (this.$api.utils.isBlank(this.formData.consentId)) {
this.$message.warning('请上传文件');
return;
}
} 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}, '*')
}
},
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 = {
...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;
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);
fileList = fileList.map(file => {
if (file.response) {
this.consentUrl = file.response.data.trueDownloadUrl;
this.formData.consentId = file.response.data.id;
}
return file;
});
if (fileList.length==0){
this.formData.consentId = "";
}
this.fileList = fileList;
},
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;
}
})
}
},
}
</script>
<style lang="less" scoped>
// 文件上传样式
.ant-upload-select-picture-card i {
font-size: 32px;
color: #999;
}
// 文件上传样式
.ant-upload-select-picture-card i {
font-size: 32px;
color: #999;
}
.ant-upload-select-picture-card .ant-upload-text {
margin-top: 6px;
color: #666;
}
.ant-upload-select-picture-card .ant-upload-text {
margin-top: 6px;
color: #666;
}
.btn_space {
margin-right: 5px;
}
.btn_space {
margin-right: 5px;
}
/* .search_form {
margin-top: -16px;
border: 1px solid rgba(255,77,128, .2);
border-top: 0px;
padding: 30px;
}*/
/* .search_form {
margin-top: -16px;
border: 1px solid rgba(255,77,128, .2);
border-top: 0px;
padding: 30px;
}*/
.ellipsis {
display: block;
width: 180px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
</style>
......@@ -119,20 +119,20 @@ export const timeFormat = (time, format = 'YYYY-MM-DD') => {
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 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) {
callback()
callback();
}
let ckPhone = /^1(?:3[0-9]|4[5-9]|5[0-9]|6[12456]|7[0-8]|8[0-9]|9[0-9])[0-9]{8}$/;
let tell = /^0\d{2,3}-?\d{7,8}$/;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment