zhao
2021-06-11 98186752629a7bd38965418af84db382d90b9c07
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
@{
    ViewBag.Title = "LocationExt";
    Layout = "~/Views/Shared/_LayoutVue.cshtml";
}
 
<div id="wmslist" v-cloak>
    <el-card class="box-card">
        <el-form v-bind:model="formData" style="margin-top:5px;" label-width="85px" class="demo-ruleForm" v-bind:inline="true">
            <el-form-item label="货位编码:">
                <el-input v-model="formData.locationCode" size="mini"></el-input>
            </el-form-item>
            <el-button style="margin-top:2px;" size="mini" type="primary" v-on:click="search">查 询</el-button>
        </el-form>
    </el-card>
    <hh-table v-bind:coloptions="locationcols"
              v-bind:paging="true"
              v-bind:single="true"
              v-bind:url="'@Url.Action("LocationExtList")?areaCode='+formData.areaCode"
              v-bind:check="true"
              @*v-on:clickrow="clickRow"*@
              ref="locationextlist"
              v-bind:dh="tableHeight"></hh-table>
 
    <el-footer style="text-align: right; padding: 10px 10px 10px; ">
        <el-row>
            <el-button v-on:click="close" size="mini">取消</el-button>
            <el-button type="primary" v-on:click="save" size="mini">保存</el-button>
        </el-row>
    </el-footer>
</div>
 
 
@section scripts{
    <script src="~/Content/js/linq.js_ver2.2.0.2/linq.js"></script>
    <script>
        var locationExt = new Vue({
            mixins: [useAutoHeight],
            computed: {
                tableHeight: function () {
                    return (this.autoHeight) / 3;
                },
            },
            data: {//数据
                formData: {
                    locationCode: "",
                    areaCode: GetUrlParam("locationCode")
                },
 
                checklocationlist:[],
                locationcols: [],
            },
 
            methods: {//方法
                search: function () {
                    var $this = this;
                    $this.$refs.locationextlist.loadData($this.formData);
                },
                clickRow: function (row, event, column) {
                    @*var opNo = row.CN_S_OP_NO;
                    this.opNo = opNo;
                    this.dtlUrl = "@Url.Action("GetDataTableDtl")?opNo=" + opNo;
                    this.cklistUrl = "@Url.Action("GetDataTableCheckList")?opNo=" + opNo;*@
                },
                selectSingleRowEvent: function (callBack) {
                    var selectRow = this.$refs.locationextlist.selections;
                    if (selectRow.length <= 0) {
                        wms.warning("请选择一条记录!");
                        return;
                    }
                    if (callBack)
                        callBack(selectRow[0]);
                },
                save:function()
                {
                    var $this = this;
                    $this.selectSingleRowEvent(function (row) {
                        //选择填充
                        $this.checklocationlist.push({
                            CN_S_LOCATION_CODE: row.CN_S_LOCATION_CODE,
                        });
                        wms.dialogFrame.cb();
                    });
                },
                close: function ()
                {
                    wms.dialogFrame.show = false;
                }
            },
            mounted: function () {
                var $this = this;
                funcType = $this.formData.CN_S_STOCK_CODE;
                $this.locationcols = [
                { f: "CN_S_LOCATION_CODE", n: "货位编码"},
                { f: "CN_S_LOCATION_STATE", n: "货位状态" },
                { f: "CN_S_USE_STATE", n: "贮存状态" },
                ];
 
            },
            el: '#wmslist'
 
        });
 
 
 
    </script>
}