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

测试BU修改

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