schangxiang@126.com
2025-03-10 bd66e0df64fb45ec648ddacff4518992ce52e98f
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
186
187
188
189
190
191
192
193
194
195
196
<template>
    <view class="overflow">
        <cu-custom bgColor="bg-white" :isBack="true">
            <block slot="backText">
            </block>
            <block slot="content">容器回库</block>
        </cu-custom>
        <view class="flex justify-end align-center padding_right30rpx padding_top12rpx">
            <text class="fontSize12rpx"> 操作人:{{operator}} </text>
        </view>
        <u-form labelPosition="top" :model="warehouse" ref="warehouseRef">
            <u-row class="border_bottom margin_top10rpx padding10" style="background-color: #fff;">
                <u-col span="10">
                    <u-form-item label="容器编号:" prop="Code" required
                        style="font-size: 16px;font-weight: bold;padding: 0 0 10rpx;">
                        <input v-model="warehouse.Code" placeholder="请录入或扫码" @focus="focu=true" @blur="query"
                            class="width padding_left25rpx" style="font-weight: bolder;margin-left: 15rpx;">
                        </input>
                        <u-icon name="close-circle-fill" color="#848484" v-if="warehouse.Code && focu"
                            @click="warehouse.Code=''"></u-icon>
                    </u-form-item>
                </u-col>
                <u-col span="2">
                    <u-icon class="iconfont icon-saoma fontSize60rpx"></u-icon>
                </u-col>
            </u-row>
        </u-form>
        <modal-code ref="resmodal" :rescode='rescode' :resmessage='resmessage' />
    <!--     <view class="width margin_auto background_fff fixed bottom140">
            <view class="flex align-center height80rpx padding border border_radius box_sizing justify-between">
                <view class="fontSize34rpx iconfont icon-zhanghao col-0d11c9">入库口</view>
                <view class="">
                    <text>{{loca}}</text>
                    <u-icon name="arrow-down" style="color: #b5b5b5;" @click="outlist">
                    </u-icon>
                </view>
            </view>
            <u-select v-model="accshow" :list="accList" @confirm="confirm"></u-select>
        </view> -->
        <button-modal :subShow='true' garmenTitle='确认入库' @submit='submit' @reset='rest' />
    </view>
</template>
 
<script>
    import ButtonModal from '../../components/buttonModal.vue'
    import ModalCode from '../../components/ModalCode.vue'
    import {
        list
    } from '@/api/putIn/three.js'
    import {
        stocktakingWhours
    } from '@/api/check/check.js'
    export default {
        data() {
            return {
                renameFocus: false,
                modalshow: false,
                rescode: 0,
                resmessage: "",
                detailshow: false,
                operator: '',
                accshow: false, //入库口弹窗
                accList: [], //入库口列表
                ware: '', //入库口弹窗
                loca: '', //入库口回显
                focu: false,
                wolist: [{
                        value: 1,
                        label: 801
                    },
                    {
                        value: 1,
                        label: 802
                    }
                ], //出库列表
                singlist: [
                    //     {
                    //     "warematerialCode": "string",
                    //     "collectNo": "string",
                    //     "purchaseNo": "string",
                    //     "category": "string",
                    //     "wareMaterialTypeName": "string",
                    //     "specificationModel": "string",
                    //     "long": "string",
                    //     "width": "string",
                    //     "high": "string",
                    //     "weight": "string",
                    //     "barCode": "string",
                    //     "company": "string",
                    //     "uncollectedQuantity": 0,
                    //     "id": 0
                    // },
                ], //物料详情
                options: [{
                    text: '详情',
                    style: {
                        backgroundColor: '#fc9f35'
                    }
                }],
                materlist: [],
                warehouse: {
                    Code: ''
                },
                warehouseRules: {
                    Code: [{
                        required: true,
                        message: '容器编号不能为空',
                        trigger: 'blur'
                    }]
                },
            };
        },
        components: {
            ButtonModal,
            ModalCode
        },
        onReady() {
            this.$refs.warehouseRef.setRules(this.warehouseRules)
        },
        mounted() {
            // this.WarehousChangePort()
            this.operator = JSON.parse(uni.getStorageSync('userInfo')).name
            // this.outlist()
        },
        methods: {
            //查询物料
            query(e) {
                this.$refs.warehouseRef.validate(valid => {
                    if (valid) {
                        setTimeout(() => {
                            this.focu = false
                        }, 200)
                    }
                })
            },
            //入库口
            outlist() {
                let params = {
                    PageNo: 1,
                    PageSize: 999
                }
                list(params).then((res => {
                    if (res.code == 200) {
                        this.accshow=true
                        this.accList = res.data.rows.filter((item) => {
                            if (item.siteTypeName == '入库' || item.siteTypeName == '出入库') {
                                return item
                            }
                        })
                        this.accList.forEach((item, index) => {
                            item.label = item.name
                            item.value = index + 1
                        })
                    }
                }))
            },
            //选择入库口
            confirm(e) {
                this.loca = e[0].label
                this.ware = this.accList[e[0].value - 1].code
            },
            //确认
            submit() {
                let params = {
                    createdTime: this.Datetime,
                    updatedTime: this.Datetime,
                    createdUserId: JSON.parse(uni.getStorageSync('userInfo')).id,
                    createdUserName: JSON.parse(uni.getStorageSync('userInfo')).name,
                    updatedUserId: JSON.parse(uni.getStorageSync('userInfo')).id,
                    updatedUserName: JSON.parse(uni.getStorageSync('userInfo')).name,
                    wareContainerCode: this.warehouse.Code,
                    // wareLocationCode: this.ware,
                    wareLocationCode: '',
                    orderType: 9
                }
                stocktakingWhours(params).then((res) => {
                    this.rescode = res.code
                    this.resmessage = res.message
                    this.$refs.resmodal.show = true
                    if (res.code == 200) {
                        this.renameFocus = true
                        this.warehouse.Code = ''
                        this.loca = ''
                        this.ware = ''
                    }
                })
            }
 
        },
 
    }
</script>
 
<style lang="scss">
 
</style>