#
Junjie
3 天以前 0a850e560dd357e86a51e1f6e9ab0e54b13ba5e9
src/main/webapp/static/js/wrkMast/wrkMast.js
@@ -30,10 +30,13 @@
            condition: "",
            wrk_no: "",
            wms_wrk_no: "",
            io_type: "",
            wrk_sts: "",
            loc_no: "",
            source_loc_no: "",
            crn_no: "",
            dual_crn_no: ""
            dual_crn_no: "",
            barcode: ""
        };
    }
@@ -70,6 +73,10 @@
                pageTotal: 0,
                tableHeight: 520,
                searchForm: cloneSearchForm(),
                filterOptions: {
                    ioTypes: [],
                    wrkStatuses: []
                },
                sortState: {
                    prop: "",
                    order: ""
@@ -91,6 +98,7 @@
            }
        },
        created: function () {
            this.loadFilterOptions();
            this.loadList();
        },
        mounted: function () {
@@ -105,6 +113,47 @@
            }
        },
        methods: {
            loadFilterOptions: function () {
                var vm = this;
                [
                    {
                        field: "wrkStatuses",
                        url: baseUrl + "/basWrkStatus/list/auth",
                        valueField: "wrkSts",
                        labelField: "wrkDesc"
                    },
                    {
                        field: "ioTypes",
                        url: baseUrl + "/basWrkIotype/list/auth",
                        valueField: "ioType",
                        labelField: "ioDesc"
                    }
                ].forEach(function (config) {
                    $.ajax({
                        url: config.url,
                        headers: { token: localStorage.getItem("token") },
                        method: "GET",
                        data: {
                            curr: 1,
                            limit: 200
                        },
                        success: function (res) {
                            if (res.code === 200) {
                                vm.$set(vm.filterOptions, config.field, ((res.data && res.data.records) || []).map(function (item) {
                                    return {
                                        value: item[config.valueField],
                                        label: item[config.labelField]
                                    };
                                }));
                                return;
                            }
                            if (res.code === 403) {
                                top.location.href = baseUrl + "/";
                            }
                        }
                    });
                });
            },
            displayCellValue: function (row, column) {
                var value;
                if (!row || !column) {