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
301a4552
Commit
301a4552
authored
Aug 07, 2020
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
计量证书修改
parent
88ff64b8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
157 additions
and
31 deletions
+157
-31
meter-sample.js
api/meter/meter-sample.js
+18
-1
MeterCertificateCheck.vue
pages/meter-certificate/check/MeterCertificateCheck.vue
+16
-3
MeterCertificateCheckHis.vue
pages/meter-certificate/check/MeterCertificateCheckHis.vue
+1
-1
MeterCertificateIssue.vue
pages/meter-certificate/issue/MeterCertificateIssue.vue
+1
-1
MeterCertificateIssueHis.vue
pages/meter-certificate/issue/MeterCertificateIssueHis.vue
+2
-2
MeterCertificateHisVersion.vue
pages/meter-certificate/make/MeterCertificateHisVersion.vue
+0
-0
MeterCertificateMakeHis.vue
pages/meter-certificate/make/MeterCertificateMakeHis.vue
+18
-1
MeterCertificatePrintIndex.vue
pages/meter-certificate/print/MeterCertificatePrintIndex.vue
+10
-16
MeterSampleInput.vue
pages/meter-send/sample-input/MeterSampleInput.vue
+55
-2
MeterSampleInputHis.vue
pages/meter-send/sample-input/MeterSampleInputHis.vue
+1
-1
common.js
plugins/common.js
+35
-3
No files found.
api/meter/meter-sample.js
View file @
301a4552
...
...
@@ -194,6 +194,18 @@ export default {
http
.
post
(
'meter/v1/sample/submit_receive?ids='
+
data
).
then
(
res
=>
res
),
toReportCheck
:
data
=>
http
.
post
(
'meter/v1/sample/to_report_check?ids='
+
data
).
then
(
res
=>
res
),
selectToReportCheck
:
data
=>
http
.
post
(
'meter/v1/sample/select_to_report_check?ids='
+
data
.
ids
+
'&userId='
+
data
.
userId
+
'&user='
+
data
.
user
)
.
then
(
res
=>
res
),
toReportMake
:
data
=>
http
.
post
(
'meter/v1/sample/to_report_make?ids='
+
data
).
then
(
res
=>
res
),
taskTransfer
:
data
=>
...
...
@@ -321,5 +333,10 @@ export default {
)
.
then
(
res
=>
res
),
getCertificateReport
:
data
=>
http
.
post
(
'meter/v1/sample/get_certificate_report?sampleId='
+
data
)
http
.
post
(
'meter/v1/sample/get_certificate_report?sampleId='
+
data
),
generatePdfAuto
:
data
=>
http
.
get
(
'meter/v1/report/generate_pdf_auto?id='
+
data
),
pageCertificate
:
data
=>
http
.
post
(
'meter/v1/report/page'
,
data
).
then
(
res
=>
res
)
}
pages/meter-certificate/check/MeterCertificateCheck.vue
View file @
301a4552
...
...
@@ -99,6 +99,11 @@ export default {
id
:
''
,
name
:
'在线查看证书'
},
{
type
:
'ios-book'
,
id
:
''
,
name
:
'预览pdf'
},
// {
// type: 'ios-list-box',
// id: '',
...
...
@@ -267,8 +272,8 @@ export default {
case
'在线查看证书'
:
this
.
_reportMakeLook
(
data
)
break
case
'
资质项目
'
:
this
.
_
itemModal
(
data
.
id
)
case
'
预览pdf
'
:
this
.
_
pdfPreview
(
data
.
id
)
break
case
'附件'
:
this
.
_upload
(
data
.
id
)
...
...
@@ -290,13 +295,21 @@ export default {
this
.
_itemOriginalRecordLook
(
data
)
}
},
_pdfPreview
:
async
function
(
id
)
{
const
result
=
await
meterSample
.
generatePdfAuto
(
id
)
if
(
result
)
{
this
.
$pdfView
(
result
)
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
isReport
:
5
})
}
},
...
...
pages/meter-certificate/check/MeterCertificateCheckHis.vue
View file @
301a4552
...
...
@@ -265,7 +265,7 @@ export default {
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
isReport
:
5
})
}
},
...
...
pages/meter-certificate/issue/MeterCertificateIssue.vue
View file @
301a4552
...
...
@@ -275,7 +275,7 @@ export default {
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
isReport
:
5
})
}
},
...
...
pages/meter-certificate/issue/MeterCertificateIssueHis.vue
View file @
301a4552
...
...
@@ -108,7 +108,7 @@ export default {
pageColumns
:
[
{
title
:
'样品名称'
,
key
:
'name'
,
width
:
120
},
{
title
:
'样品编号'
,
key
:
'code'
,
width
:
120
},
{
title
:
'证书编号'
,
key
:
'reportCode'
,
width
:
1
2
0
},
{
title
:
'证书编号'
,
key
:
'reportCode'
,
width
:
1
5
0
},
{
title
:
'型号规格'
,
key
:
'spec'
,
width
:
100
},
{
title
:
'出厂编号'
,
key
:
'factoryNumber'
},
{
title
:
'检测类型'
,
key
:
'type'
,
width
:
100
},
...
...
@@ -276,7 +276,7 @@ export default {
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
isReport
:
5
})
}
},
...
...
pages/meter-certificate/make/MeterCertificateHisVersion.vue
0 → 100644
View file @
301a4552
This diff is collapsed.
Click to expand it.
pages/meter-certificate/make/MeterCertificateMakeHis.vue
View file @
301a4552
...
...
@@ -57,6 +57,7 @@
</div>
</div>
<CertificateMake
ref=
"itemOriginalRecordModal"
@
on-result-change=
"_resultRecord"
></CertificateMake>
<MeterCertificateHisVersion
ref=
"meterCertificateHisVersion"
@
on-result-change=
"_page"
></MeterCertificateHisVersion>
<CertificateMakeLook
ref=
"itemOriginalRecordLookModal"
@
on-result-change=
"_resultRecord"
></CertificateMakeLook>
<CreateReport
ref=
"CreateReport"
></CreateReport>
<SelectOriTempRecord
ref=
"SelectOriTempRecord"
@
on-result-change=
"_certificateSelectBack"
></SelectOriTempRecord>
...
...
@@ -74,12 +75,14 @@ import operationModal from '../../../components/operation/Operation'
import
CreateReport
from
'./CreateReport'
import
CarManage
from
'./CarManage'
import
InstruMentEdit
from
'./InstrumentEdit'
import
MeterCertificateHisVersion
from
'./MeterCertificateHisVersion'
import
SelectOriTempRecord
from
'./SelectOriTempRecord'
export
default
{
components
:
{
CreateReport
,
CarManage
,
InstruMentEdit
,
MeterCertificateHisVersion
,
operationModal
,
SelectOriTempRecord
,
CertificateMake
,
...
...
@@ -104,6 +107,11 @@ export default {
],
iconMsg
:
[
{
type
:
'md-book'
,
id
:
''
,
name
:
'历史版本'
},
{
type
:
'ios-bookmarks'
,
id
:
''
,
name
:
'查看证书'
...
...
@@ -122,7 +130,7 @@ export default {
{
title
:
'样品编号'
,
key
:
'code'
,
width
:
120
},
{
title
:
'型号规格'
,
key
:
'spec'
,
width
:
100
},
{
title
:
'证书是否编制'
,
key
:
'onlineReported'
,
width
:
120
},
{
title
:
'证书编号'
,
key
:
'reportCode'
,
width
:
1
2
0
},
{
title
:
'证书编号'
,
key
:
'reportCode'
,
width
:
1
5
0
},
{
title
:
'出厂编号'
,
key
:
'factoryNumber'
},
{
title
:
'检测类型'
,
key
:
'type'
},
{
title
:
'委托单位'
,
key
:
'client'
,
width
:
200
},
...
...
@@ -265,6 +273,9 @@ export default {
case
'查看证书'
:
this
.
_makeCertificate
(
data
)
break
case
'历史版本'
:
this
.
_hisVersion
(
data
)
break
case
'仪器领用'
:
this
.
$refs
.
InstruEdit
.
_open
()
break
...
...
@@ -296,6 +307,12 @@ export default {
_makeCertificate
(
data
)
{
this
.
_reportMakeLook
(
data
)
},
_hisVersion
(
data
)
{
// 管理样品
this
.
$refs
.
meterCertificateHisVersion
.
_open
(
data
.
id
)
},
_reportMakeLook
:
async
function
(
data
)
{
const
result
=
await
meterSample
.
getCertificateReport
(
data
.
id
)
if
(
result
)
{
...
...
pages/meter-certificate/print/MeterCertificatePrintIndex.vue
View file @
301a4552
...
...
@@ -76,11 +76,11 @@ export default {
formId
:
'meterCertificatePrintIndexFormId'
,
searchOpen
:
true
,
btn
:
[
//
{
//
type: 'success',
//
id: '',
// name: '提交
'
//
}
{
type
:
'success'
,
id
:
''
,
name
:
'打印
'
}
],
iconMsg
:
[
// {
...
...
@@ -142,8 +142,8 @@ export default {
case
'添加'
:
this
.
_editModal
(
false
)
break
case
'
提交
'
:
this
.
_
submitToReview
()
case
'
打印
'
:
this
.
_
printExcel
()
break
case
'退回'
:
this
.
_goBack
()
...
...
@@ -157,18 +157,12 @@ export default {
_submitToReview
()
{
this
.
_submitByContractIds
()
},
_
submitByContractIds
()
{
_
printExcel
()
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定提交吗?'
,
onOk
:
()
=>
{
this
.
_submitEnd
(
ids
)
}
})
this
.
$pageofficePrint
({
ids
:
ids
,
type
:
'xlsx'
})
}
},
...
...
@@ -229,7 +223,7 @@ export default {
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
isReport
:
5
})
}
},
...
...
pages/meter-send/sample-input/MeterSampleInput.vue
View file @
301a4552
...
...
@@ -68,7 +68,7 @@
<CertificateMake
ref=
"itemOriginalRecordModal"
@
on-result-change=
"_resultRecord"
></CertificateMake>
<!--编辑证书-->
<CertificateMakeLook
ref=
"itemOriginalRecordLookModal"
@
on-result-change=
"_resultRecord"
></CertificateMakeLook>
<assignPerson
ref=
"userModal"
is-change
@
on-result-change=
"_userData"
></assignPerson>
</div>
</template>
<
script
>
...
...
@@ -76,6 +76,7 @@ import { meterDevice, meterSample } from '../../../api'
import
SelEquip
from
'../../../components/select-equip/SelEquip'
import
CertificateMake
from
'../../meter-certificate/CertificateMake'
import
CertificateMakeLook
from
'../../meter-certificate/CertificateMakeLook'
import
assignPerson
from
'../../../components/user-info-single/assignPerson'
import
MeterSubcontractorEdit
from
'./MeterGoOutTestEdit'
import
CarManage
from
'./CarManage'
import
MeterPersonItemTaskManage
from
'./MeterPersonItemTaskManage'
...
...
@@ -92,6 +93,7 @@ export default {
CarManage
,
MeterPersonItemTaskManage
,
SelEquip
,
assignPerson
,
InstruMentEdit
},
data
()
{
...
...
@@ -110,6 +112,12 @@ export default {
id
:
'meter-sample-input-submit-btn'
,
name
:
'提交'
},
{
type
:
'success'
,
id
:
''
,
name
:
'提交至审核'
},
{
type
:
'success'
,
id
:
'meter-sample-input-submit-create-btn'
,
...
...
@@ -204,6 +212,9 @@ export default {
case
'提交'
:
this
.
_submitToReportReview
()
break
case
'提交至审核'
:
this
.
_selectToReportReview
()
break
case
'提交至证书编制'
:
this
.
_submitToReportMake
()
break
...
...
@@ -236,7 +247,10 @@ export default {
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
data
[
i
].
recordId
===
undefined
)
{
if
(
data
[
i
].
onlineReported
===
undefined
||
data
[
i
].
onlineReported
===
'否'
)
{
this
.
$Message
.
warning
(
'您选择的样品编号为'
+
data
[
i
].
code
+
'暂未编制证书,无法提交!'
)
...
...
@@ -252,6 +266,45 @@ export default {
})
}
},
_selectToReportReview
()
{
const
ids
=
this
.
selectIds
const
data
=
this
.
selectData
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
data
[
i
].
onlineReported
===
undefined
||
data
[
i
].
onlineReported
===
'否'
)
{
this
.
$Message
.
warning
(
'您选择的样品编号为'
+
data
[
i
].
code
+
'暂未编制证书,无法提交!'
)
return
false
}
}
this
.
$refs
.
userModal
.
_open
(
'salesman'
)
}
},
_userData
(
data
,
msg
)
{
if
(
msg
===
'salesman'
)
{
this
.
_distributeCertificateCheck
(
data
)
}
},
_distributeCertificateCheck
:
async
function
(
data
)
{
const
result
=
await
meterSample
.
selectToReportCheck
({
ids
:
this
.
selectIds
,
userId
:
data
.
id
,
user
:
data
.
realname
})
if
(
result
)
{
await
this
.
_page
()
this
.
$Message
.
success
(
'分配成功!'
)
}
},
_submitReportCheck
:
async
function
(
ids
)
{
const
result
=
await
meterSample
.
toReportCheck
(
ids
)
if
(
result
)
{
...
...
pages/meter-send/sample-input/MeterSampleInputHis.vue
View file @
301a4552
...
...
@@ -162,7 +162,7 @@ export default {
{
title
:
'样品名称'
,
key
:
'name'
,
width
:
120
},
{
title
:
'样品编号'
,
key
:
'code'
,
width
:
120
},
{
title
:
'证书是否编制'
,
key
:
'onlineReported'
,
width
:
120
},
{
title
:
'证书编号'
,
key
:
'reportCode'
,
width
:
1
3
0
},
{
title
:
'证书编号'
,
key
:
'reportCode'
,
width
:
1
4
0
},
{
title
:
'型号规格'
,
key
:
'spec'
,
width
:
115
},
{
title
:
'出厂编号'
,
key
:
'factoryNumber'
,
width
:
115
},
{
title
:
'制造厂商'
,
key
:
'manufacturer'
,
width
:
125
},
...
...
plugins/common.js
View file @
301a4552
...
...
@@ -845,6 +845,23 @@ Vue.prototype.$openWindowModeless = function(data) {
// eslint-disable-next-line no-undef
return
POBrowser
.
openWindowModeless
(
uri
,
'width=1200px;height=800px;'
)
}
Vue
.
prototype
.
$pdfView
=
function
(
data
)
{
if
(
data
)
{
// 根据objectKey下载pdf
const
fileUrl
=
encodeURIComponent
(
global
.
baseURL
+
'/print/v1/download?objectKey='
)
const
uri
=
global
.
staticURL
+
'/pdf/PDFJS/pdfjs/web/viewer.html?file='
+
fileUrl
+
data
return
window
.
open
(
uri
,
'_blank'
)
}
else
{
this
.
$Message
.
warning
(
'暂无PDF生成,不可预览~'
)
}
}
/**
* pageoffice(打印word,pdf(待定))
* id
...
...
@@ -852,15 +869,30 @@ Vue.prototype.$openWindowModeless = function(data) {
*/
Vue
.
prototype
.
$pageofficePrint
=
function
(
data
)
{
// id 为样品id或者委托id
const
companyId
=
global
.
getUserInfo
().
companyId
const
realname
=
encodeURI
(
encodeURI
(
global
.
getUserInfo
().
realname
))
const
userId
=
global
.
getUserInfo
().
id
const
locaName
=
encodeURI
(
'报告'
)
// id 为报告id或者委托id
const
type
=
encodeURI
(
data
.
type
)
const
ids
=
data
.
ids
.
join
(
','
)
const
uri
=
global
.
baseURL
+
'/print/v1/batch_print'
+
'/print/v1/batch_print
_meter
'
+
'?sysMark='
+
global
.
getCode
()
+
'&location='
+
locaName
+
'&companyId='
+
companyId
+
'&userId='
+
userId
+
'&username='
+
realname
+
'&printType='
+
data
.
type
+
type
+
'&businessIds='
+
data
.
id
ids
// eslint-disable-next-line no-undef
return
POBrowser
.
openWindowModeless
(
uri
,
'width=350px;height=300px;'
)
}
...
...
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