zhangxiaoxu
2 天以前 07e7049fe46931edd6ade7c6871fdccb360a9058
pages/home/home.vue
@@ -1,587 +1,1721 @@
<template>
   <view class="home">
      <!-- 轮播图 -->
      <view class="home_swipe"><u-swiper :list="list3" indicator indicatorMode="line" circular></u-swiper></view>
      <!-- 我的申请 -->
      <combined-title title="我的申请" detailsPath="/pages/my-application/my-application"></combined-title>
      <combination-card v-for="(item, index) in shenqingData" index="index">
         <template v-slot:top>
            <view>
               <text>{{ item.title }}</text>
            </view>
         </template>
         <template v-slot:center>
            <view class="center-container">
               <view class="center-content__one center-margin">
                  <view class="">
                     <text>所属流程:{{ item.processName }}</text>
                  </view>
                  <view class="">
                     <text>审批环节:{{ item.currTaskName }}</text>
                  </view>
               </view>
               <view class="center-content__two center-margin">
                  <view class="">
                     状态:
                     <text :style="{ color: statusColor[item.status] }">{{ status[item.status] }}</text>
                  </view>
                  <view class="">
                     结果:
                     <text :style="{ color: resultColor[item.result] }">{{ result[item.result] }}</text>
                  </view>
               </view>
               <view class="center-content__three center-margin">
                  <text>创建时间:{{ item.createTime }}</text>
               </view>
               <view class="center-content__four">
                  <text>提交申请时间:{{ item.applyTime }}</text>
               </view>
            </view>
         </template>
         <template v-slot:bottom>
            <view class="bottom-container">
               <!-- 按钮区域 -->
               <view class="bottom-content__chulizhong bottom-content__item" >
                  <view @click="withDrawClick(item.id)" v-if="item.status == 1">
                     <image src="@/static/home/cehui.png" mode=""></image>
                     <view>撤回</view>
                  </view>
                  <view @click="checkTheScheduleClick" v-if="item.status == 1">
                     <image src="@/static/home/jindu.png" mode=""></image>
                     <view>查看进度</view>
                  </view>
                  <view @click="theFormDataClick" v-if="item.status == 1 || item.status == 2 ">
                     <image src="@/static/home/biaodan.png" mode=""></image>
                     <view>表单数据</view>
                  </view>
                  <view v-if="item.status == 3">
                     <image src="@/static/home/history.png" mode="" ></image>
                     <view>重新申请</view>
                  </view>
                  <view v-if="item.status == 3">
                     <image src="@/static/home/history.png" mode="" ></image>
                     <view>编辑</view>
                  </view>
                  <view @click="approvalHistoryClick" v-if="item.status == 2 || item.status == 3">
                     <image src="@/static/home/history.png" mode=""></image>
                     <view>审批历史</view>
                  </view>
               </view>
               <!-- 已结束小组按钮 -->
               <!-- <view class="bottom-content__chulizhong bottom-content__item" v-if="item.status == 2">
                  <view @click="theFormDataClick">
                     <image src="@/static/home/biaodan.png" mode=""></image>
                     <view>表单数据</view>
                  </view>
               </view> -->
            </view>
         </template>
      </combination-card>
      <!-- 我的待办 -->
      <combined-title title="我的待办" detailsPath="/pages/my-todo/my-todo"></combined-title>
      <combination-card v-for="(item, index) in daibanData" index="index">
         <template v-slot:top>
            <view>
               <text>{{ item.actBusiness.title }}</text>
            </view>
         </template>
         <template v-slot:center>
            <view class="center-container">
               <view class="center-content__one center-margin">
                  <view class="">
                     <text>任务名称:{{ item.name }}</text>
                  </view>
                  <view class="">
                     <text>所属流程:{{ item.processName }}</text>
                  </view>
               </view>
               <view class="center-content__two center-margin">
                  <text>发起人:{{ item.actBusiness.createByName }}</text>
               </view>
               <view class="center-content__three">
                  <text>创建时间:{{ item.createTime }}</text>
               </view>
            </view>
         </template>
         <template v-slot:bottom>
            <view class="bottom-container">
               <!-- 待办按钮 -->
               <view class="bottom-content__item">
                  <view @click="theFormDataClick">
                     <image src="@/static/home/jindu.png" mode=""></image>
                     <view>申请详情</view>
                  </view>
                  <view @click="adoptModalShow = true">
                     <image src="@/static/home/tongguo.png" mode=""></image>
                     <view>通过</view>
                  </view>
                  <view @click="rejectModalShow = true">
                     <image src="@/static/home/bohui.png" mode=""></image>
                     <view>驳回</view>
                  </view>
                  <view @click="approvalHistoryClick">
                     <image src="@/static/home/history.png" mode=""></image>
                     <view>历史</view>
                  </view>
               </view>
            </view>
         </template>
      </combination-card>
      <!-- 我的已办 -->
      <combined-title title="我的已办 " detailsPath="/pages/my-have-todo/my-have-todo"></combined-title>
      <combination-card v-for="(item, index) in yibanData" index="index">
         <template v-slot:top>
            <view>
               <text>{{ item.actBusiness.title }}</text>
            </view>
         </template>
         <template v-slot:center>
            <view class="center-container">
               <view class="center-content__one center-margin">
                  <view>
                     <text>任务名称:{{ item.name }}</text>
                  </view>
                  <view>
                     <text>所属流程:{{ item.processName }}</text>
                  </view>
               </view>
               <view class="center-content__two center-margin">
                  <view>
                     <text>发起人:{{ item.actBusiness.createByName }}</text>
                  </view>
                  <view>
                     <text>审批操作:{{ item.deleteReason }}</text>
                  </view>
               </view>
               <view class="center-content__three center-margin">
                  <view class="">
                     <text>审批意见:{{ item.comment }}</text>
                  </view>
                  <view class="">
                     <text>
                        耗时:{{
                           item.duration >= 86400000
                              ? parseInt(item.duration / 86400000 + '天' + parseInt(item.duration % 86400000) / 3600000 + '时' + parseInt(item.duration % 3600000) / 60000 + '分')
                              : item.duration >= 3600000
                              ? parseInt(item.duration / 3600000) + '时' + parseInt(item.duration / 3600000 % 3600000)  + '分'
                              : parseInt(item.duration / 60000) + '分'
                        }}
                     </text>
                  </view>
               </view>
               <view class="center-content__four">
                  <text>创建时间:{{ item.createTime }}</text>
               </view>
            </view>
         </template>
         <template v-slot:bottom>
            <view class="bottom-container">
               <!-- 已办按钮 -->
               <view class="bottom-content__item">
                  <view @click="theFormDataClick">
                     <image src="@/static/home/biaodan.png" mode=""></image>
                     <view>表单数据</view>
                  </view>
                  <view @click="approvalHistoryClick">
                     <image src="@/static/home/history.png" mode=""></image>
                     <view>审批历史</view>
                  </view>
                  <view @click="deleteApplicationClick(item.id)">
                     <image src="@/static/home/delete.png" mode=""></image>
                     <view>删除</view>
                  </view>
               </view>
            </view>
         </template>
      </combination-card>
      <!-- 撤回模态框 -->
      <view class="wodeshenqingMotai">
         <u-modal width="684rpx" :show="withDrawShow" title="撤回原因" :showCancelButton="true" @confirm="withDrawConfirm" @cancel="withDrawCancel">
            <view class="slot-content"><u--textarea v-model="withDrawContent" placeholder="请输入撤回原因"></u--textarea></view>
         </u-modal>
      </view>
      <!-- 通过模态框 -->
      <view class="adoptModal">
         <u-modal width="684rpx" :show="adoptModalShow" title="审批通过" :showCancelButton="true" @confirm="adoptModalConfirm" @cancel="adoptModalCancel">
            <view class="slot-content"><u--textarea v-model="adoptModalContent" placeholder="请输入审批意见"></u--textarea></view>
         </u-modal>
      </view>
      <!-- 驳回模态框 -->
      <view class="rejectModal">
         <u-modal width="684rpx" :show="rejectModalShow" title="驳回" :showCancelButton="true" @confirm="rejectModalConfirm" @cancel="rejectModalCancel">
            <view class="slot-content">
               <u--textarea v-model="rejectModalContent" placeholder="请输入审批意见"></u--textarea>
               <view class="rejectBack">
                  <view class="rejectBack-title"><text>驳回至</text></view>
                  <view class="data-selet" @click="statusSeletShow = true">
                     <view class="content">
                        <text>{{ dataSeletText }}</text>
                     </view>
                     <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="加载失败"></image></view>
                  </view>
               </view>
            </view>
         </u-modal>
      </view>
      <!-- 删除已办申请模态框 -->
      <view class="deleteApplicationModal">
         <u-modal
            :show="deleteApplicationModalShow"
            title="提示"
            content="确定删除该申请?"
            :showCancelButton="true"
            @confirm="deleteApplicationModalConfirm"
            @cancel="deleteApplicationModalCancel"
         ></u-modal>
      </view>
      <!-- 选择器 -->
      <u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker>
      <!-- 菜单栏 -->
      <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu>
   </view>
</template>
<script>
import { timeConsuming } from '@/utils/nowDate.js';
import popupMenu from '@/components/common/popup-menu/popup-menu.vue';
import combinedTitle from '@/components/common/combined-title/combined-title.vue';
import combinationCard from '@/components/common/combination-card/combination-card.vue';
export default {
   name: 'home',
   data() {
      return {
         // menuShow:false,// 菜单显示
         status: ['草稿', '处理中', '已结束', '已撤回'],
         statusColor: ['#DDDDDD', '#FF9900', '#007AFF', '#06BE00'],
         result: ['未提交', '处理中', '通过', '驳回'],
         resultColor: ['#DDDDDD', '#FF9900', '#06BE00', '#be2b2d'],
         list3: ['https://cdn.uviewui.com/uview/swiper/swiper3.png', 'https://cdn.uviewui.com/uview/swiper/swiper2.png', 'https://cdn.uviewui.com/uview/swiper/swiper1.png'],
         // 撤回模态框
         withDrawShow: false,
         withDrawContent: '',
         withDrawId: 0, // 撤回申请ID
         // 通过模态框
         adoptModalShow: false,
         adoptModalContent: '',
         // 驳回模态框
         rejectModalShow: false,
         rejectModalContent: '',
         dataSeletText: '请选择状态',
         // 删除申请模态框
         deleteApplicationModalShow: false,
         // 选择器
         statusSeletShow: false,
         statusList: [['中国', '美国', '日本']],
         // data
         shenqingData: [],
         daibanData: [],
         daibanData: [],
         yibanData: [],
         menuShow: false,
         // 申请
         myApplicationParams: {
            status: '',
            result: '',
            pageNumber: 1,
            pageSize: 2,
            sort: 'createTime',
            order: 'desc'
         },
         // 待办
         todoParams: {
            pageNumber: 1,
            pageSize: 2
         },
         haveTodoParams: {
            pageNumber: 1,
            pageSize: 2,
            sort: 'createTime',
            order: 'desc'
         }
      };
   },
   // 点击导航栏菜单后
   onNavigationBarButtonTap(e) {
      console.log(e);
      this.$refs.menuRef.menuClick();
   },
   onShow() {
      if (this.menuShow == true) {
         this.$refs.menuRef.menuClick();
      }
      this.init();
   },
   components: {
      combinedTitle,
      combinationCard,
      popupMenu
   },
   methods: {
      init() {
         this.getProcessDataList(); // 申请列表
         this.todoList(); // 我的待办
         this.doneList(); // 我的已办
      },
      getProcessDataList() {
         this.$reqGet('getProcessDataList', this.myApplicationParams).then(res => {
            if (res.code === 0) {
               // console.log('申请', res);
               this.shenqingData = res.data.records;
            }
         });
      },
      todoList() {
         this.$reqGet('todoList', this.todoParams).then(res => {
            if (res.code === 0) {
               // console.log('待办', res);
               this.daibanData = res.data.content;
            }
         });
      },
      doneList() {
         this.$reqGet('doneList', this.haveTodoParams).then(res => {
            if (res.code === 0) {
               // console.log('已办', res);
               this.yibanData = res.data.content;
            }
         });
      },
      menushow(e) {
         this.menuShow = e;
      },
      // 撤回模态框
      withDrawClick(id) {
         this.withDrawShow = true;
         this.withDrawId = id;
      },
      withDrawConfirm() {
         console.log(this.withDrawId);
         if (this.withDrawContent.length >= 2) {
            console.log(this.withDrawContent);
         } else {
            uni.showToast({
               title: '请规范输入',
               duration: 2000
            });
         }
      },
      // 通过模态框
      adoptModalConfirm() {
         this.adoptModalShow = false;
      },
      adoptModalCancel() {
         this.adoptModalShow = false;
      },
      // 驳回模态框
      rejectModalConfirm() {
         this.rejectModalShow = false;
      },
      rejectModalCancel() {
         this.rejectModalShow = false;
      },
      withDrawCancel() {
         this.withDrawShow = false;
      },
      // 删除申请模态框
      deleteApplicationModalConfirm() {
         this.deleteApplicationModalShow = false;
      },
      deleteApplicationModalCancel() {
         this.deleteApplicationModalShow = false;
      },
      // 查看进度
      checkTheScheduleClick() {
         uni.navigateTo({
            url: '/pages/check-the-schedule/check-the-schedule'
         });
      },
      // 表单数据
      theFormDataClick() {
         uni.navigateTo({
            url: '/pages/the-form-data/the-form-data'
         });
      },
      // 审批历史
      approvalHistoryClick() {
         uni.navigateTo({
            url: '/pages/approval-history/approval-history'
         });
      },
      // 删除申请
      deleteApplicationClick(id) {
         this.deleteApplicationModalShow = true;
         console.log(id);
      }
   }
};
</script>
<style lang="scss" scoped>
::v-deep.home {
   height: 100%;
   width: 100%;
   padding-bottom: vww(24);
   .home_swipe {
      width: 100%;
      height: vww(160);
      .u-swiper {
         height: vww(160) !important;
         .u-swiper__wrapper {
            height: vww(160) !important;
            .uni-swiper-slides {
               .u-swiper__wrapper__item {
                  .u-swiper__wrapper__item__wrapper {
                     .u-swiper__wrapper__item__wrapper__image {
                        height: vww(160) !important;
                     }
                  }
               }
            }
         }
      }
   }
   // 卡片中间
   .center-container {
      display: flex;
      flex-direction: column;
      .center-content__one {
         display: flex;
         view {
            width: 50%;
         }
      }
      .center-content__two {
         display: flex;
         // margin: vww(10) 0;
         view {
            width: 50%;
         }
      }
      .center-content__three {
         display: flex;
         view {
            width: 50%;
         }
      }
      .center-content__four {
      }
   }
   // 中间部分样式
   .center-margin {
      margin-bottom: vww(16);
   }
   // 卡片底部
   .bottom-container {
      .bottom-content__item {
         display: flex;
         justify-content: space-around;
         view {
            display: flex;
            justify-content: center;
            align-content: center;
            margin-right: vww(10);
            &:nth-last-child() {
               margin-right: 0;
            }
            view {
               display: inline-block;
            }
            image {
               width: vww(16);
               height: vww(16);
               margin-right: vww(4);
            }
         }
      }
   }
   // 模态框
   .wodeshenqingMotai {
      // width:100%;
      // height:vww(244);
      .slot-content {
         .u-textarea {
            width: vww(280);
            height: vww(90) !important;
            .uni-textarea-wrapper {
               height: vww(90) !important;
            }
         }
      }
   }
   // 通过模态框
   .adoptModal {
      // width:100%;
      // height:vww(244);
      .slot-content {
         .u-textarea {
            width: vww(280);
            height: vww(90) !important;
            .uni-textarea-wrapper {
               height: vww(90) !important;
            }
         }
      }
   }
   // 驳回模态框
   .rejectModal {
      .slot-content {
         display: inline-block;
         .u-textarea {
            width: vww(280);
            height: vww(90) !important;
            .uni-textarea-wrapper {
               height: vww(90) !important;
            }
         }
         .rejectBack {
            margin-top: vww(24);
            .rejectBack-title {
               font-size: vww(13);
            }
            // 下拉菜单
            .data-selet {
               border: 1px solid #d1d1d1;
               border-radius: 4px;
               width: vww(300);
               height: 40px;
               display: flex;
               align-items: center;
               font-size: 13px;
               color: #666;
               margin-top: vww(8);
               .uni-select__icon {
                  display: flex;
                  align-content: center;
                  margin: 0 10px;
                  image {
                     width: 10px;
                     height: 5.5px;
                  }
               }
               .content {
                  margin-left: vww(8);
                  width: vww(280);
               }
            }
         }
      }
   }
}
</style>
<template>
   <view class="home">
      <!-- 轮播图 -->
      <view class="home_swipe"><u-swiper :list="list3" indicator indicatorMode="line" circular></u-swiper></view>
      <!-- 图表 -->
      <combined-title v-if="uchartsData && uchartsData.length > 0" title="煤仓库存明细"></combined-title>
      <view class="charts-box" v-if="uchartsData && uchartsData.length > 0">
         <qiun-data-charts type="pie" :opts="opts" :chartData="chartData" v-if="uchartsData.length > 0" />
         <u-empty mode="data" iconSize="200" textSize="25" width="350" height="350" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="uchartsData.length == 0"></u-empty>
      </view>
    <view class="huoshiju-box" v-if="compId == '1000278'">
      <!-- 产品当前价格 -->
      <view class="price-group" v-if="coalData && coalData.length > 0">
        <combined-title title="产品当前价格"></combined-title>
        <view class="price-box">
          <div class="price-box-inside">
            <uni-table border stripe emptyText="暂无更多数据" >
              <uni-tr>
                <uni-th width="100" align="center">煤种</uni-th>
                <uni-th width="100" align="center">长协户(元)</uni-th>
                <uni-th width="100" align="center">普通户(元)</uni-th>
              </uni-tr>
              <uni-tr v-for="(item,index) in coalData" :key="index">
                <uni-td align="left">{{item.coalName}}</uni-td>
                <uni-td align="center">{{item.price1}}</uni-td>
                <uni-td align="center">{{item.price2}}</uni-td>
              </uni-tr>
            </uni-table>
<!--            <view class="price-line">
              <view class="name">中煤</view>
              <view class="price"><view class="priceNum">344</view><view class="priceUnit">元</view></view>
            </view>
            <view class="price-line">
              <view class="name">中煤</view>
              <view class="price"><view class="priceNum">344</view><view class="priceUnit">元</view></view>
            </view>
            <view class="price-line">
              <view class="name">中煤</view>
              <view class="price"><view class="priceNum">344</view><view class="priceUnit">元</view></view>
            </view>
            <view class="price-line">
              <view class="name">中煤</view>
              <view class="price"><view class="priceNum">344</view><view class="priceUnit">元</view></view>
            </view>-->
          </div>
        </view>
      </view>
      <!-- 当日收款情况 -->
      <view class="shoukuan-group" v-if="shoukuanJiluTemp && shoukuanJiluTemp.length > 0">
        <view class="currentDay-box">
          <combined-title title="当日收款情况">
          </combined-title>
          <view class="total-box">
            <view class="total1">小计:</view>
            <view class="total2">{{shoukuanToatl}}
              <view class="small">元</view>
            </view>
          </view>
        </view>
        <view class="shoukuan-box">
          <div class="shoukuan-box-inside">
            <view class="shoukuan-main" v-for="(item,index) in shoukuanJilu" :key="index">
              <view class="shoukuan-line shoukuanFirst-line">
                <view class="text1">{{item.customerName || ''}}</view>
              </view>
              <view class="shoukuan-line">
                <view class="name">金额:</view>
                <view class="text1 num">{{item.money || ''}}
                   <view class="small">元</view>
                </view>
              </view>
              <view class="shoukuan-line">
                <view class="name">账套:</view>
                <view class="text1">{{item.ledgerName || ''}}</view>
              </view>
            </view>
            <view class="shouqiIcon" @click="handleShouKuanIsMore">
              <image v-if="!shoukuanIsMore" src="@/static/home/xialaIcon.png"></image>
              <image v-else src="@/static/home/shouqiIcon.png"></image>
            </view>
          </div>
        </view>
      </view>
      <!-- 煤种发运情况 -->
      <view class="shoukuan-group" v-if="coalTongjiTemp && coalTongjiTemp.length > 0">
        <view class="currentDay-box">
          <combined-title title="煤种发运情况">
          </combined-title>
        </view>
        <view class="shoukuan-box">
          <view class="coalFayun-total">
            <view class="total-block">
              <view class="num">{{d2Sum || 0}}</view>
              <view class="name">总计金额(元)</view>
            </view>
            <view class="total-block">
              <view class="num">{{dsumSum || 0}}</view>
              <view class="name">汽运总计(吨)</view>
            </view>
            <view class="total-block">
              <view class="num">{{lyDSumSum || 0}}</view>
              <view class="name">路运总计(吨)</view>
            </view>
            <view class="total-block">
              <view class="num">{{d1Sum || 0}}</view>
              <view class="name">总吨数(吨)</view>
            </view>
          </view>
          <div class="shoukuan-box-inside">
            <view class="shoukuan-main" v-for="(item,index) in coalTongji" :key="index">
              <view class="shoukuan-line shoukuanFirst-line">
                <view class="text1">{{item.coalName}}</view>
              </view>
              <view class="shoukuan-line">
                <view class="name">账套:</view>
                <view class="text1">{{item.ledgerName || ''}}</view>
              </view>
              <view class="coalTongji-box">
                <view class="shoukuan-line">
                  <view class="name">单价:</view>
                  <view class="text1 num">
                    {{item.d3 || 0}}
                    <view class="small">元</view>
                  </view>
                </view>
                <view class="shoukuan-line">
                  <view class="name">金额:</view>
                  <view class="text1 num">
                    {{item.d2 || 0}}
                    <view class="small">元</view>
                  </view>
                </view>
              </view>
              <view class="coalTongji-box marginTop">
                <view class="caol-block">
                  <view class="name">日汽运量(吨)</view>
                  <view class="num">{{item.dSum || 0}}</view>
                </view>
                <view class="caol-block">
                  <view class="name">日路运量(吨)</view>
                  <view class="num">{{item.lyDSum || 0}}</view>
                </view>
                <view class="caol-block">
                  <view class="name">日合计(元)</view>
                  <view class="num">{{item.d1 || 0}}</view>
                </view>
              </view>
            </view>
            <view class="shouqiIcon" @click="handleCoalIsMore">
              <image v-if="!coalShowIsMore" src="@/static/home/xialaIcon.png"></image>
              <image v-else src="@/static/home/shouqiIcon.png"></image>
            </view>
          </div>
        </view>
      </view>
      <!-- 分客户煤种发运情况 -->
      <view class="shoukuan-group" v-if="kehuTongjiTemp && kehuTongjiTemp.length > 0">
        <view class="currentDay-box">
          <combined-title title="分客户煤种发运情况">
          </combined-title>
        </view>
        <view class="shoukuan-box">
          <div class="shoukuan-box-inside">
            <view class="shoukuan-main" v-for="(item,index) in kehuTongji" :key="index">
              <view class="shoukuan-line">
                <view class="name">客户:</view>
                <view class="text1">{{item.customerName}}</view>
              </view>
              <view class="shoukuan-line">
                <view class="name">账套:</view>
                <view class="text1">{{item.ledgerName}}</view>
              </view>
              <view class="coalTongji-box">
                <view class="shoukuan-line kehu-block">
                  <view class="name">车数:</view>
                  <view class="text1 num">{{item.carSize}}</view>
                </view>
                <view class="shoukuan-line kehu-block">
                  <view class="name">煤种:</view>
                  <view class="text1">{{item.coalName}}</view>
                </view>
              </view>
              <view class="coalTongji-box marginTop">
                <view class="caol-block">
                  <view class="name">发运量(吨)</view>
                  <view class="num">{{item.executive || 0}}</view>
                </view>
                <view class="caol-block">
                  <view class="name">单价(元)</view>
                  <view class="num">{{item.coalPrice || 0}}</view>
                </view>
                <view class="caol-block">
                  <view class="name">金额(元)</view>
                  <view class="num">{{item.amount || 0}}</view>
                </view>
              </view>
            </view>
            <view class="shouqiIcon" @click="handlekehuTongjiShowIsMore">
              <image v-if="!kehuTongjiShowIsMore" src="@/static/home/xialaIcon.png"></image>
              <image v-else src="@/static/home/shouqiIcon.png"></image>
            </view>
          </div>
        </view>
      </view>
    </view>
      <!-- 我的申请 -->
      <combined-title title="我的申请" detailsPath="/pages/my-application/my-application" v-if="shenqingMenu"></combined-title>
      <view class="card-group">
         <combination-card class="card" v-for="(item, index) in shenqingData" index="index" v-if="shenqingMenu">
            <template v-slot:top>
               <view>
                  <text>{{ item.title }}</text>
               </view>
            </template>
            <template v-slot:center>
               <view class="center-container">
                  <view class="center-content__one center-margin">
                     <view class="">
                        <text>所属流程:{{ item.processName }}</text>
                     </view>
                     <view class="">
                        <text>审批环节:{{ item.currTaskName || '' }}</text>
                     </view>
                  </view>
                  <view class="center-content__two center-margin">
                     <view class="">
                        状态:
                        <text :style="{ color: statusColor[item.status] }">{{ status[item.status] }}</text>
                     </view>
                     <view class="">
                        结果:
                        <text :style="{ color: resultColor[item.result] }">{{ result[item.result] }}</text>
                     </view>
                  </view>
                  <view class="center-content__three center-margin">
                     <text>创建时间:{{ item.createTime }}</text>
                  </view>
                  <view class="center-content__four">
                     <text>提交申请时间:{{ item.applyTime }}</text>
                  </view>
               </view>
            </template>
            <template v-slot:bottom>
               <view class="bottom-container">
                  <!-- 按钮区域 -->
                  <view class="bottom-content__chulizhong bottom-content__item">
                     <!-- <view @click="withDrawClick(item.procInstId)" v-if="item.status == 1">
                        <image src="@/static/home/cehui.png" mode=""></image>
                        <view>撤回</view>
                     </view> -->
                     <view @click="() => checkTheScheduleClick(item.procInstId)" v-if="item.status == 1">
                        <image src="@/static/home/jindu.png" mode=""></image>
                        <view>查看进度</view>
                     </view>
                     <view @click="() => shenqingDetail(item)" v-if="item.actType == 'Offsetting' || item.actType == 'XsWaybill'">
                        <image src="@/static/home/biaodan.png" mode=""></image>
                        <view>申请详情</view>
                     </view>
                     <!-- <view @click="apply(item)" v-if="item.status == 3">
                        <image src="@/static/home/history.png" mode=""></image>
                        <view>重新申请</view>
                     </view> -->
                     <!-- <view @click="editMyApplication(item)" v-if="item.status == 1 && item.processName == '发运通知单'">
                        <image src="@/static/home/history.png" mode=""></image>
                        <view>编辑</view>
                     </view> -->
                     <view @click="() => checkTheScheduleClick(item.procInstId)" v-if="item.status !== 1">
                        <image src="@/static/home/history.png" mode=""></image>
                        <view>审批历史</view>
                     </view>
                     <!-- <view @click="deleteWithDrawApplication(item.tableId)" v-if="item.status == 3">
                        <image src="@/static/home/delete.png" mode=""></image>
                        <view>删除</view>
                     </view> -->
                  </view>
                  <!-- 已结束小组按钮 -->
                  <!-- <view class="bottom-content__chulizhong bottom-content__item" v-if="item.status == 2">
              <view @click="theFormDataClick">
                <image src="@/static/home/biaodan.png" mode=""></image>
                <view>表单数据</view>
              </view>
            </view> -->
               </view>
            </template>
         </combination-card>
      </view>
      <!-- 我的待办 -->
      <combined-title title="我的待办" detailsPath="/pages/my-todo/my-todo"></combined-title>
      <view class="card-group">
         <combination-card class="card" v-for="(item, index) in daibanData" index="index">
            <template slot="top">
               <view>
                  <text>{{ item.actBusiness.title }}</text>
               </view>
            </template>
            <template slot="center">
               <view class="center-container">
                  <view class="center-content__one center-margin">
                     <view class="">
                        <text>任务名称:{{ item.name || '' }}</text>
                     </view>
                     <view class="">
                        <text>所属流程:{{ item.processName || '' }}</text>
                     </view>
                  </view>
                  <view class="center-content__two center-margin">
                     <text>发起人:{{ item.actBusiness.createByName }}</text>
                  </view>
                  <view class="center-content__three">
                     <text>创建时间:{{ item.createTime }}</text>
                  </view>
               </view>
            </template>
            <template slot="bottom">
               <view class="bottom-container">
                  <!-- 待办按钮 -->
                  <view class="bottom-content__item">
                     <view @click="() => daibanDetail(item)" v-if="item.actBusiness.actType == 'Offsetting' || item.actBusiness.actType == 'XsWaybill'">
                        <image src="@/static/home/jindu.png" mode=""></image>
                        <view>申请详情</view>
                     </view>
                     <view @click="() => adopClick(item)">
                        <image src="@/static/home/tongguo.png" mode=""></image>
                        <view>通过</view>
                     </view>
                     <view @click="() => rejectClick(item)">
                        <image src="@/static/home/bohui.png" mode=""></image>
                        <view>驳回</view>
                     </view>
                     <view @click="() => checkTheScheduleClick(item.procInstId)">
                        <image src="@/static/home/history.png" mode=""></image>
                        <view>历史</view>
                     </view>
                  </view>
               </view>
            </template>
         </combination-card>
      </view>
      <!-- 我的已办 -->
      <combined-title title="我的已办 " detailsPath="/pages/my-have-todo/my-have-todo"></combined-title>
      <view class="card-group">
         <combination-card class="card" v-for="(item, index) in yibanData" index="index">
            <template v-slot:top>
               <view>
                  <text>{{ item.actBusiness.title }}</text>
               </view>
            </template>
            <template v-slot:center>
               <view class="center-container" @click="() => shenqingDetail(item)">
                  <view class="center-content__one center-margin">
                     <view>
                        <text>任务名称:{{ item.name }}</text>
                     </view>
                     <view>
                        <text>所属流程:{{ item.processName || '' }}</text>
                     </view>
                  </view>
                  <view class="center-content__two center-margin">
                     <view>
                        <text>发起人:{{ item.actBusiness.createByName || '' }}</text>
                     </view>
                     <view>
                        <text>审批操作:{{ item.deleteReason }}</text>
                     </view>
                  </view>
                  <view class="center-content__three center-margin">
                     <view class="">
                        <text>审批意见:{{ item.comment == 'undefined' ? '未填写' : item.comment || '未填写' }}</text>
                     </view>
                     <view class="">
                        <text>
                           耗时:{{
                              item.duration >= 86400000
                                 ? parseInt(item.duration / 86400000 + '天' + parseInt(item.duration % 86400000) / 3600000 + '时' + parseInt(item.duration % 3600000) / 60000 + '分')
                                 : item.duration >= 3600000
                                 ? parseInt(item.duration / 3600000) + '时' + parseInt((item.duration / 3600000) % 3600000) + '分'
                                 : parseInt(item.duration / 60000) + '分'
                           }}
                        </text>
                     </view>
                  </view>
                  <view class="center-content__four">
                     <text>创建时间:{{ item.createTime }}</text>
                  </view>
               </view>
            </template>
            <template v-slot:bottom>
               <view class="bottom-container">
                  <!-- 已办按钮 -->
                  <view class="bottom-content__item">
                     <view @click="() => shenqingDetail(item)" v-if="item.processName == '发运通知单'">
                        <image src="@/static/home/biaodan.png" mode=""></image>
                        <view>表单数据</view>
                     </view>
              <view @click="() => daibanDetail(item)"  v-if="item.actBusiness.actType == 'Offsetting' || item.actBusiness.actType == 'XsWaybill'">
                <image src="@/static/home/jindu.png" mode=""></image>
                <view>详情</view>
              </view>
                     <view @click="() => checkTheScheduleClick(item.procInstId)">
                        <image src="@/static/home/history.png" mode=""></image>
                        <view>审批历史</view>
                     </view>
                     <view @click="deleteApplicationClick(item.id)">
                        <image src="@/static/home/delete.png" mode=""></image>
                        <view>删除</view>
                     </view>
                  </view>
               </view>
            </template>
         </combination-card>
      </view>
      <!-- 日计划 -->
      <combined-title title="日发运计划" detailsPath="/pages/jihua/jihua"></combined-title>
      <view class="card-group bottomChild">
         <combination-card class="card" :showTop="false" v-for="(item, index) in fyData.slice(0, 2)" :key="item.id">
            <template v-slot:top></template>
            <template v-slot:center>
               <view class="main-block-box">
                  <view class="jihua-main-line">
                     <view class="name">客户名称:{{ item.customerName || '' }}</view>
                  </view>
                  <view class="jihua-main-line">
                     <view class="main-flex">
                        <view>煤种:{{ item.order.coalName || '' }}</view>
                        <view>剩余量:{{ item.order.executiveSurplus || '' }}</view>
                     </view>
                  </view>
                  <view class="jihua-main-line">
                     <view class="main-flex">
                        <view class="carNum-box">
                           <view>计划车数:</view>
                           <u--input placeholder="请输入发运车数" border="surround" :disabled="true" v-model="item.numPlan" @change="inputTotalChange(item)"></u--input>
                        </view>
                        <view>实际发车数:{{ item.order.numReal || '' }}</view>
                     </view>
                  </view>
               </view>
            </template>
            <template v-slot:bottom></template>
         </combination-card>
      </view>
      <!-- 撤回模态框 -->
      <view class="wodeshenqingMotai">
         <u-modal width="684rpx" :show="withDrawShow" title="提示" :showCancelButton="true" @confirm="withDrawConfirm" @cancel="withDrawCancel">
            <view class="slot-content">
               <!-- <u--textarea v-model="withDrawData.reason" placeholder="请输入撤回原因"></u--textarea> -->
               <text>确认撤回该申请吗?</text>
            </view>
         </u-modal>
      </view>
      <!-- 通过模态框 -->
      <view class="adoptModal">
         <u-modal width="684rpx" :show="adoptModalShow" title="审批通过" :showCancelButton="true" @confirm="adoptModalConfirm" @cancel="adoptModalCancel">
            <view class="slot-content">
               <view class="rejectMesaage">
                  <u-icon name="info-circle-fill" color="#0307ff"></u-icon>
                  <text>{{ modalType == 0 ? '注意:将默认分配给节点设定的所有可审批用户' : '注意:所有流程将驳回至发起人' }}</text>
               </view>
               <u--textarea v-model="adoptForm.comment" placeholder="请输入审批意见"></u--textarea>
            </view>
         </u-modal>
      </view>
      <!-- 驳回模态框 -->
      <view class="rejectModal">
         <u-modal width="684rpx" :show="rejectModalShow" title="驳回" :showCancelButton="true" @confirm="rejectModalConfirm" @cancel="rejectModalCancel">
            <view class="slot-content">
               <view class="rejectMesaage">
                  <u-icon name="info-circle-fill" color="#0307ff"></u-icon>
                  <text>{{ modalType == 0 ? '注意:将默认分配给节点设定的所有可审批用户' : '注意:所有流程将驳回至发起人' }}</text>
               </view>
               <u--textarea v-model="rejectForm.comment" placeholder="请输入审批意见"></u--textarea>
               <!-- <view class="rejectBack">
            <view class="rejectBack-title"><text>驳回至</text></view>
            <view class="data-selet" @click="statusSeletShow = true">
              <view class="content">
                <text>{{ dataSeletText }}</text>
              </view>
              <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="加载失败"></image></view>
            </view>
          </view> -->
            </view>
         </u-modal>
      </view>
      <!-- 删除已办申请模态框 -->
      <view class="deleteApplicationModal">
         <u-modal
            :show="deleteApplicationModalShow"
            title="提示"
            content="确定删除该申请?"
            :showCancelButton="true"
            @confirm="deleteApplicationModalConfirm"
            @cancel="deleteApplicationModalCancel"
         ></u-modal>
      </view>
      <!-- 选择器 -->
      <!-- <u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker> -->
      <!-- 菜单栏 -->
      <!-- <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> -->
      <u-gap height="15" bgColor="#eeeeee"></u-gap>
      <view class="utils">
         <view class="utils-container">
            <view class="utils-container-body" @click="redirectLogin">
               <view class="top"><u-icon name="backspace" color="#FF4233" size="70"></u-icon></view>
               <view class="bottom-text"><text>退出</text></view>
            </view>
            <!-- <view class="utils-container-body" @click="huanBang">
               <view class="top"><u-icon name="lock-open" color="#1987FF" size="70"></u-icon></view>
               <view class="bottom-text"><text>换绑</text></view>
            </view> -->
         </view>
      </view>
      <u-gap height="60" bgColor="#eeeeee"></u-gap>
   </view>
</template>
<script>
import { timeConsuming } from '@/utils/nowDate.js';
import { BaseUrl } from '@/utils/request.js';
// import popupMenu from '@/components/common/popup-menu/popup-menu.vue';
import combinedTitle from '@/components/common/combined-title/combined-title.vue';
import combinationCard from '@/components/common/combination-card/combination-card.vue';
import { setAccessToken, redirectLogin } from '@/utils/status.js';
import { logout } from '@/api/global.js';
import UText from "../../uni_modules/uview-ui/components/u-text/u-text.vue";
export default {
   name: 'home',
   onLaunch() {
      let that = this;
      uni.addInterceptor('redirectTo', {
         //监听关闭本页面跳转
         success(e) {
            that.watchRouter();
         }
      });
   },
   computed: {
      rijihuaMenu() {
      console.log(this.$store.state.rijihuaMenu,'this.$store.state.rijihuaMenu==============',this.$store.state)
         return this.$store.state.rijihuaMenu;
      },
      shenqingMenu() {
         return this.$store.state.shenqingMenu;
      }
   },
   data() {
      return {
         // ucharts图表
         chartData: {},
         opts: {
            color: ['#FAC858', '#EE6666', '#73C0DE', '#91CB74', '#1890FF', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'],
            padding: [5, 5, 5, 5],
            extra: {
               pie: {
                  activeOpacity: 0.5,
                  activeRadius: 10,
                  offsetAngle: 0,
                  labelWidth: 15,
                  border: true,
                  borderWidth: 3,
                  borderColor: '#FFFFFF'
               }
            }
         },
         uchartsData: [],
         userId: null,
         // menuShow:false,// 菜单显示
         status: ['草稿', '处理中', '已结束', '已撤回'],
         statusColor: ['#dd8b8c', '#FF9900', '#007AFF', '#06BE00'],
         result: ['未提交', '处理中', '通过', '驳回'],
         resultColor: ['#dd8b8c', '#FF9900', '#06BE00', '#be2b2d'],
         list3: ['../../../../static/groupAppTotalImg/banner.png'],
         // 撤回模态框
         withDrawShow: false,
         fyData: [],
         withDrawData: {
            // reason: '',
            // id: '', // 撤回申请ID
            procInstId: ''
         },
         withDrawContent: '',
         // 重新申请
         form: {
            sendMessage: true,
            sendSms: true,
            sendEmail: true,
            procDefId: '',
            assignees: [],
            priority: '0'
         },
         assigneeList: [],
         showAssign: false,
         isGateway: false,
         isCustom: false,
         // 通过模态框
         adoptModalShow: false,
         // 通过请求
         adoptForm: {
            ids: '',
            comment: ''
         },
         // 驳回模态框
         rejectModalShow: false,
         rejectModalContent: '',
         // dataSeletText: '请选择状态',
         // 驳回请求
         rejectForm: {
        id: "",
        procInstId: "",
        comment: "",
        type: 0,
        backTaskKey: "-1",
        sendMessage: true,
        sendSms: true,
        sendEmail: true,
         },
         modalType: 0,
         // 删除申请模态框
         deleteApplicationModalShow: false,
         procInstId: '',
         // 选择器
         statusSeletShow: false,
         statusList: [['中国', '美国', '日本']],
         // data
         shenqingData: [],
         daibanData: [],
         yibanData: [],
         menuShow: false,
         // 申请
         myApplicationParams: {
            status: '',
            result: '',
            pageNumber: 1,
            pageSize: 2,
            sort: 'createTime',
            order: 'desc'
         },
         // 待办
         todoParams: {
            pageNumber: 1,
            pageSize: 2
         },
         haveTodoParams: {
            pageNumber: 1,
            pageSize: 2,
            // sort: 'createTime',
            // order: 'desc'
         },
      coalData:[],
      shoukuanJilu:[],
      shoukuanJiluTemp:[],
      shoukuanIsMore:false,  //
      shoukuanToatl:0,
      coalTongji:[], //煤种统计
      coalTongjiTemp:[], //煤种统计
      coalShowIsMore: false,
      kehuTongji:[], //煤种统计
      kehuTongjiTemp:[], //煤种统计
      kehuTongjiShowIsMore: false,
      compId:'',
      d2Sum:0,  //总计金额
      d1Sum:0,  //总计
      lyDSumSum:0,  //路运
      dsumSum:0,  //汽运
      };
   },
   // 监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
   // onReady() {
   // },
   // 点击导航栏菜单后
   onNavigationBarButtonTap(e) {
      console.log('退出导航栏按钮事件', e);
      // this.$refs.menuRef.menuClick();
   },
   // 监听左上角的回退事件
   onUnload(event) {
      //多层级跳转之后,监听左上角返回事件,直接退回到index
      console.log('监听左上角', event);
      this.logout();
   },
   onShow() {
      // 菜单注释(app待用)
      // if (this.menuShow == true) {
      //    this.$refs.menuRef.menuClick();
      // }
      this.init();
   },
   components: {
    UText,
      combinedTitle,
      combinationCard
      // popupMenu
   },
  watch: {
    shoukuanIsMore: {
      handler(newVal,oldVal) {
        console.log(newVal,'newVal-------当天收款记录')
        let temp = newVal.toString() || ''
        if(this.shoukuanJiluTemp && this.shoukuanJiluTemp.length > 0) {
          if(temp == 'false') {
            this.shoukuanJilu = this.shoukuanJiluTemp.slice(0,2)
            this.coalShowIsMore = false
          }else if(temp == 'true') {
            this.shoukuanJilu = this.shoukuanJiluTemp
            this.coalShowIsMore = true
          }
        }
      },
      immediate: true,
      deep: true
    },
    coalShowIsMore: {
      handler(newVal,oldVal) {
        console.log(newVal,'newVal-------按煤种统计')
        let temp = newVal.toString() || ''
        if(this.coalTongjiTemp && this.coalTongjiTemp.length > 0) {
          if(temp == 'false') {
            this.coalTongji = this.coalTongjiTemp.slice(0,2)
            this.coalShowIsMore = false
          }else if(temp == 'true') {
            this.coalTongji = this.coalTongjiTemp
            this.coalShowIsMore = true
          }
        }
      },
      immediate: true,
      deep: true
    },
    kehuTongjiShowIsMore: {
      handler(newVal,oldVal) {
        console.log(newVal,'newVal-------按客户发运统计')
        let temp = newVal.toString() || ''
        if(this.kehuTongjiTemp && this.kehuTongjiTemp.length > 0) {
          if(temp == 'false') {
            this.kehuTongji = this.kehuTongjiTemp.slice(0,2)
            this.kehuTongjiShowIsMore = false
          }else if(temp == 'true') {
            this.kehuTongji = this.kehuTongjiTemp
            this.kehuTongjiShowIsMore = true
          }
        }
      },
      immediate: true,
      deep: true
    },
  },
   methods: {
    handleShouKuanIsMore() {  //当日收款情况
      this.shoukuanIsMore = !this.shoukuanIsMore
    },
    handleCoalIsMore() {  //煤种发运情况
      this.coalShowIsMore = !this.coalShowIsMore
    },
    handlekehuTongjiShowIsMore() {  //煤种发运情况
      this.kehuTongjiShowIsMore = !this.kehuTongjiShowIsMore
    },
      watchRouter() {
         console.log('路由跳转');
      },
      init() {
         this.getUserInfo(); // 用户信息
         this.getProcessDataList(); // 申请列表
         this.todoList(); // 我的待办
         this.doneList(); // 我的已办
         this.xscarshippingdayplan(); // 日计划
      this.currentCoalPrice()  //煤种价格
      this.getSkList()  //当天收款记录
      this.getStatistics1()   //按煤种统计
      this.getStatistics2()   //按客户发运统计
      },
    //煤种价格
    currentCoalPrice() {
      this.$reqGet('currentCoalPrice').then(res => {
        console.log(res.data,'res.data')
        if (res.code == 0) {
           this.coalData = res.data || []
        }
      })
    },
    getSkList() {  //当天收款记录
      this.$reqGet('getSkList').then(res => {
        if (res.code == 0) {
          this.shoukuanJiluTemp = res.data || []
          if(this.shoukuanJiluTemp && this.shoukuanJiluTemp.length > 0) {
            this.shoukuanToatl = this.shoukuanJiluTemp[0]?.money || 0
            if(this.shoukuanJiluTemp.length > 1) {
              this.shoukuanJilu = this.shoukuanJiluTemp.slice(0,2)
              this.shoukuanIsMore = false
            }
          }
        }
      })
    },
    getStatistics1() {  //按煤种统计
      this.$reqGet('getStatistics1').then(res => {
        if (res.code == 0) {
          this.coalTongjiTemp = res.data || []
          if(this.coalTongjiTemp && this.coalTongjiTemp.length > 0){
            this.d2Sum = this.coalTongjiTemp[0]?.d2Sum || 0
            this.d1Sum = this.coalTongjiTemp[0]?.d1Sum || 0
            this.lyDSumSum = this.coalTongjiTemp[0]?.lyDSumSum || 0
            this.dsumSum = this.coalTongjiTemp[0]?.dsumSum || 0
            if(this.coalTongjiTemp.length > 1) {
              this.coalTongji = this.coalTongjiTemp.slice(0,2)
              this.coalShowIsMore = false
            }
          }
        }
      })
    },
    getStatistics2() {  //按客户发运统计
      this.$reqGet('getStatistics2').then(res => {
        if (res.code == 0) {
          this.kehuTongjiTemp = res.data || []
          if(this.kehuTongjiTemp && this.kehuTongjiTemp.length > 0){
            if(this.kehuTongjiTemp.length > 1) {
              this.kehuTongji = this.kehuTongjiTemp.slice(0,2)
              this.kehuTongjiShowIsMore = false
            }
          }
        }
      })
    },
    //代办详情
    daibanDetail(item) {
      if(item?.actBusiness?.actType == 'Offsetting') {  //收款 actType = ‘Offsetting’
        uni.navigateTo({
          url: `/pages/payment-form-data/payment-form-data?id=${item.tableId}`,
        })
      }else if(item?.actBusiness?.actType == 'XsWaybill') {
        uni.navigateTo({
          url: `/pages/new-application-form-data/new-application-form-data?id=${item.tableId}`
        })
      }
    },
    //代办详情
    shenqingDetail(item) {
      console.log(item,'item====待办===详情')
      if(item.actType == 'Offsetting') {  //收款 actType = ‘Offsetting’
        uni.navigateTo({
          url: `/pages/payment-form-data/payment-form-data?id=${item.tableId}`,
        })
      }else if(item.actType == 'XsWaybill') {
        uni.navigateTo({
          url: `/pages/new-application-form-data/new-application-form-data?id=${item.tableId}`
        })
      }
    },
      getUserInfo() {
         this.$reqGet('getUserInfo').then(res => {
        console.log(res,'res=====系统登录===')
            if (res.code == 0) {
               uni.setStorageSync('userInfo', res.data.sysUser);
          this.$store.commit('SET_PERMISSIONS',res.data.permissions)
               //uni.setStorageSync('permissions', res.data.permissions);
               this.userId = res.data.sysUser?.userId;
          this.compId = res.data.sysUser?.compId;
          console.log(this.compId,'this.compId---111')
               this.$nextTick(() => {
                  this.coalbunker();
               });
            }
         });
      },
      getServerData() {
         console.log('加载图表', this.uchartsData);
         //模拟从服务器获取数据时的延时
         setTimeout(() => {
            //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
            let res = {
               series: [
                  {
                     data: this.uchartsData
                  }
               ]
            };
            this.chartData = JSON.parse(JSON.stringify(res));
         }, 500);
      },
      // 煤仓当前剩余量
      coalbunker() {
         this.uchartsData = [];
         this.$reqGet('coalbunker', { customerId: this.userId }).then(res => {
            let newArr = res.data.records;
            newArr.forEach(item => {
               if (item.stock != null) {
                  let a = { name: '', value: '', labelText: '' };
                  a.name = item.bunkerName + '剩余量';
                  a.value = item.stock;
                  // a.labelText ='剩余量:' + item.stock;
                  this.uchartsData.push(a);
               }
            });
            this.getServerData(); // 加载图表
         });
      },
      xscarshippingdayplan(allList) {
         //已经设置的
         console.log(allList, 'allList==========');
         let params = {
            current: 1,
            size: 2,
            shippingDate: this.todayDate()
         };
         this.$reqGet('xscarshippingdayplan', params)
            .then(res => {
          console.log('发运日计划----------------------------------',res)
               if (res.code == 0) {
                  this.fyData = res.data.records;
                  uni.hideLoading();
               }
            })
            .catch(e => {
               uni.hideLoading();
            });
      },
      todayDate() {
         let yes = new Date().getTime();
         let date = new Date(yes);
         let y = date.getFullYear();
         let m = date.getMonth() + 1;
         m = m < 10 ? '0' + m : m;
         let d = date.getDate();
         d = d < 10 ? '0' + d : d;
         const time = y + '-' + m + '-' + d;
         console.log('todayDate---------', time);
         return time;
      },
      getProcessDataList() {
         this.$reqGet('getProcessDataList', this.myApplicationParams).then(res => {
            if (res.code === 0) {
               // console.log('申请', res);
               this.shenqingData = res.data.records;
            }
         });
      },
      todoList() {
         this.$reqGet('todoList', this.todoParams).then(res => {
            if (res.code === 0) {
               // console.log('待办', res);
               this.daibanData = res.data.content;
            }
         });
      },
      doneList() {
         uni.showLoading({
            title: '加载中...'
         });
         this.$reqGet('doneList', this.haveTodoParams).then(res => {
            uni.hideLoading();
            if (res.code === 0) {
               // console.log('已办', res);
               this.yibanData = res.data.content;
            }
         });
      },
      menushow(e) {
         this.menuShow = e;
      },
      // 撤回模态框
      withDrawClick(procInstId) {
         this.withDrawShow = true;
         this.withDrawData.procInstId = procInstId;
      },
      withDrawConfirm() {
         this.$reqPost('cancel', this.withDrawData).then(res => {
            this.withDrawShow = false;
            if (res.code == 0) {
               uni.showToast({
                  title: res.data,
                  duration: 2000
               });
            }
            // 刷新列表
            this.getProcessDataList();
            this.todoList();
            this.doneList();
         });
      },
      withDrawCancel() {
         this.withDrawShow = false;
      },
      // 通过
      adopClick(v) {
         console.log('通过点击', v);
         this.adoptModalShow = true;
         this.adoptForm.ids = v.id;
         this.modalType = 0;
         // let urlparam = v.procDefId+'/'+v.key;
         // this.$reqGet('getNextNode',{},urlparam).then(res=>{
         //    console.log('通过欲请求');
         // })
      },
      // 通过模态框
      adoptModalConfirm() {
         this.adoptModalShow = false;
         this.adoptForm.comment = this.adoptModalContent || '';
         this.$reqPost('passAll', this.adoptForm).then(res => {
            if (res.code == 0) {
               this.$u.toast('操作成功!');
            } else {
               this.$u.toast('通过失败!!');
            }
            this.todoList(); // 我的待办
            this.doneList();
         });
      },
      adoptModalCancel() {
         this.adoptModalShow = false;
      },
      // 驳回
      rejectClick(v) {
      console.log('驳回====',v)
         this.modalType = 1;
         this.rejectModalShow = true;
         this.rejectForm.procInstId = v.procInstId;
      this.rejectForm.id = v.id;
      this.rejectForm.procDefId = v.procDefId;
      this.rejectForm.priority = v.priority;
      this.rejectForm.type = 1;
      },
      // 驳回模态框
      rejectModalConfirm() {
         this.rejectModalShow = false;
         this.$reqPost('back', this.rejectForm).then(res => {
            if (res.code == 0) {
               this.$u.toast('操作成功!');
            } else {
               this.$u.toast('操作失败!!!');
            }
            this.todoList(); // 我的待办
            this.doneList();
         });
      },
      rejectModalCancel() {
         this.rejectModalShow = false;
      },
      // 删除申请
      deleteApplicationClick(id) {
         this.deleteApplicationModalShow = true;
         this.procInstId = id;
         console.log(id);
      },
      // 删除申请模态框
      deleteApplicationModalConfirm() {
         this.deleteApplicationModalShow = false;
         this.$reqPost('deleteHistoric', { ids: this.procInstId }, 'form').then(res => {
            if (res.code == 0) {
               this.$u.toast('操作成功!');
               this.yibanData = [];
               this.doneList(); // 我的已办
            } else {
               this.$u.toast('操作失败!!!');
            }
         });
      },
      deleteApplicationModalCancel() {
         this.deleteApplicationModalShow = false;
      },
      // 查看进度
      checkTheScheduleClick(v) {
         uni.navigateTo({
            url: `/pages/check-the-schedule/check-the-schedule?index=${v}`
         });
      },
      // 表单数据
      // theFormDataClick(item) {
    //   console.log(item,'申请还是-----item')
      //    // uni.navigateTo({
      //    //    url: `/pages/the-form-data/the-form-data?index=${v}`
      //    // });
    //
      // },
      // 删除撤回申请
      deleteWithDrawApplication(id) {
         this.deleteWithDrawApplicationGlobal(id)
            .then(res => {
               if (res.code == 0) {
                  // 刷新列表
                  this.getProcessDataList();
               }
            })
            .catch(err => {
               console.log('删除撤回申请异常');
            });
      },
      // 重新申请
      // apply(v) {
      //    if (!v.procDefId || v.procDefId == 'null') {
      //       this.$u.toast('流程定义为空');
      //       return;
      //    }
      //    this.form.id = v.id;
      //    this.form.procDefId = v.procDefId;
      //    this.form.title = v.title;
      //    // 加载审批人
      //    // this.userLoading = true;
      //    uni.showLoading({
      //       title: '审批人加载中'
      //    });
      //    // getFirstNode(v.procDefId).then((res) => {
      //    this.$reqGet('getFirstNode', {}, v.procDefId).then(res => {
      //       // this.userLoading = false;
      //       console.log('审批人', res);
      //       uni.hideLoading();
      //       if (res.data) {
      //          this.error = '';
      //          if (res.data.type == 3 || res.data.type == 4) {
      //             this.isGateway = true;
      //             this.form.firstGateway = true;
      //             this.showAssign = false;
      //             this.isCustom = false;
      //             return;
      //          }
      //          if (res.data.type == 5) {
      //             this.isCustom = true;
      //             this.isGateway = false;
      //             this.form.firstGateway = false;
      //             this.showAssign = false;
      //             return;
      //          }
      //          if (res.data.type == 1) {
      //             this.showAssign = true;
      //             this.isGateway = false;
      //             this.form.firstGateway = false;
      //             this.isCustom = false;
      //             if (res.data.users && res.data.users.length > 0) {
      //                this.assigneeList = res.data.users;
      //                // 默认勾选
      //                let ids = [];
      //                res.data.users.forEach(e => {
      //                   ids.push(e.userId);
      //                });
      //                this.form.assignees = ids;
      //                this.showAssign = true;
      //                // 获取表单内容,重新创建申请
      //                this.$reqPost('apply', this.form, 'form').then(res => {
      //                   console.log('重新提交申请', res);
      //                   if (res.code == 0) {
      //                      uni.showToast({
      //                         title: res.data,
      //                         icon: 'success',
      //                         duration: 2000
      //                      });
      //                   }
      //                   // 初始化申请列表
      //                   // this.myApplication.pageNumber = 1;
      //                   // this.shenqingData = [];
      //                   // this.getMoreNews();
      //                   this.getProcessDataList();
      //                });
      //             } else {
      //                this.form.assignees = [];
      //                this.showAssign = true;
      //                this.error = '请进入"流程管理"为审批节点分配候选审批人员';
      //             }
      //          }
      //       }
      //       console.log(this.form);
      //    });
      //    this.modalVisible = true;
      // },
      // 修改
      editMyApplication(v) {
         console.log('修改申请');
         uni.navigateTo({
            url: `/pages/edit-my-application/edit-my-application?index=${v.tableId}`
         });
      },
      // 审批历史
      approvalHistoryClick(v) {
         uni.navigateTo({
            url: `/pages/approval-history/approval-history?index=${v}`
         });
      },
      redirectLogin() {
         redirectLogin();
      },
      huanBang() {
         uni.navigateTo({
            url: '/pages/register/register'
         });
      }
   }
};
</script>
<style lang="scss" scoped>
::v-deep{
  .uni-table-td,.uni-table-th{
    color: #000;
  }
}
::v-deep.home {
   width: 100%;
   display: flex;
   flex-direction: column;
  .marginTop{
    margin-top: 16rpx;
  }
  .small{
    font-size: 20rpx;
    margin-left: 6rpx;
    font-weight: normal;
  }
   // 横向菜单栏
   .utils {
      .utils-container {
         display: flex;
         // justify-content: space-between;
         justify-content: center;
         width: 66%;
         margin: 0 auto;
         .utils-container-body {
            display: flex;
            align-items: center;
         }
      }
   }
   .home_swipe {
      width: 100%;
      .u-swiper {
         height: vww(160) !important;
         .u-swiper__wrapper {
            height: vww(160) !important;
            .u-swiper__wrapper__item {
               .u-swiper__wrapper__item__wrapper {
                  .u-swiper__wrapper__item__wrapper__image {
                     height: vww(160) !important;
                  }
               }
            }
         }
      }
   }
   // echarts图表
   .charts-box {
      width: 91%;
      height: vww(270);
      margin: 0 auto;
      .u-empty {
         height: 100%;
      }
   }
   .u-input {
      height: vww(16);
      width: vww(100);
   }
   //卡片
   .card-group {
      .card {
         &:nth-of-type(2) {
            .combination-card {
               margin-bottom: 0px !important;
            }
         }
      }
   }
   .bottomChild {
      margin-bottom: vww(20);
   }
   // 卡片中间
   .center-container {
      display: flex;
      flex-direction: column;
      .center-content__one {
         display: flex;
         view {
            width: 50%;
         }
      }
      .center-content__two {
         display: flex;
         // margin: vww(10) 0;
         view {
            width: 50%;
         }
      }
      .center-content__three {
         display: flex;
         view {
            width: 50%;
         }
      }
      .center-content__four {
      }
   }
   // 中间部分样式
   .center-margin {
      margin-bottom: vww(16);
   }
   // 卡片底部
   .bottom-container {
      .bottom-content__item {
         display: flex;
         justify-content: space-around;
         view {
            display: flex;
            justify-content: center;
            align-content: center;
            margin-right: vww(10);
            view {
               display: inline-block;
            }
            image {
               width: vww(16);
               height: vww(16);
               margin-right: vww(4);
            }
         }
      }
   }
   // 模态框
   .wodeshenqingMotai {
      // width:100%;
      // height:vww(244);
      .slot-content {
         .u-textarea {
            width: vww(280);
            height: vww(90) !important;
            .uni-textarea-wrapper {
               height: vww(90) !important;
            }
         }
      }
   }
   // 通过模态框
   .adoptModal {
      // width:100%;
      // height:vww(244);
      .slot-content {
         width: vww(330);
         .rejectMesaage {
            display: flex;
            padding: vww(3);
            border: 1px solid #0307ff;
            border-radius: vww(4);
            font-size: 13px;
            text {
               margin-left: vww(5);
            }
         }
         .u-textarea {
            margin-top: vww(10);
            width: vww(280);
            height: vww(90) !important;
            .u-textarea__field {
               height: vww(90) !important;
            }
         }
      }
   }
   // 驳回模态框
   .rejectModal {
      .slot-content {
         display: inline-block;
         .rejectMesaage {
            display: flex;
            padding: vww(3);
            border: 1px solid #0307ff;
            border-radius: vww(4);
            font-size: 13px;
            text {
               margin-left: vww(5);
            }
         }
         .u-textarea {
            margin-top: vww(10);
            width: vww(280);
            height: vww(90) !important;
            .u-textarea__field {
               height: vww(90) !important;
            }
         }
         .rejectBack {
            margin-top: vww(24);
            .rejectBack-title {
               font-size: vww(13);
            }
            // 下拉菜单
            .data-selet {
               border: 1px solid #d1d1d1;
               border-radius: 4px;
               width: vww(300);
               height: 40px;
               display: flex;
               align-items: center;
               font-size: 13px;
               color: #666;
               margin-top: vww(8);
               .uni-select__icon {
                  display: flex;
                  align-content: center;
                  margin: 0 10px;
                  image {
                     width: 10px;
                     height: 5.5px;
                  }
               }
               .content {
                  margin-left: vww(8);
                  width: vww(280);
               }
            }
         }
      }
   }
   //日发运计划
   .main-block-box {
      // box-shadow: 0px 0px 8px 0px rgba(216,218,238,0.80);
      height: vww(80);
      // padding: vww(10);
      box-sizing: border-box;
      margin-top: vww(12);
      border-radius: vww(8);
      &:first-child {
         margin-top: vww(5);
      }
      .jihua-main-line {
         width: 100%;
         display: flex;
         view {
            font-size: vww(14);
         }
         .name {
            font-weight: 600 !important;
         }
         .main-flex {
            width: 100%;
            display: flex;
            justify-content: space-between;
            view {
               font-size: vww(14);
               line-height: vww(32);
            }
            .carNum-box {
               display: flex;
               view {
                  font-size: vww(14);
                  line-height: vww(32);
               }
            }
         }
      }
   }
}
.huoshiju-box{
  width: 100%;
  display: flex;
  flex-direction: column;
  .price-group{
    width: 100%;
    display: flex;
    flex-direction: column;
    .price-title{
      width: 100%;
      display: flex;
      justify-content: space-between;
      font-size: 32rpx;
    }
    .price-box{
      width: 100%;
      padding: 0 20rpx 20rpx 20rpx;
      box-sizing: border-box;
      .price-box-inside{
        width: 100%;
        display: flex;
        flex-direction: column;
        padding: 30rpx;
        box-sizing: border-box;
        border-radius: 18rpx;
        box-shadow: 0 2rpx 20rpx #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5;
      }
      .price-line{
        width: 100%;
        display: flex;
        justify-content: space-between;
        height: 60rpx;
        line-height: 60rpx;
        .name{
          font-size: 26rpx;
          color: #606266;
        }
        .price{
          display: flex;
          align-items: baseline;
          .priceNum{
            font-size: 28rpx;
          }
          .priceUnit{
            font-size: 20rpx;
            margin-left: 10rpx;
          }
        }
      }
    }
  }
  .shoukuan-group{
    width: 100%;
    display: flex;
    flex-direction: column;
    .currentDay-box{
      width: 100%;
      position: relative;
      .total-box{
        position: absolute;
        right: 20rpx;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        align-items: baseline;
        .total1{
          font-size: 22rpx;
        }
        .total2{
          font-size: 32rpx;
          margin-top: 6rpx;
          color: #000;
          font-weight: 540;
          display: flex;
          align-items: baseline;
        }
      }
    }
    .shoukuan-box{
      width: 100%;
      padding: 0 20rpx 20rpx 20rpx;
      box-sizing: border-box;
      .coalFayun-total{
        width: 100%;
        display: flex;
        background: #4b6cfa;
        padding: 20rpx 10rpx;
        box-sizing: border-box;
        border-radius: 16rpx;
        margin-bottom: 20rpx;
        .total-block{
          width: 50%;
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
          .num{
            font-size: 32rpx;
            color: #fff;
            font-weight: 540;
            display: flex;
            align-items: baseline;
            height: 38rpx;
          }
          .name{
            font-size: 22rpx;
            color: #fff;
            margin-top: 10rpx;
          }
        }
      }
      .shoukuan-box-inside{
        width: 100%;
        display: flex;
        flex-direction: column;
        padding: 0 40rpx;
        box-sizing: border-box;
        border-radius: 18rpx;
        box-shadow: 0 2rpx 20rpx #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5;
        transition: all 0.3s;
        .shoukuan-main{
          width: 100%;
          display: flex;
          flex-direction: column;
          border-bottom: 1px solid #e5e5e5;
          padding: 20rpx 0;
          &:nth-last-child(2){
            border-bottom: none;
          }
        }
        .shoukuan-line{
          width: 100%;
          display: flex;
          align-items: baseline;
          height: 60rpx;
          line-height: 60rpx;
          .name{
            font-size: 24rpx;
            color: #606266;
          }
          .text1{
            font-size: 30rpx;
          }
          .num{
            font-size: 32rpx;
            margin-top: 6rpx;
            color: #000;
            font-weight: 540;
            display: flex;
            align-items: baseline;
          }
        }
        .kehu-block{
          width: 33%;
          .text1{
            flex: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }
          &:nth-child(2){
            width: 67%;
          }
        }
        .shoukuanFirst-line{
          font-weight: bolder;
        }
      }
      .coalTongji-box{
        width: 100%;
        display: flex;
        align-items: center;
        .caol-block{
          width: 33.3%;
          display: flex;
          flex-direction: column;
          .name{
            font-size: 22rpx;
            color: #606266;
          }
          .num{
            font-size: 32rpx;
            margin-top: 6rpx;
            color: #000;
            font-weight: 540;
            display: flex;
            align-items: baseline;
          }
        }
      }
    }
    .shouqiIcon{
      width: 100%;
      display: flex;
      justify-content: center;
      transition: all 0.3s;
      image{
        width: 50rpx;
        height: 34rpx;
        margin: 10rpx 0;
      }
    }
  }
}
</style>