819527061@qq.com
2023-11-28 1c7b86f984498eab66968c8d9e9ece42634b96bb
pages/new-application/new-application.vue
@@ -2,27 +2,49 @@
   <!-- 新增申请 -->
   <view class="new-application">
      <!-- 搜索区域 -->
      <view class="searchBox">
      <!-- <view class="searchBox">
         <view class="search">
            <u-search @clickIcon="searchIconClick" :clearabled="false" :showAction="false" placeholder="请输入标题" v-model="searchData" shape="square"></u-search>
         </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> -->
      <combined-title title="申请模板"></combined-title>
      <!-- 卡片区域 -->
      <view class="newApplicationCard" @click="toNewApplicationDetails" v-for="(item,index) in newApplicationData" :key="index">
         <view class="card" >
    <template v-if="permissions.yunxiao_xswaybill_add">
      <view
          class="newApplicationCard"
          @click="toNewApplicationDetails"
          v-for="(item, index) in newApplicationData" :key="index">
        <view class="card">
          <view class="card-left">
            <view class="card-left_top">
              <text>{{ item.description }}</text>
            </view>
            <view class="card-left_bottom">
              <text>版本:v{{ item.version }}</text>
              <text>所属分类:{{ item.categoryTitle|| '' }}</text>
            </view>
          </view>
          <view class="card-right">
            <view class="icon"><image src="@/static/groupAppTotalImg/back_1.png" mode=""></image></view>
          </view>
        </view>
      </view>
    </template>
      <view
        v-if="permissions.yunxiao_gatheringbill_add"
        class="newApplicationCard shoukuanDetailCard"
        @click="ToPaymentForm">
         <view class="card">
            <view class="card-left">
               <view class="card-left_top"><text>{{item.description}}</text></view>
               <view class="card-left_bottom">
                  <text>版本:v{{item.version}}</text>
                  <text>所属分类:{{item.categoryTitle}}</text>
                  <text>添加收款明细</text>
               </view>
            </view>
            <view class="card-right">
@@ -30,10 +52,11 @@
            </view>
         </view>
      </view>
      <!-- 选择器 -->
      <u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker>
      <!-- 菜单栏 -->
      <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu>
   </view>
@@ -41,7 +64,13 @@
<script>
import popupMenu from '@/components/common/popup-menu/popup-menu.vue';
import combinedTitle from '@/components/common/combined-title/combined-title.vue';
import {mapGetters} from 'vuex'
export default {
   name: 'new-application',
  computed:{
    ...mapGetters(['permissions']),
  },
   data() {
      return {
         searchData: '',
@@ -49,47 +78,56 @@
         // 选择器
         statusSeletShow: false,
         statusList: [['中国', '美国', '日本']],
         menuShow:false,
         updateData:{
            showLatest:true,
            filter:true,
            status:1,
            pageNumber:1,
            pageSize:10,
            sort:"createTime",
            order:"desc"
         menuShow: false,
         updateData: {
            showLatest: true,
            filter: true,
            status: 1,
            pageNumber: 1,
            pageSize: 10,
            sort: 'createTime',
            order: 'desc'
         },
         newApplicationData:[]
         newApplicationData: []
      };
   },
   onShow(){
      if(this.menuShow == true){
         this.$refs.menuRef.menuClick()
   onShow() {
      if (this.menuShow == true) {
         this.$refs.menuRef.menuClick();
      }
      this.init();
   },
   getCurrentPages(e){
      console.log(e);
   getCurrentPages(e) {
   },
   // 点击导航栏菜单后
   onNavigationBarButtonTap(e) {
      // console.log(e);
      this.$refs.menuRef.menuClick()
      this.$refs.menuRef.menuClick();
   },
   components:{
      popupMenu
   components: {
      popupMenu,
      combinedTitle
   },
   methods: {
      init(){
         this.$reqGet('getNewProcessDataList',this.updateData).then(res=>{
            if(res.code === 0){
               this.newApplicationData = res.data.records
               console.log("新增",res);
            }
      init() {
         this.newApplicationData = [];
         uni.showLoading({
            title:'加载中...'
         })
         this.$reqGet('getNewProcessDataList', this.updateData).then(res => {
            uni.hideLoading();
            if (res.code === 0) {
               res.data.records.forEach(item => {
                  if (item.name == '发运通知单'||item.description == '发运通知单') {
                     this.newApplicationData.push(item);
                  }
               });
               console.log('新增', res);
            }
         });
      },
      menushow(e){
         this.menuShow = e
      menushow(e) {
         this.menuShow = e;
      },
      // 搜索
      searchIconClick() {
@@ -100,6 +138,12 @@
         uni.navigateTo({
            url: '/pages/new-application-form-data/new-application-form-data'
         });
      },
      //新增收款明细
      ToPaymentForm() {
         uni.navigateTo({
            url:'/pages/payment-form-data/payment-form-data'
         })
      }
   }
};
@@ -196,5 +240,17 @@
         }
      }
   }
   .shoukuanDetailCard{
      .card{
         height: auto;
         .card-left_bottom {
            font-size: vww(13);
            margin: vww(12) 0;
            text {
               margin-right: vww(16);
            }
         }
      }
   }
}
</style>