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
4a3cb708
Commit
4a3cb708
authored
Jan 11, 2021
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了报告审核
parent
9a415c72
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
523 additions
and
4 deletions
+523
-4
soil-statistics.js
api/soil/soil-statistics.js
+4
-0
soil-test.js
api/soil/soil-test.js
+2
-0
SampleByMakeModal.vue
pages/soil-report-manage/report-audit/SampleByMakeModal.vue
+115
-0
SummaryInfo.vue
pages/soil-report-manage/report-audit/SummaryInfo.vue
+391
-0
reportAudit.vue
pages/soil-report-manage/report-audit/tabs/reportAudit.vue
+10
-2
SummaryInfo.vue
pages/soil-report-manage/report-make/tabs/SummaryInfo.vue
+1
-2
No files found.
api/soil/soil-statistics.js
View file @
4a3cb708
...
@@ -93,5 +93,9 @@ export default {
...
@@ -93,5 +93,9 @@ export default {
summaryReportSubmit
:
data
=>
summaryReportSubmit
:
data
=>
http
http
.
post
(
'soil/v1/report/summary_report_submit?ids='
+
data
)
.
post
(
'soil/v1/report/summary_report_submit?ids='
+
data
)
.
then
(
res
=>
res
),
summaryReportCheckSubmit
:
data
=>
http
.
post
(
'soil/v1/report/summary_report_check_submit?ids='
+
data
)
.
then
(
res
=>
res
)
.
then
(
res
=>
res
)
}
}
api/soil/soil-test.js
View file @
4a3cb708
...
@@ -197,6 +197,8 @@ export default {
...
@@ -197,6 +197,8 @@ export default {
deleteReport
:
data
=>
deleteReport
:
data
=>
http
.
delete
(
'soil/v1/exp_report/?ids='
+
data
).
then
(
res
=>
res
),
http
.
delete
(
'soil/v1/exp_report/?ids='
+
data
).
then
(
res
=>
res
),
reportPage
:
data
=>
http
.
post
(
'soil/v1/report/page'
,
data
).
then
(
res
=>
res
),
reportPage
:
data
=>
http
.
post
(
'soil/v1/report/page'
,
data
).
then
(
res
=>
res
),
pageSummaryCheck
:
data
=>
http
.
post
(
'soil/v1/report/page_summary_check'
,
data
).
then
(
res
=>
res
),
dataGds
:
data
=>
http
.
get
(
'soil/v1/data_gds/'
+
data
).
then
(
res
=>
res
),
dataGds
:
data
=>
http
.
get
(
'soil/v1/data_gds/'
+
data
).
then
(
res
=>
res
),
gdsGetMainInfo
:
data
=>
gdsGetMainInfo
:
data
=>
http
http
...
...
pages/soil-report-manage/report-audit/SampleByMakeModal.vue
0 → 100644
View file @
4a3cb708
<
template
>
<div>
<!--内容-->
<Modal
v-model=
"showModal"
:width=
"100"
class=
"modal-footer-none modal-top-0"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<el-tabs
v-model=
"activeName"
@
tab-click=
"_changeTabs"
>
<el-tab-pane
label=
"汇总报告台账"
name=
"summary"
>
<SummaryInfo
ref=
"summaryTabs"
></SummaryInfo>
</el-tab-pane>
</el-tabs>
</div>
</Modal>
</div>
</
template
>
<
script
>
import
SummaryInfo
from
'./SummaryInfo'
export
default
{
components
:
{
SummaryInfo
},
data
()
{
return
{
showModal
:
false
,
modalTitle
:
''
,
activeName
:
''
,
contractId
:
''
,
entrustId
:
''
,
type
:
''
,
personal
:
''
}
},
computed
:
{
tableHeight
:
function
()
{
return
document
.
documentElement
.
clientHeight
-
135
}
},
methods
:
{
_open
(
entrustId
)
{
this
.
modalTitle
=
'查看汇总报告'
this
.
showModal
=
true
this
.
activeName
=
'summary'
this
.
entrustId
=
entrustId
this
.
$refs
.
summaryTabs
.
_open
(
this
.
entrustId
)
console
.
log
(
this
.
entrustId
)
// 先初始化样品台账的数据
// this.$nextTick(() =>
// this.$refs.sampleTabs._getPage(
// this.contractId,
// this.type,
// this.personal
// )
// )
// this._sampleData(contractId)
},
// 判断待编样品是否为0
_sampleData
(
contractId
)
{
const
data
=
{
contractId
:
contractId
,
onlyReportMake
:
1
,
reported
:
0
,
page
:
1
,
rows
:
50
,
personal
:
this
.
personal
}
this
.
$store
.
dispatch
(
'FoodSample/pageSampleReportMake'
,
data
).
then
(()
=>
{
const
records
=
this
.
$store
.
state
.
FoodSample
.
page
.
records
if
(
records
.
length
===
0
)
{
this
.
activeName
=
'report'
this
.
$nextTick
(()
=>
this
.
_report
())
}
else
{
this
.
activeName
=
'sample'
this
.
$nextTick
(()
=>
this
.
$refs
.
sampleTabs
.
_getPage
(
this
.
contractId
,
this
.
type
,
this
.
personal
)
)
}
})
},
_report
()
{
this
.
$refs
.
reportTabs
.
_open
(
this
.
entrustId
)
},
_sample
()
{
console
.
log
(
this
.
entrustId
)
this
.
$refs
.
sampleTabs
.
_open
(
this
.
entrustId
)
},
_summary
()
{
this
.
$refs
.
summaryTabs
.
_open
(
this
.
entrustId
)
},
_changeTabs
(
tab
,
event
)
{
switch
(
tab
.
name
)
{
case
'sample'
:
this
.
_sample
()
break
case
'report'
:
this
.
_report
()
break
case
'summary'
:
this
.
_summary
()
break
}
}
// _sampleTabResult(msg) {
// if (msg === 'changeTab') {
// this.activeName = 'report'
// this.$refs.reportTabs._open(this.contractId, this.personal)
// }
// }
}
}
</
script
>
pages/soil-report-manage/report-audit/SummaryInfo.vue
0 → 100644
View file @
4a3cb708
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--查询-->
<Col
span=
"24"
>
<btn-list
:open=
"searchOpen"
@
on-result-change=
"_btnClick"
:showSearchBtn=
"true"
:msg=
"btn"
class=
"contHide"
>
</btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:pageColumns=
"pageColumns"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
:tableName=
"tableName"
select-data
is-report
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in (userColumns.length>0?userColumns: pageColumns)"
:key=
"item.key"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-else-if=
"item.dateTime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM:ss'
):
''
}}
</div>
<div
v-else-if=
"item.judge"
>
{{
Number
(
scope
.
row
[
item
.
key
])
===
1
?
'是'
:
'否'
}}
</div>
<div
v-else-if=
"item.notOkCount"
>
<span
v-if=
"scope.row[item.key] === 0"
class=
"blue-color"
>
合格
</span>
<span
v-else
class=
"red-color"
>
不合格
</span>
</div>
<div
v-else-if=
"item.key==='progress'"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
<
template
slot=
"setting"
>
<VXESettingCol
:pageColumns=
"pageColumns"
:userColumns=
"userColumns"
@
on-result-change=
"_resetColumn"
:table-name=
"tableName"
></VXESettingCol>
</
template
>
</PTVXETable>
</Col>
</Row>
</div>
</div>
<Modal
v-model=
"showIssueModal"
@
on-cancel=
"_issueCancel"
@
on-ok=
"_issueOk"
class=
"zIndex-1100"
>
<p
slot=
"header"
>
请选择签发日期
</p>
签发日期:
<DatePicker
:editable=
"false"
v-model=
"issueDateTemp"
@
on-change=
'_issueChange'
placeholder=
"请选择签发日期"
style=
"width:400px"
>
</DatePicker>
</Modal>
</div>
</template>
<
script
>
import
http
from
'../../../api/http'
import
{
soilReport
,
soilStatistics
,
soilTest
}
from
'../../../api'
import
Global
from
'../../../api/config'
/**
* 报告编制的-待办-报告台账
*/
export
default
{
components
:
{},
data
()
{
return
{
notOkCountList
:
[
{
value
:
0
,
name
:
'合格'
},
{
value
:
1
,
name
:
'不合格'
}
],
currentComponent
:
''
,
searchOpen
:
false
,
getPage
:
{},
pageColumns
:
[
{
title
:
'创建人'
,
key
:
'uname'
,
width
:
180
,
fixed
:
'left'
},
{
title
:
'报告类型'
,
key
:
'reportType'
,
width
:
180
},
{
title
:
'备注'
,
key
:
'remark'
,
width
:
180
},
{
title
:
'创建时间'
,
key
:
'ctime'
,
width
:
180
,
dateTime
:
true
}
],
btn
:
[
{
type
:
'primary'
,
id
:
''
,
name
:
'提交'
}
],
selectIds
:
[],
selectData
:
[],
formObj
:
{
entrustId
:
''
},
dateList
:
[],
iconMsg
:
[{
type
:
'ios-book'
,
id
:
''
,
name
:
'预览报告'
}],
// 签发日期
issueDateTemp
:
''
,
issueDate
:
''
,
showIssueModal
:
false
,
reportId
:
''
,
tempId
:
''
,
reportType
:
'FOOD_REPORT_MAKE'
,
// 批量还是单个生成报告
reportBatch
:
false
,
reportBatchData
:
{},
dataPushedList
:
[{
value
:
0
,
name
:
'否'
},
{
value
:
1
,
name
:
'是'
}],
userColumns
:
[],
tableName
:
'food-report-make-report-info-by-contract'
,
reportStatus
:
'FLOW_REPORT_MAKE'
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'tabSearchTwo'
)
}
else
{
return
this
.
$tableHeight
(
'tabNoSearch'
)
}
}
},
mounted
()
{},
methods
:
{
// 重置column
_resetColumn
(
colList
)
{
this
.
userColumns
=
colList
this
.
$refs
.
pageTable
.
_loadColumn
(
colList
)
},
// 盖章
_toPDF
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
)
}
},
_reportDateChange
(
data
)
{
this
.
formObj
.
reportDueDateBegin
=
data
[
0
]
this
.
formObj
.
reportDueDateEnd
=
data
[
1
]
},
// 签发日期
_issueChange
(
data
)
{
if
(
data
)
{
this
.
issueDate
=
data
}
},
_modalResult
(
data
)
{
switch
(
this
.
currentComponent
)
{
case
'Reason'
:
this
.
_overdueReason
(
data
)
break
case
'ReportTemplateModal'
:
this
.
_regenerate
(
data
)
break
case
'AssignPerson'
:
this
.
_auditorResult
(
data
)
break
default
:
this
.
_page
()
}
},
_iconClick
(
res
,
data
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
case
'上传'
:
this
.
_upload
(
data
.
id
)
break
case
'预览报告'
:
this
.
_reportView
(
data
)
break
case
'操作记录'
:
this
.
_record
(
data
.
id
)
break
case
'项目台账'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
)
break
case
'历史版本'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
,
this
.
reportType
)
break
case
'附件'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
,
'reportId'
)
break
case
'档案查看'
:
this
.
reportViewFiles
(
data
,
{
location
:
'report'
,
archivesType
:
'reportManage'
})
break
}
})
},
_upload
(
id
)
{
this
.
$refs
.
refModal
.
_open
(
id
)
},
_reportView
(
data
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
_recordView
(
data
.
originalRecordId
)
}
},
_reportMakeLook
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilReport
.
reportGetById
(
data
.
id
)
if
(
result
)
{
console
.
log
(
'result'
)
this
.
_viewReport
(
result
)
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
12
,
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
)
}
}
}
}
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'selectData'
:
this
.
selectData
=
data
this
.
selectIds
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
this
.
selectIds
.
push
(
data
[
i
].
id
)
}
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'table-col'
:
console
.
log
(
'table-col'
,
data
)
this
.
userColumns
=
data
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_open
(
entrustId
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
formObj
.
entrustId
=
entrustId
this
.
showIssueModal
=
false
this
.
_page
()
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
pageSummaryCheck
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_record
(
id
)
{
// 操作记录
this
.
$refs
.
refModal
.
_open
(
id
)
},
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'提交'
:
this
.
_submit
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
// 选择审核人
_selectAuditor
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
'auditor'
,
'选择审核人'
)
}
},
_editReportAptitude
()
{
this
.
$refs
.
refModal
.
_open
(
this
.
formObj
.
contractId
)
},
_batchOverdueReason
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
'超期原因'
)
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_page
()
},
_issueCancel
()
{
this
.
showIssueModal
=
false
},
// 选择时间ok
_issueOk
()
{
this
.
showIssueModal
=
false
this
.
_createOk
()
},
_downloadBatch
()
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定要下载这 '
+
ids
.
length
+
' 个报告?'
,
onOk
:
()
=>
{
const
obj
=
{
ids
:
ids
.
join
(
','
),
contractId
:
this
.
formObj
.
contractId
,
flag
:
0
}
http
.
open
(
Global
.
baseURL
+
'/food/v1/sample_report/download_batch_by_sampleIds'
,
obj
,
'_blank'
)
}
})
}
},
_submit
()
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
this
.
_submitSummaryReportConfirm
(
ids
,
`确认要提交
${
ids
.
length
}
条数据吗?`
)
}
},
_submitSummaryReportConfirm
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
`确定要处理该条数据吗?`
,
onOk
:
()
=>
{
this
.
_submitSummaryReportOk
(
ids
)
}
})
},
async
_submitSummaryReportOk
(
ids
)
{
const
result
=
await
soilStatistics
.
summaryReportCheckSubmit
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功!'
)
}
}
}
}
</
script
>
pages/soil-report-manage/report-audit/tabs/reportAudit.vue
View file @
4a3cb708
...
@@ -65,6 +65,7 @@
...
@@ -65,6 +65,7 @@
<FileManage
ref=
"FileManage"
@
on-result-change=
"_fileResult"
/>
<FileManage
ref=
"FileManage"
@
on-result-change=
"_fileResult"
/>
<Reason
ref=
"reasonModal"
@
on-result-change=
"_reasonResult"
/>
<Reason
ref=
"reasonModal"
@
on-result-change=
"_reasonResult"
/>
<OperationModal
ref=
"operationModal"
/>
<OperationModal
ref=
"operationModal"
/>
<SampleByMakeModal
ref=
"summaryModal"
></SampleByMakeModal>
</div>
</div>
</template>
</template>
...
@@ -74,9 +75,10 @@ import { soilSample, soilStatistics } from '../../../../api'
...
@@ -74,9 +75,10 @@ import { soilSample, soilStatistics } from '../../../../api'
import
global
from
'../../../../api/config'
import
global
from
'../../../../api/config'
import
Reason
from
'../../../../components/base/Reason'
import
Reason
from
'../../../../components/base/Reason'
import
OperationModal
from
'../../../../components/operation/Operation'
import
OperationModal
from
'../../../../components/operation/Operation'
import
SampleByMakeModal
from
'../SampleByMakeModal'
export
default
{
export
default
{
name
:
'PreparationManage'
,
name
:
'PreparationManage'
,
components
:
{
Reason
,
OperationModal
},
components
:
{
Reason
,
OperationModal
,
SampleByMakeModal
},
data
()
{
data
()
{
return
{
return
{
name
:
''
,
name
:
''
,
...
@@ -110,6 +112,7 @@ export default {
...
@@ -110,6 +112,7 @@ export default {
selectData
:
[],
selectData
:
[],
iconMsg
:
[
iconMsg
:
[
{
id
:
''
,
type
:
'md-image'
,
name
:
'预览报告'
},
{
id
:
''
,
type
:
'md-image'
,
name
:
'预览报告'
},
{
id
:
''
,
type
:
'ios-book'
,
name
:
'查看汇总报告'
},
{
id
:
''
,
type
:
'ios-cloud'
,
name
:
'附件'
},
{
id
:
''
,
type
:
'ios-cloud'
,
name
:
'附件'
},
{
id
:
''
,
type
:
'ios-clock'
,
name
:
'操作日志'
}
{
id
:
''
,
type
:
'ios-clock'
,
name
:
'操作日志'
}
]
]
...
@@ -271,6 +274,9 @@ export default {
...
@@ -271,6 +274,9 @@ export default {
case
'预览报告'
:
case
'预览报告'
:
this
.
_viewReport
(
data
)
this
.
_viewReport
(
data
)
break
break
case
'查看汇总报告'
:
this
.
_viewSummary
(
data
)
break
case
'操作日志'
:
case
'操作日志'
:
this
.
_record
(
data
.
id
)
this
.
_record
(
data
.
id
)
break
break
...
@@ -282,7 +288,9 @@ export default {
...
@@ -282,7 +288,9 @@ export default {
_viewReport
(
data
)
{
_viewReport
(
data
)
{
this
.
_getObjectKey
(
data
)
this
.
_getObjectKey
(
data
)
},
},
_viewSummary
(
data
)
{
this
.
$refs
.
summaryModal
.
_open
(
data
.
id
)
},
_getObjectKey
:
async
function
(
data
)
{
_getObjectKey
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
getReport
(
data
.
id
)
const
result
=
await
soilSample
.
getReport
(
data
.
id
)
if
(
result
)
{
if
(
result
)
{
...
...
pages/soil-report-manage/report-make/tabs/SummaryInfo.vue
View file @
4a3cb708
...
@@ -63,7 +63,6 @@
...
@@ -63,7 +63,6 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
global
from
'../../../../api/config'
import
http
from
'../../../../api/http'
import
http
from
'../../../../api/http'
import
{
soilReport
,
soilStatistics
,
soilTest
}
from
'../../../../api'
import
{
soilReport
,
soilStatistics
,
soilTest
}
from
'../../../../api'
import
Global
from
'../../../../api/config'
import
Global
from
'../../../../api/config'
...
@@ -352,7 +351,7 @@ export default {
...
@@ -352,7 +351,7 @@ export default {
flag
:
0
flag
:
0
}
}
http
.
open
(
http
.
open
(
g
lobal
.
baseURL
+
G
lobal
.
baseURL
+
'/food/v1/sample_report/download_batch_by_sampleIds'
,
'/food/v1/sample_report/download_batch_by_sampleIds'
,
obj
,
obj
,
'_blank'
'_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