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
11b35b84
Commit
11b35b84
authored
Jun 10, 2020
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demo完善样品流转
parent
0ddb8e0d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
339 additions
and
40 deletions
+339
-40
drugSample.js
api/drug/drugSample.js
+9
-1
dataDataQuery.vue
pages/drug-data-query/dataDataQuery.vue
+221
-0
sampleLabFlowIndex.vue
pages/drug-sample-flow/sampleLabFlowIndex.vue
+1
-1
historyTask.vue
pages/drug-sample-flow/tabs/historyTask.vue
+41
-23
labSampleFlow.vue
pages/drug-sample-flow/tabs/labSampleFlow.vue
+1
-1
transferListModal.vue
pages/drug-sample-flow/transferListModal.vue
+57
-13
fillResult.vue
pages/drug-test-input/data-entry/fillResult.vue
+3
-1
drug-Item-routes.js
router/drug-Item-routes.js
+6
-0
No files found.
api/drug/drugSample.js
View file @
11b35b84
...
...
@@ -51,6 +51,8 @@ export default {
http
.
post
(
'/v1/sample/page-sample-receive'
,
data
).
then
(
res
=>
res
),
pageSampleFlow
:
data
=>
http
.
post
(
'/v1/sample/page-sample-flow'
,
data
).
then
(
res
=>
res
),
pageSampleFlowHis
:
data
=>
http
.
post
(
'/v1/sample/page-sample-flow-his'
,
data
).
then
(
res
=>
res
),
pageSampleReceiveHis
:
data
=>
http
.
post
(
'/v1/sample/page-sample-receive-his'
,
data
).
then
(
res
=>
res
),
...
...
@@ -229,5 +231,11 @@ export default {
http
.
post
(
'/v1/sample_oos/register-suggestion'
,
data
).
then
(
res
=>
res
),
submitOosRegister
:
data
=>
http
.
post
(
'/v1/sample_oos/submit_oos_register?ids='
+
data
).
then
(
res
=>
res
)
http
.
post
(
'/v1/sample_oos/submit_oos_register?ids='
+
data
)
.
then
(
res
=>
res
),
submitFlow
:
data
=>
https
.
post
(
'/v1/sample/submit-flow'
,
JSON
.
stringify
(
data
)).
then
(
res
=>
res
),
pageSampleDataQuery
:
data
=>
http
.
post
(
'/v1/sample/page-sample-data-query'
,
data
).
then
(
res
=>
res
)
}
pages/drug-data-query/dataDataQuery.vue
0 → 100644
View file @
11b35b84
<
template
>
<div>
<Row>
<!--查询-->
<Col
span=
"24"
/>
<Form
id=
"sample-data-query-form-id"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
:label-width=
"70"
class=
"search-form"
>
<label
class=
"label-sign"
/>
<Form-item
class=
"search-item"
label=
"样本编号:"
>
<Input
v-model=
"formObj.sampleCode"
placeholder=
"请输入样本编号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"检测项目:"
>
<Input
v-model=
"formObj.name"
placeholder=
"请输入检测项目"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_formSearch"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--table-->
<el-button
@
click=
"_export"
type=
"primary"
>
检测数据导出
</el-button>
<Col
span=
"24"
/>
<element-table
ref=
"pageTable"
:page-columns=
"pageColumns"
:table-height=
"tableHeight"
:get-page=
"getPage"
:opt-col-width=
"100"
:icon-msg=
"iconMsg"
show-check-box
@
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"
:width=
"item.width"
:min-width=
"200"
:fixed=
"item.fixed?item.fixed:undefined"
>
<template
slot-scope=
"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
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</span>
<div
v-else-if=
"item.key==='judged'"
>
{{
scope
.
row
[
item
.
key
]
===
1
?
'是'
:
'否'
}}
</div>
<span
v-else-if=
"item.key === 'singleJudge'"
>
{{
scope
.
row
[
item
.
key
]?
scope
.
row
[
item
.
key
].
display
:
''
}}
</span>
<span
v-else-if=
"item.key==='recordWriiten'"
>
{{
scope
.
row
[
item
.
key
]
===
't'
?
'是'
:
'否'
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</el-table-column>
</element-table>
</Col>
</Row>
<!--操作日志-->
<itemRecord
ref=
"recordModal"
/>
</div>
</template>
<
script
>
import
{
drugSample
}
from
'../../api'
import
http
from
'../../api/http'
import
itemRecord
from
'../record/itemRecord'
export
default
{
components
:
{
itemRecord
},
data
()
{
return
{
searchOpen
:
true
,
formObj
:
{
sampleCode
:
''
,
name
:
''
,
testDateBegin
:
''
,
testDateEnd
:
''
,
auditorDateBegin
:
''
,
auditorDateEnd
:
''
},
selectIds
:
[],
pageColumns
:
[
{
title
:
'样本编号'
,
key
:
'sampleCode'
,
width
:
150
,
fixed
:
'left'
},
{
title
:
'价类'
,
key
:
'category'
,
width
:
120
,
type
:
true
},
{
title
:
'状态'
,
key
:
'status'
,
status
:
true
,
width
:
120
},
{
title
:
'牌号'
,
key
:
'name'
,
width
:
120
},
{
title
:
'卷制标准版本号'
,
key
:
'standard'
,
width
:
230
},
{
title
:
'生产日期'
,
key
:
'pcTime'
,
width
:
120
},
{
title
:
'机台'
,
key
:
'samplePoint'
},
{
title
:
'班次'
,
key
:
'classBan'
,
width
:
120
},
{
title
:
'备注'
,
key
:
'remark'
,
width
:
120
}
],
getPage
:
{},
iconMsg
:
[
{
type
:
'pt-a-original'
,
id
:
''
,
name
:
'查看原始记录'
},
{
type
:
'pt-a-clock'
,
id
:
''
,
name
:
'操作日志'
}
]
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'search'
)
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
// 录入时间
_signDateChange
(
data
)
{
this
.
formObj
.
testDateBegin
=
data
[
0
]
this
.
formObj
.
testDateEnd
=
data
[
1
]
},
// 审核时间
_auditDateChange
(
data
)
{
this
.
formObj
.
auditorDateBegin
=
data
[
0
]
this
.
formObj
.
auditorDateEnd
=
data
[
1
]
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_open
()
{
this
.
_clear
()
this
.
_page
()
},
_clear
()
{
this
.
formObj
.
sampleCode
=
''
this
.
formObj
.
name
=
''
this
.
$refs
.
testDate
.
handleClear
()
this
.
$refs
.
auditorDate
.
handleClear
()
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
drugSample
.
pageSampleDataQuery
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_initTable
()
}
},
_searchParams
(
formId
)
{
return
this
.
$refs
.
pageTable
.
_searchParams
(
formId
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
_page
()
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'selectIds'
:
this
.
selectIds
=
data
break
}
},
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'查看原始记录'
:
this
.
_itemOriginalRecordLook
(
data
)
break
case
'操作日志'
:
this
.
_record
(
data
.
id
)
break
}
},
// 查看原始记录
_itemOriginalRecordLook
(
data
)
{
if
(
data
.
recordId
===
null
||
undefined
===
data
.
recordId
||
data
.
recordId
===
''
)
{
this
.
$Message
.
warning
(
'该检测项目暂无原始记录!'
)
}
else
{
this
.
$refs
.
itemOriginalRecordLookModal
.
_open
(
data
.
recordId
,
'only'
)
}
},
_export
()
{
const
data
=
this
.
$serialize
(
'sample-data-query-form-id'
)
console
.
log
(
data
)
const
sampleIds
=
this
.
selectIds
.
join
(
','
)
data
.
idsStr
=
sampleIds
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定导出数据?'
,
onOk
:
()
=>
{
http
.
open
(
'/v1/sample/export_sample_test_data/'
,
this
.
$serializeForm
(
data
)
)
}
})
},
// 操作日志
_record
(
id
)
{
this
.
$refs
.
recordModal
.
_open
(
id
)
}
}
}
</
script
>
pages/drug-sample-flow/sampleLabFlowIndex.vue
View file @
11b35b84
...
...
@@ -6,7 +6,7 @@
<el-tab-pane
label=
"样本流转"
name=
"lab"
>
<labSampleReceive
ref=
"labTabs"
/>
</el-tab-pane>
<el-tab-pane
label=
"
历史任务
"
name=
"his"
>
<el-tab-pane
label=
"
流转历史
"
name=
"his"
>
<historyTask
ref=
"hisTabs"
/>
</el-tab-pane>
</el-tabs>
...
...
pages/drug-sample-flow/tabs/historyTask.vue
View file @
11b35b84
...
...
@@ -77,7 +77,7 @@
>
<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'
):
''
}}
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd
HH:MM:ss
'
):
''
}}
</span>
<span
v-else-if=
"item.key==='status'"
>
{{
scope
.
row
[
item
.
key
]?
scope
.
row
[
item
.
key
].
display
:
''
}}
...
...
@@ -87,22 +87,22 @@
</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
>
<!-- <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>
...
...
@@ -136,14 +136,32 @@ export default {
align
:
'center'
},
{
title
:
'接收人'
,
key
:
'receiver'
,
title
:
'流转检测科室'
,
key
:
'groupName'
,
align
:
'center'
,
width
:
120
},
{
title
:
'流转数量'
,
key
:
'flowQuantity'
,
align
:
'center'
,
width
:
120
},
{
title
:
'单位'
,
key
:
'unit'
,
align
:
'center'
,
width
:
120
},
{
title
:
'流转人'
,
key
:
'flower'
,
align
:
'center'
,
width
:
120
},
{
title
:
'
接收
时间'
,
key
:
'
receive
Time'
,
title
:
'
流转
时间'
,
key
:
'
flow
Time'
,
align
:
'center'
,
datetime
:
true
,
width
:
150
...
...
@@ -166,7 +184,7 @@ export default {
currentIndex
:
''
,
selectIds
:
[],
iconMsg
:
[
{
id
:
''
,
type
:
'pt-a-cloud'
,
name
:
'附件'
}
//
{ id: '', type: 'pt-a-cloud', name: '附件' }
// { id: '', type: 'md-egg', name: '操作日志' }
]
}
...
...
@@ -184,7 +202,7 @@ export default {
async
_page
()
{
const
data
=
this
.
$serialize
(
'his-sample-form'
)
Object
.
assign
(
data
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
drugSample
.
pageSample
Receive
His
(
data
)
const
result
=
await
drugSample
.
pageSample
Flow
His
(
data
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_initTable
()
...
...
pages/drug-sample-flow/tabs/labSampleFlow.vue
View file @
11b35b84
...
...
@@ -96,7 +96,7 @@
</element-table>
</Col>
</Row>
<transferListModal
ref=
"ListModal"
/>
<transferListModal
ref=
"ListModal"
@
on-result-change=
"_formSearch"
/>
<!--扫码接收-->
<labReceiveScan
ref=
"receiveModal"
@
on-result-change=
"_formSearch"
/>
...
...
pages/drug-sample-flow/transferListModal.vue
View file @
11b35b84
...
...
@@ -27,8 +27,8 @@
<span
v-else-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else-if=
"item.key==='
num
'"
>
<InputNumber
v-model=
"scope.row.
num"
name=
"num
"
placeholder=
"请输入数量"
style=
"width: 100px;"
/>
<span
v-else-if=
"item.key==='
flowQuantity
'"
>
<InputNumber
v-model=
"scope.row.
flowQuantity"
name=
"flowQuantity
"
placeholder=
"请输入数量"
style=
"width: 100px;"
/>
</span>
<span
v-else-if=
"item.key==='unit'"
>
<Input
v-model=
"scope.row.unit"
name=
"unit"
placeholder=
"请输入单位"
style=
"width: 100px;"
/>
...
...
@@ -36,13 +36,13 @@
<span
v-else-if=
"item.key==='person'"
>
<Input
v-model=
"scope.row.person"
name=
"person"
placeholder=
"请输入流转人"
style=
"width: 100px;"
/>
</span>
<span
v-else-if=
"item.key==='
t
ime'"
>
<span
v-else-if=
"item.key==='
flowT
ime'"
>
<el-date-picker
v-model=
"scope.row.
t
ime"
v-model=
"scope.row.
flowT
ime"
type=
"datetime"
placeholder=
"选择日期时间"
default-time=
"12:00:00"
>
</el-date-picker
>
default-time=
"12:00:00"
/
>
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
...
...
@@ -52,11 +52,16 @@
</element-table>
</Col>
</Row>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
/>
</div>
</Modal>
</div>
</template>
<
script
>
import
{
drugSample
}
from
'../../api'
export
default
{
name
:
'TransferListModal'
,
data
()
{
...
...
@@ -65,6 +70,10 @@ export default {
getPage
:
{
records
:
[]
},
footerList
:
[
{
id
:
''
,
name
:
'确定流转'
,
type
:
'primary'
},
{
id
:
''
,
name
:
'取消'
,
type
:
''
}
],
num
:
0
,
unit
:
''
,
person
:
''
,
...
...
@@ -85,26 +94,61 @@ export default {
fixed
:
'left'
,
align
:
'center'
},
{
title
:
'流转数量'
,
key
:
'
num
'
,
width
:
130
,
align
:
'center'
},
{
title
:
'流转数量'
,
key
:
'
flowQuantity
'
,
width
:
130
,
align
:
'center'
},
{
title
:
'流转单位'
,
key
:
'unit'
,
width
:
180
,
align
:
'center'
},
{
title
:
'流转人'
,
key
:
'
person
'
,
width
:
120
,
align
:
'center'
},
{
title
:
'流转时间'
,
key
:
'
t
ime'
,
width
:
300
,
align
:
'center'
}
{
title
:
'流转人'
,
key
:
'
flower
'
,
width
:
120
,
align
:
'center'
},
{
title
:
'流转时间'
,
key
:
'
flowT
ime'
,
width
:
300
,
align
:
'center'
}
]
}
},
methods
:
{
_open
(
data
)
{
this
.
showListModal
=
true
console
.
log
(
data
)
this
.
getPage
.
records
=
data
console
.
log
(
123
)
console
.
log
(
this
.
getPage
)
this
.
getPage
.
records
=
[]
const
length
=
data
.
length
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
const
object
=
data
[
i
]
const
obj
=
{}
obj
.
sampleId
=
object
.
id
obj
.
sampleCode
=
object
.
sampleCode
obj
.
name
=
object
.
name
obj
.
groupName
=
object
.
groupName
obj
.
groupId
=
object
.
groupId
this
.
getPage
.
records
.
push
(
obj
)
}
this
.
$refs
.
pageTable
.
_initTable
()
},
_footerResult
(
msg
)
{
switch
(
msg
)
{
case
'确定流转'
:
this
.
_ok
()
break
case
'取消'
:
this
.
_cancel
()
break
}
},
_cancel
()
{
this
.
showListModal
=
false
},
_ok
()
{
const
data
=
this
.
getPage
.
records
this
.
_flow
(
data
)
console
.
log
(
data
)
},
_flow
:
async
function
(
data
)
{
const
result
=
await
drugSample
.
submitFlow
({
sampleFlows
:
data
})
if
(
result
)
{
this
.
showListModal
=
false
this
.
$message
.
success
(
'流转成功'
)
this
.
$emit
(
'on-result-change'
)
}
}
}
}
...
...
pages/drug-test-input/data-entry/fillResult.vue
View file @
11b35b84
...
...
@@ -225,17 +225,19 @@ export default {
getPage
:
{},
pageColumns
:
[
{
title
:
'检测项目'
,
key
:
'name'
,
width
:
120
,
fixed
:
true
},
{
title
:
'状态'
,
key
:
'progress'
,
width
:
120
,
status
:
true
},
{
title
:
'检测类型'
,
key
:
'type'
,
width
:
150
},
{
title
:
'样本编号'
,
key
:
'sampleCode'
,
width
:
150
},
{
title
:
'样品量'
,
key
:
'sampleQuantity'
,
width
:
130
},
{
title
:
'检测结果'
,
key
:
'testValue'
,
width
:
160
},
{
title
:
'不合格数量'
,
key
:
'failQuantity'
,
width
:
160
},
{
title
:
'标偏'
,
key
:
'deviation'
,
width
:
160
},
{
title
:
'缺陷'
,
key
:
'defects'
,
width
:
160
},
{
title
:
'限值'
,
key
:
'limitValue'
,
width
:
130
},
{
title
:
'比较符'
,
key
:
'compareSymbol'
,
width
:
160
},
{
title
:
'单位'
,
key
:
'unit'
,
width
:
100
},
{
title
:
'是否系统判定'
,
key
:
'judged'
,
width
:
120
,
judged
:
true
},
{
title
:
'排序'
,
key
:
'orderBy'
,
width
:
80
,
judged
:
true
},
{
title
:
'状态'
,
key
:
'progress'
,
width
:
120
,
status
:
true
},
{
title
:
'判定结果'
,
key
:
'singleJudge'
,
...
...
router/drug-Item-routes.js
View file @
11b35b84
...
...
@@ -6,6 +6,7 @@ import drugItemInput from '../pages/drug-test-input/dataEntryIndex'
import
drugItemCheck
from
'../pages/drug-test-check/dataReviewIndex'
import
drugItemAudit
from
'../pages/drug-test-audit/drugTestAuditIndex'
import
drugTestConsult
from
'../pages/drug-test-consult/dataTestConsult'
import
dataDataQuery
from
'../pages/drug-data-query/dataDataQuery'
export
default
[
{
path
:
'allocate'
,
...
...
@@ -31,5 +32,10 @@ export default [
path
:
'consult'
,
component
:
drugTestConsult
,
meta
:
{
title
:
'数据查阅'
}
},
{
path
:
'data_query'
,
component
:
dataDataQuery
,
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