Commit 74b1892b authored by jack_liu's avatar jack_liu

four

parent dc590608
......@@ -2,7 +2,6 @@
<div class="app-container" style="padding-top: 60px">
<div style="width: 60%; margin-left: 80px; padding-left: 8.6%">
<el-form
:rules="rules"
ref="queryForm"
:model="queryParams"
:inline="true"
......@@ -11,14 +10,14 @@
<el-form-item style="flex-basis: 50%" prop="ptype">
<el-input
v-model.trim="queryParams.ptype"
placeholder="请输入工序"
placeholder="请输入ptype"
clearable
:maxlength="100"
size="small"
style="width: 350px"
@keyup.enter.native="handleQuery"
>
<template slot="prepend">工序</template></el-input
<template slot="prepend">ptype</template></el-input
>
</el-form-item>
<el-form-item>
......@@ -99,9 +98,6 @@ export default {
queryParams: {
ptype: ''
},
rules: {
ptype: [{ required: true, message: '请输入工序', trigger: 'blur' }]
}
}
},
created() {
......@@ -110,7 +106,7 @@ export default {
methods: {
getDictList() {
getDictList({
dictLabel: this.queryParams.ptype
dictType: this.queryParams.ptype
}).then(res => {
this.dictList = res.data
this.loading = false
......@@ -118,9 +114,14 @@ export default {
},
//提交按钮
onSubmit() {
this.$refs.queryForm.validate(valid => {
if (valid) {
console.log(this.dictSelection)
if( this.queryParams.ptype === '' ){
this.$message.error('ptype为空,不允许提交')
return;
}
submit(this.dictSelection).then(res => {
if (res.code === 200) {
this.$message.success('提交成功')
......@@ -128,10 +129,7 @@ export default {
this.queryParams.ptype = ''
}
})
} else {
return false
}
})
},
//查询
handleQuery() {
......@@ -185,15 +183,5 @@ export default {
height: 12em;
width: 4px;
}
.info {
height: 100px;
display: flex;
align-items: center;
justify-content: center;
.title {
color: #333;
font-weight: 700;
font-size: 16px;
}
}
</style>
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