Commit 04fc4797 by niuxiaolin

merge

parents b3f4b937 341d823e
{
"appId": "io.ionic.starter",
"appName": "ionic",
"bundledWebRuntime": false,
"npmClient": "npm",
"webDir": "www"
}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<name>MyApp</name> <name>MyApp</name>
<description>An awesome Ionic/Cordova app.</description> <description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author> <author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" /> <content original-src="index.html" src="http://192.168.19.225:8100" />
<access origin="*" /> <access origin="*" />
<allow-intent href="http://*/*" /> <allow-intent href="http://*/*" />
<allow-intent href="https://*/*" /> <allow-intent href="https://*/*" />
...@@ -86,4 +86,5 @@ ...@@ -86,4 +86,5 @@
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" /> <plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="cordova-plugin-ionic-webview" spec="^4.0.0" /> <plugin name="cordova-plugin-ionic-webview" spec="^4.0.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" /> <plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
<allow-navigation href="http://192.168.19.225:8100" sessionid="c17ab0a1" />
</widget> </widget>
{ {
"name": "ionic", "name": "ionic",
"integrations": { "integrations": {
"cordova": {} "cordova": {},
"capacitor": {}
}, },
"type": "angular" "type": "angular"
} }
...@@ -21,14 +21,18 @@ ...@@ -21,14 +21,18 @@
"@angular/platform-browser": "^7.2.2", "@angular/platform-browser": "^7.2.2",
"@angular/platform-browser-dynamic": "^7.2.2", "@angular/platform-browser-dynamic": "^7.2.2",
"@angular/router": "^7.2.2", "@angular/router": "^7.2.2",
"@capacitor/cli": "1.0.0",
"@capacitor/core": "1.0.0",
"@delon/auth": "^7.4.0", "@delon/auth": "^7.4.0",
"@ionic-native/barcode-scanner": "^5.6.0", "@ionic-native/barcode-scanner": "^5.6.0",
"@ionic-native/core": "^5.6.0", "@ionic-native/core": "^5.6.0",
"@ionic-native/gao-de-location": "^5.7.0",
"@ionic-native/splash-screen": "^5.6.0", "@ionic-native/splash-screen": "^5.6.0",
"@ionic-native/status-bar": "^5.6.0", "@ionic-native/status-bar": "^5.6.0",
"@ionic/angular": "^4.1.0", "@ionic/angular": "^4.1.0",
"cordova-android": "8.0.0", "cordova-android": "8.0.0",
"cordova-browser": "6.0.0", "cordova-browser": "6.0.0",
"cordova-plugin-gaodelocation-chenyu": "2.0.2",
"core-js": "^2.6.7", "core-js": "^2.6.7",
"ng-zorro-antd-mobile": "^0.12.2", "ng-zorro-antd-mobile": "^0.12.2",
"phonegap-plugin-barcodescanner": "8.0.1", "phonegap-plugin-barcodescanner": "8.0.1",
...@@ -83,6 +87,10 @@ ...@@ -83,6 +87,10 @@
"cordova-plugin-ionic-keyboard": {}, "cordova-plugin-ionic-keyboard": {},
"phonegap-plugin-barcodescanner": { "phonegap-plugin-barcodescanner": {
"ANDROID_SUPPORT_V4_VERSION": "27.+" "ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-gaodelocation-chenyu": {
"ANDROID_API_KEY": "b1791bd94c2b12c1b6f4268544adbd2c",
"IOS_API_KEY": "f7486f5f598535c2bfb2a4e2992d30eb"
} }
}, },
"platforms": [ "platforms": [
......
import { NgModule } from "@angular/core"; import { NgModule } from "@angular/core";
import { BarcodeScanner } from "@ionic-native/barcode-scanner/ngx"; import { BarcodeScanner } from "@ionic-native/barcode-scanner/ngx";
import { GaoDeLocation } from "@ionic-native/gao-de-location/ngx";
@NgModule({ @NgModule({
providers: [BarcodeScanner] providers: [BarcodeScanner, GaoDeLocation]
}) })
export class CordovaModule {} export class CordovaModule {}
<Navbar> <Navbar>
盘点 盘点
</Navbar> </Navbar>
<div class="container"> <div class="container">
......
<TabBar [barTintColor]="'white'" [tintColor]="tintColor" [ngStyle]="tabbarStyle" <TabBar
[unselectedTintColor]="unselectedTintColor" [activeTab]="selectedIndex" [hidden]="hidden" [barTintColor]="'white'"
[tabBarPosition]="topFlag ? 'top' : 'bottom'" (onPress)="tabBarTabOnPress($event)"> [tintColor]="tintColor"
[ngStyle]="tabbarStyle"
[unselectedTintColor]="unselectedTintColor"
[activeTab]="selectedIndex"
[hidden]="hidden"
[tabBarPosition]="topFlag ? 'top' : 'bottom'"
(onPress)="tabBarTabOnPress($event)"
>
<TabBarItem [title]="'盘点'" [key]="0" [icon]="icon1" [selectedIcon]="icon11">
<ng-template #icon1>
<div style="width:22px;height: 22px;">
<span class="iconfont icon-check text-lg"></span>
</div>
</ng-template>
<ng-template #icon11>
<div style="width:22px;height: 22px;">
<span class="iconfont icon-check text-primary text-lg"></span>
</div>
</ng-template>
<app-check></app-check>
</TabBarItem>
<TabBarItem [title]="' 消息中心'" [key]="1" [badge]="2" [icon]="icon2" [selectedIcon]="icon22"> <TabBarItem
[title]="' 消息中心'"
[key]="1"
[badge]="2"
[icon]="icon2"
[selectedIcon]="icon22"
>
<ng-template #icon2> <ng-template #icon2>
<div style="width:22px;height: 22px;"> <div style="width:22px;height: 22px;">
<span class="iconfont icon-msg text-lg"></span> <span class="iconfont icon-msg text-lg"></span>
...@@ -18,69 +42,45 @@ ...@@ -18,69 +42,45 @@
<app-message></app-message> <app-message></app-message>
</TabBarItem> </TabBarItem>
<TabBarItem [title]="'资产'" [key]="2" [icon]="icon3" [selectedIcon]="icon33">
<ng-template #icon3>
<div style="width:22px;height: 22px;">
<span class="iconfont icon-asset text-lg"></span>
</div>
</ng-template>
<ng-template #icon33>
<div style="width:22px;height: 22px;">
<span class="iconfont icon-asset text-primary text-lg"></span>
</div>
</ng-template>
<app-assets></app-assets>
</TabBarItem>
<TabBarItem [title]="'盘点'" [key]="0" [icon]="icon1" [selectedIcon]="icon11"> <TabBarItem [title]="'统计'" [key]="3" [icon]="icon4" [selectedIcon]="icon44">
<ng-template #icon1> <ng-template #icon4>
<div style="width:22px;height: 22px;"> <div style="width:22px;height: 22px;">
<span class="iconfont icon-check text-lg"></span> <span class="iconfont icon-data text-lg"></span>
</div> </div>
</ng-template> </ng-template>
<ng-template #icon11> <ng-template #icon44>
<div style="width:22px;height: 22px;"> <div style="width:22px;height: 22px;">
<span class="iconfont icon-check text-primary text-lg"></span> <span class="iconfont icon-data text-primary text-lg"></span>
</div> </div>
</ng-template> </ng-template>
<app-check></app-check> <app-data></app-data>
</TabBarItem> </TabBarItem>
<TabBarItem [title]="'功能模块'" [key]="2" [icon]="icon3" [selectedIcon]="icon33">
<ng-template #icon3>
<div style="width:22px;height: 22px;">
<span class="iconfont icon-asset text-lg"></span>
</div>
</ng-template>
<ng-template #icon33>
<div style="width:22px;height: 22px;">
<span class="iconfont icon-asset text-primary text-lg"></span>
</div>
</ng-template>
<app-assets></app-assets>
</TabBarItem>
<TabBarItem [title]="'统计'" [key]="3" [icon]="icon4" [selectedIcon]="icon44">
<ng-template #icon4>
<div style="width:22px;height: 22px;">
<span class="iconfont icon-data text-lg"></span>
</div>
</ng-template>
<ng-template #icon44>
<div style="width:22px;height: 22px;">
<span class="iconfont icon-data text-primary text-lg"></span>
</div>
</ng-template>
<app-data></app-data>
</TabBarItem>
<TabBarItem [title]="'我的'" [key]="4" [icon]="icon5" [selectedIcon]="icon55">
<ng-template #icon5>
<div style="width:22px;height: 22px;">
<span class="iconfont icon-user text-lg"></span>
</div>
</ng-template>
<ng-template #icon55>
<div style="width:22px;height: 22px;">
<span class="iconfont icon-user text-primary text-lg"></span>
</div>
</ng-template>
<app-user></app-user>
</TabBarItem>
</TabBar> <TabBarItem [title]="'我的'" [key]="4" [icon]="icon5" [selectedIcon]="icon55">
<ng-template #icon5>
<div style="width:22px;height: 22px;">
<span class="iconfont icon-user text-lg"></span>
</div>
</ng-template>
<ng-template #icon55>
<div style="width:22px;height: 22px;">
<span class="iconfont icon-user text-primary text-lg"></span>
</div>
</ng-template>
<app-user></app-user>
</TabBarItem>
</TabBar>
...@@ -31,6 +31,7 @@ import { AssetsUseRecordDetailComponent } from "./assetsUseRecord/detail/assets- ...@@ -31,6 +31,7 @@ import { AssetsUseRecordDetailComponent } from "./assetsUseRecord/detail/assets-
import { Modal } from "ng-zorro-antd-mobile"; import { Modal } from "ng-zorro-antd-mobile";
import { CheckAddComponent } from "./checkPlan/check-add/check-add.component"; import { CheckAddComponent } from "./checkPlan/check-add/check-add.component";
import { AssetsListComponent } from "./checkPlan/assets-list/assets-list.component"; import { AssetsListComponent } from "./checkPlan/assets-list/assets-list.component";
import { CheckResultComponent } from "./checkPlan/check-result/check-result.component";
const routes: Routes = [ const routes: Routes = [
{ {
...@@ -242,6 +243,13 @@ const routes: Routes = [ ...@@ -242,6 +243,13 @@ const routes: Routes = [
data: { data: {
title: "资产" title: "资产"
} }
},
{
path: "checkResult",
component: CheckResultComponent,
data: {
title: "盘点结果"
}
} }
]; ];
......
...@@ -31,6 +31,7 @@ import { AssetsUsedRoutingModule } from "./assets-used-routing.module"; ...@@ -31,6 +31,7 @@ import { AssetsUsedRoutingModule } from "./assets-used-routing.module";
import { CheckAddComponent } from "./checkPlan/check-add/check-add.component"; import { CheckAddComponent } from "./checkPlan/check-add/check-add.component";
import { SharedModule } from "src/app/shared"; import { SharedModule } from "src/app/shared";
import { AssetsListComponent } from "./checkPlan/assets-list/assets-list.component"; import { AssetsListComponent } from "./checkPlan/assets-list/assets-list.component";
import { CheckResultComponent } from "./checkPlan/check-result/check-result.component";
@NgModule({ @NgModule({
declarations: [ declarations: [
...@@ -76,7 +77,8 @@ import { AssetsListComponent } from "./checkPlan/assets-list/assets-list.compone ...@@ -76,7 +77,8 @@ import { AssetsListComponent } from "./checkPlan/assets-list/assets-list.compone
AssetsUseRecordComponent, AssetsUseRecordComponent,
AssetsUseRecordDetailComponent, AssetsUseRecordDetailComponent,
CheckAddComponent, CheckAddComponent,
AssetsListComponent AssetsListComponent,
CheckResultComponent
], ],
imports: [SharedModule, AssetsUsedRoutingModule] imports: [SharedModule, AssetsUsedRoutingModule]
}) })
......
<div> <div>
<List [renderHeader]=(renderHeader) [renderFooter]=(renderFooter)> <List [renderHeader]=(renderHeader) [renderFooter]=(renderFooter)>
<InputItem
[placeholder]=" '规格型号'"
[(ngModel)]="search.modelNum"
[clear]="true" >
</InputItem>
<InputItem [placeholder]=" '规格型号'" [(ngModel)]="search.modelNum" [clear]="true">
</InputItem>
<InputItem
[placeholder]=" '生产厂家'"
[(ngModel)]="search.madeFirms"
[clear]="true" >
</InputItem>
<InputItem [placeholder]=" '生产厂家'" [(ngModel)]="search.madeFirms" [clear]="true">
</InputItem>
<InputItem
[placeholder]=" '资产名称'"
[(ngModel)]="search.name"
[clear]="true" >
</InputItem>
<InputItem
[placeholder]=" '折旧年限'"
[(ngModel)]="search.depreciableLife"
[clear]="true" >
</InputItem>
<InputItem
[placeholder]=" '存放地'"
[(ngModel)]="search.storage"
[clear]="true" >
</InputItem>
<InputItem [placeholder]=" '资产名称'" [(ngModel)]="search.name" [clear]="true">
</InputItem>
<InputItem
[placeholder]=" '资产编号'"
[(ngModel)]="search.num"
[clear]="true" >
</InputItem>
<InputItem [placeholder]=" '折旧年限'" [(ngModel)]="search.depreciableLife" [clear]="true">
</InputItem>
<ListItem [extra]="search.buyDate" [arrow]="'horizontal'" (onClick)="showDate('buyDate')">
{{'购入日期'}}
</ListItem>
<ListItem> <InputItem [placeholder]=" '存放地'" [(ngModel)]="search.storage" [clear]="true">
<a Button [type]="'primary'" [size]="'small'" [inline]="true" (onClick)="doSearch(search)"> </InputItem>
提交
</a>
<a Button style="margin-left: 2.5px;" [size]="'small'" [inline]="true" (onClick)="onReset()">
重置
</a>
</ListItem>
</List>
</div>
<InputItem [placeholder]=" '资产编号'" [(ngModel)]="search.num" [clear]="true">
</InputItem>
<ListItem *ngFor="let row of table.rows" multipleLine >
<div [ngClass]="{'list-content':!row.showAll}">
<p>附件名称:{{row.accessoryName}}</p><p>帐面数量:{{row.count}}</p><p>净值:{{row.assetNetValue}}</p><p>计量单位:{{row.unit}}</p><p>管理单位:{{row.company? row.company.id:""}}</p><p>规格型号:{{row.modelNum}}</p><p>生产厂家:{{row.madeFirms}}</p><p>资产状态:{{row.assetState}}</p><p>产权单位:{{row.belongUnit? row.belongUnit.id:""}}</p><p>生产能力单位:{{row.productivityUnit}}</p><p>使用单位:{{row.useUnit? row.useUnit.id:""}}</p><p>资产名称:{{row.name}}</p><p>生产能力:{{row.productivity}}</p><p>保管人:{{row.preserver? row.preserver.id:""}}</p><p>折旧年限:{{row.depreciableLife}}</p><p>存放地:{{row.storage}}</p><p>资产编号:{{row.num}}</p><p>车架号:{{row.vin}}</p><p>不含税_单价:{{row.noTaxPrice}}</p><p>设备技术状况:{{row.technologySta}}</p><p>购入日期:{{row.buyDate}}</p><p>实盘数量:{{row.actualCount}}</p>
</div>
<div Button [type]="'primary'" (click)="goDetail(row.id)" [inline]="true" class="list-detail" [size]="'small'">详情</div>
<div (click)="row.showAll=!row.showAll" class="list-more am-list-arrow" [ngClass]="row.showAll?'am-list-arrow-vertical-up':'am-list-arrow-vertical'" ></div>
</ListItem>
<Calendar [(ngModel)]="this.state.date"
[locale]="this.state.en ? 'enUS' : 'zhCN'"
[enterDirection]="this.state.enterDirection"
[visible]="this.state.show"
[getDateExtra]="this.state.getDateExtra"
[defaultDate]="this.state.now"
[minDate]="this.state.minDate"
[maxDate]="this.state.maxDate"
[pickTime]="this.state.pickTime"
[type]="this.state.type"
[rowSize]="this.state.rowSize"
[showShortcut]="this.state.showShortcut"
[infinite]="this.state.infinite"
[defaultValue]="this.state.defaultValue"
[onSelect]="this.state.onSelect"
(onCancel)="triggerCancel()"
(onConfirm)="triggerConfirm($event)"
(onSelectHasDisableDate)="triggerSelectHasDisableDate($event)"></Calendar>
<ListItem [extra]="search.buyDate" [arrow]="'horizontal'" (onClick)="showDate('buyDate')">
{{'购入日期'}}
</ListItem>
<ListItem>
<a Button [type]="'primary'" [size]="'small'" [inline]="true" (onClick)="doSearch(search)">
提交
</a>
<a Button style="margin-left: 2.5px;" [size]="'small'" [inline]="true" (onClick)="onReset()">
重置
</a>
</ListItem>
</List>
</div>
<ListItem *ngFor="let row of table.rows" multipleLine>
<div [ngClass]="{'list-content':!row.showAll}">
<p>附件名称:{{row.accessoryName}}</p>
<p>帐面数量:{{row.count}}</p>
<p>净值:{{row.assetNetValue}}</p>
<p>计量单位:{{row.unit}}</p>
<p>管理单位:{{row.company? row.company.id:""}}</p>
<p>规格型号:{{row.modelNum}}</p>
<p>生产厂家:{{row.madeFirms}}</p>
<p>资产状态:{{row.assetState}}</p>
<p>产权单位:{{row.belongUnit? row.belongUnit.id:""}}</p>
<p>生产能力单位:{{row.productivityUnit}}</p>
<p>使用单位:{{row.useUnit? row.useUnit.id:""}}</p>
<p>资产名称:{{row.name}}</p>
<p>生产能力:{{row.productivity}}</p>
<p>保管人:{{row.preserver? row.preserver.id:""}}</p>
<p>折旧年限:{{row.depreciableLife}}</p>
<p>存放地:{{row.storage}}</p>
<p>资产编号:{{row.num}}</p>
<p>车架号:{{row.vin}}</p>
<p>不含税_单价:{{row.noTaxPrice}}</p>
<p>设备技术状况:{{row.technologySta}}</p>
<p>购入日期:{{row.buyDate}}</p>
<p>实盘数量:{{row.actualCount}}</p>
</div>
<div Button [type]="'primary'" (click)="goDetail(row.id)" [inline]="true" class="list-detail" [size]="'small'">下一步
</div>
<div (click)="row.showAll=!row.showAll" class="list-more am-list-arrow"
[ngClass]="row.showAll?'am-list-arrow-vertical-up':'am-list-arrow-vertical'"></div>
</ListItem>
<Calendar [(ngModel)]="this.state.date" [locale]="this.state.en ? 'enUS' : 'zhCN'"
[enterDirection]="this.state.enterDirection" [visible]="this.state.show" [getDateExtra]="this.state.getDateExtra"
[defaultDate]="this.state.now" [minDate]="this.state.minDate" [maxDate]="this.state.maxDate"
[pickTime]="this.state.pickTime" [type]="this.state.type" [rowSize]="this.state.rowSize"
[showShortcut]="this.state.showShortcut" [infinite]="this.state.infinite" [defaultValue]="this.state.defaultValue"
[onSelect]="this.state.onSelect" (onCancel)="triggerCancel()" (onConfirm)="triggerConfirm($event)"
(onSelectHasDisableDate)="triggerSelectHasDisableDate($event)"></Calendar>
\ No newline at end of file
...@@ -96,7 +96,7 @@ export class AssetsListComponent implements OnInit { ...@@ -96,7 +96,7 @@ export class AssetsListComponent implements OnInit {
this.search = {}; this.search = {};
} }
goDetail(id) { goDetail(id) {
this.router.navigate(["../fixedAssetsDetail", { id: id }], { this.router.navigate(["../checkPlanAdd", id], {
relativeTo: this.activatedRoute relativeTo: this.activatedRoute
}); });
} }
......
...@@ -76,8 +76,8 @@ ...@@ -76,8 +76,8 @@
<ListItem> <ListItem>
<div class="submit-btn"> <div class="submit-btn">
<button Button [type]="'primary'" [size]="'small'" [inline]="true"> <button Button [type]="'primary'" [size]="'small'" [inline]="true" (click)="onCheck()">
提交 执行
</button> </button>
<button Button type="button" style="margin-left: 2.5px;" [size]="'small'" [inline]="true" (onClick)="onReset()"> <button Button type="button" style="margin-left: 2.5px;" [size]="'small'" [inline]="true" (onClick)="onReset()">
重置 重置
......
...@@ -3,6 +3,7 @@ import { Component, OnInit } from "@angular/core"; ...@@ -3,6 +3,7 @@ import { Component, OnInit } from "@angular/core";
import { Router, ActivatedRoute } from "@angular/router"; import { Router, ActivatedRoute } from "@angular/router";
import { switchMap } from "rxjs/operators"; import { switchMap } from "rxjs/operators";
import { Modal, Picker, Toast } from "ng-zorro-antd-mobile"; import { Modal, Picker, Toast } from "ng-zorro-antd-mobile";
import { import {
FormGroup, FormGroup,
FormControl, FormControl,
...@@ -10,6 +11,10 @@ import { ...@@ -10,6 +11,10 @@ import {
FormBuilder FormBuilder
} from "@angular/forms"; } from "@angular/forms";
import { APIService } from "src/app/service/layout/service/api.service"; import { APIService } from "src/app/service/layout/service/api.service";
import {
GaoDeLocation,
PositionOptions
} from "@ionic-native/gao-de-location/ngx";
const data = []; const data = [];
@Component({ @Component({
...@@ -23,9 +28,21 @@ export class CheckAddComponent implements OnInit { ...@@ -23,9 +28,21 @@ export class CheckAddComponent implements OnInit {
private router: ActivatedRoute, private router: ActivatedRoute,
private _modal: Modal, private _modal: Modal,
private api: APIService, private api: APIService,
private fb: FormBuilder private fb: FormBuilder,
) {} private route: Router,
private gaoDeLocation: GaoDeLocation
) {
this.getCurrentPosition();
}
//调用定位
getCurrentPosition() {
this.gaoDeLocation
.getCurrentPosition()
.then((res: PositionOptions) => {
console.log(res);// res.address 为位置信息
})
.catch(error => console.error(error));
}
registerForm: FormGroup; registerForm: FormGroup;
submit: any = { checkPlanAssetList: [] }; submit: any = { checkPlanAssetList: [] };
inventoryType = ["资产明细盘点", "资产范围盘点"]; inventoryType = ["资产明细盘点", "资产范围盘点"];
...@@ -68,7 +85,11 @@ export class CheckAddComponent implements OnInit { ...@@ -68,7 +85,11 @@ export class CheckAddComponent implements OnInit {
} }
}); });
} }
oninventoryType() {} oninventoryType() {}
onCheck() {
this.route.navigateByUrl("../checkResult");
}
buildForm(): void { buildForm(): void {
this.registerForm = this.fb.group({ this.registerForm = this.fb.group({
mode: "add", mode: "add",
......
<p> <div class="result-example">
check-result works! <Result [img]="img1" [message]="message1" [title]="'已完成'">
</p> <ng-template #img1>
<Icon class="spe" [type]="'check-circle'" [color]="'#1F90E6'"></Icon>
</ng-template>
<ng-template #message1>
<div></div>
</ng-template>
</Result>
</div>
\ No newline at end of file
/deep/ .spe .am-icon {
width: 60px;
height: 60px;
}
.spe {
width: 60px;
height: 60px;
display: block;
}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment