zhao
2021-07-19 8347f2fbddbd25369359dcb2da1233ac48a19fdc
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
@{
    ViewBag.Title = "kpi";
    Layout = "~/Views/Shared/_LayoutVue.cshtml";
}
 
<style>
    .el-progress-bar__outer {
        height: 16px !important;
        position: relative;
    }
</style>
<div id="list" v-cloak>
    <el-card class="box-card">
        <el-form label-width="90px" v-bind:model="formData" class="demo-ruleForm" v-bind:inline="true">
            <el-form-item label="仓库名:">
                <hh-select-url v-model="formData.stockCode"
                               url="/Basic/Common/StockList"
                               valuefield="CN_S_STOCK_CODE"
                               textfield="CN_S_STOCK_NAME"
                               datafield="Data">
                </hh-select-url>
            </el-form-item>
            <el-form-item label="用户名:">
                <el-input v-model="formData.userName" size="mini"></el-input>
            </el-form-item>
            <el-form-item label="统计月份:">
                <el-date-picker v-model="formData.startMonth"
                                type="month"
                                value-format="yyyy-MM"
                                placeholder="选择月" size="mini" style="width:120px">
                </el-date-picker>
            </el-form-item>
            <el-form-item >-
                <el-date-picker v-model="formData.endMonth"
                                type="month"
                                value-format="yyyy-MM"
                                placeholder="选择月" size="mini" style="width:120px">
                </el-date-picker>
            </el-form-item>
            <el-button style="margin-top:2px;" size="mini" type="primary" v-on:click="search">查 询</el-button>
        </el-form>
        <el-row style="padding-left: 10px; margin-top: 7px;">
            @*<el-button size="mini" type="primary" v-on:click="add">导 出</el-button>*@
        </el-row>
    </el-card>
    @*<hh-table v-bind:coloptions="outCols"
              v-bind:paging="true"
              v-bind:check="false"
              v-bind:where="formData"
              v-bind:rowno="true"
              dh="110"
              url="@Url.Action("GetKpiList")"
              ref="inventorylist">
    </hh-table>*@
    <el-table v-bind:data="tableData" class="tb-edit" style="width: 100%;" border
              highlight-current-row
              size="mini">
        <el-table-column label="用户" prop="userName" width="180"
                          align="center"></el-table-column>
        <el-table-column label="上架量" prop="upQty"
                          align="center">
            <template slot-scope="rowData">
                <el-progress v-bind:percentage="rowData.row.upQtyPer"
                             v-bind:show-text="true"
                             v-bind:text-inside="true">
                </el-progress>
            </template>
        </el-table-column>
        <el-table-column label="分拣量" prop="downQty" align="center">
            <template slot-scope="rowData">
                <el-progress v-bind:percentage="rowData.row.downQtyPer"
                             v-bind:show-text="true"
                             v-bind:text-inside="true">
                </el-progress>
            </template>
        </el-table-column>
        <el-table-column label="包装复验量" prop="recheckQty" align="center">
            <template slot-scope="rowData">
                <el-progress v-bind:percentage="rowData.row.recheckQtyPer"
                             v-bind:show-text="true"
                             v-bind:text-inside="true">
                </el-progress>
            </template>
        </el-table-column>
        @*<el-table-column label="移库量" prop="CN_S_OWNER"></el-table-column>*@
        <el-table-column label="年/月" prop="createTime" align="center"></el-table-column>
    </el-table>
    <div class="block"  style="padding-left:20px;padding:5px 0;">
        <el-pagination v-bind:small="true"
                       v-bind:background="true"
                       v-on:size-change="pageSizeChange"
                       v-on:current-change="pageIndexChange"
                       v-bind:current-page="formData.pageIndex"
                       v-bind:page-sizes="pagingOptions.pageSizes"
                       v-bind:page-size="formData.pageSize"
                       layout="total, sizes, prev, pager, next, jumper"
                       v-bind:total="pagingOptions.total">
        </el-pagination>
    </div>
</div>
@section scripts{
    <script>
        var outList = new Vue({
            data: {
                tableData:[],
                formData: {
                    stockCode: "",
                    userName: "",
                    startMonth: "",
                    endMonth: "",
                    pageIndex: 1,
                    pageSize:10
                },
                pagingOptions: {
                    //pageIndex: 1,
                    pageSizes: [10, 20, 30, 40],
                    //pageSize:10,
                        total:0
                },
                where: {},
                outCols: [
                    { f: "userName", n: "用户", w: 180 },
                    { f: "upQty", n: "上架量", w: 180 },
                    { f: "downQty", n: "分拣量", w: 180 },
                    { f: "recheckQty", n: "包装复验量", w: 80 },
                    { f: "CN_S_OWNER", n: "移库量", w: 100 },
                    { f: "createTime", n: "年/月", w: 100 },
                ]
            },
            mounted: function () {
                var $this = this;
                this.search();
            },
            methods: {
                search: function () {
                    var $this = this;
                    //this.$refs.inventorylist.loadData($this.formData);
                    ajaxManage({
                        url: "@Url.Action("GetKpiList")",
                        type:"GET",
                        data: $this.formData,
                        success: function (result) {
                            if (result.Success) {
                                if (result.Data != null)
                                    $this.tableData = result.Data.rows;
                            }
                            else {
                                wms.error(result.Msg);
                            }
                        }
                    });
                },
                pageSizeChange: function (newPageSize) {
                    this.formData.pageSize = newPageSize;
                    this.search();
                },
                pageIndexChange: function (newPageIndex) {
                    this.formData.pageIndex = newPageIndex;
                    this.search();
                },
            },
            watch: {
                deep: true,
                //"formData.showArea": function () {
                //    $this = this;
                //    if ($this.formData.showArea) {
                //        $this.outCols.unshift({ f: "CN_S_AREA_NAME", n: "库区", w: 100 });
                //        this.$refs.inventorylist.loadData($this.formData);
                //    }
                //    else {
                //        $this.outCols.shift();
                //        this.$refs.inventorylist.loadData($this.formData);
                //    }
                //}
            },
            computed: {
                areaUrl: function () {
                    var $this = this;
                    return '/Basic/Common/AreaList?stockCode=' + $this.formData.stockCode + "&include=1";
                }
            },
            el: '#list'
        });
    </script>
}