Commit bf44fd81 authored by gengchunlei's avatar gengchunlei

叶酸申请发放

parent eba77bcf
NODE_ENV = dev NODE_ENV = dev
VUE_APP_BASE_URL = http://192.168.1.242:8082 VUE_APP_BASE_URL = http://123.56.183.13:8083
VUE_APP_BASE_URL2 = http://127.0.0.1:8082 VUE_APP_BASE_URL2 = http://127.0.0.1:8082
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'
...@@ -240,6 +240,12 @@ export default { ...@@ -240,6 +240,12 @@ export default {
fetchFolviteApplyList(params) {//叶酸申请列表 fetchFolviteApplyList(params) {//叶酸申请列表
return fetch('/v1/folacin-admin/folacin-resident-info/apply', params) return fetch('/v1/folacin-admin/folacin-resident-info/apply', params)
}, },
delFolviteApplyById(params) {//删除叶酸申请
return fetch(`/v1/folacin-admin/folacin-resident-info/delete/${params.id}`, params, 'delete', 'json');
},
addFolviteDistributionByApply(params) {//对申请记录进行发放
return fetch(`/v1/folacin-admin/folacin-resident-info/apply-grant/${params.applyId}`);
}
}, },
fyManage: { fyManage: {
//从妇幼系统获取菜单及用户信息 //从妇幼系统获取菜单及用户信息
......
...@@ -54,8 +54,8 @@ ...@@ -54,8 +54,8 @@
}, },
created() { created() {
//获取妇幼权限和登录基本信息 //获取妇幼权限和登录基本信息
// document.cookie = 'bGNnd3lwdF9hdA=8f26b5cc-1d66-4b31-8b86-26d916209e1e;'//昆明市 // document.cookie = 'bGNnd3lwdF9hdA=3ce2b388-a837-4021-a7d5-327aed47d00c;'//昆明市
document.cookie = 'bGNnd3lwdF9hdA=15b5e2ce-5b70-48ab-9731-42397aabfec6;'//云南省 document.cookie = 'bGNnd3lwdF9hdA=d4223a4f-88f6-467d-9090-6bd18efcf18a;'//云南省
let cookieToken = getCookie('bGNnd3lwdF9hdA') let cookieToken = getCookie('bGNnd3lwdF9hdA')
if (cookieToken) {//根据cookie获取token并调用接口获取菜单并设置初始选中菜单 if (cookieToken) {//根据cookie获取token并调用接口获取菜单并设置初始选中菜单
window.sessionStorage.setItem('token','bearer'+' ' + cookieToken); window.sessionStorage.setItem('token','bearer'+' ' + cookieToken);
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
ready(editor) { ready(editor) {
//编辑器实例 //编辑器实例
this.UEditor = editor; this.UEditor = editor;
this.$emit('baiduEditorReady', true)
}, },
//获取内容 //获取内容
getContent() { getContent() {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<a-col :span="24"> <a-col :span="24">
<!--label="模板内容"--> <!--label="模板内容"-->
<a-form-model-item prop="content" :wrapper-col="{span: 24}"> <a-form-model-item prop="content" :wrapper-col="{span: 24}">
<baiduEditor ref="baiduEditor" v-model="formData.content"></baiduEditor> <baiduEditor @baiduEditorReady="getEditorreadyed" ref="baiduEditor" v-model="formData.content"></baiduEditor>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
...@@ -45,21 +45,34 @@ ...@@ -45,21 +45,34 @@
created() { created() {
}, },
mounted() { mounted() {
let vm = this; // let vm = this
this.$api.common.fetchConsentInfo().then(res => { // this.$refs.baiduEditor.addListener("ready", function () {
if (res.code == 'SUCCESS') { //
if (isBlank(res.data)) { // })
this.modeType = 'add';
} else {
vm.$refs.baiduEditor.setContent(res.data.content, false)
this.formData.content = res.data.content;
this.formData.id = res.data.id;
}
}
})
}, },
methods: { methods: {
getEditorreadyed(val) {
if (val) {
this.getEditorContent()
}
},
getEditorContent() {
let vm = this;
this.$api.common.fetchConsentInfo().then(res => {
if (res.code == 'SUCCESS') {
if (isBlank(res.data)) {
this.modeType = 'add';
} else {
// vm.$nextTick(() => {
vm.$refs.baiduEditor.setContent(res.data.content, false)
vm.formData.content = res.data.content;
vm.formData.id = res.data.id;
// })
}
}
})
},
// 弹窗确定按钮 // 弹窗确定按钮
submitForm() { submitForm() {
let vm = this; let vm = this;
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
{{record.expireDate | formatDate}} {{record.expireDate | formatDate}}
</template> </template>
<template slot="action" slot-scope="record"> <template slot="action" slot-scope="record">
<a-button type="link" size="small" @click="toDetail(record)">发放</a-button> <a-button type="link" size="small" @click="toDetail(record)" :disabled="record.status==0">发放</a-button>
<a-button type="link" size="small" @click="deleteConfirm(record)">删除</a-button> <a-button type="link" size="small" @click="deleteConfirm(record)" :disabled="record.status==0">删除</a-button>
</template> </template>
</a-table> </a-table>
<a-pagination <a-pagination
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
let par = { let par = {
id: record.id id: record.id
} }
this.$api.systemManage.deleteRoleOneById(par).then(res => { this.$api.folviteApplyManage.delFolviteApplyById(par).then(res => {
if (res.code === 'SUCCESS') { if (res.code === 'SUCCESS') {
this.pagination.pageIndex = 1; this.pagination.pageIndex = 1;
this.getCondomInfoList() this.getCondomInfoList()
...@@ -202,7 +202,11 @@ ...@@ -202,7 +202,11 @@
}); });
}, },
toDetail(record) { toDetail(record) {
this.$router.push({path:'/folviteApply/grant', query: record}) let params = {
...record,
routerFlag: 'update'
}
this.$router.push({path:'/folviteDistribution/add', query: params})
} }
}, },
} }
......
...@@ -375,16 +375,53 @@ ...@@ -375,16 +375,53 @@
value: 'areaCode', value: 'areaCode',
children: 'children' children: 'children'
}, },
routerParams: {}
} }
}, },
created() { created() {
this.routerParams = this.$route.query
this.certificateTypeList = getEnumByFlag('folacin_resident_info_certificate_type') this.certificateTypeList = getEnumByFlag('folacin_resident_info_certificate_type')
this.signedModeList = getEnumByFlag('folacin_resident_info_signed_mode') this.signedModeList = getEnumByFlag('folacin_resident_info_signed_mode')
this.getBookHtmlContent() this.getBookHtmlContent()
this.getAllDoctorList() this.getAllDoctorList()
this.initLoadAreaData() if (this.routerParams.routerFlag == 'update') {//从申请过来的发放
this.getStockListDetail()
} else {//由新增过来的发放
this.initLoadAreaData()
}
}, },
methods: { methods: {
getStockListDetail() {
this.spinning = true
let par = {
residentId: this.routerParams.id
}
this.$api.folviteDistributionManage.fetchFolviteDistributionDetail(par).then(({data = [], code}) => {
this.areaInfo = [{areaCode: data.presentCode, areaName: data.presentCodeName}]
this.formData = {
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,
telephone: data.telephone,
presentCode: [data.presentCode],
nowAddress: data.nowAddress,
signedMode: data.signedMode.toString(),
parentDate: data.parentDate,
provideDate: data.provideDate,
provideDoctorId: data.provideDoctorId,
provideRecordList: data.provideRecordList,
remarks: data.remarks,
}
this.spinning = false
}).catch(() => {
this.spinning = false
})
},
initLoadAreaData() { initLoadAreaData() {
this.areaInfo = [] this.areaInfo = []
this.loadAreaData([{areaCode: 0}]) this.loadAreaData([{areaCode: 0}])
...@@ -460,6 +497,7 @@ ...@@ -460,6 +497,7 @@
this.$message.warning('发放叶酸不能为空!'); this.$message.warning('发放叶酸不能为空!');
} else { } else {
this.spinning = true; this.spinning = true;
let params ={}
this.formData.provideRecordList.forEach(item => { this.formData.provideRecordList.forEach(item => {
item.stockId = item.id item.stockId = item.id
}); });
...@@ -469,7 +507,7 @@ ...@@ -469,7 +507,7 @@
let provideTme = moment(provideDate).format('YYYY-MM-DD') let provideTme = moment(provideDate).format('YYYY-MM-DD')
let presentCodeInfo = presentCode[presentCode.length -1] let presentCodeInfo = presentCode[presentCode.length -1]
let provideDoctorInfo = vm.doctorInfoList.filter(item => item.id == provideDoctorId) let provideDoctorInfo = vm.doctorInfoList.filter(item => item.id == provideDoctorId)
let params ={ params ={
parentDate: parentTime, parentDate: parentTime,
provideDate: provideTme, provideDate: provideTme,
presentCode: presentCodeInfo, presentCode: presentCodeInfo,
...@@ -477,15 +515,28 @@ ...@@ -477,15 +515,28 @@
provideDoctorName: provideDoctorInfo[0].staffName, provideDoctorName: provideDoctorInfo[0].staffName,
...others ...others
} }
this.$api.folviteDistributionManage.fetchAddFolviteDistribution(params).then(({code}) => { if (this.routerParams.routerFlag == 'update') {
this.spinning = false; params.applyId = this.routerParams.id
if (code === 'SUCCESS') { this.$api.folviteApplyManage.addFolviteDistributionByApply(params).then(({code}) => {
this.$message.success('发放成功!'); this.spinning = false;
this.goBack() if (code === 'SUCCESS') {
} this.$message.success('发放成功!');
}).catch(() => { this.goBack()
this.spinning = false }
}) }).catch(() => {
this.spinning = false
})
} else {
this.$api.folviteDistributionManage.fetchAddFolviteDistribution(params).then(({code}) => {
this.spinning = false;
if (code === 'SUCCESS') {
this.$message.success('发放成功!');
this.goBack()
}
}).catch(() => {
this.spinning = false
})
}
} }
} }
}); });
......
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
this.searchList() this.searchList()
}, },
toAdd() { toAdd() {
this.$router.push({path:'/folviteDistribution/add'}) this.$router.push({path:'/folviteDistribution/add', query: {routerFlag: 'add'}})
}, },
toDetail(record) { toDetail(record) {
this.$router.push({path:'/folviteDistribution/detail', query: record}) this.$router.push({path:'/folviteDistribution/detail', query: record})
......
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