Merge remote-tracking branch 'origin/master'
| | |
| | | <view class="index-wu" v-if="!isLogin"> |
| | | <image src="/static/icon/default_login@2x.png" mode="widthFix"></image> |
| | | <text>您还没有登录,请登录后查看订单</text> |
| | | <button>登录</button> |
| | | <button @click="toLogin">登录</button> |
| | | </view> |
| | | |
| | | <!-- 已登陆 --> |
| | |
| | | </view> |
| | | <!-- 发单方 --> |
| | | <view class="index-list" v-if="typeViewId === 0"> |
| | | <view class="index-list-item" v-for="(item, index) in orderList" :key="index"> |
| | | <view class="index-list-item" v-for="(item, index) in orderList" :key="index" @click="jumpDesc(item)"> |
| | | <view class="index-list-item-head"> |
| | | <view class="index-list-item-head-l"> |
| | | <view class="xoam"></view> |
| | |
| | | <view class="index-list-item-head-r" v-if="item.status === 2">已接单</view> |
| | | <view class="index-list-item-head-r" v-if="item.status === 3">进行中</view> |
| | | <view class="index-list-item-head-r" v-if="item.status === 2 && item.isUpdate === 1">已修改,待接单方确认</view> |
| | | <view class="index-list-item-head-r hui" v-if="item.status === 4">已完成</view> |
| | | <view class="index-list-item-head-r hui" v-if="item.status === 4 && item.commentStatus !== 0">已完成</view> |
| | | <view class="index-list-item-head-r hui" v-if="item.status === 99">已取消</view> |
| | | <view class="index-list-item-head-r" v-if="item.status === 4 && item.commentStatus === 0">待评价</view> |
| | | </view> |
| | |
| | | </view> |
| | | <view class="index-list-item-dz"> |
| | | <image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image> |
| | | <text>{{item.startDate}} 至 {{item.endDate}}({{item.priceNum1}}天)</text> |
| | | <text>{{item.startDate}} 至 {{item.endDate}}({{item.totalDays}}天)</text> |
| | | </view> |
| | | </template> |
| | | <view class="index-list-item-price"> |
| | |
| | | <view class="eidt"> |
| | | <view></view> |
| | | <view class="eidt-right"> |
| | | <view class="eidt-close" v-if="[0,1,2].includes(item.status)" @click="orderId = item.id, show = true">取消订单</view> |
| | | <view class="eidt-close" v-if="[0,1,2].includes(item.status)" @click.stop="orderId = item.id, show = true">取消订单</view> |
| | | <view class="eidt-phone" v-if="[2].includes(item.status)">联系师傅</view> |
| | | <view class="eidt-phone" v-if="item.status === 4 && item.commentStatus === 0">评价订单</view> |
| | | <view class="eidt-btn" v-if="[0,1,2].includes(item.status)" @click="jumpEdit(item)">修改订单</view> |
| | | <view class="eidt-btn" v-if="(item.type === 2 && item.status === 0) || (item.type === 2 && item.status === 3)" @click="jumpEdit(item)">继续支付</view> |
| | | <!-- <view class="eidt-close">删除订单</view> |
| | | <view class="eidt-phone">联系师傅</view> |
| | | <view class="eidt-phone">评价订单</view> |
| | | <view class="eidt-btn">修改订单</view> |
| | | <view class="eidt-btn">完成并支付</view> --> |
| | | <view class="eidt-btn" v-if="[0,1,2].includes(item.status) && item.type !== 2" @click.stop="jumpEdit(item)">修改订单</view> |
| | | <view class="eidt-btn" v-if="(item.type === 2 && item.status === 0) || (item.type === 2 && item.status === 3)" @click.stop="jumpEdit(item)">继续支付</view> |
| | | <view class="eidt-btn" v-if="item.status === 2" @click.stop="startJobs(item.id)">开始作业</view> |
| | | <view class="eidt-btn" v-if="item.status === 3" @click.stop="jumpDesc(item)">完成并支付</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- 接单方 --> |
| | | <view class="index-list" v-if="typeViewId === 1"> |
| | | <view class="index-list-item" v-for="(item, index) in orderList" :key="index"> |
| | | <view class="index-list-item" v-for="(item, index) in orderList" :key="index" @click="jumpDesc(item)"> |
| | | <view class="index-list-item-head"> |
| | | <view class="index-list-item-head-l"> |
| | | <view class="xoam"></view> |
| | |
| | | <view class="eidt-tips" v-else></view> |
| | | |
| | | <view class="eidt-right"> |
| | | <view class="eidt-close" v-if="item.status === 2" @click="orderId = item.id, show = true">取消订单</view> |
| | | <view class="eidt-phone" v-if="[2,3].includes(item.status)" @click="phoneCall(item.linkPhone)">联系业主</view> |
| | | |
| | | <!-- <view class="eidt-close">删除订单</view> |
| | | <view class="eidt-phone">联系师傅</view> |
| | | <view class="eidt-phone">评价订单</view> |
| | | <view class="eidt-btn">修改订单</view> |
| | | <view class="eidt-btn">完成并支付</view> --> |
| | | <view class="eidt-close" v-if="item.status === 2" @click.stop="orderId = item.id, show = true">取消订单</view> |
| | | <view class="eidt-phone" v-if="[2,3].includes(item.status)" @click.stop="phoneCall(item.linkPhone)">联系业主</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="index-list-item"> |
| | | <view class="index-list-item-head"> |
| | | <view class="index-list-item-head-l"> |
| | | <view class="xoam"></view> |
| | | <text>运货单-小货车-厢式</text> |
| | | <view class="tips1">自主抢单</view> |
| | | </view> |
| | | <view class="index-list-item-head-r">已接单</view> |
| | | </view> |
| | | <view class="index-list-item-info"> |
| | | 葡萄|20000斤|需2辆 |
| | | </view> |
| | | <view class="index-list-item-date"> |
| | | <image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image> |
| | | <text>07-26 至 07-27(2天)</text> |
| | | </view> |
| | | <view class="address"> |
| | | <view class="address-xian"></view> |
| | | <view class="address-row"> |
| | | <image src="/static/icon/ic_qidian@2x.png" mode="widthFix"></image> |
| | | <text>长江西路大蜀山森林公园西门保安室</text> |
| | | </view> |
| | | <view class="address-row"> |
| | | <image src="/static/icon/ic_jingguo@2x.png" mode="widthFix"></image> |
| | | <text>长江西路大蜀山森林公园东门保安室</text> |
| | | </view> |
| | | <view class="address-row"> |
| | | <image src="/static/icon/ic_zhongdian@2x.png" mode="widthFix"></image> |
| | | <text>安徽莲花科技产业园豆米科技有限公司</text> |
| | | </view> |
| | | </view> |
| | | <view class="index-list-item-price"> |
| | | <text>预估:</text> |
| | | <text>¥1000.00</text> |
| | | </view> |
| | | <view class="eidt"> |
| | | <view></view> |
| | | <view class="eidt-right"> |
| | | <view class="eidt-close">取消订单</view> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | <!-- <view class="index-list-item"> |
| | | <view class="index-list-item-head"> |
| | | <view class="index-list-item-head-l"> |
| | | <view class="xoam"></view> |
| | | <text>用工单-采摘工</text> |
| | | <view class="tips1">自主抢单</view> |
| | | </view> |
| | | <view class="index-list-item-head-r">待接单</view> |
| | | </view> |
| | | <view class="index-list-item-info"> |
| | | 葡萄|2000斤 |
| | | </view> |
| | | <view class="index-list-item-dz"> |
| | | <image src="/static/icon/order_ic_location@2x.png" mode="widthFix"></image> |
| | | <text>长江西路大蜀山森林公园西门保安室</text> |
| | | </view> |
| | | <view class="index-list-item-dz"> |
| | | <image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image> |
| | | <text>07-26 至 07-27(2天)</text> |
| | | </view> |
| | | <view class="index-list-item-price"> |
| | | <text>预估:</text> |
| | | <text>¥1000.00</text> |
| | | </view> |
| | | <view class="eidt"> |
| | | <view></view> |
| | | <view class="eidt-right"> |
| | | <view class="eidt-close">取消订单</view> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | onShow(options) { |
| | | this.typeViewId = 0 |
| | | if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}'){ |
| | | console.log('已登陆') |
| | | this.isLogin = true |
| | | if (!this.isOnce) { |
| | | this.commentStatus = '' |
| | | this.orderList = [] |
| | | this.next = true |
| | | this.page = 1 |
| | | this.getOrderList() |
| | | } |
| | | } else { |
| | | this.isLogin = false |
| | | console.log('未登陆') |
| | | } |
| | | if (this.userInfo && this.userInfo.useIdentity == 1) { |
| | | this.typeViewId = 1 |
| | | } else { |
| | | this.typeViewId = 0 |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | |
| | | next: true, |
| | | page: 1, |
| | | orderList: [] |
| | | orderList: [], |
| | | isOnce: true |
| | | }; |
| | | }, |
| | | async onLoad() { |
| | |
| | | this.getOrderList() |
| | | }, |
| | | methods: { |
| | | toLogin() { |
| | | uni.navigateTo({ |
| | | url: '/pages/login/login' |
| | | }) |
| | | }, |
| | | startJobs(orderId) { |
| | | this.$u.api.begin({ orderId }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.status = '' |
| | | this.commentStatus = '' |
| | | this.orderList = [] |
| | | this.next = true |
| | | this.page = 1 |
| | | this.getOrderList() |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | jumpDesc(item) { |
| | | uni.navigateTo({ |
| | | url: `/pages/order-details/order-details?id=${item.id}` |
| | | }) |
| | | }, |
| | | // 修改 |
| | | jumpEdit(item) { |
| | | if (item.type === 0 && item.workType === 0) { |
| | |
| | | uni.navigateTo({ |
| | | url: `/pages/packaging-worker/packaging-worker?id=${item.id}` |
| | | }) |
| | | } else if (item.type === 1) { |
| | | uni.navigateTo({ |
| | | url: `/pages/freight/freight?id=${item.id}` |
| | | }) |
| | | } |
| | | }, |
| | | cancelOrder() { |
| | | this.$u.api.receiveCancelOrder({ |
| | | this.$u.api.cancelOrder({ |
| | | orderId: this.orderId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.show = false |
| | | this.orderList = [] |
| | | this.next = true |
| | | this.page = 1 |
| | | this.getOrderList() |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | phoneCall(phoneNumber) { |
| | |
| | | queryLgt: this.longitude |
| | | } |
| | | }).then(res => { |
| | | if (res.code !== 200) return; |
| | | this.isOnce = false |
| | | res.data.records.forEach(item => { |
| | | // 订餐单 |
| | | if (item.type === 2) { |
| | |
| | | |
| | | if (this.orderList.length === res.data.total) { |
| | | this.next = false |
| | | } else { |
| | | this.page += 1 |
| | | } |
| | | }) |
| | | }, |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | flex-wrap: wrap; |
| | | .eidt-close { |
| | | width: 160rpx; |
| | | height: 64rpx; |
| | |
| | | that.form.img21Full = that.info.imgList.length>1?that.info.imgList[1]:null |
| | | } |
| | | } |
| | | |
| | | } |
| | | }) |
| | | }, |
| | |
| | | <view class="list-item-label-x"></view> |
| | | <text>车辆及路线</text> |
| | | </view> |
| | | |
| | | <template v-if="!(info.type !== 2 && info.status === 2)"> |
| | | <view class="list-item-row" @click="show = true"> |
| | | <view class="list-item-row-label">车辆类型<b>*</b></view> |
| | | <view class="list-item-row-val"> |
| | |
| | | <u-icon name="arrow-right" color="#111111" size="16"></u-icon> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <view class="list-item-row" @click="show2 = true"> |
| | | <view class="list-item-row-label">用车时间<b>*</b></view> |
| | | <view class="list-item-row-val"> |
| | |
| | | <u-icon name="arrow-right" color="#111111" size="16"></u-icon> |
| | | </view> |
| | | </view> |
| | | |
| | | <template v-if="!(info.type !== 2 && info.status === 2)"> |
| | | <view class="list-item-row"> |
| | | <view class="list-item-row-label"> |
| | | 运货地址<b>*</b> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | </view> |
| | | <template v-if="!(info.type !== 2 && info.status === 2)"> |
| | | <view class="list-item"> |
| | | <view class="list-item-label"> |
| | | <view class="list-item-label-x"></view> |
| | |
| | | <view class="list-item-row-label">图片</view> |
| | | <view class="list-item-row-upload"> |
| | | <view class="upload-item" v-for="(item, index) in form.multifileList" :key="index"> |
| | | <image :src="item.url" mode="widthFix"></image> |
| | | <image :src="item.url || item.fileurlFull" mode="widthFix"></image> |
| | | <image class="upload-item-dele" @click="form.multifileList.splice(index, 1)" src="/static/icon/ic_delete1@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="upload-item" @click="uploadImg"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </view> |
| | | <view style="width: 100%; height: calc(214rpx + env(safe-area-inset-bottom));"></view> |
| | | <view class="footer"> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | info: {}, |
| | | show: false, |
| | | show1: false, |
| | | show2: false, |
| | | show3: false, |
| | | show4: false, |
| | | form: { |
| | | id: null, |
| | | startDate: '', |
| | | endDate: '', |
| | | lat: '', |
| | |
| | | } |
| | | } |
| | | }, |
| | | onLoad() { |
| | | onLoad(option) { |
| | | if (option.id) { |
| | | this.form.id = option.id |
| | | this.$u.api.getDetail({ |
| | | orderId: option.id |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.info = res.data |
| | | for (const key in this.form) { |
| | | this.form[key] = res.data[key] |
| | | } |
| | | this.form.price = Number(this.form.price) / 100 |
| | | if (!this.form.multifileList) { |
| | | this.form.multifileList = [] |
| | | } |
| | | if (!this.form.wayInfoDTOList) { |
| | | this.form.wayInfoDTOList = [] |
| | | } |
| | | } |
| | | }) |
| | | } else { |
| | | const res = uni.getStorageSync('carData'); |
| | | this.form.linkPhone = this.userInfo.telephone |
| | | this.form.startDate = res.startDate |
| | |
| | | this.form.locationEnd = res.locationEnd |
| | | this.form.wayInfoDTOList = res.wayInfoDTOList |
| | | uni.removeStorageSync('carData'); |
| | | } |
| | | this.getCategoryLists() |
| | | }, |
| | | methods: { |
| | |
| | | if (!this.form.linkPhone) { |
| | | return uni.showToast({ title: '请输入联系电话', icon: 'none' }) |
| | | } |
| | | if (!this.form.id) { |
| | | this.$u.api.release({ |
| | | ...this.form, |
| | | price: Number(this.form.price) * 100, |
| | |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | this.$u.api.updateOrder({ |
| | | ...this.form, |
| | | price: Number(this.form.price) * 100, |
| | | wayInfoDTOList: [ |
| | | { |
| | | lat: this.form.lat, |
| | | lgt: this.form.lgt, |
| | | location: this.form.location |
| | | }, |
| | | ...this.form.wayInfoDTOList, |
| | | { |
| | | lat: this.form.latEnd, |
| | | lgt: this.form.lgtEnd, |
| | | location: this.form.locationEnd |
| | | } |
| | | ] |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | uni.showToast({ |
| | | title: '编辑成功', |
| | | icon: 'success', |
| | | mask: true, |
| | | duration: 2000 |
| | | }) |
| | | setTimeout(() => { |
| | | uni.navigateBack({ delta: 1 }); |
| | | // uni.$emit('refresh') |
| | | }, 1500) |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | uploadImg() { |
| | | var that = this; |
| | | uni.chooseImage({ |
| | | success: (chooseImageRes) => { |
| | | const tempFilePaths = chooseImageRes.tempFilePaths; |
| | |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | const res = JSON.parse(uploadFileRes.data) |
| | | this.form.multifileList.push({ |
| | | that.form.multifileList.push({ |
| | | fileurl: res.data.imgaddr, |
| | | name: res.data.originname, |
| | | url: res.data.url, |
| | |
| | | priceNum2: this.form.priceNum2, |
| | | type: 1 |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.form.estimatedAccount = res.data |
| | | } |
| | | |
| | | }) |
| | | } |
| | | }, |
| | | getCategoryLists() { |
| | | this.$u.api.getCategoryList({ type: 1 }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.car = [res.data] |
| | | res.data.forEach(item => { |
| | | if (item.id === this.form.categoryId) { |
| | | this.carArr = [item.detailList] |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | this.$u.api.getCategoryList({ type: 0 }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.variety = [res.data] |
| | | } |
| | | }) |
| | | }, |
| | | confirmCategary(e) { |
| | |
| | | </view> |
| | | <view class="index-list-item-dz"> |
| | | <image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image> |
| | | <text>{{item.startDate}} 至 {{item.endDate}}({{item.priceNum1}}天)</text> |
| | | <text>{{item.startDate}} 至 {{item.endDate}}({{item.totalDays}}天)</text> |
| | | </view> |
| | | </template> |
| | | <view class="index-list-item-price"> |
| | |
| | | </view> |
| | | <view class="box-hz-list-item" @click="selectAddress(1)"> |
| | | <view class="box-hz-list-item-label"><text>用工地点:</text></view> |
| | | <view :class="form.location ? 'box-hz-list-item-val active' :'box-hz-list-item-val'"> |
| | | <view :class="form.address ? 'box-hz-list-item-val active' :'box-hz-list-item-val'"> |
| | | <view class="box-hz-list-item-val-left"> |
| | | <image class="icon" src="/static/icon/ic_location@2x.png" mode="widthFix"></image> |
| | | <text>{{form.location ? form.location : '请选择用工地点'}}</text> |
| | | <text>{{form.address ? form.address : '请选择用工地点'}}</text> |
| | | </view> |
| | | <u-icon name="arrow-right" color="#111111" size="16"></u-icon> |
| | | </view> |
| | |
| | | return this.form.estimatedAccount / 100 |
| | | } |
| | | }, |
| | | onShow(options) { |
| | | this.typeViewId = 0 |
| | | if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}'){ |
| | | this.isLogin = true |
| | | } |
| | | if (this.userInfo && this.userInfo.useIdentity == 1) { |
| | | this.typeViewId = 1 |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | show: false, |
| | |
| | | orderList: [], |
| | | typeVal: '', |
| | | page: 1, |
| | | next: true |
| | | next: true, |
| | | |
| | | isOnce: true |
| | | } |
| | | }, |
| | | async onLoad() { |
| | | await this.$onLaunched; |
| | | this.getCategoryLists() |
| | | if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') { |
| | | this.getOrderList() |
| | | this.getCategoryLists() |
| | | } |
| | | this.form.linkPhone = this.userInfo.telephone |
| | | }, |
| | | onShow(options) { |
| | | this.typeViewId = 0 |
| | | if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') { |
| | | console.log('已登陆') |
| | | this.isLogin = true |
| | | |
| | | if (!this.isOnce && this.userInfo.useIdentity == 1) { |
| | | this.page = 1 |
| | | this.next = true |
| | | this.orderList = [] |
| | | this.getOrderList() |
| | | } |
| | | |
| | | } else { |
| | | this.isLogin = false |
| | | console.log('未登陆') |
| | | } |
| | | |
| | | if (this.userInfo && this.userInfo.useIdentity == 1) { |
| | | this.typeViewId = 1 |
| | | } |
| | | }, |
| | | watch: { |
| | | typeId: { |
| | |
| | | this.form.longitude = '' |
| | | this.form.location = '' |
| | | this.form.locationEnd = '' |
| | | this.form.wayInfoDTOList = '' |
| | | this.form.wayInfoDTOList = [] |
| | | this.form.workType = '' |
| | | this.form.days = '' |
| | | this.form.locationRemark = '' |
| | |
| | | getaccept(e, orderId, index) { |
| | | this.$u.api.accept({ orderId }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | uni.showToast({ title: '抢单成功!', icon: 'success', duration: 2000 }) |
| | | setTimeout(() => { |
| | | this.page = 1 |
| | |
| | | this.orderList = [] |
| | | this.getOrderList() |
| | | }, 2000) |
| | | } |
| | | }) |
| | | }, |
| | | clickSort(id) { |
| | |
| | | queryLgt: this.longitude |
| | | } |
| | | }).then(res => { |
| | | if (res.code !== 200) return; |
| | | this.isOnce = false |
| | | res.data.records.forEach(item => { |
| | | // 订餐单 |
| | | if (item.type === 2) { |
| | |
| | | |
| | | if (this.orderList.length === res.data.total) { |
| | | this.next = false |
| | | } else { |
| | | this.page += 1 |
| | | } |
| | | }) |
| | | }, |
| | |
| | | priceNum1: that.form.days, |
| | | type: 2 |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | that.form.estimatedAccount = res.data |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | |
| | | // 采摘工 |
| | | if (this.form.workType === 0) { |
| | | uni.navigateTo({ |
| | | url: `/pages/using-workers/using-workers?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.location}&workType=${form.workType}` |
| | | url: `/pages/using-workers/using-workers?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.address}&workType=${form.workType}` |
| | | }) |
| | | // 分拣工 |
| | | } else if (this.form.workType === 1) { |
| | | uni.navigateTo({ |
| | | url: `/pages/sorting/sorting?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.location}&workType=${form.workType}` |
| | | url: `/pages/sorting/sorting?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.address}&workType=${form.workType}` |
| | | }) |
| | | // 包装工 |
| | | } else if (this.form.workType === 2) { |
| | | uni.navigateTo({ |
| | | url: `/pages/packaging-worker/packaging-worker?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.location}&workType=${form.workType}` |
| | | url: `/pages/packaging-worker/packaging-worker?days=${form.days}&startDate=${form.startDate}&endDate=${form.endDate}&latitude=${form.latitude}&longitude=${form.longitude}&address=${form.address}&workType=${form.workType}` |
| | | }) |
| | | } |
| | | // 运货 |
| | |
| | | getCategoryLists() { |
| | | this.$u.api.getCategoryList({ type: 1 }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.car = res.data |
| | | this.form.categoryId = res.data[0].id |
| | | this.form.categoryName = res.data[0].name |
| | | this.carRemark = res.data[0].remark |
| | | this.carImage = res.data[0].iconFull |
| | | } |
| | | }) |
| | | this.$u.api.getCategoryList({ type: 2 }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | res.data.forEach(item => { |
| | | item.num = '' |
| | | item.list = item.detailList.map(child => { |
| | |
| | | }) |
| | | }) |
| | | this.orderFood = res.data |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view style="width: 100%; height: calc(108rpx + env(safe-area-inset-bottom));"></view> |
| | | <view class="order-footer"> |
| | | <view style="width: 100%; height: calc(108rpx + env(safe-area-inset-bottom));" v-if="![99].includes(info.status)"></view> |
| | | <view class="order-footer" v-if="![99].includes(info.status)"> |
| | | <view class="order-footer-btn"> |
| | | <view class="order-footer-btn-a" @click="show = true" v-if="userInfo.id === info.acceptMemberId && info.status ===2">取消订单</view> |
| | | <view class="order-footer-btn-a" @click="show = true" v-if="userInfo.id === info.releaseMemberId && (info.status ===0 || info.status ===1|| info.status ===2)">取消订单</view> |
| | | <view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId && (info.status ===4 && info.commentStatus!=1)">去评价</view> |
| | | <view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId &&((info.status ===3 && info.type !==2)|| (info.status ===0 && info.type===2))">去支付</view> |
| | | <view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId && (info.status ===0 || info.status ===1|| info.status ===2)">修改订单</view> |
| | | <view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId && (info.isUpdate==1 && info.status ===2)">修改确认</view> |
| | | <view class="order-footer-btn-b" v-if="userInfo.id !== info.releaseMemberId && (info.status ===1)">抢单</view> |
| | | <view class="order-footer-btn-b" @click="show2=true" v-if="userInfo.id === info.releaseMemberId && (info.status ===4 && info.commentStatus!=1)">去评价</view> |
| | | <view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId &&((info.status ===3 && info.type !==2)|| (info.status ===0 && info.type===2))" @click="show1 = true">去支付</view> |
| | | <view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId && (info.status ===0 || info.status ===1|| info.status ===2)" @click="jumpEdit()">修改订单</view> |
| | | <view class="order-footer-btn-b" @click="show5 =true" v-if="userInfo.id === info.acceptMemberId && (info.isUpdate==1 && info.status ===2)">修改确认</view> |
| | | <view class="order-footer-btn-b" @click="show3 =true" v-if="userInfo.id === info.releaseMemberId && (info.status ===2)">开始作业</view> |
| | | <view class="order-footer-btn-b" @click="show6 =true" v-if="userInfo.id !== info.releaseMemberId && (info.status ===1)">抢单</view> |
| | | </view> |
| | | <view style="width: 100%; height: env(safe-area-inset-bottom);"></view> |
| | | </view> |
| | |
| | | </view> |
| | | <view slot="confirmButton" style="display: flex; justify-content: space-between; align-items: center; width: 100%;"> |
| | | <view class="btn1" @click="show = false">我再想想</view> |
| | | <view class="btn2" @click="show = false">确认取消</view> |
| | | <view class="btn2" @click="cancelDo">确认取消</view> |
| | | </view> |
| | | </u-modal> |
| | | |
| | | <u-modal |
| | | title="温馨提示" |
| | | :show="show4" |
| | | closeOnClickOverlay |
| | | showCancelButton |
| | | > |
| | | <view class="slot-content"> |
| | | 确认取消订单吗? |
| | | </view> |
| | | <view slot="confirmButton" style="display: flex; justify-content: space-between; align-items: center; width: 100%;"> |
| | | <view class="btn1" @click="show = false">我再想想</view> |
| | | <view class="btn2" @click="cancelDo">确认取消</view> |
| | | </view> |
| | | </u-modal> |
| | | <u-modal |
| | | title="温馨提示" |
| | | :show="show6" |
| | | closeOnClickOverlay |
| | | showCancelButton |
| | | > |
| | | <view class="slot-content"> |
| | | 确认抢单吗? |
| | | </view> |
| | | <view slot="confirmButton" style="display: flex; justify-content: space-between; align-items: center; width: 100%;"> |
| | | <view class="btn1" @click="show6 = false">我再想想</view> |
| | | <view class="btn2" @click="acceptDo">确认接单</view> |
| | | </view> |
| | | </u-modal> |
| | | <u-modal |
| | | title="温馨提示" |
| | | :show="show5" |
| | | closeOnClickOverlay |
| | | showCancelButton |
| | | > |
| | | <view class="slot-content"> |
| | | 是否同意订单修改内容? |
| | | </view> |
| | | <view slot="confirmButton" style="display: flex; justify-content: space-between; align-items: center; width: 100%;"> |
| | | <view class="btn1" @click="show5=false">我再想想</view> |
| | | <view style="width: 20rpx; height: 100%;"></view> |
| | | <view class="btn2" style="background-color: #f56c6c; color: #ffffff;" @click="confirmUpdDo(1)">不同意</view> |
| | | <view style="width: 20rpx; height: 100%;"></view> |
| | | <view class="btn2" @click="confirmUpdDo(0)">同意</view> |
| | | </view> |
| | | </u-modal> |
| | | <!-- 支付弹窗 --> |
| | | <u-popup :show="show1" round="15" mode="bottom"> |
| | | <view class="zhifu"> |
| | |
| | | <image @click="show1 = false" src="/static/icon/ic_close@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="zhifu-c"> |
| | | <view class="zhifu-c-info"> |
| | | 请确认金额并支付费用给 <text>莲花劳务公司</text> |
| | | <view class="zhifu-c-info" v-if="info.type !== 2"> |
| | | 请确认金额并支付费用给 <text>{{info.acceptName}}</text> |
| | | </view> |
| | | <view class="zhifu-c-info1">支付金额:</view> |
| | | <view class="zhifu-c-input"> |
| | | <image src="/static/icon/¥@2x.png" mode="widthFix"></image> |
| | | <input type="number" placeholder="请输入" /> |
| | | <input type="number" v-model="amount" :disabled="info.type === 2" placeholder="请输入" /> |
| | | </view> |
| | | </view> |
| | | <view class="zhifu-botton">确认支付</view> |
| | | <view class="zhifu-botton" @click="payment">确认支付</view> |
| | | </view> |
| | | </u-popup> |
| | | |
| | |
| | | <view class="zhifu-pj"> |
| | | <view class="zhifu-pj-label">服务评价</view> |
| | | <view class="zhifu-pj-val"> |
| | | <u-rate :count="count" activeColor="#FFC331" size="26" v-model="value"></u-rate> |
| | | <u-rate :count="count" activeColor="#FFC331" size="26" v-model="value" @click=""></u-rate> |
| | | </view> |
| | | </view> |
| | | <view class="zhifu-textarea"> |
| | | <image src="/static/icon/ic_pingjia@2x.png" mode="widthFix"></image> |
| | | <u--textarea placeholder="请说说您对本次交易的感受" border="none" count></u--textarea> |
| | | <u--textarea placeholder="请说说您对本次交易的感受" border="none" v-model="commentInfo" count></u--textarea> |
| | | </view> |
| | | <view class="zhifu-botton" style="margin-top: 60rpx;">立即评价</view> |
| | | <view class="zhifu-botton" style="margin-top: 60rpx;" @click="commentDo">立即评价</view> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | |
| | | show1: false, |
| | | show2: false, |
| | | count: 5, |
| | | show3:false, |
| | | show4:false, |
| | | show5:false, |
| | | show6:false, |
| | | value:0, |
| | | wayList:[], |
| | | bgImg: require('@/static/image/bg_green@2x.png'), |
| | | id: null, |
| | | loading:false, |
| | | commentInfo:'', |
| | | info: {}, |
| | | amount: '' |
| | | }; |
| | | }, |
| | | onLoad(options) { |
| | |
| | | this.getOrderData() |
| | | }, |
| | | methods:{ |
| | | // 修改 |
| | | jumpEdit() { |
| | | if (this.info.type === 0 && this.info.workType === 0) { |
| | | uni.navigateTo({ |
| | | url: `/pages/using-workers/using-workers?id=${this.info.id}` |
| | | }) |
| | | } else if (this.info.type === 0 && this.info.workType === 1) { |
| | | uni.navigateTo({ |
| | | url: `/pages/sorting/sorting?id=${this.info.id}` |
| | | }) |
| | | } else if (this.info.type === 0 && this.info.workType === 2) { |
| | | uni.navigateTo({ |
| | | url: `/pages/packaging-worker/packaging-worker?id=${this.info.id}` |
| | | }) |
| | | } else if (this.info.type === 1) { |
| | | uni.navigateTo({ |
| | | url: `/pages/freight/freight?id=${this.info.id}` |
| | | }) |
| | | } |
| | | }, |
| | | payment() { |
| | | var that = this |
| | | // 订餐 |
| | | if (this.info.type === 2) { |
| | | this.$u.api.reusePay({ |
| | | orderId: this.info.id |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | wx.requestPayment({ |
| | | timeStamp: res.data.object.timeStamp, |
| | | nonceStr: res.data.object.nonceStr, |
| | | package: res.data.object.packageVal, |
| | | signType: res.data.object.signType, |
| | | paySign: res.data.object.paySign, |
| | | success (res1) { |
| | | if (res1.errMsg = 'requestPayment:ok') { |
| | | that.show1 = false |
| | | uni.showToast({ title: '支付成功', icon: 'success', duration: 2000 }); |
| | | that.getOrderData() |
| | | } |
| | | }, |
| | | fail(err) { |
| | | console.log(err) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | this.$u.api.doneOrder({ |
| | | orderId: this.info.id, |
| | | amount: Number(this.amount) * 100 |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | wx.requestPayment({ |
| | | timeStamp: res.data.object.timeStamp, |
| | | nonceStr: res.data.object.nonceStr, |
| | | package: res.data.object.packageVal, |
| | | signType: res.data.object.signType, |
| | | paySign: res.data.object.paySign, |
| | | success (res1) { |
| | | if (res1.errMsg = 'requestPayment:ok') { |
| | | that.show1 = false |
| | | uni.showToast({ title: '支付成功', icon: 'success', duration: 2000 }); |
| | | that.getOrderData() |
| | | } |
| | | }, |
| | | fail(err) { |
| | | console.log(err) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | commentDo(){ |
| | | var that = this |
| | | var param = { info: that.commentInfo,level:that.value||0,orderId: this.id} |
| | | this.$u.api.comment(param).then(res =>{ |
| | | if(res.code ===200){ |
| | | that.show2=false |
| | | uni.showToast({ title: '评价成功', icon: 'error', duration: 2000 }); |
| | | that.getOrderData() |
| | | } |
| | | }) |
| | | }, |
| | | beginDo(){ |
| | | var that = this |
| | | var param = {orderId: this.id} |
| | | this.$u.api.begin(param).then(res =>{ |
| | | if(res.code ===200){ |
| | | that.show3=false |
| | | uni.showToast({ title: '操作成功', icon: 'error', duration: 2000 }); |
| | | that.getOrderData() |
| | | } |
| | | }) |
| | | }, |
| | | confirmUpdDo(status){ |
| | | var that = this |
| | | var param = {orderId: this.id,status:status} |
| | | this.$u.api.confirmUpd(param).then(res =>{ |
| | | if(res.code ===200){ |
| | | that.show5=false |
| | | uni.showToast({ title: '确认成功', icon: 'error', duration: 2000 }); |
| | | if(status==1){ |
| | | uni.navigateBack({ delta: 1 }) |
| | | }else{ |
| | | that.getOrderData() |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | acceptDo(){ |
| | | var that = this |
| | | var param = {orderId: this.id} |
| | | this.$u.api.accept(param).then(res =>{ |
| | | if(res.code ===200){ |
| | | that.show6=false |
| | | uni.showToast({ title: '抢单成功', icon: 'error', duration: 2000 }); |
| | | that.getOrderData() |
| | | } |
| | | }) |
| | | }, |
| | | cancelDo(){ |
| | | var that = this |
| | | var param ={ orderId:that.id} |
| | | this.$u.api.cancelOrder(param).then(res =>{ |
| | | if(res.code ===200){ |
| | | that.show=false |
| | | uni.showToast({ title: '订单取消成功', icon: 'error', duration: 2000 }); |
| | | that.getOrderData() |
| | | if(that.userInfo.id !== that.info.releaseMemberId){ |
| | | uni.navigateBack({ delta: 1 }) |
| | | }else{ |
| | | that.getOrderData() |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | previemImg(src){ |
| | | uni.previewImage({ |
| | | current: src, // 当前显示图片的http链接 |
| | |
| | | if(res.code ===200){ |
| | | if(that.userInfo.id === res.data.releaseMemberId || that.userInfo.id === res.data.acceptMemberId ){ |
| | | that.info = res.data |
| | | that.amount = ((that.info.estimatedAccount || 0) / 100).toFixed(2) |
| | | if(that.info.wayInfo){ |
| | | that.wayList = JSON.parse(that.info.wayInfo) |
| | | } |
| | |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .order-footer-btn-a { |
| | | width: 334rpx; |
| | | flex: 1; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | |
| | | border: 1rpx solid #B2B2B2; |
| | | } |
| | | .order-footer-btn-b { |
| | | width: 334rpx; |
| | | flex: 1; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | |
| | | <u-icon name="arrow-right" color="#111111" size="16"></u-icon> |
| | | </view> |
| | | </view> |
| | | |
| | | <template v-if="!(info.type !== 2 && info.status === 2)"> |
| | | <view class="list-item-row" @click="selectAddress()"> |
| | | <view class="list-item-row-label">用工地点<b>*</b></view> |
| | | <view class="list-item-row-val"> |
| | |
| | | <input type="text" v-model="form.locationRemark" placeholder="请输入" /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | </view> |
| | | <template v-if="!(info.type !== 2 && info.status === 2)"> |
| | | <view class="list-item"> |
| | | <view class="list-item-label"> |
| | | <view class="list-item-label-x"></view> |
| | |
| | | <view class="list-item-row-label">图片</view> |
| | | <view class="list-item-row-upload"> |
| | | <view class="upload-item" v-for="(item, index) in form.multifileList" :key="index"> |
| | | <image :src="item.url" mode="widthFix"></image> |
| | | <image :src="item.url || item.fileurlFull" mode="widthFix"></image> |
| | | <image class="upload-item-dele" @click="form.multifileList.splice(index, 1)" src="/static/icon/ic_delete1@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="upload-item" @click="uploadImg"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | </view> |
| | | <view style="width: 100%; height: calc(214rpx + env(safe-area-inset-bottom));"></view> |
| | | <view class="footer"> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | info: {}, |
| | | show: false, |
| | | show1: false, |
| | | form: { |
| | | id: null, |
| | | days: '', |
| | | startDate: '', |
| | | endDate: '', |
| | |
| | | }; |
| | | }, |
| | | onLoad(option) { |
| | | if (option.id) { |
| | | this.form.id = option.id |
| | | this.$u.api.getDetail({ |
| | | orderId: option.id |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.info = res.data |
| | | for (const key in this.form) { |
| | | this.form[key] = res.data[key] |
| | | } |
| | | this.form.days = res.data.totalDays |
| | | this.form.price = Number(this.form.price) / 100 |
| | | if (!this.form.multifileList) { |
| | | this.form.multifileList = [] |
| | | } |
| | | // this.clickType() |
| | | } |
| | | |
| | | }) |
| | | } else { |
| | | this.form.linkPhone = this.userInfo.telephone |
| | | this.form.priceNum1 = option.days |
| | | this.form.startDate = option.startDate |
| | |
| | | this.form.lgt = option.longitude |
| | | this.form.location = option.address |
| | | this.form.workType = option.workType |
| | | } |
| | | this.getCateList() |
| | | }, |
| | | methods: { |
| | |
| | | if (!this.form.linkPhone) { |
| | | return uni.showToast({ title: '请输入联系电话', icon: 'none' }) |
| | | } |
| | | if (!this.form.id) { |
| | | this.$u.api.release({ ...this.form, price: Number(this.form.price) * 100 }) |
| | | .then(res => { |
| | | if (res.code == 200) { |
| | |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | this.$u.api.updateOrder({ ...this.form, price: Number(this.form.price) * 100 }) |
| | | .then(res => { |
| | | if (res.code == 200) { |
| | | if (res.code == 200) { |
| | | uni.showToast({ title: '编辑成功', icon: 'success', mask: true, duration: 2000 }) |
| | | setTimeout(() => { |
| | | uni.navigateBack({ delta: 1 }); |
| | | // uni.$emit('refresh') |
| | | }, 1500) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // 计算金额 |
| | | getPrice() { |
| | |
| | | type: this.form.type, |
| | | workType: this.form.workType |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.form.estimatedAccount = res.data |
| | | } |
| | | |
| | | }) |
| | | } |
| | | }, |
| | | confirmDate(e) { |
| | | this.form.startDate = e[0] |
| | | this.form.endDate = e[e.length - 1] |
| | | this.form.days = e.length; |
| | | this.form.priceNum1 = e.length; |
| | | this.show = false |
| | | this.getPrice() |
| | | }, |
| | | selectAddress() { |
| | | uni.chooseLocation({ |
| | |
| | | this.$u.api.getCategoryList({ |
| | | type: 0 |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.cateList = [res.data] |
| | | } |
| | | }) |
| | | }, |
| | | uploadImg() { |
| | |
| | | <u-icon name="arrow-right" color="#111111" size="16"></u-icon> |
| | | </view> |
| | | </view> |
| | | <template v-if="!(info.type !== 2 && info.status === 2)"> |
| | | <view class="list-item-row" @click="selectAddress()"> |
| | | <view class="list-item-row-label">用工地点<b>*</b></view> |
| | | <view class="list-item-row-val"> |
| | |
| | | <input type="text" v-model="form.locationRemark" placeholder="请输入" /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | </view> |
| | | <template v-if="!(info.type !== 2 && info.status === 2)"> |
| | | <view class="list-item"> |
| | | <view class="list-item-label"> |
| | | <view class="list-item-label-x"></view> |
| | |
| | | <view class="list-item-row-label">图片</view> |
| | | <view class="list-item-row-upload"> |
| | | <view class="upload-item" v-for="(item, index) in form.multifileList" :key="index"> |
| | | <image :src="item.url" mode="widthFix"></image> |
| | | <image :src="item.url || item.fileurlFull" mode="widthFix"></image> |
| | | <image class="upload-item-dele" @click="form.multifileList.splice(index, 1)" src="/static/icon/ic_delete1@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="upload-item" @click="uploadImg"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | </view> |
| | | <view style="width: 100%; height: calc(214rpx + env(safe-area-inset-bottom));"></view> |
| | | <view class="footer"> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | info: {}, |
| | | show: false, |
| | | show1: false, |
| | | form: { |
| | | id: null, |
| | | days: '', |
| | | startDate: '', |
| | | endDate: '', |
| | |
| | | }; |
| | | }, |
| | | onLoad(option) { |
| | | if (option.id) { |
| | | this.form.id = option.id |
| | | this.$u.api.getDetail({ |
| | | orderId: option.id |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.info = res.data |
| | | for (const key in this.form) { |
| | | this.form[key] = res.data[key] |
| | | } |
| | | this.form.days = res.data.totalDays |
| | | this.form.price = Number(this.form.price) / 100 |
| | | if (!this.form.multifileList) { |
| | | this.form.multifileList = [] |
| | | } |
| | | } |
| | | |
| | | }) |
| | | } else { |
| | | this.form.linkPhone = this.userInfo.telephone |
| | | this.form.priceNum1 = option.days |
| | | this.form.startDate = option.startDate |
| | |
| | | this.form.lgt = option.longitude |
| | | this.form.location = option.address |
| | | this.form.workType = option.workType |
| | | } |
| | | this.getCateList() |
| | | }, |
| | | methods: { |
| | |
| | | if (!this.form.linkPhone) { |
| | | return uni.showToast({ title: '请输入联系电话', icon: 'none' }) |
| | | } |
| | | if (!this.form.id) { |
| | | this.$u.api.release({ ...this.form, price: Number(this.form.price) * 100 }) |
| | | .then(res => { |
| | | if (res.code == 200) { |
| | |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | this.$u.api.updateOrder({ ...this.form, price: Number(this.form.price) * 100 }) |
| | | .then(res => { |
| | | if (res.code == 200) { |
| | | uni.showToast({ title: '编辑成功', icon: 'success', mask: true, duration: 2000 }) |
| | | setTimeout(() => { |
| | | uni.navigateBack({ delta: 1 }); |
| | | // uni.$emit('refresh') |
| | | }, 1500) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // 计算金额 |
| | | getPrice() { |
| | |
| | | type: this.form.type, |
| | | workType: this.form.workType |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.form.estimatedAccount = res.data |
| | | } |
| | | |
| | | }) |
| | | } |
| | | }, |
| | | confirmDate(e) { |
| | | this.form.startDate = e[0] |
| | | this.form.endDate = e[e.length - 1] |
| | | this.form.days = e.length; |
| | | this.form.priceNum1 = e.length; |
| | | this.show = false |
| | | this.getPrice() |
| | | }, |
| | | selectAddress() { |
| | | uni.chooseLocation({ |
| | |
| | | this.$u.api.getCategoryList({ |
| | | type: 0 |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.cateList = [res.data] |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | uploadImg() { |
| | |
| | | <text class="success-a">发单成功</text> |
| | | <text class="success-b">请等待接单</text> |
| | | <view class="success-footer"> |
| | | <view class="success-footer-btn">回到首页</view> |
| | | <view class="success-footer-btn" @click="toIndex">回到首页</view> |
| | | <view style="width: 20rpx; height: 100%;"></view> |
| | | <view class="success-footer-btn1">查看详情</view> |
| | | <view class="success-footer-btn1" @click="toDesc">查看详情</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | orderId: null |
| | | }; |
| | | }, |
| | | onLoad(option) { |
| | | this.orderId = option.orderId |
| | | }, |
| | | methods: { |
| | | toIndex() { |
| | | uni.switchTab({ |
| | | url: '/pages/index/index' |
| | | }); |
| | | }, |
| | | toDesc() { |
| | | uni.navigateTo({ |
| | | url: `/pages/order-details/order-details?id=${this.orderId}` |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <u-icon name="arrow-right" color="#111111" size="16"></u-icon> |
| | | </view> |
| | | </view> |
| | | <template v-if="!(info.type !== 2 && info.status === 2)"> |
| | | <view class="list-item-row" @click="selectAddress()"> |
| | | <view class="list-item-row-label">用工地点<b>*</b></view> |
| | | <view class="list-item-row-val"> |
| | |
| | | <input type="text" v-model="form.locationRemark" placeholder="请输入" /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | </view> |
| | | <template v-if="!(info.type !== 2 && info.status === 2)"> |
| | | <view class="list-item"> |
| | | <view class="list-item-label"> |
| | | <view class="list-item-label-x"></view> |
| | |
| | | <view class="list-item-row-label">图片</view> |
| | | <view class="list-item-row-upload"> |
| | | <view class="upload-item" v-for="(item, index) in form.multifileList" :key="index"> |
| | | <image :src="item.url" mode="widthFix"></image> |
| | | <image :src="item.url || item.fileurlFull" mode="widthFix"></image> |
| | | <image class="upload-item-dele" @click="form.multifileList.splice(index, 1)" src="/static/icon/ic_delete1@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="upload-item" @click="uploadImg"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | </view> |
| | | <view style="width: 100%; height: calc(214rpx + env(safe-area-inset-bottom));"></view> |
| | | <view class="footer"> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | info: {}, |
| | | show: false, |
| | | show1: false, |
| | | form: { |
| | | id: null, |
| | | days: '', |
| | | startDate: '', |
| | | endDate: '', |
| | |
| | | estimatedAccount: '', |
| | | type: 0 |
| | | }, |
| | | modify: false, |
| | | cateList: [], |
| | | viewStatus: false |
| | | }; |
| | | }, |
| | | onLoad(option) { |
| | | // 编辑 |
| | | if (option.id) { |
| | | this.form.id = option.id |
| | | this.$u.api.getDetail({ |
| | | orderId: option.id |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.info = res.data |
| | | for (const key in this.form) { |
| | | this.form[key] = res.data[key] |
| | | } |
| | | this.form.days = res.data.totalDays |
| | | this.form.price = Number(this.form.price) / 100 |
| | | if (!this.form.multifileList) { |
| | | this.form.multifileList = [] |
| | | } |
| | | } |
| | | |
| | | }) |
| | | } else { |
| | | this.form.linkPhone = this.userInfo.telephone |
| | | this.form.days = option.days |
| | | this.form.startDate = option.startDate |
| | |
| | | this.form.lgt = option.longitude |
| | | this.form.location = option.address |
| | | this.form.workType = option.workType |
| | | } |
| | | this.getCateList() |
| | | }, |
| | | methods: { |
| | |
| | | if (!this.form.linkPhone) { |
| | | return uni.showToast({ title: '请输入联系电话', icon: 'none' }) |
| | | } |
| | | if (!this.form.id) { |
| | | this.$u.api.release({ ...this.form, price: Number(this.form.price) * 100 }) |
| | | .then(res => { |
| | | if (res.code == 200) { |
| | |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | this.$u.api.updateOrder({ ...this.form, price: Number(this.form.price) * 100 }) |
| | | .then(res => { |
| | | if (res.code == 200) { |
| | | uni.showToast({ |
| | | title: '编辑成功', |
| | | icon: 'success', |
| | | mask: true, |
| | | duration: 2000 |
| | | }) |
| | | setTimeout(() => { |
| | | uni.navigateBack({ delta: 1 }); |
| | | // uni.$emit('refresh') |
| | | }, 1500) |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // 计算金额 |
| | | getPrice() { |
| | |
| | | type: this.form.type, |
| | | workType: this.form.workType |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.modify = true |
| | | this.form.estimatedAccount = res.data |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | |
| | | this.$u.api.getCategoryList({ |
| | | type: 0 |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.cateList = [res.data] |
| | | } |
| | | }) |
| | | }, |
| | | uploadImg() { |
| | |
| | | let doneOrder = (data = {}) => vm.$u.http.post('web/orders/doneOrder', data); // 完成订单 - 发单方 |
| | | let getDetail = (params = {}) => vm.$u.http.get('web/orders/getDetail', { params }); // 订单详情 |
| | | let orderPage = (data) => vm.$u.http.post('web/orders/page', data); // 分页查询 |
| | | let receiveCancelOrder = (params = {}) => vm.$u.http.get('web/orders/receiveCancelOrder', { params }); // 取消接单 - 接单方 |
| | | let releaseCancelOrder = (params = {}) => vm.$u.http.get('web/orders/releaseCancelOrder', { params }); // 取消接单 - 接单方 |
| | | let cancelOrder = (params = {}) => vm.$u.http.get('web/orders/cancelOrder', { params }); // 取消接单 - 接单方 |
| | | let release = (data = {}) => vm.$u.http.post('web/orders/release', data); // 发布订单 - 发单方 |
| | | let updOrderData = (data = {}) => vm.$u.http.post('web/orders/updOrderData', data); // 修改订单日期 - 发单方 |
| | | let updateOrder = (data = {}) => vm.$u.http.post('web/orders/updateOrder', data); // 修改订单 - 接单方 |
| | |
| | | doneOrder, |
| | | getDetail, |
| | | orderPage, |
| | | receiveCancelOrder, |
| | | releaseCancelOrder, |
| | | cancelOrder, |
| | | release, |
| | | updOrderData, |
| | | updateOrder, |
| | |
| | | // 请求拦截器 |
| | | uni.$u.http.interceptors.request.use((config) => { |
| | | const Headtoken = vm.$store.state.token |
| | | uni.showLoading({ title: '加载中' }); |
| | | // 判断有无token,有则加入请求头中 |
| | | if (Headtoken) { |
| | | config.header['token'] = Headtoken; |
| | |
| | | |
| | | // 响应拦截器 |
| | | uni.$u.http.interceptors.response.use((response) => { |
| | | uni.hideLoading(); |
| | | // console.log(response.data) |
| | | if (response.data.code === 5113) { |
| | | uni.switchTab({ |