-
zhangwei
2024-10-08 93a986bc80abdef75923054b9df9adb6e1ccff52
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<template>
    <view class="list full-page">
        <view class="content c-p-b-18">
            <!-- <view class="bgcolor c-p-24 chuany-flex chuany-justify-between chuany-font28 chuany-text-bold">
                报名
                <up-icon name="arrow-right-double" color='#faa93f'></up-icon>
                确认接单
                <up-icon name="arrow-right-double" color='#faa93f'></up-icon>
                上下班打卡
                <up-icon name="arrow-right-double" color='#faa93f'></up-icon>
                结算提现
            </view> -->
            <view class="chuany-flex chuany-justify-between">
                <view class="chuany-width100">
                    <view
                        class="chuany-flex chuany-justify-between chuany-align-center chuany-width100 chuany-box c-p-18">
                        <view class="chuany-font32">
                            {{orderObj.orderName}}
                        </view>
                        <view>
                            {{orderObj.workerType==0?'计时':'计件'}}
                        </view>
                    </view>
                    <!-- <view class="chuany-flex chuany-flex-wrap">
                        <up-tag class='c-p-l-14 c-p-b-14' :text="item" plain v-for="(item,index) in tags"> </up-tag>
                    </view> -->
                    <view class="redcla c-p-l-18 c-p-r-18">
                        <text class="chuany-font40">
                            {{orderObj.workPrice}}<template v-if="orderObj.workPriceMax">~{{orderObj.workPriceMax}}</template>
                        </text>
                        <text class='chuany-font20'>
                            {{orderObj.workerType==0?'元/小时':'元/件'}}
                        </text>
                        <!-- <text class="chuany-font40">
                            {{orderObj.workPrice}}
                        </text>
                        <text class='chuany-font20'>
                            {{orderObj.workerType==0?'元/小时':'元/件'}}
                        </text> -->
                    </view>
                </view>
 
                <!-- <view class="chuany-flex chuany-flex-direction bossimg chuany-align-center">
                    <image class='imgwit' src="@/static/logo.png" mode="widthFix"></image>
                    <text class="chuany-font26">余老板</text>
                </view> -->
            </view>
        </view>
        <view class="coreshop-bg-white c-m-t-18 c-p-18">
            <view class="chuany-flex c-p-20">
                <view class="chuany-width26">
                    <text class="colorgray ">任务日期</text>
                </view>
                <view class="chuany-flex chuany-flex-direction">
                    <text>{{$util.formatDate(orderObj.wordStartTime)}} 至
                        {{$util.formatDate(orderObj.wordEndTime)}}</text>
                </view>
            </view>
            <view class="chuany-flex c-p-l-20 c-p-r-20 c-p-b-20">
                <view class="chuany-width26">
                    <text class="colorgray ">任务时间</text>
                </view>
                <!-- <view class="chuany-flex chuany-flex-direction">
                    <text>{{orderObj.startTimeName}} 至 {{orderObj.endTimeName}}</text>
                </view> -->
                <view class="chuany-flex chuany-flex-direction" v-if="orderObj.zixinganpai">
                    {{orderObj.zixinganpaiName}}
                </view>
                <view class="" v-else>
                    {{orderObj.startTimeName}} 至 {{orderObj.endTimeName}}
                </view>
            </view>
            <!-- <view class="chuany-flex  c-p-l-18">
                <view class="chuany-width26">
                    <text class="colorgray">已招人数</text>
                </view>
                <text>{{orderObj.worderCounted}}/{{orderObj.worderCount}}</text>
            </view> -->
            <!-- <view class="chuany-flex c-p-18">
                <view class="chuany-width26 ">
                    <text class="colorgray">性别</text>
                </view>
                <text>不限</text>
            </view>
            <view class="chuany-flex c-p-l-18 c-p-b-18">
                <view class="chuany-width26">
                    <text class="colorgray">年龄</text>
                </view>
                <text>18岁以上</text>
            </view> -->
            <view class="chuany-flex chuany-justify-between c-p-l-18 c-p-r-18 borderbox">
                <view class="chuany-flex">
                    <image class='dingwei c-p-r-16' src="@/static/image/dingwei.png" mode="widthFix"></image>
                    <view class="chuany-flex chuany-flex-direction">
                        <text class='c-p-b-10'>{{orderObj.worderAddress}}</text>
                        <!-- <text class="colorgray chuany-font26">距当前位置约18.3公里 骑行约1.7小时</text> -->
                    </view>
                </view>
                <!-- <view class="chuany-flex chuany-flex-direction chuany-align-center">
                    <image class='dingwei' src="@/static/image/fabuding.png" mode="widthFix"></image>
                    <text class="chuany-font28">位置</text>
                </view> -->
            </view>
        </view>
        <view class="coreshop-bg-white c-m-t-20 c-p-20">
            <view class="c-p-b-20 colorgray">
                任务要求
            </view>
            <view class="c-p-b-20">
                {{orderObj.demand}}
            </view>
        </view>
        <!-- <view class="coreshop-bg-white c-m-t-20 c-p-20">
            <view class="c-p-b-20 colorgray">
                工价详情
            </view>
            <view class="c-p-b-20">
                当前工价:{{orderObj.workPriceDangqian}} {{orderObj.workerType==0?'元/小时':'元/件'}}
            </view>
            <view class="c-p-b-20">
                历史工价:
                <view class="chuany-flex chuany-justify-between" v-for="item in orderObj.orderBiddingWorkPrices">
                    <view class="">
                        {{$util.formatDate(item.effectTime)}}
                    </view>
                    <view class="">
                        {{item.workPrice}} {{orderObj.workerType==0?'元/小时':'元/件'}}
                    </view>
                </view>
            </view>
        </view> -->
        <view class="tabbtns" v-if="!orderObj.isSelected">
            <up-button color='#fece01' :loading='isLoading' loadingText="报名中" class="text-69" text="报名"
                @click="enroll"></up-button>
        </view>
    </view>
</template>
 
<script>
    import {
        mapActions,
        mapGetters,
        mapMutations
    } from 'vuex'
    export default {
        onLoad(option) {
            let {
                orderid
            } = option
            this.getOrder(orderid)
        },
 
        data() {
            return {
                orderObj: {},
                tags: ['4小时', '可无经验', '手脚麻利', '计时'],
                isLoading: false
            }
        },
        computed: {
            ...mapGetters(['userInfo'])
        },
        methods: {
            getOrder(orderid) {
                this.$api.getOrder(orderid).then(res => {
                    if (res.code == 1) {
                        this.orderObj = res.data
                    }
                })
            },
            enroll() {
                if (!this.userInfo.userWorker) {
                    uni.navigateTo({
                        url: '/pages/mine/apply'
                    });
                    this.$util.showToast({
                        title: '请先完善资料!'
                    })
                    return
                }
                this.isLoading = true
                this.$api.saveBaoMing({
                    orderId: this.orderObj.id
                }).then(res => {
                    if (res.code == 1) {
                        uni.navigateBack()
                        this.$util.showToast({
                            title: "报名成功!",
                            icon: "success"
                        })
                    } else {
                        this.$util.showToast({
                            title: res.error
                        })
                    }
                    this.isLoading = false
                })
            }
        }
    }
</script>
 
<style>
    .list {
        background-color: #f3f4f6;
        padding: 30rpx;
    }
 
    .content {
        width: 100%;
        background-color: #fff;
        border-radius: 20rpx;
        /* margin: 30rpx 30rpx 0 30rpx; */
    }
 
    .bgcolor {
        color: #faa93f;
        background-image: linear-gradient(to right, #fff5e8, #fffefc);
        border-radius: 20rpx 20rpx 0 0;
 
    }
 
    .redcla {
        color: #f05348;
    }
 
    .bossimg {
        width: 25%;
 
    }
 
    .imgwit {
        width: 120rpx;
        height: 120rpx;
        border-radius: 50%;
        margin: 18rpx;
    }
 
    .colorgray {
        color: #989fa6;
    }
 
    .dingwei {
        width: 50rpx;
        height: 50rpx;
    }
</style>