Commit eac1da0a authored by gengchunlei's avatar gengchunlei

叶酸发放登记

parent 928fec35
...@@ -41,8 +41,8 @@ export default { ...@@ -41,8 +41,8 @@ export default {
fetchAllEnum(params) {//获取所有枚举值 fetchAllEnum(params) {//获取所有枚举值
return fetch(`/basic-info/v1/basic-info/basic-sys-enum/all-enum`, params) return fetch(`/basic-info/v1/basic-info/basic-sys-enum/all-enum`, params)
}, },
fetchAreaByCode(areaCode) {//根据区域编码获取下级地区 fetchAreaByCode(params) {//根据区域编码获取下级地区
return fetch(`/v1/folacin-admin/sys-dict-area/child-area/${areaCode}`) return fetch(`/v1/folacin-admin/sys-dict-area/child-area/${params.areaCode}`)
}, },
//知情同意书 //知情同意书
fetchConsentInfo() {//查询单位的知情同意书 fetchConsentInfo() {//查询单位的知情同意书
...@@ -168,8 +168,11 @@ export default { ...@@ -168,8 +168,11 @@ export default {
//叶酸发放登记 //叶酸发放登记
folviteDistributionManage: { folviteDistributionManage: {
fetchFolviteDistributionList(params) {//叶酸发放登记列表 fetchFolviteDistributionList(params) {//叶酸发放登记列表
return fetch('/stock-info/v1/stock-info/stock-apply-record', params) return fetch('/v1/folacin-admin/folacin-resident-info/grant-page', params)
}, },
fetchAddFolviteDistribution(params) {
return fetch('/v1/folacin-admin/folacin-resident-info/direct-grant', params,'post', 'josn')
}
}, },
//物资调拨管理 //物资调拨管理
allocationManagement: { allocationManagement: {
...@@ -213,7 +216,7 @@ export default { ...@@ -213,7 +216,7 @@ export default {
}, },
folviteApplyManage: { folviteApplyManage: {
fetchFolviteApplyList(params) {//叶酸申请列表 fetchFolviteApplyList(params) {//叶酸申请列表
return fetch('/v1/folacin-admin/folacin-resident-apply', params) return fetch('/v1/folacin-admin/folacin-resident-info/apply', params)
}, },
}, },
fyManage: { fyManage: {
......
...@@ -55,8 +55,7 @@ ...@@ -55,8 +55,7 @@
created() { created() {
//获取妇幼权限和登录基本信息 //获取妇幼权限和登录基本信息
// document.cookie = 'bGNnd3lwdF9hdA=8f26b5cc-1d66-4b31-8b86-26d916209e1e;'//昆明市 // document.cookie = 'bGNnd3lwdF9hdA=8f26b5cc-1d66-4b31-8b86-26d916209e1e;'//昆明市
document.cookie = 'bGNnd3lwdF9hdA=15b5e2ce-5b70-48ab-9731-42397aabfec6;'//云南省
document.cookie = 'bGNnd3lwdF9hdA=a551a5a0-aa58-45fe-be4a-9304aa60b594;'//云南省
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);
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<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-form-item label="领取状态">
<a-select v-model="searchForm.factoryId" placeholder="请选择" style="width: 250px"> <a-select v-model="searchForm.status" placeholder="请选择" style="width: 250px">
<a-select-option value="">全部</a-select-option> <a-select-option value="">全部</a-select-option>
<a-select-option v-for="item in allFactoryInfo" :key="item.id" :value="item.id"> <a-select-option v-for="item in statusList" :key="item.enumValue" :value="item.enumValue">
{{item.factoryName}} {{item.enumName}}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
...@@ -53,53 +53,53 @@ ...@@ -53,53 +53,53 @@
</div> </div>
</template> </template>
<script> <script>
import {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: 'medicineName', dataIndex: 'womanName',
ellipsis: true ellipsis: true
}, },
{ {
title: '证件类型', title: '证件类型',
dataIndex: 'typeName', dataIndex: 'womenCertificateType',
ellipsis: true ellipsis: true
}, },
{ {
title: '证件号码', title: '证件号码',
width: '120px', width: '120px',
dataIndex: 'factoryName', dataIndex: 'womenIdCard',
ellipsis: true ellipsis: true
}, },
{ {
title: '男方姓名', title: '男方姓名',
dataIndex: 'batchNumber', dataIndex: 'manName',
ellipsis: true ellipsis: true
}, },
{ {
title: '证件类型', title: '证件类型',
dataIndex: 'specs', dataIndex: 'menCertificateType',
ellipsis: true ellipsis: true
}, },
{ {
title: '证件号码', title: '证件号码',
width: '120px', width: '120px',
scopedSlots: {customRender: 'expireDateS'}, dataIndex: 'menIdCard'
}, },
{ {
title: '联系电话', title: '联系电话',
dataIndex: 'isHistoryName', dataIndex: 'telephone',
ellipsis: true ellipsis: true
}, },
{ {
title: '领取状态', title: '领取状态',
dataIndex: 'specs', dataIndex: 'statusName',
ellipsis: true ellipsis: true
}, },
{ {
title: '领取日期', title: '领取日期',
dataIndex: 'stockNum', dataIndex: 'provideDate',
ellipsis: true ellipsis: true
}, },
{ {
...@@ -116,11 +116,9 @@ ...@@ -116,11 +116,9 @@
return { return {
// 搜索框对象 // 搜索框对象
searchForm: { searchForm: {
medicalName: '', status: '',
factoryId: '',
produceDate: undefined
}, },
allFactoryInfo: [], statusList: [],
pagination: { pagination: {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
...@@ -133,16 +131,11 @@ ...@@ -133,16 +131,11 @@
} }
}, },
created() { created() {
this.statusList = getEnumByFlag('folacin_resident_info_status')
this.getFolviteApplyList() this.getFolviteApplyList()
this.getAllFactory()
}, },
methods: { methods: {
getAllFactory() {
let par = {}
this.$api.common.fetchAllFactory(par).then(({data = []}) => {
this.allFactoryInfo = data
})
},
searchList() { searchList() {
this.pagination.pageIndex = 1 this.pagination.pageIndex = 1
this.getFolviteApplyList() this.getFolviteApplyList()
......
...@@ -55,22 +55,22 @@ ...@@ -55,22 +55,22 @@
}, },
{ {
title: '姓名', title: '姓名',
dataIndex: 'residentId', dataIndex: 'womanName',
ellipsis: true ellipsis: true
}, },
{ {
title: '证件号码', title: '证件号码',
width: '120px', width: '120px',
dataIndex: 'residentId', dataIndex: 'womenIdCard',
ellipsis: true ellipsis: true
}, },
{ {
title: '联系电话', title: '联系电话',
dataIndex: 'residentId', dataIndex: 'telephone',
ellipsis: true ellipsis: true
}, },
{ {
title: '发放数量(瓶)', title: '发放数量',
dataIndex: 'number', dataIndex: 'number',
ellipsis: true ellipsis: true
}, },
...@@ -81,12 +81,12 @@ ...@@ -81,12 +81,12 @@
},*/ },*/
{ {
title: '现住址', title: '现住址',
dataIndex: 'residentId', dataIndex: 'nowAddress',
ellipsis: true ellipsis: true
}, },
{ {
title: '登记人', title: '发放医生',
dataIndex: 'provideDoctorId', dataIndex: 'provideDoctorName',
ellipsis: true ellipsis: true
}, },
{ {
......
...@@ -35,8 +35,15 @@ ...@@ -35,8 +35,15 @@
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="联系地址" <a-form-model-item label="联系地址"
prop="areaCode"> prop="areaCode">
<allAreaSelect v-model="formData.areaCode"></allAreaSelect> <!-- <allAreaSelect v-model="formData.areaCode"></allAreaSelect>
{{formData.areaName}} {{formData.areaName}}-->
<a-cascader v-model="formData.areaCode"
change-on-select
:options="areaInfo"
:fieldNames="fieldNames"
:load-data="loadAreaData"
@click.native="initLoadAreaData"
placeholder="请选择"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
...@@ -105,31 +112,67 @@ ...@@ -105,31 +112,67 @@
{required: true, message: '请输入详细地址', trigger: 'change'} {required: true, message: '请输入详细地址', trigger: 'change'}
], ],
}, },
queryParams: {} queryParams: {},
areaInfo: [],
fieldNames: {
label: 'areaName',
value: 'areaCode',
children: 'children'
},
} }
}, },
created() { created() {
this.queryParams = this.$route.query; this.queryParams = this.$route.query;
if (this.queryParams.modeType === "update") { if (this.queryParams.modeType === "update") {
this.$api.common.fetchSupplyById(this.queryParams.id).then(res => { this.$api.common.fetchSupplyById(this.queryParams.id).then(({data, code}) => {
if (res.code === 'SUCCESS') { if (code === 'SUCCESS') {
this.formData = res.data; this.areaInfo = [{areaCode: data.areaCode, areaName: data.areaName}]
const {areaCode, ...others} = data
this.formData = {...others};
this.formData.areaCode = [areaCode]
} }
}).catch(() => { }).catch(() => {
}); });
} else {
this.initLoadAreaData()
} }
}, },
methods: { methods: {
initLoadAreaData() {
this.areaInfo = []
this.loadAreaData([{areaCode: 0}])
},
loadAreaData(selectedOptions) {
const targetOption = selectedOptions[selectedOptions.length - 1];
targetOption.loading = true;
this.$api.common.fetchAreaByCode({areaCode: targetOption.areaCode}).then(({data = []}) => {
targetOption.loading = false;
data.forEach(item => {
item['isLeaf'] = false
})
if (targetOption.areaCode == 0) {
this.areaInfo = [...data]
} else {
targetOption.children = [...data]
this.areaInfo = [...this.areaInfo]
}
console.log(this.areaInfo)
})
},
// 弹窗确定按钮 // 弹窗确定按钮
submitForm() { submitForm() {
let vm = this; let vm = this;
this.$refs.formRef.validate(valid => { this.$refs.formRef.validate(valid => {
if (valid) { if (valid) {
vm.subLoad = true vm.subLoad = true
const {areaCode, areaName, ...others} = vm.formData
let areaInfo = areaCode[areaCode.length -1]
let par = { let par = {
...vm.formData areaCode: areaInfo,
...others
}; };
if (this.queryParams.modeType === 'add') { if (this.queryParams.modeType === 'add') {
vm.$api.common.fetchAddSupply(par).then(res => { vm.$api.common.fetchAddSupply(par).then(res => {
......
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