| | |
| | | <template> |
| | | <view class="customer-index"> |
| | | <view class="customer-index-body"> |
| | | <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" textSize="30" iconSize="1000" v-if="orderPlanData.length == 0"></u-empty> |
| | | <card v-for="(item, index) in orderPlanData" :key="index" :name="item.id" @click="cardBodyClick"> |
| | | <template v-slot:left> |
| | | <view class="card-left__top"> |
| | |
| | | 张 |
| | | </view> |
| | | <view class="card-left__utils"> |
| | | <u-button @tap.stop="receiveClick(item)" text="领取" type="primary" v-if="item.cars == item.cars2 ? false : true" shape="circle"></u-button> |
| | | <u-button text="转发" type="primary" @tap.stop="forwardClick(item)" shape="circle"></u-button> |
| | | <u-button @tap.stop="receiveClick(item)" text="领取" type="primary" v-if="item.cars2 != item.carNum" shape="circle"></u-button> |
| | | <u-button text="转发" type="primary" @tap.stop="forwardClick(item)" shape="circle" v-if="item.carNum != item.carNumSurplus1"></u-button> |
| | | </view> |
| | | </template> |
| | | <template v-slot:right-top> |
| | | <view class="right-top"> |
| | | <view class="card-right-top-row"> |
| | | <view> |
| | | <text>{{ item.compName || '' }}</text> |
| | | <text>{{ item.deptName || '' }}</text> |
| | | </view> |
| | | <view> |
| | | <text>{{ item.coalName }}</text> |
| | |
| | | <script> |
| | | import card from '@/components/card/card.vue'; |
| | | import { customerId } from '@/utils/status'; |
| | | import colorGradient from '@/uni_modules/uview-ui/libs/function/colorGradient'; |
| | | |
| | | export default { |
| | | components: { |
| | | card |
| | |
| | | }, |
| | | // 获取发运计划列表 |
| | | GetOrderPlan() { |
| | | // this.$reqGet('GetOrderPlan', { customerId: customerId }).then(res => { |
| | | // this.orderPlanData = res.data; |
| | | // }); |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }); |
| | | this.$reqGet('GetOrderPlan').then(res => { |
| | | this.orderPlanData = res.data; |
| | | uni.hideLoading(); |
| | | }); |
| | | }, |
| | | // 领取点击 |
| | | // numInput(id) { |
| | | |
| | | // }, |
| | | popupDetermineClick() { |
| | | if (this.receiveNum) { |
| | | this.getOrderNum.num = this.receiveNum; |
| | |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }); |
| | | } else { |
| | | this.$u.toast(res.data ? res.data : '领取失败'); |
| | | } |
| | | }); |
| | | } else { |
| | |
| | | }, |
| | | /** |
| | | * @客户领取 |
| | | * 领取弹框 |
| | | */ |
| | | receiveClick(item) { |
| | | this.show = true; |
| | | |
| | | this.getOrderNum.id = item.id; // 获取领取提煤单的id |
| | | }, |
| | | open() { |
| | | console.log('打开了'); |
| | | }, |
| | | open() {}, |
| | | close() { |
| | | console.log('关闭方法'); |
| | | this.show = false; |
| | | this.receiveNum = null; |
| | | }, |
| | |
| | | // 转发 |
| | | forwardClick(obj) { |
| | | uni.navigateTo({ |
| | | url: `/pages/public-page/forward/forward?orderPlanId=${obj.id}&carNum=${obj.carNum}` |
| | | url: `/pages/public-page/forward/forward?orderPlanId=${obj.id}&carNumSurplus1=${obj.carNumSurplus1}` |
| | | }); |
| | | } |
| | | } |