kz-ui-base 1.0.71 → 1.0.72
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
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<base-dialog
|
|
3
|
+
v-dialogDrag
|
|
4
|
+
v-dialogDragHeight
|
|
5
|
+
:close-on-click-modal="false"
|
|
6
|
+
custom-class="custom-dialog"
|
|
3
7
|
:visible.sync="visible"
|
|
4
|
-
title="
|
|
8
|
+
title="缺陷选择"
|
|
5
9
|
width="1200px"
|
|
6
|
-
append-to-body
|
|
7
10
|
@on-confirm="handleConfirm"
|
|
8
11
|
@on-cancel="handleCancel"
|
|
9
12
|
>
|
|
@@ -12,18 +15,51 @@
|
|
|
12
15
|
ref="queryForm"
|
|
13
16
|
:model="listQueryParams"
|
|
14
17
|
:inline="true"
|
|
15
|
-
label-width="
|
|
18
|
+
label-width="100px"
|
|
16
19
|
size="small"
|
|
17
20
|
>
|
|
18
|
-
<el-row>
|
|
21
|
+
<el-row class="mb8">
|
|
19
22
|
<el-col :span="8">
|
|
20
|
-
<el-form-item label="
|
|
21
|
-
<el-
|
|
23
|
+
<el-form-item label="组织" prop="siteId">
|
|
24
|
+
<el-select v-model="listQueryParams.siteId" :disabled="siteIdDisabled">
|
|
25
|
+
<el-option v-for="dict in siteOptions"
|
|
26
|
+
:key="dict.id"
|
|
27
|
+
:label="dict.componentName"
|
|
28
|
+
:value="dict.id"/>
|
|
29
|
+
</el-select>
|
|
22
30
|
</el-form-item>
|
|
23
31
|
</el-col>
|
|
24
32
|
<el-col :span="8">
|
|
25
|
-
<el-form-item label="
|
|
26
|
-
<el-
|
|
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">
|
|
44
|
+
<el-form-item label="缺陷组" prop="defectGroupId">
|
|
45
|
+
<el-select v-model="listQueryParams.defectGroupId" filterable>
|
|
46
|
+
<el-option v-for="dict in defectGroupOptions"
|
|
47
|
+
:key="dict.key"
|
|
48
|
+
:label="dict.label"
|
|
49
|
+
:value="dict.key" />
|
|
50
|
+
</el-select>
|
|
51
|
+
</el-form-item>
|
|
52
|
+
</el-col>
|
|
53
|
+
</el-row>
|
|
54
|
+
<el-row class="mb8">
|
|
55
|
+
<el-col :span="8">
|
|
56
|
+
<el-form-item label="缺陷项编号" prop="defectItemNo">
|
|
57
|
+
<el-input placeholder="请输入" size="small" v-model="listQueryParams.defectItemNo" />
|
|
58
|
+
</el-form-item>
|
|
59
|
+
</el-col>
|
|
60
|
+
<el-col :span="8">
|
|
61
|
+
<el-form-item label="缺陷项名称" prop="defectItemName">
|
|
62
|
+
<el-input placeholder="请输入" size="small" v-model="listQueryParams.defectItemName" />
|
|
27
63
|
</el-form-item>
|
|
28
64
|
</el-col>
|
|
29
65
|
<el-col :span="8">
|
|
@@ -60,8 +96,15 @@
|
|
|
60
96
|
@selection-change="onSelectionChange"
|
|
61
97
|
>
|
|
62
98
|
<el-table-column type="selection" min-width="50" align="center" />
|
|
63
|
-
<el-table-column label="
|
|
64
|
-
|
|
99
|
+
<el-table-column label="组织" align="center" min-width="100" prop="siteName">
|
|
100
|
+
<template scope="scope">
|
|
101
|
+
<span>{{ getSiteName(scope.row.siteId) }}</span>
|
|
102
|
+
</template>
|
|
103
|
+
</el-table-column>
|
|
104
|
+
<el-table-column label="缺陷组编号" align="center" min-width="100" prop="defectGroupNo" show-overflow-tooltip/>
|
|
105
|
+
<el-table-column label="缺陷组名称" align="center" min-width="100" prop="defectGroupName" show-overflow-tooltip />
|
|
106
|
+
<el-table-column label="缺陷项编号" align="center" min-width="100" prop="defectItemNo" show-overflow-tooltip/>
|
|
107
|
+
<el-table-column label="缺陷项名称" align="center" min-width="100" prop="defectItemName" show-overflow-tooltip />
|
|
65
108
|
</el-table>
|
|
66
109
|
<pagination
|
|
67
110
|
:total="listQueryParams.total"
|
|
@@ -76,10 +119,24 @@
|
|
|
76
119
|
<script>
|
|
77
120
|
|
|
78
121
|
import {tableHandleSelect, tableOnSelectionChange, tableRowClick, tableRowStyle} from "@/utils";
|
|
79
|
-
import {
|
|
122
|
+
import {getDefectGroup, searchDefectList} from "@srcApi/qms/commonQms";
|
|
123
|
+
import {getSiteNameByIdOrNo} from "kz-ui-base/common/src/utils/cache/fdCache";
|
|
124
|
+
import {process} from "kz-ui-base/api/pd/routing";
|
|
80
125
|
export default {
|
|
81
|
-
name: '
|
|
126
|
+
name: 'DefectItemModal',
|
|
82
127
|
props: {
|
|
128
|
+
siteId: {
|
|
129
|
+
type: String,
|
|
130
|
+
default: function() {
|
|
131
|
+
return undefined
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
processId: {
|
|
135
|
+
type: String,
|
|
136
|
+
default: function() {
|
|
137
|
+
return undefined
|
|
138
|
+
}
|
|
139
|
+
},
|
|
83
140
|
multipleChoice: {
|
|
84
141
|
type: Boolean,
|
|
85
142
|
default: false
|
|
@@ -95,17 +152,66 @@ export default {
|
|
|
95
152
|
pageNum: 1,
|
|
96
153
|
pageSize: 10,
|
|
97
154
|
total: 0,
|
|
98
|
-
|
|
99
|
-
|
|
155
|
+
siteId: '',
|
|
156
|
+
defectGroupId: '',
|
|
157
|
+
defectItemNo: '',
|
|
158
|
+
defectItemName: '',
|
|
100
159
|
},
|
|
101
160
|
listData: [],
|
|
102
|
-
multipleSelection: []
|
|
161
|
+
multipleSelection: [],
|
|
162
|
+
siteOptions: [],
|
|
163
|
+
processOptions: [],
|
|
164
|
+
defectGroupOptions: []
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
computed: {
|
|
168
|
+
siteIdDisabled() {
|
|
169
|
+
return !!this.siteId
|
|
170
|
+
},
|
|
171
|
+
processIdDisabled() {
|
|
172
|
+
return !!this.processId
|
|
103
173
|
}
|
|
104
174
|
},
|
|
105
|
-
created() {
|
|
175
|
+
async created() {
|
|
176
|
+
if (!!this.siteId) {
|
|
177
|
+
this.listQueryParams.siteId = this.siteId
|
|
178
|
+
await this.getProcessList()
|
|
179
|
+
}
|
|
180
|
+
if (!!this.processId) {
|
|
181
|
+
this.listQueryParams.processId = this.processId
|
|
182
|
+
}
|
|
183
|
+
await this.getSiteList()
|
|
184
|
+
await this.getDefectGroup()
|
|
106
185
|
this.getList()
|
|
107
186
|
},
|
|
108
187
|
methods: {
|
|
188
|
+
getSiteList() {
|
|
189
|
+
let options = JSON.parse(localStorage.getItem("sites"));
|
|
190
|
+
// 受检组织要求携带制造职能-- isManufacturing 为 1
|
|
191
|
+
this.siteOptions = options.filter(item => item.isManufacturing == 1);
|
|
192
|
+
},
|
|
193
|
+
getSiteName(siteId) {
|
|
194
|
+
return getSiteNameByIdOrNo(siteId);
|
|
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
|
+
},
|
|
109
215
|
handleQuery() {
|
|
110
216
|
this.getList()
|
|
111
217
|
},
|
|
@@ -120,18 +226,41 @@ export default {
|
|
|
120
226
|
const pageSize = this.listQueryParams.pageSize ? this.listQueryParams.pageSize : 10;
|
|
121
227
|
|
|
122
228
|
const params = {
|
|
123
|
-
|
|
124
|
-
|
|
229
|
+
siteId: this.listQueryParams.siteId,
|
|
230
|
+
defectGroupId: this.listQueryParams.defectGroupId,
|
|
231
|
+
defectItemNo: this.listQueryParams.defectItemNo,
|
|
232
|
+
defectItemName: this.listQueryParams.defectItemName,
|
|
125
233
|
pageNum: pageNum,
|
|
126
234
|
pageSize: pageSize,
|
|
127
235
|
}
|
|
128
|
-
|
|
236
|
+
searchDefectList(params).then((response) => {
|
|
129
237
|
this.listData = response.data;
|
|
130
238
|
this.listQueryParams.total = Number(response.total)
|
|
131
239
|
}).finally(() => {
|
|
132
240
|
this.loading = false
|
|
133
241
|
});
|
|
134
242
|
},
|
|
243
|
+
|
|
244
|
+
async getDefectGroup() {
|
|
245
|
+
const queryData = {
|
|
246
|
+
siteId: this.listQueryParams.siteId,
|
|
247
|
+
processId: this.listQueryParams.processId,
|
|
248
|
+
pageSize: 9999
|
|
249
|
+
}
|
|
250
|
+
await getDefectGroup(queryData).then((res) => {
|
|
251
|
+
for (let obj of res.data) {
|
|
252
|
+
this.defectGroupOptions.push({
|
|
253
|
+
key: obj.id,
|
|
254
|
+
value: obj.defectGroupNo,
|
|
255
|
+
label: obj.defectGroupNo + ' ' + obj.defectGroupName,
|
|
256
|
+
})
|
|
257
|
+
}
|
|
258
|
+
if (this.defectGroupOptions.length === 1) {
|
|
259
|
+
this.listQueryParams.defectGroupId = this.defectGroupOptions[0].key
|
|
260
|
+
}
|
|
261
|
+
})
|
|
262
|
+
},
|
|
263
|
+
|
|
135
264
|
// 取消按钮
|
|
136
265
|
handleCancel() {
|
|
137
266
|
this.$closeDialog()
|