空管耐用品库存管理前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
1.7 KiB

4 months ago
<template>
<el-dialog
:title="purchaseTitle"
append-to-body
:visible.sync="openShow"
width="30%"
@close="closeDialog"
>
<avue-form ref="form" :option="option"></avue-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
</template>
</el-dialog>
</template>
<script>
export default {
props: {
showDialog: {
type: Boolean,
default: false,
},
},
data() {
return {
purchaseTitle:'报废',
openShow: false,
option: {
submitBtn: false,
emptyBtn: false,
column: [
{
label: "报废数量",
prop: "name",
span: 24,
type: "number",
rules: [
{
required: true,
message: "请输入",
trigger: "blur",
},
],
},
{
label: "报废理由",
prop: "sex",
span: 24,
type:'textarea',
rows:5,
rules: [
{
required: true,
message: "请输入",
trigger: "blur",
},
],
},
],
},
};
},
mounted() {
this.openShow = this.showDialog;
},
methods: {
closeDialog() {
this.openShow = false;
this.$emit("closeDialog");
},
submit() {
this.$refs.form.validate((valid) => {
if (valid) {
this.$emit("submit", this.formData);
}
});
},
},
};
</script>
<style lang="scss" scoped></style>