ll
liukangdong
2025-01-24 e597d2905326e907f4ff5ad3665b882239b6fb11
h5/pages/inventory/index.vue
@@ -8,6 +8,7 @@
         </view>
      </view>
      <!--  -->
      <scroll-view scroll-y="true" class="scroll_Y" @scrolltolower="scrolltolower">
      <view class="list">
         <view class="item" @click="itemClick(item)" v-for="item in list">
            <image v-if="item.status == 0 || item.status == 1" class="img" src="@/static/side/ic_pandian@2x.png" mode="">
@@ -25,11 +26,12 @@
               <view class="line">盘点仓库:{{item.warehouseName}}</view>
               <view class="line">
                  <view class="">盘点人员:{{item.userName}}</view>
                  <view class="btn" v-if="item.status == 0" @click="startHandle(item)">开始盘点</view>
                     <view class="btn" v-if="item.status == 0 && item.timeFlag" @click="startHandle(item)">开始盘点</view>
               </view>
            </view>
         </view>
      </view>
      </scroll-view>
   </view>
</template>
@@ -38,6 +40,7 @@
      getYwStocktaking,
      ywStocktakingBegin
   } from '@/api'
   import dayjs from 'dayjs';
   export default {
      data() {
         return {
@@ -64,11 +67,15 @@
               }
            }).then(res => {
               this.list = [...this.list, ...res.data.records]
               let date = dayjs().format('YYYY-MM-DD')
               this.list.forEach(item => {
                  item.timeFlag = new Date(item.planDate).getTime() <= new Date(date+' 23:59:59').getTime()
               })
               this.total = res.data.total
            })
         },
         itemClick(item) {
            if(item.status == 1){
            if (item.status != 0) {
               uni.navigateTo({
                  url: '/pages/inventory/detail?id=' + item.id
               })
@@ -112,15 +119,14 @@
<style lang="scss">
   .main_app {
      padding: 10rpx 30rpx 0;
      padding: 0rpx 30rpx 0;
      font-size: 28rpx;
   }
   .head_wrap {
      display: flex;
      align-items: center;
      margin-bottom: 40rpx;
      height: 110rpx;
      .search_wrap {
         display: flex;
         align-items: center;
@@ -141,15 +147,16 @@
      }
   }
   .scroll_Y{
      height: calc(100vh - 126rpx);
   }
   .list {
      height: calc(100vh - 136rpx);
      .item {
         display: flex;
         border-bottom: 1rpx solid #E5E5E5;
         padding-bottom: 28rpx;
         margin-bottom: 20rpx;
         .img {
            width: 80rpx;
            height: 80rpx;
@@ -163,7 +170,7 @@
            .head {
               display: flex;
               align-items: center;
               // align-items: center;
               justify-content: space-between;
               margin-bottom: 12rpx;
@@ -171,10 +178,13 @@
                  font-weight: 600;
                  font-size: 34rpx;
                  color: #222222;
                  flex: 1;
               }
               .status {
                  color: $primaryColor;
                  width: 96rpx;
                  padding-top: 3rpx;
               }
               .green {