1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
| <template>
| <el-dialog :close-on-click-modal="false" :visible.sync="islook" width="35rem" class="add-rule-set-dialog"
| @close="shutdown">
| <div slot="title" class="tac drawerHeader">{{ title }}</div>
| <div class="dialog-content-box">
| <el-form ref="form" class="form-box" :rules="rules"
| :model="form"
| label-width="300px"
| label-position="top">
| <el-form-item label="请选择野纤包含那几个生丝标准:" prop="purchaseTypeList">
| <el-checkbox-group v-model="form.purchaseTypeList">
| <el-checkbox
| v-for="item in silkSetList"
| :label="item.id"
| :key=item.id
| >{{ item.value }}</el-checkbox
| >
| </el-checkbox-group>
| </el-form-item>
| </el-form>
| </div>
| <div slot="footer" class="dialog-footer tac">
| <el-button @click="shutdown">取消</el-button>
| <el-button type="primary" @click="onSubmit(form)">确定</el-button>
| </div>
| </el-dialog>
| </template>
|
| <script>
| import { getDataByType } from "@/api/data"
| export default {
| props: {
| title:{
| type:[String,Number],
| default:''
| },
| editRow:{
| type:[Object],
| }
| },
| data() {
| return {
| islook: false,
| silkSetList:getDataByType('silkSet'),
| form: {
| purchaseTypeList:[1],
| },
| rules: {
| // 采购类型
| purchaseTypeList: [
| { required: true, message: "请选择", trigger: ["blur",'change'] },
| ],
| },
| procedureIdsList: [],
| };
| },
| mounted() {
| },
| watch: {
| islook(newVal) {
| if (newVal) {
| this.$nextTick(() => {
| this.$refs["form"].resetFields();
| });
| this.form=this.editRow
| }
| },
| },
| methods: {
| onSubmit() {
| this.$refs.form.validate((valid) => {
| if (valid) {
| this.$emit('confirmValueSave',this.form,1)
| this.shutdown()
| }
| });
| },
| shutdown() {
| this.islook = false;
| },
| },
| };
| </script>
|
| <style lang="scss" scoped>
| .add-rule-set-dialog {
| .form-box {
| width:93%;
| margin: 0 auto;
| .el-form-item {
| width: 100%;
| .el-radio{
| height:40px;
| line-height:40px;
| }
| }
| }
| }
|
|
| ::v-deep .el-input__inner {
| font-size: 13px !important;
| color: rgba(0, 0, 0, 0.9);
| text-align: left;
| }
| </style>
|
|