123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273 |
- <template>
- <view>
- <view class="box">
- <view class="top">
- <text class="title">业务详情</text>
- </view>
- </view>
- <view class="card-box">
- <view class="card">
- <view class="t">
- 订单号:
- <text class="title">{{ businessItem.no }}</text>
- </view>
- <view class="c">
- <view class="item car-num-item">
- <text class="car-num">{{ businessItem.goodsName }}</text>
- </view>
- </view>
- <view class="c">
- <view class="item">
- <text class="p1">类型:</text>
- <text class="p2">{{ businessItem.itemTypeName }}</text>
- </view>
- </view>
- <view class="c">
- <view class="item">
- <text class="p1">作业项:</text>
- <text class="p2">{{ businessItem.itemName }}</text>
- </view>
- </view>
- <view class="c" v-if="businessItem.cardNo">
- <view class="item">
- <text class="p1">越南车:</text>
- <text class="p2">{{ businessItem.cardNo }}</text>
- </view>
- </view>
- <view class="c" v-if="businessItem.chinaCarNo">
- <view class="item">
- <text class="p1">中国车:</text>
- <text class="p2">{{ businessItem.chinaCarNo }}</text>
- </view>
- </view>
- <view class="c">
- <view class="item">
- <text class="p1">录入时间:</text>
- <text class="p2">{{ businessItem.createTime }}</text>
- </view>
- </view>
- <view class="c">
- <view class="item">
- <text class="p1">状态:</text>
- <text class="p2">
- <text v-if="businessItem.pick==1">已接单</text>
- <text v-else>未接单</text>
- </text>
- </view>
- </view>
- <view class="c">
- <view class="item" v-if="businessItem.pickTime">
- <text class="p1">接单时间:</text>
- <text class="p2">
- <text>{{ businessItem.pickTime }}</text>
- </text>
- </view>
- </view>
- <view class="c" v-if="businessItem.pick==1">
- <view class="item">
- <text class="p1">确认状态:</text>
- <text class="p2">
- <text v-if="businessItem.confirm==1">已确认</text>
- <text v-else>未确认</text>
- </text>
- </view>
- </view>
- <view class="c" v-if="businessItem.confirm==1">
- <view class="item">
- <text class="p1">确认时间:</text>
- <text class="p2">
- <text>{{ businessItem.confirmTime }}</text>
- </text>
- </view>
- </view>
- <view class="b">
- <view class="btn b3" v-if="businessItem.pick==0" @click="pickFn">
- 接单
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- openid: '',
- businessItem: {}
- }
- },
- onLoad(option) {
- this.businessItem.id = option.itemId;
- this.openid = option.openid;
- this.getBusinessItem();
- },
- onBackPress() {
- this.$common.to('/pages/index/index')
- return true;
- },
- methods: {
- getBusinessItem() {
- this.$api.getBusinessItem({
- id: this.businessItem.id
- }).then(resp => {
- let data = resp.data;
- if (!data) {
- this.$common.toast('该业务已取消或删除');
- setTimeout(() => {
- this.$common.to('/pages/index/index')
- }, 2000)
- return;
- }
- this.businessItem = resp.data;
- })
- },
- pickFn() {
- let that = this;
- uni.showModal({
- title: '提示',
- content: '是否确认接单?',
- success(resp) {
- if (resp.confirm) {
- that.surePick();
- }
- }
- })
- },
- surePick() {
- let obj = {
- openid: this.openid,
- id: this.businessItem.id
- };
- this.$api.pickBusinessItem(obj).then(resp => {
- if (resp.code == 200) {
- this.$common.toast('已接单');
- this.getBusinessItem();
- }
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .card-box {
- display: flex;
- width: 100%;
- flex-direction: column;
- .card {
- background-color: #fff;
- border-radius: 20rpx;
- margin: 20rpx 20rpx 0 20rpx;
- padding: 30rpx;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- .t {
- width: 100%;
- display: flex;
- align-items: center;
- padding-bottom: 30rpx;
- border-bottom: 1rpx solid #f5f5f5;
- .icon {
- width: 40rpx;
- height: 40rpx;
- }
- .title {
- font-size: 35rpx;
- font-weight: bold;
- margin-left: 20rpx;
- }
- }
- .c {
- padding: 15rpx 0 30rpx 0;
- display: flex;
- flex-wrap: wrap;
- border-bottom: 1rpx solid #f5f5f5;
- .item {
- padding: 20rpx 0;
- .car-num {
- background-color: #edf6ff;
- color: #0080ff;
- font-size: 38rpx;
- padding: 15rpx 0;
- text-align: center;
- width: 100%;
- border-radius: 10rpx;
- font-weight: bold;
- }
- .p1 {
- font-size: 28rpx;
- color: #999;
- }
- .p2 {
- font-size: 28rpx;
- color: #191919;
- font-weight: bold;
- margin-left: 20rpx;
- }
- }
- .car-num-item {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- }
- .b {
- display: flex;
- width: 100%;
- align-items: center;
- justify-content: space-between;
- .btn {
- height: 70rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- width: calc(100% - 15rpx);
- margin: 30rpx 0 0 0;
- border-radius: 10rpx;
- border-width: 1rpx;
- box-sizing: border-box;
- }
- .b1 {
- background-color: #0080ff;
- color: #fff;
- }
- .b2 {
- background-color: #f7f7f7;
- color: #191919;
- }
- .b3 {
- background-color: #fff;
- color: #0080ff;
- border: 1rpx solid #0080ff;
- }
- .b4 {
- background-color: #ff0000;
- color: #fff;
- }
- }
- }
- }
- @import '@/common/common.scss'
- </style>
|