parent
fa557c4895
commit
5e92980e04
3 changed files with 74 additions and 10 deletions
@ -0,0 +1,62 @@ |
||||
<template> |
||||
<j-modal |
||||
:title="title" |
||||
:width="width" |
||||
:visible="visible" |
||||
switchFullscreen |
||||
@ok="handleOk" |
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||
@cancel="handleCancel" |
||||
cancelText="关闭"> |
||||
<zy-goods-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-goods-form> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import ZyGoodsForm from './ZyGoodsForm' |
||||
export default { |
||||
name: 'ZyGoodsModal', |
||||
components: { |
||||
ZyGoodsForm |
||||
}, |
||||
data () { |
||||
return { |
||||
title:'', |
||||
width:800, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add () { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(); |
||||
}) |
||||
}, |
||||
edit (record) { |
||||
console.log("----------------") |
||||
console.log(record) |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.edit(record); |
||||
}) |
||||
}, |
||||
close () { |
||||
this.$emit('close'); |
||||
this.visible = false; |
||||
}, |
||||
handleOk () { |
||||
this.$refs.realForm.submitForm(); |
||||
}, |
||||
submitCallback(){ |
||||
this.$emit('ok'); |
||||
this.visible = false; |
||||
}, |
||||
handleCancel () { |
||||
this.close() |
||||
} |
||||
} |
||||
} |
||||
</script> |
Loading…
Reference in new issue