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
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
271 additions
and
331 deletions
+271
-331
.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
+42
-84
addStock.vue
...iews/indexComponent/inStockManage/components/addStock.vue
+76
-79
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
<
template
>
<div>
<div
class=
"addMaterialDistribution"
>
<a-spin
tip=
"加载中..."
:spinning=
"spinning"
>
<a-card>
<div
style=
"font-size: 18px;font-weight: 600"
>
...
...
@@ -42,13 +42,13 @@
</a-form-model-item>
</a-col>
<a-col
:span=
"8"
>
<a-form-model-item
label=
"收货人"
prop=
"
sendContact
"
>
<a-input
placeholder=
"请填写收货人"
v-model=
"formData.
sendContact
"
></a-input>
<a-form-model-item
label=
"收货人"
prop=
"
receiver
"
>
<a-input
placeholder=
"请填写收货人"
v-model=
"formData.
receiver
"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"8"
>
<a-form-model-item
label=
"收货人电话"
prop=
"
purchas
ePhone"
>
<a-input
placeholder=
"请填写收货人电话"
v-model=
"formData.
purchas
ePhone"
></a-input>
<a-form-model-item
label=
"收货人电话"
prop=
"
receiv
ePhone"
>
<a-input
placeholder=
"请填写收货人电话"
v-model=
"formData.
receiv
ePhone"
></a-input>
</a-form-model-item>
</a-col>
</a-row>
...
...
@@ -59,10 +59,10 @@
</a-divider>
</div>
<a-table
:dataSource=
"formData.detailedList"
rowKey=
"id"
:pagination=
"false"
class=
"modal_table"
bordered
>
<a-table-column
title=
"品牌"
data-index=
"
type
Name"
></a-table-column>
<a-table-column
title=
"供应商名称"
data-index=
"
factory
Name"
></a-table-column>
<a-table-column
title=
"品牌"
data-index=
"
brand
Name"
></a-table-column>
<a-table-column
title=
"供应商名称"
data-index=
"
supplier
Name"
></a-table-column>
<a-table-column
title=
"批次号"
data-index=
"batchNumber"
></a-table-column>
<a-table-column
title=
"当前库存"
data-index=
"
stockNum
"
></a-table-column>
<a-table-column
title=
"当前库存"
data-index=
"
number
"
></a-table-column>
<a-table-column
title=
"分配数量"
width=
"190px"
fixed=
"right"
>
<template
slot-scope=
"text, record, index"
>
<a-form-model-item
:prop=
"'detailedList.' + index + '.sendNum'"
:rules=
"formRules.sendNum"
class=
"tab_input_r"
>
...
...
@@ -95,7 +95,7 @@
</a-form-model>
<div
style=
"text-align: center;margin-top: 16px"
>
<a-button
@
click=
"goBack"
>
取消
</a-button>
<a-button
type=
"primary"
@
click=
"addMaterialDis"
style=
"margin-left: 8px"
>
调拨分配
</a-button>
<a-button
type=
"primary"
@
click=
"addMaterialDis"
:loading=
"subLoad"
style=
"margin-left: 8px"
>
调拨分配
</a-button>
</div>
</a-card>
</a-spin>
...
...
@@ -111,9 +111,10 @@
export
default
{
data
()
{
return
{
unitInfo
:
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'
network
Info'
)),
unitInfo
:
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'
user
Info'
)),
routerParams
:
[],
spinning
:
false
,
subLoad
:
false
,
// 弹窗内表单
formData
:
{
detailedList
:
[],
...
...
@@ -123,18 +124,15 @@
sendDate
:
undefined
,
sendContact
:
undefined
,
sendPhone
:
undefined
,
re
lationTyp
e
:
undefined
,
purchasePhone
:
undefined
,
re
ceivePhon
e
:
undefined
,
receiver
:
undefined
},
childUnitList
:
[],
formRules
:
{
sendUnitName
:
[
{
required
:
true
,
message
:
'请选择发货单位'
}
],
relationType
:
[
{
required
:
true
,
message
:
'请选择出库类型'
}
],
purchasePhone
:
[
receivePhone
:
[
{
required
:
true
,
message
:
'请填写收货人电话'
},
{
validator
:
checkPhone
},
],
...
...
@@ -142,7 +140,7 @@
{
required
:
true
,
message
:
'请选择收货单位'
}
],
sendDate
:
[
{
required
:
true
,
message
:
'请选择
出库
日期'
}
{
required
:
true
,
message
:
'请选择
发货
日期'
}
],
sendNum
:
[
{
required
:
true
,
message
:
'请填写分配数量'
},
...
...
@@ -151,7 +149,7 @@
if
(
value
==
''
||
value
==
undefined
)
{
callback
()
}
if
(
value
<=
recordInfo
.
stockNum
)
{
if
(
value
<=
recordInfo
.
number
)
{
callback
()
}
else
{
callback
(
new
Error
(
'超出当前库存!'
));
...
...
@@ -162,17 +160,19 @@
sendContact
:
[
{
required
:
true
,
message
:
'请填写发货人'
}
],
receiver
:
[
{
required
:
true
,
message
:
'请填写收货人'
}
],
sendPhone
:
[
{
required
:
true
,
message
:
'请填写联系电话'
},
{
validator
:
checkPhone
},
],
},
// changeRecordInfo: {}//更改分配数量的record信息
}
},
created
()
{
this
.
getSelectedMedical
()
this
.
formData
.
sendUnitId
=
this
.
unitInfo
.
i
d
this
.
formData
.
sendUnitId
=
this
.
unitInfo
.
unitI
d
this
.
formData
.
sendUnitName
=
this
.
unitInfo
.
unitName
},
methods
:
{
...
...
@@ -195,29 +195,13 @@
},
// 获取当前单位的下级单位
getChildUnitList
()
{
if
(
this
.
formData
.
relationType
==
11
)
{
let
par
=
{
areaCode
:
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'networkInfo'
)).
areaCode
,
}
this
.
$api
.
networkManage
.
fetchNetworkListByAreaCode
(
par
).
then
(({
code
,
data
})
=>
{
if
(
code
===
'SUCCESS'
)
{
data
.
forEach
(
item
=>
{
item
[
'unitName'
]
=
item
.
netName
})
this
.
childUnitList
=
data
;
}
})
}
else
{
let
params
=
{
id
:
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'userInfo'
)).
unitId
,
};
this
.
$api
.
common
.
fetchUnitInfo
(
params
).
then
(({
code
,
data
})
=>
{
if
(
code
===
'SUCCESS'
)
{
this
.
childUnitList
=
data
;
}
});
}
let
params
=
{}
this
.
childUnitList
=
[{
id
:
1
,
unitName
:
'gcl'
}]
// this.$api.common.fetchMaterialDisUnitInfo(params).then(({code, data}) => {
// if (code === 'SUCCESS') {
// this.childUnitList = data;
// }
// });
},
addMaterialDis
()
{
//调拨分配
this
.
$refs
.
formRef
.
validate
(
valid
=>
{
...
...
@@ -225,62 +209,32 @@
if
(
this
.
formData
.
detailedList
.
length
===
0
)
{
this
.
$message
.
warning
(
'分配物资不能为空!'
);
}
else
{
this
.
spinning
=
true
;
let
reviceUnitName
=
undefined
let
receiveNetworkId
=
undefined
let
receiveNetworkName
=
undefined
let
params
=
{}
if
(
this
.
formData
.
relationType
==
11
)
{
receiveNetworkId
=
this
.
formData
.
receiveUnitId
receiveNetworkName
=
this
.
childUnitList
.
filter
(
item
=>
item
.
id
==
this
.
formData
.
receiveUnitId
)[
0
].
unitName
this
.
formData
.
receiveUnitId
=
undefined
reviceUnitName
=
undefined
this
.
subLoad
=
true
;
let
params
=
{}
let
reviceUnitName
=
this
.
childUnitList
.
filter
(
item
=>
item
.
id
==
this
.
formData
.
receiveUnitId
)[
0
].
unitName
params
=
{
...
this
.
formData
,
sendDate
:
moment
(
this
.
formData
.
sendDate
).
format
(
'yyyy-MM-DD'
),
purchaseUnitId
:
receiveNetworkId
,
purchaseUnitName
:
receiveNetworkName
,
receiveNetworkId
:
receiveNetworkId
,
receiveNetworkName
:
receiveNetworkName
};
}
else
{
reviceUnitName
=
this
.
childUnitList
.
filter
(
item
=>
item
.
id
==
this
.
formData
.
receiveUnitId
)[
0
].
unitName
params
=
{
...
this
.
formData
,
sendDate
:
moment
(
this
.
formData
.
sendDate
).
format
(
'yyyy-MM-DD'
),
purchaseUnitId
:
this
.
formData
.
receiveUnitId
,
purchaseUnitName
:
reviceUnitName
,
receiveUnitName
:
reviceUnitName
};
}
let
detailedList
=
[];
this
.
formData
.
detailedList
.
forEach
(
item
=>
{
detailedList
.
push
({
medicalId
:
item
.
medicalId
,
breedId
:
item
.
breedId
,
batchId
:
item
.
batchId
,
batchNumber
:
item
.
batchNumber
,
produceDate
:
item
.
produceDate
,
expireDate
:
item
.
expireDate
,
sendNum
:
item
.
sendNum
,
matSpecs
:
item
.
specs
...
item
,
stockId
:
item
.
id
});
});
params
.
detailedList
=
detailedList
;
this
.
$api
.
stockManage
.
fetchDispatchGoods
(
params
).
then
(({
code
})
=>
{
this
.
s
pinning
=
false
;
this
.
s
ubLoad
=
false
;
if
(
code
===
'SUCCESS'
)
{
this
.
$message
.
success
(
'调拨分配成功!'
);
// window.history.go(-1)
this
.
goBack
()
}
else
{
// this.$message.error('调拨分配失败!')
}
});
}).
catch
(()
=>
{
this
.
subLoad
=
false
;
})
}
}
else
{
return
false
;
}
});
},
...
...
@@ -291,6 +245,10 @@
}
</
script
>
<
style
scoped
>
<
style
lang=
"less"
>
.addMaterialDistribution {
.ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 10px!important;
}
}
</
style
>
src/views/indexComponent/inStockManage/components/addStock.vue
View file @
be966f93
...
...
@@ -11,32 +11,33 @@
>
<a-row
:gutter=
"16"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"供应商"
prop=
"
medical
Id"
>
<a-select
v-model=
"formData.
medical
Id"
<a-form-model-item
label=
"供应商"
prop=
"
supplier
Id"
>
<a-select
v-model=
"formData.
supplier
Id"
placeholder=
"请选择"
:dropdownMatchSelectWidth=
"false"
@
click
.
native=
"getAllSupply"
>
<a-select-option
v-for=
"item in
medicalNameList
"
:key=
"item.id"
:value=
"item.id"
>
{{
item
.
medicine
Name
}}
<a-select-option
v-for=
"item in
allSupplyInfo
"
:key=
"item.id"
:value=
"item.id"
>
{{
item
.
supplier
Name
}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"品牌"
prop=
"
medical
Id"
>
<a-select
v-model=
"formData.
medical
Id"
<a-form-model-item
label=
"品牌"
prop=
"
brand
Id"
>
<a-select
v-model=
"formData.
brand
Id"
placeholder=
"品牌名称"
:dropdownMatchSelectWidth=
"false"
>
<a-select-option
v-for=
"item in
medicalNameList"
:key=
"item.id
"
:value=
"item.
id"
>
{{
item
.
medicine
Name
}}
<a-select-option
v-for=
"item in
brandNameList"
:key=
"item.enumValue
"
:value=
"item.
enumValue"
>
{{
item
.
enum
Name
}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"批次号"
prop=
"batch
Id
"
>
<a-input
v-model=
"formData.
stockNum
"
<a-form-model-item
label=
"批次号"
prop=
"batch
Number
"
>
<a-input
v-model=
"formData.
batchNumber
"
placeholder=
"请输入批次号"
></a-input>
</a-form-model-item>
...
...
@@ -62,39 +63,49 @@
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"采购日期"
prop=
"
expire
Date"
>
<a-date-picker
v-model=
"formData.
expire
Date"
format=
"YYYY-MM-DD"
style=
"width: 100%"
<a-form-model-item
label=
"采购日期"
prop=
"
purch
Date"
>
<a-date-picker
v-model=
"formData.
purch
Date"
format=
"YYYY-MM-DD"
style=
"width: 100%"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"数量"
prop=
"
stockNum
"
>
<a-form-model-item
label=
"数量"
prop=
"
number
"
>
<a-input
v-toInt
v-model=
"formData.stockNum"
placeholder=
"请输入数量"
></a-input>
v-model=
"formData.number"
placeholder=
"请输入数量"
>
<a-select
slot=
"addonAfter"
v-model=
"formData.specs"
default-value=
"瓶"
style=
"width: 60px"
>
<a-select-option
value=
"瓶"
>
瓶
</a-select-option>
<a-select-option
value=
"盒"
>
盒
</a-select-option>
</a-select>
</a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"入库时间"
prop=
"e
xpire
Date"
>
<a-date-picker
v-model=
"formData.e
xpire
Date"
format=
"YYYY-MM-DD"
style=
"width: 100%"
<a-form-model-item
label=
"入库时间"
prop=
"e
nter
Date"
>
<a-date-picker
v-model=
"formData.e
nter
Date"
format=
"YYYY-MM-DD"
style=
"width: 100%"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"入库经手人"
prop=
"
stockNum
"
>
<a-form-model-item
label=
"入库经手人"
prop=
"
handler
"
>
<a-input
v-model=
"formData.
stockNum
"
v-model=
"formData.
handler
"
placeholder=
"请输入入库经手人"
></a-input>
</a-form-model-item>
</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>
...
...
@@ -103,117 +114,103 @@
</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>
</
template
>
<
script
>
import
moment
from
'moment'
import
{
closedDetail
}
from
"../../../utils/common"
;
import
{
closedDetail
,
getEnumByFlag
}
from
"../../../utils/common"
;
export
default
{
components
:
{},
data
()
{
return
{
medicalNameList
:
[],
medicalFatoryList
:
[],
productionBatch
:
[],
brandNameList
:
[],
subLoad
:
false
,
// form表单
formData
:
{
br
ee
dId
:
undefined
,
br
an
dId
:
undefined
,
batchNumber
:
undefined
,
medicalId
:
undefined
,
factoryId
:
undefined
,
supplyName
:
undefined
,
classify
:
undefined
,
supplierId
:
undefined
,
unitPrice
:
undefined
,
batchId
:
undefined
,
produceDate
:
undefined
,
expireDate
:
undefined
,
stockNum
:
undefined
purchDate
:
undefined
,
enterDate
:
undefined
,
handler
:
undefined
,
number
:
undefined
,
specs
:
'瓶'
,
remarks
:
undefined
},
formRules
:
{
br
ee
dId
:
[
{
required
:
true
,
message
:
'请选择
分类'
,
trigger
:
'change
'
}
br
an
dId
:
[
{
required
:
true
,
message
:
'请选择
品牌
'
}
],
batchNumber
:[
{
required
:
true
,
message
:
'请选择分类'
,
trigger
:
'change'
}
],
classify
:
[
{
required
:
true
,
message
:
'请选择入库类型'
,
trigger
:
'change'
}
{
required
:
true
,
message
:
'请输入批次号'
}
],
medical
Id
:
[
{
required
:
true
,
message
:
'请选择
品种名称'
,
trigger
:
'change
'
}
supplier
Id
:
[
{
required
:
true
,
message
:
'请选择
供应商
'
}
],
factoryId
:
[
{
required
:
true
,
message
:
'请选择生产厂家'
,
trigger
:
'change'
}
],
batchId
:
[
{
required
:
true
,
message
:
'请输入生产批次'
,
trigger
:
'change'
}
],
stockNum
:
[
{
required
:
true
,
message
:
'请输入药具数量'
,
trigger
:
'change'
}
number
:
[
{
required
:
true
,
message
:
'请输入数量'
}
],
produceDate
:
[
{
required
:
true
,
message
:
'请选择日期'
,
trigger
:
'change'
}
{
required
:
true
,
message
:
'请选择日期'
}
],
expireDate
:
[
{
required
:
true
,
message
:
'请选择日期'
,
trigger
:
'change'
}
{
required
:
true
,
message
:
'请选择日期'
}
],
purchDate
:
[
{
required
:
true
,
message
:
'请选择日期'
}
],
enterDate
:
[
{
required
:
true
,
message
:
'请选择日期'
}
],
unitPrice
:
[
{
required
:
true
,
message
:
'请输入单价'
}
],
remarks
:[
{
required
:
false
,
message
:
'请输入备注'
}
],
},
allSupplyInfo
:[]
}
},
created
()
{
this
.
brandNameList
=
getEnumByFlag
(
'folacin_stock_record_brand_id'
)
},
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
})
}
let
par
=
{}
this
.
$api
.
common
.
fetchAllSupply
(
par
).
then
(({
data
=
[]})
=>
{
this
.
allSupplyInfo
=
data
})
},
// 弹窗确定按钮
submitForm
()
{
let
vm
=
this
this
.
$refs
.
formRef
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
subLoad
=
true
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
pars
.
produceDate
=
moment
(
vm
.
formData
.
produceDate
).
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
.
enterDate
=
moment
(
vm
.
formData
.
enterDate
).
format
(
'YYYY-MM-DD'
)
let
par
=
{
...
othe
rs
...
pa
rs
}
this
.
spinning
=
true
;
vm
.
$api
.
stockManage
.
addHistoryStock
(
par
).
then
(
res
=>
{
this
.
spinning
=
false
;
if
(
res
.
code
===
'SUCCESS'
)
{
vm
.
subLoad
=
false
vm
.
$message
.
success
(
'录入成功!'
)
vm
.
goBack
()
}
}).
catch
(()
=>
{
vm
.
subLoad
=
false
})
}
});
...
...
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