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
d612f605
Commit
d612f605
authored
Jan 09, 2021
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
土工试验Lims
parent
108fad10
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
3819 additions
and
115 deletions
+3819
-115
meter-entrust.js
api/meter/meter-entrust.js
+17
-1
soil-statistics.js
api/soil/soil-statistics.js
+26
-1
soil-test.js
api/soil/soil-test.js
+4
-0
SampleItemSelect.vue
pages/meter-aptitude/standard-manage/SampleItemSelect.vue
+0
-20
StandardManage.vue
pages/meter-aptitude/standard-manage/StandardManage.vue
+0
-18
SampleItemEdit.vue
pages/meter-entrust/entrust-register/SampleItemEdit.vue
+0
-6
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
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
soil-routes.js
router/soil-routes.js
+35
-0
No files found.
api/meter/meter-entrust.js
View file @
d612f605
...
...
@@ -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 @
d612f605
...
...
@@ -53,5 +53,30 @@ 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
)
}
api/soil/soil-test.js
View file @
d612f605
...
...
@@ -178,6 +178,10 @@ 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
=>
...
...
pages/meter-aptitude/standard-manage/SampleItemSelect.vue
View file @
d612f605
<!--检测项目编辑列表(添加、导入检测项目)-->
<
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 @
d612f605
...
...
@@ -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/SampleItemEdit.vue
View file @
d612f605
...
...
@@ -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-exp-report/report-check/SoilExpReportCheckIndex.vue
0 → 100644
View file @
d612f605
<
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 @
d612f605
<
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 @
d612f605
<
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 @
d612f605
<
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 @
d612f605
<
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 @
d612f605
<
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 @
d612f605
<
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 @
d612f605
<
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 @
d612f605
<
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 @
d612f605
<
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 @
d612f605
<
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 @
d612f605
<
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 @
d612f605
<
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 @
d612f605
<
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 @
d612f605
...
...
@@ -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-statistics/personal-task/MeterPersonalTask.vue
View file @
d612f605
...
...
@@ -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 @
d612f605
...
...
@@ -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 @
d612f605
...
...
@@ -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
)
...
...
router/soil-routes.js
View file @
d612f605
...
...
@@ -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