qingyiay
2023-04-10 7406be32979e90a730b5a2ac8d392892f71835d2
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
<template>
    <view class="fayunPlan">
        <view class="fayunPlanBody">
            <combined-title title="领取情况"></combined-title>
            <view class="compDetails">
                <uni-table border stripe emptyText="暂无更多数据">
                    <uni-tr>
                        <uni-th align="left">领取总量</uni-th>
                        <uni-td align="left">{{ cars2 || 0 }}张</uni-td>
                    </uni-tr>
                    <uni-tr>
                        <uni-th align="left" width="120">转发总量</uni-th>
                        <uni-td align="left">{{ orderPlanDetail.fowardSum || 0 }}张</uni-td>
                    </uni-tr>
                    <uni-tr v-for="(item, index) in orderPlanDetail.huodaiList" :key="index">
                        <uni-th align="left">{{ item.huoDaiName }}</uni-th>
                        <uni-td align="left">{{ item.fleetOrHuodaiNub }}张</uni-td>
                    </uni-tr>
                    <uni-tr v-for="(item, index) in orderPlanDetail.cheduiList" :key="index">
                        <uni-th align="left">{{ item.cheduiName }}</uni-th>
                        <uni-td align="left">{{ item.fleetOrHuodaiNub }}张</uni-td>
                    </uni-tr>
                    <uni-tr>
                        <uni-th align="left">司机总领取</uni-th>
                        <uni-td align="left">{{ orderPlanDetail.sijiSum || 0 }}张</uni-td>
                    </uni-tr>
                </uni-table>
            </view>
            <combined-title title="提煤单详情"></combined-title>
            <view class="empty-pointer" v-if="!yyDailyList">暂无更多数据</view>
            <view class="compDetails card" v-for="(item, index) in yyDailyList" :key="index">
                <view class="coal-status">
                    <view class="label-title">提煤单状态</view>
                    <view class="label-value">{{ coalStatus[item.status] }}</view>
                </view>
                <view class="coal-carNo">
                    <view class="label-title">车牌号</view>
                    <view class="label-value">{{ item.carNo || '' }}</view>
                </view>
                <view class="coal-clean">
                    <view class="label-title">净重</view>
                    <view class="label-value">{{ item.clean || 0 }}</view>
                </view>
                <view class="coal-allowance">
                    <view class="label-title">余量</view>
                    <view class="label-value">{{ item.allowance || 0 }}</view>
                </view>
                <view class="more-button"><u-button type="success" text="更多" @click="showMore(index)"></u-button></view>
            </view>
        </view>
    </view>
</template>
 
<script>
import combinedTitle from '@/components/combined-title/combined-title.vue';
export default {
    components: {
        combinedTitle
    },
    onLoad(value) {
        this.orderPlanId = value.orderPlanId;
        this.orderCode = value.code;
        this.cars2 = value.cars2;
        console.log(value, '发运计划参数');
    },
    data() {
        return {
            orderPlanId: null,
            orderCode: null,
            orderPlanDetail: {},
            coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤场', '出煤仓'],
            yyDailyList: [],
            // 领取数量
            cars2: ''
        };
    },
    onShow() {
        this.init();
    },
    methods: {
        showMore(index) {
            uni.navigateTo({
                url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore?orderPlanId=${this.orderPlanId}&index=${index}`
            });
        },
        init() {
            this.GetOrderPlanDetail();
        },
        // 获取发运计划详情
        GetOrderPlanDetail() {
            uni.showLoading({
                title: '加载中...'
            });
            this.$reqGet('xiangqingList', { orderPlanId: this.orderPlanId }).then(res => {
                if (res.code == 0) {
                    this.orderPlanDetail = res.data;
                    this.yyDailyList = res.data.yyDailyList;
                    uni.hideLoading();
                } else {
                    this.$u.toast('加载失败,请稍后重试');
                    uni.hideLoading();
                }
            });
        }
    }
};
</script>
 
<style lang="scss" scoped>
.empty-pointer {
    position: absolute;
    top: 50%;
    left: 38%;
    color: #909399;
}
::v-deep.fayunPlan {
    width: 100%;
    margin: 0 auto;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    .fayunPlanBody {
        width: 94%;
        margin: 0 auto;
 
        .compDetails {
            width: 94%;
            margin: vww(24) auto 0 auto;
            .comp {
                font-size: vww(16);
                font-weight: 400;
                padding: 0 vww(10);
                height: vww(40);
                line-height: vww(40);
                border: 1px solid #ebeef5;
                border-bottom: none;
                background-color: #f5f5f5;
            }
        }
        .card {
            width: 94%;
            height: vww(150);
            margin: vww(24) auto 0 auto;
            background-color: #fff;
            border-radius: 4px;
            box-shadow: 0 2px 12px 0 #ebeef5;
            position: relative;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            .coal-status,
            .coal-clean,
            .coal-allowance,
            .coal-carNo {
                width: 50%;
                margin-top: vww(30);
                height: vww(50);
                text-align: center;
                .label-title {
                    color: #909399;
                }
                .label-value {
                    margin-top: vww(10);
                    color: #606266;
                }
            }
            .more-button {
                width: vww(60);
                position: absolute;
                top: vww(100);
                display: flex;
                justify-content: center;
            }
        }
        // 表格样式
        .uni-table {
            .uni-table-tr {
                padding: 0;
                border: vww(1) solid #c6c6c6;
                .uni-table-th {
                    font-size: vww(14);
                    height: vww(30);
                    line-height: vww(30);
                    padding: vww(5) vww(10);
                    color: #111111;
                    font-weight: 500;
                    background: #e2e2e2;
                }
                .uni-table-td {
                    font-size: vww(14);
                    font-weight: 400;
                    height: vww(30);
                    line-height: vww(30);
                    padding: vww(5) vww(10);
                    color: #111111;
                }
            }
        }
    }
}
</style>