Mr.Zhang
2023-09-07 def7a94103b1c68110dcfc2a7ceba3021a22a24f
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<template>
    <view class="inspection">
        <div class="inspection_list">
            <div class="inspection_list_item">
                <span>检验类型</span>
                <div class="right">
                    <div class="right_item active">完工检</div>
                    <!-- <div class="right_item active" v-if="form.status == '1'">巡检</div>
                            <div class="right_item active" v-if="form.status == '2'">完工检</div> -->
                </div>
            </div>
        </div>
        <div class="x"></div>
        <div class="inspection_list">
            <div class="inspection_list_item" @click="jumpGD">
                <span>检验工单</span>
                <div class="right1">
                    <span :style="form.gdmc ? 'color: #000;' : ''">{{ form.gdmc ? form.gdmc : '点击选择检验工单'}}</span>
                    <u-icon name="arrow-right" color="#999999" size="18" />
                </div>
            </div>
            <div class="inspection_list_item" v-if="form.gdmc">
                <span>计划数量</span>
                <div class="right1">
                    <span
                        style="color: black;">{{info.planNum}}{{info.umodel ? info.umodel.name : ''}}</span>
                </div>
            </div>
        </div>
        <div class="x"></div>
        <div class="inspection_list">
            <div class="inspection_list_item">
                <span>良品数</span>
                <div class="right1">
                    <input type="number" v-model="form.hgsl" placeholder="0" />
                    <span class="dw" v-if="info.umodel">{{info.umodel.name}}</span>
                </div>
            </div>
            <div class="inspection_list_item">
                <span>不良数量</span>
                <div class="right1">
                    <input type="number" v-model="form.blsl" placeholder="0" />
                    <span class="dw" v-if="info.umodel">{{info.umodel.name}}</span>
                </div>
            </div>
            <div class="inspection_list_item" @click="selectBad" v-show="form.blsl > 0">
                <span>不良说明</span>
                <div class="right1">
                    <span :style="form.blsm ? 'color: #000;' : ''">{{ form.blsm ? form.blsm : '点击选择不良原因'}}</span>
                    <u-icon name="arrow-right" color="#999999" size="18" />
                </div>
            </div>
        </div>
        <div class="inspection_footer">
            <button class="inspection_footer_sub" @click="submit" v-preventReClick>提交</button>
        </div>
        <u-picker :show="show1" title="请选择不良说明" :columns="columns" @cancel="show1=false" @confirm="badConfirm"></u-picker>
    </view>
</template>
 
<script>
    import { createStandard } from '@/util/api/QualityAPI'
    import { checkAllList, getListByCondition, toolingQueryById } from "@/util/api/WorkOrderAPI"
    export default {
        data() {
            return {
                info: {},
                show1: false,
                columns: [['中国', '美国', '日本']],
                columns1: [],
                form: {
                    status: '0',
                    gdid: '',
                    gdmc: '',
                    jygz: '',
                    jygzmc: '',
                    hgsl: 0,
                    blsl: 1,
                    blgz: '',
                    blgzmc: '',
                    blsm: '',
                    dw: ''
                }
            };
        },
        onLoad() {
            uni.$on('workOrder', (data) => {
                this.form.gdmc = data.mmodel.name + '-' + data.pgmodel.name
                this.form.gdid = data.id
                this.info = data
                
            })
        },
        methods: {
            jumpGD() {
                uni.navigateTo({
                    url: '/pages/selectWorkOrder/selectWorkOrder'
                })
            },
            openBL() {},
            getValue1() {},
            selectBad() {
                console.log('------0-----');
                this.show1 = true
            },
            badConfirm(value) {
                console.log(value);
                this.show1 = false
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .inspection {
        width: 100%;
        height: 100%;
        position: absolute;
        background: #F7F7F7;
 
        .x {
            height: 20rpx;
        }
 
        .inspection_list {
            padding: 0 30rpx;
            background: white;
 
            .inspection_list_item {
                height: 98rpx;
                display: flex;
                align-items: center;
                justify-content: space-between;
                border-bottom: 1rpx solid #E5E5E5;
 
                &:last-child {
                    border: none;
                }
 
                span {
                    font-size: 30rpx;
                    font-weight: 400;
                    color: #222222;
                }
 
                .right1 {
                    display: flex;
                    align-items: center;
 
                    span {
                        font-size: 28rpx;
                        font-weight: 400;
                        color: #999999;
                        margin-right: 10rpx;
                    }
 
                    input {
                        width: 180rpx;
                        height: 60rpx;
                        border-radius: 8rpx;
                        border: 1rpx solid #CCCCCC;
                        margin-right: 10rpx;
                        padding: 0 30rpx;
                        box-sizing: border-box;
                        font-size: 28rpx;
                    }
 
                    input::-webkit-input-placeholder {
                        font-size: 28rpx;
                        font-weight: 400;
                        color: #999999;
                    }
 
                    .dw {
                        font-size: 28rpx;
                        font-weight: 400;
                        color: #666666;
                    }
                }
 
                .right {
                    display: flex;
                    align-items: center;
 
                    .active {
                        background: $nav-color !important;
                        color: #ffffff !important;
                    }
 
                    .right_item {
                        padding: 18rpx 32rpx;
                        background: #F2F2F2;
                        border-radius: 8rpx;
                        font-size: 26rpx;
                        font-weight: 400;
                        color: #333333;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        margin-left: 20rpx;
                    }
                }
            }
        }
 
        .inspection_footer {
            position: fixed;
            bottom: 0;
            left: 0;
            width: calc(100% - 60rpx);
            padding: 30rpx 30rpx 68rpx 30rpx;
            background: #F7F7F7;
 
            .inspection_footer_sub {
                width: 100%;
                height: 88rpx;
                background: #4275FC;
                box-shadow: 0 0 12rpx 0 rgba(0, 0, 0, 0.0800);
                border-radius: 8rpx;
                font-size: 30rpx;
                font-weight: 500;
                color: #FFFFFF;
                display: flex;
                align-items: center;
                justify-content: center;
                border: none;
            }
        }
    }
</style>