Parcourir la source

小bug,“物料分类”点击查询恢复、对应查询条件注销

liangyan0105 il y a 3 ans
Parent
commit
825a9222a5

+ 2 - 3
src/app/routes/basedata/material-file/details/details.component.ts

@@ -41,10 +41,10 @@ export class BasedataMaterialFileDetailsComponent implements OnInit {
       this.baseMaterialFileProduct.pkOrg = sessionStorage.getItem('pkOrg');
       this.baseMaterialFileProductService.queryMainAndChildById(this.id).then(res => {
         this.baseMaterialFileProduct = res.result;
-        console.log('产品对象集合', this.baseMaterialFileProduct);
+        // console.log('产品对象集合', this.baseMaterialFileProduct);
+        if (res.result.baseMaterialFileModularList) {
         this.modData = res.result.baseMaterialFileModularList;
         console.log('模块', this.modData);
-        if (this.modData) {
           this.modData.forEach(e => {
             // console.log('2222', e);
           });
@@ -54,7 +54,6 @@ export class BasedataMaterialFileDetailsComponent implements OnInit {
       });
     });
   }
-
   close() {
     this.drawerRef.close();
   }

+ 3 - 4
src/app/routes/basedata/material-file/material-file.component.html

@@ -49,7 +49,6 @@
       <div nz-row [nzGutter]="24">
         <div nz-col nzMd="24" nzLg="24">
           <nz-tree
-            *ngIf="materialNodes"
             [nzData]="materialNodes"
             [nzSearchValue]="searchValue"
             (nzClick)="treeClick($event)"
@@ -95,10 +94,10 @@
         <!--查询 条件-->
         <div nz-row nzGutter="24">
           <!-- 物料分类名称 -->
-          <div nz-col nzMd="24" nzLg="2">
+          <!-- <div nz-col nzMd="24" nzLg="2">
             <nz-form-label nzNoColon="false"> {{ 'material.classification' | translate }} </nz-form-label>
           </div>
-          <div nz-col nzMd="24" nzLg="4">
+          <div nz-col nzMd="24" nzLg="4" *ngIf="materialNodes">
             <nz-tree-select
               nzAllowClear="false"
               [nzNodes]="materialNodes"
@@ -108,7 +107,7 @@
               name="baseMaterialFileClassificationId"
             >
             </nz-tree-select>
-          </div>
+          </div> -->
           <!-- 产品编码 -->
           <div nz-col nzMd="24" nzLg="2">
             <nz-form-label> {{ 'product' | translate }}{{ 'table.thead.code' | translate }} </nz-form-label>

+ 3 - 3
src/app/routes/basedata/material-file/material-file.component.ts

@@ -180,9 +180,9 @@ export class BasedataMaterialFileComponent implements OnInit {
   //树节点点击事件
   treeClick(data) {
     // 此方法查询产品后,需要点击重置才能刷新到所有产品列表
-    // console.log('点击节点id', data.node.key);
-    // this.baseMaterialFileProduct.baseMaterialFileClassificationId = data.node.key;
-    // this.getProductList(); // 查询对应产品数据
+    console.log('点击节点id', data.node.key);
+    this.baseMaterialFileProduct.baseMaterialFileClassificationId = data.node.key;
+    this.getProductList(); // 查询对应产品数据
   }
 
   //按页码查询

+ 1 - 1
src/app/routes/shared/modal/customer-select/customer-select.component.ts

@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
 import { NzModalRef, NzMessageService, NzNotificationService } from 'ng-zorro-antd';
 import { _HttpClient } from '@delon/theme';
 import { Customer } from 'app/entity/basedata/customer';
+import { Page } from 'app/entity/page'; //分页
 import { CustomerService } from 'app/services/basedata/customer.service';
 
 @Component({
@@ -45,7 +46,6 @@ export class RoutesSharedModalCustomerSelectComponent implements OnInit {
     this.isSpinning = true;
     this.customer.pkOrg = sessionStorage.getItem('pkOrg');
     this.customerService.getCustomer1(this.customer).then(res => {
-      // console.log('!!!!!--->', res);
       this.selectData = res.result.records;
       console.log('弹框列表集合--->', this.selectData);
       this.page = res.result; //页码信息