Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pt-tobacco-lims-web
Overview
Overview
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
wangweidong
pt-tobacco-lims-web
Commits
6c574a8c
Commit
6c574a8c
authored
Jun 09, 2020
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demo完善样品流转
parent
26177749
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
766 additions
and
7 deletions
+766
-7
drugSample.js
api/drug/drugSample.js
+3
-1
DrugSampleProductEdit.vue
pages/drug-register/product/DrugSampleProductEdit.vue
+17
-4
labReceiveScan.vue
pages/drug-sample-flow/labReceiveScan.vue
+100
-0
sampleLabFlowIndex.vue
pages/drug-sample-flow/sampleLabFlowIndex.vue
+47
-0
historyTask.vue
pages/drug-sample-flow/tabs/historyTask.vue
+274
-0
labSampleFlow.vue
pages/drug-sample-flow/tabs/labSampleFlow.vue
+317
-0
login.vue
pages/login.vue
+2
-2
drug-sample-routes.js
router/drug-sample-routes.js
+6
-0
No files found.
api/drug/drugSample.js
View file @
6c574a8c
...
...
@@ -49,6 +49,8 @@ export default {
http
.
post
(
'/v1/sample/page-sample-make-his'
,
data
).
then
(
res
=>
res
),
pageSampleReceive
:
data
=>
http
.
post
(
'/v1/sample/page-sample-receive'
,
data
).
then
(
res
=>
res
),
pageSampleFlow
:
data
=>
http
.
post
(
'/v1/sample/page-sample-flow'
,
data
).
then
(
res
=>
res
),
pageSampleReceiveHis
:
data
=>
http
.
post
(
'/v1/sample/page-sample-receive-his'
,
data
).
then
(
res
=>
res
),
...
...
@@ -145,7 +147,7 @@ export default {
submitSend
:
data
=>
http
.
post
(
'/v1/sample/submit-send?ids='
+
data
).
then
(
res
=>
res
),
submitReceive
:
data
=>
http
.
post
(
'/v1/sample/submit-receive?ids='
+
data
).
then
(
res
=>
res
),
http
.
post
(
'/v1/sample/submit-receive
-to-flow
?ids='
+
data
).
then
(
res
=>
res
),
scanSampleSend
:
data
=>
http
...
...
pages/drug-register/product/DrugSampleProductEdit.vue
View file @
6c574a8c
...
...
@@ -19,7 +19,8 @@
报检信息
<p
slot=
"content"
>
<Form-item
label=
"价类"
prop=
"category"
class=
"width-32"
>
<Select
v-model=
"formObj.category"
>
<Select
v-model=
"categoryMultiple"
multiple
@
on-change=
"_categoryChange"
>
<input
v-model=
"formObj.category"
hidden=
"hidden"
></input>
<Option
v-for=
"item in testType"
:key=
"item.name"
:value=
"item.name"
>
{{
item
.
name
}}
</Option>
...
...
@@ -153,6 +154,7 @@ export default {
infoVal
:
[
'1'
],
// 默认展开第一个
id
:
''
,
modalTitle
:
''
,
categoryMultiple
:
''
,
formObj
:
{
category
:
''
,
standard
:
''
,
...
...
@@ -179,7 +181,7 @@ export default {
{
required
:
true
,
message
:
'报检单位不能为空'
,
trigger
:
'blur'
}
],
category
:
[
{
required
:
true
,
message
:
'
检测类型
不能为空'
,
trigger
:
'change'
}
{
required
:
true
,
message
:
'
价类
不能为空'
,
trigger
:
'change'
}
],
modelSpec
:
[{
required
:
true
,
message
:
'物料编号不能为空'
}],
name
:
[
...
...
@@ -199,10 +201,16 @@ export default {
name
:
'一类'
},
{
name
:
'二
、三
类'
name
:
'二类'
},
{
name
:
'四、五类'
name
:
'三类'
},
{
name
:
'四类'
},
{
name
:
'五类'
}
],
classBanList
:
[
...
...
@@ -307,6 +315,10 @@ export default {
this
.
itemIdsEdit
.
push
(
data
[
i
].
aptitudeId
)
}
},
_categoryChange
(
data
)
{
this
.
formObj
.
category
=
this
.
categoryMultiple
.
join
(
'、'
)
console
.
log
(
this
.
formObj
.
category
)
},
_open
(
formObj
)
{
this
.
itemIdsEdit
=
[]
this
.
itemIds
=
[]
...
...
@@ -327,6 +339,7 @@ export default {
}
else
{
this
.
id
=
formObj
.
id
this
.
edit
=
false
this
.
categoryMultiple
=
formObj
.
category
.
split
(
'、'
)
if
(
undefined
===
formObj
.
pcPerson
)
{
formObj
.
pcPerson
=
''
}
...
...
pages/drug-sample-flow/labReceiveScan.vue
0 → 100644
View file @
6c574a8c
<
template
>
<div>
<Modal
v-model=
"showScanModal"
:mask-closable=
"false"
width=
"700"
:styles=
"
{marginTop: '-85px'}">
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
:label-width=
"80"
onsubmit=
"return false"
>
<Form-item
label=
"样品编号"
prop=
"num"
>
<Input
ref=
"inputFocus"
v-model=
"num"
placeholder=
"请将鼠标聚焦在此,并保持英文输入状态"
style=
"width: 100%;"
@
submit
.
native
.
prevent
@
on-enter=
"_numBlur"
></Input>
</Form-item>
<Form-item
label=
"扫码信息"
>
<div
class=
"scanInfo"
>
<ul>
<li
v-for=
"(item, index) in scanInfo"
:key=
"index"
>
{{
item
}}
</li>
</ul>
</div>
</Form-item>
</Form>
<h3
style=
"padding-left: 80px;"
>
已接收:
{{
scanInfo
.
length
}}
批
</h3>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
/>
</div>
</Modal>
</div>
</
template
>
<
script
>
import
{
drugSample
}
from
'../../api'
export
default
{
data
()
{
return
{
modalTitle
:
'扫码接收'
,
showScanModal
:
false
,
scanInfo
:
[],
num
:
''
,
uri
:
''
,
footerList
:
[{
id
:
''
,
type
:
''
,
name
:
'关闭'
}]
}
},
methods
:
{
// 接口值,接口文件
_open
(
uri
)
{
this
.
showScanModal
=
true
this
.
num
=
''
this
.
scanInfo
=
[]
this
.
uri
=
uri
this
.
_autoFocus
()
},
_autoFocus
()
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
inputFocus
.
focus
()
})
},
async
_numBlur
()
{
this
.
num
=
this
.
num
.
split
(
','
)[
0
]
// 扫码接口
const
result
=
await
drugSample
.
scanSubmitReceive
(
this
.
num
)
if
(
result
)
{
this
.
scanInfo
.
unshift
(
'编号'
+
this
.
num
+
'接收成功!'
)
this
.
num
=
''
this
.
$emit
(
'on-result-change'
)
}
else
{
this
.
num
=
''
}
this
.
_autoFocus
()
},
_footerResult
(
msg
)
{
this
.
_hideLoading
()
if
(
msg
===
'关闭'
)
this
.
showScanModal
=
false
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
}
}
}
</
script
>
<
style
scoped
>
.scanInfo
{
width
:
100%
;
overflow
:
auto
;
height
:
400px
;
border
:
1px
solid
#dddee1
;
border-radius
:
4px
;
color
:
#495060
;
padding
:
4px
7px
;
}
</
style
>
pages/drug-sample-flow/sampleLabFlowIndex.vue
0 → 100644
View file @
6c574a8c
<
template
>
<div>
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"_changeTabs"
>
<el-tab-pane
label=
"样本流转"
name=
"lab"
>
<labSampleReceive
ref=
"labTabs"
/>
</el-tab-pane>
<el-tab-pane
label=
"历史任务"
name=
"his"
>
<historyTask
ref=
"hisTabs"
/>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</
template
>
<
script
>
import
labSampleReceive
from
'./tabs/labSampleFlow'
import
historyTask
from
'./tabs/historyTask'
export
default
{
components
:
{
labSampleReceive
,
historyTask
},
data
()
{
return
{
activeName
:
'lab'
}
},
mounted
()
{
this
.
activeName
=
'lab'
this
.
_page
()
},
methods
:
{
_changeTabs
(
tab
,
event
)
{
if
(
tab
.
name
===
'lab'
)
{
this
.
_page
()
}
else
{
this
.
$refs
.
hisTabs
.
_clearPage
()
this
.
$refs
.
hisTabs
.
_page
()
}
},
_page
()
{
this
.
$refs
.
labTabs
.
_clearPage
()
this
.
$refs
.
labTabs
.
_page
()
}
}
}
</
script
>
pages/drug-sample-flow/tabs/historyTask.vue
0 → 100644
View file @
6c574a8c
<
template
>
<div>
<Row>
<Form
v-show=
"searchOpen"
id=
"his-sample-form"
inline
onsubmit=
"return false"
:label-width=
"100"
class=
"search-form"
>
<label
class=
"label-sign"
/>
<Form-item
class=
"search-item"
label=
"样本编号:"
>
<Input
name=
"sampleNum"
placeholder=
"请输入样本编号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"牌号:"
>
<Input
name=
"name"
placeholder=
"请输入牌号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"生产日期:"
>
<Date-picker
ref=
"pcTime"
type=
"datetimerange"
placeholder=
"生产日期"
style=
"width: 100%;"
transfer
:editable=
"false"
@
on-change=
"_histDateChange"
/>
<input
type=
"hidden"
name=
"pcTimeBegin"
>
<input
type=
"hidden"
name=
"pcTimeEnd"
>
</Form-item>
<!--
<Form-item
class=
"search-item"
label=
"报检单位:"
>
-->
<!--
<Input
name=
"declarationInspection"
placeholder=
"请输入报检单位"
clearable
@
on-enter=
"_formSearch"
/>
-->
<!--
</Form-item>
-->
<Form-item
class=
"search-item"
label=
"接收时间:"
>
<Date-picker
ref=
"receiveTime"
type=
"datetimerange"
placeholder=
"送样人接收时间"
style=
"width: 100%;"
transfer
:editable=
"false"
@
on-change=
"_labTimeChange"
/>
<input
type=
"hidden"
name=
"receiveTimeBegin"
>
<input
type=
"hidden"
name=
"receiveTimeEnd"
>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_formSearch"
>
搜索
</Button>
</Form-item>
</Form>
<Col
/>
<!--
<btn-list
:msg=
"btn"
:open=
"searchOpen"
show-search-btn=
"true"
@
on-result-change=
"_btnClick"
/>
-->
</Col>
<Col
/>
<element-table
ref=
"pageTable"
:page-columns=
"pageColumns"
:table-height=
"tableHeight"
:get-page=
"getPage"
@
on-result-change=
"_tableResultChange"
>
<el-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
show-overflow-tooltip
sortable
:prop=
"item.key"
:label=
"item.title"
:align=
"item.align"
:width=
"item.width"
:min-width=
"200"
:fixed=
"item.fixed?item.fixed:undefined"
>
<template
slot-scope=
"scope"
@
click
.
stop=
"_handleIndex(scope)"
>
<span
v-if=
"item.datetime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<span
v-else-if=
"item.key==='status'"
>
{{
scope
.
row
[
item
.
key
]?
scope
.
row
[
item
.
key
].
display
:
''
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</el-table-column>
<el-table-column
slot=
"col"
label=
"操作"
align=
"center"
:width=
"120"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<icon-list
:msg=
"iconMsg"
:row-data=
"scope.row"
:row-index=
"scope.$index"
@
on-result-change=
"_iconClick"
/>
</
template
>
</el-table-column>
</element-table>
</Col>
</Row>
<fileManage
ref=
"fileManageModal"
@
on-result-change=
"_fileResult"
/>
</div>
</template>
<
script
>
import
{
drugSample
}
from
'../../../api'
import
fileManage
from
'../../base-manage/fileManage'
export
default
{
name
:
'PreparationManage'
,
components
:
{
fileManage
},
data
()
{
return
{
name
:
''
,
pageColumns
:
[
{
title
:
'样本编号'
,
key
:
'sampleCode'
,
width
:
140
,
fixed
:
'left'
,
align
:
'center'
},
{
title
:
'牌号'
,
key
:
'name'
,
width
:
120
,
align
:
'center'
},
{
title
:
'卷制标准版本号'
,
key
:
'standard'
,
width
:
140
,
align
:
'center'
},
{
title
:
'接收人'
,
key
:
'receiver'
,
align
:
'center'
,
width
:
120
},
{
title
:
'接收时间'
,
key
:
'receiveTime'
,
align
:
'center'
,
datetime
:
true
,
width
:
150
},
{
title
:
'价类'
,
key
:
'category'
,
width
:
140
,
align
:
'center'
},
{
title
:
'机台'
,
key
:
'samplePoint'
,
width
:
140
,
align
:
'center'
},
{
title
:
'班别'
,
key
:
'classBan'
,
width
:
130
,
align
:
'center'
},
{
title
:
'生产日期'
,
key
:
'pcTime'
,
align
:
'center'
,
datetime
:
true
,
width
:
150
}
],
sendTime
:
''
,
getPage
:
{},
searchOpen
:
true
,
currentIndex
:
''
,
selectIds
:
[],
iconMsg
:
[
{
id
:
''
,
type
:
'pt-a-cloud'
,
name
:
'附件'
}
// { id: '', type: 'md-egg', name: '操作日志' }
]
}
},
computed
:
{
tableHeight
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'searchTwoNoBtn'
)
}
else
{
return
this
.
$tableHeight
(
'tabNoSearch'
)
}
}
},
methods
:
{
async
_page
()
{
const
data
=
this
.
$serialize
(
'his-sample-form'
)
Object
.
assign
(
data
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
drugSample
.
pageSampleReceiveHis
(
data
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_initTable
()
}
},
_clearPage
()
{
$
(
'#his-sample-form'
)
.
find
(
'input'
)
.
each
(
function
()
{
$
(
this
).
val
(
''
)
})
this
.
$refs
.
pcTime
.
handleClear
()
this
.
$refs
.
receiveTime
.
handleClear
()
},
_btnClick
(
msg
,
data
)
{
switch
(
msg
)
{
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
_iconClick
(
name
,
data
)
{
switch
(
name
)
{
case
'附件'
:
this
.
_eRecord
(
data
.
id
)
break
}
},
_uploadByIds
()
{},
_handleIndex
(
data
)
{
this
.
currentIndex
=
data
.
$index
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
_page
()
break
case
'selectIds'
:
this
.
selectIds
=
data
break
default
:
this
.
_page
()
}
},
_eRecord
(
id
)
{
const
tempData
=
{
id
:
id
,
uploadFileUrl
:
'/v1/sample_annex/upload/'
,
downloadFileUrl
:
'/v1/sample_annex/download/'
}
this
.
$refs
.
fileManageModal
.
_open
(
tempData
,
'sampleId'
)
},
// 文件返回的数据
_fileResult
(
msg
,
data
)
{
switch
(
msg
)
{
case
'file-page'
:
this
.
$refs
.
fileManageModal
.
_openFile
(
data
)
break
case
'delete-page'
:
this
.
$refs
.
fileManageModal
.
_delPage
(
''
,
data
)
break
case
'success'
:
this
.
$Message
.
success
(
'删除成功!'
)
this
.
$refs
.
fileManageModal
.
_page
()
break
default
:
this
.
$refs
.
fileManageModal
.
_page
()
}
},
_histDateChange
(
data
)
{
$
(
'input[name="pcTimeBegin"]'
).
val
(
data
[
0
])
$
(
'input[name="pcTimeEnd"]'
).
val
(
data
[
1
])
},
_labTimeChange
(
data
)
{
$
(
'input[name="receiveTimeBegin"]'
).
val
(
data
[
0
])
$
(
'input[name="receiveTimeEnd"]'
).
val
(
data
[
1
])
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
}
}
}
</
script
>
<
style
scoped
>
</
style
>
pages/drug-sample-flow/tabs/labSampleFlow.vue
0 → 100644
View file @
6c574a8c
<
template
>
<div>
<Row>
<Form
v-show=
"searchOpen"
id=
"lab-sample-form"
inline
onsubmit=
"return false"
:label-width=
"70"
class=
"search-form"
>
<label
class=
"label-sign"
/>
<Form-item
class=
"search-item"
label=
"样本编号:"
>
<Input
name=
"sampleNum"
placeholder=
"请输入样本编号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"牌号:"
>
<Input
name=
"name"
placeholder=
"请输入牌号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"生产日期:"
>
<Date-picker
ref=
"sampleTime"
type=
"date"
placeholder=
"生产日期"
style=
"width: 100%;"
:editable=
"false"
transfer
@
on-change=
"_labSampleTime"
/>
<input
type=
"hidden"
name=
"inspectionDateBegin"
>
<input
type=
"hidden"
name=
"inspectionDateEnd"
>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_formSearch"
>
搜索
</Button>
</Form-item>
</Form>
<Col
/>
<Button
type=
"primary"
@
click=
"_scanReceive"
>
扫码接收
</Button>
<Button
type=
"primary"
@
click=
"_sampleReceive"
>
流转
</Button>
</Col>
<Col
/>
<element-table
ref=
"pageTable"
:page-columns=
"pageColumns"
:table-height=
"tableHeight"
:get-page=
"getPage"
show-check-box
select-data
@
on-result-change=
"_tableResultChange"
>
<el-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
show-overflow-tooltip
sortable
:prop=
"item.key"
:label=
"item.title"
:align=
"item.align"
:width=
"item.width"
:min-width=
"200"
:fixed=
"item.fixed?item.fixed:undefined"
>
<template
slot-scope=
"scope"
@
click
.
stop=
"_handleIndex(scope)"
>
<span
v-if=
"item.datetime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM:ss'
):
''
}}
</span>
<span
v-else-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</el-table-column>
<el-table-column
slot=
"col"
label=
"操作"
align=
"center"
:width=
"120"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<icon-list
:msg=
"iconMsg"
:row-data=
"scope.row"
:row-index=
"scope.$index"
@
on-result-change=
"_iconClick"
/>
</
template
>
</el-table-column>
</element-table>
</Col>
</Row>
<!--扫码接收-->
<labReceiveScan
ref=
"receiveModal"
@
on-result-change=
"_formSearch"
/>
<fileManage
ref=
"fileManageModal"
@
on-result-change=
"_fileResult"
/>
</div>
</template>
<
script
>
import
{
drugSample
}
from
'../../../api'
import
labReceiveScan
from
'../labReceiveScan'
import
fileManage
from
'../../base-manage/fileManage'
export
default
{
name
:
'PreparationManage'
,
components
:
{
labReceiveScan
,
fileManage
},
data
()
{
return
{
name
:
''
,
pageColumns
:
[
{
title
:
'样本编号'
,
key
:
'sampleCode'
,
width
:
140
,
fixed
:
'left'
,
align
:
'center'
},
{
title
:
'检测实验室'
,
key
:
'groupName'
,
width
:
140
,
fixed
:
'left'
,
align
:
'center'
},
{
title
:
'牌号'
,
key
:
'name'
,
width
:
130
,
align
:
'center'
},
{
title
:
'卷制标准版本号'
,
key
:
'standard'
,
width
:
180
,
align
:
'center'
},
{
title
:
'机台'
,
key
:
'samplePoint'
,
width
:
120
,
align
:
'center'
},
{
title
:
'班别'
,
key
:
'classBan'
,
width
:
120
,
align
:
'center'
},
{
title
:
'状态'
,
key
:
'progress'
,
width
:
120
,
status
:
true
,
align
:
'center'
},
{
title
:
'价类'
,
key
:
'category'
,
width
:
120
,
align
:
'center'
},
{
title
:
'生产日期'
,
key
:
'pcTime'
,
align
:
'center'
,
datetime
:
true
}
],
btn
:
[
{
id
:
''
,
type
:
'primary'
,
name
:
'扫码接收'
},
{
id
:
''
,
type
:
'primary'
,
name
:
'流转'
}
],
getPage
:
{},
searchOpen
:
false
,
currentIndex
:
''
,
selectIds
:
[],
selectData
:
[],
iconMsg
:
[
{
id
:
''
,
type
:
'pt-a-download-outline'
,
name
:
'接收'
},
{
id
:
''
,
type
:
'pt-a-cloud'
,
name
:
'附件'
}
// { id: '', type: 'md-egg', name: '操作日志' }
]
}
},
computed
:
{
tableHeight
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'tabSearch'
)
}
else
{
return
this
.
$tableHeight
(
'tabNoSearch'
)
}
}
},
methods
:
{
async
_page
()
{
const
data
=
this
.
$serialize
(
'lab-sample-form'
)
Object
.
assign
(
data
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
drugSample
.
pageSampleFlow
(
data
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_initTable
()
}
},
_clearPage
()
{
$
(
'#lab-sample-form'
)
.
find
(
'input'
)
.
each
(
function
()
{
$
(
this
).
val
(
''
)
})
this
.
$refs
.
sampleTime
.
handleClear
()
},
_btnClick
(
msg
,
data
)
{
switch
(
msg
)
{
case
'扫码接收'
:
this
.
_scanReceive
()
break
case
'流转'
:
this
.
_sampleReceive
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
_scanReceive
()
{
this
.
$refs
.
receiveModal
.
_open
()
},
_sampleReceive
()
{
const
ids
=
this
.
selectIds
const
selectData
=
this
.
selectData
console
.
log
(
selectData
)
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
// this._receiveByIds(ids, `确认要接收 ${ids.length} 条数据吗?`)
}
},
_receiveByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
`确定要处理该条数据吗?`
,
onOk
:
()
=>
{
this
.
_receiveIds
(
ids
)
}
})
},
async
_receiveIds
(
ids
)
{
const
result
=
await
drugSample
.
submitReceive
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'接收成功!'
)
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_formSearch
()
},
_iconClick
(
name
,
data
)
{
switch
(
name
)
{
case
'接收'
:
this
.
_receiveByIds
(
data
.
id
)
break
case
'附件'
:
this
.
_uploadByIds
(
data
.
id
)
break
}
},
_uploadByIds
(
id
)
{
const
tempData
=
{
id
:
id
,
uploadFileUrl
:
'/v1/sample_annex/upload/'
,
downloadFileUrl
:
'/v1/sample_annex/download/'
}
this
.
$refs
.
fileManageModal
.
_open
(
tempData
,
'sampleId'
)
},
// 文件返回的数据
_fileResult
(
msg
,
data
)
{
switch
(
msg
)
{
case
'file-page'
:
this
.
$refs
.
fileManageModal
.
_openFile
(
data
)
break
case
'delete-page'
:
this
.
$refs
.
fileManageModal
.
_delPage
(
''
,
data
)
break
case
'success'
:
this
.
$Message
.
success
(
'删除成功!'
)
this
.
$refs
.
fileManageModal
.
_page
()
break
default
:
this
.
$refs
.
fileManageModal
.
_page
()
}
},
_handleIndex
(
data
)
{
this
.
currentIndex
=
data
.
$index
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
_page
()
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'selectData'
:
this
.
_selectData
(
data
)
break
default
:
this
.
_page
()
}
},
_selectData
(
data
)
{
this
.
selectData
=
data
const
selectIds
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
selectIds
.
push
(
data
[
i
].
id
)
}
this
.
selectIds
=
selectIds
},
_labSampleTime
(
data
)
{
$
(
'input[name="inspectionDateBegin"]'
).
val
(
data
[
0
])
$
(
'input[name="inspectionDateEnd"]'
).
val
(
data
[
1
])
console
.
log
(
data
)
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
}
}
}
</
script
>
<
style
scoped
>
</
style
>
pages/login.vue
View file @
6c574a8c
...
...
@@ -85,9 +85,9 @@ export default {
this
.
checkListValue
=
''
}
else
{
// this.formObj.username = localStorage.getItem('username')
this
.
formObj
.
username
=
JSON
.
parse
(
localStorage
.
getItem
(
'username'
)
)
this
.
formObj
.
username
=
localStorage
.
getItem
(
'username'
)
console
.
log
(
this
.
formObj
.
username
)
this
.
formObj
.
password
=
JSON
.
parse
(
localStorage
.
getItem
(
'password'
)
)
this
.
formObj
.
password
=
localStorage
.
getItem
(
'password'
)
console
.
log
(
this
.
formObj
.
password
)
this
.
checkListValue
=
true
}
...
...
router/drug-sample-routes.js
View file @
6c574a8c
...
...
@@ -6,6 +6,7 @@ import sampleMake from '../pages/drug-sample-make/samplePreparationIndex'
import
sampleKeep
from
'../pages/drug-sample-keep/preparationManageIndex'
import
sampleSend
from
'../pages/drug-sample-send/sampleReceiveIndex'
import
sampleReceive
from
'../pages/drug-sample-receive/sampleLabReceiveIndex'
import
sampleFlow
from
'../pages/drug-sample-flow/sampleLabFlowIndex'
export
default
[
{
path
:
'make'
,
...
...
@@ -28,6 +29,11 @@ export default [
meta
:
{
title
:
'样本接收'
}
},
{
path
:
'flow'
,
component
:
sampleFlow
,
meta
:
{
title
:
'样本流转'
}
},
{
path
:
'catalogue'
,
component
:
sampleManage
,
meta
:
{
title
:
'物料目录'
}
...
...
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