Commit f83de1d6 by wangweidong

计量证书修改

parent c9bdcea2
...@@ -233,21 +233,24 @@ export default { ...@@ -233,21 +233,24 @@ export default {
}, },
_itemOriginalRecordLook(data, name) { _itemOriginalRecordLook(data, name) {
if ( this._reportMakeLook(data)
data.recordId === null || },
undefined === data.recordId || _reportMakeLook: async function(data) {
data.recordId === '' const result = await meterSample.getCertificateReport(data.id)
) { if (result) {
this.$Message.warning('证书暂未编制!') this._viewReport(result)
} else { }
this.$refs.itemOriginalRecordLookModal._open( },
data.recordId, _viewReport(data) {
name, if (data) {
data.id this.$openWindowModeless({
) objectKey: data.objectKey,
idType: 10,
id: data.id,
isReport: 4
})
} }
}, },
_iconClick(res, data, componentName) { _iconClick(res, data, componentName) {
this.currentComponent = componentName this.currentComponent = componentName
this.$nextTick(function() { this.$nextTick(function() {
......
...@@ -245,18 +245,22 @@ export default { ...@@ -245,18 +245,22 @@ export default {
}) })
}, },
_itemOriginalRecordLook(data, name) { _itemOriginalRecordLook(data, name) {
if ( this._reportMakeLook(data)
data.recordId === null || },
undefined === data.recordId || _reportMakeLook: async function(data) {
data.recordId === '' const result = await meterSample.getCertificateReport(data.id)
) { if (result) {
this.$Message.warning('证书暂未编制!') this._viewReport(result)
} else { }
this.$refs.itemOriginalRecordLookModal._open( },
data.recordId, _viewReport(data) {
name, if (data) {
data.id this.$openWindowModeless({
) objectKey: data.objectKey,
idType: 10,
id: data.id,
isReport: 4
})
} }
}, },
_personModal(data) { _personModal(data) {
......
...@@ -294,11 +294,22 @@ export default { ...@@ -294,11 +294,22 @@ export default {
this._previewEdit(data.id) this._previewEdit(data.id)
}, },
_makeCertificate(data) { _makeCertificate(data) {
if (data.onlineReported === '否' || undefined === data.recordId) { this._reportMakeLook(data)
console.log('click') },
this.$refs.SelectOriTempRecord._open(data.id, data) _reportMakeLook: async function(data) {
} else { const result = await meterSample.getCertificateReport(data.id)
this._itemOriginalRecordLook(data, 'only') if (result) {
this._viewReport(result)
}
},
_viewReport(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.objectKey,
idType: 10,
id: data.id,
isReport: 4
})
} }
}, },
_resultRecord() { _resultRecord() {
......
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
<Form-item label="别名" prop="alias"> <Form-item label="别名" prop="alias">
<Input v-model="formObj.alias" name="alias" placeholder="请输入别名" @on-keyup="_onKeyUp"></Input> <Input v-model="formObj.alias" name="alias" placeholder="请输入别名" @on-keyup="_onKeyUp"></Input>
</Form-item> </Form-item>
<Form-item label="项目代号" prop="remark">
<Input v-model="formObj.remark" name="remark" placeholder="请输入项目代号" @on-keyup="_onKeyUp"></Input>
</Form-item>
</Form> </Form>
</div> </div>
<div slot="footer" class="btn-width clearfix"> <div slot="footer" class="btn-width clearfix">
...@@ -52,6 +55,7 @@ import global from '../../../api/config' ...@@ -52,6 +55,7 @@ import global from '../../../api/config'
const defVal = { const defVal = {
alias: '', alias: '',
classType: '', classType: '',
remark: '',
classifyId: 0 classifyId: 0
} }
...@@ -63,6 +67,9 @@ export default { ...@@ -63,6 +67,9 @@ export default {
formObj: defVal, formObj: defVal,
ruleValidate: { ruleValidate: {
alias: [{ required: true, message: '别名不能为空', trigger: 'blur' }], alias: [{ required: true, message: '别名不能为空', trigger: 'blur' }],
remark: [
{ required: true, message: '项目代号不能为空', trigger: 'blur' }
],
classType: [ classType: [
{ required: true, message: '类别不能为空', trigger: 'blur' } { required: true, message: '类别不能为空', trigger: 'blur' }
] ]
...@@ -80,7 +87,11 @@ export default { ...@@ -80,7 +87,11 @@ export default {
}, },
methods: { methods: {
_onKeyUp() { _onKeyUp() {
if (this.formObj.alias === '' || this.formObj.classType === '') { if (
this.formObj.alias === '' ||
this.formObj.classType === '' ||
this.formObj.remark === ''
) {
this.isDisable = true this.isDisable = true
} else { } else {
this.isDisable = false this.isDisable = false
......
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