沈斌
2017-12-15 f9b157566af34b8dc28ba10b34d025ac04f3168b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<div class="content__title">
    <h1>门店<small>使用 <code>.simple-table</code> 风格的一个实际项目示例。</small></h1>
    <button nz-button (click)="edit({id:0})" [nzType]="'primary'">添加</button>
</div>
<form nz-form [nzLayout]="'inline'" class="search-form">
    <div nz-form-item>
        <div nz-form-control>
            <nz-select [(ngModel)]="s.s" name="s" [nzAllowClear]="false">
                <nz-option nzValue="" nzLabel="状态不限"></nz-option>
                <nz-option nzValue="1" nzLabel="正常"></nz-option>
                <nz-option nzValue="2" nzLabel="已取消"></nz-option>
                <nz-option nzValue="3" nzLabel="已删除"></nz-option>
                <nz-option nzValue="10" nzLabel="待提交"></nz-option>
                <nz-option nzValue="11" nzLabel="待审核"></nz-option>
            </nz-select>
        </div>
    </div>
    <div nz-form-item>
        <div nz-form-control>
            <nz-input [(ngModel)]="s.user_id" name="user_id" nzPlaceHolder="用户编号"></nz-input>
        </div>
    </div>
    <div nz-form-item>
        <div nz-form-control>
            <nz-input [(ngModel)]="s.q" name="q" nzPlaceHolder="门店、分店名称"></nz-input>
        </div>
    </div>
    <div nz-form-item>
        <div nz-form-control>
            <button nz-button (click)="load(true)">搜索</button>
        </div>
    </div>
</form>
<nz-table #nzTable class="simple-table"
    [nzAjaxData]="list"
    [nzLoading]="http.loading"
    [nzTotal]="total"
    [(nzPageIndex)]="s.pi"
    [(nzPageSize)]="s.ps"
    (nzPageIndexChange)="load()"
    [nzBordered]="true"
    [nzSize]="'middle'">
    <thead nz-thead>
        <tr>
            <th nz-th [nzWidth]="'100px'">编号</th>
            <th nz-th>门店名称</th>
            <th nz-th>分店名</th>
            <th nz-th [nzWidth]="'100px'">状态</th>
            <th nz-th [nzWidth]="'180px'"></th>
        </tr>
    </thead>
    <tbody nz-tbody>
        <tr nz-tbody-tr *ngFor="let i of nzTable.data">
            <td>{{i.id}}</td>
            <td>{{i.name}}</td>
            <td>{{i.branch_name}}</td>
            <td>{{i.status_str}}</td>
            <td>
                <a (click)="edit(i)">编辑</a>
                <span nz-table-divider></span>
                <a (click)="photo(i)">图片</a>
                <span nz-table-divider></span>
                <a (click)="sku(i)">经营SKU</a>
            </td>
        </tr>
    </tbody>
</nz-table>