89 lines
2.5 KiB
Vue
89 lines
2.5 KiB
Vue
<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>
|