master
271556543@qq.com 3 years ago
parent 8aab317e89
commit 37042a44c5

@ -72,7 +72,7 @@ export default {
return return
} }
this.$refs['elForm'].validate().then(res=>{ this.$refs['elForm'].validate().then(res=>{
if(res)this.$emit('submit') if(res) this.$emit('submit')
}).catch(err=>{ }).catch(err=>{
this.$Message.warning({ this.$Message.warning({
content:'请填写完整信息', content:'请填写完整信息',

@ -1,7 +1,14 @@
<!--新增商户--> <!--新增商户-->
<template> <template>
<div> <div>
<xy-dialog ref="dialog" :is-show.sync="isShow" :title="type === 'add' ? '新增商户' : '编辑商户'" :form="form" :rules="rules" type="form" @submit="submit"> <xy-dialog
ref="dialog"
:is-show.sync="isShow"
:title="type === 'add' ? '新增商户' : '编辑商户'"
:form="form"
:rules="rules"
type="form"
@submit="submit">
<template v-slot:name> <template v-slot:name>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
@ -186,6 +193,7 @@ export default {
if(!value){ if(!value){
return callback(new Error('密码不能为空')) return callback(new Error('密码不能为空'))
} }
callback()
} }
if(this.type === 'editor'){ if(this.type === 'editor'){
callback() callback()

@ -7,7 +7,7 @@
<div> <div>
<Input clearable style="width: 200px; margin-right: 10px" v-model="select.keywords" placeholder="关键字搜索" /> <Input clearable style="width: 200px; margin-right: 10px" v-model="select.keywords" placeholder="关键字搜索" />
<Button type="primary" @click="getMerchant"></Button> <Button type="primary" @click="getMerchant"></Button>
<Button type="primary" style="margin-left: 10px" @click="$refs['addMerchant'].isShow = true,$refs['addMerchant'].type = 'add'">新增商户</Button> <Button type="primary" style="margin-left: 10px" @click="$refs['addMerchant'].type = 'add',$refs['addMerchant'].isShow = true">新增商户</Button>
</div> </div>
</slot> </slot>
</lx-header> </lx-header>
@ -24,7 +24,7 @@
</xy-table> </xy-table>
<!-- 新增商户--> <!-- 新增商户-->
<addMerchant ref="addMerchant" @refresh="getMerchant"></addMerchant> <add-merchant ref="addMerchant" @refresh="getMerchant"></add-merchant>
</div> </div>
</template> </template>

Loading…
Cancel
Save