Commit 7e352150 by wangweidong

计量证书修改

parent c59bcdab
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
pageColumns: [ pageColumns: [
{ title: '样品名称', key: 'name', width: 120 }, { title: '样品名称', key: 'name', width: 120 },
{ title: '样品编号', key: 'code', width: 120 }, { title: '样品编号', key: 'code', width: 120 },
{ title: '报告编号', key: 'reportCode', width: 140 }, { title: '证书编号', key: 'reportCode', width: 140 },
{ title: '型号规格', key: 'spec', width: 100 }, { title: '型号规格', key: 'spec', width: 100 },
{ title: '出厂编号', key: 'factoryNumber' }, { title: '出厂编号', key: 'factoryNumber' },
{ title: '检测类型', key: 'type', width: 100 }, { title: '检测类型', key: 'type', width: 100 },
...@@ -286,6 +286,8 @@ export default { ...@@ -286,6 +286,8 @@ export default {
const result = await meterSample.getCertificateReport(data.id) const result = await meterSample.getCertificateReport(data.id)
if (result) { if (result) {
this._viewReport(result) this._viewReport(result)
} else {
this._itemOriginalRecordLook(data)
} }
}, },
_viewReport(data) { _viewReport(data) {
......
...@@ -111,6 +111,7 @@ export default { ...@@ -111,6 +111,7 @@ export default {
pageColumns: [ pageColumns: [
{ title: '样品名称', key: 'name', width: 120 }, { title: '样品名称', key: 'name', width: 120 },
{ title: '样品编号', key: 'code', width: 120 }, { title: '样品编号', key: 'code', width: 120 },
{ title: '证书编号', key: 'reportCode', width: 140 },
{ title: '型号规格', key: 'spec', width: 100 }, { title: '型号规格', key: 'spec', width: 100 },
{ title: '出厂编号', key: 'factoryNumber' }, { title: '出厂编号', key: 'factoryNumber' },
{ title: '检测类型', key: 'type', width: 100 }, { title: '检测类型', key: 'type', width: 100 },
...@@ -239,6 +240,23 @@ export default { ...@@ -239,6 +240,23 @@ export default {
const result = await meterSample.getCertificateReport(data.id) const result = await meterSample.getCertificateReport(data.id)
if (result) { if (result) {
this._viewReport(result) this._viewReport(result)
} else {
this._itemRecordLook(data)
}
},
_itemRecordLook(data, name) {
if (
data.recordId === null ||
undefined === data.recordId ||
data.recordId === ''
) {
this.$Message.warning('证书暂未编制!')
} else {
this.$refs.itemOriginalRecordLookModal._open(
data.recordId,
name,
data.id
)
} }
}, },
_viewReport(data) { _viewReport(data) {
......
...@@ -265,6 +265,8 @@ export default { ...@@ -265,6 +265,8 @@ export default {
const result = await meterSample.getCertificateReport(data.id) const result = await meterSample.getCertificateReport(data.id)
if (result) { if (result) {
this._viewReport(result) this._viewReport(result)
} else {
this._itemOriginalRecordLook(data, 'write')
} }
}, },
_viewReport(data) { _viewReport(data) {
......
...@@ -251,6 +251,23 @@ export default { ...@@ -251,6 +251,23 @@ export default {
const result = await meterSample.getCertificateReport(data.id) const result = await meterSample.getCertificateReport(data.id)
if (result) { if (result) {
this._viewReport(result) this._viewReport(result)
} else {
this._itemRecordLook(data, 'only')
}
},
_itemRecordLook(data, name) {
if (
data.recordId === null ||
undefined === data.recordId ||
data.recordId === ''
) {
this.$Message.warning('证书暂未编制!')
} else {
this.$refs.itemOriginalRecordLookModal._open(
data.recordId,
name,
data.id
)
} }
}, },
_viewReport(data) { _viewReport(data) {
......
...@@ -115,14 +115,14 @@ export default { ...@@ -115,14 +115,14 @@ export default {
} }
], ],
iconMsg: [ iconMsg: [
// {
// type: 'ios-bookmarks',
// id: '',
// name: '编制证书'
// },
{ {
type: 'ios-bookmarks', type: 'ios-bookmarks',
id: '', id: 'meter-certificate-make-spread-js-make',
name: '编制证书'
},
{
type: 'ios-bookmarks',
id: 'meter-certificate-make-pageoffice-make',
name: '在线编制证书' name: '在线编制证书'
}, },
{ {
......
...@@ -219,6 +219,8 @@ export default { ...@@ -219,6 +219,8 @@ export default {
const result = await meterSample.getCertificateReport(data.id) const result = await meterSample.getCertificateReport(data.id)
if (result) { if (result) {
this._viewReport(result) this._viewReport(result)
} else {
this._itemOriginalRecordLook(data, 'only')
} }
}, },
_viewReport(data) { _viewReport(data) {
......
...@@ -133,14 +133,14 @@ export default { ...@@ -133,14 +133,14 @@ export default {
} }
], ],
iconMsg: [ iconMsg: [
// {
// type: 'ios-bookmarks',
// id: 'meter-out-personal-task-create-o',
// name: '编制证书'
// },
{ {
type: 'ios-bookmarks', type: 'ios-bookmarks',
id: '', id: 'meter-out-personal-task-spread-js-create',
name: '编制证书'
},
{
type: 'ios-bookmarks',
id: 'meter-out-personal-task-create-o',
name: '在线编制证书' name: '在线编制证书'
}, },
{ {
...@@ -180,7 +180,7 @@ export default { ...@@ -180,7 +180,7 @@ export default {
{ title: '样品名称', key: 'name', width: 120 }, { title: '样品名称', key: 'name', width: 120 },
{ title: '样品编号', key: 'code', width: 120 }, { title: '样品编号', key: 'code', width: 120 },
{ title: '证书是否编制', key: 'onlineReported', width: 120 }, { title: '证书是否编制', key: 'onlineReported', width: 120 },
{ title: '证书编号', key: 'reportCode', width: 130 }, { title: '证书编号', key: 'reportCode', width: 150 },
{ title: '型号规格', key: 'spec', width: 120 }, { title: '型号规格', key: 'spec', width: 120 },
{ title: '出厂编号', key: 'factoryNumber', width: 120 }, { title: '出厂编号', key: 'factoryNumber', width: 120 },
{ title: '检测类型', key: 'type', width: 100 }, { title: '检测类型', key: 'type', width: 100 },
......
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
{ title: '样品名称', key: 'name', width: 120 }, { title: '样品名称', key: 'name', width: 120 },
{ title: '样品编号', key: 'code', width: 120 }, { title: '样品编号', key: 'code', width: 120 },
{ title: '证书是否编制', key: 'onlineReported', width: 120 }, { title: '证书是否编制', key: 'onlineReported', width: 120 },
{ title: '证书编号', key: 'reportCode', width: 130 }, { title: '证书编号', key: 'reportCode', width: 150 },
{ title: '型号规格', key: 'spec', width: 120 }, { title: '型号规格', key: 'spec', width: 120 },
{ title: '出厂编号', key: 'factoryNumber', width: 120 }, { title: '出厂编号', key: 'factoryNumber', width: 120 },
{ title: '检测类型', key: 'type', width: 100 }, { title: '检测类型', key: 'type', width: 100 },
...@@ -345,15 +345,24 @@ export default { ...@@ -345,15 +345,24 @@ export default {
} }
}, },
_makeCertificate(data) { _makeCertificate: async function(data) {
if (data.onlineReported === '否' || undefined === data.recordId) { const result = await meterSample.getCertificateReport(data.id)
// console.log('click') if (result) {
// this.$refs.SelectOriTempRecord._open(data.id, data) this._viewReport(result)
this.$Message.warning('证书暂未编制!')
} else { } else {
this._itemOriginalRecordLook(data, 'only') this._itemOriginalRecordLook(data, 'only')
} }
}, },
_viewReport(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.objectKey,
idType: 10,
id: data.id,
isReport: 4
})
}
},
_itemOriginalRecordLook(data, name) { _itemOriginalRecordLook(data, name) {
if ( if (
data.recordId === null || data.recordId === null ||
......
...@@ -122,14 +122,14 @@ export default { ...@@ -122,14 +122,14 @@ export default {
} }
], ],
iconMsg: [ iconMsg: [
// {
// type: 'ios-bookmarks',
// id: 'meter-sample-input-create',
// name: '编制证书'
// },
{ {
type: 'ios-bookmarks', type: 'ios-bookmarks',
id: '', id: 'meter-sample-input-spread-js-create',
name: '编制证书'
},
{
type: 'ios-bookmarks',
id: 'meter-sample-input-create',
name: '在线编制证书' name: '在线编制证书'
}, },
{ {
......
...@@ -316,14 +316,24 @@ export default { ...@@ -316,14 +316,24 @@ export default {
}) })
}, },
_makeCertificate(data) { _makeCertificate: async function(data) {
if (data.onlineReported === '否' || undefined === data.recordId) { const result = await meterSample.getCertificateReport(data.id)
// this.$refs.SelectOriTempRecord._open(data.id, data) if (result) {
this.$Message.warning('证书暂未编制!') this._viewReport(result)
} else { } else {
this._itemOriginalRecordLook(data, 'only') this._itemOriginalRecordLook(data, 'only')
} }
}, },
_viewReport(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.objectKey,
idType: 10,
id: data.id,
isReport: 4
})
}
},
_itemOriginalRecordLook(data, name) { _itemOriginalRecordLook(data, name) {
if ( if (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment