You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
97 lines
2.7 KiB
97 lines
2.7 KiB
<app-page>
|
|
<div class="flex-1 overflow-hidden">
|
|
<app-server-paginated-table
|
|
[options]="table"
|
|
[formGroup]="queryForm"
|
|
[renderColumn]="renderColumnTpl"
|
|
[tableAction]="tableActionTpl"
|
|
>
|
|
<ng-template #tableActionTpl>
|
|
<nz-space>
|
|
<button *nzSpaceItem nz-button nzType="primary" (click)="add()">新增盘点</button>
|
|
<button
|
|
*nzSpaceItem
|
|
nz-button
|
|
nzDanger
|
|
[disabled]="table.ref.selected.size === 0"
|
|
(click)="deleteItem()"
|
|
>
|
|
删除
|
|
</button>
|
|
</nz-space>
|
|
</ng-template>
|
|
<ng-template #renderColumnTpl let-data let-key="key" let-row="row">
|
|
@switch (key) {
|
|
@case ('status') {
|
|
<nz-tag>
|
|
{{ STOCKTAKING_JOB_STATUS_MAP.get(data) }}
|
|
</nz-tag>
|
|
}
|
|
@case ('code') {
|
|
{{ row?._asset.assetCode ?? '-' }}
|
|
}
|
|
@case ('name') {
|
|
{{ row?._asset.name ?? '-' }}
|
|
}
|
|
@case ('category') {
|
|
{{ row?._asset._category?.categoryName ?? '-' }}
|
|
}
|
|
@case ('_warehouse') {
|
|
{{ data?.name ?? '-' }}
|
|
}
|
|
@case ('_position') {
|
|
{{ data?.name ?? '-' }}
|
|
}
|
|
@case ('_head') {
|
|
{{ data?.userName ?? '-' }}
|
|
}
|
|
@case ('_ownCompany') {
|
|
{{ data?.organizationName ?? '-' }}
|
|
}
|
|
@case ('_useOrganization') {
|
|
{{ data?.organizationName ?? '-' }}
|
|
}
|
|
@case ('_category') {
|
|
{{ data?.categoryName ?? '-' }}
|
|
}
|
|
@default {
|
|
{{ data }}
|
|
}
|
|
}
|
|
</ng-template>
|
|
<!-- <ng-container *appTableAction>
|
|
<nz-space>
|
|
<button *nzSpaceItem nz-button nzType="link">资产确认</button>
|
|
<button *nzSpaceItem nz-button nzType="link" nzDanger="">删除</button>
|
|
</nz-space>
|
|
</ng-container> -->
|
|
<ng-container *appTableForm>
|
|
<app-query-item label="资产名称">
|
|
<input nz-input placeholder="请输入" formControlName="name" />
|
|
</app-query-item>
|
|
<app-query-item label="资产编号">
|
|
<input nz-input placeholder="请输入" formControlName="assetCode" />
|
|
</app-query-item>
|
|
<app-query-item label="规格型号">
|
|
<input nz-input placeholder="请输入" formControlName="model" />
|
|
</app-query-item>
|
|
<app-query-item label="序列号">
|
|
<input nz-input placeholder="请输入" formControlName="serialNumber" />
|
|
</app-query-item>
|
|
|
|
<app-query-item label="资产状态">
|
|
<nz-select
|
|
nzPlacement="bottomRight"
|
|
class="!w-24"
|
|
[nzDropdownMatchSelectWidth]="false"
|
|
formControlName="status"
|
|
>
|
|
@for (item of ASSET_STATUS_MAP | keyvalue; track $index) {
|
|
<nz-option [nzLabel]="item.value" [nzValue]="item.key"></nz-option>
|
|
}
|
|
</nz-select>
|
|
</app-query-item>
|
|
</ng-container>
|
|
</app-server-paginated-table>
|
|
</div>
|
|
</app-page>
|
|
|