Commit f83de1d6 by wangweidong

计量证书修改

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