schangxiang@126.com
2025-05-14 f2643367f79a7136c9ddd92b68922112b5c06ef3
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
<template>
    <view class="unstacking-instore-step2-page-content">
        <easy-select-form-item
            class="forma-item"
            label="入库方式"
            v-model="form.taskModel"
            :list="selectList.models"
            value-field="code"
            label-field="name"
            :clearable="false"
        />
        
        <easy-select-form-item
            class="forma-item"
            label="入库区域"
            v-model="form.taskArea"
            :list="selectList.areas"
            :clearable="false"
        />
        
        <easy-select-form-item
            class="forma-item"
            label="起始站点"
            v-model="form.stationCode"
            :list="selectList.startStations"
            value-field="stationCode"
            label-field="stationName"
        />
        
        <scan-input-form-item
            label="目标位置"
            v-model="form.toPlaceCode"
            :has-scan="false"
            :has-search="false"
        />
    </view>
</template>
 
<script>
import ScanInputFormItem from '@/components/ScanInputFormItem.vue'
import EasySelectFormItem from '@/components/EasySelectFormItem.vue'
import { getDicList } from '@/static/js/utils/index.js'
const defaultForm = {
    stationCode:'',
    taskModel:'2',
    taskArea:2,
    toPlaceCode:''
}
export default {
    name:'unstackingInstoreStep2PageContent',
    components:{ScanInputFormItem,EasySelectFormItem},
    data(){
        return {
            form: {...defaultForm},
            selectList:{
                startStations:[],
                models:[],
                areas:[
                    {value:1,label:'一楼检验点'},
                    {value:2,label:'二楼钢平台'}
                ]
            }
        }
    },
    methods:{
        init(){
            this.getStartStations()
            this.getActionTypes()
        },
        getStartStations(callback){
            if (this.selectList.startStations.length>0) {
                callback && callback(true)
            } else {
                this.$api.get('StarPlaceList',{},{block:'unstacking'}).then((d)=>{
                    this.selectList.startStations = d || []
                    callback && callback(true)
                }).catch((e)=>{
                    callback && callback(false,e)
                })
            }
        },
        getActionTypes(){
            if (this.selectList.models.length>0) {
                callback && callback(true)
            } else {
                this.selectList.models = getDicList(this.$store,'assemble_taskmodel')
            }
        },
        clear(){
            this.form = {...defaultForm}
        },
        get(){
            return {...this.form}
        }
    }
}
</script>
 
<style lang="scss" scoped>
.unstacking-instore-step2-page-content{
    height: 100%;
    overflow: auto;
    .forma-item{
        margin-bottom: 24rpx;
    }
}
</style>