Commit 2134568f authored by 罗成兵's avatar 罗成兵

Merge branch 'gcl' of http://gitlab.yiboshi.com/ynby/folacin-front into gcl

 Conflicts:
	.env.dev
	src/views/Home.vue
parents 629aacfb f037cbb7
NODE_ENV = dev
VUE_APP_BASE_URL1 = http://123.56.183.13:8083
VUE_APP_BASE_URL = http://127.0.0.1:8082
VUE_APP_BASE_URL = http://123.56.183.13:8083
VUE_APP_BASE_URL2 = http://127.0.0.1:8082
VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com
VUE_APP_KEY_WORD = 'XwKsGlMcdPMEhR1B'
NODE_ENV = prod
VUE_APP_BASE_URL = https://beta-yjservice.yiboshi.com
VUE_APP_BASE_URL = http://123.56.183.13:8083
VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com
VUE_APP_KEY_WORD = 'XwKsGlMcdPMEhR1B'
......@@ -45,8 +45,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() {//查询单位的知情同意书
......@@ -57,6 +57,9 @@ export default {
},
fetchUpdateConsentInfo(params) {//更新单位的知情同意书
return fetch(`/v1/folacin-admin/folacin-consent-info/${params.id}`, params, "put", "json")
},
fetchAllDoctor() {//查询当前单位下的所有医生
return fetch(`/v1/folacin-admin/folacin-provide-record/doctor`)
}
},
......@@ -184,7 +187,13 @@ 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', 'json')
},
fetchFolviteDistributionDetail(params) {//叶酸发放查看详情
return fetch(`/v1/folacin-admin/folacin-resident-info/grant-details/${params.residentId}`)
},
},
//物资调拨管理
......@@ -229,8 +238,14 @@ export default {
},
folviteApplyManage: {
fetchFolviteApplyList(params) {//叶酸申请列表
return fetch('/v1/folacin-admin/folacin-resident-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: {
//从妇幼系统获取菜单及用户信息
......
......@@ -4,7 +4,7 @@
<a-layout-content class="layout_container" style="background: #fff">
<div style="padding: 24px;">
<a-tabs type="card" :tabBarGutter="10" v-model="$store.state.activeKeyInfo" @change="onChange">
<a-tab-pane v-for="(item, index) in $store.state.tabsInfo" :key="item.frontActionUrl">
<a-tab-pane v-for="(item, index) in $store.state.tabsInfo" :key="item.frontActionUrl" >
<span slot="tab">
<span v-if="item.frontActionUrl != '/Home/distributionWarehousing' && item.frontActionUrl != '/Home/folviteApply'"
>{{item.name}}</span>
......@@ -41,7 +41,7 @@
data() {
return {
// 菜单
menuList: [],
menuList:[],
// 选中的菜单
activeItem: [],
// tabs标签
......@@ -69,7 +69,7 @@
})
} else {
console.log('没有token')
window.top.postMessage({messageType: "LOGOUT"}, '*')//给最顶层窗口发送token失效通知
window.top.postMessage({messageType:"LOGOUT"}, '*')//给最顶层窗口发送token失效通知
return
}
},
......@@ -86,7 +86,7 @@
window.sessionStorage.setItem('activeItem', '/Home/inStock')
}
if (!window.sessionStorage.getItem('activeKey')) {
this.$router.push({path: '/Home/inStock'})
this.$router.push({path:'/Home/inStock'})
this.$store.commit('changeActKey', '/Home/inStock')
}
const tabs = JSON.parse(window.sessionStorage.getItem('tabs'));
......@@ -122,29 +122,25 @@
<style lang="less">
.index_body {
.ant-tabs-bar {
border-bottom: 1px solid rgba(255, 77, 128, .2) !important;
border-bottom: 1px solid rgba(255,77,128,.2)!important;
}
.ant-tabs-nav-scroll {
margin-left: 0px !important;
margin-left: 0px!important;
}
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container {
height: 35px !important;
height: 35px!important;
}
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab {
height: 35px !important;
color: #F8F8FF !important;
line-height: 35px !important;
background: rgba(255, 77, 128, .5);
height: 35px!important;
color: #F8F8FF!important;
line-height: 35px!important;
background: rgba(255,77,128, .5);
border-bottom: 0px solid #FF4D80;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active {
height: 35px !important;
height: 35px!important;
color: #fff;
background: #FF4D80;
border-color: #FF4D80;
......
......@@ -42,6 +42,7 @@
ready(editor) {
//编辑器实例
this.UEditor = editor;
this.$emit('baiduEditorReady', true)
},
//获取内容
getContent() {
......
......@@ -6,7 +6,7 @@
<a-col :span="24">
<!--label="模板内容"-->
<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-col>
</a-row>
......@@ -45,21 +45,30 @@
created() {
},
mounted() {
},
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)
this.formData.content = res.data.content;
this.formData.id = res.data.id;
vm.formData.content = res.data.content;
vm.formData.id = res.data.id;
// })
}
}
})
},
methods: {
// 弹窗确定按钮
submitForm() {
let vm = this;
......
......@@ -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>
......@@ -34,8 +34,8 @@
{{record.expireDate | formatDate}}
</template>
<template slot="action" slot-scope="record">
<a-button type="link" size="small" @click="toDetail(record)">发放</a-button>
<a-button type="link" size="small" @click="deleteConfirm(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)" :disabled="record.status==0">删除</a-button>
</template>
</a-table>
<a-pagination
......@@ -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()
......@@ -194,10 +187,10 @@
let par = {
id: record.id
}
this.$api.systemManage.deleteRoleOneById(par).then(res => {
this.$api.folviteApplyManage.delFolviteApplyById(par).then(res => {
if (res.code === 'SUCCESS') {
this.pagination.pageIndex = 1;
this.getCondomInfoList()
this.searchList()
this.$message.success('删除成功!')
}
})
......@@ -209,7 +202,11 @@
});
},
toDetail(record) {
this.$router.push({path:'/folviteApply/grant', query: record})
let params = {
...record,
routerFlag: 'update'
}
this.$router.push({path:'/folviteDistribution/add', query: params})
}
},
}
......
......@@ -19,19 +19,19 @@
</div>
<a-descriptions bordered>
<a-descriptions-item label="姓名">
{{detailInfo.medicalName || '--'}}
{{detailInfo.womanName || '--'}}
</a-descriptions-item>
<a-descriptions-item label="证件类型">
{{detailInfo.breedName || '--'}}
{{detailInfo.womenCertificateType || '--'}}
</a-descriptions-item>
<a-descriptions-item label="证件号码">
{{detailInfo.batchNumber || '--'}}
{{detailInfo.womenIdCard || '--'}}
</a-descriptions-item>
<a-descriptions-item label="是否曾经怀孕">
{{detailInfo.expireDate || '--'}}
{{detailInfo.oncePregnant || '--'}}
</a-descriptions-item>
<a-descriptions-item label="孕次">
{{detailInfo.expireDate || '--'}}
{{detailInfo.pregnantNum || '--'}}
</a-descriptions-item>
</a-descriptions>
<div class="detail_title" style="border-top: 0px">
......@@ -42,13 +42,13 @@
</div>
<a-descriptions bordered>
<a-descriptions-item label="姓名">
{{detailInfo.medicalName || '--'}}
{{detailInfo.manName || '--'}}
</a-descriptions-item>
<a-descriptions-item label="证件类型">
{{detailInfo.breedName || '--'}}
{{detailInfo.menCertificateType || '--'}}
</a-descriptions-item>
<a-descriptions-item label="证件号码">
{{detailInfo.batchNumber || '--'}}
{{detailInfo.menIdCard || '--'}}
</a-descriptions-item>
</a-descriptions>
<div class="detail_title" style="border-top: 0px">
......@@ -59,19 +59,19 @@
</div>
<a-descriptions bordered>
<a-descriptions-item label="联系电话">
{{detailInfo.medicalName || '--'}}
{{detailInfo.telephone || '--'}}
</a-descriptions-item>
<a-descriptions-item label="现在住址">
{{detailInfo.breedName || '--'}}
{{detailInfo.presentCode || '--'}}
</a-descriptions-item>
<a-descriptions-item label="详细地址">
{{detailInfo.batchNumber || '--'}}
{{detailInfo.nowAddress || '--'}}
</a-descriptions-item>
<a-descriptions-item label="签署方式">
{{detailInfo.batchNumber || '--'}}
{{detailInfo.signedMode || '--'}}
</a-descriptions-item>
<a-descriptions-item label="签署日期">
{{detailInfo.batchNumber || '--'}}
{{detailInfo.parentDate || '--'}}
</a-descriptions-item>
</a-descriptions>
<a-descriptions bordered layout="vertical" class="no_border">
......@@ -87,13 +87,13 @@
<div style="clear: both"></div>
<a-descriptions bordered :column="2">
<a-descriptions-item label="发放日期">
{{detailInfo.medicalName || '--'}}
{{detailInfo.provideDate || '--'}}
</a-descriptions-item>
<a-descriptions-item label="发放医生">
{{detailInfo.breedName || '--'}}
{{detailInfo.provideDoctorName || '--'}}
</a-descriptions-item>
<a-descriptions-item label="备注">
{{detailInfo.breedName || '--'}}
{{detailInfo.remarks || '--'}}
</a-descriptions-item>
</a-descriptions>
<div class="detail_title" style="border-top: 0px">
......@@ -102,7 +102,7 @@
</div>
<div style="clear: both"></div>
</div>
<a-table :dataSource="detailInfo.tableData"
<a-table :dataSource="detailInfo.provideRecordList"
:columns="columns"
rowKey="id"
:pagination="false"
......@@ -123,17 +123,17 @@
const columns = [
{
title: '供应商',
dataIndex: 'medicineName',
dataIndex: 'supplierName',
ellipsis: true
},
{
title: '品牌',
dataIndex: 'typeName',
dataIndex: 'brandName',
ellipsis: true
},
{
title: '批次号',
dataIndex: 'factoryName',
dataIndex: 'batchNumber',
ellipsis: true
},
{
......@@ -142,8 +142,8 @@
ellipsis: true
},
{
title: '发放数量(瓶)',
dataIndex: 'specs',
title: '发放数量',
dataIndex: 'sendNumber',
ellipsis: true
},
]
......@@ -164,9 +164,9 @@
getStockListDetail() {
this.spinning = true
let par = {
id: this.routerParams.id
residentId: this.routerParams.id
}
this.$api.stockManage.fetchInStockLisDetail(par).then(({data = [], code}) => {
this.$api.folviteDistributionManage.fetchFolviteDistributionDetail(par).then(({data = [], code}) => {
this.spinning = false
this.detailInfo = data
})
......
......@@ -55,23 +55,17 @@
},
{
title: '姓名',
dataIndex: 'residentId',
dataIndex: 'womanName',
ellipsis: true
},
{
title: '证件号码',
width: '120px',
dataIndex: 'residentId',
dataIndex: 'womenIdCard',
ellipsis: true
},
{
title: '联系电话',
dataIndex: 'residentId',
ellipsis: true
},
{
title: '发放数量(瓶)',
dataIndex: 'number',
dataIndex: 'telephone',
ellipsis: true
},
/* {
......@@ -81,12 +75,12 @@
},*/
{
title: '现住址',
dataIndex: 'residentId',
dataIndex: 'nowAddress',
ellipsis: true
},
{
title: '登记人',
dataIndex: 'provideDoctorId',
title: '发放医生',
dataIndex: 'provideDoctorName',
ellipsis: true
},
{
......@@ -157,7 +151,7 @@
this.searchList()
},
toAdd() {
this.$router.push({path:'/folviteDistribution/add'})
this.$router.push({path:'/folviteDistribution/add', query: {routerFlag: 'add'}})
},
toDetail(record) {
this.$router.push({path:'/folviteDistribution/detail', query: record})
......
......@@ -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