<template>
|
<el-dialog
|
:title="'备注'"
|
:close-on-click-modal="false"
|
:visible.sync="visible"
|
>
|
<el-form :model="dataForm" ref="dataForm" label-width="100px" class="l-mes">
|
<el-form-item label="备注">
|
<el-input
|
type="textarea"
|
:autosize="{ minRows: 1, maxRows: 4 }"
|
v-model="dataForm.remark"
|
placeholder="备注"
|
></el-input>
|
</el-form-item>
|
</el-form>
|
<span slot="footer" class="dialog-footer">
|
<el-button @click="visible = false">取消</el-button>
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
</span>
|
</el-dialog>
|
</template>
|
|
<script>
|
import { putRoutingTemplateForOrder } from '@/api/plan/manufacturingorder'
|
export default {
|
data() {
|
return {
|
visible: false,
|
dataForm: {
|
id: 0,
|
remark: ''
|
}
|
}
|
},
|
created() {},
|
methods: {
|
init(id, remark) {
|
this.dataForm.id = id || 0
|
this.dataForm.remark = remark
|
this.visible = true
|
},
|
// 表单提交
|
dataFormSubmit() {
|
putRoutingTemplateForOrder(this.dataForm).then((response) => {
|
const data = response.data
|
if (data.code === 0) {
|
this.visible = false
|
this.$message.success('添加成功')
|
} else {
|
this.visible = false
|
this.$message.error('添加失败')
|
}
|
this.$emit('comfirmParamsRemark', data)
|
})
|
}
|
}
|
}
|
</script>
|