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
4bde23b7
Commit
4bde23b7
authored
Jan 09, 2021
by
zhangmengqi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
cabc189b
f19c568f
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
5082 additions
and
172 deletions
+5082
-172
meter-entrust.js
api/meter/meter-entrust.js
+17
-1
soil-statistics.js
api/soil/soil-statistics.js
+27
-1
soil-test.js
api/soil/soil-test.js
+23
-2
nuxt.config.js
nuxt.config.js
+0
-1
SampleItemSelect.vue
pages/meter-aptitude/standard-manage/SampleItemSelect.vue
+0
-20
StandardManage.vue
pages/meter-aptitude/standard-manage/StandardManage.vue
+0
-18
EntrustRegister.vue
pages/meter-entrust/entrust-register/EntrustRegister.vue
+4
-1
SampleItemEdit.vue
pages/meter-entrust/entrust-register/SampleItemEdit.vue
+0
-6
Instock.vue
pages/soil-alone-sample-instock/Instock.vue
+4
-5
SoilExpReportCheckIndex.vue
.../soil-exp-report/report-check/SoilExpReportCheckIndex.vue
+47
-0
SoilGroupExpReportCheck.vue
.../soil-exp-report/report-check/SoilGroupExpReportCheck.vue
+233
-0
ExpReportCheck.vue
pages/soil-exp-report/report-check/tabs/ExpReportCheck.vue
+396
-0
ExpReportCheckHis.vue
...s/soil-exp-report/report-check/tabs/ExpReportCheckHis.vue
+379
-0
SoilExpReportEndIndex.vue
pages/soil-exp-report/report-end/SoilExpReportEndIndex.vue
+399
-0
SoilGroupExpReportEnd.vue
pages/soil-exp-report/report-end/SoilGroupExpReportEnd.vue
+233
-0
SoilExpReportIssueIndex.vue
.../soil-exp-report/report-issue/SoilExpReportIssueIndex.vue
+47
-0
SoilGroupExpReportIssue.vue
.../soil-exp-report/report-issue/SoilGroupExpReportIssue.vue
+233
-0
ExpReportIssue.vue
pages/soil-exp-report/report-issue/tabs/ExpReportIssue.vue
+396
-0
ExpReportIssueHis.vue
...s/soil-exp-report/report-issue/tabs/ExpReportIssueHis.vue
+379
-0
SoilExpReportMakeIndex.vue
pages/soil-exp-report/report-make/SoilExpReportMakeIndex.vue
+47
-0
SoilGroupExpReportMake.vue
pages/soil-exp-report/report-make/SoilGroupExpReportMake.vue
+156
-0
ExpReportMake.vue
pages/soil-exp-report/report-make/tabs/ExpReportMake.vue
+396
-0
ExpReportMakeHis.vue
pages/soil-exp-report/report-make/tabs/ExpReportMakeHis.vue
+379
-0
ItemReportView.vue
pages/soil-report-manage/report-make/ItemReportView.vue
+1
-1
SoilItemReportTemplate.vue
...nage/soil-item-report-template/SoilItemReportTemplate.vue
+18
-1
Preparation.vue
pages/soil-sample-manage/sample-preparation/Preparation.vue
+108
-34
PreparationOther.vue
...oil-sample-manage/sample-preparation/PreparationOther.vue
+387
-0
SelectPrinter.vue
...s/soil-sample-manage/sample-preparation/SelectPrinter.vue
+140
-0
MeterPersonalTask.vue
pages/soil-statistics/personal-task/MeterPersonalTask.vue
+13
-57
UserTestPie.vue
pages/soil-statistics/personal-task/UserTestPie.vue
+3
-9
ItemReportView.vue
pages/soil-test-manage/test-input/ItemReportView.vue
+0
-2
ViewGdsData.vue
pages/soil-test-manage/test-input/ViewGdsData.vue
+310
-0
CreateBatchItemReport.vue
...est-manage/test-input/item-tabs/CreateBatchItemReport.vue
+159
-0
ItemLeftList.vue
pages/soil-test-manage/test-input/item-tabs/ItemLeftList.vue
+82
-2
ItemRightList.vue
...s/soil-test-manage/test-input/item-tabs/ItemRightList.vue
+12
-1
ItemLeftList.vue
...k-manage/entrust-sample-manage/item-tabs/ItemLeftList.vue
+1
-1
ItemRightList.vue
...-manage/entrust-sample-manage/item-tabs/ItemRightList.vue
+13
-8
routes.js
router/routes.js
+5
-1
soil-routes.js
router/soil-routes.js
+35
-0
No files found.
api/meter/meter-entrust.js
View file @
4bde23b7
...
...
@@ -162,5 +162,21 @@ export default {
backupRecordPage
:
data
=>
http
.
post
(
'soil/v1/sample_backup_record/page'
,
data
).
then
(
res
=>
res
),
experimentRecordPage
:
data
=>
http
.
post
(
'soil/v1/experiment_record/page'
,
data
).
then
(
res
=>
res
)
http
.
post
(
'soil/v1/experiment_record/page'
,
data
).
then
(
res
=>
res
),
pageGroupExpReportMake
:
data
=>
http
.
post
(
'soil/v1/exp_report/page_group_exp_report_make'
,
data
)
.
then
(
res
=>
res
),
pageGroupExpReportCheck
:
data
=>
http
.
post
(
'soil/v1/exp_report/page_group_exp_report_check'
,
data
)
.
then
(
res
=>
res
),
pageGroupExpReportIssue
:
data
=>
http
.
post
(
'soil/v1/exp_report/page_group_exp_report_issue'
,
data
)
.
then
(
res
=>
res
),
pageGroupExpReportEnd
:
data
=>
http
.
post
(
'soil/v1/exp_report/page_group_exp_report_end'
,
data
)
.
then
(
res
=>
res
)
}
api/soil/soil-statistics.js
View file @
4bde23b7
...
...
@@ -53,5 +53,31 @@ export default {
.
post
(
'soil/v1/experiment/list_experiment_progress'
,
data
)
.
then
(
res
=>
res
),
listSampleProgress
:
data
=>
http
.
post
(
'soil/v1/sample/list_sample_progress'
,
data
).
then
(
res
=>
res
)
http
.
post
(
'soil/v1/sample/list_sample_progress'
,
data
).
then
(
res
=>
res
),
pageExpReportMake
:
data
=>
http
.
post
(
'soil/v1/entrust/page_exp_report_make'
,
data
).
then
(
res
=>
res
),
pageExpReportCheck
:
data
=>
http
.
post
(
'soil/v1/entrust/page_exp_report_check'
,
data
).
then
(
res
=>
res
),
pageExpReportIssue
:
data
=>
http
.
post
(
'soil/v1/entrust/page_exp_report_issue'
,
data
).
then
(
res
=>
res
),
pageExpReportEnd
:
data
=>
http
.
post
(
'soil/v1/entrust/page_exp_report_end'
,
data
).
then
(
res
=>
res
),
expReportCheckApprove
:
data
=>
http
.
post
(
'soil/v1/exp_report/exp_report_approve?ids='
+
data
)
.
then
(
res
=>
res
),
expReportCheckSubmit
:
data
=>
http
.
post
(
'soil/v1/exp_report/exp_report_check?ids='
+
data
)
.
then
(
res
=>
res
),
expReportIssueSubmit
:
data
=>
http
.
post
(
'soil/v1/exp_report/exp_report_issue?ids='
+
data
)
.
then
(
res
=>
res
),
pagePersonalTaskStatistics
:
data
=>
http
.
post
(
'soil/v1/statistics/page_personal_task_statistics'
,
data
)
.
then
(
res
=>
res
),
_getLabel
:
data
=>
http
.
post
(
'/res/v1/label/page'
,
data
).
then
(
res
=>
res
)
}
api/soil/soil-test.js
View file @
4bde23b7
...
...
@@ -48,7 +48,17 @@ export default {
.
post
(
'soil/v1/experiment/page_allot_by_exp_his'
,
data
)
.
then
(
res
=>
res
),
pageExperimentAllot
:
data
=>
http
.
post
(
'soil/v1/experiment/page_exp_allot'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'soil/v1/experiment/page_exp_allot_bath'
,
data
).
then
(
res
=>
res
),
pageExperimentAllotBath
:
data
=>
https
.
post
(
'soil/v1/experiment/page_exp_allot_bath?page='
+
data
.
page
+
'&rows='
+
data
.
rows
,
JSON
.
stringify
(
data
.
obj
)
)
.
then
(
res
=>
res
),
pageExperimentAllotHis
:
data
=>
http
.
post
(
'soil/v1/experiment/page_exp_allot_his'
,
data
).
then
(
res
=>
res
),
pageTestByExp
:
data
=>
...
...
@@ -178,9 +188,20 @@ export default {
http
.
delete
(
'soil/v1/original_record/?ids='
+
data
).
then
(
res
=>
res
),
expReportPage
:
data
=>
http
.
post
(
'soil/v1/exp_report/page'
,
data
).
then
(
res
=>
res
),
pageExpReportEnd
:
data
=>
http
.
post
(
'soil/v1/exp_report/page_group_exp_report_end'
,
data
)
.
then
(
res
=>
res
),
pageExperimentReport
:
data
=>
http
.
post
(
'soil/v1/exp_report/page'
,
data
).
then
(
res
=>
res
),
deleteReport
:
data
=>
http
.
delete
(
'soil/v1/exp_report/?ids='
+
data
).
then
(
res
=>
res
),
reportPage
:
data
=>
http
.
post
(
'soil/v1/report/page'
,
data
).
then
(
res
=>
res
)
reportPage
:
data
=>
http
.
post
(
'soil/v1/report/page'
,
data
).
then
(
res
=>
res
),
dataGds
:
data
=>
http
.
get
(
'soil/v1/data_gds/'
+
data
).
then
(
res
=>
res
),
gdsGetMainInfo
:
data
=>
http
.
post
(
'soil/v1/data_gds/get_main_info?sampleCode='
+
data
)
.
then
(
res
=>
res
),
dataGdsDetail
:
data
=>
http
.
post
(
'soil/v1/data_gds_detail/page'
,
data
).
then
(
res
=>
res
)
}
nuxt.config.js
View file @
4bde23b7
...
...
@@ -19,7 +19,6 @@ module.exports = {
title
:
'土工试验LIMS'
,
meta
:
[
{
charset
:
'utf-8'
},
{
name
:
'viewport'
,
content
:
'width=device-width, initial-scale=1'
},
{
hid
:
'description'
,
name
:
'description'
,
content
:
pkg
.
description
}
],
script
:
[
...
...
pages/meter-aptitude/standard-manage/SampleItemSelect.vue
View file @
4bde23b7
<!--检测项目编辑列表(添加、导入检测项目)-->
<
template
>
<div>
<Modal
...
...
@@ -13,9 +12,6 @@
<Form-item
class=
"search-item"
label=
"试验名称:"
style=
"margin-left: -25px"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入试验名称"
clearable
/>
</Form-item>
<!--
<Form-item
class=
"search-item"
label=
"检测依据:"
>
-->
<!--
<Input
v-model=
"formObj.code"
placeholder=
"请输入检测依据名称"
clearable
@
on-enter=
"_formSearch"
/>
-->
<!--
</Form-item>
-->
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
...
...
@@ -111,14 +107,6 @@ export default {
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'小类'
,
key
:
'smallType'
,
width
:
140
},
{
title
:
'方法'
,
key
:
'testMethod'
,
width
:
180
}
// { title: '设备', key: 'device', width: 180 },
// { title: '检测依据', key: 'code', width: 180 },
// { title: '检测科室', key: 'groupName', width: 110 },
// { title: '比较符', key: 'compareSymbol', width: 120 },
// { title: '限值', key: 'limitValue' },
// { title: '单位', key: 'unit' },
// { title: '是否系统判定', key: 'judged', width: 120, judged: true },
// { title: '备注', key: 'remark' }
],
catalogueId
:
''
,
getPage
:
{},
...
...
@@ -204,14 +192,6 @@ export default {
}
})
},
// _deleteOk: async function(id) {
// // const result = await drugCatalogueItem.deleteById(id)
// if (result) {
// this.$Message.success('删除成功')
// this._page()
// }
// },
// table结果 返回整行
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
...
...
pages/meter-aptitude/standard-manage/StandardManage.vue
View file @
4bde23b7
...
...
@@ -14,24 +14,6 @@
<Form-item
class=
"search-item"
label=
"检测依据名称:"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.name"
name=
"name"
placeholder=
"请输入检测依据名称"
clearable
/>
</Form-item>
<!--
<Form-item
class=
"search-item"
label=
"标准状态:"
>
-->
<!--
<Select
name=
"status"
placeholder=
"请选择标准状态"
clearable
>
-->
<!--
<Option
v-for=
"item in statusList"
:value=
"item.value"
:key=
"item.name"
>
{{
item
.
name
}}
</Option>
-->
<!--
</Select>
-->
<!--
</Form-item>
-->
<!--
<Form-item
class=
"search-item"
label=
"标准分类:"
>
-->
<!--
<Select
name=
'classify'
placeholder=
"请选择标准分类"
clearable
>
-->
<!--
<Option
v-for=
"item in classifyList"
:value=
"item.value"
:key=
"item.name"
>
{{
item
.
name
}}
</Option>
-->
<!--
</Select>
-->
<!--
</Form-item>
-->
<!--
<Form-item
label=
"标准类型:"
class=
"search-item margin-left-6"
>
-->
<!--
<Select
name=
"type"
placeholder=
"请选择标准类型"
clearable
>
-->
<!--
<Option
v-for=
"item in typeList"
:value=
"item.value"
:key=
"item.value"
>
{{
item
.
name
}}
</Option>
-->
<!--
</Select>
-->
<!--
</Form-item>
-->
<!--
<Form-item
class=
"search-item"
label=
"发布单位:"
>
-->
<!--
<Input
@
on-enter=
"_formSearch"
name=
"publishUnit"
placeholder=
"请输入发布单位"
clearable
/>
-->
<!--
</Form-item>
-->
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
...
...
pages/meter-entrust/entrust-register/EntrustRegister.vue
View file @
4bde23b7
...
...
@@ -38,7 +38,10 @@
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<span
v-else-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<div
v-else-if=
"item.status"
>
<span
v-if=
"scope.row[item.key].display === '委托单评审驳回'"
style=
"color: red;"
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</span>
</div>
<span
v-else-if=
"item.key==='backReasons'"
style=
"color: red"
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
...
...
pages/meter-entrust/entrust-register/SampleItemEdit.vue
View file @
4bde23b7
...
...
@@ -119,11 +119,6 @@ export default {
this
.
selectData
=
[]
console
.
log
(
expList
)
this
.
$refs
.
pageTable
.
_clearSelection
()
// this.formObj.sampleId = id
// this.$refs.pageTable._hideLoading()
// if (catalogueId) {
// this._page()
// }
},
_handleRow
(
scope
)
{
console
.
log
(
scope
)
...
...
@@ -147,7 +142,6 @@ export default {
}
},
_page
:
async
function
()
{
// this.$refs.pageTable._page('search-form-package', 'FoodJudgeBasis/page')
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilEntrust
.
pageItem
(
this
.
$serializeForm
(
this
.
formObj
)
...
...
pages/soil-alone-sample-instock/Instock.vue
View file @
4bde23b7
...
...
@@ -4,11 +4,10 @@
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"100"
inline
>
<Form-item
label=
"库房号"
prop=
"storehouse"
style=
"width: 100%"
>
<Input
v-model=
"formObj.storehouse"
name=
"storehouse"
placeholder=
"请输入库房号"
style=
"width: 95%;"
/>
<span
@
click=
"_storageModel()"
style=
"font-size: 20px;color: #00b5ec"
>
+
</span>
<Form-item
@
click
.
native=
"_storageModel()"
label=
"库房号"
prop=
"storehouse"
style=
"width: 100%"
>
<Input
v-model=
"formObj.storehouse"
name=
"storehouse"
placeholder=
"请输入库房号"
/>
</Form-item>
<Form-item
label=
"架位号"
prop=
"shelfCode"
style=
"width: 100%"
>
<Form-item
@
click
.
native=
"_storageModel()"
label=
"架位号"
prop=
"shelfCode"
style=
"width: 100%"
>
<Input
v-model=
"formObj.shelfCode"
name=
"shelfCode"
placeholder=
"请输入架位号"
/>
</Form-item>
<Form-item
label=
"入库人"
prop=
"inStocker"
style=
"width: 100%"
>
...
...
@@ -99,7 +98,7 @@ export default {
}
],
ruleValidate
:
{
wa
rehouse
:
[
sto
rehouse
:
[
{
required
:
true
,
message
:
'库房号不能为空'
,
trigger
:
'blur'
}
]
},
...
...
pages/soil-exp-report/report-check/SoilExpReportCheckIndex.vue
0 → 100644
View file @
4bde23b7
<
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"
>
<reportMake
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
reportMake
from
'./tabs/ExpReportCheck'
import
historyTask
from
'./tabs/ExpReportCheckHis'
export
default
{
components
:
{
reportMake
,
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/soil-exp-report/report-check/SoilGroupExpReportCheck.vue
0 → 100644
View file @
4bde23b7
<
template
>
<div>
<Modal
v-model=
"showModal"
v-drag
width=
"1050"
class=
"modal-footer-none zIndex-1100"
>
<p
slot=
"header"
>
项目试验项目编制
</p>
<div>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-contract-record"
:label-width=
"70"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"项目名称:"
>
<Input
v-model=
"formObj.expName"
name=
"expName"
placeholder=
"请输入项目名称"
style=
"width: 200px"
clearable
@
on-enter=
"_search"
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_search"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
show-search-btn=
"true"
@
on-result-change=
"_btnClick"
/>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:table-height=
"tableHeight"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
show-check-box
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.key==='status'"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else-if=
"item.key==='ctime'"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM:ss'
):
''
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</Modal>
</div>
</template>
<
script
>
/**
* 操作日志-委托
*/
import
{
meterEntrust
,
soilReport
,
soilStatistics
}
from
'../../../api'
import
Global
from
'../../../api/config'
export
default
{
data
()
{
return
{
showModal
:
false
,
getPage
:
{},
searchOpen
:
false
,
selectIds
:
[],
pageColumns
:
[
{
title
:
'项目名称'
,
key
:
'expName'
},
{
title
:
'检测科室'
,
key
:
'groupName'
},
{
title
:
'状态'
,
key
:
'status'
},
{
title
:
'备注'
,
key
:
'remark'
},
{
title
:
'创建人'
,
key
:
'uname'
},
{
title
:
'创建时间'
,
key
:
'ctime'
,
dateTime
:
true
}
],
btn
:
[{
id
:
''
,
type
:
'primary'
,
name
:
'提交至签发'
}],
iconMsg
:
[
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看项目报告'
}
],
formObj
:
{
entrustId
:
undefined
,
expName
:
undefined
,
groupId
:
undefined
}
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'tableModal'
)
}
},
methods
:
{
_open
(
data
)
{
this
.
showModal
=
true
this
.
formObj
.
entrustId
=
data
.
id
this
.
formObj
.
groupId
=
data
.
groupId
this
.
_page
()
},
_btnClick
(
msg
,
data
)
{
switch
(
msg
)
{
case
'提交至签发'
:
this
.
_submitExpReportCheck
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
_iconClick
(
res
,
data
)
{
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'查看项目报告'
:
this
.
_reportView
(
data
)
// this._recordView(data.originalRecordId)
break
case
'查看试验项目'
:
this
.
_itemView
(
data
.
id
)
break
case
'删除'
:
this
.
_deleteByIds
([
data
.
id
])
break
}
})
},
_reportView
(
data
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
_recordView
(
data
.
originalRecordId
)
}
},
_reportMakeLook
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilReport
.
expReportGetById
(
data
.
id
)
if
(
result
)
{
console
.
log
(
'result'
)
this
.
_viewReport
(
result
)
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
13
,
id
:
data
.
id
,
isReport
:
4
})
}
},
// 查看原始记录
_recordView
(
originalRecordId
)
{
let
recordUrl
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
recordUrl
=
'http://record.patzn.com'
}
else
{
recordUrl
=
Global
.
recordURL
}
// eslint-disable-next-line no-undef
layx
.
iframe
(
'labRecordWriteOriView'
,
'原始记录预览'
,
recordUrl
+
'/print/v1/form/'
+
originalRecordId
+
'?type=ENVTESTMAKE'
,
{
event
:
{
onload
:
{
after
:
function
(
layxWindow
,
winform
)
{
// eslint-disable-next-line no-undef
layx
.
max
(
winform
.
id
)
}
}
}
}
)
},
_submitExpReportCheck
()
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
_submitExpReportCheckConfirm
(
ids
,
`确认要提交
${
ids
.
length
}
条数据吗?`
)
}
},
_submitExpReportCheckConfirm
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
`确定要处理该条数据吗?`
,
onOk
:
()
=>
{
this
.
_submitExpReportCheckOk
(
ids
)
}
})
},
async
_submitExpReportCheckOk
(
ids
)
{
const
result
=
await
soilStatistics
.
expReportCheckSubmit
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功!'
)
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_page
()
this
.
$emit
(
'on-result-change'
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
meterEntrust
.
pageGroupExpReportCheck
(
this
.
formObj
)
console
.
log
(
result
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'changeSize'
:
this
.
_page
()
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
}
},
_search
()
{
this
.
_page
()
}
}
}
</
script
>
pages/soil-exp-report/report-check/tabs/ExpReportCheck.vue
0 → 100644
View file @
4bde23b7
<
template
>
<div>
<Row>
<Form
v-show=
"searchOpen"
id=
"lab-sample-form"
:label-width=
"70"
inline
onsubmit=
"return false"
class=
"search-form"
>
<label
class=
"label-sign"
/>
<Form-item
class=
"search-item"
label=
"委托方:"
>
<Input
name=
"client"
placeholder=
"请输入委托方"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
name=
"entrustCode"
placeholder=
"请输入委托编号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_formSearch"
>
搜索
</Button>
</Form-item>
</Form>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
show-search-btn=
"true"
@
on-result-change=
"_btnClick"
/>
</Col>
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:page-columns=
"pageColumns"
:table-height=
"tableHeight"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
show-check-box
select-data
@
on-result-change=
"_tableResultChange"
>
<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"
@
click
.
stop=
"_handleIndex(scope)"
>
<span
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<div
v-else-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</div>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<fileManage
ref=
"FileManage"
@
on-result-change=
"_fileResult"
/>
<Reason
ref=
"reasonModal"
@
on-result-change=
"_reasonResult"
/>
<SoilGroupExpReportMake
ref=
"soilGroupExpReportMakeModal"
@
on-result-change=
"_page"
/>
<OperationModal
ref=
"operationModal"
/>
</div>
</template>
<
script
>
// eslint-disable-next-line import/named
import
{
soilSample
,
soilStatistics
}
from
'../../../../api'
import
global
from
'../../../../api/config'
import
Reason
from
'../../../../components/base/Reason'
import
OperationModal
from
'../../../../components/operation/Operation'
import
SoilGroupExpReportMake
from
'../../report-check/SoilGroupExpReportCheck'
export
default
{
name
:
'PreparationManage'
,
components
:
{
Reason
,
OperationModal
,
SoilGroupExpReportMake
},
data
()
{
return
{
name
:
''
,
pageColumns
:
[
{
title
:
'委托商'
,
key
:
'client'
,
width
:
200
,
fixed
:
'left'
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
100
},
{
title
:
'项目名称'
,
key
:
'projectName'
,
width
:
120
},
{
title
:
'检测科室'
,
key
:
'groupName'
,
width
:
120
},
{
title
:
'委托日期'
,
key
:
'entrustDate'
,
width
:
100
,
date
:
true
},
{
title
:
'钻孔位置'
,
key
:
'boreholeLocation'
,
width
:
130
},
{
title
:
'钻孔名称'
,
key
:
'boreholeName'
,
width
:
100
},
{
title
:
'水深'
,
key
:
'waterDepth'
,
width
:
100
},
{
title
:
'制表人'
,
key
:
'tabulater'
,
width
:
110
},
{
title
:
'制表日期'
,
key
:
'tabulateDate'
,
width
:
110
,
date
:
true
}
],
btn
:
[
// { id: '', type: 'primary', name: '提交' },
// { id: '', type: 'primary', name: '退回' }
],
getPage
:
{},
searchOpen
:
false
,
currentIndex
:
''
,
selectIds
:
[],
selectData
:
[],
iconMsg
:
[
{
id
:
''
,
type
:
'md-image'
,
name
:
'预览报告'
},
{
id
:
''
,
type
:
'ios-cloud'
,
name
:
'项目报告'
},
{
id
:
''
,
type
:
'ios-cloud'
,
name
:
'附件'
},
{
id
:
''
,
type
:
'ios-clock'
,
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
soilStatistics
.
pageExpReportCheck
(
data
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_clearPage
()
{
$
(
'#lab-sample-form'
)
.
find
(
'input'
)
.
each
(
function
()
{
$
(
this
).
val
(
''
)
})
// this.$refs.sampleTime.handleClear()
},
_btnClick
(
msg
,
data
)
{
switch
(
msg
)
{
case
'提交'
:
this
.
_submitReportIssue
()
break
case
'下载'
:
this
.
_downloadByIds
()
break
case
'退回'
:
this
.
_goBack
()
break
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
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
soilStatistics
.
submitReportCheck
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功!'
)
}
},
_goBack
()
{
// 退回
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
.
reportIssueBack
({
ids
:
this
.
selectIds
,
remark
:
data
})
if
(
result
)
{
this
.
$Message
.
success
(
'退回成功!'
)
await
this
.
_page
()
}
},
_submitReportCheck
()
{
const
data
=
this
.
selectData
if
(
data
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
return
false
}
this
.
_submitByIds
(
this
.
selectIds
,
`确定要提交
${
this
.
selectIds
.
length
}
条数据吗?`
)
},
_submitReportIssue
()
{
const
data
=
this
.
selectData
if
(
data
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
return
false
}
this
.
_submitByIds
(
this
.
selectIds
,
`确定要提交
${
this
.
selectIds
.
length
}
条数据吗?`
)
},
_submitByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
`确定要提交该条数据吗?`
,
onOk
:
()
=>
{
this
.
_submit
(
ids
)
}
})
},
// 接口异步
_submit
:
async
function
(
ids
)
{
if
(
ids
.
length
===
0
)
return
false
const
result
=
await
soilSample
.
reportIssueSubmit
(
ids
)
if
(
result
)
{
this
.
$Message
.
success
(
'提交成功!'
)
this
.
_formSearch
()
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_formSearch
()
},
_createReport
()
{
console
.
log
(
this
.
currentComponent
)
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
createReportModal
.
_open
(
this
.
selectData
)
}
},
_downloadByIds
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
_download
(
this
.
selectIds
,
`确定要下载
${
this
.
selectIds
.
length
}
条数据吗?`
)
}
},
_download
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定要下载报告?'
,
onOk
:
()
=>
{
window
.
open
(
global
.
baseURL
+
'/v1/sample_report/download_report/'
+
ids
,
'_blank'
)
}
})
},
_iconClick
(
name
,
data
)
{
switch
(
name
)
{
case
'提交'
:
this
.
_receiveByIds
(
data
.
id
)
break
case
'附件'
:
this
.
_uploadByIds
(
data
.
id
)
break
case
'预览报告'
:
this
.
_viewReport
(
data
)
break
case
'操作日志'
:
this
.
_record
(
data
.
id
)
break
case
'项目报告'
:
this
.
_expReport
(
data
)
break
}
},
_viewReport
(
data
)
{
this
.
_getObjectKey
(
data
)
},
_record
(
id
)
{
this
.
$refs
.
operationModal
.
_open
(
id
)
},
_expReport
(
data
)
{
this
.
$refs
.
soilGroupExpReportMakeModal
.
_open
(
data
)
},
_getObjectKey
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
getReport
(
data
.
id
)
if
(
result
)
{
this
.
$openWindowModeless
({
objectKey
:
result
.
objectKey
,
id
:
data
.
id
,
isReport
:
4
,
idType
:
11
})
}
},
_uploadByIds
(
id
)
{
this
.
$refs
.
FileManage
.
_open
(
id
,
'entrustId'
)
},
// 文件返回的数据
_fileResult
(
msg
,
data
)
{
switch
(
msg
)
{
case
'file-page'
:
this
.
$refs
.
FileManage
.
_openFile
(
data
)
break
case
'delete-page'
:
this
.
$refs
.
FileManage
.
_delEntrustPage
(
''
,
data
)
break
case
'success'
:
this
.
$Message
.
success
(
'删除成功!'
)
this
.
$refs
.
FileManage
.
_pageEntrust
()
break
default
:
this
.
$refs
.
FileManage
.
_pageEntrust
()
}
},
_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
this
.
selectIds
=
[]
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
this
.
selectIds
.
push
(
this
.
selectData
[
i
].
id
)
}
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
default
:
this
.
_page
()
}
},
_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/soil-exp-report/report-check/tabs/ExpReportCheckHis.vue
0 → 100644
View file @
4bde23b7
<
template
>
<div>
<Row>
<Form
id=
"lab-sample-form-his"
v-show=
"searchOpen"
:label-width=
"70"
inline
onsubmit=
"return false"
class=
"search-form"
>
<label
class=
"label-sign"
/>
<Form-item
class=
"search-item"
label=
"委托方:"
>
<Input
@
on-enter=
"_formSearch"
name=
"client"
placeholder=
"请输入委托方"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
@
on-enter=
"_formSearch"
name=
"entrustCode"
placeholder=
"请输入委托编号"
clearable
/>
</Form-item>
<!--
<Form-item
class=
"search-item"
label=
"报检时间:"
>
-->
<!--
<Date-picker-->
<!-- ref="sampleTime"-->
<!-- type="datetimerange"-->
<!-- 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
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
@
on-result-change=
"_btnClick"
style=
"height: 30px;"
show-search-btn=
"true"
/>
</Col>
<!--
<Button
type=
"primary"
@
click=
"_submitReportCheck"
>
-->
<!-- 提交-->
<!--
</Button>
-->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
select-data
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:min-width=
"100"
:width=
"item.width"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<a
@
click
.
stop=
"_detailModal(scope.row.id,scope.row.type)"
v-if=
"item.detail"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<div
v-else-if=
"item.type"
>
{{
scope
.
row
[
item
.
key
]?
'政府'
:
'企业'
}}
</div>
<div
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-else-if=
"item.key==='havePhoto'"
>
{{
scope
.
row
[
item
.
key
]
===
1
?
'是'
:
scope
.
row
[
item
.
key
]
===
0
?
'否'
:
''
}}
</div>
<div
v-else-if=
"item.status"
>
<span
v-if=
"scope.row[item.key].display === '报告审核退回'||'报告签发退回' ===scope.row[item.key].display "
style=
"color: red;"
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</span>
</div>
<div
v-else-if=
"item.judge"
>
{{
Number
(
scope
.
row
[
item
.
key
])
===
0
?
'否'
:
'是'
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<fileManage
ref=
"FileManage"
@
on-result-change=
"_fileResult"
/>
<OperationModal
ref=
"operationModal"
/>
</div>
</template>
<
script
>
// eslint-disable-next-line import/named
import
{
soilReport
,
soilStatistics
}
from
'../../../../api'
import
global
from
'../../../../api/config'
import
OperationModal
from
'../../../../components/operation/Operation'
export
default
{
name
:
'PreparationManage'
,
components
:
{
OperationModal
},
data
()
{
return
{
name
:
''
,
pageColumns
:
[
{
title
:
'委托商'
,
key
:
'client'
,
width
:
100
,
fixed
:
'left'
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
100
},
{
title
:
'报告编号'
,
key
:
'reportCode'
,
width
:
100
},
{
title
:
'进度'
,
key
:
'progress'
,
width
:
110
,
status
:
true
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
100
,
status
:
true
},
{
title
:
'委托日期'
,
key
:
'entrustDate'
,
width
:
100
,
date
:
true
},
{
title
:
'钻孔位置'
,
key
:
'boreholeLocation'
,
width
:
100
},
{
title
:
'钻孔名称'
,
key
:
'boreholeName'
,
width
:
100
},
{
title
:
'水深'
,
key
:
'waterDepth'
,
width
:
100
},
{
title
:
'制表人'
,
key
:
'tabulater'
,
width
:
110
},
{
title
:
'制表日期'
,
key
:
'tabulateDate'
,
width
:
110
,
date
:
true
}
],
btn
:
[
// { id: 'env-report-make-submit', type: 'primary', name: '提交' },
// { id: '', type: 'primary', name: '生成' },
],
getPage
:
{},
searchOpen
:
false
,
currentIndex
:
''
,
selectIds
:
[],
selectData
:
[],
iconMsg
:
[
{
id
:
''
,
type
:
'pt-a-view'
,
name
:
'预览报告'
},
// { id: '', type: 'pt-a-view', name: '预览PDF' },
{
id
:
''
,
type
:
'pt-a-cloud'
,
name
:
'附件'
},
{
id
:
''
,
type
:
'pt-a-clock'
,
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-his'
)
Object
.
assign
(
data
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilReport
.
pageReportIssueHis
(
data
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_clearPage
()
{
$
(
'#lab-sample-form-his'
)
.
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
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
soilStatistics
.
submitReportCheck
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功!'
)
}
},
_submitReportCheck
()
{
const
data
=
this
.
selectData
if
(
data
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
return
false
}
this
.
_submitByIds
(
this
.
selectIds
,
`确定要提交
${
this
.
selectIds
.
length
}
条数据吗?`
)
},
_submitByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
`确定要提交该条数据吗?`
,
onOk
:
()
=>
{
this
.
_submit
(
ids
)
}
})
},
// 接口异步
_submit
:
async
function
(
ids
)
{
if
(
ids
.
length
===
0
)
return
false
const
result
=
await
soilStatistics
.
submitEntrustReportCheck
(
ids
)
if
(
result
)
{
this
.
$Message
.
success
(
'提交成功!'
)
this
.
_formSearch
()
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_formSearch
()
},
_createReport
()
{
console
.
log
(
this
.
currentComponent
)
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
createReportModal
.
_open
(
this
.
selectData
)
}
},
_downloadByIds
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
_download
(
this
.
selectIds
,
`确定要下载
${
this
.
selectIds
.
length
}
条数据吗?`
)
}
},
_download
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定要下载报告?'
,
onOk
:
()
=>
{
window
.
open
(
global
.
baseURL
+
'/v1/sample_report/download_report/'
+
ids
,
'_blank'
)
}
})
},
_iconClick
(
name
,
data
)
{
switch
(
name
)
{
case
'提交'
:
this
.
_receiveByIds
(
data
.
id
)
break
case
'附件'
:
this
.
_uploadByIds
(
data
.
id
)
break
case
'预览报告'
:
this
.
_viewReport
(
data
)
break
case
'预览PDF'
:
this
.
_viewPDF
(
data
)
break
case
'操作日志'
:
this
.
_record
(
data
.
id
)
break
}
},
// 没有生成pdf先生成在预览
_viewPDF
(
data
)
{
console
.
log
(
data
)
if
(
data
.
pdfObjectKey
)
{
this
.
$pdfView
(
data
.
pdfObjectKey
)
}
else
{
console
.
log
(
123456
)
// window.open(
// 'http://api.pertest.patzn.com/food/v1/sample_report/generate_pdf_auto?id=' +
// data.id
// )
// this.autoPdf(data)
// window.open(
// global.baseURL +
// '/food/v1/sample_report/generate_pdf_auto?id=' +
// data.id
// )
}
},
_viewReport
(
data
)
{
this
.
_getObjectKey
(
data
)
},
_record
(
id
)
{
this
.
$refs
.
operationModal
.
_open
(
id
)
},
_getObjectKey
:
async
function
(
data
)
{
const
result
=
await
soilStatistics
.
getObjectKey
(
data
.
id
)
if
(
result
)
{
this
.
$openWindowModeless
({
objectKey
:
result
,
id
:
data
.
id
,
isReport
:
0
})
}
},
_uploadByIds
(
id
)
{
this
.
$refs
.
FileManage
.
_open
(
id
,
'entrustId'
)
},
// 文件返回的数据
_fileResult
(
msg
,
data
)
{
switch
(
msg
)
{
case
'file-page'
:
this
.
$refs
.
FileManage
.
_openFile
(
data
)
break
case
'delete-page'
:
this
.
$refs
.
FileManage
.
_delEntrustPage
(
''
,
data
)
break
case
'success'
:
this
.
$Message
.
success
(
'删除成功!'
)
this
.
$refs
.
FileManage
.
_pageEntrust
()
break
default
:
this
.
$refs
.
FileManage
.
_pageEntrust
()
}
},
_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
this
.
selectIds
=
[]
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
this
.
selectIds
.
push
(
this
.
selectData
[
i
].
id
)
}
break
default
:
this
.
_page
()
}
},
_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/soil-exp-report/report-end/SoilExpReportEndIndex.vue
0 → 100644
View file @
4bde23b7
<
template
>
<div>
<Row>
<Form
v-show=
"searchOpen"
id=
"lab-sample-form"
:label-width=
"70"
inline
onsubmit=
"return false"
class=
"search-form"
>
<label
class=
"label-sign"
/>
<Form-item
class=
"search-item"
label=
"委托方:"
>
<Input
name=
"client"
placeholder=
"请输入委托方"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
name=
"entrustCode"
placeholder=
"请输入委托编号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_formSearch"
>
搜索
</Button>
</Form-item>
</Form>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
show-search-btn=
"true"
@
on-result-change=
"_btnClick"
/>
</Col>
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:page-columns=
"pageColumns"
:table-height=
"tableHeight"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
show-check-box
select-data
@
on-result-change=
"_tableResultChange"
>
<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"
@
click
.
stop=
"_handleIndex(scope)"
>
<span
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<div
v-else-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</div>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<fileManage
ref=
"FileManage"
@
on-result-change=
"_fileResult"
/>
<Reason
ref=
"reasonModal"
@
on-result-change=
"_reasonResult"
/>
<SoilGroupExpReportMake
ref=
"soilGroupExpReportMakeModal"
@
on-result-change=
"_page"
/>
<OperationModal
ref=
"operationModal"
/>
</div>
</template>
<
script
>
// eslint-disable-next-line import/named
import
{
soilSample
,
soilStatistics
}
from
'../../../api'
import
global
from
'../../../api/config'
import
Reason
from
'../../../components/base/Reason'
import
OperationModal
from
'../../../components/operation/Operation'
import
SoilGroupExpReportMake
from
'./SoilGroupExpReportEnd'
export
default
{
name
:
'PreparationManage'
,
components
:
{
Reason
,
OperationModal
,
SoilGroupExpReportMake
},
data
()
{
return
{
name
:
''
,
pageColumns
:
[
{
title
:
'委托商'
,
key
:
'client'
,
width
:
200
,
fixed
:
'left'
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
100
},
{
title
:
'项目名称'
,
key
:
'projectName'
,
width
:
120
},
{
title
:
'检测科室'
,
key
:
'groupName'
,
width
:
120
},
{
title
:
'委托日期'
,
key
:
'entrustDate'
,
width
:
100
,
date
:
true
},
{
title
:
'钻孔位置'
,
key
:
'boreholeLocation'
,
width
:
130
},
{
title
:
'钻孔名称'
,
key
:
'boreholeName'
,
width
:
100
},
{
title
:
'水深'
,
key
:
'waterDepth'
,
width
:
100
},
{
title
:
'制表人'
,
key
:
'tabulater'
,
width
:
110
},
{
title
:
'制表日期'
,
key
:
'tabulateDate'
,
width
:
110
,
date
:
true
}
],
btn
:
[
// { id: '', type: 'primary', name: '提交' },
// { id: '', type: 'primary', name: '退回' }
],
getPage
:
{},
searchOpen
:
true
,
currentIndex
:
''
,
selectIds
:
[],
selectData
:
[],
iconMsg
:
[
{
id
:
''
,
type
:
'md-image'
,
name
:
'预览报告'
},
{
id
:
''
,
type
:
'ios-cloud'
,
name
:
'项目报告'
},
{
id
:
''
,
type
:
'ios-cloud'
,
name
:
'附件'
},
{
id
:
''
,
type
:
'ios-clock'
,
name
:
'操作日志'
}
]
}
},
computed
:
{
tableHeight
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'tabSearch'
)
}
else
{
return
this
.
$tableHeight
(
'tabNoSearch'
)
}
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
async
_page
()
{
const
data
=
this
.
$serialize
(
'lab-sample-form'
)
Object
.
assign
(
data
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilStatistics
.
pageExpReportEnd
(
data
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_clearPage
()
{
$
(
'#lab-sample-form'
)
.
find
(
'input'
)
.
each
(
function
()
{
$
(
this
).
val
(
''
)
})
// this.$refs.sampleTime.handleClear()
},
_btnClick
(
msg
,
data
)
{
switch
(
msg
)
{
case
'提交'
:
this
.
_submitReportIssue
()
break
case
'下载'
:
this
.
_downloadByIds
()
break
case
'退回'
:
this
.
_goBack
()
break
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
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
soilStatistics
.
submitReportCheck
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功!'
)
}
},
_goBack
()
{
// 退回
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
.
reportIssueBack
({
ids
:
this
.
selectIds
,
remark
:
data
})
if
(
result
)
{
this
.
$Message
.
success
(
'退回成功!'
)
await
this
.
_page
()
}
},
_submitReportCheck
()
{
const
data
=
this
.
selectData
if
(
data
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
return
false
}
this
.
_submitByIds
(
this
.
selectIds
,
`确定要提交
${
this
.
selectIds
.
length
}
条数据吗?`
)
},
_submitReportIssue
()
{
const
data
=
this
.
selectData
if
(
data
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
return
false
}
this
.
_submitByIds
(
this
.
selectIds
,
`确定要提交
${
this
.
selectIds
.
length
}
条数据吗?`
)
},
_submitByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
`确定要提交该条数据吗?`
,
onOk
:
()
=>
{
this
.
_submit
(
ids
)
}
})
},
// 接口异步
_submit
:
async
function
(
ids
)
{
if
(
ids
.
length
===
0
)
return
false
const
result
=
await
soilSample
.
reportIssueSubmit
(
ids
)
if
(
result
)
{
this
.
$Message
.
success
(
'提交成功!'
)
this
.
_formSearch
()
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_formSearch
()
},
_createReport
()
{
console
.
log
(
this
.
currentComponent
)
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
createReportModal
.
_open
(
this
.
selectData
)
}
},
_downloadByIds
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
_download
(
this
.
selectIds
,
`确定要下载
${
this
.
selectIds
.
length
}
条数据吗?`
)
}
},
_download
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定要下载报告?'
,
onOk
:
()
=>
{
window
.
open
(
global
.
baseURL
+
'/v1/sample_report/download_report/'
+
ids
,
'_blank'
)
}
})
},
_iconClick
(
name
,
data
)
{
switch
(
name
)
{
case
'提交'
:
this
.
_receiveByIds
(
data
.
id
)
break
case
'附件'
:
this
.
_uploadByIds
(
data
.
id
)
break
case
'预览报告'
:
this
.
_viewReport
(
data
)
break
case
'操作日志'
:
this
.
_record
(
data
.
id
)
break
case
'项目报告'
:
this
.
_expReport
(
data
)
break
}
},
_viewReport
(
data
)
{
this
.
_getObjectKey
(
data
)
},
_record
(
id
)
{
this
.
$refs
.
operationModal
.
_open
(
id
)
},
_expReport
(
data
)
{
this
.
$refs
.
soilGroupExpReportMakeModal
.
_open
(
data
)
},
_getObjectKey
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
getReport
(
data
.
id
)
if
(
result
)
{
this
.
$openWindowModeless
({
objectKey
:
result
.
objectKey
,
id
:
data
.
id
,
isReport
:
4
,
idType
:
11
})
}
},
_uploadByIds
(
id
)
{
this
.
$refs
.
FileManage
.
_open
(
id
,
'entrustId'
)
},
// 文件返回的数据
_fileResult
(
msg
,
data
)
{
switch
(
msg
)
{
case
'file-page'
:
this
.
$refs
.
FileManage
.
_openFile
(
data
)
break
case
'delete-page'
:
this
.
$refs
.
FileManage
.
_delEntrustPage
(
''
,
data
)
break
case
'success'
:
this
.
$Message
.
success
(
'删除成功!'
)
this
.
$refs
.
FileManage
.
_pageEntrust
()
break
default
:
this
.
$refs
.
FileManage
.
_pageEntrust
()
}
},
_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
this
.
selectIds
=
[]
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
this
.
selectIds
.
push
(
this
.
selectData
[
i
].
id
)
}
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
default
:
this
.
_page
()
}
},
_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/soil-exp-report/report-end/SoilGroupExpReportEnd.vue
0 → 100644
View file @
4bde23b7
<
template
>
<div>
<Modal
v-model=
"showModal"
v-drag
width=
"1050"
class=
"modal-footer-none zIndex-1100"
>
<p
slot=
"header"
>
项目试验报告
</p>
<div>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-contract-record"
:label-width=
"70"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"项目名称:"
>
<Input
v-model=
"formObj.expName"
name=
"expName"
placeholder=
"请输入项目名称"
style=
"width: 200px"
clearable
@
on-enter=
"_search"
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_search"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
show-search-btn=
"true"
@
on-result-change=
"_btnClick"
/>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:table-height=
"tableHeight"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
show-check-box
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.key==='status'"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else-if=
"item.key==='ctime'"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM:ss'
):
''
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</Modal>
</div>
</template>
<
script
>
/**
* 操作日志-委托
*/
import
{
meterEntrust
,
soilReport
,
soilStatistics
}
from
'../../../api'
import
Global
from
'../../../api/config'
export
default
{
data
()
{
return
{
showModal
:
false
,
getPage
:
{},
searchOpen
:
false
,
selectIds
:
[],
pageColumns
:
[
{
title
:
'项目名称'
,
key
:
'expName'
},
{
title
:
'检测科室'
,
key
:
'groupName'
},
{
title
:
'状态'
,
key
:
'status'
},
{
title
:
'备注'
,
key
:
'remark'
},
{
title
:
'创建人'
,
key
:
'uname'
},
{
title
:
'创建时间'
,
key
:
'ctime'
,
dateTime
:
true
}
],
btn
:
[],
iconMsg
:
[
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看项目报告'
}
],
formObj
:
{
entrustId
:
undefined
,
expName
:
undefined
,
groupId
:
undefined
}
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'tableModal'
)
}
},
methods
:
{
_open
(
data
)
{
this
.
showModal
=
true
this
.
formObj
.
entrustId
=
data
.
id
this
.
formObj
.
groupId
=
data
.
groupId
this
.
_page
()
},
_btnClick
(
msg
,
data
)
{
switch
(
msg
)
{
case
'通过'
:
this
.
_submitExpReportIssue
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
_iconClick
(
res
,
data
)
{
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'查看项目报告'
:
this
.
_reportView
(
data
)
// this._recordView(data.originalRecordId)
break
case
'查看试验项目'
:
this
.
_itemView
(
data
.
id
)
break
case
'删除'
:
this
.
_deleteByIds
([
data
.
id
])
break
}
})
},
_reportView
(
data
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
_recordView
(
data
.
originalRecordId
)
}
},
_reportMakeLook
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilReport
.
expReportGetById
(
data
.
id
)
if
(
result
)
{
console
.
log
(
'result'
)
this
.
_viewReport
(
result
)
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
13
,
id
:
data
.
id
,
isReport
:
4
})
}
},
// 查看原始记录
_recordView
(
originalRecordId
)
{
let
recordUrl
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
recordUrl
=
'http://record.patzn.com'
}
else
{
recordUrl
=
Global
.
recordURL
}
// eslint-disable-next-line no-undef
layx
.
iframe
(
'labRecordWriteOriView'
,
'原始记录预览'
,
recordUrl
+
'/print/v1/form/'
+
originalRecordId
+
'?type=ENVTESTMAKE'
,
{
event
:
{
onload
:
{
after
:
function
(
layxWindow
,
winform
)
{
// eslint-disable-next-line no-undef
layx
.
max
(
winform
.
id
)
}
}
}
}
)
},
_submitExpReportIssue
()
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
_submitExpReportIssueConfirm
(
ids
,
`确认要提交
${
ids
.
length
}
条数据吗?`
)
}
},
_submitExpReportIssueConfirm
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
`确定要处理该条数据吗?`
,
onOk
:
()
=>
{
this
.
__submitExpReportIssueOk
(
ids
)
}
})
},
async
__submitExpReportIssueOk
(
ids
)
{
const
result
=
await
soilStatistics
.
expReportIssueSubmit
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功!'
)
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_page
()
this
.
$emit
(
'on-result-change'
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
meterEntrust
.
pageGroupExpReportEnd
(
this
.
formObj
)
console
.
log
(
result
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'changeSize'
:
this
.
_page
()
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
}
},
_search
()
{
this
.
_page
()
}
}
}
</
script
>
pages/soil-exp-report/report-issue/SoilExpReportIssueIndex.vue
0 → 100644
View file @
4bde23b7
<
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"
>
<reportMake
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
reportMake
from
'./tabs/ExpReportIssue'
import
historyTask
from
'./tabs/ExpReportIssueHis'
export
default
{
components
:
{
reportMake
,
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/soil-exp-report/report-issue/SoilGroupExpReportIssue.vue
0 → 100644
View file @
4bde23b7
<
template
>
<div>
<Modal
v-model=
"showModal"
v-drag
width=
"1050"
class=
"modal-footer-none zIndex-1100"
>
<p
slot=
"header"
>
项目试验报告签发
</p>
<div>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-contract-record"
:label-width=
"70"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"项目名称:"
>
<Input
v-model=
"formObj.expName"
name=
"expName"
placeholder=
"请输入项目名称"
style=
"width: 200px"
clearable
@
on-enter=
"_search"
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_search"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
show-search-btn=
"true"
@
on-result-change=
"_btnClick"
/>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:table-height=
"tableHeight"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
show-check-box
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.key==='status'"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else-if=
"item.key==='ctime'"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM:ss'
):
''
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</Modal>
</div>
</template>
<
script
>
/**
* 操作日志-委托
*/
import
{
meterEntrust
,
soilReport
,
soilStatistics
}
from
'../../../api'
import
Global
from
'../../../api/config'
export
default
{
data
()
{
return
{
showModal
:
false
,
getPage
:
{},
searchOpen
:
false
,
selectIds
:
[],
pageColumns
:
[
{
title
:
'项目名称'
,
key
:
'expName'
},
{
title
:
'检测科室'
,
key
:
'groupName'
},
{
title
:
'状态'
,
key
:
'status'
},
{
title
:
'备注'
,
key
:
'remark'
},
{
title
:
'创建人'
,
key
:
'uname'
},
{
title
:
'创建时间'
,
key
:
'ctime'
,
dateTime
:
true
}
],
btn
:
[{
id
:
''
,
type
:
'primary'
,
name
:
'通过'
}],
iconMsg
:
[
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看项目报告'
}
],
formObj
:
{
entrustId
:
undefined
,
expName
:
undefined
,
groupId
:
undefined
}
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'tableModal'
)
}
},
methods
:
{
_open
(
data
)
{
this
.
showModal
=
true
this
.
formObj
.
entrustId
=
data
.
id
this
.
formObj
.
groupId
=
data
.
groupId
this
.
_page
()
},
_btnClick
(
msg
,
data
)
{
switch
(
msg
)
{
case
'通过'
:
this
.
_submitExpReportIssue
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
_iconClick
(
res
,
data
)
{
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'查看项目报告'
:
this
.
_reportView
(
data
)
// this._recordView(data.originalRecordId)
break
case
'查看试验项目'
:
this
.
_itemView
(
data
.
id
)
break
case
'删除'
:
this
.
_deleteByIds
([
data
.
id
])
break
}
})
},
_reportView
(
data
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
_recordView
(
data
.
originalRecordId
)
}
},
_reportMakeLook
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilReport
.
expReportGetById
(
data
.
id
)
if
(
result
)
{
console
.
log
(
'result'
)
this
.
_viewReport
(
result
)
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
13
,
id
:
data
.
id
,
isReport
:
4
})
}
},
// 查看原始记录
_recordView
(
originalRecordId
)
{
let
recordUrl
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
recordUrl
=
'http://record.patzn.com'
}
else
{
recordUrl
=
Global
.
recordURL
}
// eslint-disable-next-line no-undef
layx
.
iframe
(
'labRecordWriteOriView'
,
'原始记录预览'
,
recordUrl
+
'/print/v1/form/'
+
originalRecordId
+
'?type=ENVTESTMAKE'
,
{
event
:
{
onload
:
{
after
:
function
(
layxWindow
,
winform
)
{
// eslint-disable-next-line no-undef
layx
.
max
(
winform
.
id
)
}
}
}
}
)
},
_submitExpReportIssue
()
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
_submitExpReportIssueConfirm
(
ids
,
`确认要提交
${
ids
.
length
}
条数据吗?`
)
}
},
_submitExpReportIssueConfirm
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
`确定要处理该条数据吗?`
,
onOk
:
()
=>
{
this
.
__submitExpReportIssueOk
(
ids
)
}
})
},
async
__submitExpReportIssueOk
(
ids
)
{
const
result
=
await
soilStatistics
.
expReportIssueSubmit
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功!'
)
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_page
()
this
.
$emit
(
'on-result-change'
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
meterEntrust
.
pageGroupExpReportIssue
(
this
.
formObj
)
console
.
log
(
result
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'changeSize'
:
this
.
_page
()
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
}
},
_search
()
{
this
.
_page
()
}
}
}
</
script
>
pages/soil-exp-report/report-issue/tabs/ExpReportIssue.vue
0 → 100644
View file @
4bde23b7
<
template
>
<div>
<Row>
<Form
v-show=
"searchOpen"
id=
"lab-sample-form"
:label-width=
"70"
inline
onsubmit=
"return false"
class=
"search-form"
>
<label
class=
"label-sign"
/>
<Form-item
class=
"search-item"
label=
"委托方:"
>
<Input
name=
"client"
placeholder=
"请输入委托方"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
name=
"entrustCode"
placeholder=
"请输入委托编号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_formSearch"
>
搜索
</Button>
</Form-item>
</Form>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
show-search-btn=
"true"
@
on-result-change=
"_btnClick"
/>
</Col>
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:page-columns=
"pageColumns"
:table-height=
"tableHeight"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
show-check-box
select-data
@
on-result-change=
"_tableResultChange"
>
<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"
@
click
.
stop=
"_handleIndex(scope)"
>
<span
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<div
v-else-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</div>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<fileManage
ref=
"FileManage"
@
on-result-change=
"_fileResult"
/>
<Reason
ref=
"reasonModal"
@
on-result-change=
"_reasonResult"
/>
<SoilGroupExpReportMake
ref=
"soilGroupExpReportMakeModal"
@
on-result-change=
"_page"
/>
<OperationModal
ref=
"operationModal"
/>
</div>
</template>
<
script
>
// eslint-disable-next-line import/named
import
{
soilSample
,
soilStatistics
}
from
'../../../../api'
import
global
from
'../../../../api/config'
import
Reason
from
'../../../../components/base/Reason'
import
OperationModal
from
'../../../../components/operation/Operation'
import
SoilGroupExpReportMake
from
'../../report-issue/SoilGroupExpReportIssue'
export
default
{
name
:
'PreparationManage'
,
components
:
{
Reason
,
OperationModal
,
SoilGroupExpReportMake
},
data
()
{
return
{
name
:
''
,
pageColumns
:
[
{
title
:
'委托商'
,
key
:
'client'
,
width
:
200
,
fixed
:
'left'
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
100
},
{
title
:
'项目名称'
,
key
:
'projectName'
,
width
:
120
},
{
title
:
'检测科室'
,
key
:
'groupName'
,
width
:
120
},
{
title
:
'委托日期'
,
key
:
'entrustDate'
,
width
:
100
,
date
:
true
},
{
title
:
'钻孔位置'
,
key
:
'boreholeLocation'
,
width
:
130
},
{
title
:
'钻孔名称'
,
key
:
'boreholeName'
,
width
:
100
},
{
title
:
'水深'
,
key
:
'waterDepth'
,
width
:
100
},
{
title
:
'制表人'
,
key
:
'tabulater'
,
width
:
110
},
{
title
:
'制表日期'
,
key
:
'tabulateDate'
,
width
:
110
,
date
:
true
}
],
btn
:
[
// { id: '', type: 'primary', name: '提交' },
// { id: '', type: 'primary', name: '退回' }
],
getPage
:
{},
searchOpen
:
false
,
currentIndex
:
''
,
selectIds
:
[],
selectData
:
[],
iconMsg
:
[
{
id
:
''
,
type
:
'md-image'
,
name
:
'预览报告'
},
{
id
:
''
,
type
:
'ios-cloud'
,
name
:
'项目报告'
},
{
id
:
''
,
type
:
'ios-cloud'
,
name
:
'附件'
},
{
id
:
''
,
type
:
'ios-clock'
,
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
soilStatistics
.
pageExpReportIssue
(
data
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_clearPage
()
{
$
(
'#lab-sample-form'
)
.
find
(
'input'
)
.
each
(
function
()
{
$
(
this
).
val
(
''
)
})
// this.$refs.sampleTime.handleClear()
},
_btnClick
(
msg
,
data
)
{
switch
(
msg
)
{
case
'提交'
:
this
.
_submitReportIssue
()
break
case
'下载'
:
this
.
_downloadByIds
()
break
case
'退回'
:
this
.
_goBack
()
break
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
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
soilStatistics
.
submitReportCheck
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功!'
)
}
},
_goBack
()
{
// 退回
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
.
reportIssueBack
({
ids
:
this
.
selectIds
,
remark
:
data
})
if
(
result
)
{
this
.
$Message
.
success
(
'退回成功!'
)
await
this
.
_page
()
}
},
_submitReportCheck
()
{
const
data
=
this
.
selectData
if
(
data
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
return
false
}
this
.
_submitByIds
(
this
.
selectIds
,
`确定要提交
${
this
.
selectIds
.
length
}
条数据吗?`
)
},
_submitReportIssue
()
{
const
data
=
this
.
selectData
if
(
data
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
return
false
}
this
.
_submitByIds
(
this
.
selectIds
,
`确定要提交
${
this
.
selectIds
.
length
}
条数据吗?`
)
},
_submitByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
`确定要提交该条数据吗?`
,
onOk
:
()
=>
{
this
.
_submit
(
ids
)
}
})
},
// 接口异步
_submit
:
async
function
(
ids
)
{
if
(
ids
.
length
===
0
)
return
false
const
result
=
await
soilSample
.
reportIssueSubmit
(
ids
)
if
(
result
)
{
this
.
$Message
.
success
(
'提交成功!'
)
this
.
_formSearch
()
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_formSearch
()
},
_createReport
()
{
console
.
log
(
this
.
currentComponent
)
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
createReportModal
.
_open
(
this
.
selectData
)
}
},
_downloadByIds
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
_download
(
this
.
selectIds
,
`确定要下载
${
this
.
selectIds
.
length
}
条数据吗?`
)
}
},
_download
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定要下载报告?'
,
onOk
:
()
=>
{
window
.
open
(
global
.
baseURL
+
'/v1/sample_report/download_report/'
+
ids
,
'_blank'
)
}
})
},
_iconClick
(
name
,
data
)
{
switch
(
name
)
{
case
'提交'
:
this
.
_receiveByIds
(
data
.
id
)
break
case
'附件'
:
this
.
_uploadByIds
(
data
.
id
)
break
case
'预览报告'
:
this
.
_viewReport
(
data
)
break
case
'操作日志'
:
this
.
_record
(
data
.
id
)
break
case
'项目报告'
:
this
.
_expReport
(
data
)
break
}
},
_viewReport
(
data
)
{
this
.
_getObjectKey
(
data
)
},
_record
(
id
)
{
this
.
$refs
.
operationModal
.
_open
(
id
)
},
_expReport
(
data
)
{
this
.
$refs
.
soilGroupExpReportMakeModal
.
_open
(
data
)
},
_getObjectKey
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
getReport
(
data
.
id
)
if
(
result
)
{
this
.
$openWindowModeless
({
objectKey
:
result
.
objectKey
,
id
:
data
.
id
,
isReport
:
4
,
idType
:
11
})
}
},
_uploadByIds
(
id
)
{
this
.
$refs
.
FileManage
.
_open
(
id
,
'entrustId'
)
},
// 文件返回的数据
_fileResult
(
msg
,
data
)
{
switch
(
msg
)
{
case
'file-page'
:
this
.
$refs
.
FileManage
.
_openFile
(
data
)
break
case
'delete-page'
:
this
.
$refs
.
FileManage
.
_delEntrustPage
(
''
,
data
)
break
case
'success'
:
this
.
$Message
.
success
(
'删除成功!'
)
this
.
$refs
.
FileManage
.
_pageEntrust
()
break
default
:
this
.
$refs
.
FileManage
.
_pageEntrust
()
}
},
_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
this
.
selectIds
=
[]
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
this
.
selectIds
.
push
(
this
.
selectData
[
i
].
id
)
}
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
default
:
this
.
_page
()
}
},
_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/soil-exp-report/report-issue/tabs/ExpReportIssueHis.vue
0 → 100644
View file @
4bde23b7
<
template
>
<div>
<Row>
<Form
id=
"lab-sample-form-his"
v-show=
"searchOpen"
:label-width=
"70"
inline
onsubmit=
"return false"
class=
"search-form"
>
<label
class=
"label-sign"
/>
<Form-item
class=
"search-item"
label=
"委托方:"
>
<Input
@
on-enter=
"_formSearch"
name=
"client"
placeholder=
"请输入委托方"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
@
on-enter=
"_formSearch"
name=
"entrustCode"
placeholder=
"请输入委托编号"
clearable
/>
</Form-item>
<!--
<Form-item
class=
"search-item"
label=
"报检时间:"
>
-->
<!--
<Date-picker-->
<!-- ref="sampleTime"-->
<!-- type="datetimerange"-->
<!-- 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
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
@
on-result-change=
"_btnClick"
style=
"height: 30px;"
show-search-btn=
"true"
/>
</Col>
<!--
<Button
type=
"primary"
@
click=
"_submitReportCheck"
>
-->
<!-- 提交-->
<!--
</Button>
-->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
select-data
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:min-width=
"100"
:width=
"item.width"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<a
@
click
.
stop=
"_detailModal(scope.row.id,scope.row.type)"
v-if=
"item.detail"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<div
v-else-if=
"item.type"
>
{{
scope
.
row
[
item
.
key
]?
'政府'
:
'企业'
}}
</div>
<div
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-else-if=
"item.key==='havePhoto'"
>
{{
scope
.
row
[
item
.
key
]
===
1
?
'是'
:
scope
.
row
[
item
.
key
]
===
0
?
'否'
:
''
}}
</div>
<div
v-else-if=
"item.status"
>
<span
v-if=
"scope.row[item.key].display === '报告审核退回'||'报告签发退回' ===scope.row[item.key].display "
style=
"color: red;"
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</span>
</div>
<div
v-else-if=
"item.judge"
>
{{
Number
(
scope
.
row
[
item
.
key
])
===
0
?
'否'
:
'是'
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<fileManage
ref=
"FileManage"
@
on-result-change=
"_fileResult"
/>
<OperationModal
ref=
"operationModal"
/>
</div>
</template>
<
script
>
// eslint-disable-next-line import/named
import
{
soilReport
,
soilStatistics
}
from
'../../../../api'
import
global
from
'../../../../api/config'
import
OperationModal
from
'../../../../components/operation/Operation'
export
default
{
name
:
'PreparationManage'
,
components
:
{
OperationModal
},
data
()
{
return
{
name
:
''
,
pageColumns
:
[
{
title
:
'委托商'
,
key
:
'client'
,
width
:
100
,
fixed
:
'left'
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
100
},
{
title
:
'报告编号'
,
key
:
'reportCode'
,
width
:
100
},
{
title
:
'进度'
,
key
:
'progress'
,
width
:
110
,
status
:
true
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
100
,
status
:
true
},
{
title
:
'委托日期'
,
key
:
'entrustDate'
,
width
:
100
,
date
:
true
},
{
title
:
'钻孔位置'
,
key
:
'boreholeLocation'
,
width
:
100
},
{
title
:
'钻孔名称'
,
key
:
'boreholeName'
,
width
:
100
},
{
title
:
'水深'
,
key
:
'waterDepth'
,
width
:
100
},
{
title
:
'制表人'
,
key
:
'tabulater'
,
width
:
110
},
{
title
:
'制表日期'
,
key
:
'tabulateDate'
,
width
:
110
,
date
:
true
}
],
btn
:
[
// { id: 'env-report-make-submit', type: 'primary', name: '提交' },
// { id: '', type: 'primary', name: '生成' },
],
getPage
:
{},
searchOpen
:
false
,
currentIndex
:
''
,
selectIds
:
[],
selectData
:
[],
iconMsg
:
[
{
id
:
''
,
type
:
'pt-a-view'
,
name
:
'预览报告'
},
// { id: '', type: 'pt-a-view', name: '预览PDF' },
{
id
:
''
,
type
:
'pt-a-cloud'
,
name
:
'附件'
},
{
id
:
''
,
type
:
'pt-a-clock'
,
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-his'
)
Object
.
assign
(
data
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilReport
.
pageReportIssueHis
(
data
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_clearPage
()
{
$
(
'#lab-sample-form-his'
)
.
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
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
soilStatistics
.
submitReportCheck
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功!'
)
}
},
_submitReportCheck
()
{
const
data
=
this
.
selectData
if
(
data
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
return
false
}
this
.
_submitByIds
(
this
.
selectIds
,
`确定要提交
${
this
.
selectIds
.
length
}
条数据吗?`
)
},
_submitByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
`确定要提交该条数据吗?`
,
onOk
:
()
=>
{
this
.
_submit
(
ids
)
}
})
},
// 接口异步
_submit
:
async
function
(
ids
)
{
if
(
ids
.
length
===
0
)
return
false
const
result
=
await
soilStatistics
.
submitEntrustReportCheck
(
ids
)
if
(
result
)
{
this
.
$Message
.
success
(
'提交成功!'
)
this
.
_formSearch
()
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_formSearch
()
},
_createReport
()
{
console
.
log
(
this
.
currentComponent
)
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
createReportModal
.
_open
(
this
.
selectData
)
}
},
_downloadByIds
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
_download
(
this
.
selectIds
,
`确定要下载
${
this
.
selectIds
.
length
}
条数据吗?`
)
}
},
_download
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定要下载报告?'
,
onOk
:
()
=>
{
window
.
open
(
global
.
baseURL
+
'/v1/sample_report/download_report/'
+
ids
,
'_blank'
)
}
})
},
_iconClick
(
name
,
data
)
{
switch
(
name
)
{
case
'提交'
:
this
.
_receiveByIds
(
data
.
id
)
break
case
'附件'
:
this
.
_uploadByIds
(
data
.
id
)
break
case
'预览报告'
:
this
.
_viewReport
(
data
)
break
case
'预览PDF'
:
this
.
_viewPDF
(
data
)
break
case
'操作日志'
:
this
.
_record
(
data
.
id
)
break
}
},
// 没有生成pdf先生成在预览
_viewPDF
(
data
)
{
console
.
log
(
data
)
if
(
data
.
pdfObjectKey
)
{
this
.
$pdfView
(
data
.
pdfObjectKey
)
}
else
{
console
.
log
(
123456
)
// window.open(
// 'http://api.pertest.patzn.com/food/v1/sample_report/generate_pdf_auto?id=' +
// data.id
// )
// this.autoPdf(data)
// window.open(
// global.baseURL +
// '/food/v1/sample_report/generate_pdf_auto?id=' +
// data.id
// )
}
},
_viewReport
(
data
)
{
this
.
_getObjectKey
(
data
)
},
_record
(
id
)
{
this
.
$refs
.
operationModal
.
_open
(
id
)
},
_getObjectKey
:
async
function
(
data
)
{
const
result
=
await
soilStatistics
.
getObjectKey
(
data
.
id
)
if
(
result
)
{
this
.
$openWindowModeless
({
objectKey
:
result
,
id
:
data
.
id
,
isReport
:
0
})
}
},
_uploadByIds
(
id
)
{
this
.
$refs
.
FileManage
.
_open
(
id
,
'entrustId'
)
},
// 文件返回的数据
_fileResult
(
msg
,
data
)
{
switch
(
msg
)
{
case
'file-page'
:
this
.
$refs
.
FileManage
.
_openFile
(
data
)
break
case
'delete-page'
:
this
.
$refs
.
FileManage
.
_delEntrustPage
(
''
,
data
)
break
case
'success'
:
this
.
$Message
.
success
(
'删除成功!'
)
this
.
$refs
.
FileManage
.
_pageEntrust
()
break
default
:
this
.
$refs
.
FileManage
.
_pageEntrust
()
}
},
_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
this
.
selectIds
=
[]
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
this
.
selectIds
.
push
(
this
.
selectData
[
i
].
id
)
}
break
default
:
this
.
_page
()
}
},
_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/soil-exp-report/report-make/SoilExpReportMakeIndex.vue
0 → 100644
View file @
4bde23b7
<
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"
>
<reportMake
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
reportMake
from
'./tabs/ExpReportMake'
import
historyTask
from
'./tabs/ExpReportMakeHis'
export
default
{
components
:
{
reportMake
,
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/soil-exp-report/report-make/SoilGroupExpReportMake.vue
0 → 100644
View file @
4bde23b7
<
template
>
<div>
<Modal
v-model=
"showModal"
v-drag
width=
"1050"
class=
"modal-footer-none zIndex-1100"
>
<p
slot=
"header"
>
项目试验项目编制
</p>
<div>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-contract-record"
:label-width=
"70"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"项目名称:"
>
<Input
v-model=
"formObj.expName"
name=
"expName"
placeholder=
"请输入项目名称"
style=
"width: 200px"
clearable
@
on-enter=
"_search"
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_search"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
show-search-btn=
"true"
@
on-result-change=
"_btnClick"
/>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:table-height=
"tableHeight"
:get-page=
"getPage"
show-check-box
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.key==='status'"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else-if=
"item.key==='ctime'"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM:ss'
):
''
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</Modal>
</div>
</template>
<
script
>
/**
* 操作日志-委托
*/
import
{
meterEntrust
,
soilStatistics
}
from
'../../../api'
export
default
{
data
()
{
return
{
showModal
:
false
,
getPage
:
{},
searchOpen
:
false
,
selectIds
:
[],
pageColumns
:
[
{
title
:
'项目名称'
,
key
:
'expName'
},
{
title
:
'检测科室'
,
key
:
'groupName'
},
{
title
:
'状态'
,
key
:
'status'
},
{
title
:
'备注'
,
key
:
'remark'
},
{
title
:
'创建人'
,
key
:
'uname'
},
{
title
:
'创建时间'
,
key
:
'ctime'
,
dateTime
:
true
}
],
btn
:
[{
id
:
''
,
type
:
'primary'
,
name
:
'提交至审核'
}],
formObj
:
{
entrustId
:
undefined
,
expName
:
undefined
,
groupId
:
undefined
}
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'tableModal'
)
}
},
methods
:
{
_open
(
data
)
{
this
.
showModal
=
true
this
.
formObj
.
entrustId
=
data
.
id
this
.
formObj
.
groupId
=
data
.
groupId
this
.
_page
()
},
_btnClick
(
msg
,
data
)
{
switch
(
msg
)
{
case
'提交至审核'
:
this
.
_submitExpReportMake
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
_submitExpReportMake
()
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
_submitExpReportMakeConfirm
(
ids
,
`确认要提交
${
ids
.
length
}
条数据吗?`
)
}
},
_submitExpReportMakeConfirm
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
`确定要处理该条数据吗?`
,
onOk
:
()
=>
{
this
.
_submitExpReportMakeOk
(
ids
)
}
})
},
async
_submitExpReportMakeOk
(
ids
)
{
const
result
=
await
soilStatistics
.
expReportCheckApprove
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功!'
)
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_page
()
this
.
$emit
(
'on-result-change'
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
meterEntrust
.
pageGroupExpReportMake
(
this
.
formObj
)
console
.
log
(
result
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'changeSize'
:
this
.
_page
()
break
case
'selectIds'
:
this
.
selectIds
=
data
break
}
},
_search
()
{
this
.
_page
()
}
}
}
</
script
>
pages/soil-exp-report/report-make/tabs/ExpReportMake.vue
0 → 100644
View file @
4bde23b7
<
template
>
<div>
<Row>
<Form
v-show=
"searchOpen"
id=
"lab-sample-form"
:label-width=
"70"
inline
onsubmit=
"return false"
class=
"search-form"
>
<label
class=
"label-sign"
/>
<Form-item
class=
"search-item"
label=
"委托方:"
>
<Input
name=
"client"
placeholder=
"请输入委托方"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
name=
"entrustCode"
placeholder=
"请输入委托编号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_formSearch"
>
搜索
</Button>
</Form-item>
</Form>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
show-search-btn=
"true"
@
on-result-change=
"_btnClick"
/>
</Col>
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:page-columns=
"pageColumns"
:table-height=
"tableHeight"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
show-check-box
select-data
@
on-result-change=
"_tableResultChange"
>
<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"
@
click
.
stop=
"_handleIndex(scope)"
>
<span
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<div
v-else-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</div>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<fileManage
ref=
"FileManage"
@
on-result-change=
"_fileResult"
/>
<Reason
ref=
"reasonModal"
@
on-result-change=
"_reasonResult"
/>
<SoilGroupExpReportMake
ref=
"soilGroupExpReportMakeModal"
@
on-result-change=
"_page"
/>
<OperationModal
ref=
"operationModal"
/>
</div>
</template>
<
script
>
// eslint-disable-next-line import/named
import
{
soilSample
,
soilStatistics
}
from
'../../../../api'
import
global
from
'../../../../api/config'
import
Reason
from
'../../../../components/base/Reason'
import
OperationModal
from
'../../../../components/operation/Operation'
import
SoilGroupExpReportMake
from
'../../report-make/SoilGroupExpReportMake'
export
default
{
name
:
'PreparationManage'
,
components
:
{
Reason
,
OperationModal
,
SoilGroupExpReportMake
},
data
()
{
return
{
name
:
''
,
pageColumns
:
[
{
title
:
'委托商'
,
key
:
'client'
,
width
:
200
,
fixed
:
'left'
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
100
},
{
title
:
'项目名称'
,
key
:
'projectName'
,
width
:
120
},
{
title
:
'检测科室'
,
key
:
'groupName'
,
width
:
120
},
{
title
:
'委托日期'
,
key
:
'entrustDate'
,
width
:
100
,
date
:
true
},
{
title
:
'钻孔位置'
,
key
:
'boreholeLocation'
,
width
:
130
},
{
title
:
'钻孔名称'
,
key
:
'boreholeName'
,
width
:
100
},
{
title
:
'水深'
,
key
:
'waterDepth'
,
width
:
100
},
{
title
:
'制表人'
,
key
:
'tabulater'
,
width
:
110
},
{
title
:
'制表日期'
,
key
:
'tabulateDate'
,
width
:
110
,
date
:
true
}
],
btn
:
[
// { id: '', type: 'primary', name: '提交' },
// { id: '', type: 'primary', name: '退回' }
],
getPage
:
{},
searchOpen
:
false
,
currentIndex
:
''
,
selectIds
:
[],
selectData
:
[],
iconMsg
:
[
{
id
:
''
,
type
:
'md-image'
,
name
:
'预览报告'
},
{
id
:
''
,
type
:
'ios-cloud'
,
name
:
'项目报告'
},
{
id
:
''
,
type
:
'ios-cloud'
,
name
:
'附件'
},
{
id
:
''
,
type
:
'ios-clock'
,
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
soilStatistics
.
pageExpReportMake
(
data
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_clearPage
()
{
$
(
'#lab-sample-form'
)
.
find
(
'input'
)
.
each
(
function
()
{
$
(
this
).
val
(
''
)
})
// this.$refs.sampleTime.handleClear()
},
_btnClick
(
msg
,
data
)
{
switch
(
msg
)
{
case
'提交'
:
this
.
_submitReportIssue
()
break
case
'下载'
:
this
.
_downloadByIds
()
break
case
'退回'
:
this
.
_goBack
()
break
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
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
soilStatistics
.
submitReportCheck
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功!'
)
}
},
_goBack
()
{
// 退回
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
.
reportIssueBack
({
ids
:
this
.
selectIds
,
remark
:
data
})
if
(
result
)
{
this
.
$Message
.
success
(
'退回成功!'
)
await
this
.
_page
()
}
},
_submitReportCheck
()
{
const
data
=
this
.
selectData
if
(
data
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
return
false
}
this
.
_submitByIds
(
this
.
selectIds
,
`确定要提交
${
this
.
selectIds
.
length
}
条数据吗?`
)
},
_submitReportIssue
()
{
const
data
=
this
.
selectData
if
(
data
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
return
false
}
this
.
_submitByIds
(
this
.
selectIds
,
`确定要提交
${
this
.
selectIds
.
length
}
条数据吗?`
)
},
_submitByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
`确定要提交该条数据吗?`
,
onOk
:
()
=>
{
this
.
_submit
(
ids
)
}
})
},
// 接口异步
_submit
:
async
function
(
ids
)
{
if
(
ids
.
length
===
0
)
return
false
const
result
=
await
soilSample
.
reportIssueSubmit
(
ids
)
if
(
result
)
{
this
.
$Message
.
success
(
'提交成功!'
)
this
.
_formSearch
()
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_formSearch
()
},
_createReport
()
{
console
.
log
(
this
.
currentComponent
)
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
createReportModal
.
_open
(
this
.
selectData
)
}
},
_downloadByIds
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
_download
(
this
.
selectIds
,
`确定要下载
${
this
.
selectIds
.
length
}
条数据吗?`
)
}
},
_download
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定要下载报告?'
,
onOk
:
()
=>
{
window
.
open
(
global
.
baseURL
+
'/v1/sample_report/download_report/'
+
ids
,
'_blank'
)
}
})
},
_iconClick
(
name
,
data
)
{
switch
(
name
)
{
case
'提交'
:
this
.
_receiveByIds
(
data
.
id
)
break
case
'附件'
:
this
.
_uploadByIds
(
data
.
id
)
break
case
'预览报告'
:
this
.
_viewReport
(
data
)
break
case
'操作日志'
:
this
.
_record
(
data
.
id
)
break
case
'项目报告'
:
this
.
_expReport
(
data
)
break
}
},
_viewReport
(
data
)
{
this
.
_getObjectKey
(
data
)
},
_record
(
id
)
{
this
.
$refs
.
operationModal
.
_open
(
id
)
},
_expReport
(
data
)
{
this
.
$refs
.
soilGroupExpReportMakeModal
.
_open
(
data
)
},
_getObjectKey
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
getReport
(
data
.
id
)
if
(
result
)
{
this
.
$openWindowModeless
({
objectKey
:
result
.
objectKey
,
id
:
data
.
id
,
isReport
:
4
,
idType
:
11
})
}
},
_uploadByIds
(
id
)
{
this
.
$refs
.
FileManage
.
_open
(
id
,
'entrustId'
)
},
// 文件返回的数据
_fileResult
(
msg
,
data
)
{
switch
(
msg
)
{
case
'file-page'
:
this
.
$refs
.
FileManage
.
_openFile
(
data
)
break
case
'delete-page'
:
this
.
$refs
.
FileManage
.
_delEntrustPage
(
''
,
data
)
break
case
'success'
:
this
.
$Message
.
success
(
'删除成功!'
)
this
.
$refs
.
FileManage
.
_pageEntrust
()
break
default
:
this
.
$refs
.
FileManage
.
_pageEntrust
()
}
},
_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
this
.
selectIds
=
[]
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
this
.
selectIds
.
push
(
this
.
selectData
[
i
].
id
)
}
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
default
:
this
.
_page
()
}
},
_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/soil-exp-report/report-make/tabs/ExpReportMakeHis.vue
0 → 100644
View file @
4bde23b7
<
template
>
<div>
<Row>
<Form
id=
"lab-sample-form-his"
v-show=
"searchOpen"
:label-width=
"70"
inline
onsubmit=
"return false"
class=
"search-form"
>
<label
class=
"label-sign"
/>
<Form-item
class=
"search-item"
label=
"委托方:"
>
<Input
@
on-enter=
"_formSearch"
name=
"client"
placeholder=
"请输入委托方"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
@
on-enter=
"_formSearch"
name=
"entrustCode"
placeholder=
"请输入委托编号"
clearable
/>
</Form-item>
<!--
<Form-item
class=
"search-item"
label=
"报检时间:"
>
-->
<!--
<Date-picker-->
<!-- ref="sampleTime"-->
<!-- type="datetimerange"-->
<!-- 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
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
@
on-result-change=
"_btnClick"
style=
"height: 30px;"
show-search-btn=
"true"
/>
</Col>
<!--
<Button
type=
"primary"
@
click=
"_submitReportCheck"
>
-->
<!-- 提交-->
<!--
</Button>
-->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
select-data
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:min-width=
"100"
:width=
"item.width"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<a
@
click
.
stop=
"_detailModal(scope.row.id,scope.row.type)"
v-if=
"item.detail"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<div
v-else-if=
"item.type"
>
{{
scope
.
row
[
item
.
key
]?
'政府'
:
'企业'
}}
</div>
<div
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-else-if=
"item.key==='havePhoto'"
>
{{
scope
.
row
[
item
.
key
]
===
1
?
'是'
:
scope
.
row
[
item
.
key
]
===
0
?
'否'
:
''
}}
</div>
<div
v-else-if=
"item.status"
>
<span
v-if=
"scope.row[item.key].display === '报告审核退回'||'报告签发退回' ===scope.row[item.key].display "
style=
"color: red;"
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
===
undefined
?
''
:
scope
.
row
[
item
.
key
].
display
}}
</span>
</div>
<div
v-else-if=
"item.judge"
>
{{
Number
(
scope
.
row
[
item
.
key
])
===
0
?
'否'
:
'是'
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<fileManage
ref=
"FileManage"
@
on-result-change=
"_fileResult"
/>
<OperationModal
ref=
"operationModal"
/>
</div>
</template>
<
script
>
// eslint-disable-next-line import/named
import
{
soilReport
,
soilStatistics
}
from
'../../../../api'
import
global
from
'../../../../api/config'
import
OperationModal
from
'../../../../components/operation/Operation'
export
default
{
name
:
'PreparationManage'
,
components
:
{
OperationModal
},
data
()
{
return
{
name
:
''
,
pageColumns
:
[
{
title
:
'委托商'
,
key
:
'client'
,
width
:
100
,
fixed
:
'left'
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
100
},
{
title
:
'报告编号'
,
key
:
'reportCode'
,
width
:
100
},
{
title
:
'进度'
,
key
:
'progress'
,
width
:
110
,
status
:
true
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
100
,
status
:
true
},
{
title
:
'委托日期'
,
key
:
'entrustDate'
,
width
:
100
,
date
:
true
},
{
title
:
'钻孔位置'
,
key
:
'boreholeLocation'
,
width
:
100
},
{
title
:
'钻孔名称'
,
key
:
'boreholeName'
,
width
:
100
},
{
title
:
'水深'
,
key
:
'waterDepth'
,
width
:
100
},
{
title
:
'制表人'
,
key
:
'tabulater'
,
width
:
110
},
{
title
:
'制表日期'
,
key
:
'tabulateDate'
,
width
:
110
,
date
:
true
}
],
btn
:
[
// { id: 'env-report-make-submit', type: 'primary', name: '提交' },
// { id: '', type: 'primary', name: '生成' },
],
getPage
:
{},
searchOpen
:
false
,
currentIndex
:
''
,
selectIds
:
[],
selectData
:
[],
iconMsg
:
[
{
id
:
''
,
type
:
'pt-a-view'
,
name
:
'预览报告'
},
// { id: '', type: 'pt-a-view', name: '预览PDF' },
{
id
:
''
,
type
:
'pt-a-cloud'
,
name
:
'附件'
},
{
id
:
''
,
type
:
'pt-a-clock'
,
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-his'
)
Object
.
assign
(
data
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilReport
.
pageReportIssueHis
(
data
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_clearPage
()
{
$
(
'#lab-sample-form-his'
)
.
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
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
soilStatistics
.
submitReportCheck
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功!'
)
}
},
_submitReportCheck
()
{
const
data
=
this
.
selectData
if
(
data
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
return
false
}
this
.
_submitByIds
(
this
.
selectIds
,
`确定要提交
${
this
.
selectIds
.
length
}
条数据吗?`
)
},
_submitByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
`确定要提交该条数据吗?`
,
onOk
:
()
=>
{
this
.
_submit
(
ids
)
}
})
},
// 接口异步
_submit
:
async
function
(
ids
)
{
if
(
ids
.
length
===
0
)
return
false
const
result
=
await
soilStatistics
.
submitEntrustReportCheck
(
ids
)
if
(
result
)
{
this
.
$Message
.
success
(
'提交成功!'
)
this
.
_formSearch
()
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_formSearch
()
},
_createReport
()
{
console
.
log
(
this
.
currentComponent
)
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
createReportModal
.
_open
(
this
.
selectData
)
}
},
_downloadByIds
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
_download
(
this
.
selectIds
,
`确定要下载
${
this
.
selectIds
.
length
}
条数据吗?`
)
}
},
_download
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定要下载报告?'
,
onOk
:
()
=>
{
window
.
open
(
global
.
baseURL
+
'/v1/sample_report/download_report/'
+
ids
,
'_blank'
)
}
})
},
_iconClick
(
name
,
data
)
{
switch
(
name
)
{
case
'提交'
:
this
.
_receiveByIds
(
data
.
id
)
break
case
'附件'
:
this
.
_uploadByIds
(
data
.
id
)
break
case
'预览报告'
:
this
.
_viewReport
(
data
)
break
case
'预览PDF'
:
this
.
_viewPDF
(
data
)
break
case
'操作日志'
:
this
.
_record
(
data
.
id
)
break
}
},
// 没有生成pdf先生成在预览
_viewPDF
(
data
)
{
console
.
log
(
data
)
if
(
data
.
pdfObjectKey
)
{
this
.
$pdfView
(
data
.
pdfObjectKey
)
}
else
{
console
.
log
(
123456
)
// window.open(
// 'http://api.pertest.patzn.com/food/v1/sample_report/generate_pdf_auto?id=' +
// data.id
// )
// this.autoPdf(data)
// window.open(
// global.baseURL +
// '/food/v1/sample_report/generate_pdf_auto?id=' +
// data.id
// )
}
},
_viewReport
(
data
)
{
this
.
_getObjectKey
(
data
)
},
_record
(
id
)
{
this
.
$refs
.
operationModal
.
_open
(
id
)
},
_getObjectKey
:
async
function
(
data
)
{
const
result
=
await
soilStatistics
.
getObjectKey
(
data
.
id
)
if
(
result
)
{
this
.
$openWindowModeless
({
objectKey
:
result
,
id
:
data
.
id
,
isReport
:
0
})
}
},
_uploadByIds
(
id
)
{
this
.
$refs
.
FileManage
.
_open
(
id
,
'entrustId'
)
},
// 文件返回的数据
_fileResult
(
msg
,
data
)
{
switch
(
msg
)
{
case
'file-page'
:
this
.
$refs
.
FileManage
.
_openFile
(
data
)
break
case
'delete-page'
:
this
.
$refs
.
FileManage
.
_delEntrustPage
(
''
,
data
)
break
case
'success'
:
this
.
$Message
.
success
(
'删除成功!'
)
this
.
$refs
.
FileManage
.
_pageEntrust
()
break
default
:
this
.
$refs
.
FileManage
.
_pageEntrust
()
}
},
_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
this
.
selectIds
=
[]
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
this
.
selectIds
.
push
(
this
.
selectData
[
i
].
id
)
}
break
default
:
this
.
_page
()
}
},
_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/soil-report-manage/report-make/ItemReportView.vue
View file @
4bde23b7
...
...
@@ -350,7 +350,7 @@ export default {
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
expReportPage
(
const
result
=
await
soilTest
.
pageExpReportEnd
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
...
...
pages/soil-report-manage/soil-item-report-template/SoilItemReportTemplate.vue
View file @
4bde23b7
...
...
@@ -13,6 +13,14 @@
<Input
v-model=
"formObj.alias"
@
on-enter=
"_formSearch"
name=
"alias"
placeholder=
"请输入模板名称"
clearable
></Input>
<input
type=
"hidden"
name=
"classifyId"
>
</Form-item>
<Form-item
label=
"类别"
prop=
"classType"
>
<!--
<Input
v-model=
"formObj.classType"
@
on-keyup=
"_onKeyUp"
name=
"classType"
placeholder=
"请选择类别"
icon=
"plus-circled"
--
>
<!-- >
</Input>
-->
<el-select
v-model=
"formObj.classType"
placeholder=
"请选择类别"
size=
"small"
clearable
>
<el-option
:label=
"item.value"
:value=
"item.value"
v-for=
"(item,index) in typeList"
:key=
"index"
></el-option>
</el-select>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
...
...
@@ -65,7 +73,8 @@ export default {
{
title
:
'备注'
,
key
:
'remark'
}
],
formObj
:
{
name
:
undefined
name
:
undefined
,
classType
:
undefined
},
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
...
...
@@ -79,6 +88,14 @@ export default {
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
typeList
:
[
{
value
:
'力学'
},
{
value
:
'物性'
}
],
searchOpen
:
true
,
selectIds
:
[]
}
...
...
pages/soil-sample-manage/sample-preparation/Preparation.vue
View file @
4bde23b7
...
...
@@ -112,15 +112,17 @@
<!--下载插件-->
<downloadPlugin
ref=
"downloadPlugin"
/>
<SampleParpareBatchEdit
ref=
"batchEdit"
@
on-result-change=
"backData"
></SampleParpareBatchEdit>
<SelectPrinter
ref=
"selectPrint"
@
on-result-change=
"_printResult"
></SelectPrinter>
</div>
</template>
<
script
>
import
AutoComplete
from
'../../../components/base/AutoCompletes'
import
{
soilEntrust
,
soilSample
}
from
'../../../api'
import
{
soilEntrust
,
soilSample
,
soilStatistics
}
from
'../../../api'
import
{
getLodop
}
from
'../../../plugins/clodop/LodopFuncs'
// eslint-disable-next-line no-unused-vars
import
downloadPlugin
from
'../../../plugins/download/downloadPlugin'
import
SelectPrinter
from
'./SelectPrinter'
// eslint-disable-next-line no-unused-vars
import
SampleParpareBatchEdit
from
'./SampleParpareBatchEdit'
let
LODOP
...
...
@@ -128,7 +130,8 @@ export default {
components
:
{
AutoComplete
,
downloadPlugin
,
SampleParpareBatchEdit
SampleParpareBatchEdit
,
SelectPrinter
},
data
()
{
return
{
...
...
@@ -154,6 +157,7 @@ export default {
getPage
:
{
records
:
[]
},
labelCode
:
{},
currentIndex
:
-
1
,
selectData
:
[],
selectIds
:
[],
...
...
@@ -217,6 +221,14 @@ export default {
this
.
$forceUpdate
()
this
.
getPage
.
records
[
data
.
$rowIndex
].
printNum
=
data
.
row
.
printNum
},
_printResult
(
data
)
{
console
.
log
(
data
)
if
(
data
)
{
console
.
log
(
'data.printerVal'
)
this
.
printerVal
=
data
.
printerVal
this
.
_getLabelInfo
()
}
},
// 获取存储位置
_locationChange
(
msg
,
data
,
handleObj
)
{
this
.
currentRow
=
handleObj
...
...
@@ -441,11 +453,29 @@ export default {
break
}
},
_getLabelInfo
:
async
function
()
{
console
.
log
(
'this._getLabelInfo'
)
const
result
=
await
soilStatistics
.
_getLabel
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
for
(
let
i
=
0
;
i
<
result
.
records
.
length
;
i
++
)
{
if
(
result
.
records
[
i
].
type
.
display
===
'打印上机标签'
)
{
this
.
labelCode
=
result
.
records
[
i
].
code
}
}
console
.
log
(
result
)
}
this
.
_printMessage
()
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'打印标签'
:
if
(
this
.
selectData
.
length
>
0
)
{
this
.
_printMessage
()
// this._goto()
this
.
$refs
.
selectPrint
.
_open
()
// this._getLabelInfo()
// this._printMessage()
}
else
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
...
...
@@ -458,6 +488,13 @@ export default {
break
}
},
_goto
(
methodId
)
{
const
routeData
=
this
.
$router
.
resolve
({
path
:
'/blank/item_by_method'
,
query
:
{
id
:
123456
}
})
window
.
open
(
routeData
.
href
,
'_blank'
)
},
// 下载插件
_pluginDownload
()
{
this
.
$refs
.
downloadPlugin
.
_open
()
...
...
@@ -475,39 +512,76 @@ export default {
const
data
=
this
.
selectData
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
data
[
i
].
printNum
;
j
++
)
{
LODOP
.
PRINT_INITA
(
'0mm'
,
'0mm'
,
'60.01mm'
,
'40.01mm'
,
'打印控件功能演示_Lodop功能_打印图片3'
)
LODOP
.
ADD_PRINT_BARCODE
(
'0.08mm'
,
'18.39mm'
,
'58.87mm'
,
'24.74mm'
,
'QRCode'
,
data
[
i
].
sampleCode
+
'-'
+
data
[
i
].
groupId
)
LODOP
.
ADD_PRINT_TEXT
(
130
,
13
,
186
,
20
,
this
.
_formatDate
(
data
[
i
].
prepareDate
)
)
LODOP
.
SET_PRINT_STYLEA
(
0
,
'Alignment'
,
2
)
LODOP
.
ADD_PRINT_TEXT
(
113
,
13
,
187
,
20
,
data
[
i
].
groupName
)
LODOP
.
SET_PRINT_STYLEA
(
0
,
'Alignment'
,
2
)
LODOP
.
ADD_PRINT_TEXT
(
95
,
12
,
188
,
20
,
data
[
i
].
sampleCode
)
LODOP
.
SET_PRINT_STYLEA
(
0
,
'Alignment'
,
2
)
// LODOP.PRINT_DESIGN()
LODOP
.
PRINT
()
this
.
_printLabelOk
(
data
[
i
])
// LODOP.PRINT_INITA(
// '0mm',
// '0mm',
// '60.01mm',
// '40.01mm',
// '打印控件功能演示_Lodop功能_打印图片3'
// )
// LODOP.ADD_PRINT_BARCODE(
// '0.08mm',
// '18.39mm',
// '58.87mm',
// '24.74mm',
// 'QRCode',
// data[i].sampleCode + '-' + data[i].groupId
// )
// LODOP.ADD_PRINT_TEXT(
// 130,
// 13,
// 186,
// 20,
// this._formatDate(data[i].prepareDate)
// )
// LODOP.SET_PRINT_STYLEA(0, 'Alignment', 2)
// LODOP.ADD_PRINT_TEXT(113, 13, 187, 20, data[i].groupName)
// LODOP.SET_PRINT_STYLEA(0, 'Alignment', 2)
// LODOP.ADD_PRINT_TEXT(95, 12, 188, 20, data[i].sampleCode)
// LODOP.SET_PRINT_STYLEA(0, 'Alignment', 2)
//
// // LODOP.PRINT_DESIGN()
// LODOP.PRINT()
}
}
},
_printLabelOk
(
row
)
{
LODOP
.
PRINT_INITA
(
''
)
// 必须在设置打印机之前
// 返回的标签代码
// eslint-disable-next-line no-eval
eval
(
this
.
_replaceCodes
(
row
))
// 设置打印机
LODOP
.
SET_PRINTER_INDEX
(
this
.
printerVal
)
// 打开设计模式
// LODOP.PRINT_DESIGN()
LODOP
.
PRINT
()
},
_replaceCodes
(
row
)
{
// /g表示全局替换
let
result
=
this
.
labelCode
result
=
result
.
replace
(
/
\$
sampleCode
\$
/g
,
undefined
!==
row
.
sampleCode
?
row
.
sampleCode
:
''
)
result
=
result
.
replace
(
/
\$
num
\$
/g
,
undefined
!==
row
.
num
?
row
.
num
:
''
)
result
=
result
.
replace
(
/
\$
resultDateTemp
\$
/g
,
row
.
resultDateTemp
)
result
=
result
.
replace
(
/
\$
groupName
\$
/g
,
undefined
!==
row
.
groupName
?
row
.
groupName
:
''
)
// 检测项目
result
=
result
.
replace
(
/
\$
items
\$
/g
,
undefined
!==
row
.
specialItems
?
row
.
specialItems
:
''
)
// 二维码地址
result
=
result
.
replace
(
/
\$
qrCode
\$
/g
,
undefined
!==
row
.
qrCode
?
row
.
qrCode
:
''
)
return
result
},
// 时间戳转换方法 date:时间戳数字
_formatDate
(
time
)
{
const
date
=
new
Date
(
time
)
...
...
pages/soil-sample-manage/sample-preparation/PreparationOther.vue
0 → 100644
View file @
4bde23b7
<
template
>
<div>
<Row>
<!--操作-->
<!--内容-->
<Col
span=
"24"
>
<element-table
ref=
"pageTable"
:page-columns=
"pageColumns"
:table-height=
"tableHeight"
:get-page=
"getPage"
show-check-box
hide-page
@
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"
>
<span
v-if=
"item.datetime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM'
):
''
}}
</span>
<span
v-else-if=
"item.key==='content'"
class=
"blue-color"
>
{{
scope
.
row
[
item
.
key
]?
scope
.
row
[
item
.
key
]:
''
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</el-table-column>
</element-table>
</Col>
</Row>
</div>
</template>
<
script
>
export
default
{
layout
:
'blank-layout'
,
components
:
{},
data
()
{
return
{
formId
:
''
,
showModal
:
false
,
wayData
:
new
Map
(),
formObj
:
{},
footerList
:
[],
list
:
[
{
name
:
'取消'
,
type
:
''
,
id
:
''
},
{
name
:
'制备完成'
,
type
:
'primary'
,
id
:
''
}
],
iconMsg
:
[
// { type: 'md-create', id: '', name: '批量赋值' },
// { type: 'md-trash', id: '', name: '删除' }
],
getPage
:
{
records
:
[]
},
labelCode
:
{},
currentIndex
:
-
1
,
selectData
:
[],
selectIds
:
[],
pageColumns
:
[
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
130
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
130
},
{
title
:
'打印数量'
,
key
:
'printNum'
,
width
:
130
,
editCell
:
true
},
{
title
:
'检验科室'
,
key
:
'groupName'
,
width
:
130
},
// 暂时屏蔽
// {title: '打印份数', key: 'printNum', width: 110},
{
title
:
'制备类型'
,
key
:
'type'
,
width
:
130
},
{
title
:
'制备方式'
,
key
:
'prepareWay'
,
width
:
130
,
editCell
:
true
},
{
title
:
'制备数量'
,
key
:
'quantity'
,
width
:
150
,
editCell
:
true
},
{
title
:
'单位'
,
key
:
'unit'
,
width
:
110
,
editCell
:
true
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
150
},
{
title
:
'保存方式'
,
key
:
'keepWay'
,
width
:
150
,
editCell
:
true
},
{
title
:
'保存容器'
,
key
:
'keepContainer'
,
width
:
150
,
editCell
:
true
},
{
title
:
'制备时间'
,
key
:
'prepareDate'
,
width
:
200
,
date
:
true
,
editCell
:
true
},
{
title
:
'制备人'
,
key
:
'preparer'
,
width
:
130
,
editCell
:
true
},
{
title
:
'备注'
,
key
:
'remark'
,
width
:
150
,
editCell
:
true
}
],
currentRow
:
{},
preparationWayData
:
[],
resultStateWayData
:
[],
saveWayData
:
[],
preparerList
:
[],
sampleIds
:
''
,
unitData
:
[],
locationList
:
[],
packList
:
[],
isAccurate
:
''
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'tableModal'
)
}
},
mounted
()
{},
methods
:
{
// 获取存储位置
_locationChange
(
msg
,
data
,
handleObj
)
{
this
.
currentRow
=
handleObj
switch
(
msg
)
{
case
'select'
:
this
.
$set
(
this
.
currentRow
,
'storePlace'
,
data
)
break
case
'query'
:
this
.
$set
(
this
.
currentRow
,
'storePlace'
,
data
)
this
.
_getLocation
(
data
)
break
case
'focus'
:
this
.
_getLocation
()
break
}
},
_getLocation
(
data
)
{
const
obj
=
{}
if
(
data
)
{
obj
.
storePlace
=
data
}
this
.
$store
.
dispatch
(
'FoodSamplePreparation/getPositionList'
,
obj
)
.
then
(()
=>
{
this
.
locationList
=
this
.
$store
.
state
.
FoodSamplePreparation
.
list
})
},
// 单位
_unitChange
(
msg
,
data
,
handleObj
)
{
this
.
_handleRow
(
handleObj
)
switch
(
msg
)
{
case
'select'
:
this
.
currentRow
.
unit
=
data
break
case
'query'
:
this
.
currentRow
.
unit
=
data
break
}
},
// 多个参数查询
// _dicSearch: async function() {
// const data = ['制备方式', '保存方式', '保存容器']
// const result = await soilSample.getDictList(data)
// if (result) {
// this.keepWayList = result
// }
// },
backData
(
data
)
{
this
.
$forceUpdate
()
console
.
log
(
data
)
console
.
log
(
this
.
selectData
)
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
Object
.
assign
(
this
.
selectData
[
i
],
data
)
}
console
.
log
(
'合并后'
,
this
.
selectData
)
},
_preparationChange
(
msg
,
data
,
handleObj
)
{
console
.
log
(
'data'
,
data
)
this
.
_handleRow
(
handleObj
)
this
.
currentRow
.
prepareWay
=
data
},
_testItemChange
(
msg
,
data
,
handleObj
)
{
this
.
_handleRow
(
handleObj
)
this
.
currentRow
.
resultState
=
data
.
name
},
_saveChange
(
msg
,
data
,
handleObj
)
{
console
.
log
(
'data'
,
data
)
this
.
_handleRow
(
handleObj
)
this
.
currentRow
.
keepWay
=
data
},
_preparerChange
(
msg
,
data
,
handleObj
)
{
this
.
_handleRow
(
handleObj
)
this
.
currentRow
.
preparer
=
data
},
timeChange
(
data
)
{
console
.
log
(
data
)
this
.
$forceUpdate
()
this
.
currentRow
.
prepareDate
=
data
.
prepareDate
console
.
log
(
this
.
getPage
.
records
)
},
_packSaveChange
(
msg
,
data
,
handleObj
)
{
console
.
log
(
'data'
,
data
)
this
.
_handleRow
(
handleObj
)
this
.
currentRow
.
keepContainer
=
data
},
_open
(
sampleIds
)
{
this
.
sampleIds
=
sampleIds
this
.
showModal
=
true
this
.
getPage
.
records
=
[]
this
.
preparationWayData
=
[]
this
.
saveWayData
=
[]
this
.
packList
=
[]
this
.
unitData
=
[]
this
.
preparerList
=
[]
this
.
footerList
=
[]
for
(
let
i
=
0
;
i
<
this
.
list
.
length
;
i
++
)
{
if
(
this
.
$showBtn
(
this
.
list
[
i
].
id
))
{
this
.
footerList
.
push
(
this
.
list
[
i
])
}
}
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'仅流转微生物'
:
this
.
_changeMic
()
break
case
'制备完成'
:
this
.
_ok
()
break
}
},
_cancel
()
{
this
.
showModal
=
false
this
.
_hideLoading
()
},
_ok
()
{
this
.
$refs
.
pageTable
.
_showLoading
()
const
prepareList
=
[]
for
(
let
i
=
0
;
i
<
this
.
getPage
.
records
.
length
;
i
++
)
{
prepareList
.
push
(
this
.
getPage
.
records
[
i
])
}
if
(
prepareList
.
length
===
0
)
{
this
.
$Message
.
warning
(
'制备数据不能为空'
)
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
_hideLoading
()
return
false
}
this
.
save
({
prepareList
:
prepareList
})
},
_resultChange
(
msg
)
{
this
.
showModal
=
false
this
.
$Message
.
success
(
msg
)
this
.
$emit
(
'on-result-change'
)
this
.
_hideLoading
()
this
.
$refs
.
pageTable
.
_hideLoading
()
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
_page
()
break
case
'selectData'
:
this
.
selectData
=
data
const
selectIds
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
selectIds
.
push
(
data
[
i
].
id
)
}
this
.
selectIds
=
selectIds
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
,
data
.
rowIndex
)
break
}
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'打印标签'
:
if
(
this
.
selectData
.
length
>
0
)
{
this
.
_goto
()
// this._getLabelInfo()
// this._printMessage()
}
else
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
break
case
'批量填写制备信息'
:
this
.
_writeInfo
()
break
case
'删除'
:
this
.
_deleteSelected
()
break
}
},
_goto
(
methodId
)
{
const
routeData
=
this
.
$router
.
resolve
({
path
:
'/blank/item_by_method'
,
query
:
{
id
:
123456
}
})
window
.
open
(
routeData
.
href
,
'_blank'
)
},
// 下载插件
_pluginDownload
()
{
this
.
$refs
.
downloadPlugin
.
_open
()
},
// 时间戳转换方法 date:时间戳数字
_selectStaff
()
{
this
.
$refs
.
userModal
.
_open
(
'preparationPerson'
)
},
_userData
(
data
)
{
// 选择人员返回数据
this
.
currentRow
.
preparationPerson
=
data
.
realname
this
.
currentRow
.
preparationPersonId
=
data
.
userId
},
// 批量赋值(这里用index判断,不用id是因为id有时候没有值,而且id不能随意赋值)
_copyPlan
(
data
)
{
const
ids
=
this
.
selectData
const
records
=
this
.
getPage
.
records
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请勾选数据进行赋值!'
)
}
else
{
for
(
let
i
=
0
;
i
<
ids
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
records
.
length
;
j
++
)
{
if
(
ids
[
i
].
currentIndex
===
records
[
j
].
currentIndex
)
{
this
.
_singleCopy
(
j
,
data
)
}
}
}
}
},
// 单独赋值信息
_singleCopy
(
j
,
data
)
{
const
tempData
=
{
preparationWay
:
data
.
preparationWay
,
resultQuantity
:
data
.
resultQuantity
?
data
.
resultQuantity
:
0
,
unit
:
data
.
unit
,
resultState
:
data
.
resultState
?
data
.
resultState
:
''
,
saveWay
:
data
.
saveWay
?
data
.
saveWay
:
''
,
pack
:
data
.
pack
?
data
.
pack
:
''
,
storePlace
:
data
.
storePlace
?
data
.
storePlace
:
''
,
printNum
:
data
.
printNum
?
data
.
printNum
:
1
,
remark
:
data
.
remark
?
data
.
remark
:
''
}
this
.
getPage
.
records
[
j
].
preparationWay
=
tempData
.
preparationWay
this
.
getPage
.
records
[
j
].
resultQuantity
=
tempData
.
resultQuantity
this
.
getPage
.
records
[
j
].
unit
=
tempData
.
unit
this
.
getPage
.
records
[
j
].
resultState
=
tempData
.
resultState
this
.
getPage
.
records
[
j
].
saveWay
=
tempData
.
saveWay
this
.
getPage
.
records
[
j
].
pack
=
tempData
.
pack
this
.
getPage
.
records
[
j
].
storePlace
=
tempData
.
storePlace
this
.
getPage
.
records
[
j
].
printNum
=
tempData
.
printNum
this
.
getPage
.
records
[
j
].
remark
=
tempData
.
remark
},
// 操作的序号
_handleRow
(
data
)
{
console
.
log
(
data
)
this
.
currentIndex
=
data
.
index
this
.
currentRow
=
data
.
row
},
_handleTimeRow
(
data
)
{
console
.
log
(
this
.
currentRow
)
this
.
currentRow
=
data
.
row
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/SelectPrinter.vue
0 → 100644
View file @
4bde23b7
<
template
>
<div>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
class=
"zIndex-1100"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Alert
v-show=
"isPrinterDownload"
type=
"error"
><p
@
click=
"_download"
>
未安装打印控件,点此
<a>
下载
</a>
,安装完请刷新页面
</p></Alert>
<div
v-show=
"!isPrinterDownload"
>
<Form
ref=
"formObj"
:rules=
"ruleValidate"
:label-width=
"70"
onsubmit=
"return false"
>
<Form-item
label=
"打印机"
prop=
"printerVal"
>
<Select
v-model=
"printerVal"
@
on-change=
"_printChange"
name=
"printerVal"
placeholder=
"请选择打印机"
>
<Option
v-for=
"item in printList"
:value=
"item.value"
:key=
"item.value"
>
{{
item
.
name
}}
</Option>
</Select>
</Form-item>
</Form>
</div>
</div>
<div
slot=
"footer"
class=
"btn-width"
>
<modal-footer
ref=
"footerModal"
@
on-result-change=
"_footerResult"
:footer=
"footerList"
></modal-footer>
</div>
</Modal>
</div>
</
template
>
<
script
>
/**
* 选择打印机
*/
import
global
from
'../../../api/config'
import
{
getLodop
}
from
'../../../plugins/clodop/LodopFuncs'
let
LODOP
export
default
{
components
:
{},
data
()
{
const
validatePrinter
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
printerVal
!==
null
)
{
callback
()
}
else
{
callback
(
new
Error
(
'请选择打印机~'
))
}
}
return
{
modalTitle
:
'选择打印机'
,
showModal
:
false
,
ruleValidate
:
{
printerVal
:
[
{
required
:
true
,
validator
:
validatePrinter
,
trigger
:
'change'
}
]
},
placeholder
:
''
,
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'确定'
,
type
:
'primary'
}
],
printList
:
[],
printerVal
:
null
,
type
:
''
,
isPrinterDownload
:
false
}
},
methods
:
{
// 获取打印机对象
_setPrinter
()
{
// 首先判断是否获取到打印机对象
if
(
undefined
===
LODOP
||
LODOP
===
'undefined'
)
{
LODOP
=
getLodop
()
}
// 其次判断是否安装打印机控件
if
(
undefined
===
LODOP
||
LODOP
===
'undefined'
)
{
this
.
isPrinterDownload
=
true
return
false
}
if
(
LODOP
.
GET_PRINTER_COUNT
()
===
0
)
{
this
.
$Message
.
warning
(
'系统未关联打印机,请确认....'
)
return
false
}
this
.
_createPrinterList
()
},
// 获取打印机列表
_createPrinterList
()
{
LODOP
=
getLodop
()
const
iPrinterCount
=
LODOP
.
GET_PRINTER_COUNT
()
const
printList
=
[]
for
(
let
i
=
0
;
i
<
iPrinterCount
;
i
++
)
{
printList
.
push
({
name
:
LODOP
.
GET_PRINTER_NAME
(
i
),
value
:
i
})
}
console
.
log
(
printList
)
this
.
printList
=
printList
if
(
this
.
printList
.
length
)
{
// 默认第一个打印机
this
.
printerVal
=
this
.
printList
[
0
].
value
}
},
_open
(
type
)
{
this
.
showModal
=
true
this
.
isPrinterDownload
=
false
this
.
type
=
type
// 打印标签还是自定义打印
this
.
_setPrinter
()
this
.
_createPrinterList
()
},
_printChange
(
data
)
{
this
.
printerVal
=
data
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'确定'
:
this
.
_ok
()
break
}
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_cancel
()
{
this
.
showModal
=
false
},
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
$emit
(
'on-result-change'
,
{
printerVal
:
this
.
printerVal
,
type
:
this
.
type
})
this
.
showModal
=
false
}
else
{
this
.
$Message
.
error
(
'表单验证失败!'
)
}
})
},
// 下载打印机
_download
()
{
window
.
open
(
global
.
staticURL
+
'/clodop/CLodop_Setup_for_Win32NT.exe'
,
'_blank'
)
}
}
}
</
script
>
pages/soil-statistics/personal-task/MeterPersonalTask.vue
View file @
4bde23b7
...
...
@@ -8,31 +8,21 @@
<div
class=
"fl"
>
<Form
id=
"search-form"
:label-width=
"70"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<!--
<Form-item
class=
"search-item"
label=
"人员:"
>
-->
<!--
<AutoCompletes
:value=
"tester"
:blur=
"true"
:down-data=
"testerData"
show-key=
"realname"
--
>
<!-- placeholder="请选择人员" @on-result-change="_testerChange"-->
<!-- >
</AutoCompletes>
-->
<!--
</Form-item>
-->
<!--
<Form-item
class=
"search-item"
label=
"服务类型:"
>
-->
<!--
<Select
v-model=
"serviceType"
placeholder=
"请选择服务类型"
clearable
>
-->
<!--
<Option
v-for=
"item in serviceTypeList"
:value=
"item.name"
:key=
"item.name"
>
{{
item
.
name
}}
</Option>
-->
<!--
</Select>
-->
<!--
</Form-item>
-->
<Form-item
label=
"委托日期:"
>
<el-date-picker
v-model=
"queryDate"
@
change=
"_dateChange"
type=
"monthrange"
range-separator=
"-"
start-placeholder=
"开始月份"
end-placeholder=
"结束月份"
size=
"small"
value-format=
"yyyy-MM"
@
change=
"_dateChange"
>
</el-date-picker>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_getData"
type=
"primary"
class=
"width-80
"
>
<Button
type=
"primary"
class=
"width-80"
@
click=
"_getData
"
>
搜索
</Button>
</Form-item>
...
...
@@ -43,14 +33,14 @@
<!--内容-->
<Col
span=
"24"
>
<Row
:gutter=
"16"
>
<Col
span=
"1
4
"
>
<Col
span=
"1
3
"
>
<element-table
id=
"table-year"
ref=
"pageTable"
:table-height=
"tableHeight"
:get-page=
"getPage"
@
on-result-change=
"_tableResultChange"
hide-checkbox
@
on-result-change=
"_tableResultChange"
>
<el-table-column
fixed
type=
"index"
label=
"序号"
width=
"100"
>
</el-table-column>
...
...
@@ -72,7 +62,7 @@
</el-table-column>
</element-table>
</Col>
<Col
span=
"1
0
"
>
<Col
span=
"1
1
"
>
<!--pie-->
<UserTestPie
ref=
"testPieModal"
></UserTestPie>
</Col>
...
...
@@ -109,47 +99,14 @@ export default {
tester
:
''
,
testerId
:
''
,
pageColumns
:
[
{
title
:
'姓名'
,
key
:
'tester'
,
detail
:
true
},
{
title
:
'样品量'
,
key
:
'total'
},
{
title
:
'样品占比(%)'
,
key
:
'ratio'
}
{
title
:
'检测人员'
,
key
:
'tester'
,
detail
:
true
,
width
:
140
},
{
title
:
'项目总量'
,
key
:
'total'
,
width
:
100
},
{
title
:
'未完成总量'
,
key
:
'doingTotal'
,
width
:
110
},
{
title
:
'已完成总量'
,
key
:
'endTotal'
,
width
:
110
},
{
title
:
'样品占比(%)'
,
key
:
'ratio'
,
width
:
120
}
],
groupData
:
[],
// getPage: [
// {
// tester: 'wwd',
// total: '12',
// ratio: '10%',
// price: '3500'
// },
// {
// tester: 'wwd',
// total: '12',
// ratio: '10%',
// price: '3500'
// },
// {
// tester: 'wwd',
// total: '12',
// ratio: '10%',
// price: '3500'
// }
// ],
getPage
:
{
records
:
[
{
tester
:
'李承明'
,
total
:
'12'
,
ratio
:
'10%'
,
price
:
'3500'
},
{
tester
:
'李成明'
,
total
:
'12'
,
ratio
:
'10%'
,
price
:
'3500'
}
]
},
getPage
:
{},
tempData
:
{
groupId
:
''
,
groupName
:
''
,
...
...
@@ -180,8 +137,7 @@ export default {
const
lastday
=
this
.
mGetDate
(
arr
[
0
],
arr
[
1
]).
getTime
()
-
1
this
.
formObj
.
edateBegin
=
this
.
tempData
.
beginDate
this
.
formObj
.
edateEnd
=
this
.
$dateformat
(
lastday
,
'yyyy-mm-dd HH:MM:ss'
)
// this._getData()
// this._getServiceTypeList()
this
.
_getData
()
},
methods
:
{
mGetDate
(
year
,
month
)
{
...
...
@@ -194,7 +150,7 @@ export default {
this
.
formObj
)
if
(
result
)
{
this
.
getPage
.
records
=
result
this
.
getPage
=
result
this
.
$refs
.
testPieModal
.
_openPie
(
this
.
getPage
.
records
)
}
},
...
...
pages/soil-statistics/personal-task/UserTestPie.vue
View file @
4bde23b7
...
...
@@ -44,7 +44,7 @@ export default {
formatter
:
function
(
a
)
{
return
(
a
.
name
+
'</br>
样品
量: '
+
'</br>
项目
量: '
+
a
.
data
.
value
+
'<br>占比: '
+
a
.
percent
+
...
...
@@ -58,7 +58,7 @@ export default {
right
:
0
,
top
:
20
,
bottom
:
20
,
data
:
[
'直接访问'
,
'邮件营销'
,
'联盟广告'
,
'视频广告'
,
'搜索引擎'
]
data
:
[]
},
color
:
this
.
$echartColor
,
series
:
[
...
...
@@ -81,13 +81,7 @@ export default {
labelLine
:
{
show
:
false
},
data
:
[
{
value
:
335
,
name
:
'直接访问'
},
{
value
:
310
,
name
:
'邮件营销'
},
{
value
:
234
,
name
:
'联盟广告'
},
{
value
:
135
,
name
:
'视频广告'
},
{
value
:
1548
,
name
:
'搜索引擎'
}
]
data
:
[]
}
]
},
...
...
pages/soil-test-manage/test-input/ItemReportView.vue
View file @
4bde23b7
...
...
@@ -172,8 +172,6 @@ export default {
_reportMakeLook
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilReport
.
expReportGetById
(
data
.
id
)
// this._viewReport(data)
// const result = await soilReport.getExcelOriginalRecord(data.id)
if
(
result
)
{
console
.
log
(
'result'
)
this
.
_viewReport
(
result
)
...
...
pages/soil-test-manage/test-input/ViewGdsData.vue
0 → 100644
View file @
4bde23b7
<
template
>
<div>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
width=
"1200"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<Row>
<Col
span=
"24"
>
<div
style=
"overflow-y: auto"
>
<table
class=
"tableClass"
>
<tbody>
<tr>
<th
colspan=
"6"
class=
"tableClass_back"
>
GDS信息
</th>
</tr>
<tr>
<th>
初始高度
</th>
<td>
{{
gdsData
.
initialHeight
}}
</td>
<th>
初始直径
</th>
<td>
{{
gdsData
.
initialDiameter
}}
</td>
<th>
比重(kN/m3)
</th>
<td>
{{
gdsData
.
specificGravityKn
}}
</td>
</tr>
<tr>
<th>
工作参考
</th>
<td>
{{
gdsData
.
jobReference
}}
</td>
<th>
钻孔名称
</th>
<td>
{{
gdsData
.
borehole
}}
</td>
<th>
样品名称
</th>
<td>
{{
gdsData
.
sampleName
}}
</td>
</tr>
<tr>
<th>
深度
</th>
<td>
{{
gdsData
.
depth
}}
</td>
<th>
样品日期
</th>
<td>
{{
gdsData
.
sampleDate
}}
</td>
<th>
样品描述
</th>
<td>
{{
gdsData
.
descriptionOfSample
}}
</td>
</tr>
<tr>
<th>
初始质量
</th>
<td>
{{
gdsData
.
initialMass
}}
</td>
<th>
初始干质量
</th>
<td>
{{
gdsData
.
initialDryMass
}}
</td>
<th>
比重(ass/meas)
</th>
<td>
{{
gdsData
.
specificGravityAss
}}
</td>
</tr>
<tr>
<th>
试验条款
</th>
<td>
{{
gdsData
.
testClause
}}
</td>
<th>
测试开始日期
</th>
<td>
{{
gdsData
.
dateTestStarted
}}
</td>
<th>
测试结束日期
</th>
<td>
{{
gdsData
.
dateTestFinished
}}
</td>
</tr>
<tr>
<th>
试样类型
</th>
<td>
{{
gdsData
.
specimenType
}}
</td>
<th>
最终质量
</th>
<td>
{{
gdsData
.
finalMass
}}
</td>
<th>
最终干质量
</th>
<td>
{{
gdsData
.
finalDryMass
}}
</td>
</tr>
<tr>
<th>
设备编号
</th>
<td>
{{
gdsData
.
machineNo
}}
</td>
<th>
Cell No
</th>
<td>
{{
gdsData
.
cellNo
}}
</td>
<th>
工作地点
</th>
<td>
{{
gdsData
.
jobLocation
}}
</td>
</tr>
<tr>
<th>
重复数据开始
</th>
<td>
{{
gdsData
.
startOfRepeatedData
}}
</td>
</tr>
</tbody>
</table>
</div>
</Col>
<Col
span=
"24"
>
<Form
id=
"task-assign-item-left"
:label-width=
"70"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"阶段编号:"
>
<Input
v-model=
"formObj.stageNumber"
@
on-enter=
"_formSearch"
placeholder=
"请输入阶段编号"
clearable
></Input>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
>
<div>
<PTVXETable
ref=
"pageTable"
:form-id=
"formId"
:table-height=
"500"
:get-page=
"getPage"
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:width=
"item.width"
:min-width=
"150"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.key==='siteNo'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.siteNo"
blur
placeholder=
"请输入现场编号"
></el-input>
</div>
<div
v-else-if=
"item.key==='experiments'"
@
click
.
stop=
"_handleRow(scope)"
>
<span
@
click=
"_removeItem(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</div>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</div>
</Col>
</Row>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
></modal-footer>
</div>
</Modal>
</div>
</template>
<
script
>
/**
* 添加编辑分包商
*/
import
{
soilTest
}
from
'../../../api'
export
default
{
components
:
{},
data
()
{
return
{
formId
:
'viewGdsDataId'
,
getPage
:
{},
height
:
300
,
gdsData
:
{},
edit
:
false
,
selectData
:
[],
searchOpen
:
true
,
iconMsg
:
[
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}
],
pageColumns
:
[
{
title
:
'Stage Number'
,
key
:
'stageNumber'
},
{
title
:
'Time since start of test (s)'
,
key
:
'timeSinceStartOfTest'
},
{
title
:
'Time since start of stage (s)'
,
key
:
'timeSinceStartOfStage'
},
{
title
:
'Axial Displacement (mm)'
,
key
:
'axialDisplacement'
},
{
title
:
'Axial Load (kN)'
,
key
:
'axialLoad'
},
{
title
:
'Horizontal Displacement (mm)'
,
key
:
'horizontalDisplacement'
},
{
title
:
'Horizontal Load (kN)'
,
key
:
'horizontalLoad'
},
{
title
:
'Pore Water Pressure (kPa)'
,
key
:
'poreWaterPressure'
},
{
title
:
'Back Pressure (kPa)'
,
key
:
'backPressure'
},
{
title
:
'Back Volume (mm3)'
,
key
:
'backVolume'
},
{
title
:
'Undefined Transducer 1'
,
key
:
'undefinedTransducerOne'
},
{
title
:
'Undefined Transducer 2'
,
key
:
'undefinedTransducerTwo'
},
{
title
:
'Ring Shear Torque (Nm)'
,
key
:
'ringShearTorqueNm'
},
{
title
:
'Ring Shear Angle (degs)'
,
key
:
'ringShearTorqueDegs'
},
{
title
:
'Lower Chamber Pr (kPa)'
,
key
:
'lowerChamberPr'
},
{
title
:
'Lower Chamber Vol (mm3)'
,
key
:
'lowerChamberVol'
},
{
title
:
'Axial Displacement 2 (mm)'
,
key
:
'axialDisplacementTwo'
},
{
title
:
'Horizontal Displacement 2 (mm)'
,
key
:
'horizontalDisplacementTwo'
},
{
title
:
'Ring Shear Load 1 (kN)'
,
key
:
'ringShearLoadOne'
},
{
title
:
'Ring Shear Load 2 (kN)'
,
key
:
'ringShearLoadTwo'
},
{
title
:
'Axial Load 2 (kN)'
,
key
:
'axialLoadTwo'
},
{
title
:
'Horizontal Load 2 (kN)'
,
key
:
'horizontalLoadTwo'
},
{
title
:
'Horizontal Load 3 (kN)'
,
key
:
'horizontalLoadThree'
},
{
title
:
'Axial Stroke (mm)'
,
key
:
'axialStroke'
},
{
title
:
'Horizontal Stroke (mm)'
,
key
:
'horizontalStroke'
},
{
title
:
'Pore Air Pressure (kPa)'
,
key
:
'poreAirPressure'
},
{
title
:
'Pore Air Pressure 2 (kPa)'
,
key
:
'poreAirPressureTwo'
},
{
title
:
'Atmospheric Pressure (kPa)'
,
key
:
'atmosphericPressure'
},
{
title
:
'Back to Air differential (kPa)'
,
key
:
'backToAirDifferential'
},
{
title
:
'Cell Pressure (kPa)'
,
key
:
'cellPressure'
},
{
title
:
'Cell Volume (mm3)'
,
key
:
'cellVolume'
},
{
title
:
'Pore Air Volume (mm3)'
,
key
:
'poreAirVolume'
},
{
title
:
'Axial Strain (%)'
,
key
:
'axialStrain'
},
{
title
:
'Normal Stress (kPa)'
,
key
:
'normalStress'
},
{
title
:
'Horizontal Strain (%) or Horizontal Ring Displacement for Ring Shear Machine (mm)'
,
key
:
'hsohrdfrsm'
},
{
title
:
'Horizontal Stress (kPa) or Shear Stress for Ring Shear Machine (kPa)'
,
key
:
'hsossfrsm'
},
{
title
:
'Horizontal Eff Stress (kPa)'
,
key
:
'horizontalEffStress'
},
{
title
:
'Effective Area (mm2)'
,
key
:
'effectiveArea'
},
{
title
:
'Normal Effective Stress (kPa)'
,
key
:
'normalEffectiveStress'
},
{
title
:
'Average Ring Shear Load (kN)'
,
key
:
'averageRingShearLoad'
}
],
currentIndex
:
-
1
,
id
:
''
,
modalTitle
:
''
,
formObj
:
{},
selectIds
:
[],
showModal
:
false
,
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'关闭'
,
type
:
'primary'
}
],
aptitudeData
:
[]
}
},
methods
:
{
/** *modal-footer */
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'关闭'
:
this
.
_cancel
()
break
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_cancel
()
{
this
.
showModal
=
false
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_openEdit
(
id
)
{
this
.
edit
=
true
this
.
showBtn
=
false
this
.
showModal
=
true
this
.
getPage
.
records
=
[]
this
.
id
=
''
this
.
gdsData
=
[]
this
.
_getGdsMainInfo
(
id
)
this
.
modalTitle
=
'查看GDS数据'
},
_getGdsInfo
:
async
function
()
{
if
(
this
.
formObj
.
gdsId
)
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
dataGdsDetail
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
}
else
{
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'changeSize'
:
this
.
_getGdsInfo
()
break
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_getGdsMainInfo
:
async
function
(
id
)
{
const
result
=
await
soilTest
.
gdsGetMainInfo
(
id
)
if
(
result
)
{
this
.
gdsData
=
result
this
.
formObj
.
gdsId
=
this
.
gdsData
.
id
this
.
_getGdsInfo
()
}
},
_showTime
(
formObj
)
{
if
(
this
.
formObj
.
entrustDate
===
undefined
)
{
this
.
formObj
.
entrustDate
=
''
}
else
{
this
.
formObj
.
entrustDate
=
new
Date
(
formObj
.
entrustDate
)
}
if
(
this
.
formObj
.
tabulateDate
===
undefined
)
{
this
.
formObj
.
tabulateDate
=
''
}
else
{
this
.
formObj
.
tabulateDate
=
new
Date
(
formObj
.
tabulateDate
)
}
},
_visibleChange
(
data
)
{
this
.
$forceUpdate
()
console
.
log
(
'清空'
)
this
.
formObj
.
client
=
''
this
.
formObj
=
{}
}
}
}
</
script
>
pages/soil-test-manage/test-input/item-tabs/CreateBatchItemReport.vue
0 → 100644
View file @
4bde23b7
<
template
>
<div>
<Modal
v-model=
"showBatchModal"
v-drag
width=
"900"
>
<p
slot=
"header"
>
生成项目报告
</p>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--样品信息-->
<!--报告模板-->
<Col
span=
"24"
>
<ItemReportTemplate
ref=
"reportTemplate"
@
on-result-change=
"_templateResultChange"
></ItemReportTemplate>
</Col>
</Row>
</div>
</div>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerBtn"
@
on-result-change=
"_footerResult"
></modal-footer>
</div>
</Modal>
<!--生成报告的进度条-->
</div>
</
template
>
<
script
>
import
ItemReportTemplate
from
'./ItemReportTemplate'
/**
* 样品列表--生成报告或者选择模板生成报告
*/
export
default
{
components
:
{
ItemReportTemplate
},
data
()
{
return
{
selectIds
:
[],
getPage
:
{
records
:
[]
},
showBatchModal
:
false
,
isLoading
:
false
,
footerBtn
:
[
{
type
:
''
,
id
:
''
,
name
:
'取消'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'确定'
}
],
pageColumns
:
[
{
title
:
'样品名称'
,
key
:
'name'
,
width
:
160
},
{
title
:
'样品编号'
,
key
:
'code'
,
width
:
150
},
{
title
:
'证书编号'
,
key
:
'certificate'
,
width
:
150
}
],
reportModelId
:
''
,
backData
:
{},
// 样品数据
tableData
:
[],
// 签发日期
issueDateTemp
:
''
,
issueDate
:
''
,
showIssueModal
:
false
}
},
methods
:
{
_open
()
{
this
.
getPage
.
records
=
[]
this
.
backData
=
{}
this
.
showBatchModal
=
true
this
.
_reportTemplate
()
this
.
reportModelId
=
''
this
.
isLoading
=
false
},
// 报告模板
_reportTemplate
()
{
this
.
$refs
.
reportTemplate
.
_open
()
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'确定'
:
this
.
_ok
()
break
case
'取消'
:
this
.
showBatchModal
=
false
break
}
},
_templateResultChange
(
selectData
)
{
this
.
backData
=
selectData
[
0
]
},
_issueChange
(
data
)
{
if
(
data
)
{
this
.
issueDate
=
data
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_ok
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
if
(
!
this
.
backData
.
name
)
{
this
.
$Message
.
warning
(
'请选择一个原始记录模板!'
)
// this._hideLoading()
}
else
{
this
.
$emit
(
'on-result-change'
,
this
.
backData
)
this
.
showBatchModal
=
false
}
},
_issueCancel
()
{
this
.
showIssueModal
=
false
},
// 选择时间ok
_issueOk
()
{
this
.
isLoading
=
true
this
.
showIssueModal
=
false
this
.
_createOk
()
},
// 生成报告
_createOk
()
{
const
obj
=
[]
for
(
let
i
=
0
;
i
<
this
.
tableData
.
length
;
i
++
)
{
obj
.
push
({
sampleId
:
this
.
tableData
[
i
].
id
,
reportSn
:
this
.
tableData
[
i
].
reportSn
,
issueDate
:
this
.
issueDate
})
}
this
.
$layxLoading
(
true
,
'数据验证中'
)
const
validateObj
=
{
sampleReports
:
obj
,
reportModelId
:
this
.
reportModelId
}
// 先进行验证
this
.
$store
.
dispatch
(
'FoodSampleReport/createReportValidate'
,
validateObj
)
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
FoodSampleReport
.
success
)
{
// 验证成功之后再建立连接,然后进行生成报告操作
// 建立websocket连接
const
currentTime
=
new
Date
().
getTime
()
this
.
$refs
.
progressModal
.
_open
(
this
.
tableData
.
length
,
currentTime
)
validateObj
.
seriesNo
=
currentTime
console
.
log
(
'生成报告的当前序列号,'
,
validateObj
.
seriesNo
)
this
.
$store
.
dispatch
(
'FoodSampleReport/createReport'
,
validateObj
)
.
then
(()
=>
{})
}
this
.
_hideLoading
()
this
.
isLoading
=
false
this
.
$layxLoading
(
false
)
})
},
_closeResult
()
{
this
.
showBatchModal
=
false
this
.
$emit
(
'on-result-change'
)
}
}
}
</
script
>
pages/soil-test-manage/test-input/item-tabs/ItemLeftList.vue
View file @
4bde23b7
...
...
@@ -14,7 +14,7 @@
</Form>
</Col>
<Col
span=
"24"
>
<btn-list
@
on-result-change=
"_btnClick"
class=
"contHide"
style=
"margin-bottom: 6px;"
></btn-list>
<btn-list
@
on-result-change=
"_btnClick"
:msg=
"btn"
class=
"contHide"
style=
"margin-bottom: 6px;"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
...
...
@@ -41,13 +41,15 @@
</Col>
</Row>
<CreateItemReport
ref=
"createModal"
@
on-result-change=
"_certificateSelectExcelBack"
></CreateItemReport>
<CreateBatchItemReport
ref=
"createBatchModal"
@
on-result-change=
"_templateBack"
></CreateBatchItemReport>
</div>
</template>
<
script
>
import
{
soilSample
,
soilTest
}
from
'../../../../api'
import
CreateItemReport
from
'./CreateItemReport'
import
CreateBatchItemReport
from
'./CreateBatchItemReport'
export
default
{
components
:
{
CreateItemReport
},
components
:
{
CreateItemReport
,
CreateBatchItemReport
},
data
()
{
return
{
currentComponent
:
''
,
...
...
@@ -58,7 +60,14 @@ export default {
name
:
undefined
,
entrustId
:
undefined
},
formObjBatchSample
:
{
obj
:
{
entrustId
:
''
,
nameList
:
[]
}
},
sampleIds
:
[],
batchSampleIds
:
[],
itemName
:
''
,
tableName
:
'food-task-assign-item-left'
,
// 用户自己选中的列
...
...
@@ -70,6 +79,13 @@ export default {
],
getPage
:
{},
iconMsg
:
[{
type
:
'ios-book'
,
id
:
''
,
name
:
'生成项目报告'
}],
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'生成项目报告'
}
],
id
:
''
,
selectId
:
''
,
pageColumns
:
[{
title
:
'检测项目'
,
key
:
'name'
,
width
:
120
}]
...
...
@@ -150,6 +166,10 @@ export default {
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'生成项目报告'
:
// this.$emit('on-result-change', data)
this
.
_itemReportMakeBatch
()
break
case
'自动分配'
:
this
.
_autoAssign
()
break
...
...
@@ -165,12 +185,43 @@ export default {
}
})
},
_itemReportMakeBatch
()
{
if
(
this
.
selectDataName
.
length
>
0
)
{
// this.itemName = data.name
this
.
_searchBatchSampleId
(
this
.
id
,
this
.
selectDataName
)
// this.selectId = data.id
this
.
$refs
.
createBatchModal
.
_open
()
}
else
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
},
_itemReportMake
(
data
)
{
this
.
itemName
=
data
.
name
this
.
_searchSampleId
(
this
.
id
,
data
.
name
)
// this.selectId = data.id
this
.
$refs
.
createModal
.
_open
()
},
_searchBatchSampleId
:
async
function
(
id
,
name
)
{
Object
.
assign
(
this
.
formObjBatchSample
,
this
.
$refs
.
pageTable
.
_searchParams
()
)
this
.
formObjBatchSample
.
obj
.
entrustId
=
id
this
.
formObjBatchSample
.
obj
.
nameList
=
name
const
result
=
await
soilTest
.
pageExperimentTestBath
(
this
.
$serializeForm
(
this
.
formObjBatchSample
)
)
if
(
result
)
{
this
.
batchSampleIds
=
[]
for
(
let
i
=
0
;
i
<
result
.
records
.
length
;
i
++
)
{
this
.
batchSampleIds
.
push
(
result
.
records
[
i
].
id
)
}
console
.
log
(
'右侧样品id'
,
this
.
batchSampleIds
)
this
.
$refs
.
pageTable
.
_hideLoading
()
}
else
{
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_searchSampleId
:
async
function
(
id
,
name
)
{
Object
.
assign
(
this
.
formObjSample
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObjSample
.
entrustId
=
id
...
...
@@ -188,6 +239,14 @@ export default {
console
.
log
(
'右侧样品id'
,
this
.
sampleIds
)
}
},
_templateBack
(
data
)
{
if
(
data
)
{
this
.
$refs
.
pageTable
.
_showLoading
()
this
.
_makeBatchCodeExcel
(
data
)
}
else
{
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_certificateSelectExcelBack
(
data
)
{
if
(
data
)
{
this
.
$refs
.
pageTable
.
_showLoading
()
...
...
@@ -196,6 +255,27 @@ export default {
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_makeBatchCodeExcel
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
saveExcelExpReport
({
entrustId
:
this
.
id
,
expName
:
this
.
selectDataName
.
join
(
','
),
ids
:
this
.
batchSampleIds
.
join
(
','
),
templateId
:
data
.
id
})
if
(
result
)
{
// await this._page()
if
(
result
===
null
||
result
===
undefined
)
{
this
.
$Message
.
warning
(
'证书编制失败,请联系管理员!'
)
this
.
$refs
.
pageTable
.
_hideLoading
()
return
false
}
else
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
_viewReport
(
result
)
}
}
else
{
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_makeCodeExcel
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
saveExcelExpReport
({
entrustId
:
this
.
id
,
...
...
pages/soil-test-manage/test-input/item-tabs/ItemRightList.vue
View file @
4bde23b7
...
...
@@ -58,6 +58,7 @@
<CreateReport
ref=
"createModal"
@
on-result-change=
"_certificateSelectExcelBack"
></CreateReport>
<Reason
ref=
"reasonModal"
@
on-result-change=
"_reasonResult"
/>
<Operation
ref=
"Operation"
></Operation>
<ViewGdsData
ref=
"viewGds"
></ViewGdsData>
</div>
</template>
<
script
>
...
...
@@ -73,6 +74,7 @@ import CollectManage from '../CollectManage'
import
CollectFileManage
from
'../CollectFileManage'
import
Reason
from
'../../../../components/base/Reason'
import
Operation
from
'../../../../components/operation/ItemOperation'
import
ViewGdsData
from
'../ViewGdsData'
import
CreateReport
from
'./CreateReport'
export
default
{
components
:
{
...
...
@@ -86,7 +88,8 @@ export default {
CollectFileManage
,
Reason
,
CreateReport
,
Operation
Operation
,
ViewGdsData
},
data
()
{
return
{
...
...
@@ -141,6 +144,7 @@ export default {
],
iconMsg
:
[
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
},
{
type
:
'ios-list-box'
,
id
:
''
,
name
:
'查看GDS数据'
},
{
type
:
'md-apps'
,
id
:
''
,
name
:
'查看指标'
},
{
type
:
'ios-bookmarks'
,
id
:
''
,
name
:
'查看采集数据'
},
{
type
:
'ios-browsers'
,
id
:
''
,
name
:
'查看采集文件'
},
...
...
@@ -154,6 +158,7 @@ export default {
getPage
:
{},
pageColumns
:
[
{
title
:
'试验项目'
,
key
:
'name'
,
width
:
120
,
fixed
:
'left'
},
{
title
:
'缩写'
,
key
:
'shortName'
,
width
:
90
},
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
150
},
{
title
:
'原始记录填写'
,
key
:
'recorded'
,
width
:
120
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
110
},
...
...
@@ -211,6 +216,9 @@ export default {
// this.$Message.warning('未填写原始记录')
// }
break
case
'查看GDS数据'
:
this
.
_viewGdsData
(
data
.
sampleCode
)
break
case
'查看指标'
:
this
.
_indexManage
(
data
)
break
...
...
@@ -232,6 +240,9 @@ export default {
}
})
},
_viewGdsData
(
id
)
{
this
.
$refs
.
viewGds
.
_openEdit
(
id
)
},
_operationRecord
(
id
)
{
this
.
$refs
.
Operation
.
_open
(
id
)
// 操作日志
...
...
pages/soil-test-manage/test-task-manage/entrust-sample-manage/item-tabs/ItemLeftList.vue
View file @
4bde23b7
...
...
@@ -20,7 +20,7 @@
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:page-columns=
"pageColumns"
:table-name=
"tableName"
:table-height=
"tableHeight"
:get-page=
"getPage"
:is-radio=
"true"
select-data
hide-checkbox
@
on-result-change=
"_tableResultChange"
>
:get-page=
"getPage"
select-data
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in userColumns.length > 0 ?userColumns:pageColumns"
:key=
"item.key"
...
...
pages/soil-test-manage/test-task-manage/entrust-sample-manage/item-tabs/ItemRightList.vue
View file @
4bde23b7
...
...
@@ -6,7 +6,7 @@
<Form
id=
"task-assign-item-right"
:label-width=
"70"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"试样编号:"
>
<Input
v-model=
"formObj.sampleCode"
@
on-enter=
"_formSearch"
placeholder=
"请输入试样编号"
clearable
></Input>
<Input
v-model=
"formObj.
obj.
sampleCode"
@
on-enter=
"_formSearch"
placeholder=
"请输入试样编号"
clearable
></Input>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
...
...
@@ -67,7 +67,11 @@ export default {
name
:
''
,
testMethod
:
''
,
testBasis
:
''
,
sampleCode
:
undefined
obj
:
{
nameList
:
[],
entrustId
:
undefined
,
sampleCode
:
undefined
}
},
entrustId
:
''
,
// 用户自己选中的列
...
...
@@ -355,17 +359,18 @@ export default {
return
obj
},
_page
:
async
function
()
{
const
saveName
=
this
.
leftSelectData
.
name
const
saveMethod
=
this
.
leftSelectData
.
testMethod
const
saveName
=
[]
for
(
let
i
=
0
;
i
<
this
.
leftSelectData
.
length
;
i
++
)
{
saveName
.
push
(
this
.
leftSelectData
[
i
].
name
)
}
// for (let i = 0; i
<
this
.
leftSelectData
.
length
;
i
++
)
{
// saveName.push(this.leftSelectData[i].name)
// saveMethod.push(this.leftSelectData[i].testMethod)
// }
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
.
entrustId
=
this
.
entrustId
this
.
formObj
.
name
=
saveName
this
.
formObj
.
testMethod
=
saveMethod
const
result
=
await
soilTest
.
pageExperimentAllot
(
this
.
formObj
.
obj
.
entrustId
=
this
.
entrustId
this
.
formObj
.
obj
.
nameList
=
saveName
const
result
=
await
soilTest
.
pageExperimentAllotBath
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
...
...
router/routes.js
View file @
4bde23b7
...
...
@@ -2,10 +2,10 @@
* 地址路由
*/
import
Lock
from
'../pages/Lock.vue'
// 锁屏
import
workbench
from
'../pages/soil-sample-manage/sample-preparation/PreparationOther'
import
Index
from
'~/pages/index'
import
Blank
from
'~/pages/blank'
import
SoilRouters
from
'~/router/soil-routes'
export
default
[
{
path
:
'/lock'
,
name
:
'Lock'
,
component
:
Lock
,
meta
:
{
allowBack
:
false
}
},
{
...
...
@@ -25,5 +25,9 @@ export default [
children
:
SoilRouters
,
meta
:
{
title
:
'土工试验LIMS'
}
},
{
path
:
'/blank/item_by_method'
,
component
:
workbench
},
{
path
:
'*'
,
redirect
:
'/'
}
]
router/soil-routes.js
View file @
4bde23b7
...
...
@@ -45,6 +45,12 @@ import DataConsult from '../pages/soil-test-manage/test-data-consult/DataConsult
import
SoilRecordTemplate
from
'../pages/soil-record-template-manage/SoilRecordTemplate'
import
SoilItemReportTemplate
from
'../pages/soil-report-manage/soil-item-report-template/SoilItemReportTemplate'
import
SoilSummarySheet
from
'../pages/soil-report-manage/soil-summary-sheet/SoilSummarySheetTemplate'
import
SoilExpReportMakeIndex
from
'../pages/soil-exp-report/report-make/SoilExpReportMakeIndex'
import
SoilExpReportCheckIndex
from
'../pages/soil-exp-report/report-check/SoilExpReportCheckIndex'
import
SoilExpReportIssueIndex
from
'../pages/soil-exp-report/report-issue/SoilExpReportIssueIndex'
import
SoilExpReportEndIndex
from
'../pages/soil-exp-report/report-end/SoilExpReportEndIndex'
import
Blank
from
'~/pages/blank'
export
default
[
{
...
...
@@ -242,6 +248,35 @@ export default [
}
]
},
{
path
:
'soil_exp_report'
,
component
:
Blank
,
meta
:
{
title
:
'试验项目报告管理'
},
children
:
[
{
path
:
'make'
,
component
:
SoilExpReportMakeIndex
,
meta
:
{
title
:
'项目报告编制'
}
},
{
path
:
'check'
,
component
:
SoilExpReportCheckIndex
,
meta
:
{
title
:
'项目报告审核'
}
},
{
path
:
'issue'
,
component
:
SoilExpReportIssueIndex
,
meta
:
{
title
:
'项目报告签发'
}
},
{
path
:
'end'
,
component
:
SoilExpReportEndIndex
,
meta
:
{
title
:
'项目报告汇总'
}
}
]
},
{
path
:
'aptitude'
,
component
:
Blank
,
...
...
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