| | |
| | | } else { |
| | | this.typeViewId = 0 |
| | | } |
| | | if (!this.isOnce) { |
| | | this.commentStatus = '' |
| | | this.orderList = [] |
| | | this.next = true |
| | | this.page = 1 |
| | | this.getOrderList() |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | |
| | | next: true, |
| | | page: 1, |
| | | orderList: [] |
| | | orderList: [], |
| | | isOnce: true |
| | | }; |
| | | }, |
| | | async onLoad() { |
| | |
| | | queryLgt: this.longitude |
| | | } |
| | | }).then(res => { |
| | | if (res.code !== 200) return; |
| | | this.isOnce = false |
| | | res.data.records.forEach(item => { |
| | | // 订餐单 |
| | | if (item.type === 2) { |
| | |
| | | <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 => { |
| | | 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: { |
| | |
| | | }) |
| | | }, |
| | | 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, |
| | |
| | | </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() { |
| | |
| | | this.getCategoryLists() |
| | | this.getOrderList() |
| | | this.form.linkPhone = this.userInfo.telephone |
| | | }, |
| | | 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 |
| | | } |
| | | if (!this.isOnce && this.userInfo.useIdentity == 1) { |
| | | this.page = 1 |
| | | this.next = true |
| | | this.orderList = [] |
| | | this.getOrderList() |
| | | } |
| | | }, |
| | | watch: { |
| | | typeId: { |
| | |
| | | queryLgt: this.longitude |
| | | } |
| | | }).then(res => { |
| | | if (res.code !== 200) return; |
| | | this.isOnce = false |
| | | res.data.records.forEach(item => { |
| | | // 订餐单 |
| | | if (item.type === 2) { |
| | |
| | | // 采摘工 |
| | | 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}` |
| | | }) |
| | | } |
| | | // 运货 |
| | |
| | | </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="![4, 99].includes(info.status)"></view> |
| | | <view class="order-footer" v-if="![4, 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> |
| | | <view slot="confirmButton" style="display: flex; justify-content: space-between; align-items: center; width: 100%;"> |
| | | <view class="btn1" @click="show5=false">我再想想</view> |
| | | <view class="btn2" style="color: red;" @click="confirmUpdDo(1)">不同意</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-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 => { |
| | | 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() { |
| | |
| | | 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({ |
| | |
| | | <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 => { |
| | | 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() { |
| | |
| | | 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({ |
| | |
| | | <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> |
| | | </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: { |
| | |
| | | this.$u.api.getDetail({ |
| | | orderId: option.id |
| | | }).then(res => { |
| | | 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 |