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
be966f93
Commit
be966f93
authored
Jul 03, 2021
by
gengchunlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
在库管理接口对接
parent
313b3b3b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
153 additions
and
168 deletions
+153
-168
.env.dev
.env.dev
+1
-1
index.js
src/api/index.js
+12
-13
Home.vue
src/views/Home.vue
+8
-19
distributionWarehousing.vue
...onent/distributionWarehousing/distributionWarehousing.vue
+2
-2
folviteApply.vue
src/views/indexComponent/folviteApply/folviteApply.vue
+2
-2
folviteDistribution.vue
...ndexComponent/folviteDistribution/folviteDistribution.vue
+2
-2
addMaterialDistribution.vue
...nent/inStockManage/components/addMaterialDistribution.vue
+0
-0
addStock.vue
...iews/indexComponent/inStockManage/components/addStock.vue
+0
-0
inStockManageDetail.vue
...omponent/inStockManage/components/inStockManageDetail.vue
+10
-12
inStockManage.vue
src/views/indexComponent/inStockManage/inStockManage.vue
+77
-38
addSupply.vue
...iews/indexComponent/supplyManage/components/addSupply.vue
+19
-48
supplyManage.vue
src/views/indexComponent/supplyManage/supplyManage.vue
+19
-30
vue.config.js
vue.config.js
+1
-1
No files found.
.env.dev
View file @
be966f93
NODE_ENV = dev
VUE_APP_BASE_URL = http
s://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'
src/api/index.js
View file @
be966f93
...
...
@@ -28,16 +28,12 @@ export default {
fetchFullAreaNameInfo
(
params
)
{
//获取地区全名称
return
fetch
(
`/basic-info/v1/basic-info/basic-area-info/get-area-code-info/
${
params
.
areaCode
}
`
,
params
)
},
fetchAll
Factory
(
params
)
{
//获取生产厂家
return
fetch
(
'/
basic-info/v1/basic-info/basic-factory-info/all
'
,
params
)
fetchAll
Supply
(
params
)
{
//获取所有供应商
return
fetch
(
'/
v1/folacin-admin/folacin-supplier-info/enable
'
,
params
)
},
fetchAllBatch
(
params
)
{
//获取批次
return
fetch
(
'/basic-info/v1/basic-info/basic-batch-info/all'
,
params
)
},
fetchAllSupply
(
params
)
{
//获取所有供应商
return
fetch
(
'/basic-info/v1/basic-info/basic-supply-info/all'
,
params
)
},
fetchUploadImg
(
params
)
{
//上传图片
return
fetch
(
'/basic-info/v1/basic-info/basic-pictures-info/pictures'
,
params
,
'post'
)
},
...
...
@@ -65,6 +61,9 @@ export default {
fetchDispenserTypeByFactory
(
params
)
{
// 根据发放机厂家查询机器类型
return
fetch
(
'/basic-info/v1/basic-info/basic-machine-type-info/query-by-factory-id'
,
params
)
},
fetchMaterialDisUnitInfo
(
params
)
{
//获取物资分配下拉
return
fetch
(
'/v1/folacin-admin/folacin-send-record/send-record'
,
params
)
}
},
//首页接口
homeManage
:
{
...
...
@@ -170,10 +169,10 @@ export default {
stockManage
:
{
/*在库管理*/
fetchInStockList
(
params
)
{
//在库管理列表
return
fetch
(
'/
stock-info/v1/stock-info/stock-basic-info/basic-info
'
,
params
)
return
fetch
(
'/
v1/folacin-admin/folacin-stock-record
'
,
params
)
},
fetchInStock
Lis
Detail
(
params
)
{
//在库管理详情
return
fetch
(
`/
stock-info/v1/stock-info/stock-basic-info
/
${
params
.
id
}
`
,
params
)
fetchInStockDetail
(
params
)
{
//在库管理详情
return
fetch
(
`/
v1/folacin-admin/folacin-stock-record
/
${
params
.
id
}
`
,
params
)
},
fetchMedicineByType
(
params
)
{
//根据药具品类获取药具
return
fetch
(
'/basic-info/v1/basic-info/basic-medical-info/query-breed'
,
params
)
...
...
@@ -185,10 +184,10 @@ export default {
return
fetch
(
'/basic-info/v1/basic-info/basic-batch-info/breed-medical'
,
params
)
},
addHistoryStock
(
params
)
{
//在库管理-历史库存录入
return
fetch
(
'/
stock-info/v1/stock-info/stock-basic-info/history-stock-input
'
,
params
,
'post'
,
'json'
)
return
fetch
(
'/
v1/folacin-admin/folacin-purchase-record
'
,
params
,
'post'
,
'json'
)
},
fetchMedicalListByIds
(
params
)
{
return
fetch
(
`/
stock-info/v1/stock-info/stock-basic-info/query-ids/
${
params
.
idList
}
`
,
params
)
return
fetch
(
`/
v1/folacin-admin/folacin-stock-record/query-ids
`
,
params
)
},
/*入库管理*/
...
...
@@ -209,7 +208,7 @@ export default {
return
fetch
(
'/stock-info/v1/stock-info/stock-send-record'
,
params
);
},
fetchDispatchGoods
(
params
)
{
//分配物资
return
fetch
(
'/
stock-info/v1/stock-info/stock
-send-record'
,
params
,
'post'
,
'json'
);
return
fetch
(
'/
v1/folacin-admin/folacin
-send-record'
,
params
,
'post'
,
'json'
);
},
fetchDispatchdeGoods
(
params
)
{
//获取在库信息
return
fetch
(
'/stock-info/v1/stock-info/stock-basic-info/basic-info'
,
params
);
...
...
@@ -614,7 +613,7 @@ export default {
fyManage
:
{
//从妇幼系统获取菜单及用户信息
fetchFYLoginUser
(
params
)
{
return
fetch
(
'/
basic-info/v1/basic-info/fy/get-menu-and-user
'
,
params
);
return
fetch
(
'/
v1/folacin-admin/sys-login/getLoginInfo
'
,
params
);
},
},
//常用工具
...
...
src/views/Home.vue
View file @
be966f93
<
template
>
<a-layout
class=
"home_layout index_body"
style=
"width: 100%"
>
<a-layout>
<a-layout-content
class=
"layout_container"
>
<
a-card
>
<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"
>
<span
slot=
"tab"
>
...
...
@@ -18,7 +17,7 @@
</a-tab-pane>
</a-tabs>
<router-view></router-view>
</
a-card
>
</
div
>
</a-layout-content>
<div
style=
"clear: both"
></div>
...
...
@@ -56,17 +55,15 @@
created
()
{
//获取妇幼权限和登录基本信息
// document.cookie = 'bGNnd3lwdF9hdA=8f26b5cc-1d66-4b31-8b86-26d916209e1e;'//昆明市
document
.
cookie
=
'bGNnd3lwdF9hdA=
d12537dd-b03f-4d61-8fee-29bcb09081b0
;'
//云南省
document
.
cookie
=
'bGNnd3lwdF9hdA=
e3f0d190-7544-495a-a299-c575d4c51e5f
;'
//云南省
let
cookieToken
=
getCookie
(
'bGNnd3lwdF9hdA'
)
if
(
cookieToken
)
{
//根据cookie获取token并调用接口获取菜单并设置初始选中菜单
window
.
sessionStorage
.
setItem
(
'token'
,
'bearer'
+
' '
+
cookieToken
);
let
par
=
{}
this
.
$api
.
fyManage
.
fetchFYLoginUser
(
par
).
then
(({
data
})
=>
{
window
.
sessionStorage
.
setItem
(
'menuList'
,
JSON
.
stringify
(
data
.
menuList
));
//
window.sessionStorage.setItem('menuList', JSON.stringify(data.menuList));
window
.
sessionStorage
.
setItem
(
'userInfo'
,
JSON
.
stringify
(
data
.
userInfo
));
window
.
sessionStorage
.
setItem
(
'networkInfo'
,
JSON
.
stringify
(
data
.
orgInfo
));
// window.sessionStorage.setItem('activeItem', '/Home/inStock');
// this.getAllEnum()
window
.
sessionStorage
.
setItem
(
'allEnum'
,
JSON
.
stringify
(
data
.
enumValueList
))
this
.
setInitMenuInfo
()
this
.
showChildren
=
true
})
...
...
@@ -77,17 +74,9 @@
}
},
methods
:
{
getAllEnum
()
{
let
par
=
{}
this
.
$api
.
common
.
fetchAllEnum
(
par
).
then
(({
data
,
code
})
=>
{
if
(
code
==
'SUCCESS'
)
{
window
.
sessionStorage
.
setItem
(
'allEnum'
,
JSON
.
stringify
(
data
))
}
})
},
setInitMenuInfo
()
{
//设置默认菜单和菜单缓存
this
.
menuList
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'menuList'
));
//
this.menuList = this.menuTest
//
this.menuList = JSON.parse(window.sessionStorage.getItem('menuList'));
this
.
menuList
=
this
.
menuTest
if
(
!
window
.
sessionStorage
.
getItem
(
"tabs"
))
{
window
.
sessionStorage
.
setItem
(
'tabs'
,
JSON
.
stringify
(
this
.
menuTest
));
this
.
$store
.
commit
(
'changeTabs'
,
this
.
menuTest
)
...
...
src/views/indexComponent/distributionWarehousing/distributionWarehousing.vue
View file @
be966f93
...
...
@@ -219,10 +219,10 @@
.btn_space {
margin-right: 5px;
}
.search_form {
/*
.search_form {
margin-top: -17px;
border: 1px solid rgba(255,77,128, .2);
border-top: 0px;
padding: 30px;
}
}
*/
</
style
>
src/views/indexComponent/folviteApply/folviteApply.vue
View file @
be966f93
...
...
@@ -242,10 +242,10 @@
.btn_space {
margin-right: 5px;
}
.search_form {
/*
.search_form {
margin-top: -17px;
border: 1px solid rgba(255,77,128, .2);
border-top: 0px;
padding: 30px;
}
}
*/
</
style
>
src/views/indexComponent/folviteDistribution/folviteDistribution.vue
View file @
be966f93
...
...
@@ -180,10 +180,10 @@
.btn_space {
margin-right: 5px;
}
.search_form {
/*
.search_form {
margin-top: -16px;
border: 1px solid rgba(255,77,128, .2);
border-top: 0px;
padding: 30px;
}
}
*/
</
style
>
src/views/indexComponent/inStockManage/components/addMaterialDistribution.vue
View file @
be966f93
This diff is collapsed.
Click to expand it.
src/views/indexComponent/inStockManage/components/addStock.vue
View file @
be966f93
This diff is collapsed.
Click to expand it.
src/views/indexComponent/inStockManage/components/inStockManageDetail.vue
View file @
be966f93
<
template
>
<div>
<a-card>
<div
style=
"padding: 24px"
>
<div>
<div>
<span
style=
"font-size: 18px;font-weight: 600;"
>
药具详情
</span>
...
...
@@ -8,7 +7,7 @@
<div
style=
"margin-top: 16px"
>
<a-descriptions
bordered
:column=
"
{ sm: 2, xs: 1 }">
<a-descriptions-item
label=
"供应商"
>
{{
detailInfo
.
medical
Name
||
'--'
}}
{{
detailInfo
.
supplier
Name
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"品牌"
>
{{
detailInfo
.
breedName
||
'--'
}}
...
...
@@ -17,26 +16,26 @@
{{
detailInfo
.
batchNumber
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"生产日期"
>
{{
detailInfo
.
expir
eDate
||
'--'
}}
{{
detailInfo
.
produc
eDate
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"有效期至"
>
{{
detailInfo
.
expireDate
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"单价"
>
{{
detailInfo
.
unit
||
'--'
}}
<span>
元
</span>
</a-descriptions-item>
<a-descriptions-item
label=
"数量"
>
{{
detailInfo
.
unit
||
'--'
}}
{{
detailInfo
.
unitPrice
||
'--'
}}
<span>
元
</span>
</a-descriptions-item>
<!--
<a-descriptions-item
label=
"数量"
>
{{
detailInfo
.
number
||
'--'
}}
</a-descriptions-item>
-->
<a-descriptions-item
label=
"规格"
>
{{
detailInfo
.
specs
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"库存总数"
>
{{
detailInfo
.
stockNum
||
'--'
}}
{{
detailInfo
.
number
||
'--'
}}
</a-descriptions-item>
<a-descriptions-item
label=
"入库时间"
>
{{
detailInfo
.
stockNum
||
'--'
}}
{{
detailInfo
.
created
||
'--'
}}
</a-descriptions-item>
</a-descriptions>
</div>
...
...
@@ -44,7 +43,6 @@
<div
style=
"text-align: center;margin-top: 40px"
>
<a-button
@
click=
"goBack"
>
关闭
</a-button>
</div>
</a-card>
</div>
</
template
>
<
script
>
...
...
@@ -67,7 +65,7 @@
let
par
=
{
id
:
this
.
routerParams
.
id
}
this
.
$api
.
stockManage
.
fetchInStock
Lis
Detail
(
par
).
then
(({
data
=
[],
code
})
=>
{
this
.
$api
.
stockManage
.
fetchInStockDetail
(
par
).
then
(({
data
=
[],
code
})
=>
{
this
.
detailInfo
=
data
})
},
...
...
src/views/indexComponent/inStockManage/inStockManage.vue
View file @
be966f93
...
...
@@ -2,19 +2,19 @@
<div
class=
"inStockManage"
>
<a-form
layout=
"inline"
class=
"search_form"
>
<a-form-item
label=
"供应商名称"
>
<a-select
v-model=
"searchForm.
factory
Id"
placeholder=
"请选择"
style=
"width: 250px"
>
<a-select
v-model=
"searchForm.
supplier
Id"
placeholder=
"请选择"
style=
"width: 250px"
>
<a-select-option
value=
""
>
全部
</a-select-option>
<a-select-option
v-for=
"item in all
Factor
yInfo"
:key=
"item.id"
:value=
"item.id"
>
{{
item
.
factory
Name
}}
<a-select-option
v-for=
"item in all
Suppl
yInfo"
:key=
"item.id"
:value=
"item.id"
>
{{
item
.
supplier
Name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"品牌"
>
<!--v-price="
{digit:4}"-->
<a-input
v-model=
"searchForm.
medical
Name"
placeholder=
"请输入品牌"
style=
"width: 250px"
></a-input>
<a-input
v-model=
"searchForm.
brand
Name"
placeholder=
"请输入品牌"
style=
"width: 250px"
></a-input>
</a-form-item>
<a-form-item
label=
"入库日期"
>
<a-date-picker
v-model=
"searchForm.
produce
Date"
format=
"YYYY-MM-DD"
style=
"width: 250px"
<a-date-picker
v-model=
"searchForm.
enter
Date"
format=
"YYYY-MM-DD"
style=
"width: 250px"
/>
</a-form-item>
<a-button
class=
"search_btn"
style=
"float: right;margin-left: 10px"
@
click=
"restSearchForm"
>
清空
</a-button>
...
...
@@ -22,6 +22,34 @@
<div
style=
"clear: both"
></div>
</a-form>
<div
style=
"clear: both"
></div>
<div
style=
"float: right;line-height: 32px;background-color: #E6F7FF;margin-top: 16px;cursor: pointer"
@
click=
"showSelectedMedical"
v-if=
"selectedRowKeys.length > 0"
>
<a-popover
v-model=
"selectedVisible"
trigger=
"click"
placement=
"bottomRight"
>
<div
slot=
"content"
style=
"min-width: 300px"
>
<div>
<span
style=
"padding: 5px 16px;color: #FF4D80"
>
已选择叶酸(
{{
selectedRowKeys
.
length
}}
)
</span>
</div>
<div
style=
"margin-top: 10px"
>
<a-list
item-layout=
"horizontal"
:data-source=
"selectedRowList"
>
<a-list-item
slot=
"renderItem"
slot-scope=
"item, index"
>
<a
slot=
"actions"
@
click=
"delSelectedKey(index)"
>
删除
</a>
<a-list-item-meta
:description=
"item.brandName"
>
</a-list-item-meta>
</a-list-item>
</a-list>
</div>
</div>
<span
style=
"padding: 5px 16px;color: #FF4D80"
>
已选择叶酸
{{
selectedRowKeys
.
length
}}
条
<a-icon
type=
"down"
style=
"margin-left:10px;font-size: 10px"
/>
</span>
</a-popover>
</div>
<div
style=
"margin-top: 16px;margin-bottom: 10px"
>
<a-button
type=
"primary"
class=
"search_btn btn_space"
@
click=
"openModal"
>
库存录入
</a-button>
<a-button
type=
"primary"
class=
"search_btn btn_space"
:disabled=
"selectedRowKeys.length
<
=
0
"
@
click=
"toAdd"
>
调拨分配
</a-button>
...
...
@@ -36,7 +64,9 @@
:pagination=
"false"
:row-selection=
"
{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
>
<template
slot=
"produceDateS"
slot-scope=
"record"
>
{{
record
.
produceDate
|
formatDate
}}
</
template
>
<
template
slot=
"expireDateS"
slot-scope=
"record"
>
{{
record
.
expireDate
|
formatDate
}}
</
template
>
...
...
@@ -65,29 +95,24 @@
const
columns
=
[
{
title
:
'品牌'
,
dataIndex
:
'
medicine
Name'
,
dataIndex
:
'
brand
Name'
,
ellipsis
:
true
},
{
title
:
'供应商名称'
,
dataIndex
:
'
type
Name'
,
dataIndex
:
'
supplier
Name'
,
ellipsis
:
true
},
{
title
:
'批次号'
,
width
:
'120px'
,
dataIndex
:
'factoryName'
,
ellipsis
:
true
},
{
title
:
'生产批次'
,
dataIndex
:
'batchNumber'
,
ellipsis
:
true
},
{
title
:
'生产日期'
,
dataIndex
:
'specs
'
,
ellipsis
:
true
// dataIndex: 'produceDate
',
scopedSlots
:
{
customRender
:
'produceDateS'
},
},
{
title
:
'有效期'
,
...
...
@@ -96,7 +121,7 @@
},
{
title
:
'单价(元)'
,
dataIndex
:
'
isHistoryNam
e'
,
dataIndex
:
'
unitPric
e'
,
ellipsis
:
true
},
{
...
...
@@ -106,12 +131,12 @@
},
{
title
:
'库存总数'
,
dataIndex
:
'
stockNum
'
,
dataIndex
:
'
number
'
,
ellipsis
:
true
},
{
title
:
'入库日期'
,
dataIndex
:
'
isHistoryNam
e'
,
dataIndex
:
'
enterDat
e'
,
ellipsis
:
true
},
{
...
...
@@ -126,12 +151,10 @@
return
{
// 搜索框对象
searchForm
:
{
breedId
:
undefined
,
medicalName
:
''
,
factoryId
:
''
,
produceDate
:
undefined
brandName
:
''
,
supplierId
:
''
,
enterDate
:
undefined
},
allFactoryInfo
:
[],
pagination
:
{
pageIndex
:
1
,
pageSize
:
10
,
...
...
@@ -142,12 +165,14 @@
tableData
:
[],
loading
:
false
,
allSupplyInfo
:[],
selectedRowKeys
:[]
selectedRowKeys
:[],
selectedVisible
:
false
,
selectedRowList
:[],
}
},
created
()
{
this
.
getInStockList
()
this
.
getAll
Factor
y
()
this
.
getAll
Suppl
y
()
},
methods
:
{
getAllSupply
()
{
...
...
@@ -156,12 +181,6 @@
this
.
allSupplyInfo
=
data
})
},
getAllFactory
()
{
let
par
=
{}
this
.
$api
.
common
.
fetchAllFactory
(
par
).
then
(({
data
=
[]})
=>
{
this
.
allFactoryInfo
=
data
})
},
searchList
()
{
this
.
pagination
.
pageIndex
=
1
this
.
getInStockList
()
...
...
@@ -179,7 +198,7 @@
this
.
tableData
=
dataList
this
.
pagination
.
total
=
total
this
.
loading
=
false
}).
finally
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
...
...
@@ -194,12 +213,32 @@
this
.
pagination
.
pageSize
=
pageSize
;
this
.
getInStockList
()
},
showSelectedMedical
()
{
//显示选中的药具
let
par
=
{
idList
:
this
.
selectedRowKeys
}
this
.
$api
.
stockManage
.
fetchMedicalListByIds
(
par
).
then
(({
data
=
[]})
=>
{
this
.
selectedRowList
=
data
})
},
onSelectChange
(
selectedRowKeys
)
{
this
.
selectedRowKeys
=
selectedRowKeys
;
if
(
this
.
selectedRowKeys
.
length
==
0
)
{
this
.
selectedVisible
=
false
}
},
delSelectedKey
(
index
)
{
this
.
selectedRowKeys
.
splice
(
index
,
1
)
this
.
selectedRowList
.
splice
(
index
,
1
)
if
(
this
.
selectedRowKeys
.
length
==
0
)
{
this
.
selectedVisible
=
false
}
},
restSearchForm
()
{
this
.
searchForm
=
{
breedId
:
undefined
,
medicalName
:
''
,
factoryId
:
''
,
produceDate
:
undefined
brandName
:
''
,
supplierId
:
''
,
enterDate
:
undefined
}
this
.
searchList
()
},
...
...
@@ -234,10 +273,10 @@
.btn_space {
margin-right: 5px;
}
.search_form {
/*
.search_form {
margin-top: -17px;
border: 1px solid rgba(255,77,128, .2);
border-top: 0px;
padding: 30px;
}
}
*/
</
style
>
src/views/indexComponent/supplyManage/components/addSupply.vue
View file @
be966f93
...
...
@@ -4,7 +4,7 @@
<div>
<span
style=
"font-size: 16px;font-weight: bold"
>
添加供应商
</span>
</div>
<div
style=
"width:
8
5%;margin: 0 auto;margin-top: 20px"
>
<div
style=
"width:
7
5%;margin: 0 auto;margin-top: 20px"
>
<a-form-model
ref=
"formRef"
:model=
"formData"
:rules=
"formRules"
:labelCol=
"
{span: 6}"
:wrapperCol="{span: 16}"
...
...
@@ -12,32 +12,32 @@
<a-row
:gutter=
"16"
>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"供应商名称"
prop=
"
medicalId
"
prop=
"
supplierName
"
:labelCol=
"
{span: 3}"
:wrapperCol="{span: 20}">
<a-input
v-model=
"formData.s
tockNum
"
<a-input
v-model=
"formData.s
upplierName
"
placeholder=
"请输入供应商名称"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"联系人"
prop=
"
medicalId
"
>
<a-input
v-model=
"formData.
stockNum
"
<a-form-model-item
label=
"联系人"
prop=
"
contactsName
"
>
<a-input
v-model=
"formData.
contactsName
"
placeholder=
"请输入联系人"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"联系人电话"
prop=
"
batchId
"
>
<a-input
v-model=
"formData.
stockNum
"
<a-form-model-item
label=
"联系人电话"
prop=
"
contactsPhone
"
>
<a-input
v-model=
"formData.
contactsPhone
"
placeholder=
"请输入联系人电话"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"联系地址"
prop=
"
batchId
"
prop=
"
address
"
:labelCol=
"
{span: 3}"
:wrapperCol="{span: 20}">
<a-input
v-model=
"formData.
stockNum
"
<a-input
v-model=
"formData.
address
"
placeholder=
"请输入联系地址"
></a-input>
</a-form-model-item>
</a-col>
...
...
@@ -52,12 +52,12 @@
</a-col>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"备注"
prop=
"
stockNum
"
prop=
"
remarks
"
:labelCol=
"
{span: 3}"
:wrapperCol="{span: 20}">
<a-textarea
:rows=
"6"
v-model=
"formData.
stockNum
"
v-model=
"formData.
remarks
"
placeholder=
"请输入备注"
></a-textarea>
</a-form-model-item>
</a-col>
...
...
@@ -66,7 +66,7 @@
</div>
<div
style=
"text-align: center"
>
<a-button
class=
"search_btn btn_space"
@
click=
"goBack"
>
取消
</a-button>
<a-button
type=
"primary"
class=
"search_btn btn_space"
style=
"margin-left: 10px"
@
click=
"submitForm"
>
保存
</a-button>
<a-button
type=
"primary"
class=
"search_btn btn_space"
:loading=
"subLoad"
style=
"margin-left: 10px"
@
click=
"submitForm"
>
保存
</a-button>
</div>
</a-card>
</div>
...
...
@@ -78,9 +78,7 @@
components
:
{},
data
()
{
return
{
medicalNameList
:
[],
medicalFatoryList
:
[],
productionBatch
:
[],
subLoad
:
false
,
// form表单
formData
:
{
breedId
:
undefined
,
...
...
@@ -127,56 +125,29 @@
{
required
:
true
,
message
:
'请输入单价'
}
],
},
allSupplyInfo
:[]
}
},
created
()
{
},
methods
:
{
getAllSupply
()
{
let
par
=
{}
this
.
$api
.
common
.
fetchAllSupply
(
par
).
then
(({
data
=
[]})
=>
{
this
.
allSupplyInfo
=
data
})
},
getAllBatch
()
{
this
.
productionBatch
=
[]
if
(
this
.
formData
.
medicalId
)
{
let
par
=
{
idList
:[
this
.
formData
.
medicalId
]
}
this
.
$api
.
common
.
fetchBatchNumberByMedicalId
(
par
).
then
(({
data
=
[]})
=>
{
this
.
productionBatch
=
data
})
}
},
// 弹窗确定按钮
submitForm
()
{
let
vm
=
this
this
.
$refs
.
formRef
.
validate
(
valid
=>
{
if
(
valid
)
{
let
pars
=
{}
Object
.
assign
(
pars
,
vm
.
formData
)
pars
[
'company'
]
=
JSON
.
parse
(
vm
.
formData
.
factoryId
).
factoryName
pars
[
'companyId'
]
=
JSON
.
parse
(
vm
.
formData
.
factoryId
).
id
pars
[
'batchNumber'
]
=
JSON
.
parse
(
vm
.
formData
.
batchId
).
batchNumber
pars
[
'batchId'
]
=
JSON
.
parse
(
vm
.
formData
.
batchId
).
id
pars
.
produceDate
=
moment
(
vm
.
formData
.
produceDate
).
format
(
'YYYY-MM-DD 00:00:00'
)
pars
.
expireDate
=
moment
(
vm
.
formData
.
expireDate
).
format
(
'YYYY-MM-DD 00:00:00'
)
pars
[
'isHistory'
]
=
1
const
{
factoryId
,
...
others
}
=
pars
vm
.
subLoad
=
true
let
par
=
{
...
others
...
vm
.
formData
}
this
.
spinning
=
true
;
vm
.
$api
.
stockManage
.
addHistoryStock
(
par
).
then
(
res
=>
{
this
.
s
pinning
=
false
;
this
.
s
ubLoad
=
false
;
if
(
res
.
code
===
'SUCCESS'
)
{
vm
.
$message
.
success
(
'
录入
成功!'
)
vm
.
$message
.
success
(
'
保存
成功!'
)
vm
.
goBack
()
}
}).
catch
(()
=>
{
this
.
subLoad
=
false
})
}
});
...
...
src/views/indexComponent/supplyManage/supplyManage.vue
View file @
be966f93
...
...
@@ -2,8 +2,7 @@
<div
class=
"inStockManage"
>
<a-form
layout=
"inline"
class=
"search_form"
>
<a-form-item
label=
"供应商名称"
>
<!--v-price="
{digit:4}"-->
<a-input
v-model=
"searchForm.idCar"
placeholder=
"请输入供应商名称"
style=
"width: 250px"
></a-input>
<a-input
v-model=
"searchForm.supplierName"
placeholder=
"请输入供应商名称"
style=
"width: 250px"
></a-input>
</a-form-item>
<a-form-item
label=
"状态"
>
<a-select
v-model=
"searchForm.status"
placeholder=
"请选择"
style=
"width: 250px"
>
...
...
@@ -29,8 +28,8 @@
:pagination=
"false"
>
<template
slot=
"
expireDateS
"
slot-scope=
"record"
>
{{
record
.
expireDate
|
formatDat
e
}}
<template
slot=
"
statusInfo
"
slot-scope=
"record"
>
{{
record
.
statusNam
e
}}
</
template
>
<
template
slot=
"action"
slot-scope=
"record"
>
<a-popconfirm
...
...
@@ -64,49 +63,39 @@
import
moment
from
'moment'
const
columns
=
[
{
title
:
'
发放日期
'
,
dataIndex
:
'
medicine
Name'
,
title
:
'
供应商名称
'
,
dataIndex
:
'
supplier
Name'
,
ellipsis
:
true
},
{
title
:
'姓名'
,
dataIndex
:
'typeName'
,
ellipsis
:
true
},
{
title
:
'证件号码'
,
width
:
'120px'
,
dataIndex
:
'factoryName'
,
title
:
'联系人'
,
dataIndex
:
'contactsName'
,
ellipsis
:
true
},
{
title
:
'联系电话'
,
dataIndex
:
'
batchNumber
'
,
dataIndex
:
'
contactsPhone
'
,
ellipsis
:
true
},
{
title
:
'
发放数量(瓶)
'
,
dataIndex
:
'
spec
s'
,
title
:
'
联系地址
'
,
dataIndex
:
'
addres
s'
,
ellipsis
:
true
},
{
title
:
'发放时期'
,
width
:
'120px'
,
scopedSlots
:
{
customRender
:
'expireDateS'
},
},
{
title
:
'现住址'
,
dataIndex
:
'isHistoryName'
,
title
:
'备注'
,
dataIndex
:
'remarks'
,
ellipsis
:
true
},
{
title
:
'
登记人
'
,
dataIndex
:
'specs'
,
ellipsis
:
true
title
:
'
状态
'
,
width
:
70
,
scopedSlots
:
{
customRender
:
'statusInfo'
},
},
{
title
:
'操作'
,
align
:
'center'
,
width
:
110
,
scopedSlots
:
{
customRender
:
'action'
},
},
]
...
...
@@ -116,7 +105,7 @@
return
{
// 搜索框对象
searchForm
:
{
idCar
:
undefined
,
supplierName
:
undefined
,
status
:
''
},
pagination
:
{
...
...
@@ -228,10 +217,10 @@
.btn_space {
margin-right: 5px;
}
.search_form {
/*
.search_form {
margin-top: -16px;
border: 1px solid rgba(255,77,128, .2);
border-top: 0px;
padding: 30px;
}
}
*/
</
style
>
vue.config.js
View file @
be966f93
...
...
@@ -59,7 +59,7 @@ module.exports = {
warning
:
false
,
errors
:
false
},
https
:
true
,
//
https:true,
},
chainWebpack
:
(
config
)
=>
{
config
.
plugins
.
delete
(
'preload'
)
...
...
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