Commit 984fe58b authored by gengchunlei's avatar gengchunlei

init yueyang

parent 6f0d3e04
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>云南省叶酸发放服务平台</title> <title>云南省叶酸发放服务平台</title>
<script src="https://webapi.amap.com/maps?v=1.4.4&key=a5a941c6dbae677e755a40f8e18a5ed1"></script> <!--<script src="https://webapi.amap.com/maps?v=1.4.4&key=a5a941c6dbae677e755a40f8e18a5ed1"></script>-->
<!--<script src="https://webapi.amap.com/maps?v=1.4.4&key=34bb7ed1b21bfcc5a3ed0b9a66a587ff"></script>--> <!--<script src="https://webapi.amap.com/maps?v=1.4.4&key=34bb7ed1b21bfcc5a3ed0b9a66a587ff"></script>-->
<!-- <script src="https://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>--> <!-- <script src="https://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>-->
......
...@@ -17,7 +17,7 @@ import { Button, Layout, Menu, ...@@ -17,7 +17,7 @@ import { Button, Layout, Menu,
Dropdown,Popconfirm,TimePicker, Dropdown,Popconfirm,TimePicker,
Radio,Checkbox,Upload, Radio,Checkbox,Upload,
Switch,Progress,Alert, Switch,Progress,Alert,
Message, Popover,Badge Message, Popover,Badge,Tag
} from 'ant-design-vue'; } from 'ant-design-vue';
// 设置ant日期选择框为中文样式 // 设置ant日期选择框为中文样式
...@@ -68,4 +68,5 @@ Vue.use(Alert) ...@@ -68,4 +68,5 @@ Vue.use(Alert)
Vue.use(Message) Vue.use(Message)
Vue.use(Popover) Vue.use(Popover)
Vue.use(Badge) Vue.use(Badge)
Vue.use(Tag)
// Vue.use(VueSignature)//签字画板 // Vue.use(VueSignature)//签字画板
...@@ -39,7 +39,7 @@ function fetch(url = '', params = {}, method = 'get', contentType = 'form', toke ...@@ -39,7 +39,7 @@ function fetch(url = '', params = {}, method = 'get', contentType = 'form', toke
data: params, data: params,
headers: { headers: {
Authorization: token || window.sessionStorage.getItem('token'), Authorization: token || window.sessionStorage.getItem('token'),
menuId: window.sessionStorage.getItem('menuId'), menuId: params.menuId,
'Content-Type': contentType, 'Content-Type': contentType,
} }
}).then(function (response) { }).then(function (response) {
......
...@@ -11,8 +11,8 @@ export default { ...@@ -11,8 +11,8 @@ export default {
'json', 'json',
) )
}, },
fetchAllChildOrgInfo() {//查询当前单位的所有下级单位 fetchAllChildOrgInfo(params) {//查询当前单位的所有下级单位
return fetch(`/v1/folacin-admin/folacin-provide-record/child-unit`) return fetch(`/v1/folacin-admin/folacin-provide-record/child-unit`, params)
}, },
fetchMedicalType(params) {//获取分类 fetchMedicalType(params) {//获取分类
return fetch('/basic-info/v1/basic-info/basic-medical-breed/all', params) return fetch('/basic-info/v1/basic-info/basic-medical-breed/all', params)
...@@ -34,14 +34,14 @@ export default { ...@@ -34,14 +34,14 @@ export default {
fetchSupplyPageList(params) {//供应商分页查询 fetchSupplyPageList(params) {//供应商分页查询
return fetch('/v1/folacin-admin/folacin-supplier-info', params, "get") return fetch('/v1/folacin-admin/folacin-supplier-info', params, "get")
}, },
fetchSupplyById(id) {//根据id获取 fetchSupplyById(params) {//根据id获取
return fetch(`/v1/folacin-admin/folacin-supplier-info/${id}`) return fetch(`/v1/folacin-admin/folacin-supplier-info/${params.id}`, params)
}, },
fetchSupplUpdate(params) {//供应商分页查询 fetchSupplUpdate(params) {//供应商分页查询
return fetch(`/v1/folacin-admin/folacin-supplier-info/${params.id}`, params, "put", 'json') return fetch(`/v1/folacin-admin/folacin-supplier-info/${params.id}`, params, "put", 'json')
}, },
fetchSupplDelete(id) {//供应商分页查询 fetchSupplDelete(params) {//供应商分页查询
return fetch(`/v1/folacin-admin/folacin-supplier-info/${id}`, {}, "delete") return fetch(`/v1/folacin-admin/folacin-supplier-info/${params.id}`, params, "delete")
}, },
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)
...@@ -50,8 +50,8 @@ export default { ...@@ -50,8 +50,8 @@ export default {
return fetch(`/v1/folacin-admin/sys-dict-area/child-area/${params.areaCode}`) return fetch(`/v1/folacin-admin/sys-dict-area/child-area/${params.areaCode}`)
}, },
//知情同意书 //知情同意书
fetchConsentInfo() {//查询单位的知情同意书 fetchConsentInfo(params) {//查询单位的知情同意书
return fetch(`/v1/folacin-admin/folacin-consent-info/consent`) return fetch(`/v1/folacin-admin/folacin-consent-info/consent`, 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")
...@@ -59,8 +59,8 @@ export default { ...@@ -59,8 +59,8 @@ export default {
fetchUpdateConsentInfo(params) {//更新单位的知情同意书 fetchUpdateConsentInfo(params) {//更新单位的知情同意书
return fetch(`/v1/folacin-admin/folacin-consent-info/${params.id}`, params, "put", "json") return fetch(`/v1/folacin-admin/folacin-consent-info/${params.id}`, params, "put", "json")
}, },
fetchAllDoctor() {//查询当前单位下的所有医生 fetchAllDoctor(params) {//查询当前单位下的所有医生
return fetch(`/v1/folacin-admin/folacin-provide-record/doctor`) return fetch(`/v1/folacin-admin/folacin-provide-record/doctor`, params)
} }
}, },
...@@ -93,8 +93,8 @@ export default { ...@@ -93,8 +93,8 @@ export default {
return fetch('/v1/folacin-admin/folacin-send-record/receive-record', params); return fetch('/v1/folacin-admin/folacin-send-record/receive-record', params);
}, },
/*查询入库单详情*/ /*查询入库单详情*/
fetchReceiveDetails(id) { fetchReceiveDetails(params) {
return fetch(`/v1/folacin-admin/folacin-send-record/receive-details/${id}`); return fetch(`/v1/folacin-admin/folacin-send-record/receive-details/${params.id}`,params);
}, },
/*确认入库*/ /*确认入库*/
fetchReceiveConfirm(params) { fetchReceiveConfirm(params) {
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
}, },
created() { created() {
//获取妇幼权限和登录基本信息 //获取妇幼权限和登录基本信息
// document.cookie = 'bGNnd3lwdF9hdA=4bace827-4931-44f1-9e4f-82f9838734be;'//昆明市 // document.cookie = 'bGNnd3lwdF9hdA=5e7516d7-889b-4b19-9490-e9ce576daba2;'//昆明市
// document.cookie = 'bGNnd3lwdF9hdA=' + sessionStorage.getItem("loginToken") + ';'//云南省 // document.cookie = 'bGNnd3lwdF9hdA=' + sessionStorage.getItem("loginToken") + ';'//云南省
let cookieToken = getCookie('bGNnd3lwdF9hdA'); let cookieToken = getCookie('bGNnd3lwdF9hdA');
console.log('tokenInfo',cookieToken) console.log('tokenInfo',cookieToken)
......
...@@ -40,13 +40,15 @@ ...@@ -40,13 +40,15 @@
}, },
formDisabled: false, formDisabled: false,
modeType: "update", modeType: "update",
routerParams:{} routerParams:{},
menuId: undefined
} }
}, },
created() { created() {
this.routerParams = this.$route.query this.routerParams = this.$route.query
if (this.routerParams.menuId) { if (this.routerParams.menuId) {
window.sessionStorage.setItem('menuId', this.routerParams.menuId) window.sessionStorage.setItem('menuId', this.routerParams.menuId)
this.menuId = this.routerParams.menuId
} }
}, },
mounted() { mounted() {
...@@ -59,7 +61,10 @@ ...@@ -59,7 +61,10 @@
}, },
getEditorContent() { getEditorContent() {
let vm = this; let vm = this;
this.$api.common.fetchConsentInfo().then(res => { let par = {
menuId: this.menuId
}
this.$api.common.fetchConsentInfo(par).then(res => {
if (res.code == 'SUCCESS') { if (res.code == 'SUCCESS') {
if (isBlank(res.data)) { if (isBlank(res.data)) {
this.modeType = 'add'; this.modeType = 'add';
......
...@@ -91,7 +91,11 @@ ...@@ -91,7 +91,11 @@
}, },
methods: { methods: {
getReceiveDetails() { getReceiveDetails() {
this.$api.stockManage.fetchReceiveDetails(this.routerParams.id).then(({data = [], code}) => { let par = {
id: this.routerParams.id,
menuId: this.routerParams.menuId
}
this.$api.stockManage.fetchReceiveDetails(par).then(({data = [], code}) => {
this.detailInfo = data; this.detailInfo = data;
}) })
}, },
...@@ -102,7 +106,8 @@ ...@@ -102,7 +106,8 @@
} }
let that = this; let that = this;
let params = { let params = {
recordId: this.detailInfo.id, remarks: this.formData.remarks recordId: this.detailInfo.id, remarks: this.formData.remarks,
menuId: this.routerParams.menuId
}; };
this.$confirm({ this.$confirm({
title: '确认入库吗?', title: '确认入库吗?',
......
...@@ -42,9 +42,15 @@ ...@@ -42,9 +42,15 @@
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="入库状态"> <a-descriptions-item label="入库状态">
<div :class="detailInfo.statusName == '待入库' ? 'ready_stock' : 'in_stock'"> <!-- <div :class="detailInfo.statusName == '待入库' ? 'ready_stock' : 'in_stock'">
<span> {{detailInfo.statusName || '--'}}</span> <span> {{detailInfo.statusName || '&#45;&#45;'}}</span>
</div> </div>-->
<a-tag color="green" v-if="detailInfo.status == 2" >
{{detailInfo.statusName || '--'}}
</a-tag>
<a-tag color="orange" v-if="detailInfo.status == 1" >
{{detailInfo.statusName || '--'}}
</a-tag>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="入库操作人" v-if="detailInfo.status == 2"> <a-descriptions-item label="入库操作人" v-if="detailInfo.status == 2">
{{detailInfo.receiver || '--'}} {{detailInfo.receiver || '--'}}
...@@ -98,7 +104,11 @@ ...@@ -98,7 +104,11 @@
}, },
methods: { methods: {
getReceiveDetails() { getReceiveDetails() {
this.$api.stockManage.fetchReceiveDetails(this.routerParams.id).then(({data = [], code}) => { let par = {
id: this.routerParams.id,
menuId: this.routerParams.menuId
}
this.$api.stockManage.fetchReceiveDetails(par).then(({data = [], code}) => {
this.detailInfo = data this.detailInfo = data
}) })
}, },
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</template> </template>
<template slot="statusNameInfo" slot-scope="record"> <template slot="statusNameInfo" slot-scope="record">
<a-badge status="success" v-if="record.status == 2" /> <a-badge status="success" v-if="record.status == 2" />
<a-badge status="error" v-if="record.status == 1"/> <a-badge status="warning" v-if="record.status == 1"/>
<span>{{record.statusName}}</span> <span>{{record.statusName}}</span>
</template> </template>
...@@ -81,49 +81,49 @@ ...@@ -81,49 +81,49 @@
title: '生产日期', title: '生产日期',
dataIndex: 'produceDate', dataIndex: 'produceDate',
ellipsis: true, ellipsis: true,
width:'200px' width:'140px'
}, },
{ {
title: '有效期', title: '有效期',
width:'200px', width:'140px',
scopedSlots: {customRender: 'expireDateS'}, scopedSlots: {customRender: 'expireDateS'},
}, },
{ {
title: '单价(元)', title: '单价(元)',
dataIndex: 'unitPrice', dataIndex: 'unitPrice',
ellipsis: true, ellipsis: true,
width:'200px' width:'90px'
}, },
{ {
title: '规格', title: '规格',
dataIndex: 'specs', dataIndex: 'specs',
ellipsis: true, ellipsis: true,
width:'200px' width:'70px'
}, },
{ {
title: '分配数量', title: '分配数量',
dataIndex: 'sendNum', dataIndex: 'sendNum',
ellipsis: true, ellipsis: true,
width:'200px' width:'110px'
}, },
{ {
title: '入库状态', title: '入库状态',
// dataIndex: 'statusName', // dataIndex: 'statusName',
// ellipsis: true, // ellipsis: true,
width:'200px', width:'110px',
scopedSlots: {customRender: 'statusNameInfo'}, scopedSlots: {customRender: 'statusNameInfo'},
}, },
{ {
title: '入库日期', title: '入库日期',
dataIndex: 'receiveDate', dataIndex: 'receiveDate',
ellipsis: true, ellipsis: true,
width:'200px' width:'140px'
}, },
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
fixed: 'right', fixed: 'right',
width:'200px', width:'170px',
scopedSlots: {customRender: 'action'}, scopedSlots: {customRender: 'action'},
}, },
] ]
...@@ -147,13 +147,15 @@ ...@@ -147,13 +147,15 @@
tableData: [], tableData: [],
loading: false, loading: false,
allSupplyInfo: [], allSupplyInfo: [],
routerParams:{} routerParams:{},
menuId: undefined
} }
}, },
created() { created() {
this.routerParams = this.$route.query this.routerParams = this.$route.query
if (this.routerParams.menuId) { if (this.routerParams.menuId) {
window.sessionStorage.setItem('menuId', this.routerParams.menuId) window.sessionStorage.setItem('menuId', this.routerParams.menuId)
this.menuId = this.routerParams.menuId
} }
this.getEnumListInfo() this.getEnumListInfo()
this.getReceiveRecord() this.getReceiveRecord()
...@@ -163,7 +165,9 @@ ...@@ -163,7 +165,9 @@
if (window.sessionStorage.getItem('allEnum')) { if (window.sessionStorage.getItem('allEnum')) {
this.statusList = getEnumByFlag("folacin_stock_record_status"); this.statusList = getEnumByFlag("folacin_stock_record_status");
} else { } else {
let par = {} let par = {
menuId: this.menuId
}
this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => { this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => {
window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList)) window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList))
window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo)); window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo));
...@@ -183,7 +187,8 @@ ...@@ -183,7 +187,8 @@
startDate: this.searchForm.date[0], startDate: this.searchForm.date[0],
endDate: this.searchForm.date[1], endDate: this.searchForm.date[1],
pageIndex: this.pagination.pageIndex, pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize pageSize: this.pagination.pageSize,
menuId: this.menuId
} }
this.$api.stockManage.fetchReceiveRecordList(par).then(({data = {}}) => { this.$api.stockManage.fetchReceiveRecordList(par).then(({data = {}}) => {
const {dataList = [], total = 0} = data const {dataList = [], total = 0} = data
...@@ -205,10 +210,18 @@ ...@@ -205,10 +210,18 @@
}, },
toDetail(record) { toDetail(record) {
this.$router.push({path: '/distributionWarehousing/detail', query: record}) let par = {
...record,
menuId: this.menuId
}
this.$router.push({path: '/distributionWarehousing/detail', query: par})
}, },
toAdd(record) { toAdd(record) {
this.$router.push({path: '/distributionWarehousing/add', query: {id: record.id}}) let par = {
...record,
menuId: this.menuId
}
this.$router.push({path: '/distributionWarehousing/add', query: par})
} }
}, },
} }
......
...@@ -189,13 +189,15 @@ ...@@ -189,13 +189,15 @@
tableData: [], tableData: [],
loading: false, loading: false,
allSupplyInfo: [], allSupplyInfo: [],
routerParams:{} routerParams:{},
menuId: undefined
} }
}, },
created() { created() {
this.routerParams = this.$route.query this.routerParams = this.$route.query
if (this.routerParams.menuId) { if (this.routerParams.menuId) {
window.sessionStorage.setItem('menuId', this.routerParams.menuId) window.sessionStorage.setItem('menuId', this.routerParams.menuId)
this.menuId = this.routerParams.menuId
} }
this.getEnumListInfo() this.getEnumListInfo()
}, },
...@@ -209,7 +211,9 @@ ...@@ -209,7 +211,9 @@
if (window.sessionStorage.getItem('allEnum')) { if (window.sessionStorage.getItem('allEnum')) {
this.statusList = getEnumByFlag("folacin_stock_record_status"); this.statusList = getEnumByFlag("folacin_stock_record_status");
} else { } else {
let par = {} let par = {
menuId: this.menuId
}
this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => { this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => {
window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList)) window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList))
window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo)); window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo));
...@@ -229,7 +233,8 @@ ...@@ -229,7 +233,8 @@
startDate: this.searchForm.date[0], startDate: this.searchForm.date[0],
endDate: this.searchForm.date[1], endDate: this.searchForm.date[1],
pageIndex: this.pagination.pageIndex, pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize pageSize: this.pagination.pageSize,
menuId: this.menuId
} }
this.$api.stockManage.fetchSendRecordList(par).then(({data = {}}) => { this.$api.stockManage.fetchSendRecordList(par).then(({data = {}}) => {
const {dataList = [], total = 0} = data const {dataList = [], total = 0} = data
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
rowKey="id" rowKey="id"
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:scroll="{ x: 1}"
> >
<template slot="expireDateS" slot-scope="record"> <template slot="expireDateS" slot-scope="record">
{{record.expireDate | formatDate}} {{record.expireDate | formatDate}}
...@@ -60,48 +61,47 @@ ...@@ -60,48 +61,47 @@
{ {
title: '女方姓名', title: '女方姓名',
dataIndex: 'womanName', dataIndex: 'womanName',
ellipsis: true width:"140px"
}, },
{ {
title: '证件类型', title: '证件类型',
dataIndex: 'womenCertificateTypeName', dataIndex: 'womenCertificateTypeName',
ellipsis: true width:'140px'
}, },
{ {
title: '证件号码', title: '证件号码',
width: '120px', width: '220px',
dataIndex: 'womenIdCard', dataIndex: 'womenIdCard',
ellipsis: true
}, },
{ {
title: '男方姓名', title: '男方姓名',
dataIndex: 'manName', dataIndex: 'manName',
ellipsis: true width: '140px'
}, },
{ {
title: '证件类型', title: '证件类型',
dataIndex: 'menCertificateTypeName', dataIndex: 'menCertificateTypeName',
ellipsis: true width: '140px'
}, },
{ {
title: '证件号码', title: '证件号码',
width: '120px', width: '220px',
dataIndex: 'menIdCard' dataIndex: 'menIdCard'
}, },
{ {
title: '联系电话', title: '联系电话',
dataIndex: 'telephone', dataIndex: 'telephone',
ellipsis: true width: '180px'
}, },
{ {
title: '领取状态', title: '领取状态',
dataIndex: 'statusName', dataIndex: 'statusName',
ellipsis: true width: '100px'
}, },
{ {
title: '领取日期', title: '领取日期',
dataIndex: 'provideDate', dataIndex: 'provideDate',
ellipsis: true width:'120px'
}, },
{ {
title: '操作', title: '操作',
...@@ -129,13 +129,15 @@ ...@@ -129,13 +129,15 @@
columns, columns,
tableData: [], tableData: [],
loading: false, loading: false,
routerParams: {} routerParams: {},
menuId: undefined
} }
}, },
created() { created() {
this.routerParams = this.$route.query this.routerParams = this.$route.query
if (this.routerParams.menuId) { if (this.routerParams.menuId) {
window.sessionStorage.setItem('menuId', this.routerParams.menuId) window.sessionStorage.setItem('menuId', this.routerParams.menuId)
this.menuId = this.routerParams.menuId
} }
this.getEnumListInfo() this.getEnumListInfo()
this.getFolviteApplyList() this.getFolviteApplyList()
...@@ -146,7 +148,9 @@ ...@@ -146,7 +148,9 @@
if (window.sessionStorage.getItem('allEnum')) { if (window.sessionStorage.getItem('allEnum')) {
this.statusList = getEnumByFlag("folacin_resident_infopc_status"); this.statusList = getEnumByFlag("folacin_resident_infopc_status");
} else { } else {
let par = {} let par = {
menuId: this.menuId
}
this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => { this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => {
window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList)) window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList))
window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo)); window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo));
...@@ -164,7 +168,8 @@ ...@@ -164,7 +168,8 @@
let par = { let par = {
...pars, ...pars,
pageIndex: this.pagination.pageIndex, pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize pageSize: this.pagination.pageSize,
menuId: this.menuId
} }
this.$api.folviteApplyManage.fetchFolviteApplyList(par).then(({data = {}}) => { this.$api.folviteApplyManage.fetchFolviteApplyList(par).then(({data = {}}) => {
const {dataList = [], total = 0} = data const {dataList = [], total = 0} = data
...@@ -203,7 +208,8 @@ ...@@ -203,7 +208,8 @@
okType: 'danger', okType: 'danger',
onOk: () => { onOk: () => {
let par = { let par = {
id: record.id id: record.id,
menuId: vm.menuId
} }
this.$api.folviteApplyManage.delFolviteApplyById(par).then(res => { this.$api.folviteApplyManage.delFolviteApplyById(par).then(res => {
if (res.code === 'SUCCESS') { if (res.code === 'SUCCESS') {
...@@ -222,7 +228,8 @@ ...@@ -222,7 +228,8 @@
toDetail(record) { toDetail(record) {
let params = { let params = {
id: record.id, id: record.id,
routerFlag: 'update' routerFlag: 'update',
menuId: this.menuId
} }
this.$router.push({path: '/folviteDistribution/add', query: params}) this.$router.push({path: '/folviteDistribution/add', query: params})
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="证件类型" prop="womenCertificateType"> <a-form-model-item label="证件类型" prop="womenCertificateType">
<a-select v-model="formData.womenCertificateType" placeholder="请选择" <a-select v-model="formData.womenCertificateType" placeholder="请选择"
:disabled="disabled"> :disabled="disabled" @change="changeWomenCardType">
<a-select-option v-for="item in certificateTypeList" <a-select-option v-for="item in certificateTypeList"
:key="item.enumValue" :value="item.enumValue" :key="item.enumValue" :value="item.enumValue"
> >
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<a-select v-model="formData.menCertificateType" <a-select v-model="formData.menCertificateType"
placeholder="请选择" placeholder="请选择"
:disabled="disabled" :disabled="disabled"
@change="changeMenCardType"
> >
<a-select-option v-for="item in certificateTypeList" <a-select-option v-for="item in certificateTypeList"
:key="item.enumValue" :key="item.enumValue"
...@@ -177,10 +177,18 @@ ...@@ -177,10 +177,18 @@
</a-card> </a-card>
</a-form-model-item> </a-form-model-item>
</a-col>--> </a-col>-->
<a-col :span="21" :offset="3" v-if="routerParams.routerFlag == 'update'"> <!-- <a-col :span="21" :offset="3" v-if="routerParams.routerFlag == 'update'">
<a-form-model-item :wrapperCol="{span: 23}"> <a-form-model-item :wrapperCol="{span: 23}">
<div style="border: 1px dashed #EEEEEE"> <div style="border: 1px dashed #EEEEEE;width: 100%">
<img style="width: 100%;height: 160px" :src="formData.consentUrl"> <img style="height: 140px;" :src="formData.applySignUrl">
</div>
</a-form-model-item>
</a-col>-->
<a-col :span="21" :offset="3" v-if="this.routerParams.routerFlag == 'update'">
<a-form-model-item :wrapperCol="{span: 23}">
<div style="border: 1px dashed #EEEEEE;text-align: center">
<div class="sign">签字</div>
<img style="height: 100px;margin-top: 20px" :src="formData.applySignUrl">
</div> </div>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
...@@ -241,7 +249,7 @@ ...@@ -241,7 +249,7 @@
<a-form-model-item :prop="'provideRecordList.' + index + '.sendNumber'" <a-form-model-item :prop="'provideRecordList.' + index + '.sendNumber'"
:rules="formRules.sendNumber" class="tab_input_r"> :rules="formRules.sendNumber" class="tab_input_r">
<a-input type="number" <a-input type="number"
v-toInt v-toInt="{notNum: '0'}"
v-model="record.sendNumber" v-model="record.sendNumber"
placeholder="请输入发放数量" placeholder="请输入发放数量"
style="width: 150px;" style="width: 150px;"
...@@ -279,7 +287,7 @@ ...@@ -279,7 +287,7 @@
<!-- 选择叶酸种类弹框--> <!-- 选择叶酸种类弹框-->
<div> <div>
<in-stock-manage-info ref="inStockManageInfo" @selectedIdList="getChecked" <in-stock-manage-info ref="inStockManageInfo" @selectedIdList="getChecked"
v-if="readyGetChecked"></in-stock-manage-info> v-if="readyGetChecked" :menuId="routerParams.menuId" ></in-stock-manage-info>
</div> </div>
<div style="text-align: center;margin-top: 16px"> <div style="text-align: center;margin-top: 16px">
<a-button class="ant-table-btn" @click="goBack">取消</a-button> <a-button class="ant-table-btn" @click="goBack">取消</a-button>
...@@ -294,6 +302,7 @@ ...@@ -294,6 +302,7 @@
<script> <script>
import {checkPhone, closedDetail, getEnumByFlag, GetUserInfoByCardDevice} from "../../../utils/common"; import {checkPhone, closedDetail, getEnumByFlag, GetUserInfoByCardDevice} from "../../../utils/common";
import {cardType} from "../../../utils/dropDownCollection";
import moment from 'moment' import moment from 'moment'
import InStockManageInfo from "./inStockManageInfo"; import InStockManageInfo from "./inStockManageInfo";
...@@ -325,6 +334,7 @@ ...@@ -325,6 +334,7 @@
provideRecordList: [], provideRecordList: [],
remarks: undefined, remarks: undefined,
}, },
cardType,
disabled: false, disabled: false,
formRules: { formRules: {
womanName: [ womanName: [
...@@ -442,10 +452,11 @@ ...@@ -442,10 +452,11 @@
getStockListDetail() { getStockListDetail() {
this.spinning = true this.spinning = true
let par = { let par = {
residentId: this.routerParams.id residentId: this.routerParams.id,
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 = {
womanName: data.womanName, womanName: data.womanName,
...@@ -460,13 +471,16 @@ ...@@ -460,13 +471,16 @@
presentCode: [data.presentCode], presentCode: [data.presentCode],
nowAddress: data.nowAddress, nowAddress: data.nowAddress,
signedMode: data.signedMode.toString(), signedMode: data.signedMode.toString(),
consentUrl: data.consentUrl, 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: data.provideDoctorId,
provideRecordList: data.provideRecordList, provideRecordList: data.provideRecordList,
remarks: data.remarks, remarks: data.remarks,
} }
this.changeWomenCardType()
this.changeMenCardType()
this.spinning = false this.spinning = false
}).catch(() => { }).catch(() => {
this.spinning = false this.spinning = false
...@@ -493,7 +507,11 @@ ...@@ -493,7 +507,11 @@
loadAreaData(selectedOptions) { loadAreaData(selectedOptions) {
const targetOption = selectedOptions[selectedOptions.length - 1]; const targetOption = selectedOptions[selectedOptions.length - 1];
targetOption.loading = true; targetOption.loading = true;
this.$api.common.fetchAreaByCode({areaCode: targetOption.areaCode}).then(({data = []}) => { let par = {
menuId: this.routerParams.menuId,
areaCode: targetOption.areaCode
}
this.$api.common.fetchAreaByCode(par).then(({data = []}) => {
targetOption.loading = false; targetOption.loading = false;
data.forEach(item => { data.forEach(item => {
item['isLeaf'] = item.areaLevel >= 5; item['isLeaf'] = item.areaLevel >= 5;
...@@ -508,7 +526,10 @@ ...@@ -508,7 +526,10 @@
}) })
}, },
getBookHtmlContent() {//获取用户知情书模板 getBookHtmlContent() {//获取用户知情书模板
this.$api.common.fetchConsentInfo().then(({data}) => { let par = {
menuId: this.routerParams.menuId
}
this.$api.common.fetchConsentInfo(par).then(({data}) => {
if (this.$api.utils.isBlank(data)) { if (this.$api.utils.isBlank(data)) {
this.bookHtmlContent = {content: ""} this.bookHtmlContent = {content: ""}
} else { } else {
...@@ -517,7 +538,10 @@ ...@@ -517,7 +538,10 @@
}) })
}, },
getAllDoctorList() { getAllDoctorList() {
this.$api.common.fetchAllDoctor().then(({data}) => { let par = {
menuId: this.menuId
}
this.$api.common.fetchAllDoctor(par).then(({data}) => {
this.doctorInfoList = data this.doctorInfoList = data
}) })
}, },
...@@ -542,6 +566,14 @@ ...@@ -542,6 +566,14 @@
confirm(index) { confirm(index) {
this.formData.provideRecordList.splice(index, 1); this.formData.provideRecordList.splice(index, 1);
}, },
changeWomenCardType() {
let cardInfo = this.cardType.filter(item => item.id == this.formData.womenCertificateType)
this.formRules.womenIdCard = cardInfo[0].rule
},
changeMenCardType() {
let cardInfo = this.cardType.filter(item => item.id == this.formData.menCertificateType)
this.formRules.menIdCard = cardInfo[0].rule
},
//获取改变的当前项 //获取改变的当前项
getChangeRecord(record) { getChangeRecord(record) {
recordInfo = record recordInfo = record
...@@ -549,7 +581,8 @@ ...@@ -549,7 +581,8 @@
getSelectedMedical(val) {//获取被选中的药具 getSelectedMedical(val) {//获取被选中的药具
if (val.length > 0) { if (val.length > 0) {
let par = { let par = {
idList: val.join(',') idList: val.join(','),
menuId: this.routerParams.menuId
} }
this.$api.stockManage.fetchMedicalListByIds(par).then(({data = []}) => { this.$api.stockManage.fetchMedicalListByIds(par).then(({data = []}) => {
this.formData.provideRecordList = data this.formData.provideRecordList = data
...@@ -583,6 +616,7 @@ ...@@ -583,6 +616,7 @@
provideDoctorName: provideDoctorInfo[0].staffName, provideDoctorName: provideDoctorInfo[0].staffName,
...others ...others
} }
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}) => {
......
...@@ -195,7 +195,10 @@ ...@@ -195,7 +195,10 @@
}, },
methods: { methods: {
getBookHtmlContent() {//获取用户知情书模板 getBookHtmlContent() {//获取用户知情书模板
this.$api.common.fetchConsentInfo().then(({data}) => { let par = {
menuId: this.routerParams.menuId
}
this.$api.common.fetchConsentInfo(par).then(({data}) => {
if (this.$api.utils.isBlank(data)) { if (this.$api.utils.isBlank(data)) {
this.bookHtmlContent = {content: ""} this.bookHtmlContent = {content: ""}
} else { } else {
...@@ -206,7 +209,8 @@ ...@@ -206,7 +209,8 @@
getStockListDetail() { getStockListDetail() {
this.spinning = true this.spinning = true
let par = { let par = {
residentId: this.routerParams.id residentId: this.routerParams.id,
menuId: this.routerParams.menuId
} }
this.$api.folviteDistributionManage.fetchFolviteDistributionDetail(par).then(({data = [], code}) => { this.$api.folviteDistributionManage.fetchFolviteDistributionDetail(par).then(({data = [], code}) => {
this.spinning = false; this.spinning = false;
......
...@@ -142,6 +142,11 @@ ...@@ -142,6 +142,11 @@
}, },
] ]
export default { export default {
props: {
menuId: {
type: String
}
},
components: {}, components: {},
data() { data() {
return { return {
...@@ -176,7 +181,9 @@ ...@@ -176,7 +181,9 @@
}, },
methods: { methods: {
getAllSupply() { getAllSupply() {
let par = {} let par = {
menuId: this.menuId
}
this.$api.common.fetchAllSupply(par).then(({data = []}) => { this.$api.common.fetchAllSupply(par).then(({data = []}) => {
this.allSupplyInfo = data this.allSupplyInfo = data
}) })
...@@ -194,7 +201,8 @@ ...@@ -194,7 +201,8 @@
let par = { let par = {
...pars, ...pars,
pageIndex: this.pagination.pageIndex, pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize pageSize: this.pagination.pageSize,
menuId: this.menuId
} }
this.$api.stockManage.fetchInStockNoZeroList(par).then(({data = {}}) => { this.$api.stockManage.fetchInStockNoZeroList(par).then(({data = {}}) => {
const {dataList = [], total = 0} = data const {dataList = [], total = 0} = data
...@@ -218,7 +226,8 @@ ...@@ -218,7 +226,8 @@
}, },
showSelectedMedical() {//显示选中的药具 showSelectedMedical() {//显示选中的药具
let par = { let par = {
idList: this.selectedRowKeys idList: this.selectedRowKeys,
menuId: this.menuId
} }
this.$api.stockManage.fetchMedicalListByIds(par).then(({data = []}) => { this.$api.stockManage.fetchMedicalListByIds(par).then(({data = []}) => {
this.selectedRowList = data this.selectedRowList = data
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
rowKey="id" rowKey="id"
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:scroll="{ x: 1}"
> >
<template slot="expireDateS" slot-scope="record"> <template slot="expireDateS" slot-scope="record">
...@@ -113,22 +114,22 @@ ...@@ -113,22 +114,22 @@
{ {
title: '发放日期', title: '发放日期',
dataIndex: 'provideDate', dataIndex: 'provideDate',
ellipsis: true width: '140px'
}, },
{ {
title: '姓名', title: '姓名',
dataIndex: 'womanName', dataIndex: 'womanName',
ellipsis: true width:'140px'
}, },
{ {
title: '证件号码', title: '证件号码',
dataIndex: 'womenIdCard', dataIndex: 'womenIdCard',
ellipsis: false width: '180px'
}, },
{ {
title: '联系电话', title: '联系电话',
dataIndex: 'telephone', dataIndex: 'telephone',
ellipsis: true width: '140px'
}, },
/* { /* {
title: '发放时期', title: '发放时期',
...@@ -138,17 +139,17 @@ ...@@ -138,17 +139,17 @@
{ {
title: '现住址', title: '现住址',
dataIndex: 'nowAddress', dataIndex: 'nowAddress',
ellipsis: true width: '220px'
}, },
{ {
title: '发放医生', title: '发放医生',
dataIndex: 'provideDoctorName', dataIndex: 'provideDoctorName',
ellipsis: true width:'180px'
}, },
{ {
title: '类型', title: '类型',
dataIndex: 'sourceName', dataIndex: 'sourceName',
ellipsis: true width:'140px'
}, },
{ {
title: '操作', title: '操作',
...@@ -191,12 +192,14 @@ ...@@ -191,12 +192,14 @@
id: "" id: ""
}, },
currentRow: {}, currentRow: {},
menuId: undefined
} }
}, },
created() { created() {
this.routerParams = this.$route.query; this.routerParams = this.$route.query;
if (this.routerParams.menuId) { if (this.routerParams.menuId) {
window.sessionStorage.setItem('menuId', this.routerParams.menuId); window.sessionStorage.setItem('menuId', this.routerParams.menuId);
this.menuId = this.routerParams.menuId
} }
this.getFolviteDistributionList() this.getFolviteDistributionList()
}, },
...@@ -217,7 +220,8 @@ ...@@ -217,7 +220,8 @@
let par = { let par = {
...pars, ...pars,
pageIndex: this.pagination.pageIndex, pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize pageSize: this.pagination.pageSize,
menuId: this.menuId
} }
this.$api.folviteDistributionManage.fetchFolviteDistributionList(par).then(({data = {}}) => { this.$api.folviteDistributionManage.fetchFolviteDistributionList(par).then(({data = {}}) => {
const {dataList = [], total = 0} = data const {dataList = [], total = 0} = data
...@@ -249,10 +253,14 @@ ...@@ -249,10 +253,14 @@
// return window.parent.document.body // return window.parent.document.body
// }, // },
toAdd() { toAdd() {
this.$router.push({path: '/folviteDistribution/add', query: {routerFlag: 'add'}}) this.$router.push({path: '/folviteDistribution/add', query: {routerFlag: 'add',menuId: this.menuId}})
}, },
toDetail(record) { toDetail(record) {
this.$router.push({path: '/folviteDistribution/detail', query: record}) let par = {
menuId: this.menuId,
...record
}
this.$router.push({path: '/folviteDistribution/detail', query: par})
}, },
uploadConsentInfo(row) { uploadConsentInfo(row) {
this.formData.id = row.id; this.formData.id = row.id;
...@@ -261,12 +269,19 @@ ...@@ -261,12 +269,19 @@
showConsentInfo(row) { showConsentInfo(row) {
this.currentRow = row; this.currentRow = row;
this.showVisible = true; this.showVisible = true;
this.$api.folviteDistributionManage.fetchFolviteDistributionDetail({residentId: row.id}).then(({data = [], code}) => { let par = {
menuId: this.menuId,
residentId: row.id
}
this.$api.folviteDistributionManage.fetchFolviteDistributionDetail(par).then(({data = [], code}) => {
this.consentUrl = data.consentUrl; this.consentUrl = data.consentUrl;
this.applySignUrl = data.applySignUrl; this.applySignUrl = data.applySignUrl;
}) })
if (row.source == 2) { if (row.source == 2) {
this.$api.common.fetchConsentInfo().then(({data}) => { let par = {
menuId: this.menuId
}
this.$api.common.fetchConsentInfo(par).then(({data}) => {
if (this.$api.utils.isNoBlank(data)) { if (this.$api.utils.isNoBlank(data)) {
this.consentInfo = data.content; this.consentInfo = data.content;
} }
...@@ -293,7 +308,11 @@ ...@@ -293,7 +308,11 @@
this.$message.warning('请上传文件'); this.$message.warning('请上传文件');
return; return;
} }
this.$api.folviteDistributionManage.fetchFolviteUploadConsent(this.formData).then(res => { let par = {
...this.formData,
menuId: this.menuId
}
this.$api.folviteDistributionManage.fetchFolviteUploadConsent(par).then(res => {
if (res.code === 'SUCCESS') { if (res.code === 'SUCCESS') {
this.fileList = []; this.fileList = [];
this.formData.consentId = ""; this.formData.consentId = "";
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<a-form-model-item :prop="'detailedList.' + index + '.sendNum'" <a-form-model-item :prop="'detailedList.' + index + '.sendNum'"
:rules="formRules.sendNum" class="tab_input_r"> :rules="formRules.sendNum" class="tab_input_r">
<a-input type="number" <a-input type="number"
v-toInt="{notNum: 0}" v-toInt="{notNum: '0'}"
v-model="record.sendNum" v-model="record.sendNum"
placeholder="请输入分配数量" placeholder="请输入分配数量"
style="width: 150px;" style="width: 150px;"
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
data() { data() {
return { return {
unitInfo: JSON.parse(window.sessionStorage.getItem('userInfo')), unitInfo: JSON.parse(window.sessionStorage.getItem('userInfo')),
routerParams: [], routerParams: {},
spinning: false, spinning: false,
subLoad: false, subLoad: false,
// 弹窗内表单 // 弹窗内表单
...@@ -199,7 +199,8 @@ ...@@ -199,7 +199,8 @@
}, },
getSelectedMedical() {//获取被选中的药具 getSelectedMedical() {//获取被选中的药具
let par = { let par = {
idList: this.$route.query.selected idList: this.$route.query.selected,
menuId: this.routerParams.menuId
} }
this.$api.stockManage.fetchMedicalListByIds(par).then(({data = []}) => { this.$api.stockManage.fetchMedicalListByIds(par).then(({data = []}) => {
this.formData.detailedList = data this.formData.detailedList = data
...@@ -209,7 +210,10 @@ ...@@ -209,7 +210,10 @@
// 获取当前单位的下级单位 // 获取当前单位的下级单位
getChildUnitList() { getChildUnitList() {
//this.childUnitList = [{id:16625, unitName:'gcl'}] //this.childUnitList = [{id:16625, unitName:'gcl'}]
this.$api.common.fetchAllChildOrgInfo().then(({code, data}) => { let par = {
menuId: this.routerParams.menuId
}
this.$api.common.fetchAllChildOrgInfo(par).then(({code, data}) => {
if (code === 'SUCCESS') { if (code === 'SUCCESS') {
this.childUnitList = data; this.childUnitList = data;
} }
...@@ -242,6 +246,7 @@ ...@@ -242,6 +246,7 @@
}); });
}); });
params.detailedList = detailedList; params.detailedList = detailedList;
params.menuId = this.routerParams.menuId
this.$api.stockManage.fetchDispatchGoods(params).then(({code}) => { this.$api.stockManage.fetchDispatchGoods(params).then(({code}) => {
this.subLoad = false; this.subLoad = false;
if (code === 'SUCCESS') { if (code === 'SUCCESS') {
......
...@@ -57,7 +57,6 @@ ...@@ -57,7 +57,6 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<!-- @change="changeUnitPrice({digit:2, maxNum: 10000})"-->
<a-form-model-item label="单价" prop="unitPrice"> <a-form-model-item label="单价" prop="unitPrice">
<a-input <a-input
v-price="{digit:2, maxNum:10000}" v-price="{digit:2, maxNum:10000}"
...@@ -192,15 +191,19 @@ ...@@ -192,15 +191,19 @@
{required: false, message: '请输入备注'} {required: false, message: '请输入备注'}
], ],
}, },
allSupplyInfo: [] allSupplyInfo: [],
routerParams: {}
} }
}, },
created() { created() {
this.routerParams = this.$route.query
this.brandNameList = getEnumByFlag('folacin_stock_record_brand_id') this.brandNameList = getEnumByFlag('folacin_stock_record_brand_id')
}, },
methods: { methods: {
getAllSupply() { getAllSupply() {
let par = {} let par = {
menuId: this.routerParams.menuId
}
this.$api.common.fetchAllSupply(par).then(({data = []}) => { this.$api.common.fetchAllSupply(par).then(({data = []}) => {
this.allSupplyInfo = data this.allSupplyInfo = data
}) })
...@@ -219,6 +222,7 @@ ...@@ -219,6 +222,7 @@
pars.expireDate = moment(vm.formData.expireDate).format('YYYY-MM-DD'); pars.expireDate = moment(vm.formData.expireDate).format('YYYY-MM-DD');
pars.purchDate = moment(vm.formData.purchDate).format('YYYY-MM-DD'); pars.purchDate = moment(vm.formData.purchDate).format('YYYY-MM-DD');
pars.enterDate = moment(vm.formData.enterDate).format('YYYY-MM-DD'); pars.enterDate = moment(vm.formData.enterDate).format('YYYY-MM-DD');
pars.menuId = this.routerParams.menuId
let par = { let par = {
...pars ...pars
}; };
...@@ -236,21 +240,7 @@ ...@@ -236,21 +240,7 @@
} }
}); });
}, },
changeUnitPrice(val) {
if (val.maxNum && this.formData.unitPrice > val.maxNum) {
this.formData.unitPrice = val.maxNum
}
let num = new RegExp(`(^[\\-0-9][0-9]*(.[0-9]+)?)$`) // 是否为数字
let littleNum = new RegExp(`^(0|[1-9]\\d{0,${val.digit}})(\\.\\d{1,${val.digit}})?$`)//自定义小数位数
if (this.formData.unitPrice &&!num.test(+this.formData.unitPrice)) {
this.formData.unitPrice = this.formData.unitPrice.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
}
if (this.formData.unitPrice && !littleNum.test(+this.formData.unitPrice)) {
this.formData.unitPrice = this.formData.unitPrice.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
this.formData.unitPrice = this.formData.unitPrice.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
this.formData.unitPrice = this.formData.unitPrice.replace(new RegExp(`^(.*\\..{${defu}}).*$`), "$1");//只能输入自定义个小数
}
},
goBack() { goBack() {
closedDetail('/inStock/add', '/Home/inStock') closedDetail('/inStock/add', '/Home/inStock')
} }
......
...@@ -63,7 +63,8 @@ ...@@ -63,7 +63,8 @@
methods: { methods: {
getStockListDetail() { getStockListDetail() {
let par = { let par = {
id: this.routerParams.id id: this.routerParams.id,
menuId: this.menuId
} }
this.$api.stockManage.fetchInStockDetail(par).then(({data = [], code}) => { this.$api.stockManage.fetchInStockDetail(par).then(({data = [], code}) => {
this.detailInfo = data this.detailInfo = data
......
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
rowKey="id" rowKey="id"
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:scroll="{ x: 1}"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
> >
<template slot="produceDateS" slot-scope="record"> <template slot="produceDateS" slot-scope="record">
...@@ -116,22 +117,23 @@ ...@@ -116,22 +117,23 @@
{ {
title: '供应商名称', title: '供应商名称',
dataIndex: 'supplierName', dataIndex: 'supplierName',
ellipsis: true width: '200px',
}, },
{ {
title: '品牌', title: '品牌',
dataIndex: 'brandName', dataIndex: 'brandName',
ellipsis: true width: '140px',
}, },
{ {
title: '批次号', title: '批次号',
width: '120px', width: '140px',
dataIndex: 'batchNumber', dataIndex: 'batchNumber',
ellipsis: true ellipsis: true
}, },
{ {
title: '生产日期', title: '生产日期',
// dataIndex: 'produceDate', // dataIndex: 'produceDate',
width:'120px',
scopedSlots: {customRender: 'produceDateS'}, scopedSlots: {customRender: 'produceDateS'},
}, },
{ {
...@@ -142,7 +144,7 @@ ...@@ -142,7 +144,7 @@
{ {
title: '单价(元)', title: '单价(元)',
dataIndex: 'unitPrice', dataIndex: 'unitPrice',
ellipsis: true width:'120px'
}, },
// { // {
// title: '规格', // title: '规格',
...@@ -152,17 +154,18 @@ ...@@ -152,17 +154,18 @@
{ {
title: '库存总数', title: '库存总数',
dataIndex: 'number', dataIndex: 'number',
ellipsis: true width:'100px'
}, },
{ {
title: '入库日期', title: '入库日期',
dataIndex: 'enterDate', dataIndex: 'enterDate',
ellipsis: true width:'120px'
}, },
{ {
title: '操作', title: '操作',
fixed: "right", fixed: "right",
align: 'center', align: 'center',
width:'100px',
scopedSlots: {customRender: 'action'}, scopedSlots: {customRender: 'action'},
}, },
] ]
...@@ -192,13 +195,15 @@ ...@@ -192,13 +195,15 @@
selectedVisible: false, selectedVisible: false,
selectedRowList: [], selectedRowList: [],
routerParams: {}, routerParams: {},
unitInfo: {} unitInfo: {},
menuId: undefined
} }
}, },
created() { created() {
this.routerParams = this.$route.query this.routerParams = this.$route.query
if (this.routerParams.menuId) { if (this.routerParams.menuId) {
window.sessionStorage.setItem('menuId', this.routerParams.menuId) window.sessionStorage.setItem('menuId', this.routerParams.menuId)
this.menuId = this.routerParams.menuId
} }
this.getInStockList(); this.getInStockList();
this.getAllSupply(); this.getAllSupply();
...@@ -210,7 +215,9 @@ ...@@ -210,7 +215,9 @@
this.brandList = getEnumByFlag("folacin_stock_record_brand_id"); this.brandList = getEnumByFlag("folacin_stock_record_brand_id");
this.unitInfo = JSON.parse(sessionStorage.getItem("unitInfo")) this.unitInfo = JSON.parse(sessionStorage.getItem("unitInfo"))
} else { } else {
let par = {} let par = {
menuId: this.menuId
}
this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => { this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => {
window.sessionStorage.setItem('unitInfo', JSON.stringify(data.unitInfo)); window.sessionStorage.setItem('unitInfo', JSON.stringify(data.unitInfo));
window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList)) window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList))
...@@ -221,7 +228,9 @@ ...@@ -221,7 +228,9 @@
} }
}, },
getAllSupply() { getAllSupply() {
let par = {} let par = {
menuId: this.menuId
}
this.$api.common.fetchAllSupply(par).then(({data = []}) => { this.$api.common.fetchAllSupply(par).then(({data = []}) => {
this.allSupplyInfo = data this.allSupplyInfo = data
}) })
...@@ -241,6 +250,7 @@ ...@@ -241,6 +250,7 @@
pageIndex: this.pagination.pageIndex, pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize pageSize: this.pagination.pageSize
} }
par.menuId = this.menuId
return par; return par;
}, },
getInStockList() { getInStockList() {
...@@ -268,7 +278,8 @@ ...@@ -268,7 +278,8 @@
}, },
showSelectedMedical() {//显示选中的药具 showSelectedMedical() {//显示选中的药具
let par = { let par = {
idList: this.selectedRowKeys idList: this.selectedRowKeys,
menuId: this.menuId
} }
this.$api.stockManage.fetchMedicalListByIds(par).then(({data = []}) => { this.$api.stockManage.fetchMedicalListByIds(par).then(({data = []}) => {
this.selectedRowList = data this.selectedRowList = data
...@@ -304,13 +315,14 @@ ...@@ -304,13 +315,14 @@
}, },
// 库存录入按钮 // 库存录入按钮
openModal() { openModal() {
this.$router.push({path: '/inStock/add', query: {}}) let par = {menuId: this.menuId}
this.$router.push({path: '/inStock/add', query: par})
}, },
toAdd() { toAdd() {
this.$router.push({path: '/inStock/addMaterialDistribution', query: {selected: this.selectedRowKeys}}) this.$router.push({path: '/inStock/addMaterialDistribution', query: {selected: this.selectedRowKeys, menuId: this.menuId}})
}, },
toDetail(record) { toDetail(record) {
this.$router.push({path: '/inStock/inStockManageDetail', query: {id: record.id}}) this.$router.push({path: '/inStock/inStockManageDetail', query: {id: record.id, menuId: this.menuId}})
} }
}, },
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
prop="supplierName" prop="supplierName"
:labelCol="{span: 3}" :labelCol="{span: 3}"
:wrapperCol="{span: 20}"> :wrapperCol="{span: 20}">
<a-input v-toInputNum="{num:10}" <a-input v-toInputNum="{num:50}"
v-model="formData.supplierName" v-model="formData.supplierName"
placeholder="请输入供应商名称,最多可输入50字"></a-input> placeholder="请输入供应商名称,最多可输入50字"></a-input>
</a-form-model-item> </a-form-model-item>
...@@ -129,7 +129,11 @@ ...@@ -129,7 +129,11 @@
this.queryParams = this.$route.query; this.queryParams = this.$route.query;
this.initLoadAreaData() this.initLoadAreaData()
if (this.queryParams.modeType === "update") { if (this.queryParams.modeType === "update") {
this.$api.common.fetchSupplyById(this.queryParams.id).then(({data, code}) => { let par = {
id: this.queryParams.id,
menuId: this.queryParams.menuId
}
this.$api.common.fetchSupplyById(par).then(({data, code}) => {
if (code === 'SUCCESS') { if (code === 'SUCCESS') {
this.areaInfo = [{areaCode: data.areaCode, areaName: data.areaName}] this.areaInfo = [{areaCode: data.areaCode, areaName: data.areaName}]
const {areaCode, ...others} = data const {areaCode, ...others} = data
...@@ -151,7 +155,11 @@ ...@@ -151,7 +155,11 @@
loadAreaData(selectedOptions) { loadAreaData(selectedOptions) {
const targetOption = selectedOptions[selectedOptions.length - 1]; const targetOption = selectedOptions[selectedOptions.length - 1];
targetOption.loading = true; targetOption.loading = true;
this.$api.common.fetchAreaByCode({areaCode: targetOption.areaCode}).then(({data = []}) => { let par = {
menuId: this.queryParams.menuId,
areaCode: targetOption.areaCode
}
this.$api.common.fetchAreaByCode(par).then(({data = []}) => {
targetOption.loading = false; targetOption.loading = false;
data.forEach(item => { data.forEach(item => {
item['isLeaf'] = item.areaLevel >= 5; item['isLeaf'] = item.areaLevel >= 5;
...@@ -175,7 +183,8 @@ ...@@ -175,7 +183,8 @@
let areaInfo = areaCode[areaCode.length - 1] let areaInfo = areaCode[areaCode.length - 1]
let par = { let par = {
areaCode: areaInfo, areaCode: areaInfo,
...others ...others,
menuId: this.queryParams.menuId
}; };
if (this.queryParams.modeType === 'add') { if (this.queryParams.modeType === 'add') {
vm.$api.common.fetchAddSupply(par).then(res => { vm.$api.common.fetchAddSupply(par).then(res => {
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
rowKey="id" rowKey="id"
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:scroll="{ x: 1}"
> >
<template slot="action" slot-scope="record"> <template slot="action" slot-scope="record">
<!--<a-button type="link" size="small" @click="toUpdate(record)">修改</a-button>--> <!--<a-button type="link" size="small" @click="toUpdate(record)">修改</a-button>-->
...@@ -67,26 +68,29 @@ ...@@ -67,26 +68,29 @@
{ {
title: '供应商名称', title: '供应商名称',
dataIndex: 'supplierName', dataIndex: 'supplierName',
width: 220,
ellipsis: true ellipsis: true
}, },
{ {
title: '联系人', title: '联系人',
dataIndex: 'contactsName', dataIndex: 'contactsName',
ellipsis: true width: 140
}, },
{ {
title: '联系电话', title: '联系电话',
dataIndex: 'contactsPhone', dataIndex: 'contactsPhone',
ellipsis: true width:180
}, },
{ {
title: '联系地址', title: '联系地址',
dataIndex: 'address', dataIndex: 'address',
width: 260,
ellipsis: true ellipsis: true
}, },
{ {
title: '备注', title: '备注',
dataIndex: 'remarks', dataIndex: 'remarks',
width: 300,
ellipsis: true ellipsis: true
}, },
{ {
...@@ -97,6 +101,7 @@ ...@@ -97,6 +101,7 @@
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
fixed: 'right',
width: 150, width: 150,
scopedSlots: {customRender: 'action'}, scopedSlots: {customRender: 'action'},
}, },
...@@ -120,13 +125,15 @@ ...@@ -120,13 +125,15 @@
tableData: [], tableData: [],
loading: false, loading: false,
allFactoryInfo: [], allFactoryInfo: [],
routerParams: {} routerParams: {},
menuId: undefined
} }
}, },
created() { created() {
this.routerParams = this.$route.query; this.routerParams = this.$route.query;
if (this.routerParams.menuId) { if (this.routerParams.menuId) {
window.sessionStorage.setItem('menuId', this.routerParams.menuId) window.sessionStorage.setItem('menuId', this.routerParams.menuId)
this.menuId = this.routerParams.menuId
} }
this.getSupplyList(); this.getSupplyList();
this.getEnumListInfo() this.getEnumListInfo()
...@@ -136,7 +143,9 @@ ...@@ -136,7 +143,9 @@
if (window.sessionStorage.getItem('allEnum')) { if (window.sessionStorage.getItem('allEnum')) {
this.allFactoryInfo = getEnumByFlag("public_state"); this.allFactoryInfo = getEnumByFlag("public_state");
} else { } else {
let par = {} let par = {
menuId: this.menuId
}
this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => { this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => {
window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList)) window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList))
window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo)); window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo));
...@@ -154,7 +163,8 @@ ...@@ -154,7 +163,8 @@
let par = { let par = {
...pars, ...pars,
pageIndex: this.pagination.pageIndex, pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize pageSize: this.pagination.pageSize,
menuId: this.menuId
} }
this.$api.common.fetchSupplyPageList(par).then(({data = {}}) => { this.$api.common.fetchSupplyPageList(par).then(({data = {}}) => {
const {dataList = [], total = 0} = data; const {dataList = [], total = 0} = data;
...@@ -183,12 +193,13 @@ ...@@ -183,12 +193,13 @@
this.searchList() this.searchList()
}, },
toAdd() { toAdd() {
this.$router.push({path: '/supplyManage/add', query: {modeType: "add"}}) this.$router.push({path: '/supplyManage/add', query: {modeType: "add", menuId: this.menuId}})
}, },
changeStatus(record) { changeStatus(record) {
let par = { let par = {
id: record.id, id: record.id,
status: record.status === 0 ? 1 : 0, status: record.status === 0 ? 1 : 0,
menuId: this.menuId
} }
this.$api.common.fetchSupplUpdate(par).then(res => { this.$api.common.fetchSupplUpdate(par).then(res => {
if (res.code === 'SUCCESS') { if (res.code === 'SUCCESS') {
...@@ -202,7 +213,11 @@ ...@@ -202,7 +213,11 @@
title: '确定删除该条数据吗?', title: '确定删除该条数据吗?',
okType: 'danger', okType: 'danger',
onOk: () => { onOk: () => {
this.$api.common.fetchSupplDelete(record.id).then(res => { let par = {
id: record.id,
menuId: vm.menuId
}
this.$api.common.fetchSupplDelete(par).then(res => {
if (res.code === 'SUCCESS') { if (res.code === 'SUCCESS') {
this.pagination.pageIndex = 1; this.pagination.pageIndex = 1;
this.getSupplyList() this.getSupplyList()
...@@ -217,7 +232,7 @@ ...@@ -217,7 +232,7 @@
}); });
}, },
updateSupply(record) { updateSupply(record) {
this.$router.push({path: '/supplyManage/add', query: {modeType: "update", id: record.id}}); this.$router.push({path: '/supplyManage/add', query: {modeType: "update", id: record.id, menuId: this.menuId}});
} }
}, },
} }
......
...@@ -22,7 +22,7 @@ Vue.directive('toInputNum', { ...@@ -22,7 +22,7 @@ Vue.directive('toInputNum', {
function checkValue(el, defu) { function checkValue(el, defu) {
let len = el.value.length let len = el.value.length
if (el.value && len > defu) { if (el.value && len > defu) {
el.value = el.value.substring(0, defu); el.value = el.value.substring(0, defu-1);
el.dispatchEvent(new Event("input"));//调用input事件使vue v-model绑定更新 el.dispatchEvent(new Event("input"));//调用input事件使vue v-model绑定更新
} }
} }
......
...@@ -20,11 +20,12 @@ Vue.directive('toInt', { ...@@ -20,11 +20,12 @@ Vue.directive('toInt', {
} }
}); });
function checkedfun(el, maxNum, notNum) { function checkedfun(el, maxNum, notNum) {
debugger
if (maxNum && el.value > maxNum) { if (maxNum && el.value > maxNum) {
el.value = maxNum el.value = maxNum
el.dispatchEvent(new Event("input"));//调用input事件使vue v-model绑定更新 el.dispatchEvent(new Event("input"));//调用input事件使vue v-model绑定更新
} }
if (typeof (notNum) !=='undefined' && el.value === notNum.toString()) { if (notNum && typeof (notNum) !=='undefined' && el.value === notNum.toString()) {
el.value = '' el.value = ''
el.dispatchEvent(new Event("input"));//调用input事件使vue v-model绑定更新 el.dispatchEvent(new Event("input"));//调用input事件使vue v-model绑定更新
} }
......
...@@ -16,7 +16,7 @@ Vue.directive('toRemarkNum', { ...@@ -16,7 +16,7 @@ Vue.directive('toRemarkNum', {
function checkValue(el, defu) { function checkValue(el, defu) {
let len = el.value.length let len = el.value.length
if (el.value && len > defu) { if (el.value && len > defu) {
el.value = el.value.substring(0, defu); el.value = el.value.substring(0, defu-1);
el.dispatchEvent(new Event("textarea"));//调用input事件使vue v-model绑定更新 el.dispatchEvent(new Event("textarea"));//调用input事件使vue v-model绑定更新
} }
} }
......
...@@ -85,3 +85,25 @@ export const beginStockType = [ ...@@ -85,3 +85,25 @@ export const beginStockType = [
{id: 1, value: '合同库存'}, {id: 1, value: '合同库存'},
{id: 2, value: '免调库存'}, {id: 2, value: '免调库存'},
] ]
//证件类型
export const cardType = [
{id:1, value:'身份证', rule:[
{required: true, message: '请输入证件号码'},
{
pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
message:'请输入正确的身份证号'
}]},
{id:2, value: '护照', rule: [
{required: true, message: '请输入证件号码'},
{
pattern: /^1[45][0-9]{7}$|(^[P|p|S|s]\d{7}$)|(^[S|s|G|g|E|e]\d{8}$)|(^[Gg|Tt|Ss|Ll|Qq|Dd|Aa|Ff]\d{8}$)|(^[H|h|M|m]\d{8,10}$)/,
message:'请输入正确的护照'
}]},
{id:3, value: '其他标识', rule: [
{required: true, message: '请输入证件号码'},
{
pattern: /^(a-z|A-Z|0-9)*[^$%^&*;:,<>?()\""\']{1,50}$/,
message:'不能超出50个字'
}]},
]
...@@ -134,13 +134,15 @@ html, body, #app { ...@@ -134,13 +134,15 @@ html, body, #app {
::-webkit-scrollbar-thumb:vertical { ::-webkit-scrollbar-thumb:vertical {
height: 6px; height: 6px;
background-color: rgba(125, 125, 125, 0.5); //background-color: rgba(125, 125, 125, 0.5);
background-color:rgba(255,77,128, .9);
-webkit-border-radius: 6px; -webkit-border-radius: 6px;
} }
::-webkit-scrollbar-thumb:horizontal { ::-webkit-scrollbar-thumb:horizontal {
width: 6px; width: 6px;
background-color: rgba(125, 125, 125, 0.5); //background-color: rgba(125, 125, 125, 0.5);
background-color:rgba(255,77,128, .9);
-webkit-border-radius: 6px; -webkit-border-radius: 6px;
} }
// 禁用框样式 // 禁用框样式
......
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