Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-web-back-soil
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
patzn-cloud-web-back-soil
Commits
30018857
Commit
30018857
authored
Oct 20, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了备样余样管理
parent
02c0fdf1
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1541 additions
and
77 deletions
+1541
-77
soil-sample.js
api/soil/soil-sample.js
+33
-1
PTVXETable.vue
components/table/PTVXETable.vue
+0
-1
SoilSampleManage.vue
pages/meter-entrust/SoilSampleManage.vue
+0
-1
SampleBackupsManage.vue
...-sample-manage/backups-manage/tab/SampleBackupsManage.vue
+25
-9
SampleBackupsQuery.vue
...l-sample-manage/backups-manage/tab/SampleBackupsQuery.vue
+19
-19
SampleDisposeManage.vue
...-sample-manage/sample-dispose/tab/SampleDisposeManage.vue
+2
-2
SurplusDisposeIndex.vue
...ple-manage/sample-surplus-dispose/SurplusDisposeIndex.vue
+48
-0
SurplusDisposeManage.vue
...anage/sample-surplus-dispose/tab/SurplusDisposeManage.vue
+733
-0
SurplusDisposeQuery.vue
...manage/sample-surplus-dispose/tab/SurplusDisposeQuery.vue
+298
-0
SurplusParpareApply.vue
...soil-sample-manage/surplus-manage/SurplusParpareApply.vue
+325
-0
SampleSurplusManage.vue
...-sample-manage/surplus-manage/tab/SampleSurplusManage.vue
+42
-25
SampleSurplusQuery.vue
...l-sample-manage/surplus-manage/tab/SampleSurplusQuery.vue
+10
-19
soil-routes.js
router/soil-routes.js
+6
-0
No files found.
api/soil/soil-sample.js
View file @
30018857
...
@@ -22,6 +22,9 @@ export default {
...
@@ -22,6 +22,9 @@ export default {
// 试验室领样操作
// 试验室领样操作
takeSample
:
data
=>
takeSample
:
data
=>
http
.
post
(
'soil/v1/sample/take_sample?ids='
+
data
).
then
(
res
=>
res
),
http
.
post
(
'soil/v1/sample/take_sample?ids='
+
data
).
then
(
res
=>
res
),
// 备样历史分页列表
pageBackupHis
:
data
=>
http
.
post
(
'soil/v1/sample_backup/page_backup_his'
,
data
).
then
(
res
=>
res
),
// 备样管理提交申请
// 备样管理提交申请
appleHandle
:
data
=>
appleHandle
:
data
=>
http
.
post
(
'soil/v1/sample_backup/apply_handle'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'soil/v1/sample_backup/apply_handle'
,
data
).
then
(
res
=>
res
),
...
@@ -45,5 +48,34 @@ export default {
...
@@ -45,5 +48,34 @@ export default {
.
then
(
res
=>
res
),
.
then
(
res
=>
res
),
// 备样管理处理备样申请
// 备样管理处理备样申请
handleOk
:
data
=>
handleOk
:
data
=>
http
.
post
(
'soil/v1/sample_backup/handle_ok?ids='
+
data
).
then
(
res
=>
res
)
http
.
post
(
'soil/v1/sample_backup/handle_ok?ids='
+
data
).
then
(
res
=>
res
),
pageSurplus
:
data
=>
http
.
post
(
'soil/v1/prepare/page_surplus'
,
data
).
then
(
res
=>
res
),
// 余样处理审批分页列表
pageSurplusHandleCheck
:
data
=>
http
.
post
(
'soil/v1/prepare/page_surplus_handle_check'
,
data
)
.
then
(
res
=>
res
),
// 余样管理处理备样申请
surplusApplyHandle
:
data
=>
http
.
post
(
'soil/v1/prepare/apply_handle'
,
data
).
then
(
res
=>
res
),
// 余样管理处理备样申请
surplusHandleOk
:
data
=>
http
.
post
(
'soil/v1/prepare/handle_ok?ids='
+
data
).
then
(
res
=>
res
),
// 余品处理审批通过
surplusDisposalOk
:
data
=>
http
.
post
(
'soil/v1/prepare/disposal_ok?ids='
+
data
).
then
(
res
=>
res
),
// 余样处理审批驳回
surplueDisposalFail
:
data
=>
http
.
post
(
'soil/v1/prepare/disposal_fail?ids='
+
data
.
ids
+
'&reason='
+
data
.
remark
)
.
then
(
res
=>
res
),
// 余样样品历史分页列表
pageSurplusHis
:
data
=>
http
.
post
(
'soil/v1/prepare/page_surplus_his'
,
data
).
then
(
res
=>
res
)
}
}
components/table/PTVXETable.vue
View file @
30018857
...
@@ -420,7 +420,6 @@ export default {
...
@@ -420,7 +420,6 @@ export default {
})
})
},
},
checkedData
()
{
checkedData
()
{
console
.
log
(
this
.
$refs
.
xTable
.
selection
)
this
.
$emit
(
'on-result-change'
,
'allSelect'
,
this
.
$refs
.
xTable
.
selection
)
this
.
$emit
(
'on-result-change'
,
'allSelect'
,
this
.
$refs
.
xTable
.
selection
)
},
},
// 双击行操作
// 双击行操作
...
...
pages/meter-entrust/SoilSampleManage.vue
View file @
30018857
...
@@ -294,7 +294,6 @@ export default {
...
@@ -294,7 +294,6 @@ export default {
this
.
selectData
=
data
this
.
selectData
=
data
break
break
case
'allSelect'
:
case
'allSelect'
:
console
.
log
(
'123465798'
,
data
)
this
.
allSelect
(
data
)
this
.
allSelect
(
data
)
break
break
case
'iconClick'
:
case
'iconClick'
:
...
...
pages/soil-sample-manage/backups-manage/tab/SampleBackupsManage.vue
View file @
30018857
...
@@ -153,7 +153,7 @@ export default {
...
@@ -153,7 +153,7 @@ export default {
{
{
type
:
'primary'
,
type
:
'primary'
,
id
:
''
,
id
:
''
,
name
:
'
处理备样申请
'
name
:
'
完成处理
'
},
},
{
{
type
:
'primary'
,
type
:
'primary'
,
...
@@ -253,6 +253,7 @@ export default {
...
@@ -253,6 +253,7 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
$refs
.
pageTable
.
_showLoading
()
// 样品存储期限预警
// 样品存储期限预警
// this.sampleHandleValue = Number(localStorage.getItem('sampleHandleValue'))
// this.sampleHandleValue = Number(localStorage.getItem('sampleHandleValue'))
// this._getLocList()
// this._getLocList()
...
@@ -383,7 +384,7 @@ export default {
...
@@ -383,7 +384,7 @@ export default {
case
'申请处理'
:
case
'申请处理'
:
this
.
_applyDispose
()
this
.
_applyDispose
()
break
break
case
'
处理备样申请
'
:
case
'
完成处理
'
:
this
.
_handleApply
()
this
.
_handleApply
()
break
break
case
'制备'
:
case
'制备'
:
...
@@ -417,13 +418,28 @@ export default {
...
@@ -417,13 +418,28 @@ export default {
if
(
this
.
selectIds
.
length
===
0
)
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
}
else
{
this
.
$Modal
.
confirm
({
console
.
log
(
this
.
selectData
)
title
:
'提示'
,
const
errorIds
=
[]
content
:
'确定处理这 '
+
this
.
selectIds
.
length
+
' 条数据?'
,
for
(
let
i
=
0
;
i
<
this
.
selectIds
.
length
;
i
++
)
{
onOk
:
()
=>
{
if
(
this
.
selectData
[
i
].
status
.
display
!==
'处理审批通过'
)
{
this
.
_handleOk
(
this
.
selectIds
.
join
(
','
)
)
errorIds
.
push
(
this
.
selectData
[
i
].
sampleCode
)
}
}
})
}
if
(
errorIds
.
length
===
0
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定处理这 '
+
this
.
selectIds
.
length
+
' 条数据?'
,
onOk
:
()
=>
{
this
.
_handleOk
(
this
.
selectIds
.
join
(
','
))
}
})
}
else
{
this
.
$Message
.
warning
(
'试样编号为 '
+
errorIds
+
' 的审批未通过'
)
// this.$Modal.confirm({
// title: '提示',
// content: '试样编号为 ' + errorIds + ' 的审批未通过'
// })
}
}
}
},
},
_handleOk
:
async
function
()
{
_handleOk
:
async
function
()
{
...
@@ -590,8 +606,8 @@ export default {
...
@@ -590,8 +606,8 @@ export default {
this
.
$serializeForm
(
this
.
formObj
)
this
.
$serializeForm
(
this
.
formObj
)
)
)
if
(
result
)
{
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
}
},
},
_batchEdit
()
{
_batchEdit
()
{
...
...
pages/soil-sample-manage/backups-manage/tab/SampleBackupsQuery.vue
View file @
30018857
...
@@ -75,6 +75,9 @@
...
@@ -75,6 +75,9 @@
<div
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<a
v-else-if=
"item.key==='sampleSn'"
<a
v-else-if=
"item.key==='sampleSn'"
@
click
.
stop=
"_sampleDetailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
@
click
.
stop=
"_sampleDetailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<div
v-else-if=
"item.key==='status'"
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</div>
<div
v-else-if=
"item.key==='progress'"
>
<div
v-else-if=
"item.key==='progress'"
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</div>
</div>
...
@@ -89,7 +92,7 @@
...
@@ -89,7 +92,7 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
soil
Entrust
}
from
'../../../../api'
import
{
soil
Sample
}
from
'../../../../api'
export
default
{
export
default
{
components
:
{},
components
:
{},
...
@@ -107,23 +110,20 @@ export default {
...
@@ -107,23 +110,20 @@ export default {
}
}
],
],
pageColumns
:
[
pageColumns
:
[
{
title
:
'样品编号'
,
key
:
'sampleSn'
,
width
:
180
},
{
title
:
'委托商'
,
key
:
'client'
,
width
:
180
},
{
title
:
'样品名称'
,
key
:
'sampleName'
,
width
:
140
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
180
},
{
title
:
'状态'
,
key
:
'progress'
,
width
:
110
,
status
:
true
},
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
180
},
{
title
:
'存储期限'
,
key
:
'endDate'
,
width
:
120
,
date
:
true
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
160
},
{
title
:
'委托单位'
,
key
:
'cname'
,
width
:
140
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
180
},
{
title
:
'委托名称'
,
key
:
'contractName'
,
width
:
170
},
{
title
:
'样品包装类型'
,
key
:
'samplePack'
,
width
:
180
},
{
title
:
'处置方式'
,
key
:
'handleMethod'
,
width
:
120
},
{
title
:
'现场编号'
,
key
:
'siteNo'
,
width
:
180
},
{
title
:
'处理人'
,
key
:
'handlePerson'
,
width
:
100
},
{
title
:
'存储条件'
,
key
:
'conditions'
,
width
:
180
},
{
title
:
'处理时间'
,
key
:
'handleTime'
,
width
:
120
,
date
:
true
},
{
title
:
'备样位置'
,
key
:
'backupLocation'
,
width
:
180
},
{
title
:
'处理申请人'
,
key
:
'applyer'
,
width
:
120
},
{
title
:
'备样数量'
,
key
:
'quantity'
,
width
:
180
},
{
title
:
'申请时间'
,
key
:
'applyDate'
,
width
:
120
,
date
:
true
},
{
title
:
'备样人'
,
key
:
'backupUser'
,
width
:
140
},
{
title
:
'存储位置'
,
key
:
'backupPlace'
,
width
:
100
},
{
title
:
'钻孔位置'
,
key
:
'boreholeLocation'
,
width
:
110
},
{
title
:
'存储条件'
,
key
:
'storageCondition'
,
width
:
120
},
{
title
:
'钻孔名称'
,
key
:
'boreholeName'
,
width
:
160
},
{
title
:
'样品数量'
,
key
:
'quantity'
,
width
:
100
},
{
title
:
'水深(米)'
,
key
:
'waterDepth'
,
width
:
160
}
{
title
:
'备样数量'
,
key
:
'sampleQuantity'
,
width
:
100
},
{
title
:
'样品备注'
,
key
:
'sampleRemark'
},
{
title
:
'委托备注'
,
key
:
'contractRemark'
}
],
],
searchOpen
:
false
,
searchOpen
:
false
,
getPage
:
{},
getPage
:
{},
...
@@ -145,7 +145,7 @@ export default {
...
@@ -145,7 +145,7 @@ export default {
_page
:
async
function
()
{
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
soil
Entrust
.
pageSampleReceive
(
const
result
=
await
soil
Sample
.
pageBackupHis
(
this
.
$serializeForm
(
this
.
formObj
)
this
.
$serializeForm
(
this
.
formObj
)
)
)
if
(
result
)
{
if
(
result
)
{
...
...
pages/soil-sample-manage/sample-dispose/tab/SampleDisposeManage.vue
View file @
30018857
...
@@ -133,7 +133,7 @@ export default {
...
@@ -133,7 +133,7 @@ export default {
{
{
type
:
'primary'
,
type
:
'primary'
,
id
:
''
,
id
:
''
,
name
:
'
完成处理
'
name
:
'
通过
'
},
},
{
{
type
:
''
,
type
:
''
,
...
@@ -363,7 +363,7 @@ export default {
...
@@ -363,7 +363,7 @@ export default {
},
},
_btnClick
(
msg
)
{
_btnClick
(
msg
)
{
switch
(
msg
)
{
switch
(
msg
)
{
case
'
完成处理
'
:
case
'
通过
'
:
this
.
_dispose
()
this
.
_dispose
()
break
break
case
'驳回'
:
case
'驳回'
:
...
...
pages/soil-sample-manage/sample-surplus-dispose/SurplusDisposeIndex.vue
0 → 100644
View file @
30018857
<
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=
"wait"
>
<SampleBackupsManage
ref=
"waitTabs"
></SampleBackupsManage>
</el-tab-pane>
<el-tab-pane
label=
"已处理"
name=
"query"
>
<SampleBackupsQuery
ref=
"queryTabs"
></SampleBackupsQuery>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</
template
>
<
script
>
import
SampleBackupsManage
from
'./tab/SurplusDisposeManage'
import
SampleBackupsQuery
from
'./tab/SurplusDisposeQuery'
export
default
{
components
:
{
SampleBackupsManage
,
SampleBackupsQuery
},
data
()
{
return
{
activeName
:
'wait'
}
},
mounted
()
{
this
.
activeName
=
'wait'
this
.
$refs
.
waitTabs
.
_page
()
},
methods
:
{
_changeTabs
(
tab
,
event
)
{
if
(
tab
.
name
===
'wait'
)
{
this
.
$refs
.
waitTabs
.
_page
()
}
else
if
(
tab
.
name
===
'applyRecord'
)
{
// this.$refs.applyRecordTabs._page()
}
else
{
this
.
$refs
.
queryTabs
.
_page
()
}
}
}
}
</
script
>
pages/soil-sample-manage/sample-surplus-dispose/tab/SurplusDisposeManage.vue
0 → 100644
View file @
30018857
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-form"
:label-width=
"80"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.entrustCode"
name=
"entrustCode"
placeholder=
"请输入样品编号"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"试样编号:"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.sampleCode"
name=
"sampleCode"
placeholder=
"请输入样品名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
@
on-result-change=
"_btnClick"
:showSearchBtn=
"true"
class=
"contHide"
>
</btn-list>
</Col>
<!--样品数量-->
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
id=
"samplePreManage"
ref=
"pageTable"
:tableHeight=
"tableHeight"
:getPage=
"getPage"
@
on-result-change=
"_tableResultChange"
select-data
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:width=
"item.width"
:min-width=
"200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.key==='status'"
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</div>
<a
v-else-if=
"item.key==='code'"
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<a
v-else-if=
"item.key==='sampleSn'"
@
click
.
stop=
"_sampleDetailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<div
v-else-if=
"item.key==='backupPlace'"
@
click
.
stop=
"_handleIndex(scope)"
>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
<div
v-else
>
<AutoCompletes
:value=
"scope.row.backupPlace"
:downData=
"locList"
@
on-result-change=
"_locChange"
name=
"backupPlace"
placeholder=
"请输入或选择存储位置"
focus
show-key=
"backupPlace"
></AutoCompletes>
</div>
</div>
<div
v-else-if=
"item.key==='storageCondition'"
@
click
.
stop=
"_handleIndex(scope)"
>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
<div
v-else
>
<el-select
v-model=
"scope.row.storageCondition"
clearable
style=
"width:100%"
size=
"small"
>
<el-option
v-for=
"item in conditionList"
:value=
"item.name"
:key=
"item.name"
>
{{
item
.
name
}}
</el-option>
</el-select>
</div>
</div>
<div
v-else-if=
"item.key==='handleQuantity'"
@
click
.
stop=
"_handleIndex(scope)"
>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}{{
scope
.
row
[
'sampleUnit'
]
&&
scope
.
row
[
'handleQuantity'
]?
scope
.
row
[
'sampleUnit'
]:
''
}}
</div>
<div
v-else
>
<Row>
<Col
span=
"18"
>
<el-input
v-model=
"scope.row.handleQuantity"
placeholder=
"处理数量"
clearable
size=
"small"
/>
</Col>
<Col
span=
"6"
>
<div
style=
"line-height: 32px"
>
{{
scope
.
row
[
'sampleUnit'
]?
scope
.
row
[
'sampleUnit'
]:
''
}}
</div>
</Col>
</Row>
</div>
</div>
<div
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
<
template
slot=
"col"
>
<vxe-table-column
:width=
"80"
title=
"操作"
align=
"center"
fixed=
"right"
>
<template
slot-scope=
"scope"
>
<VXEIconList
:msg=
"editIndex===scope.rowIndex?iconMsgSave:iconMsg"
@
on-result-change=
"_iconClick"
:rowData=
"scope.row"
:rowIndex=
"scope.rowIndex"
></VXEIconList>
</
template
>
</vxe-table-column>
</template>
</PTVXETable>
</Col>
</Row>
</div>
</div>
<Reason
ref=
"reasonModal"
@
on-result-change=
"_reasonResult"
></Reason>
</div>
</template>
<
script
>
import
AutoCompletes
from
'../../../../components/base/AutoCompletes'
import
Reason
from
'../../../../components/base/Reason'
// eslint-disable-next-line no-unused-vars
import
http
from
'../../../../api/http'
import
{
soilSample
}
from
'../../../../api'
export
default
{
components
:
{
AutoCompletes
,
Reason
},
data
()
{
return
{
currentComponent
:
''
,
searchOpen
:
false
,
formObj
:
{},
selectData
:
[],
selectIds
:
[],
selectSampleIds
:
[],
getPage
:
{},
btn
:
[
{
type
:
'primary'
,
id
:
''
,
name
:
'通过'
},
{
type
:
''
,
id
:
''
,
name
:
'驳回'
},
{
type
:
'primary'
,
id
:
'food-sample-preparation-his-all'
,
name
:
'制备'
},
{
type
:
'primary'
,
id
:
'food-sample-preparation-his-no-pre'
,
name
:
'无需制备'
},
{
type
:
'primary'
,
id
:
'food-sample-preparation-his-scan-pre'
,
name
:
'扫码制备'
},
// { type: '', id: '', name: '填写存放信息' },
// { type: '', id: '', name: '申请处理' },
// { type: '', id: '', name: '导出' },
{
type
:
''
,
id
:
'food-sample-prepare-record-export'
,
name
:
'导出备样记录'
}
],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
}
// food-sample-prepare-edit
],
iconMsgSave
:
[{
type
:
'ios-checkmark'
,
id
:
''
,
name
:
'保存'
}],
pageColumns
:
[
{
title
:
'委托商'
,
key
:
'client'
,
width
:
180
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
180
},
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
180
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
180
},
{
title
:
'样品包装类型'
,
key
:
'samplePack'
,
width
:
180
},
{
title
:
'现场编号'
,
key
:
'siteNo'
,
width
:
180
},
{
title
:
'存储条件'
,
key
:
'conditions'
,
width
:
180
},
{
title
:
'备样位置'
,
key
:
'backupLocation'
,
width
:
180
},
{
title
:
'备样数量'
,
key
:
'quantity'
,
width
:
180
},
{
title
:
'备样人'
,
key
:
'backupUser'
,
width
:
140
},
{
title
:
'钻孔位置'
,
key
:
'boreholeLocation'
,
width
:
110
},
{
title
:
'钻孔名称'
,
key
:
'boreholeName'
,
width
:
160
},
{
title
:
'水深(米)'
,
key
:
'waterDepth'
,
width
:
160
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
160
}
/* {title: '处置方式', key: 'handleMethod', width: 120,}, */
],
conditionList
:
[],
locList
:
[],
currentIndex
:
-
1
,
editIndex
:
-
1
,
endDateBegin
:
''
,
endDateEnd
:
''
,
contList
:
[
{
key
:
'backupCount'
,
name
:
'今日新增数量'
,
value
:
0
},
{
key
:
'backupCountOver'
,
name
:
'超期数量'
,
value
:
0
,
color
:
'red-color'
},
{
key
:
'backupCountWarn'
,
name
:
'预警数量'
,
value
:
0
,
color
:
'warning-color'
}
],
// 只看预警和超期样品
warnAndOver
:
0
,
sampleHandleValue
:
''
,
issueDateBegin
:
''
,
issueDateEnd
:
''
,
isEligible
:
''
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
''
,
385
)
}
else
{
return
this
.
$tableHeight
(
''
,
300
)
}
},
colorComputed
()
{
return
function
(
date
)
{
if
(
this
.
$warningValue
(
date
)
<
0
)
{
return
'#eb6877'
// 红色
}
else
if
(
this
.
$warningValue
(
date
)
>=
0
&&
this
.
$warningValue
(
date
)
<=
this
.
sampleHandleValue
)
{
return
'#f90'
// 橙色
}
}
}
},
mounted
()
{
// 样品存储期限预警
// this.sampleHandleValue = Number(localStorage.getItem('sampleHandleValue'))
// this._getLocList()
// this._getConditionList()
// this._getBackUpCount()
},
methods
:
{
// 签发日期
_issueDateChange
(
date
)
{
this
.
issueDateBegin
=
date
[
0
]
this
.
issueDateEnd
=
date
[
1
]
},
// 重新请求page以及备样数量
_relPage
()
{
this
.
_page
()
// this._getBackUpCount()
},
// 查询卡片备样数量
_getBackUpCount
()
{
this
.
$store
.
dispatch
(
'FoodSampleBackup/backUpCount'
).
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSampleBackup
.
model
const
length
=
this
.
contList
.
length
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
this
.
$set
(
this
.
contList
[
i
],
'value'
,
result
[
this
.
contList
[
i
].
key
])
}
})
},
// 选择时间
_endDateChange
(
data
)
{
this
.
getPage
.
records
[
this
.
currentIndex
].
endDate
=
data
},
// 查询-接收日期
_dateChange
(
data
)
{
this
.
endDateBegin
=
data
[
0
]
this
.
endDateEnd
=
data
[
1
]
},
_save
()
{
this
.
$nextTick
(
function
()
{
const
data
=
{
ids
:
this
.
getPage
.
records
[
this
.
currentIndex
].
id
,
backupPlace
:
this
.
getPage
.
records
[
this
.
currentIndex
].
backupPlace
,
storageCondition
:
this
.
getPage
.
records
[
this
.
currentIndex
]
.
storageCondition
,
endDate
:
this
.
getPage
.
records
[
this
.
currentIndex
].
endDate
,
handleQuantity
:
this
.
getPage
.
records
[
this
.
currentIndex
].
handleQuantity
}
this
.
$store
.
dispatch
(
'FoodSampleBackup/batchEdit'
,
data
).
then
(()
=>
{
if
(
this
.
$store
.
state
.
FoodSampleBackup
.
success
)
{
}
else
{
this
.
$msgTip
(
'error'
,
'保存失败!'
)
}
this
.
_relPage
()
})
})
},
_iconClick
(
res
,
data
,
componentName
,
index
)
{
this
.
currentIndex
=
index
switch
(
res
)
{
case
'编辑'
:
this
.
editIndex
=
index
break
case
'保存'
:
console
.
log
(
'保存'
)
// if (data.endDate !== '') {
// // 非空情况下格式化赋值,如果不判断会格式化为当天的日期
// this._endDateChange(this.$dateformat(data.endDate, 'yyyy-mm-dd'))
// }
// this._save()
this
.
editIndex
=
-
1
break
}
},
_locChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
getPage
.
records
[
this
.
currentIndex
].
backupPlace
=
data
.
backupPlace
break
case
'query'
:
this
.
getPage
.
records
[
this
.
currentIndex
].
backupPlace
=
data
.
backupPlace
this
.
_getLocList
(
data
.
backupPlace
)
break
case
'focus'
:
this
.
_getLocList
()
break
}
},
_getLocList
(
data
)
{
const
obj
=
{}
if
(
data
)
{
obj
.
backupPlace
=
data
}
this
.
$store
.
dispatch
(
'FoodSampleBackup/getPositionList'
,
obj
).
then
(()
=>
{
this
.
locList
=
this
.
$store
.
state
.
FoodSampleBackup
.
list
})
},
_getConditionList
()
{
this
.
$store
.
dispatch
(
'LmsBaseDict/getItem'
,
'保存方式'
).
then
(()
=>
{
this
.
conditionList
=
this
.
$store
.
state
.
LmsBaseDict
.
item
})
},
_exportReceiveRecord
()
{
// 导出备样记录
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条数据!'
)
}
else
{
const
obj
=
{
param
:
'ids'
,
ids
:
this
.
selectIds
,
url
:
''
}
this
.
$store
.
dispatch
(
'ReportExport/getById'
,
'food-sample-prepare-record-export'
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
ReportExport
.
model
obj
.
url
=
result
this
.
$exportByQuery
(
obj
)
})
}
},
// 操作的序号
_handleIndex
(
data
)
{
this
.
currentIndex
=
data
.
rowIndex
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'通过'
:
this
.
_dispose
()
break
case
'驳回'
:
this
.
_disposeBack
()
break
case
'制备'
:
this
.
_preMethod
()
break
case
'无需制备'
:
this
.
_noPreMethod
()
break
case
'扫码制备'
:
this
.
_scanPreMethod
()
break
case
'填写存放信息'
:
this
.
_batchEdit
()
break
case
'申请处理'
:
this
.
_handle
()
break
case
'导出'
:
if
(
this
.
getPage
.
records
.
length
===
0
)
{
this
.
$Message
.
warning
(
'暂无数据,不可导出'
)
}
else
{
this
.
_export
()
}
break
case
'导出备样记录'
:
this
.
_exportReceiveRecord
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
// 通过
_dispose
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定通过这 '
+
this
.
selectIds
.
length
+
' 条数据?'
,
onOk
:
()
=>
{
this
.
_disposeOk
(
this
.
selectIds
.
join
(
','
))
}
})
}
},
_disposeBack
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条委托!'
)
}
else
{
this
.
$refs
.
reasonModal
.
_open
(
'退回原因'
)
}
},
_reasonResult
(
data
)
{
if
(
undefined
!==
data
&&
data
!==
''
)
{
this
.
_reportCheckBack
(
data
)
}
},
_reportCheckBack
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
surplueDisposalFail
({
ids
:
this
.
selectIds
,
remark
:
data
})
if
(
result
)
{
this
.
$Message
.
success
(
'退回成功!'
)
console
.
log
(
'退回成功'
)
await
this
.
_page
()
}
},
_disposeOk
:
async
function
(
ids
)
{
const
result
=
await
soilSample
.
surplusDisposalOk
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功'
)
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_page
()
},
// 制备
_preMethod
()
{
if
(
this
.
selectSampleIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
preModal
.
_open
(
this
.
selectSampleIds
)
}
},
// 无需制备
_noPreMethod
()
{
if
(
this
.
selectSampleIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
noPreModal
.
_open
(
this
.
selectSampleIds
)
}
},
_scanPreMethod
()
{
this
.
$refs
.
scanPreModal
.
_open
()
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
.
records
=
[]
this
.
getPage
=
{
total
:
this
.
$store
.
state
.
LmsFoodSamplePrepare
.
page
.
total
,
pages
:
this
.
$store
.
state
.
LmsFoodSamplePrepare
.
page
.
pages
,
current
:
this
.
$store
.
state
.
LmsFoodSamplePrepare
.
page
.
current
,
size
:
this
.
$store
.
state
.
LmsFoodSamplePrepare
.
page
.
size
,
records
:
[]
}
const
tableList
=
this
.
$store
.
state
.
LmsFoodSamplePrepare
.
page
.
records
for
(
let
i
=
0
;
i
<
tableList
.
length
;
i
++
)
{
this
.
getPage
.
records
.
push
({
sampleId
:
tableList
[
i
].
sampleId
!==
undefined
?
tableList
[
i
].
sampleId
:
''
,
sampleSn
:
tableList
[
i
].
sampleSn
!==
undefined
?
tableList
[
i
].
sampleSn
:
''
,
sampleName
:
tableList
[
i
].
sampleName
!==
undefined
?
tableList
[
i
].
sampleName
:
''
,
backupPlace
:
tableList
[
i
].
backupPlace
!==
undefined
?
tableList
[
i
].
backupPlace
:
''
,
cname
:
tableList
[
i
].
cname
!==
undefined
?
tableList
[
i
].
cname
:
''
,
storageCondition
:
tableList
[
i
].
storageCondition
!==
undefined
?
tableList
[
i
].
storageCondition
:
''
,
quantity
:
tableList
[
i
].
quantity
!==
undefined
?
tableList
[
i
].
quantity
:
''
,
sampleQuantity
:
tableList
[
i
].
sampleQuantity
!==
undefined
?
tableList
[
i
].
sampleQuantity
:
''
,
handleQuantity
:
tableList
[
i
].
handleQuantity
!==
undefined
?
tableList
[
i
].
handleQuantity
:
''
,
sampleUnit
:
tableList
[
i
].
sampleUnit
!==
undefined
?
tableList
[
i
].
sampleUnit
:
''
,
endDate
:
tableList
[
i
].
endDate
!==
undefined
?
new
Date
(
tableList
[
i
].
endDate
)
:
''
,
handleMethod
:
tableList
[
i
].
handleMethod
!==
undefined
?
tableList
[
i
].
handleMethod
:
''
,
id
:
tableList
[
i
].
id
!==
undefined
?
tableList
[
i
].
id
:
''
,
contractName
:
tableList
[
i
].
contractName
!==
undefined
?
tableList
[
i
].
contractName
:
''
,
code
:
tableList
[
i
].
code
!==
undefined
?
tableList
[
i
].
code
:
''
,
contractSn
:
tableList
[
i
].
contractSn
!==
undefined
?
tableList
[
i
].
contractSn
:
''
,
progress
:
tableList
[
i
].
progress
!==
undefined
?
tableList
[
i
].
progress
:
''
,
type
:
tableList
[
i
].
type
!==
undefined
?
tableList
[
i
].
type
:
''
,
issueDate
:
tableList
[
i
].
issueDate
!==
undefined
?
tableList
[
i
].
issueDate
:
''
,
sampleRemark
:
tableList
[
i
].
sampleRemark
!==
undefined
?
tableList
[
i
].
sampleRemark
:
''
,
contractRemark
:
tableList
[
i
].
contractRemark
!==
undefined
?
tableList
[
i
].
contractRemark
:
''
,
isEligible
:
tableList
[
i
].
isEligible
!==
undefined
?
tableList
[
i
].
isEligible
:
''
,
remark
:
tableList
[
i
].
remark
!==
undefined
?
tableList
[
i
].
remark
:
''
,
contractId
:
tableList
[
i
].
contractId
!==
undefined
?
tableList
[
i
].
contractId
:
''
})
}
this
.
selectIds
=
[]
this
.
selectData
=
[]
this
.
selectSampleIds
=
[]
break
case
'selectData'
:
this
.
selectData
=
data
this
.
selectIds
=
[]
this
.
selectSampleIds
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
this
.
selectIds
.
push
(
data
[
i
].
id
)
this
.
selectSampleIds
.
push
(
data
[
i
].
sampleId
)
}
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
// this._getBackUpCount()
},
_page
:
async
function
()
{
this
.
editIndex
=
-
1
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilSample
.
pageSurplusHandleCheck
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_batchEdit
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
$refs
.
editModal
.
_open
(
this
.
selectData
)
}
},
_handle
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
$refs
.
applyModal
.
_open
(
this
.
selectData
)
}
},
// 委托详情
_detailModal
(
data
)
{
// 查看
this
.
$store
.
dispatch
(
'FoodContract/getById'
,
data
.
contractId
).
then
(()
=>
{
if
(
data
.
type
===
0
)
{
// 企业委托 ’0‘
this
.
currentComponent
=
'FoodContractCompanyDetail'
}
else
{
// 政府委托 ’1‘
this
.
currentComponent
=
'FoodContractGovernDetail'
}
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodContract
.
model
)
})
})
},
// 样品详情
_sampleDetailModal
(
data
)
{
if
(
data
.
type
===
1
)
{
// 政府
this
.
currentComponent
=
'FoodSampleGovernDetail'
this
.
$nextTick
(()
=>
{
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
sampleId
)
.
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
)
})
})
}
else
{
this
.
currentComponent
=
'FoodSampleCompanyDetail'
this
.
$nextTick
(()
=>
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
companyModel
)
})
})
}
},
/** *********************************导出-begin*********************************************/
_export
()
{
let
result
=
[]
if
(
this
.
selectData
.
length
===
0
)
{
// 导出全部数据
this
.
$store
.
dispatch
(
'LmsFoodSamplePrepare/page'
,
this
.
_searchParams
())
.
then
(()
=>
{
result
=
this
.
$store
.
state
.
LmsFoodSamplePrepare
.
page
.
records
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
this
.
selectData
.
length
===
0
?
'确定导出全部数据(最多导出5000条)?'
:
'确定导出这'
+
result
.
length
+
' 条数据?'
,
onOk
:
()
=>
{
this
.
$exportExcel
(
'samplePreManage'
,
'备样记录'
,
this
.
pageColumns
,
result
)
}
})
})
}
else
{
// 只导出选中的数据
result
=
this
.
selectData
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
this
.
selectData
.
length
===
0
?
'确定导出全部数据(最多导出5000条)?'
:
'确定导出这'
+
result
.
length
+
' 条数据?'
,
onOk
:
()
=>
{
this
.
$exportExcel
(
'samplePreManage'
,
'备样记录'
,
this
.
pageColumns
,
result
)
}
})
}
},
// 参数
_searchParams
()
{
const
data
=
this
.
$serialize
(
'search-form'
)
return
this
.
$extend
(
data
,
{
page
:
1
,
rows
:
5000
})
}
/** *********************************导出样品台账-end*********************************************/
}
}
</
script
>
<
style
scoped
>
/******副样、备样卡片********/
.reimbursement-item
{
flex
:
1
;
border-radius
:
5px
;
border
:
1px
solid
#e8e8e8
;
padding-bottom
:
10px
;
}
.reimbursement-item
+
.reimbursement-item
{
margin-left
:
20px
;
}
.reimbursement-item
p
{
text-align
:
center
;
margin
:
0
;
}
.reimbursement-item
>
p
:first-child
{
font-size
:
22px
;
line-height
:
40px
;
}
</
style
>
pages/soil-sample-manage/sample-surplus-dispose/tab/SurplusDisposeQuery.vue
0 → 100644
View file @
30018857
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-form-query"
:label-width=
"80"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"样品编号:"
>
<Input
@
on-enter=
"_formSearch"
name=
"sampleSn"
placeholder=
"请输入样品编号"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"样品名称:"
>
<Input
@
on-enter=
"_formSearch"
name=
"sampleName"
placeholder=
"请输入样品名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"存储位置:"
>
<Input
@
on-enter=
"_formSearch"
name=
"backupPlace"
placeholder=
"请输入存储位置"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"存储期限:"
>
<Date-picker
@
on-change=
"_dateChange"
:editable=
"false"
type=
"daterange"
split-panels
style=
"width:100%;"
placeholder=
"请选择存储期限"
></Date-picker>
<input
v-model=
"endDateBegin"
type=
"hidden"
name=
"endDateBegin"
>
<input
v-model=
"endDateEnd"
type=
"hidden"
name=
"endDateEnd"
>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托单位:"
style=
"margin-left: 8px;"
>
<Input
@
on-enter=
"_formSearch"
name=
"cname"
placeholder=
"请输入委托单位"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托名称:"
>
<Input
@
on-enter=
"_formSearch"
name=
"contractName"
placeholder=
"请输入委托名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
@
on-result-change=
"_btnClick"
:showSearchBtn=
"true"
class=
"contHide"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<!--
<ElementTable
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
--
>
<!--ref="pageTable" :getPage="getPage" id="perSampleQuery" selectData>-->
<!--
<el-table-column-->
<!--show-overflow-tooltip-->
<!--sortable-->
<!--:prop="item.key"-->
<!--:label="item.title"-->
<!--:width="item.width"-->
<!--:min-width="200"-->
<!--:fixed="item.fixed?item.fixed:undefined"-->
<!--v-for="item in pageColumns" :key="item.key">-->
<!--
<template
slot-scope=
"scope"
>
-->
<!--
<div
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
-->
<!--
<a
v-else-if=
"item.key==='sampleSn'"
--
>
<!--@click.stop="_sampleDetailModal(scope.row)">
{{
scope
.
row
[
item
.
key
]
}}
</a>
-->
<!--
<div
v-else-if=
"item.key==='progress'"
>
-->
<!--
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
-->
<!--
</div>
-->
<!--
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
-->
<!--
</
template
>
-->
<!--</el-table-column>-->
<!--</ElementTable>-->
<PTVXETable
id=
"perSampleQuery"
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
select-data
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in pageColumns"
:key=
"item.key"
sortable
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<a
v-else-if=
"item.key==='sampleSn'"
@
click
.
stop=
"_sampleDetailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<div
v-else-if=
"item.key==='progress'"
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
</div>
</template>
<
script
>
import
{
soilEntrust
}
from
'../../../../api'
export
default
{
components
:
{},
data
()
{
return
{
currentComponent
:
''
,
selectIds
:
[],
formObj
:
{},
btn
:
[
// { type: '', id: '', name: '导出' },
{
type
:
''
,
id
:
'food-sample-handle-already-export-sample-store'
,
name
:
'导出样品贮存表'
}
],
pageColumns
:
[
{
title
:
'样品编号'
,
key
:
'sampleSn'
,
width
:
180
},
{
title
:
'样品名称'
,
key
:
'sampleName'
,
width
:
140
},
{
title
:
'状态'
,
key
:
'progress'
,
width
:
110
,
status
:
true
},
{
title
:
'存储期限'
,
key
:
'endDate'
,
width
:
120
,
date
:
true
},
{
title
:
'委托单位'
,
key
:
'cname'
,
width
:
140
},
{
title
:
'委托名称'
,
key
:
'contractName'
,
width
:
170
},
{
title
:
'处置方式'
,
key
:
'handleMethod'
,
width
:
120
},
{
title
:
'处理人'
,
key
:
'handlePerson'
,
width
:
100
},
{
title
:
'处理时间'
,
key
:
'handleTime'
,
width
:
120
,
date
:
true
},
{
title
:
'处理申请人'
,
key
:
'applyer'
,
width
:
120
},
{
title
:
'申请时间'
,
key
:
'applyDate'
,
width
:
120
,
date
:
true
},
{
title
:
'存储位置'
,
key
:
'backupPlace'
,
width
:
100
},
{
title
:
'存储条件'
,
key
:
'storageCondition'
,
width
:
120
},
{
title
:
'样品数量'
,
key
:
'quantity'
,
width
:
100
},
{
title
:
'备样数量'
,
key
:
'sampleQuantity'
,
width
:
100
},
{
title
:
'样品备注'
,
key
:
'sampleRemark'
},
{
title
:
'委托备注'
,
key
:
'contractRemark'
}
],
searchOpen
:
false
,
getPage
:
{},
selectData
:
[],
endDateBegin
:
''
,
endDateEnd
:
''
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'tabSearchTwo'
)
}
else
{
return
this
.
$tableHeight
(
'tabNoSearch'
)
}
}
},
methods
:
{
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
soilEntrust
.
pageSampleReceive
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
selectIds
=
[]
this
.
getPage
=
this
.
$store
.
state
.
FoodSampleBackup
.
page
break
case
'selectData'
:
this
.
selectData
=
data
this
.
selectIds
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
this
.
selectIds
.
push
(
data
[
i
].
id
)
}
break
case
'changeSize'
:
this
.
_page
()
break
// default :
// this._page();
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_dateChange
(
data
)
{
this
.
endDateBegin
=
data
[
0
]
this
.
endDateEnd
=
data
[
1
]
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'导出'
:
if
(
this
.
getPage
.
records
.
length
===
0
)
{
this
.
$Message
.
warning
(
'暂无数据,不可导出'
)
}
else
{
this
.
_export
()
}
break
case
'导出样品贮存表'
:
this
.
_exportSampleStore
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
_exportSampleStore
()
{
const
obj
=
{
param
:
'ids'
,
ids
:
this
.
selectIds
,
url
:
''
,
queryObj
:
this
.
$serialize
(
'search-form-query'
)
}
this
.
$store
.
dispatch
(
'ReportExport/getById'
,
'food-sample-handle-already-export-sample-store'
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
ReportExport
.
model
obj
.
url
=
result
this
.
$exportByQuery
(
obj
)
})
},
// 样品详情
_sampleDetailModal
(
data
)
{
if
(
data
.
type
===
1
)
{
// 政府
this
.
currentComponent
=
'FoodSampleGovernDetail'
this
.
$nextTick
(()
=>
{
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
sampleId
)
.
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
)
})
})
}
else
{
this
.
currentComponent
=
'FoodSampleCompanyDetail'
this
.
$nextTick
(()
=>
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
companyModel
)
})
})
}
},
/** *********************************导出-begin*********************************************/
_export
()
{
let
result
=
[]
if
(
this
.
selectData
.
length
===
0
)
{
// 导出全部数据
this
.
$store
.
dispatch
(
'FoodSampleBackup/perSampleQuery'
,
this
.
_searchParams
())
.
then
(()
=>
{
result
=
this
.
$store
.
state
.
FoodSampleBackup
.
page
.
records
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
this
.
selectData
.
length
===
0
?
'确定导出全部数据(最多导出5000条)?'
:
'确定导出这'
+
result
.
length
+
' 条数据?'
,
onOk
:
()
=>
{
this
.
$exportExcel
(
'perSampleQuery'
,
'样品处理'
,
this
.
pageColumns
,
result
)
}
})
})
}
else
{
// 只导出选中的数据
result
=
this
.
selectData
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
this
.
selectData
.
length
===
0
?
'确定导出全部数据(最多导出5000条)?'
:
'确定导出这'
+
result
.
length
+
' 条数据?'
,
onOk
:
()
=>
{
this
.
$exportExcel
(
'perSampleQuery'
,
'样品处理'
,
this
.
pageColumns
,
result
)
}
})
}
},
// 参数
_searchParams
()
{
const
data
=
this
.
$serialize
(
'search-form-query'
)
return
this
.
$extend
(
data
,
{
page
:
1
,
rows
:
5000
})
}
/** *********************************导出样品台账-end*********************************************/
}
}
</
script
>
pages/soil-sample-manage/surplus-manage/SurplusParpareApply.vue
0 → 100644
View file @
30018857
<
template
>
<div>
<Modal
v-model=
"showModalHandleApply"
:mask-closable=
"false"
width=
"500"
>
<p
slot=
"header"
>
处理申请
</p>
<div>
<Form
ref=
"formObj"
:id=
"formId"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"90"
inline
>
<Form-item
label=
"申请日期:"
prop=
"applyHandleTime"
style=
"width:100%"
>
<Date-picker
v-model=
"formObj.applyHandleTime"
:editable=
"false"
name=
"applyHandleTime"
type=
"date"
placeholder=
"请选择申请日期"
style=
"width: 100%;"
></Date-picker>
</Form-item>
<Form-item
label=
"申请人:"
prop=
"applyHandler"
style=
"width:100%"
>
<Input
v-model=
"formObj.applyHandler"
@
click
.
native=
"_selectPerson()"
name=
"applyHandler"
readonly
></Input>
</Form-item>
<Form-item
label=
"处理方式:"
style=
"width:100%"
>
<el-select
v-model=
"formObj.handleWay"
name=
"handleWay"
placeholder=
"请选择"
size=
"small"
style=
"width:100%"
clearable
>
<el-option
v-for=
"item in handleWayList"
:key=
"item.name"
:label=
"item.name"
:value=
"item.name"
>
</el-option>
</el-select>
</Form-item>
<Form-item
label=
"处理原因"
prop=
"applyRemark"
style=
"width:100%"
>
<Input
:rows=
"3"
v-model=
"formObj.applyRemark"
placeholder=
"请输入处理原因"
type=
"textarea"
name=
"applyRemark"
/>
</Form-item>
</Form>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
@
on-result-change=
"_footerResult"
:footer=
"footerList"
></modal-footer>
</div>
</Modal>
<AssignPerson
ref=
"personModal"
@
on-result-change=
"_assignBackData"
></AssignPerson>
</div>
</
template
>
<
script
>
import
Global
from
'../../../api/config'
import
AssignPerson
from
'../../../components/user-info-single/AssignPerson'
import
{
soilSample
}
from
'../../../api'
export
default
{
components
:
{
AssignPerson
},
data
()
{
return
{
lengthLimitList
:
[{
key
:
'handleQuantity'
,
title
:
'样品处理数量'
}],
ids
:
[],
// 委托ids
showModalHandleApply
:
false
,
formObj
:
{
id
:
''
,
applyHandleTime
:
new
Date
(),
applyHandler
:
''
,
applyHandlerId
:
''
,
handleBatch
:
''
,
retentionTime
:
''
,
applyRemark
:
''
,
lmsEquipFiles
:
[],
handleWay
:
''
,
handleQuantity
:
''
,
sampleUnit
:
''
},
applyId
:
0
,
ruleValidate
:
{},
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'提交'
,
type
:
'primary'
}
],
visible
:
false
,
fileAction
:
Global
.
baseURL
+
'/food/v1/sample_handle_apply/uploadFile'
,
fileData
:
{
id
:
0
,
name
:
''
},
formId
:
''
,
handleWayList
:
[
{
name
:
'到期处置'
},
{
name
:
'立即处置'
}
],
imgSrc
:
''
}
},
mounted
()
{
// this._dicSearch()
},
methods
:
{
_selectPerson
()
{
this
.
$refs
.
personModal
.
_openGoup
(
'申请人'
,
'itemTree'
)
},
_assignBackData
(
data
)
{
this
.
formObj
.
applyHandler
=
data
.
realname
this
.
formObj
.
applyHandlerId
=
data
.
id
},
// 从字典中查询类别
_dicSearch
()
{
this
.
$store
.
dispatch
(
'LmsBaseDict/getItem'
,
'样品处理方式'
).
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
LmsBaseDict
.
item
this
.
handleWayList
=
result
})
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'提交'
:
this
.
_ok
()
break
}
},
_open
(
data
)
{
this
.
ids
=
[]
this
.
applyId
=
0
this
.
fileData
.
id
=
0
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
// this._getRetention(data)
// this._getSampleBatch(data)
this
.
$refs
.
footerModal
.
_hideLoading
()
this
.
ids
=
data
this
.
formObj
.
lmsEquipFiles
=
[]
this
.
showModalHandleApply
=
true
this
.
formObj
.
applyHandler
=
Global
.
getUserInfo
().
realname
this
.
formObj
.
applyHandlerId
=
Global
.
getUserInfo
().
id
this
.
formId
=
'handleApplyEditForm'
+
this
.
$randomCode
()
this
.
formObj
.
applyHandleTime
=
new
Date
()
},
_getSampleBatch
(
data
)
{
this
.
formObj
.
handleBatch
=
data
.
length
},
// 计算存储期限
_getRetention
(
data
)
{
const
handleQuantityList
=
[]
const
sampleUnitList
=
[]
let
lastTime
=
''
const
ids
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
ids
.
push
(
data
[
i
].
id
)
// 样品处理数量和单位
handleQuantityList
.
push
(
data
[
i
].
handleQuantity
)
sampleUnitList
.
push
(
data
[
i
].
sampleUnit
)
if
(
lastTime
===
''
)
{
lastTime
=
data
[
i
].
endDate
}
else
if
(
lastTime
!==
''
&&
lastTime
<
data
[
i
].
endDate
)
{
lastTime
=
data
[
i
].
endDate
}
}
this
.
ids
=
ids
this
.
formObj
.
retentionTime
=
this
.
$dateformat
(
lastTime
,
'yyyy-mm-dd'
)
// 若勾选的样品处理数量、单位一样则显示
// 通过for循环来判断数组的每一元素(若有不重复的,则返回false)
this
.
formObj
.
handleQuantity
=
this
.
$duplicates
(
handleQuantityList
)
&&
handleQuantityList
.
length
>
0
?
handleQuantityList
[
0
]
:
''
this
.
formObj
.
sampleUnit
=
this
.
$duplicates
(
sampleUnitList
)
&&
sampleUnitList
.
length
>
0
?
sampleUnitList
[
0
]
:
''
},
// 附件
_handleView
(
data
)
{
const
filePath
=
data
.
filePath
const
index1
=
filePath
.
lastIndexOf
(
'.'
)
const
index2
=
filePath
.
length
const
suffix
=
filePath
.
substring
(
index1
+
1
,
index2
)
// 后缀名
if
(
suffix
.
toLowerCase
()
===
'png'
||
suffix
.
toLowerCase
()
===
'jpg'
||
suffix
.
toLowerCase
()
===
'jpeg'
)
{
this
.
visible
=
true
this
.
imgSrc
=
Global
.
baseURL
+
'/food/v1/sample_handle_apply_attachment/view'
+
'?id='
+
data
.
id
+
'&objectKey='
+
data
.
filePath
}
else
{
this
.
$Message
.
warning
({
content
:
'非图片文件无法查看,请下载查看'
,
duration
:
3
})
this
.
visible
=
false
}
},
// 下载文件
_downloadFile
(
file
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定要下载?'
,
onOk
:
()
=>
{
const
url
=
Global
.
baseURL
+
'/food/v1/sample_handle_apply/downLoadFile?id='
+
file
.
id
window
.
open
(
url
)
}
})
},
_handleSuccess
(
response
,
file
,
fileList
)
{
if
(
response
.
success
)
{
this
.
fileData
.
id
=
response
.
data
.
applyId
this
.
applyId
=
response
.
data
.
applyId
this
.
$Message
.
success
(
'上传成功!'
)
this
.
formObj
.
lmsEquipFiles
.
push
(
response
.
data
)
}
else
{
this
.
$Message
.
error
(
'上传失败!'
)
}
},
_handleBeforeUpload
(
file
)
{},
// 删除文件
_handleRemove
(
file
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除文件?'
,
onOk
:
()
=>
{
const
fileList
=
this
.
formObj
.
lmsEquipFiles
this
.
$store
.
dispatch
(
'FoodSampleHandleApplyAttachment/deleteByIds'
,
file
.
id
)
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
FoodSampleHandleApplyAttachment
.
success
)
{
this
.
formObj
.
lmsEquipFiles
.
splice
(
fileList
.
indexOf
(
file
),
1
)
this
.
$Message
.
success
(
'删除成功!'
)
}
})
}
})
},
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
$refs
.
footerModal
.
_hideLoading
()
const
data
=
this
.
$serialize
(
this
.
formId
)
data
.
applyHandlerId
=
this
.
formObj
.
applyHandlerId
data
.
ids
=
this
.
ids
.
join
(
','
)
this
.
_submitDispose
(
data
)
// data.handleBatch = this.formObj.handleBatch
// data.id = this.applyId
// data.handleWay = this.formObj.handleWay
// data.applyHandler = this.formObj.applyHandler
// data.handleQuantity = this.formObj.handleQuantity
// // let returnData = {ids: this.ids, obj: data};
// this.$extend(data, { backupIds: this.ids.join(',') })
// if (this.$lengthLimitVal(this.lengthLimitList, data) === false) {
// this._hideLoading()
// return
// }
// this.$store
// .dispatch('FoodSampleHandleApply/handleApplySubmit', data)
// .then(() => {
// if (this.$store.state.FoodSampleHandleApply.success) {
// this._cancel()
// this.$Message.success('提交成功')
// this.$emit('on-result-change')
// } else {
// this.$refs.footerModal._hideLoading()
// }
// })
}
else
{
this
.
$Message
.
error
(
'表单验证失败!'
)
this
.
$refs
.
footerModal
.
_hideLoading
()
}
})
},
_submitDispose
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
surplusApplyHandle
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功'
)
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
showModalHandleApply
=
false
this
.
$emit
(
'on-result-change'
)
},
_cancel
()
{
this
.
showModalHandleApply
=
false
this
.
$refs
.
footerModal
.
_hideLoading
()
}
}
}
</
script
>
<
style
scoped
>
.file-upload-list
{
display
:
inline-block
;
width
:
100px
;
height
:
100px
;
text-align
:
center
;
line-height
:
100px
;
border
:
1px
solid
transparent
;
border-radius
:
4px
;
overflow
:
hidden
;
background
:
#fff
;
position
:
relative
;
box-shadow
:
0
1px
1px
rgba
(
0
,
0
,
0
,
0.2
);
margin-right
:
4px
;
}
.file-upload-list
i
{
color
:
#fff
;
font-size
:
20px
;
cursor
:
pointer
;
margin
:
0
2px
;
}
.file-upload-list-cover
{
display
:
none
;
position
:
absolute
;
top
:
0
;
bottom
:
0
;
left
:
0
;
right
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0.6
);
}
.file-upload-list
:hover
.file-upload-list-cover
{
display
:
block
;
}
</
style
>
pages/soil-sample-manage/surplus-manage/tab/SampleSurplusManage.vue
View file @
30018857
...
@@ -110,11 +110,11 @@
...
@@ -110,11 +110,11 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
SampleParpareApply
from
'../SurplusParpareApply'
import
AutoCompletes
from
'../../../../components/base/AutoCompletes'
import
AutoCompletes
from
'../../../../components/base/AutoCompletes'
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line no-unused-vars
import
http
from
'../../../../api/http'
import
http
from
'../../../../api/http'
import
{
soilEntrust
}
from
'../../../../api'
import
{
soilSample
}
from
'../../../../api'
import
SampleParpareApply
from
'../../backups-manage/SampleParpareApply'
export
default
{
export
default
{
components
:
{
components
:
{
AutoCompletes
,
AutoCompletes
,
...
@@ -127,6 +127,7 @@ export default {
...
@@ -127,6 +127,7 @@ export default {
formObj
:
{},
formObj
:
{},
selectData
:
[],
selectData
:
[],
selectIds
:
[],
selectIds
:
[],
indexList
:
[],
selectSampleIds
:
[],
selectSampleIds
:
[],
getPage
:
{},
getPage
:
{},
btn
:
[
btn
:
[
...
@@ -138,7 +139,7 @@ export default {
...
@@ -138,7 +139,7 @@ export default {
{
{
type
:
'primary'
,
type
:
'primary'
,
id
:
''
,
id
:
''
,
name
:
'
处理备样申请
'
name
:
'
完成处理
'
},
},
{
{
type
:
'primary'
,
type
:
'primary'
,
...
@@ -169,20 +170,12 @@ export default {
...
@@ -169,20 +170,12 @@ export default {
],
],
iconMsgSave
:
[{
type
:
'ios-checkmark'
,
id
:
''
,
name
:
'保存'
}],
iconMsgSave
:
[{
type
:
'ios-checkmark'
,
id
:
''
,
name
:
'保存'
}],
pageColumns
:
[
pageColumns
:
[
{
title
:
'委托商'
,
key
:
'client'
,
width
:
180
},
{
title
:
'试样编号'
,
key
:
'sampleCode'
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
180
},
{
title
:
'状态'
,
key
:
'status'
},
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
180
},
{
title
:
'包装类型'
,
key
:
'samplePack'
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
160
},
{
title
:
'制备数量'
,
key
:
'quantity'
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
180
},
{
title
:
'单位'
,
key
:
'unit'
}
{
title
:
'样品包装类型'
,
key
:
'samplePack'
,
width
:
180
},
// { title: '备注', key: 'remark', width: 130 }
{
title
:
'现场编号'
,
key
:
'siteNo'
,
width
:
180
},
{
title
:
'存储条件'
,
key
:
'conditions'
,
width
:
180
},
{
title
:
'备样位置'
,
key
:
'backupLocation'
,
width
:
180
},
{
title
:
'备样数量'
,
key
:
'quantity'
,
width
:
180
},
{
title
:
'备样人'
,
key
:
'backupUser'
,
width
:
140
},
{
title
:
'钻孔位置'
,
key
:
'boreholeLocation'
,
width
:
110
},
{
title
:
'钻孔名称'
,
key
:
'boreholeName'
,
width
:
160
},
{
title
:
'水深(米)'
,
key
:
'waterDepth'
,
width
:
160
}
/* {title: '处置方式', key: 'handleMethod', width: 120,}, */
/* {title: '处置方式', key: 'handleMethod', width: 120,}, */
],
],
conditionList
:
[],
conditionList
:
[],
...
@@ -236,6 +229,7 @@ export default {
...
@@ -236,6 +229,7 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
$refs
.
pageTable
.
_showLoading
()
// 样品存储期限预警
// 样品存储期限预警
// this.sampleHandleValue = Number(localStorage.getItem('sampleHandleValue'))
// this.sampleHandleValue = Number(localStorage.getItem('sampleHandleValue'))
// this._getLocList()
// this._getLocList()
...
@@ -366,7 +360,7 @@ export default {
...
@@ -366,7 +360,7 @@ export default {
case
'申请处理'
:
case
'申请处理'
:
this
.
_applyDispose
()
this
.
_applyDispose
()
break
break
case
'
处理备样申请
'
:
case
'
完成处理
'
:
this
.
_handleApply
()
this
.
_handleApply
()
break
break
case
'制备'
:
case
'制备'
:
...
@@ -411,13 +405,30 @@ export default {
...
@@ -411,13 +405,30 @@ export default {
if
(
this
.
selectIds
.
length
===
0
)
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
}
else
{
this
.
$Modal
.
confirm
({
console
.
log
(
this
.
selectData
)
title
:
'提示'
,
const
errorIds
=
[]
content
:
'确定处理这 '
+
this
.
selectIds
.
length
+
' 条数据?'
,
for
(
let
i
=
0
;
i
<
this
.
selectIds
.
length
;
i
++
)
{
onOk
:
()
=>
{
if
(
this
.
selectData
[
i
].
status
.
display
!==
'处理审批通过'
)
{
this
.
_handleOk
(
this
.
selectIds
.
join
(
','
)
)
errorIds
.
push
(
this
.
selectData
[
i
].
index
+
1
)
}
}
})
}
if
(
errorIds
.
length
===
0
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定处理这 '
+
this
.
selectIds
.
length
+
' 条数据?'
,
onOk
:
()
=>
{
this
.
_handleOk
(
this
.
selectIds
.
join
(
','
))
}
})
}
else
{
this
.
$Message
.
warning
(
'第 '
+
errorIds
+
' 条数据的审批未通过'
)
}
}
},
_handleOk
:
async
function
()
{
const
result
=
await
soilSample
.
surplusHandleOk
(
this
.
selectIds
.
join
(
','
))
if
(
result
)
{
this
.
_resultChange
(
'提交成功'
)
}
}
},
},
// 制备
// 制备
...
@@ -555,6 +566,12 @@ export default {
...
@@ -555,6 +566,12 @@ export default {
break
break
}
}
},
},
allSelect
(
data
)
{
this
.
indexList
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
this
.
indexList
.
push
(
data
[
i
])
}
},
_formSearch
()
{
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
// this._getBackUpCount()
// this._getBackUpCount()
...
@@ -563,7 +580,7 @@ export default {
...
@@ -563,7 +580,7 @@ export default {
this
.
editIndex
=
-
1
this
.
editIndex
=
-
1
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
soil
Entrust
.
pageBackup
(
const
result
=
await
soil
Sample
.
pageSurplus
(
this
.
$serializeForm
(
this
.
formObj
)
this
.
$serializeForm
(
this
.
formObj
)
)
)
if
(
result
)
{
if
(
result
)
{
...
...
pages/soil-sample-manage/surplus-manage/tab/SampleSurplusQuery.vue
View file @
30018857
...
@@ -75,6 +75,9 @@
...
@@ -75,6 +75,9 @@
<div
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<a
v-else-if=
"item.key==='sampleSn'"
<a
v-else-if=
"item.key==='sampleSn'"
@
click
.
stop=
"_sampleDetailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
@
click
.
stop=
"_sampleDetailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<div
v-else-if=
"item.key==='status'"
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</div>
<div
v-else-if=
"item.key==='progress'"
>
<div
v-else-if=
"item.key==='progress'"
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</div>
</div>
...
@@ -89,7 +92,7 @@
...
@@ -89,7 +92,7 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
soil
Entrust
}
from
'../../../../api'
import
{
soil
Sample
}
from
'../../../../api'
export
default
{
export
default
{
components
:
{},
components
:
{},
...
@@ -107,23 +110,11 @@ export default {
...
@@ -107,23 +110,11 @@ export default {
}
}
],
],
pageColumns
:
[
pageColumns
:
[
{
title
:
'样品编号'
,
key
:
'sampleSn'
,
width
:
180
},
{
title
:
'试样编号'
,
key
:
'sampleCode'
},
{
title
:
'样品名称'
,
key
:
'sampleName'
,
width
:
140
},
{
title
:
'状态'
,
key
:
'status'
},
{
title
:
'状态'
,
key
:
'progress'
,
width
:
110
,
status
:
true
},
{
title
:
'包装类型'
,
key
:
'samplePack'
},
{
title
:
'存储期限'
,
key
:
'endDate'
,
width
:
120
,
date
:
true
},
{
title
:
'制备数量'
,
key
:
'quantity'
},
{
title
:
'委托单位'
,
key
:
'cname'
,
width
:
140
},
{
title
:
'单位'
,
key
:
'unit'
}
{
title
:
'委托名称'
,
key
:
'contractName'
,
width
:
170
},
{
title
:
'处置方式'
,
key
:
'handleMethod'
,
width
:
120
},
{
title
:
'处理人'
,
key
:
'handlePerson'
,
width
:
100
},
{
title
:
'处理时间'
,
key
:
'handleTime'
,
width
:
120
,
date
:
true
},
{
title
:
'处理申请人'
,
key
:
'applyer'
,
width
:
120
},
{
title
:
'申请时间'
,
key
:
'applyDate'
,
width
:
120
,
date
:
true
},
{
title
:
'存储位置'
,
key
:
'backupPlace'
,
width
:
100
},
{
title
:
'存储条件'
,
key
:
'storageCondition'
,
width
:
120
},
{
title
:
'样品数量'
,
key
:
'quantity'
,
width
:
100
},
{
title
:
'备样数量'
,
key
:
'sampleQuantity'
,
width
:
100
},
{
title
:
'样品备注'
,
key
:
'sampleRemark'
},
{
title
:
'委托备注'
,
key
:
'contractRemark'
}
],
],
searchOpen
:
false
,
searchOpen
:
false
,
getPage
:
{},
getPage
:
{},
...
@@ -145,7 +136,7 @@ export default {
...
@@ -145,7 +136,7 @@ export default {
_page
:
async
function
()
{
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
soil
Entrust
.
pageSampleReceive
(
const
result
=
await
soil
Sample
.
pageSurplusHis
(
this
.
$serializeForm
(
this
.
formObj
)
this
.
$serializeForm
(
this
.
formObj
)
)
)
if
(
result
)
{
if
(
result
)
{
...
...
router/soil-routes.js
View file @
30018857
...
@@ -26,6 +26,7 @@ import MeterAnnualEntrust from '../pages/soil-statistics/annual-entrust/MeterAnn
...
@@ -26,6 +26,7 @@ import MeterAnnualEntrust from '../pages/soil-statistics/annual-entrust/MeterAnn
import
ReportAuditIndex
from
'../pages/soil-report-manage/report-audit/ReportAuditIndex'
import
ReportAuditIndex
from
'../pages/soil-report-manage/report-audit/ReportAuditIndex'
import
ReportIssueIndex
from
'../pages/soil-report-manage/report-issue/ReportIssueIndex'
import
ReportIssueIndex
from
'../pages/soil-report-manage/report-issue/ReportIssueIndex'
import
SampleDisposeIndex
from
'../pages/soil-sample-manage/sample-dispose/SampleDisposeIndex'
import
SampleDisposeIndex
from
'../pages/soil-sample-manage/sample-dispose/SampleDisposeIndex'
import
SurplusDisposeIndex
from
'../pages/soil-sample-manage/sample-surplus-dispose/SurplusDisposeIndex'
import
ClientLocationSearch
from
'../pages/soil-statistics/client_location/ClientLocationIndex'
import
ClientLocationSearch
from
'../pages/soil-statistics/client_location/ClientLocationIndex'
import
Blank
from
'~/pages/blank'
import
Blank
from
'~/pages/blank'
export
default
[
export
default
[
...
@@ -85,6 +86,11 @@ export default [
...
@@ -85,6 +86,11 @@ export default [
meta
:
{
title
:
'样品处理'
}
meta
:
{
title
:
'样品处理'
}
},
},
{
{
path
:
'surplus_dispose'
,
component
:
SurplusDisposeIndex
,
meta
:
{
title
:
'余样处理审批'
}
},
{
path
:
'receive_location'
,
path
:
'receive_location'
,
component
:
AddressManage
,
component
:
AddressManage
,
meta
:
{
title
:
'收样位置管理'
}
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