Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
folacin-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ynby
folacin-front
Commits
453496e4
Commit
453496e4
authored
Jul 06, 2021
by
罗成兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出入库记录完善
parent
44ff79a9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
315 additions
and
9 deletions
+315
-9
index.js
src/api/index.js
+4
-1
index.js
src/router/index.js
+4
-2
Home.vue
src/views/Home.vue
+3
-2
dateRangePicker.vue
src/views/components/dateRangePicker.vue
+32
-0
myPagination.vue
src/views/components/myPagination.vue
+55
-0
InformedConsent.vue
src/views/indexComponent/InformedConsent/InformedConsent.vue
+3
-3
stockTransfer.vue
src/views/indexComponent/stockTransfer/stockTransfer.vue
+193
-0
testDate.js
src/views/utils/testDate.js
+21
-1
No files found.
src/api/index.js
View file @
453496e4
...
...
@@ -180,7 +180,10 @@ export default {
fetchMedicalListByIds
(
params
)
{
return
fetch
(
`/v1/folacin-admin/folacin-stock-record/query-ids`
,
params
)
},
/*出入库记录*/
fetchStockTransferList
(
params
)
{
//查询出入库记录
return
fetch
(
'/v1/folacin-admin/folacin-stock-transfer'
,
params
);
},
/*入库管理*/
fetchStockList
(
params
)
{
//入库管理列表
return
fetch
(
'/stock-info/v1/stock-info/stock-send-record/receive-order'
,
params
);
...
...
src/router/index.js
View file @
453496e4
...
...
@@ -26,6 +26,8 @@ const routes = [
{
path
:
'folviteDistribution'
,
name
:
'叶酸发放登记列表'
,
component
:
()
=>
import
(
'@/views/indexComponent/folviteDistribution/folviteDistribution.vue'
)},
//分配入库
{
path
:
'distributionWarehousing'
,
name
:
'分配入库列表'
,
component
:
()
=>
import
(
'@/views/indexComponent/distributionWarehousing/distributionWarehousing.vue'
)},
//出入库记录
{
path
:
'stockTransfer'
,
name
:
'出入库记录'
,
component
:
()
=>
import
(
'@/views/indexComponent/stockTransfer/stockTransfer.vue'
)},
//叶酸申请管理
{
path
:
'folviteApply'
,
name
:
'叶酸申请管理'
,
component
:
()
=>
import
(
'@/views/indexComponent/folviteApply/folviteApply.vue'
)},
//知情同意书管理
...
...
@@ -44,9 +46,9 @@ const routes = [
//分配入库
{
path
:
'/distributionWarehousing/add'
,
name
:
'分配入库'
,
component
:
()
=>
import
(
'@/views/indexComponent/distributionWarehousing/components/addDistributionWarehousing.vue'
)},
{
path
:
'/distributionWarehousing/detail'
,
name
:
'分配入库详情'
,
component
:
()
=>
import
(
'@/views/indexComponent/distributionWarehousing/components/distributionWarehousingDetail.vue'
)},
//叶酸申请管理
//叶酸申请管理
{
path
:
'/folviteApply/grant'
,
name
:
'叶酸申请发放'
,
component
:
()
=>
import
(
'@/views/indexComponent/folviteApply/components/folviteApplyGrant.vue'
)},
//供应商管理
//供应商管理
{
path
:
'/supplyManage/add'
,
name
:
'新增供应商'
,
component
:
()
=>
import
(
'@/views/indexComponent/supplyManage/components/addSupply.vue'
)},
]
...
...
src/views/Home.vue
View file @
453496e4
...
...
@@ -55,7 +55,7 @@
created
()
{
//获取妇幼权限和登录基本信息
// document.cookie = 'bGNnd3lwdF9hdA=8f26b5cc-1d66-4b31-8b86-26d916209e1e;'//昆明市
document
.
cookie
=
'bGNnd3lwdF9hdA=
30bdc0e7-445f-4429-b6ad-6390994da651
;'
//云南省
document
.
cookie
=
'bGNnd3lwdF9hdA=
e46a9c23-60e1-41f3-a652-089d50b3cbd9
;'
//云南省
let
cookieToken
=
getCookie
(
'bGNnd3lwdF9hdA'
)
if
(
cookieToken
)
{
//根据cookie获取token并调用接口获取菜单并设置初始选中菜单
window
.
sessionStorage
.
setItem
(
'token'
,
'bearer'
+
' '
+
cookieToken
);
...
...
@@ -76,7 +76,8 @@
methods
:
{
setInitMenuInfo
()
{
//设置默认菜单和菜单缓存
// this.menuList = JSON.parse(window.sessionStorage.getItem('menuList'));
this
.
menuList
=
this
.
menuTest
this
.
menuList
=
this
.
menuTest
;
console
.
log
(
999
,
this
.
menuList
)
if
(
!
window
.
sessionStorage
.
getItem
(
"tabs"
))
{
window
.
sessionStorage
.
setItem
(
'tabs'
,
JSON
.
stringify
(
this
.
menuTest
));
this
.
$store
.
commit
(
'changeTabs'
,
this
.
menuTest
)
...
...
src/views/components/dateRangePicker.vue
0 → 100644
View file @
453496e4
<
template
>
<div>
<a-range-picker
format=
"YYYY-MM-DD"
:ranges=
"
{ '今天': [moment(), moment()], '本月': [moment().startOf('month'), moment().endOf('month')]}"
@change="onChange"
/>
</div>
</
template
>
<
script
>
import
moment
from
'moment'
;
export
default
{
name
:
"dateRangePicker"
,
data
()
{
return
{
date
:[],
};
},
methods
:
{
moment
,
onChange
(
dates
,
dateStrings
)
{
this
.
date
=
dateStrings
;
this
.
$emit
(
'input'
,
dateStrings
);
},
},
}
</
script
>
<
style
scoped
>
</
style
>
src/views/components/myPagination.vue
0 → 100644
View file @
453496e4
<
template
>
<a-pagination
:total=
"paginations.total"
show-size-changer
show-quick-jumper
v-model=
"paginations.pageIndex"
:page-size=
"paginations.pageSize"
:page-size-options=
"paginations.pageSizeOptions"
@
showSizeChange=
"showSizeChange"
@
change=
"pageChange"
:showTotal=
"() => `共 $
{paginations.total} 条`"
/>
</
template
>
<
script
>
/**
* 分页组件
*/
export
default
{
name
:
"myPagination"
,
props
:
[
"pagination"
],
data
()
{
return
{
paginations
:
{
pageIndex
:
1
,
pageSize
:
10
,
total
:
0
,
pageSizeOptions
:
[
'10'
,
'20'
,
'30'
,
'40'
,
'50'
],
},
}
},
mounted
()
{
this
.
paginations
=
this
.
pagination
;
},
methods
:
{
// 分页
showSizeChange
(
pageNum
,
pageSize
)
{
this
.
paginations
.
pageIndex
=
1
;
this
.
paginations
.
pageSize
=
pageSize
;
this
.
$emit
(
'input'
,
this
.
paginations
);
this
.
$emit
(
'getList'
);
},
pageChange
(
pageNum
,
pageSize
)
{
this
.
pagination
.
pageIndex
=
pageNum
;
this
.
pagination
.
pageSize
=
pageSize
;
this
.
$emit
(
'input'
,
this
.
paginations
);
this
.
$emit
(
'getList'
);
},
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/indexComponent/InformedConsent/InformedConsent.vue
View file @
453496e4
...
...
@@ -43,15 +43,15 @@
}
},
created
()
{
},
mounted
()
{
let
vm
=
this
;
this
.
$api
.
common
.
fetchConsentInfo
().
then
(
res
=>
{
if
(
res
.
code
==
'SUCCESS'
)
{
if
(
isBlank
(
res
.
data
))
{
this
.
modeType
=
'add'
;
}
else
{
setTimeout
(
function
()
{
vm
.
$refs
.
baiduEditor
.
setContent
(
res
.
data
.
content
,
false
)
},
500
);
vm
.
$refs
.
baiduEditor
.
setContent
(
res
.
data
.
content
,
false
)
this
.
formData
.
content
=
res
.
data
.
content
;
this
.
formData
.
id
=
res
.
data
.
id
;
}
...
...
src/views/indexComponent/stockTransfer/stockTransfer.vue
0 → 100644
View file @
453496e4
<
template
>
<div
class=
"stockTransfer"
>
<a-form
layout=
"inline"
class=
"search_form"
>
<a-form-item
label=
"供应商名称"
>
<a-select
v-model=
"searchForm.supplierId"
placeholder=
"请选择"
style=
"width: 250px"
>
<a-select-option
value=
""
>
全部
</a-select-option>
<a-select-option
v-for=
"item in allSupplyInfo"
:key=
"item.id"
:value=
"item.id"
>
{{
item
.
supplierName
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"品牌"
>
<a-select
v-model=
"searchForm.brandId"
placeholder=
"请选择"
style=
"width: 250px"
>
<a-select-option
value=
""
>
全部
</a-select-option>
<a-select-option
v-for=
"item in brandList"
:key=
"item.enumValue"
:value=
"item.enumValue"
>
{{
item
.
enumName
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"类型"
>
<a-select
v-model=
"searchForm.stockType"
placeholder=
"请选择"
style=
"width: 250px"
>
<a-select-option
value=
""
>
全部
</a-select-option>
<a-select-option
v-for=
"item in stockTypeList"
:key=
"item.enumValue"
:value=
"item.enumValue"
>
{{
item
.
enumName
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"出库/入库日期"
>
<dateRangePicker
v-model=
"searchForm.date"
></dateRangePicker>
</a-form-item>
<a-button
type=
"primary"
class=
"search_btn"
icon=
"search"
@
click=
"searchList"
>
搜索
</a-button>
<a-button
class=
"search_btn"
style=
"margin-left: 10px"
icon=
"close"
@
click=
"restSearchForm"
>
清空
</a-button>
<a-button
type=
"primary"
class=
"search_btn"
icon=
"download"
style=
"float: right"
@
click=
"downloadExcel"
>
导出Excel
</a-button>
</a-form>
<div
style=
"clear: both"
></div>
<div
style=
"clear: both"
></div>
<a-table
:dataSource=
"tableData"
:columns=
"columns"
rowKey=
"id"
:loading=
"loading"
:pagination=
"false"
>
<template
slot=
"produceDateS"
slot-scope=
"record"
>
{{
record
.
produceDate
|
formatDate
}}
</
template
>
<
template
slot=
"expireDateS"
slot-scope=
"record"
>
{{
record
.
expireDate
|
formatDate
}}
</
template
>
</a-table>
<myPagination
v-model=
"pagination"
:pagination=
"pagination"
@
getList=
"getStockTransferList"
></myPagination>
</div>
</template>
<
script
>
import
{
isNotBlank
,
isEmptyParams
}
from
"../../utils/common"
;
import
dateRangePicker
from
'../../components/dateRangePicker'
;
import
myPagination
from
'../../components/myPagination'
import
moment
from
'moment'
const
columns
=
[
{
title
:
'供应商名称'
,
dataIndex
:
'supplierName'
,
ellipsis
:
true
},
{
title
:
'品牌'
,
dataIndex
:
'brandName'
,
ellipsis
:
true
},
{
title
:
'批次号'
,
width
:
'120px'
,
dataIndex
:
'batchNumber'
,
ellipsis
:
true
},
{
title
:
'生产日期'
,
dataIndex
:
'produceDate'
,
scopedSlots
:
{
customRender
:
'produceDateS'
},
},
{
title
:
'有效期'
,
width
:
'120px'
,
scopedSlots
:
{
customRender
:
'expireDateS'
},
},
{
title
:
'数量'
,
dataIndex
:
'number'
,
ellipsis
:
true
},
{
title
:
'出库/入库'
,
dataIndex
:
'stockTypeName'
,
ellipsis
:
true
},
{
title
:
'分类'
,
dataIndex
:
'classifyName'
,
ellipsis
:
true
},
{
title
:
'出库/入库日期'
,
dataIndex
:
'operateDate'
,
ellipsis
:
true
}
];
export
default
{
name
:
"stockTransfer"
,
components
:
{
dateRangePicker
,
myPagination
},
data
()
{
return
{
// 搜索框对象
searchForm
:
{
supplierId
:
''
,
brandId
:
''
,
stockType
:
''
,
date
:
[]
},
pagination
:
{
pageIndex
:
1
,
pageSize
:
10
,
total
:
0
,
pageSizeOptions
:
[
'10'
,
'20'
,
'30'
,
'40'
,
'50'
],
},
columns
,
tableData
:
[],
loading
:
false
,
allSupplyInfo
:
[],
brandList
:
[],
stockTypeList
:
[]
}
},
created
()
{
this
.
getStockTransferList
();
this
.
getAllSupply
();
let
allEnum
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"allEnum"
));
this
.
brandList
=
allEnum
[
"folacin_stock_record_brand_id"
];
this
.
stockTypeList
=
allEnum
[
"folacin_stock_transfer_stock_type"
];
},
methods
:
{
getAllSupply
()
{
let
par
=
{}
this
.
$api
.
common
.
fetchAllSupply
(
par
).
then
(({
data
=
[]})
=>
{
this
.
allSupplyInfo
=
data
})
},
searchList
()
{
this
.
pagination
.
pageIndex
=
1
;
this
.
getStockTransferList
()
},
getStockTransferList
()
{
this
.
loading
=
true
;
let
date
=
this
.
searchForm
.
date
;
let
pars
=
isEmptyParams
(
this
.
searchForm
);
let
par
=
{
...
pars
,
startDate
:
date
[
0
],
endDate
:
date
[
1
],
pageIndex
:
this
.
pagination
.
pageIndex
,
pageSize
:
this
.
pagination
.
pageSize
}
this
.
$api
.
stockManage
.
fetchStockTransferList
(
par
).
then
(({
data
=
{}})
=>
{
const
{
dataList
=
[],
total
=
0
}
=
data
;
this
.
tableData
=
dataList
;
this
.
pagination
.
total
=
total
;
this
.
loading
=
false
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
restSearchForm
()
{
this
.
searchForm
=
{
brandId
:
''
,
supplierId
:
''
,
date
:
[],
stockType
:
''
}
this
.
searchList
()
},
downloadExcel
()
{
this
.
$message
.
warning
(
"拼命开发中......"
)
},
},
}
</
script
>
<
style
lang=
"less"
scoped
>
.btn_space {
margin-right: 5px;
}
</
style
>
src/views/utils/testDate.js
View file @
453496e4
...
...
@@ -57,6 +57,26 @@ export const menuTest = [{
"backRequestMode"
:
null
,
"isGray"
:
1
,
"children"
:
[]
},{
"id"
:
1543
,
"parentId"
:
1536
,
"systemId"
:
3
,
"name"
:
"出入库记录"
,
"code"
:
"stockTransfer"
,
"icon"
:
"file-sync"
,
"description"
:
"出入库记录"
,
"valid"
:
1
,
"sortCode"
:
3
,
"type"
:
1
,
"createTime"
:
"2021-05-20 15:57:11"
,
"createUser"
:
null
,
"updateTime"
:
"2021-06-18 17:48:44"
,
"updateUser"
:
null
,
"backActionUrl"
:
null
,
"frontActionUrl"
:
"/Home/stockTransfer"
,
"backRequestMode"
:
null
,
"isGray"
:
1
,
"children"
:
[]
},
{
"id"
:
1540
,
"parentId"
:
1536
,
...
...
@@ -96,7 +116,7 @@ export const menuTest = [{
"backRequestMode"
:
null
,
"isGray"
:
1
,
},{
"id"
:
154
1
,
"id"
:
154
2
,
"parentId"
:
1536
,
"systemId"
:
3
,
"name"
:
"供应商管理"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment