kz-ui-base 1.0.90 → 1.0.92

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.
@@ -1,14 +1,22 @@
1
1
  import request from '@utils/request'
2
2
 
3
- // 查询部门列表
3
+ // 查询部门列表(可用状态)
4
4
  export function listDept(query) {
5
5
  return request({
6
- url: '/system/dept/list',
6
+ url: '/system/dept/listAvailDept',
7
7
  method: 'get',
8
8
  params: query
9
9
  })
10
10
  }
11
11
 
12
+ // 查询部门列表(全部状态)
13
+ export function listDeptAllStatus(query) {
14
+ return request({
15
+ url: '/system/dept/list',
16
+ method: 'get',
17
+ params: query
18
+ })
19
+ }
12
20
  // 查询部门列表(排除节点)
13
21
  export function listDeptExcludeChild(query) {
14
22
  return request({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kz-ui-base",
3
- "version": "1.0.90",
3
+ "version": "1.0.92",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -298,14 +298,14 @@ export default {
298
298
  this.msgError("请选择一笔员工数据!");
299
299
  } else {
300
300
  if(this.multipleChoice) {
301
- this.$closeDialog(true, this.multipleSelection)
301
+ this.confirm(this.multipleSelection)
302
302
  } else {
303
- this.$closeDialog(true, this.multipleSelection?.[0])
303
+ this.confirm(this.multipleSelection?.[0])
304
304
  }
305
305
  }
306
306
  },
307
307
  handleCancel() {
308
- this.$closeDialog()
308
+ this.cancel()
309
309
  },
310
310
  siteChangeEvent(val) {
311
311
  this.listQueryParams.deptId = ""
@@ -30,11 +30,16 @@
30
30
  <el-input clearable v-model="searchParams.item.itemSpec" placeholder="请输入规格型号"></el-input>
31
31
  </el-form-item>
32
32
  </el-col>
33
- <el-col :span="6" v-if="!isSkipSearch('itemStatusCode')">
34
- <el-form-item label="物料状态" prop="itemStatusCode">
35
- <dict-select clearable type="item_status_code" v-model="searchParams.item.itemStatusCode"
36
- placeholder="请输入物料状态"></dict-select>
33
+ <el-col :span="6" v-if="!isSkipSearch('itemClassId') && !showItemClass">
34
+ <el-form-item label="存货分类" prop="itemSpec">
35
+ <el-cascader
36
+ :options="treeData"
37
+ @change="onItemClassIdChange"
38
+ :props="{ value: 'id', name: 'itemClassName', label: 'itemClassName', children: 'children', checkStrictly: true }"
39
+ clearable>
40
+ </el-cascader>
37
41
  </el-form-item>
42
+
38
43
  </el-col>
39
44
  </el-row>
40
45
  <el-row>
@@ -103,6 +108,7 @@
103
108
  </el-table-column>
104
109
  <el-table-column v-for="col in listColumns" :label="col.text" :property="col.property"
105
110
  :align="col.align || 'left'" :prop="col.property" v-if="col.visible != false"
111
+ :width="col.width"
106
112
  :min-width="col.width || 100" show-overflow-tooltip>
107
113
  <template slot-scope="scope">
108
114
  {{
@@ -146,6 +152,7 @@ import {listItemCategoryItmAttribute} from "@srcApi/bd/itemCategory";
146
152
  import {listItem} from "@srcApi/bd/item";
147
153
  import {tableHandleSelect, tableOnSelectionChange, tableRowClick, tableRowStyle} from "@/utils/index";
148
154
 
155
+
149
156
  @Component({
150
157
  components: {
151
158
  EntitySelect
@@ -181,7 +188,7 @@ export default class itemModal extends Vue {
181
188
  itemNo: null,
182
189
  itemName: null,
183
190
  itemSpec: null,
184
- itemStatusCode: null,
191
+ itemClassId: null,
185
192
  baseUomCode: null,
186
193
  isDomesticSale: null,
187
194
  isExportSale: null,
@@ -196,14 +203,9 @@ export default class itemModal extends Vue {
196
203
  pageNum: 1,
197
204
  };
198
205
  listColumns = [
199
- {text: "物料编号", property: "itemNo"},
206
+ {text: "物料编号", property: "itemNo", width: 120},
200
207
  {text: "物料名称", property: "itemName"},
201
208
  {text: "规格型号", property: "itemSpec"},
202
- {
203
- text: "物料状态",
204
- property: "itemStatusCode",
205
- dictType: "item_status_code",
206
- }
207
209
  ];
208
210
 
209
211
  @Watch("searchParams.item", {deep: true})
@@ -238,6 +240,15 @@ export default class itemModal extends Vue {
238
240
  tableRowStyle({row, rowIndex})
239
241
  }
240
242
 
243
+ onItemClassIdChange(data) {
244
+ console.log(data)
245
+ if (data.length > 0) {
246
+ this.searchParams.item.itemClassId = data[data.length - 1];
247
+ } else {
248
+ this.$set(this.searchParams.item, 'itemClassId', null);
249
+ }
250
+ }
251
+
241
252
  handleItemCategorySelect(itemCategoryId) {
242
253
  this.loadingParams = true;
243
254
  this.$set(this, "searchAttributes", []);
@@ -270,10 +281,28 @@ export default class itemModal extends Vue {
270
281
 
271
282
  getTreeData() {
272
283
  treeSelect().then((response) => {
273
- this.treeData = response.data;
284
+ let resData = response.data;
285
+ this.deleteEmptyChildren(resData)
286
+ this.$set(this, 'treeData', resData);
274
287
  });
275
288
  }
276
289
 
290
+ deleteEmptyChildren(rootNodes) {
291
+ rootNodes.forEach(node => {
292
+ if (node.children && node.children.length === 0) {
293
+ delete node.children
294
+ }
295
+ if (node.children) {
296
+ this.deleteEmptyChildren(node.children)
297
+ }
298
+ })
299
+ }
300
+
301
+
302
+ treeSelectSelect(node, instanceId) {
303
+ this.searchParams.item.itemClassId = node.id
304
+ }
305
+
277
306
  getList() {
278
307
  this.tableLoading = true;
279
308
  if (this.searchObj != null) {
@@ -281,6 +310,9 @@ export default class itemModal extends Vue {
281
310
  this.searchParams.item[prop] = this.searchObj[prop];
282
311
  }
283
312
  }
313
+ if (this.searchParams.item.itemClassId == '') {
314
+ this.searchParams.item.itemClassId = null;
315
+ }
284
316
  listItem(this.searchParams).then((res) => {
285
317
  this.listData = res.data;
286
318
  this.tableLoading = false;