前4个模块的表单样式

This commit is contained in:
2022-10-20 16:44:27 +08:00
parent 7a935886d9
commit 7030154e1e
133 changed files with 13283 additions and 22 deletions

View File

@@ -0,0 +1,88 @@
<template>
<div>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="50%"
>
<el-form ref="formList" label-position="right" label-width="80px" :model="formList">
<el-form-item label="出库单号" prop="outboundOrderNo">
<el-input v-model="formList.outboundOrderNo" />
</el-form-item>
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="formList.customerName" />
</el-form-item>
<el-form-item label="发货缓存区" prop="shipmentCacheArea">
<el-input v-model="formList.shipmentCacheArea" />
</el-form-item>
<el-form-item label="规格" prop="spec">
<el-input v-model="formList.spec" />
</el-form-item>
<el-form-item label="数量" prop="num">
<el-input v-model="formList.num" />
</el-form-item>
<el-form-item label="要求发货时间" prop="deliveryTime">
<el-input v-model="formList.deliveryTime" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="resetForm('formList')"> </el-button>
<el-button type="primary" @click="submitForm('formList')"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'OutStoreDocumentsAdd',
props: {
dialogTitle: {
type: String,
required: true
}
},
data() {
return {
dialogVisible: false,
formList: {
outboundOrderNo: '',
customerName: '',
shipmentCacheArea: '',
spec: '',
num: '',
deliveryTime: ''
}
}
},
mounted() {},
methods: {
init(val) {
if (val) {
console.log(val)
this.$nextTick(() => {
this.formList.outboundOrderNo = val.outboundOrderNo
this.formList.customerName = val.customerName
this.formList.shipmentCacheArea = val.shipmentCacheArea
this.formList.spec = val.spec
this.formList.num = val.num
this.formList.deliveryTime = val.deliveryTime
})
}
this.dialogVisible = true
},
submitForm(formName) {
this.$refs[formName].resetFields()
this.dialogVisible = false
this.$message({
type: 'success',
message: this.dialogTitle + '成功'
})
},
resetForm(formName) {
this.$refs[formName].resetFields()
console.log(this.formList)
this.dialogVisible = false
}
}
}
</script>