diff --git a/src/utils/enum.js b/src/utils/enum.js index 06ddce2f..df6f5d13 100644 --- a/src/utils/enum.js +++ b/src/utils/enum.js @@ -70,6 +70,20 @@ export const mioTypeEnum = new EnumFactory({ 'other_in': '其他入库', 'other_out': '其他出库' }) +export const fiedTypeEnum = new EnumFactory({ + 'input-int': '整数', + 'input-number': '小数', + 'input-text': '文本', + 'select-text': '单选', + 'selects-text': '多选', +}) +export const testTagsEnum = new EnumFactory({ + 'purin': '入厂检验', + 'first': '首件检验', + 'prod': '成品检验', + 'process': '过程检验', + 'performance': '性能检验', +}) export const productTypeEnum = new EnumFactory({ 0: '电/水/气', 10: '成品', diff --git a/src/views/qm/defect.vue b/src/views/qm/defect.vue index e7f49fe2..9877887f 100644 --- a/src/views/qm/defect.vue +++ b/src/views/qm/defect.vue @@ -150,8 +150,7 @@ this.addForm.okcate=10; this.limitedVisible = true; // 清除验证状态 - this.$refs.addForm.clearValidate(); - // this.addForm = Object.assign({}, defaultForm); + // this.$refs.addForm.clearValidate(); }, submitHandle(){ let that = this; diff --git a/src/views/qm/testItem_form.vue b/src/views/qm/testItem_form.vue index 861d5399..1b892f3d 100644 --- a/src/views/qm/testItem_form.vue +++ b/src/views/qm/testItem_form.vue @@ -184,9 +184,12 @@ export default { this.getmcateTagsOptions(); }, methods: { - getmcateTagsOptions() { - this.$API.mtm.material.cates.req().then((res) => { - this.mcateTagsOptions = res; + async getmcateTagsOptions() { + let that = this; + await that.$API.mtm.material.cates.req().then((res) => { + if(res&&res.length>0){ + that.mcateTagsOptions = res; + } }); }, addComponent(type) {