| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317 | 
							- <template>
 
-   <view>
 
-     <view class="box">
 
-       <view class="top">
 
-         <text class="title">业务详情</text>
 
-       </view>
 
-     </view>
 
-     <view class="card-box">
 
-       <view class="card" v-for="(businessItem,index) in items" :key="businessItem.id">
 
-         <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">
 
-           <view class="item" v-if="businessItem.pickCustomerName">
 
-             <text class="p1">接单企业:</text>
 
-             <text class="p2">
 
-               <text>{{ businessItem.pickCustomerName }}</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" v-if="customerId=='1'&&businessItem.pick==1&&businessItem.confirm!=1">
 
-           <view class="btn b3" @click="pickFn(businessItem.id)">
 
-             确认
 
-           </view>
 
-         </view>
 
-       </view>
 
-     </view>
 
-   </view>
 
- </template>
 
- <script>
 
- export default {
 
-   data() {
 
-     return {
 
-       customerId: '',
 
-       openid: '',
 
-       form: {},
 
-       items: [],
 
-       itemId: '',
 
-     }
 
-   },
 
-   onLoad(options) {
 
-     this.form.id = options.id;
 
-     this.itemId = options.itemId;
 
-     this.openid = options.openid;
 
-     this.checkLogin();
 
-   },
 
-   onShow() {
 
-     this.customerId = uni.getStorageSync('customerId')
 
-     if (this.itemId) {
 
-       this.getBusinessItem()
 
-     } else {
 
-       this.getBusinessById();
 
-     }
 
-   },
 
-   onBackPress() {
 
-     this.$common.to('/pages/index/index')
 
-     return true;
 
-   },
 
-   methods: {
 
-     getBusinessItem() {
 
-       this.$api.getBusinessItem({
 
-         id: this.itemId
 
-       }).then(resp => {
 
-         let data = resp.data;
 
-         if (!data) {
 
-           this.$common.toast('该业务已取消或删除');
 
-           setTimeout(() => {
 
-             this.$common.to('/pages/index/index')
 
-           }, 2000)
 
-           return;
 
-         }
 
-         this.items = [resp.data];
 
-       })
 
-     },
 
-     checkLogin() {
 
-       let token = uni.getStorageSync('token');
 
-       if (this.openid && !token) {
 
-         this.$api.doLoginByOpenid({
 
-           openid: this.openid
 
-         }).then(resp => {
 
-           let data = resp.data;
 
-           if (data.tokenInfo) {
 
-             uni.setStorageSync('token', data.tokenInfo.tokenValue);
 
-             uni.setStorageSync('customerId', data.admin.customerId)
 
-             uni.setStorageSync('info', data.admin)
 
-             uni.setStorageSync('perList', data.per_list)
 
-           } else {
 
-             this.$common.toast(resp.msg);
 
-           }
 
-         })
 
-       }
 
-     },
 
-     getBusinessById() {
 
-       this.$api.getBusinessById({
 
-         id: this.form.id
 
-       }).then(resp => {
 
-         let data = resp.data;
 
-         this.items = resp.data.items.filter(obj => obj.businessType !== 0);
 
-       })
 
-     },
 
-     pickFn(id) {
 
-       let that = this;
 
-       uni.showModal({
 
-         title: '提示',
 
-         content: '是否确认该业务项?',
 
-         success(resp) {
 
-           if (resp.confirm) {
 
-             that.surePick(id);
 
-           }
 
-         }
 
-       })
 
-     },
 
-     surePick(id) {
 
-       this.$api.confirmBusinessItem({
 
-         id: id
 
-       }).then(resp => {
 
-         if (resp.code == 200) {
 
-           this.$common.toast('已确认');
 
-           this.getBusinessById();
 
-         }
 
-       })
 
-     }
 
-   }
 
- }
 
- </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>
 
 
  |