Commit f1028aa3 by wangweidong

证书编制修改

parent 5dc9ec4d
...@@ -225,7 +225,7 @@ export default { ...@@ -225,7 +225,7 @@ export default {
undefined === data.recordId || undefined === data.recordId ||
data.recordId === '' data.recordId === ''
) { ) {
this.$Message.warning('该检测项目暂无原始记录!') this.$Message.warning('证书暂未编制!')
} else { } else {
this.$refs.itemOriginalRecordLookModal._open( this.$refs.itemOriginalRecordLookModal._open(
data.recordId, data.recordId,
...@@ -243,7 +243,7 @@ export default { ...@@ -243,7 +243,7 @@ export default {
this._personModal(data) this._personModal(data)
break break
case '查看证书': case '查看证书':
this._itemOriginalRecordLook(data, 'only') this._itemOriginalRecordLook(data, 'write')
break break
case '资质项目': case '资质项目':
this._itemModal(data.id) this._itemModal(data.id)
......
...@@ -58,14 +58,19 @@ ...@@ -58,14 +58,19 @@
</div> </div>
<operationModal ref="operationModal"></operationModal> <operationModal ref="operationModal"></operationModal>
<FileManage ref="FileManage"></FileManage> <FileManage ref="FileManage"></FileManage>
<!--编辑证书-->
<CertificateMakeLook ref="itemOriginalRecordLookModal" @on-result-change="_resultRecord"></CertificateMakeLook>
</div> </div>
</template> </template>
<script> <script>
import { meterSample } from '../../../api' import { meterSample } from '../../../api'
import operationModal from '../../../components/operation/Operation' import operationModal from '../../../components/operation/Operation'
import CertificateMakeLook from '../../meter-certificate/CertificateMakeLook'
export default { export default {
components: { operationModal }, components: { operationModal, CertificateMakeLook },
data() { data() {
return { return {
currentComponent: '', currentComponent: '',
...@@ -87,12 +92,7 @@ export default { ...@@ -87,12 +92,7 @@ export default {
{ {
type: 'ios-book', type: 'ios-book',
id: '', id: '',
name: '预览' name: '查看证书'
},
{
type: 'ios-list-box',
id: '',
name: '仪器领用'
}, },
{ type: 'md-cloud', id: '', name: '附件' } { type: 'md-cloud', id: '', name: '附件' }
], ],
...@@ -199,6 +199,9 @@ export default { ...@@ -199,6 +199,9 @@ export default {
case '附件': case '附件':
this._upload(data.id) this._upload(data.id)
break break
case '查看证书':
this._itemOriginalRecordLook(data, 'write')
break
case '删除': case '删除':
this._deleteByIds([data.id]) this._deleteByIds([data.id])
break break
...@@ -208,6 +211,21 @@ export default { ...@@ -208,6 +211,21 @@ export default {
} }
}) })
}, },
_itemOriginalRecordLook(data, name) {
if (
data.recordId === null ||
undefined === data.recordId ||
data.recordId === ''
) {
this.$Message.warning('证书暂未编制!')
} else {
this.$refs.itemOriginalRecordLookModal._open(
data.recordId,
name,
data.id
)
}
},
_personModal(data) { _personModal(data) {
this._previewEdit(data.id) this._previewEdit(data.id)
}, },
......
...@@ -91,11 +91,11 @@ export default { ...@@ -91,11 +91,11 @@ export default {
formId: 'meterSubcontractorFormId', formId: 'meterSubcontractorFormId',
searchOpen: false, searchOpen: false,
btn: [ btn: [
{ // {
type: 'success', // type: 'success',
id: '', // id: '',
name: '生成' // name: '生成'
}, // },
{ {
type: 'success', type: 'success',
id: '', id: '',
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,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: 'spec', width: 100 }, { title: '型号规格', key: 'spec', width: 100 },
{ title: '证书是否生成', key: 'reported', width: 120 }, { title: '证书是否编制', key: 'onlineReported', width: 120 },
{ title: '出厂编号', key: 'factoryNumber' }, { title: '出厂编号', key: 'factoryNumber' },
{ title: '检测类型', key: 'type' }, { title: '检测类型', key: 'type' },
{ title: '委托单位', key: 'client', width: 200 }, { title: '委托单位', key: 'client', width: 200 },
...@@ -232,7 +232,7 @@ export default { ...@@ -232,7 +232,7 @@ export default {
this.$Message.warning('请至少选择一条数据!') this.$Message.warning('请至少选择一条数据!')
} else { } else {
for (let i = 0; i < this.selectData.length; i++) { for (let i = 0; i < this.selectData.length; i++) {
if (this.selectData[i].reported === '否') { if (this.selectData[i].onlineReported === '否') {
this.$Message.warning( this.$Message.warning(
'您选择的样品编号为' + '您选择的样品编号为' +
this.selectData[i].code + this.selectData[i].code +
...@@ -310,7 +310,7 @@ export default { ...@@ -310,7 +310,7 @@ export default {
undefined === data.recordId || undefined === data.recordId ||
data.recordId === '' data.recordId === ''
) { ) {
this.$Message.warning('该检测项目暂无原始记录!') this.$Message.warning('证书暂未编制!')
} else { } else {
this.$refs.itemOriginalRecordLookModal._open( this.$refs.itemOriginalRecordLookModal._open(
data.recordId, data.recordId,
......
...@@ -58,14 +58,18 @@ ...@@ -58,14 +58,18 @@
</div> </div>
<operationModal ref="operationModal"></operationModal> <operationModal ref="operationModal"></operationModal>
<FileManage ref="FileManage"></FileManage> <FileManage ref="FileManage"></FileManage>
<!--编辑证书-->
<CertificateMakeLook ref="itemOriginalRecordLookModal" @on-result-change="_resultRecord"></CertificateMakeLook>
</div> </div>
</template> </template>
<script> <script>
import { meterSample } from '../../../api' import { meterSample } from '../../../api'
import operationModal from '../../../components/operation/Operation' import operationModal from '../../../components/operation/Operation'
import CertificateMakeLook from '../../meter-certificate/CertificateMakeLook'
export default { export default {
components: { operationModal }, components: { operationModal, CertificateMakeLook },
data() { data() {
return { return {
currentComponent: '', currentComponent: '',
...@@ -82,12 +86,7 @@ export default { ...@@ -82,12 +86,7 @@ export default {
{ {
type: 'ios-book', type: 'ios-book',
id: '', id: '',
name: '预览' name: '查看证书'
},
{
type: 'ios-list-box',
id: '',
name: '仪器领用'
}, },
{ type: 'md-cloud', id: '', name: '附件' } { type: 'md-cloud', id: '', name: '附件' }
], ],
...@@ -194,6 +193,9 @@ export default { ...@@ -194,6 +193,9 @@ export default {
case '附件': case '附件':
this._upload(data.id) this._upload(data.id)
break break
case '查看证书':
this._itemOriginalRecordLook(data, 'write')
break
case '删除': case '删除':
this._deleteByIds([data.id]) this._deleteByIds([data.id])
break break
...@@ -282,6 +284,21 @@ export default { ...@@ -282,6 +284,21 @@ export default {
// 上传文件 // 上传文件
this.$refs.FileManage._open(id, 'subcontractorId') this.$refs.FileManage._open(id, 'subcontractorId')
}, },
_itemOriginalRecordLook(data, name) {
if (
data.recordId === null ||
undefined === data.recordId ||
data.recordId === ''
) {
this.$Message.warning('证书暂未编制!')
} else {
this.$refs.itemOriginalRecordLookModal._open(
data.recordId,
name,
data.id
)
}
},
_getById: async function(id) { _getById: async function(id) {
const result = await meterSample.getById(id) const result = await meterSample.getById(id)
if (result) { if (result) {
......
...@@ -355,7 +355,7 @@ export default { ...@@ -355,7 +355,7 @@ export default {
undefined === data.recordId || undefined === data.recordId ||
data.recordId === '' data.recordId === ''
) { ) {
this.$Message.warning('该检测项目暂无原始记录!') this.$Message.warning('证书暂未编制!')
} else { } else {
console.log('Original') console.log('Original')
this.$refs.itemOriginalRecordLookModal._open( this.$refs.itemOriginalRecordLookModal._open(
......
...@@ -325,7 +325,7 @@ export default { ...@@ -325,7 +325,7 @@ export default {
undefined === data.recordId || undefined === data.recordId ||
data.recordId === '' data.recordId === ''
) { ) {
this.$Message.warning('该检测项目暂无原始记录!') this.$Message.warning('证书暂未编制!')
} else { } else {
this.$refs.itemOriginalRecordLookModal._open( this.$refs.itemOriginalRecordLookModal._open(
data.recordId, data.recordId,
......
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