kz-ui-base 1.0.121 → 1.0.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
size="small"
|
|
20
20
|
>
|
|
21
21
|
<el-row class="mb8">
|
|
22
|
-
<el-col :span="
|
|
22
|
+
<el-col :span="8">
|
|
23
23
|
<el-form-item label="组织" prop="siteId">
|
|
24
24
|
<el-select v-model="listQueryParams.siteId" :disabled="siteIdDisabled">
|
|
25
25
|
<el-option v-for="dict in siteOptions"
|
|
@@ -29,7 +29,18 @@
|
|
|
29
29
|
</el-select>
|
|
30
30
|
</el-form-item>
|
|
31
31
|
</el-col>
|
|
32
|
-
<el-col :span="
|
|
32
|
+
<el-col :span="8">
|
|
33
|
+
<el-form-item label="工序" prop="processId">
|
|
34
|
+
<el-select v-model="listQueryParams.processId" placeholder="请选择" clearable :disabled="processIdDisabled">
|
|
35
|
+
<el-option v-for="item in processOptions"
|
|
36
|
+
:key="item.id"
|
|
37
|
+
:label="item.processName"
|
|
38
|
+
:value="item.id">
|
|
39
|
+
</el-option>
|
|
40
|
+
</el-select>
|
|
41
|
+
</el-form-item>
|
|
42
|
+
</el-col>
|
|
43
|
+
<el-col :span="8">
|
|
33
44
|
<el-form-item label="缺陷组" prop="defectGroupId">
|
|
34
45
|
<el-select v-model="listQueryParams.defectGroupId" filterable>
|
|
35
46
|
<el-option v-for="dict in defectGroupOptions"
|
|
@@ -39,19 +50,19 @@
|
|
|
39
50
|
</el-select>
|
|
40
51
|
</el-form-item>
|
|
41
52
|
</el-col>
|
|
42
|
-
|
|
53
|
+
</el-row>
|
|
54
|
+
<el-row class="mb8">
|
|
55
|
+
<el-col :span="8">
|
|
43
56
|
<el-form-item label="缺陷项编号" prop="defectItemNo">
|
|
44
57
|
<el-input placeholder="请输入" size="small" v-model="listQueryParams.defectItemNo" />
|
|
45
58
|
</el-form-item>
|
|
46
59
|
</el-col>
|
|
47
|
-
<el-col :span="
|
|
60
|
+
<el-col :span="8">
|
|
48
61
|
<el-form-item label="缺陷项名称" prop="defectItemName">
|
|
49
62
|
<el-input placeholder="请输入" size="small" v-model="listQueryParams.defectItemName" />
|
|
50
63
|
</el-form-item>
|
|
51
64
|
</el-col>
|
|
52
|
-
|
|
53
|
-
<el-row class="mb8">
|
|
54
|
-
<el-col :span="24">
|
|
65
|
+
<el-col :span="8">
|
|
55
66
|
<el-form-item align="right">
|
|
56
67
|
<el-button
|
|
57
68
|
type="primary"
|
|
@@ -110,6 +121,7 @@
|
|
|
110
121
|
import {tableHandleSelect, tableOnSelectionChange, tableRowClick, tableRowStyle} from "@/utils";
|
|
111
122
|
import {getDefectGroup, getverGroup, searchDefectList} from "@srcApi/qms/commonQms";
|
|
112
123
|
import {getSiteNameByIdOrNo} from "kz-ui-base/common/src/utils/cache/fdCache";
|
|
124
|
+
import {process} from "kz-ui-base/api/pd/routing";
|
|
113
125
|
export default {
|
|
114
126
|
name: 'DefectItemModal',
|
|
115
127
|
props: {
|
|
@@ -119,6 +131,12 @@ export default {
|
|
|
119
131
|
return undefined
|
|
120
132
|
}
|
|
121
133
|
},
|
|
134
|
+
processId: {
|
|
135
|
+
type: String,
|
|
136
|
+
default: function() {
|
|
137
|
+
return undefined
|
|
138
|
+
}
|
|
139
|
+
},
|
|
122
140
|
multipleChoice: {
|
|
123
141
|
type: Boolean,
|
|
124
142
|
default: false
|
|
@@ -142,20 +160,28 @@ export default {
|
|
|
142
160
|
listData: [],
|
|
143
161
|
multipleSelection: [],
|
|
144
162
|
siteOptions: [],
|
|
163
|
+
processOptions: [],
|
|
145
164
|
defectGroupOptions: []
|
|
146
165
|
}
|
|
147
166
|
},
|
|
148
167
|
computed: {
|
|
149
168
|
siteIdDisabled() {
|
|
150
169
|
return !!this.siteId
|
|
170
|
+
},
|
|
171
|
+
processIdDisabled() {
|
|
172
|
+
return !!this.processId
|
|
151
173
|
}
|
|
152
174
|
},
|
|
153
|
-
created() {
|
|
175
|
+
async created() {
|
|
154
176
|
if (!!this.siteId) {
|
|
155
177
|
this.listQueryParams.siteId = this.siteId
|
|
178
|
+
await this.getProcessList()
|
|
156
179
|
}
|
|
157
|
-
this.
|
|
158
|
-
|
|
180
|
+
if (!!this.processId) {
|
|
181
|
+
this.listQueryParams.processId = this.processId
|
|
182
|
+
}
|
|
183
|
+
await this.getSiteList()
|
|
184
|
+
await this.getDefectGroup()
|
|
159
185
|
this.getList()
|
|
160
186
|
},
|
|
161
187
|
methods: {
|
|
@@ -167,6 +193,25 @@ export default {
|
|
|
167
193
|
getSiteName(siteId) {
|
|
168
194
|
return getSiteNameByIdOrNo(siteId);
|
|
169
195
|
},
|
|
196
|
+
getProcessList() {
|
|
197
|
+
this.processOptions = []
|
|
198
|
+
const pageNum = 1
|
|
199
|
+
const pageSize = 99999
|
|
200
|
+
process({ op: 'AND', orderBy: 'id', isAsc: 'desc', ...this.getProcessSearchParams(), pageNum, pageSize}).then(res => {
|
|
201
|
+
this.processOptions = res.data;
|
|
202
|
+
})
|
|
203
|
+
},
|
|
204
|
+
getProcessSearchParams() {
|
|
205
|
+
const searchParams = { rules: [] };
|
|
206
|
+
searchParams.rules = [
|
|
207
|
+
{
|
|
208
|
+
op: 'EQ',
|
|
209
|
+
property: 'siteId',
|
|
210
|
+
value: this.listQueryParams.siteId,
|
|
211
|
+
}
|
|
212
|
+
];
|
|
213
|
+
return searchParams;
|
|
214
|
+
},
|
|
170
215
|
handleQuery() {
|
|
171
216
|
this.getList()
|
|
172
217
|
},
|
|
@@ -196,12 +241,13 @@ export default {
|
|
|
196
241
|
});
|
|
197
242
|
},
|
|
198
243
|
|
|
199
|
-
getDefectGroup() {
|
|
200
|
-
const queryData= {
|
|
201
|
-
siteId: this.siteId,
|
|
244
|
+
async getDefectGroup() {
|
|
245
|
+
const queryData = {
|
|
246
|
+
siteId: this.listQueryParams.siteId,
|
|
247
|
+
processId: this.listQueryParams.processId,
|
|
202
248
|
pageSize: 9999
|
|
203
249
|
}
|
|
204
|
-
getDefectGroup(queryData).then((res) => {
|
|
250
|
+
await getDefectGroup(queryData).then((res) => {
|
|
205
251
|
for (let obj of res.data) {
|
|
206
252
|
this.defectGroupOptions.push({
|
|
207
253
|
key: obj.id,
|
|
@@ -209,6 +255,9 @@ export default {
|
|
|
209
255
|
label: obj.defectGroupNo + ' ' + obj.defectGroupName,
|
|
210
256
|
})
|
|
211
257
|
}
|
|
258
|
+
if (this.defectGroupOptions.length === 1) {
|
|
259
|
+
this.listQueryParams.defectGroupId = this.defectGroupOptions[0].key
|
|
260
|
+
}
|
|
212
261
|
})
|
|
213
262
|
},
|
|
214
263
|
|