82 lines
1.8 KiB
Vue
82 lines
1.8 KiB
Vue
<!--
|
|
* @Author: zwq
|
|
* @Date: 2021-11-18 14:16:25
|
|
* @LastEditors: zwq
|
|
* @LastEditTime: 2025-11-28 14:38:31
|
|
* @Description:
|
|
-->
|
|
<template>
|
|
<el-form
|
|
:model="dataForm"
|
|
:rules="dataRule"
|
|
ref="dataForm"
|
|
@keyup.enter.native="dataFormSubmit()"
|
|
label-width="80px">
|
|
<el-row :gutter="20">
|
|
<el-col :span="12">
|
|
<el-form-item label="物料编码" prop="materialCode">
|
|
<el-input
|
|
v-model="dataForm.materialCode"
|
|
clearable
|
|
placeholder="请输入物料编码" />
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="物料型号" prop="materialName">
|
|
<el-input
|
|
v-model="dataForm.materialName"
|
|
clearable
|
|
placeholder="请输入物料型号" />
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="20">
|
|
<el-col :span="12">
|
|
<el-form-item label="物料规格" prop="material">
|
|
<el-input
|
|
v-model="dataForm.material"
|
|
clearable
|
|
placeholder="请输入物料规格" />
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
</template>
|
|
|
|
<script>
|
|
import basicAdd from '@/mixins/basic-add';
|
|
import { createProduct, updateProduct,getProduct } from '@/api/ssdl/product&recipe';
|
|
|
|
export default {
|
|
mixins: [basicAdd],
|
|
data() {
|
|
return {
|
|
urlOptions: {
|
|
createURL: createProduct,
|
|
updateURL: updateProduct,
|
|
infoURL: getProduct,
|
|
},
|
|
dataForm: {
|
|
id: undefined,
|
|
material: undefined,
|
|
materialName: undefined,
|
|
materialCode: undefined,
|
|
},
|
|
typeArr: [],
|
|
dataRule: {
|
|
materialCode: [
|
|
{ required: true, message: '物料编码不能为空', trigger: 'blur' },
|
|
],
|
|
materialName: [
|
|
{ required: true, message: '物料型号不能为空', trigger: 'blur' },
|
|
],
|
|
material: [
|
|
{ required: true, message: '规格不能为空', trigger: 'blur' },
|
|
],
|
|
},
|
|
};
|
|
},
|
|
methods: {},
|
|
};
|
|
</script>
|