瀏覽代碼

添加仓库备货模块

zhoutao 5 年之前
父節點
當前提交
04d025a30e

+ 0 - 36
README.en.md

@@ -1,36 +0,0 @@
-# sgApp
-
-#### Description
-{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
-
-#### Software Architecture
-Software architecture description
-
-#### Installation
-
-1.  xxxx
-2.  xxxx
-3.  xxxx
-
-#### Instructions
-
-1.  xxxx
-2.  xxxx
-3.  xxxx
-
-#### Contribution
-让人
-1.  Fork the repository
-2.  Create Feat_xxx branch
-3.  Commit your code
-4.  Create Pull Request
-
-
-#### Gitee Feature
-
-1.  You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
-2.  Gitee blog [blog.gitee.com](https://blog.gitee.com)
-3.  Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
-4.  The most valuable open source project [GVP](https://gitee.com/gvp)
-5.  The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
-6.  The most popular members  [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

+ 1 - 39
README.md

@@ -1,39 +1 @@
-# sgApp
-
-#### 介绍
-{**以下是码云平台说明,您可以替换此简介**
-码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
-无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
-
-#### 软件架构
-软件架构说明
-
-
-#### 安装教程
-
-1.  xxxx
-2.  xxxx
-3.  xxxx
-
-#### 使用说明
-
-1.  xxxx
-2.  xxxx
-3.  xxxx
-
-#### 参与贡献
-
-1.  Fork 本仓库
-2.  新建 Feat_xxx 分支
-3.  提交代码
-4.  新建 Pull Request
-
-
-#### 码云特技
-
-1.  使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
-2.  码云官方博客 [blog.gitee.com](https://blog.gitee.com)
-3.  你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
-4.  [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
-5.  码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
-6.  码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
+sgApp

+ 19 - 0
config.xml

@@ -20,6 +20,25 @@
     <preference name="SplashScreen" value="screen" />
     <preference name="SplashScreenDelay" value="3000" />
     <platform name="android">
+        <allow-intent href="market:*" />
+        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
+        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
+        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
+        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
+        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
+        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
+        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
+        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
+        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
+        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
+        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
+        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
+        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
+        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
+        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
+        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
+        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
+        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
     </platform>
     <platform name="ios">
         <allow-intent href="itms:*" />

+ 40 - 10
src/app/app.component.html

@@ -30,6 +30,8 @@
 
         </ion-list>
 
+
+
         <ion-list *ngIf="loggedIn">
         <!-- <ion-list> -->
           <ion-list-header>
@@ -45,6 +47,23 @@
             </ion-item>
           </ion-menu-toggle>
 
+        </ion-list>
+
+
+        <ion-list *ngIf="loggedIn">
+          <!-- <ion-list> -->
+          <ion-list-header>
+            QA
+          </ion-list-header>
+          <ion-menu-toggle autoHide="false">
+            <ion-item routerLink="/contract">
+              <ion-icon slot="start" name="book"></ion-icon>
+              <ion-label>
+                采购合同
+              </ion-label>
+            </ion-item>
+          </ion-menu-toggle>
+
           <ion-menu-toggle autoHide="false">
             <ion-item routerLink="/sample">
               <ion-icon slot="start" name="document"></ion-icon>
@@ -54,34 +73,43 @@
             </ion-item>
           </ion-menu-toggle>
 
+        </ion-list>
+
+
+
+        <ion-list *ngIf="loggedIn">
+          <!-- <ion-list> -->
+          <ion-list-header>
+            仓库
+          </ion-list-header>
           <ion-menu-toggle autoHide="false">
-            <ion-item routerLink="/store-sample-pending">
-              <ion-icon slot="start" name="timer"></ion-icon>
+            <ion-item routerLink="/enter-store">
+              <ion-icon slot="start" name="appstore"></ion-icon>
               <ion-label>
-                待备样
+                入库单
               </ion-label>
             </ion-item>
           </ion-menu-toggle>
 
+
           <ion-menu-toggle autoHide="false">
-            <ion-item routerLink="/contract">
-              <ion-icon slot="start" name="book"></ion-icon>
+            <ion-item routerLink="/store-sample-pending">
+              <ion-icon slot="start" name="timer"></ion-icon>
               <ion-label>
-                采购合同
+                待备样
               </ion-label>
             </ion-item>
           </ion-menu-toggle>
 
           <ion-menu-toggle autoHide="false">
-            <ion-item routerLink="/enter-store">
-              <ion-icon slot="start" name="appstore"></ion-icon>
+            <ion-item routerLink="/warehouse-manage-pending">
+              <ion-icon slot="start" name="timer"></ion-icon>
               <ion-label>
-                入库单
+                待备货
               </ion-label>
             </ion-item>
           </ion-menu-toggle>
 
-
           <ion-menu-toggle autoHide="false">
             <ion-item routerLink="/store-sample">
               <ion-icon slot="start" name="home"></ion-icon>
@@ -90,8 +118,10 @@
               </ion-label>
             </ion-item>
           </ion-menu-toggle>
+
         </ion-list>
 
+
         <ion-list *ngIf="loggedIn">
           <ion-list-header>
             QC

+ 26 - 0
src/app/warehouse-manage-pending/warehouse-manage-pending.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 { WarehouseManagePendingPage } from './warehouse-manage-pending.page';
+
+const routes: Routes = [
+  {
+    path: '',
+    component: WarehouseManagePendingPage
+  }
+];
+
+@NgModule({
+  imports: [
+    CommonModule,
+    FormsModule,
+    IonicModule,
+    RouterModule.forChild(routes)
+  ],
+  declarations: [WarehouseManagePendingPage]
+})
+export class WarehouseManagePendingPageModule {}

+ 66 - 0
src/app/warehouse-manage-pending/warehouse-manage-pending.page.html

@@ -0,0 +1,66 @@
+<ion-header>
+  <ion-toolbar>
+    <ion-buttons slot="start">
+      <ion-menu-button></ion-menu-button>
+    </ion-buttons>
+    <ion-title>待备货</ion-title>
+  </ion-toolbar>
+</ion-header>
+
+
+
+
+<ion-content>
+  <ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
+    <ion-refresher-content pullingIcon="arrow-dropdown" pullingText="加载中..." refreshingSpinner="circles"
+      refreshingText="刷新...">
+    </ion-refresher-content>
+  </ion-refresher>
+
+<!--  <ion-item>-->
+<!--    <ion-label>样品扫描:</ion-label>-->
+<!--    <ion-input #scanInput clear-on-edit (ionChange)="getStoreSampleDetail()" [(ngModel)]="scanCode"></ion-input>-->
+<!--  </ion-item>-->
+
+
+  <ion-card *ngFor="let warehouseManage of warehouseManageLists">
+
+    <ion-card-content class="storeSample-content">
+      <ion-item lines="none">
+        <span>产品图片:</span>
+        <img slot="end" [src]="warehouseManage.imgsrc" class="title-image" />
+      </ion-item>
+      <ion-item>
+        <ion-icon name="briefcase"></ion-icon>
+        <ion-label>中文名:</ion-label>
+        <ion-input [(ngModel)]='warehouseManage.scpCnname'></ion-input>
+      </ion-item>
+      <ion-item>
+        <ion-icon name="square"></ion-icon>
+        <ion-label>我司货号:</ion-label>
+        <ion-input [(ngModel)]='warehouseManage.scpCode'></ion-input>
+      </ion-item>
+      <ion-item>
+        <ion-icon name="square"></ion-icon>
+        <ion-label>检验数量: </ion-label>
+        <ion-input [(ngModel)]="warehouseManage.checkcount" readonly></ion-input>
+      </ion-item>
+      <ion-item>
+        <ion-icon name="square"></ion-icon>
+        <ion-label>检验箱数: </ion-label>
+        <ion-input [(ngModel)]="warehouseManage.checkboxcount" readonly></ion-input>
+      </ion-item>
+
+      <ion-item>
+        <ion-icon name="square"></ion-icon>
+        <ion-label>位置: </ion-label>
+        <ion-input [(ngModel)]="warehouseManage.storelocation" readonly></ion-input>
+      </ion-item>
+      <!-- <ion-item>
+        <ion-icon name="calendar"></ion-icon>
+        <ion-label>更新时间: </ion-label>
+        <ion-datetime [(ngModel)]="storeSample.updatetime" readonly></ion-datetime>
+      </ion-item> -->
+    </ion-card-content>
+  </ion-card>
+</ion-content>

+ 7 - 0
src/app/warehouse-manage-pending/warehouse-manage-pending.page.scss

@@ -0,0 +1,7 @@
+.title-image {
+    width: auto;
+    height: 60px;
+}
+span {
+    font-size: 14px;
+}

+ 27 - 0
src/app/warehouse-manage-pending/warehouse-manage-pending.page.spec.ts

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

+ 58 - 0
src/app/warehouse-manage-pending/warehouse-manage-pending.page.ts

@@ -0,0 +1,58 @@
+import { Component, OnInit } from '@angular/core';
+import { UserData } from '../../providers/user-data';
+import {Keyboard} from '@ionic-native/keyboard/ngx';
+
+@Component({
+  selector: 'app-warehouse-manage-pending',
+  templateUrl: './warehouse-manage-pending.page.html',
+  styleUrls: ['./warehouse-manage-pending.page.scss'],
+})
+export class WarehouseManagePendingPage implements OnInit {
+
+
+  warehouseManageLists  = [];
+  current = 1;
+  size = 10;
+  constructor(
+      private keyboard: Keyboard,
+      public userData: UserData) { }
+  scanCode: string;
+
+  ngOnInit() {
+
+  }
+
+  ionViewDidEnter() {
+    this.getList();
+  }
+
+  async doRefresh(event) {
+    await this.getList();
+    event.target.complete();    // 告诉ion-refresher  更新数据
+  }
+
+  async getList() {
+    const data = await this.userData.getWarehouseManagePendingList(this.current, this.size);
+    this.warehouseManageLists = data;
+    for (const i of this.warehouseManageLists) {
+      i.lendName = i.lend ? '已借出' : '未借出';
+      i.statusName = i.active ? '正常' : '已销毁';
+      if (i.pictures && i.pictures.length !== 0) {
+        i.imgsrc = i.pictures[0].smallPicture;
+      }
+    }
+  }
+
+
+
+  // 通过code获取仓库样品详情
+  async getStoreSampleDetail() {
+    this.keyboard.hide();
+    const data = await this.userData.getStoreSampleDetail(this.scanCode);
+    const code = JSON.parse(data).data.code;
+    await this.userData.changeShelfLend(code);
+    this.getList();
+  }
+
+}
+

文件差異過大導致無法顯示
+ 261 - 224
src/providers/user-data.ts