Ver Fonte

增加qc搜索,增加部分字段

panxingxin há 5 anos atrás
pai
commit
9cae2bf5a4

+ 2 - 1
src/app/app-routing.module.ts

@@ -27,7 +27,8 @@ const routes: Routes = [
   { path: 'home', loadChildren: './home/home.module#HomePageModule' },
   { path: 'es-apply-scan', loadChildren: './es-apply-scan/es-apply-scan.module#EsApplyScanPageModule' },
   { path: 'enter-store-list', loadChildren: './enter-store-list/enter-store-list.module#EnterStoreListPageModule' },
-  { path: 'enter-store-detail/:code/:entergoodsid', loadChildren: './enter-store-detail/enter-store-detail.module#EnterStoreDetailPageModule' }
+  { path: 'enter-store-detail/:code/:entergoodsid', loadChildren: './enter-store-detail/enter-store-detail.module#EnterStoreDetailPageModule' },
+  { path: 'store-qc-search', loadChildren: './store-qc-search/store-qc-search.module#StoreQcSearchPageModule' }
   // { path: 'scanning', loadChildren: './scanning/scanning.module#ScanningPageModule', canActivate: [LoginGuardGuard] }
 ];
 @NgModule({

+ 2 - 2
src/app/menu/menu.ts

@@ -63,9 +63,9 @@ export const menu_list = [
         title: 'QC',
         children: [{
             id: 10000,
-            name: 'QC验货初检报告列表',
+            name: 'QC验货初检报告',
             icon: 'list-box',
-            url: 'store-qc'
+            url: 'store-qc-search'
         },
         //  {
         //     id: 11000,

+ 17 - 2
src/app/store-pending/store-pending.page.html

@@ -19,12 +19,27 @@
         <span>产品图片:</span>
         <img slot="end" [src]="pending.imgsrc" class="title-image" />
       </ion-item>
-      <ion-item>
+      <!-- <ion-item>
         <span>入库单号:{{pending.rkCode}}</span>
-      </ion-item>
+      </ion-item> -->
       <ion-item>
         <span>我司货号:{{pending.scpCode}}</span>
       </ion-item>
+      <ion-item>
+        <span>合同号:{{pending.sscCode}}</span>
+      </ion-item>
+      <ion-item>
+        <span>PO号:{{pending.scpPoCode}}</span>
+      </ion-item>
+      <ion-item>
+        <span>客户货号:{{pending.scpCustomercode}}</span>
+      </ion-item>
+      <ion-item>
+        <span>入库时间:{{pending.enterTime}}</span>
+      </ion-item>
+      <ion-item>
+        <span>qc员:{{pending.qcName}}</span>
+      </ion-item>
       <ion-item>
         <span>中文品名:{{pending.scpCnname}} </span>
       </ion-item>

+ 26 - 0
src/app/store-qc-search/store-qc-search.module.ts

@@ -0,0 +1,26 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+import { Routes, RouterModule } from '@angular/router';
+
+import { IonicModule } from '@ionic/angular';
+
+import { StoreQcSearchPage } from './store-qc-search.page';
+
+const routes: Routes = [
+  {
+    path: '',
+    component: StoreQcSearchPage
+  }
+];
+
+@NgModule({
+  imports: [
+    CommonModule,
+    FormsModule,
+    IonicModule,
+    RouterModule.forChild(routes)
+  ],
+  declarations: [StoreQcSearchPage]
+})
+export class StoreQcSearchPageModule {}

+ 32 - 0
src/app/store-qc-search/store-qc-search.page.html

@@ -0,0 +1,32 @@
+<ion-header>
+  <ion-toolbar>
+    <ion-buttons slot="start">
+      <ion-menu-button></ion-menu-button>
+    </ion-buttons>
+    <ion-title>QC验货初检报告</ion-title>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content>
+  <ion-list>
+    <ion-item>
+      <ion-label>合同号:</ion-label>
+      <ion-input [(ngModel)]="sscCode"></ion-input>
+    </ion-item>
+    <ion-item>
+      <ion-label>我司货号:</ion-label>
+      <ion-input [(ngModel)]="scpCode"></ion-input>
+    </ion-item>
+    <ion-item>
+      <ion-label>客户货号:</ion-label>
+      <ion-input [(ngModel)]="scpCustomercode"></ion-input>
+    </ion-item>
+    <ion-item>
+      <ion-label>PO号:</ion-label>
+      <ion-input [(ngModel)]="poCode"></ion-input>
+    </ion-item>
+  </ion-list>
+  <div class="ion-padding">
+    <ion-button color="primary" expand="block" (click)="search()">查 询</ion-button>
+  </div>
+</ion-content>

+ 0 - 0
src/app/store-qc-search/store-qc-search.page.scss


+ 27 - 0
src/app/store-qc-search/store-qc-search.page.spec.ts

@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { StoreQcSearchPage } from './store-qc-search.page';
+
+describe('StoreQcSearchPage', () => {
+  let component: StoreQcSearchPage;
+  let fixture: ComponentFixture<StoreQcSearchPage>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ StoreQcSearchPage ],
+      schemas: [CUSTOM_ELEMENTS_SCHEMA],
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(StoreQcSearchPage);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 32 - 0
src/app/store-qc-search/store-qc-search.page.ts

@@ -0,0 +1,32 @@
+import { Component, OnInit } from '@angular/core';
+import { Router } from '@angular/router';
+import { Storage } from '@ionic/storage'
+
+@Component({
+  selector: 'app-store-qc-search',
+  templateUrl: './store-qc-search.page.html',
+  styleUrls: ['./store-qc-search.page.scss'],
+})
+export class StoreQcSearchPage implements OnInit {
+
+  public sscCode:string
+  public scpCode:string
+  public scpCustomercode:string
+  public poCode:string
+
+  constructor(private router: Router,private storage: Storage) { }
+
+  ngOnInit() {
+  }
+
+  search() {
+    let form = {
+      sscCode: this.sscCode,
+      scpCode: this.scpCode,
+      scpCustomercode: this.scpCustomercode,
+      poCode: this.poCode
+    }
+    this.storage.set('qcForm', form)
+    this.router.navigateByUrl(`/store-qc`)
+  }
+}

+ 2 - 2
src/app/store-qc/store-qc.page.html

@@ -1,9 +1,9 @@
 <ion-header>
   <ion-toolbar>
     <ion-buttons slot="start">
-      <ion-menu-button></ion-menu-button>
+      <ion-back-button defaultHref="store-qc-search"></ion-back-button>
     </ion-buttons>
-    <ion-title>QC验货初检报告</ion-title>
+    <ion-title>QC验货初检报告列表</ion-title>
   </ion-toolbar>
 </ion-header>
 

+ 14 - 2
src/app/store-qc/store-qc.page.ts

@@ -13,14 +13,26 @@ export class StoreQCPage implements OnInit {
   qcList = []
   current: number = 1
   size: number = 10
+  form = {}
   constructor(public userData: UserData, private storage: Storage, private router: Router ) { }
 
   ngOnInit() {
-    this.getList()
+    // this.getList()
+    this.storage.get('qcForm').then(async (val) => {
+      if(val) {
+        Object.assign(this.form,val)
+      }      
+      this.getList()
+    })
+  }
+
+  ionViewDidEnter() {
   }
 
   async getList() {
-    let data = await this.userData.getQCList(this.current, this.size)
+    this.form['current'] = this.current
+    this.form['size'] = this.size
+    let data = await this.userData.getQCList(this.form)
     this.qcList = data
   }
 

+ 2 - 2
src/providers/user-data.ts

@@ -1172,14 +1172,14 @@ export class UserData {
   }
 
   // 获取QC验货初检报告列表
-  async getQCList(current: number, size: number): Promise<any> {
+  async getQCList(form): Promise<any> {
     const token = await this.getToken();
     const loading = await this.loadingCtrl.create();
     await loading.present();
     this.nativeHttp.setDataSerializer('json');
     const headers = { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json;charset=UTF-8' };
     return new Promise((resolve, reject) => {
-      from(this.nativeHttp.get(`${environment.APP_SERVE_URL}/inventory/qc/mobile?current=${current}&size=${size}`, {},
+      from(this.nativeHttp.get(`${environment.APP_SERVE_URL}/inventory/qc/mobile`, form,
         headers)).pipe(
           finalize(() => loading.dismiss())
         ).subscribe(async data => {