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
3441b0ae
Commit
3441b0ae
authored
Sep 29, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加报告编制页面
parent
701c3a88
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
461 additions
and
0 deletions
+461
-0
ReportMakeHis.vue
pages/soil-report-manage/report-make/ReportMakeHis.vue
+0
-0
ReportMakeIndex.vue
pages/soil-report-manage/report-make/ReportMakeIndex.vue
+48
-0
SampleByMakeModal.vue
pages/soil-report-manage/report-make/SampleByMakeModal.vue
+112
-0
ReportInfoMake.vue
pages/soil-report-manage/report-make/tabs/ReportInfoMake.vue
+0
-0
ReportMakeByEntrust.vue
...il-report-manage/report-make/tabs/ReportMakeByEntrust.vue
+289
-0
ReportMakeBySample.vue
...oil-report-manage/report-make/tabs/ReportMakeBySample.vue
+0
-0
soil-routes.js
router/soil-routes.js
+12
-0
No files found.
pages/soil-report-manage/report-make/ReportMakeHis.vue
0 → 100644
View file @
3441b0ae
This diff is collapsed.
Click to expand it.
pages/soil-report-manage/report-make/ReportMakeIndex.vue
0 → 100644
View file @
3441b0ae
<
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=
"check"
>
<ReportMakeByEntrust
ref=
"checkTabs"
></ReportMakeByEntrust>
</el-tab-pane>
<el-tab-pane
label=
"历史报告"
name=
"checkHis"
>
<ReportMakeHis
ref=
"checkHisTabs"
></ReportMakeHis>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</
template
>
<
script
>
import
ReportMakeByEntrust
from
'./tabs/ReportMakeByEntrust'
import
ReportMakeHis
from
'./ReportMakeHis'
export
default
{
components
:
{
ReportMakeByEntrust
,
ReportMakeHis
},
data
()
{
return
{
activeName
:
'check'
}
},
mounted
()
{
this
.
activeName
=
'check'
this
.
$refs
.
checkTabs
.
_page
()
},
methods
:
{
_changeTabs
(
tab
,
event
)
{
if
(
tab
.
name
===
'check'
)
{
this
.
$refs
.
checkTabs
.
_open
()
}
else
if
(
tab
.
name
===
'applyRecord'
)
{
// this.$refs.applyRecordTabs._page()
}
else
{
this
.
$refs
.
checkHisTabs
.
_page
()
}
}
}
}
</
script
>
pages/soil-report-manage/report-make/SampleByMakeModal.vue
0 → 100644
View file @
3441b0ae
<
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=
"sample"
>
<ReportMakeBySample
ref=
"sampleTabs"
@
on-result-change=
"_sampleTabResult"
></ReportMakeBySample>
</el-tab-pane>
<el-tab-pane
label=
"报告台账"
name=
"report"
>
<ReportInfoMake
ref=
"reportTabs"
></ReportInfoMake>
</el-tab-pane>
</el-tabs>
</div>
</Modal>
</div>
</
template
>
<
script
>
import
ReportInfoMake
from
'./tabs/ReportInfoMake'
import
ReportMakeBySample
from
'./tabs/ReportMakeBySample'
export
default
{
components
:
{
ReportMakeBySample
,
ReportInfoMake
},
data
()
{
return
{
showModal
:
false
,
modalTitle
:
''
,
activeName
:
''
,
contractId
:
''
,
type
:
''
,
personal
:
''
}
},
computed
:
{
tableHeight
:
function
()
{
return
document
.
documentElement
.
clientHeight
-
135
}
},
methods
:
{
_open
(
contractId
,
title
,
type
,
personal
)
{
this
.
modalTitle
=
'管理样品和报告'
this
.
showModal
=
true
this
.
activeName
=
'sample'
this
.
contractId
=
contractId
this
.
type
=
type
this
.
personal
=
personal
// 先初始化样品台账的数据
// 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
.
contractId
,
this
.
personal
)
},
_sample
()
{
this
.
$refs
.
sampleTabs
.
_open
(
this
.
contractId
,
this
.
type
,
this
.
personal
)
},
_changeTabs
(
tab
,
event
)
{
switch
(
tab
.
name
)
{
case
'sample'
:
this
.
_sample
()
break
case
'report'
:
this
.
_report
()
break
}
},
_sampleTabResult
(
msg
)
{
if
(
msg
===
'changeTab'
)
{
this
.
activeName
=
'report'
this
.
$refs
.
reportTabs
.
_open
(
this
.
contractId
,
this
.
personal
)
}
}
}
}
</
script
>
pages/soil-report-manage/report-make/tabs/ReportInfoMake.vue
0 → 100644
View file @
3441b0ae
This diff is collapsed.
Click to expand it.
pages/soil-report-manage/report-make/tabs/ReportMakeByEntrust.vue
0 → 100644
View file @
3441b0ae
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-form-make-contract"
:label-width=
"90"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"委托单位:"
>
<Input
@
on-enter=
"_formSearch"
name=
"cname"
placeholder=
"请输入委托单位"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
@
on-enter=
"_formSearch"
name=
"code"
placeholder=
"请输入委托编号"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"样品编号:"
>
<Input
@
on-enter=
"_formSearch"
name=
"num"
placeholder=
"请输入样品编号"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
>
<btn-list
:open=
"searchOpen"
@
on-result-change=
"_btnClick"
:showSearchBtn=
"true"
:msg=
"btn"
class=
"contHide"
>
<!--
<template
slot=
"processTask"
>
-->
<!--
<div
class=
"fr process-task"
>
-->
<!--
<el-checkbox
v-model=
"personal"
@
change=
"_page"
:true-label=
"1"
:false-label=
"0"
size=
"medium"
>
-->
<!-- 个人任务-->
<!--
</el-checkbox>
-->
<!--
<el-checkbox
v-model=
"onlyReportMake"
@
change=
"_page"
:true-label=
"1"
--
>
<!-- :false-label="0" size="medium">只显示待编报告-->
<!--
</el-checkbox>
-->
<!--
</div>
-->
<!--
</
template
>
-->
</btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
:rows=
"100"
>
<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"
>
<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"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</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>
</div>
</div>
<SampleByMakeModal
ref=
"sampleByMakeModal"
></SampleByMakeModal>
</div>
</template>
<
script
>
import
{
soilTest
}
from
'../../../../api'
import
SampleByMakeModal
from
'../SampleByMakeModal'
export
default
{
components
:
{
SampleByMakeModal
},
data
()
{
return
{
typeList
:
[{
name
:
'企业'
,
value
:
0
},
{
name
:
'政府'
,
value
:
1
}],
currentComponent
:
''
,
getPage
:
{},
formObj
:
{},
pageColumns
:
[
{
title
:
'委托单位'
,
key
:
'cname'
,
width
:
180
,
detail
:
true
,
fixed
:
'left'
},
{
title
:
'委托名称'
,
key
:
'name'
,
width
:
160
},
{
title
:
'委托编号'
,
key
:
'code'
,
width
:
180
},
{
title
:
'类型'
,
key
:
'type'
,
width
:
80
,
type
:
true
},
{
title
:
'状态'
,
key
:
'progress'
,
width
:
110
,
status
:
true
},
{
title
:
'应出报告日期'
,
key
:
'reportDueDate'
,
width
:
130
,
date
:
true
},
{
title
:
'是否判定'
,
key
:
'judge'
,
width
:
100
,
judge
:
true
},
{
title
:
'报告剩余天数'
,
key
:
'reportRemainDay'
,
width
:
130
,
day
:
true
},
{
title
:
'报告进度统计'
,
key
:
'reportProgress'
,
width
:
450
},
{
title
:
'主联系人'
,
key
:
'linkman'
,
width
:
100
},
{
title
:
'联系手机'
,
key
:
'tel'
,
width
:
120
},
{
title
:
'检测类型'
,
key
:
'detectType'
,
width
:
130
},
{
title
:
'服务类型'
,
key
:
'serviceType'
,
width
:
120
},
{
title
:
'是否带照片'
,
key
:
'havePhoto'
,
width
:
120
},
{
title
:
'报告语言'
,
key
:
'reportType'
,
width
:
100
},
{
title
:
'报告类别'
,
key
:
'reportClass'
,
width
:
120
},
{
title
:
'备注'
,
key
:
'remark'
}
],
iconMsg
:
[
{
type
:
'ios-flask-outline'
,
id
:
''
,
name
:
'管理样品和报告'
},
{
type
:
'ios-document-outline'
,
id
:
''
,
name
:
'检测项目'
},
{
type
:
'ios-cloud-outline'
,
id
:
''
,
name
:
'附件'
},
{
type
:
'ios-clock-outline'
,
id
:
''
,
name
:
'操作记录'
,
componentName
:
'FoodContractRecord'
}
],
onlyReportMake
:
1
,
searchOpen
:
false
,
btn
:
[
{
type
:
'primary'
,
id
:
'food-report-make-maintain-info'
,
name
:
'信息维护'
}
],
selectIds
:
[],
personal
:
0
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'tabSearchTwo'
)
}
else
{
return
this
.
$tableHeight
(
'tabNoSearch'
)
}
}
},
mounted
()
{
// this._dicSearch()
},
methods
:
{
_open
()
{
// this._dicSearch()
},
_reportDateChange
(
data
)
{
$
(
'input[name="reportDueDateBegin"]'
).
val
(
data
[
0
])
$
(
'input[name="reportDueDateEnd"]'
).
val
(
data
[
1
])
},
// 从字典查预警期
_dicSearch
()
{
// 食品报告编制个人任务是否勾选
const
data
=
[
'食品报告编制个人任务是否勾选'
]
this
.
$store
.
dispatch
(
'LmsBaseDict/listDict'
,
data
).
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
LmsBaseDict
.
list
const
personalList
=
result
[
0
]
// 食品报告编制个人任务是否勾选
if
(
personalList
.
length
&&
personalList
[
0
].
name
===
'是'
)
{
this
.
personal
=
1
}
else
{
this
.
personal
=
0
}
this
.
_page
()
})
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'信息维护'
:
this
.
_maintainInfo
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
// 信息维护
_maintainInfo
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
currentComponent
=
'MaintainInfoModal'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
,
1
)
})
}
},
_iconClick
(
res
,
data
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
case
'管理样品和报告'
:
this
.
$refs
.
sampleByMakeModal
.
_open
(
data
.
id
,
data
.
cname
+
'【'
+
data
.
code
+
'】'
,
data
.
type
,
this
.
personal
)
break
case
'检测项目'
:
this
.
$refs
.
refModal
.
_open
(
data
)
break
case
'操作记录'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
)
break
case
'附件'
:
this
.
_upload
(
data
.
id
)
break
}
})
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
FoodContract
.
page
this
.
selectIds
=
[]
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
pageExpTest
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_detailModal
(
id
,
type
)
{
// 查看
this
.
$store
.
dispatch
(
'FoodContract/getById'
,
id
).
then
(()
=>
{
if
(
type
===
0
)
{
// 企业委托 ’0‘
this
.
currentComponent
=
'FoodContractCompanyDetail'
}
else
{
// 政府委托 ’1‘
this
.
currentComponent
=
'FoodContractGovernDetail'
}
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodContract
.
model
)
})
})
},
_upload
(
id
)
{
// 上传文件
this
.
$refs
.
refModal
.
_open
(
id
,
'contractId'
)
}
}
}
</
script
>
pages/soil-report-manage/report-make/tabs/ReportMakeBySample.vue
0 → 100644
View file @
3441b0ae
This diff is collapsed.
Click to expand it.
router/soil-routes.js
View file @
3441b0ae
...
@@ -17,6 +17,7 @@ import TestTaskIndex from '../pages/soil-test-manage/test-task-manage/TestTaskIn
...
@@ -17,6 +17,7 @@ import TestTaskIndex from '../pages/soil-test-manage/test-task-manage/TestTaskIn
import
TestInputIndex
from
'../pages/soil-test-manage/test-input/TestInputIndex'
import
TestInputIndex
from
'../pages/soil-test-manage/test-input/TestInputIndex'
import
CheckIndex
from
'../pages/soil-test-manage/test-data-check/CheckIndex'
import
CheckIndex
from
'../pages/soil-test-manage/test-data-check/CheckIndex'
import
AuditIndex
from
'../pages/soil-test-manage/test-data-audit/AuditIndex'
import
AuditIndex
from
'../pages/soil-test-manage/test-data-audit/AuditIndex'
import
ReportMakeIndex
from
'../pages/soil-report-manage/report-make/ReportMakeIndex'
import
Blank
from
'~/pages/blank'
import
Blank
from
'~/pages/blank'
export
default
[
export
default
[
{
{
...
@@ -103,6 +104,17 @@ export default [
...
@@ -103,6 +104,17 @@ export default [
]
]
},
},
{
{
path
:
'report'
,
component
:
Blank
,
children
:
[
{
path
:
'make_report'
,
component
:
ReportMakeIndex
,
meta
:
{
title
:
'报告编制'
}
}
]
},
{
path
:
'aptitude'
,
path
:
'aptitude'
,
component
:
Blank
,
component
:
Blank
,
children
:
[
children
:
[
...
...
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