jiangping
2023-10-16 d7fe8ae3888c8e2b1eea3c1e3769be0d42a21cc9
minipro_standard/pages/index/index.vue
@@ -2,19 +2,44 @@
   <view class="index">
      <!-- <web-view v-if="show" @onPostMessage="onMessage" :src="'https://dmtest.ahapp.net/doumeeplant_h5/#/appletLogin?code=' + code"></web-view> -->
      <!-- {{$store.state.statusbarHeight}} -->
<<<<<<< HEAD
      <div class="content_search">
         <v-Search @searchInput="searchForm.mixParam" @submit="search" @reset="reset" :isShow="true"
            placeholder="搜索关键字">
            <template v-slot:content>
               <div class="Search_item">
                  <div class="Search_item_label">计划日期</div>
                  <div class="Search_item_content" @click="isOpenDate = true">
                     <div class="Search_item_content_a" :style="searchForm.startDate ? 'color: #000;' : ''">
                        {{ searchForm.startDate ? searchForm.startDate : '开始日期'}}
                     </div>
                     <span>-</span>
                     <div class="Search_item_content_a" :style="searchForm.endDate ? 'color: #000;' : ''">
                        {{ searchForm.endDate ? searchForm.endDate : '结束日期'}}
                     </div>
                  </div>
               </div>
            </template>
         </v-Search>
         <div class="content_search_x"></div>
         <v-LableSelection :TagList="tagList" :isShow="true" @change="clickTag"></v-LableSelection>
      </div>
=======
>>>>>>> 89d77a7cd7285feda993bffec2513892f8bd355f
      <u-sticky>
         <view class="plr50 pb30 nav-style">
         <view class="plr30 pb30 nav-style">
            <view
               :style="{paddingTop: `${statusbarHeight}px`, height: `${navHeight}px`, lineHeight:`${navHeight}px`, textAlign: 'center'}">
               :style="{background: '#fff', zIndex: '999', paddingTop: `${statusbarHeight}px`, height: `${navHeight}px`, lineHeight:`${navHeight}px`, textAlign: 'center'}">
               待办</view>
            <view class="cY">
               <u-search placeholder="搜索关键字" bgColor="#f7f7f7" :showAction="false" @search="scrolltoupper"
               <u-search placeholder="搜索关键字" bgColor="#f7f7f7" :showAction="false" @search="search"
                  shape="square" v-model="searchForm.mixParam"></u-search>
               <image src="../../static/filter@2x.png" class="img48 ml20" @click="filterAction" mode=""></image>
            </view>
            <view class="cY mt30">
               <view v-for="item in tagList" :key="item.id" class="sbtn rd8 mr10"
<<<<<<< HEAD
            <view class="cY mt30 bg_w">
               <view v-for="item in tagList" :key="item.id" class="tag_item mr10"
                  :class="searchForm.status==item.id?'sbtn_green':'sbtn_black_rim'" @click="selectType(item.id)">
                  {{`${item.name}(${item.num})`}}
               </view>
@@ -25,6 +50,20 @@
         @refresherrefresh="refresh"
      >
         <view v-for="(item, index) in projectList" :key="index">
=======
            <view class="cY mt30">
               <view class="sbtn rd8" :class="searchForm.status==0?'sbtn_green':'sbtn_black_rim'"
                  @click="selectType(0)">待办</view>
               <view class="sbtn rd8 ml20" :class="searchForm.status==1?'sbtn_green':'sbtn_black_rim'"
                  @click="selectType(1)">已办</view>
            </view>
         </view>
      </u-sticky>
      <u-list :showScrollbar="false" @scrolltolower="scrolltolower" @scrolltoupper="scrolltoupper"
         :height="windowHeight - (statusbarHeight + navHeight + 120) + 'px'">
         <u-list-item v-for="(item, index) in projectList" :key="index">
>>>>>>> 89d77a7cd7285feda993bffec2513892f8bd355f
            <view class="box_list">
               <view class="box_list_item" @click="jump(item)">
                  <view class="box_list_item_icon">
@@ -41,6 +80,7 @@
                  </view>
               </view>
            </view>
<<<<<<< HEAD
         </view>
      </scroll-view>
      <view v-else class="tc c6">暂无数据...</view>
@@ -50,7 +90,7 @@
            <view class="content">
               <u-grid col="2" :border="false">
                  <u-grid-item v-for="item in types" :key="item.id">
                     <view class="ptb20 c9 type-style tc rd10" :class="type===item.id?'sbtn_green':'sbtn_gray'"
                     <view class="ptb20 f26 c9 type-style tc rd10" :class="type===item.id?'sbtn_green':'sbtn_gray'"
                        @click="type=item.id">{{ item.name }}</view>
                  </u-grid-item>
               </u-grid>
@@ -59,6 +99,17 @@
               <view class="fx1 ptb20 sbtn_gray c9" @click="resetType">重置</view>
               <view class="fx1 ml20 ptb20 sbtn_green" @click="confirm">确定</view>
            </view>
=======
         </u-list-item>
      </u-list>
      <u-popup :show="show" @close="close" :round="8" zIndex="20000">
         <view class="rp p40 contanir">
            <view class="c2 b">类型</view>
            <view class="flex ap tc bottom-view">
               <view class="fx1 ptb20 sbtn_gray c9">重置</view>
               <view class="fx1 ml20 ptb20 sbtn_green">确定</view>
            </view>
>>>>>>> 89d77a7cd7285feda993bffec2513892f8bd355f
         </view>
      </u-popup>
      <myTabbar :index="0" />
@@ -120,6 +171,7 @@
                  name: '客退/返品回厂检验'
               }
            ],
<<<<<<< HEAD
            tagList: [{
                  id: 0,
                  name: '待办',
@@ -145,6 +197,33 @@
            triggered: false,
            finished: false,
            projectList: []
=======
            searchForm: {
               name: '',
               status: 0
            },
            projectList: [{
                  title: '212132',
                  createTime: '2023-08-28',
                  content: 'asdsadsax手打大萨达的啊实打as'
               },
               {
                  title: '212132',
                  createTime: '2023-08-28',
                  content: 'asdsadsax手打大萨达的啊实打as'
               },
               {
                  title: '212132',
                  createTime: '2023-08-28',
                  content: 'asdsadsax手打大萨达的啊实打as'
               },
               {
                  title: '212132',
                  createTime: '2023-08-28',
                  content: 'asdsadsax手打大萨达的啊实打as'
               },
            ]
>>>>>>> 89d77a7cd7285feda993bffec2513892f8bd355f
         }
      },
      computed: {
@@ -159,7 +238,6 @@
         uni.getSystemInfo({
            success: res => {
               this.windowHeight = res.windowHeight
            }
         })
         this.loadData()
@@ -186,6 +264,7 @@
                  this.triggered = false
               })
         },
<<<<<<< HEAD
         refresh() {
            if (this.triggered) return
            this.triggered = true;
@@ -198,26 +277,69 @@
         },
         selectType(status) {
            if (this.searchForm.status == status) return
            this.searchForm.status = status
            this.scrolltolower()
            this.searchForm.status = status
            this.search()
         },
         jump(item) {
            console.log(item);
            if ((item.type === 0 || item.type === 2 || item.type === 5) && item.status === 0) { // 跳转出库(转库单)
            console.log('出库');
               uni.navigateTo({
                  url: `/pages/OutOperation/OutOperation?id=${item.objId}&dbid=${item.id}&type=7`
               })
            } else if ((item.type === 0 || item.type === 2 || item.type === 5) && item.status === 1) {
               // router.push({
               //    name: 'wTransferDetail',
               //    query: {
               //       id: item.objId,
               //       status: item.status,
               //       type: item.type,
               //       dbid: item.id
               //    }
               // })
            switch(item.type) {
               case 0: case 2: case 5: {
                  if (item.status === 0) {
                     uni.navigateTo({
                        url: `/pages/OutOperation/OutOperation?id=${item.objId}&dbid=${item.id}&type=7`
                     })
                  } else {
                     uni.navigateTo({
                        url: `/pages_adjust/pages/warehousingDetails/warehousingDetails?id=${item.objId}&status=${item.status}&type=${item.type}&dbid=${item.id}`
                     })
                  }
                  break
               }
               case 3: {
                  if (item.status==0) {
                  } else{
                     uni.navigateTo({
                        url: `/pages_adjust/pages/warehousingDetails/warehousingDetails?id=${item.objId}`
                     })
                  }
                  break
               }
               case 4: {
                  break
               }
               case 1: case 6: {
                  if (item.status === 0) {
                     uni.navigateTo({
                        url: `/pages/InOperation/InOperation?id=${item.objId}&dbid=${item.id}&type=7`
                     })
                  } else {
                     uni.navigateTo({
                        url: `/pages_adjust/pages/warehousingDetails/warehousingDetails?id=${item.objId}`
                     })
                  }
                  break
               }
               case 9: {
                  if (item.status === 0) {
                     uni.navigateTo({
                        url: `/pages/InOperation/InOperation?id=${item.objId}&dbid=${item.id}&type=9`
                     })
                  } else{
                     uni.navigateTo({
                        url: `/pages_adjust/pages_adjust/pages/warehousingDetails1/warehousingDetails1?id=${item.objId}`
                     })
                  }
               }
               default: {
               }
            }
            /**
             *
             * if ((item.type === 0 || item.type === 2 || item.type === 5) && item.status === 0) { // 跳转出库(转库单)
            } else if ((item.type === 0 || item.type === 2 || item.type === 5) && item.status === 1) {
            } else if ((item.type === 1 || item.type === 4 || item.type === 6) && item.status === 0) { // 跳转入库(转库单)
               if (item.type === 4) { // 跳转完工入库详情
                  // router.push({
@@ -235,14 +357,7 @@
               uni.navigateTo({
                  url: `/pages/InOperation/InOperation?id=${item.objId}&dbid=${item.id}&type=7`
               })
               // router.push({
               //    name: 'warehousing',
               //    query: {
               //       id: item.objId,
               //       dbid: item.id,
               //       type: 7
               //    }
               // })
            } else if ((item.type === 1 || item.type === 4 || item.type === 6) && item.status === 1) {
               if (item.type === 4) { // 跳蛛完工入库详情
                  // router.push({
@@ -255,7 +370,10 @@
                  //    }
                  // })
                  return
               }
               }
               uni.navigateTo({
                  url: `/pages/warehousingDetails/warehousingDetails?id=${item.objId}`
               })
               // router.push({
               //    name: 'wTransferDetail',
               //    query: {
@@ -271,14 +389,19 @@
               //    }
               // })
            } else if (item.type === 3 && item.status === 1) { // 备料(转库单详情)
               // router.push({ name: 'wInboundDetail', query: { id: item.objId } })
               uni.navigateTo({
                  url: `/pages/warehousingDetails/warehousingDetails?id=${item.objId}`
               })
               // router.push({
               //    name: 'wTransferDetail',
               //    query: {
               //       id: item.objId
               //    }
               // })
            } else if (item.type === 9 && item.status === 0) { // 调整入库(入库单)
            } else if (item.type === 9 && item.status === 0) { // 调整入库(入库单)
               uni.navigateTo({
                  url: `/pages/InOperation/InOperation?id=${item.objId}&dbid=${item.id}&type=9`
               })
               // router.push({
               //    name: 'warehousing',
               //    query: {
@@ -287,14 +410,22 @@
               //       type: 9
               //    }
               // })
            } else if (item.type === 9 && item.status === 1) {
            } else if (item.type === 9 && item.status === 1) {
               uni.navigateTo({
                  url: `/pages_adjust/pages/warehousingDetails1/warehousingDetails1?id=${item.objId}`
               })
               // router.push({
               //    name: 'wInboundDetail',
               //    query: {
               //       id: item.objId
               //    }
               // })
            }
            }
             *
             *
             * */
         },
         filterAction() {
            this.show = true
@@ -309,8 +440,27 @@
         },
         confirm() {
            this.searchForm.type = this.type
            this.show = false
            this.show = false
            this.search()
         },
         search() {
            this.page.page = 1
            this.loadData()
=======
         scrolltolower() {},
         scrolltoupper() {},
         selectType(status) {
            if (this.searchForm.status == status) return
            this.searchForm.status = status
            this.scrolltoupper()
         },
         selectProject(item) {},
         filterAction() {
            this.show = true
         },
         close() {
            this.show = false
>>>>>>> 89d77a7cd7285feda993bffec2513892f8bd355f
         }
      }
   }
@@ -411,6 +561,14 @@
            }
         }
      }
   }
   .contanir {
      min-height: calc(env(safe-area-inset-bottom) + 120rpx);
   }
   .bottom-view {
      left: 40rpx;
      right: 40rpx;
      bottom: env(safe-area-inset-bottom);
   }
   .contanir {
@@ -429,6 +587,19 @@
   .bottom-view {
      left: 40rpx;
      right: 40rpx;
      bottom: 0
      bottom: 40rpx
   }
   .tag_item {
      min-width: 120rpx;
      // padding: 0 24rpx;
      border-radius: 26rpx;
      text-align: center;
      flex-shrink: 0;
      margin-right: 20rpx;
      border: 1rpx solid #CCCCCC;
      font-size: 26rpx;
      font-weight: 400;
      height: 52rpx;
      line-height: 52rpx;
   }
</style>