Commit eac1da0a authored by gengchunlei's avatar gengchunlei

叶酸发放登记

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