76 lines
1.8 KiB
Vue
76 lines
1.8 KiB
Vue
<!--
|
|
* @Author: zwq
|
|
* @Date: 2021-11-18 14:16:25
|
|
* @LastEditors: zwq
|
|
* @LastEditTime: 2023-08-31 16:35:40
|
|
* @Description:
|
|
-->
|
|
<template>
|
|
<el-form
|
|
:model="dataForm"
|
|
:rules="dataRule"
|
|
ref="dataForm"
|
|
@keyup.enter.native="dataFormSubmit()"
|
|
label-width="120px">
|
|
<el-form-item label="产品编码" prop="goodSpecificationCode">
|
|
<el-input
|
|
v-model="dataForm.goodSpecificationCode"
|
|
clearable
|
|
placeholder="请输入产品编码" />
|
|
</el-form-item>
|
|
<el-form-item label="产品名称" prop="goodSpecificationName">
|
|
<el-input
|
|
v-model="dataForm.goodSpecificationName"
|
|
clearable
|
|
placeholder="请输入产品名称" />
|
|
</el-form-item>
|
|
<el-form-item label="是否启用" prop="deactivate">
|
|
<el-switch
|
|
v-model="dataForm.deactivate"
|
|
:active-value="1"
|
|
:inactive-value="0"></el-switch>
|
|
</el-form-item>
|
|
</el-form>
|
|
</template>
|
|
|
|
<script>
|
|
import basicAdd from '../mixins/basic-add';
|
|
import {
|
|
createFinishGoodSpecification,
|
|
updateFinishGoodSpecification,
|
|
getFinishGoodSpecification,
|
|
getCode
|
|
} from "@/api/fpw/finishGoodSpecification";
|
|
|
|
export default {
|
|
mixins: [basicAdd],
|
|
data() {
|
|
return {
|
|
urlOptions: {
|
|
isGetCode: true,
|
|
codeURL: getCode,
|
|
codeName: 'goodSpecificationCode',
|
|
createURL: createFinishGoodSpecification,
|
|
updateURL: updateFinishGoodSpecification,
|
|
infoURL: getFinishGoodSpecification,
|
|
},
|
|
dataForm: {
|
|
id: undefined,
|
|
goodSpecificationCode: undefined,
|
|
goodSpecificationName: undefined,
|
|
deactivate: undefined,
|
|
},
|
|
dataRule: {
|
|
goodSpecificationCode: [
|
|
{ required: true, message: '产品编码不能为空', trigger: 'blur' },
|
|
],
|
|
goodSpecificationName: [
|
|
{ required: true, message: '产品名称不能为空', trigger: 'blur' },
|
|
],
|
|
},
|
|
};
|
|
},
|
|
methods: {},
|
|
};
|
|
</script>
|