Commit 6c0d33a8 authored by 仇晓婷's avatar 仇晓婷

物料管理分类新增

parent 8ba6f75a
<template> <template>
<div> <div>
<Button type="dashed">新增</Button> <Form ref="form" :model="entity" :rules="rules" :label-width="90">
</div> <Row>
</template> <Col :span="12">
\ No newline at end of file <FormItem label="编码" prop="userUnit">
<Input v-model="entity.userUnit" placeholder="请输入"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem label="名称" prop="taskBased">
<Input v-model="entity.taskBased" placeholder="请输入"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem label="状态" prop="productName" placeholder="请选择">
<Select v-model="entity.productName" style="width:200px">
<Option value="0">New York</Option>
<Option value="1" disabled>London</Option>
<Option value="2">Sydney</Option>
</Select>
</FormItem>
</Col>
<Col :span="24">
<FormItem label="描述" prop="productName">
<Input v-model="entity.productName" type="textarea" placeholder="请输入..."></Input>
</FormItem>
</Col>
<Col :span="24">
<h4>属性配置</h4>
</Col>
<Col :span="24" style="padding:20px 0 0px 10px;margin-bottom:10px;" class="table-solt">
<Table border :columns="columns" :data="checkList" class="tableCommon">
<template slot-scope="{ row, index }" slot="name">
<Input v-model="row.name" placeholder="请输入" @on-blur="setRow(row,index)" />
</template>
<template slot-scope="{ row, index }" slot="require">
<Input v-model="row.require" placeholder="请输入" @on-blur="setRow(row,index)" />
</template>
<template slot-scope="{ row, index }" slot="result">
<Input v-model="row.result" placeholder="请输入" @on-blur="setRow(row,index)" />
</template>
<template slot-scope="{ row, index }" slot="pash">
<inputFile v-model="row.file" :files="true" :parms="getParams(row.fileId)" />
</template>
<template slot-scope="{ row, index }" slot="remark">
<Input v-model="row.remark" placeholder="请输入" @on-blur="setRow(row,index)" />
</template>
</Table>
</Col>
<Col :span="24" style="margin-bottom:20px;">
<Button type="primary" long @click="addNew" class="mt10">添加</Button>
</Col>
<Col :span="24" style="text-align: right;">
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Col>
</Row>
</Form>
</div>
</template>
<script>
export default {
data() {
return {
entity: {},
disabled: false,
columns: [
{
title: "序号",
type: "index",
width: 80,
align: "center"
},
{
title: "检验项目",
key: "name",
align: "center",
slot: "name"
},
{
title: "要求",
key: "require",
align: "center",
slot: "require"
},
{
title: "预测结果",
key: "result",
align: "center",
slot: "result"
}
],
checkList: [],
rules: {
businessName: [{ required: true, message: "必填", trigger: "blur" }],
businessCode: [{ required: true, message: "必填", trigger: "blur" }]
}
};
},
methods: {
setRow() {
this.checkList = r.result;
},
addNew() {},
handleSubmit() {
this.$refs.form.validate(v => {});
},
handleClose() {
this.$emit('on-close')
}
}
};
</script>
<template> <template>
<div> <div class="classification">
<Button type="dashed">新增</Button> <Button type="dashed" @click="add">新增</Button>
</div> <Modal v-model="addModal" title="新增" footer-hide width='1000'>
</template> <Add @on-close="cancel" @on-ok="addOk" ref="add" />
\ No newline at end of file </Modal>
</div>
</template>
<script>
import Add from "./add";
export default {
components: {
Add
},
data() {
return {
addModal: false
};
},
methods: {
add() {
this.addModal = true;
},
remove(){
},
addOk() {
this.addModal = false;
},
cancel() {
this.addModal = false;
}
}
};
</script>
<style lang="less" scoped>
.classification {
width: 100%;
height: 100%;
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment