From c2efd87e150d0ab5d92d398c3b367345def3cc35 Mon Sep 17 00:00:00 2001 From: 付延余 <f-yanyu@outlook.com> Date: 星期一, 20 三月 2023 11:18:59 +0800 Subject: [PATCH] 转发按钮 --- pages/customer-page/customer-index/customer-index.vue | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/pages/customer-page/customer-index/customer-index.vue b/pages/customer-page/customer-index/customer-index.vue index 0c403a4..5b11efb 100644 --- a/pages/customer-page/customer-index/customer-index.vue +++ b/pages/customer-page/customer-index/customer-index.vue @@ -1,6 +1,7 @@ <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"> @@ -8,15 +9,15 @@ 寮� </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> @@ -60,8 +61,8 @@ <script> import card from '@/components/card/card.vue'; import { customerId } from '@/utils/status'; -import colorGradient from '@/uni_modules/uview-ui/libs/function/colorGradient'; - +// import colorGradient from '@/uni_modules/uview-ui/libs/function/colorGradient'; +import { todayDate } from '@/utils/util.js'; export default { components: { card @@ -79,6 +80,7 @@ }, onShow() { this.init(); + console.log(todayDate, '鑾峰彇浠婂ぉ鐨勬棩鏈�'); }, methods: { init() { @@ -86,11 +88,12 @@ }, // 鑾峰彇鍙戣繍璁″垝鍒楄〃 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(); }); }, // 棰嗗彇鐐瑰嚮 @@ -152,7 +155,7 @@ // 杞彂 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}` }); } } -- Gitblit v1.9.1