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
b67b6ec6
Commit
b67b6ec6
authored
Jul 29, 2020
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
8ac9d0f9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
31 deletions
+52
-31
meter-sample.js
api/meter/meter-sample.js
+12
-2
MeterSampleInput.vue
pages/meter-send/sample-input/MeterSampleInput.vue
+28
-12
SelectOriTempRecordExcel.vue
pages/meter-send/sample-input/SelectOriTempRecordExcel.vue
+9
-16
common.js
plugins/common.js
+3
-1
No files found.
api/meter/meter-sample.js
View file @
b67b6ec6
...
@@ -158,7 +158,15 @@ export default {
...
@@ -158,7 +158,15 @@ export default {
https
https
.
post
(
'meter/v1/sample/report_generate'
,
JSON
.
stringify
(
data
))
.
post
(
'meter/v1/sample/report_generate'
,
JSON
.
stringify
(
data
))
.
then
(
res
=>
res
),
.
then
(
res
=>
res
),
generateExcelReport
:
data
=>
http
.
post
(
'meter/v1/sample/excel_report_generate?sampleId='
+
data
.
sampleId
+
'&templateId='
+
data
.
id
)
.
then
(
res
=>
res
),
subpackageInfoReg
:
data
=>
subpackageInfoReg
:
data
=>
http
http
.
post
(
'meter/v1/sample/subpackage_info_reg?ids='
+
data
.
ids
,
data
.
reg
)
.
post
(
'meter/v1/sample/subpackage_info_reg?ids='
+
data
.
ids
,
data
.
reg
)
...
@@ -309,5 +317,7 @@ export default {
...
@@ -309,5 +317,7 @@ export default {
'&remark='
+
'&remark='
+
data
.
remark
data
.
remark
)
)
.
then
(
res
=>
res
)
.
then
(
res
=>
res
),
getCertificateReport
:
data
=>
http
.
post
(
'meter/v1/sample/get_certificate_report?sampleId='
+
data
)
}
}
pages/meter-send/sample-input/MeterSampleInput.vue
View file @
b67b6ec6
...
@@ -336,10 +336,17 @@ export default {
...
@@ -336,10 +336,17 @@ export default {
},
},
_makeCertificateExcel
(
data
)
{
_makeCertificateExcel
(
data
)
{
if
(
data
.
onlineReported
===
'否'
||
undefined
===
data
.
recordId
)
{
if
(
data
.
onlineReported
===
'否'
)
{
this
.
$refs
.
SelectOriTempRecordExcel
.
_open
(
data
.
id
,
data
)
this
.
$refs
.
SelectOriTempRecordExcel
.
_open
(
data
.
id
,
data
)
}
else
{
}
else
{
this
.
_itemOriginalRecordLook
(
data
,
'write'
)
this
.
_reportMakeLook
(
data
)
}
},
_reportMakeLook
:
async
function
(
data
)
{
const
result
=
await
meterSample
.
getCertificateReport
(
data
.
id
)
if
(
result
)
{
this
.
_viewReport
(
result
)
}
}
},
},
...
@@ -432,6 +439,17 @@ export default {
...
@@ -432,6 +439,17 @@ export default {
}
}
}
}
},
},
_viewReport
(
data
)
{
if
(
data
)
{
alert
(
data
.
objectKey
)
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
})
}
},
_certificateSelectExcelBack
(
data
)
{
_certificateSelectExcelBack
(
data
)
{
if
(
data
)
{
if
(
data
)
{
// this.$refs.itemOriginalRecordModal._open(
// this.$refs.itemOriginalRecordModal._open(
...
@@ -439,8 +457,9 @@ export default {
...
@@ -439,8 +457,9 @@ export default {
// data.tempId,
// data.tempId,
// data.dataSource
// data.dataSource
// )
// )
console
.
log
(
'_certificateSelectBack--'
,
data
)
//
console.log('_certificateSelectBack--', data)
this
.
_makeCodeExcel
(
data
)
this
.
_makeCodeExcel
(
data
)
// this._viewReport(data)
}
else
{
}
else
{
const
ids
=
this
.
selectIds
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
if
(
ids
.
length
===
0
)
{
...
@@ -468,18 +487,15 @@ export default {
...
@@ -468,18 +487,15 @@ export default {
},
},
_makeCodeExcel
:
async
function
(
data
)
{
_makeCodeExcel
:
async
function
(
data
)
{
const
result
=
await
meterSample
.
mak
eExcelReport
(
data
)
const
result
=
await
meterSample
.
generat
eExcelReport
(
data
)
if
(
result
)
{
if
(
result
)
{
if
(
result
===
''
||
result
===
undefined
)
{
if
(
result
===
null
||
result
===
undefined
)
{
this
.
$Message
.
warning
(
'证书编
号暂未生成
!'
)
this
.
$Message
.
warning
(
'证书编
制失败,请联系管理员
!'
)
return
false
return
false
}
else
{
this
.
$emit
(
'on-result-change'
)
this
.
_viewReport
(
result
)
}
}
data
.
dataSource
.
cc
=
result
this
.
$refs
.
itemOriginalRecordModal
.
_open
(
data
.
sampleId
,
data
.
tempId
,
data
.
dataSource
)
}
}
},
},
...
...
pages/meter-send/sample-input/SelectOriTempRecordExcel.vue
View file @
b67b6ec6
...
@@ -38,8 +38,8 @@
...
@@ -38,8 +38,8 @@
:icon-msg=
"iconMsg"
:icon-msg=
"iconMsg"
:is-radio=
"true"
:is-radio=
"true"
select-data=
"true"
select-data=
"true"
@
on-result-change=
"_tableResultChange"
hide-checkbox
hide-checkbox
>
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
<vxe-table-column
v-for=
"item in pageColumns"
v-for=
"item in pageColumns"
:key=
"item.key"
:key=
"item.key"
...
@@ -98,16 +98,16 @@ export default {
...
@@ -98,16 +98,16 @@ export default {
{
title
:
'类别'
,
key
:
'classType'
,
width
:
140
},
{
title
:
'类别'
,
key
:
'classType'
,
width
:
140
},
{
title
:
'备注'
,
key
:
'remark'
}
{
title
:
'备注'
,
key
:
'remark'
}
],
],
catalogu
eId
:
''
,
sampl
eId
:
''
,
getPage
:
{},
getPage
:
{},
selectData
:
[]
selectData
:
[]
}
}
},
},
methods
:
{
methods
:
{
_open
(
aptitud
eId
)
{
_open
(
sampl
eId
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
showModal
=
true
this
.
showModal
=
true
this
.
formObj
.
aptitudeId
=
aptitud
eId
this
.
sampleId
=
sampl
eId
this
.
_page
()
this
.
_page
()
},
},
_page
:
async
function
()
{
_page
:
async
function
()
{
...
@@ -135,17 +135,10 @@ export default {
...
@@ -135,17 +135,10 @@ export default {
// this._hideLoading()
// this._hideLoading()
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
$refs
.
pageTable
.
_hideLoading
()
}
else
{
}
else
{
// 校验多样品多项目原始记录模板
const
data
=
this
.
selectData
[
0
]
// const param = {
data
.
sampleId
=
this
.
sampleId
// sampleId: this.sampleId,
this
.
$emit
(
'on-result-change'
,
data
)
// tempId: this.selectData[0].id,
this
.
showModal
=
false
// remark: this.selectData[0].remark,
// dataSource: this.sampleData
// }
// console.log(param)
// this.$emit('on-result-change', param)
console
.
log
(
'单选选中的值'
,
this
.
selectData
)
// this.showModal = false
}
}
},
},
_cancel
()
{
_cancel
()
{
...
...
plugins/common.js
View file @
b67b6ec6
...
@@ -839,7 +839,9 @@ Vue.prototype.$openWindowModeless = function(data) {
...
@@ -839,7 +839,9 @@ Vue.prototype.$openWindowModeless = function(data) {
'&companyId='
+
'&companyId='
+
global
.
getUserInfo
().
companyId
+
global
.
getUserInfo
().
companyId
+
'&userName='
+
'&userName='
+
realname
realname
+
'&idType='
+
data
.
idType
// eslint-disable-next-line no-undef
// eslint-disable-next-line no-undef
return
POBrowser
.
openWindowModeless
(
uri
,
'width=1200px;height=800px;'
)
return
POBrowser
.
openWindowModeless
(
uri
,
'width=1200px;height=800px;'
)
}
}
...
...
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