Commit 1ea58cea by niuxiaolin

完成修改盘点执行

parent 9a546064
{ {
"/asset/*": { "/asset/*": {
"target": "http://192.168.19.171:8082", "target": "http://localhost:8081",
"secure": false, "secure": false,
"logLevel": "debug", "logLevel": "debug",
"changeOrigin": true "changeOrigin": true
......
...@@ -203,7 +203,7 @@ const routes: Routes = [ ...@@ -203,7 +203,7 @@ const routes: Routes = [
} }
}, },
{ {
path: "checkPlanAdd/:id", path: "checkPlanAdd/:id/:planId",
component: CheckAddComponent, component: CheckAddComponent,
data: { data: {
title: "执行盘点" title: "执行盘点"
......
<form [formGroup]="registerForm" (ngSubmit)="onSubmit()"> <form [formGroup]="registerForm" (ngSubmit)="onSubmit()">
<<<<<<< HEAD
<input type="hidden" formControlName="id" [ngModel]="detail.id"> <input type="hidden" formControlName="id" [ngModel]="detail.id">
<List [renderHeader]=(renderHeader)> <List [renderHeader]=(renderHeader)>
<ListItem [extra]="detail.modelNum">盘点单号</ListItem> <ListItem [extra]="detail.modelNum">盘点单号</ListItem>
...@@ -20,12 +19,6 @@ ...@@ -20,12 +19,6 @@
<font color="red">*</font>盘点状态 <font color="red">*</font>盘点状态
</app-form-select> </app-form-select>
<!-- <InputItem [placeholder]="'盘点单号'" [value]="detail.modelNum" [disabled]="disabled" [(ngModel)]="detail.modelNum"> <!-- <InputItem [placeholder]="'盘点单号'" [value]="detail.modelNum" [disabled]="disabled" [(ngModel)]="detail.modelNum">
=======
<List [renderHeader]=(renderHeader)>
<InputItem [placeholder]="'盘点单号'" [error]="isError" [focus]="onFocus" [value]="invoicesNum" [clear]="true"
formControlName="invoicesNum">
<font color="red">*</font>
>>>>>>> b6e79db9bbb73e21767c2641d100bf0d05551ef2
盘点单号 盘点单号
</InputItem> </InputItem>
<InputItem [placeholder]="'请输入事项名称'" [error]="isError" [focus]="onFocus" [value]="name" [clear]="true" <InputItem [placeholder]="'请输入事项名称'" [error]="isError" [focus]="onFocus" [value]="name" [clear]="true"
...@@ -62,7 +55,7 @@ ...@@ -62,7 +55,7 @@
<div class="am-list" style="margin:0;"> <div class="am-list" style="margin:0;">
<div class="am-list-header">上传资源</div> <div class="am-list-header">上传资源</div>
<div class="am-list-body"> <div class="am-list-body">
<ImagePicker [files]="files" [selectable]="files.length < 5" [multiple]="multipleTab === 1" <ImagePicker [files]="files" [multiple]="true"
(onChange)="fileChange($event)" (onImageClick)="imageClick($event)"></ImagePicker> (onChange)="fileChange($event)" (onImageClick)="imageClick($event)"></ImagePicker>
</div> </div>
...@@ -96,17 +89,3 @@ ...@@ -96,17 +89,3 @@
</form> </form>
<List [renderHeader]=(renderHeader2)>
<ListItem [extra]="detail.asset.num">资产编号</ListItem>
<ListItem [extra]="detail.asset.name">资产名称</ListItem>
<ListItem [extra]="detail.modelNum">规格型号</ListItem>
<ListItem [extra]="detail.madeFirms">生产厂家</ListItem>
<ListItem [extra]="detail.taxPrice">账面原值</ListItem>
<ListItem [extra]="detail.addDepreciation">累计折旧</ListItem>
<ListItem [extra]="detail.qualitySta">品质状况</ListItem>
<ListItem [extra]="detail.checkResult">盘点结果</ListItem>
<ListItem [extra]="detail.belongUnit.id"> 归属单位</ListItem>
<ListItem [extra]="detail.projectTeam.id"> 项目组</ListItem>
<ListItem [extra]="detail.assetClass.id">资产分类</ListItem>
</List>
\ No newline at end of file
import { Component, OnInit } from "@angular/core"; 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, merge, tap } from "rxjs/operators";
import { Modal, Picker, Toast, PickerService, ToastService, ModalService } from "ng-zorro-antd-mobile"; import { Modal, Picker, Toast, PickerService, ToastService, ModalService } from "ng-zorro-antd-mobile";
import { import {
...@@ -16,6 +16,8 @@ import { ...@@ -16,6 +16,8 @@ import {
PositionOptions PositionOptions
} from "@ionic-native/gao-de-location/ngx"; } from "@ionic-native/gao-de-location/ngx";
import { b64toBlob } from 'src/app/layout/service/util.service'; import { b64toBlob } from 'src/app/layout/service/util.service';
import { isFulfilled } from 'q';
import { defer, Observable, of } from 'rxjs';
const data = []; const data = [];
@Component({ @Component({
...@@ -50,7 +52,7 @@ export class CheckAddComponent implements OnInit { ...@@ -50,7 +52,7 @@ export class CheckAddComponent implements OnInit {
inventoryType = ["资产明细盘点", "资产范围盘点"]; inventoryType = ["资产明细盘点", "资产范围盘点"];
checkStaType = ["未开始", "待审核", "清查中", "已完成","其他"]; checkStaType = ["未开始", "待审核", "清查中", "已完成","其他"];
fileStrs:[]=[]; fileStrs:[]=[];
detail: any = { asset: {}, belongUnit: {}, projectTeam: {}, assetClass: {} }; detail: any = { asset: {}, belongUnit: {}, projectTeam: {}, };
msg: any = ""; msg: any = "";
formErrors: any = { formErrors: any = {
invoicesNum: "", invoicesNum: "",
...@@ -64,28 +66,38 @@ export class CheckAddComponent implements OnInit { ...@@ -64,28 +66,38 @@ export class CheckAddComponent implements OnInit {
}, },
name: {} name: {}
}; };
id = null; param = null;
ngOnInit() { ngOnInit() {
this.buildForm(); const accessPlan = (param)=>{
this.router.params this.api
.pipe( .getCheckTaskText(param.id, param.planId)
switchMap(param => { .subscribe(data => (this.detail = data.body.checkPlanAsset))
this.id = param.id; }
return this.api.getCheckTask(this.id); const planDialog= (data)=>{
})
)
.subscribe(data => {
if (data.success) { if (data.success) {
Modal.operation( Modal.operation(
[{text:"请选择盘点计划:"}].concat(
data.body.checkList.map(c => ({ data.body.checkList.map(c => ({
text: c.name, text: c.name,
onPress: () => onPress: () =>
this.api accessPlan({...this.param,planId:c.id})
.getCheckTaskText(this.id, c.id)
.subscribe(data => (this.detail = data.body.checkPlanAsset))
})) }))
)
); );
} }
}
this.buildForm();
this.router.params
.pipe(
tap(param=>{this.param=param;console.log(param)}),
switchMap(param=>param.planId?of(param):this.api.getCheckTask(param.id))
)
.subscribe(data => {
if(data.planId){
accessPlan(data);
}else{
planDialog(data);
}
}); });
} }
......
...@@ -20,10 +20,14 @@ ...@@ -20,10 +20,14 @@
</ListItem> </ListItem>
<ListItem> <ListItem>
<!-- <a Button [routerLink]="['../checkPlanAdd',222]" [type]="'primary'" style="margin-right: 2.5px;" [size]="'small'" <a Button [routerLink]="['../checkPlanAdd','fb80bc516677459ab2b43d709e335cb7','']" [type]="'primary'" style="margin-right: 2.5px;" [size]="'small'"
[inline]="true"> [inline]="true">
添加 添加
</a> --> </a>
<a Button [routerLink]="['../checkPlanAdd','fb80bc516677459ab2b43d709e335cb7','8aa21def41aa4b1ba9101fe8e2f78f13']" [type]="'primary'" style="margin-right: 2.5px;" [size]="'small'"
[inline]="true">
测试手动盘点
</a>
<a Button [type]="'primary'" [size]="'small'" [inline]="true" (onClick)="doSearch(search)"> <a Button [type]="'primary'" [size]="'small'" [inline]="true" (onClick)="doSearch(search)">
提交 提交
</a> </a>
......
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