南骏 池
4 天以前 04cb665c5fc864b891275aaa83405e73441f7663
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
var vm = new Vue({
    el: '#app',
    data: function () {
        return {
            isLoading: false,
            userInfo: {
                "loginGuid": '',
                "loginAccount": '',
            },
            formData: {
                sectionCode: "",
                barcode: "",
                itemNo: "",
                sumQuantity:0
            },
            itemInsFormData: {},
            tableData: [],
            itemTableData: [],
            barMessage: "",
 
            Message: "",
            messageCenter: {},
            messageId: 0,
 
            showClearIcon: false,
            focus1: true,
            focus2: false,
            isActive: 0,
            index: 0,
            currentTab: 0,
            contentScrollW: 0, // 导航区宽度
            scrollLeft: 0, // 横向滚动条位置
            fullHeight: "",
            sectionCode:"",
            depotData: [],
            ItemDetail: [],
            showButton: false,//右上角菜单触发
            ttrre1: false,
            ttrre2: false,
            ytdh: "",
            
        }
    },
    mounted() {
        var that = this;
        this.userInfo = {
            loginGuid: this.GetLoginInfor().loginGuid,
            loginAccount: this.GetLoginInfor().loginAccount,
        };
    },
    methods: {
        getScan() {
            var that = this;
 
            that.isLoading = true;
            that.AxiosHttp("post", 'MesBarCF/GetBarInfoBefore', {
                barcode: that.formData.barcode,
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
 
                        that.formData.sumQuantity = json.data.tbBillList.quantity;
 
                        that.formData.itemNo = json.data.tbMesItems.itemNo;
                        that.formData.itemName = json.data.tbMesItems.itemName;
                        that.formData.itemModel = json.data.tbMesItems.itemModel;
                        that.ytdh = "";
                        that.ItemDetail = [];
                        that.tableData = [];
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$refs.barcode.focus();
                        that.formData.barcode = null;
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    console.log(error);
                    that.$refs.barcode.focus();
                });
        },
 
 
        handleSubmit() {
            if (this.isLoading) {
                return;
            }
 
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'MesCgthSq/ScanCgyt', {
                barcode: that.formData.barcode,
                userName: that.userInfo.loginAccount,
            }, true, 0).then(function (res1) {
                if (res1.status == 0) {
                    that.$notify({ type: 'success', message: res1.data.tbBillList.msg });
                    that.ytdh = res1.data.tbBillList.ytdh;
                    that.ItemDetail = res1.data.ytItem;
                    that.tableData = res1.data.ytBarInfo;
                    that.formData.barcode = "";
                }
                else {
                    that.$toast.fail(res1.message);
                }
                that.isLoading = false
            }).catch(function (error) {
                that.$toast.fail("网络错误,请重试!");
                that.isLoading = false
                console.log(error);
            });
        },
 
        deleteCgyt() {
            if (this.isLoading) {
                return;
            }
 
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'MesCgthSq/deleteCgyt', {
                ytdh: that.ytdh,
                userName: that.userInfo.loginAccount,
            }, true, 0).then(function (res1) {
                if (res1.rtnData.outSum == 1) {
                    that.$notify({ type: 'success', message: '提交成功' });
                    that.init();
                } else {
                    that.$toast.fail(res1.rtnData.outMsg);
                }
                that.isLoading = false
            }).catch(function (error) {
                that.$toast.fail("网络错误,请重试!");
                that.isLoading = false
                console.log(error);
            });
        },
 
        submit() {
            if (this.ttrre) {
                return;
            }
 
            var that = this;
            that.ttrre = true;
            that.AxiosHttp("post", 'FqcManager/EditModelSubmit', {
                guid: that.formData.guid
            }, true, 0).then(function (res1) {
                if (res1.rtnData.outSum == 1) {
                    that.$notify({ type: 'success', message: '提交成功' });
                    that.init();
                } else {
                    that.$toast.fail(res1.rtnData.outMsg);
                }
                that.ttrre = false
            }).catch(function (error) {
                that.$toast.fail("网络错误,请重试!");
                that.ttrre = false
                console.log(error);
            });
        },
    }
})