Mr.Shi
2023-09-04 682182cf67a5aa9fed34335fea22d4673f30f10c
minipro_standard/pages/index/index.vue
@@ -2,6 +2,7 @@
   <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}} -->
      <u-sticky>
         <view class="plr50 pb30 nav-style">
            <view
@@ -13,9 +14,9 @@
               <image src="../../static/filter@2x.png" class="img48 ml20" @click="filterAction" mode=""></image>
            </view>
            <view class="cY mt30">
               <view class="sbtn rd8" :class="searchForm.type==0?'sbtn_green':'sbtn_black_rim'"
               <view class="sbtn rd8" :class="searchForm.status==0?'sbtn_green':'sbtn_black_rim'"
                  @click="selectType(0)">待办</view>
               <view class="sbtn rd8 ml20" :class="searchForm.type==1?'sbtn_green':'sbtn_black_rim'"
               <view class="sbtn rd8 ml20" :class="searchForm.status==1?'sbtn_green':'sbtn_black_rim'"
                  @click="selectType(1)">已办</view>
            </view>
         </view>
@@ -42,7 +43,24 @@
            </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="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'"
                        @click="type=item.id">{{ item.name }}</view>
                  </u-grid-item>
               </u-grid>
            </view>
            <view class="flex ap tc bottom-view">
               <view class="fx1 ptb20 sbtn_gray c9" @click="resetType">重置</view>
               <view class="fx1 ml20 ptb20 sbtn_green" @click="confirm">确定</view>
            </view>
         </view>
      </u-popup>
      <myTabbar :index="0" />
   </view>
</template>
@@ -61,15 +79,69 @@
            code: '',
            windowHeight: '',
            show: false,
            types: [{
                  id: 0,
                  name: '车间领料-待发货'
               },
               {
                  id: 1,
                  name: '车间领料-待入库'
               },
               {
                  id: 2,
                  name: '机台备料-待发货'
               },
               {
                  id: 3,
                  name: '机台备料-待入库'
               },
               {
                  id: 4,
                  name: '完工入库-待接收'
               },
               {
                  id: 5,
                  name: '库存转库-待发货'
               },
               {
                  id: 6,
                  name: '库存转库-待入库'
               },
               {
                  id: 7,
                  name: '申请审批'
               },
               {
                  id: 8,
                  name: '客退/返品回厂检验'
               }
            ],
            type: '',
            searchForm: {
               name: '',
               type: 0
               status: 0,
               type: ''
            },
            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'},
            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'
               },
            ]
         }
      },
@@ -89,24 +161,128 @@
            success: function(loginRes) {
               // console.log(loginRes);
               that.code = loginRes.code
               that.show = true
            }
         });
      },
      methods: {
         onMessage(e) {
            console.log('12345654321')
         },
         scrolltolower() {},
         scrolltoupper() {},
         selectType(type) {
            if (this.searchForm.type == type) return
            this.searchForm.type = type
         selectType(status) {
            if (this.searchForm.status == status) return
            this.searchForm.status = status
            this.scrolltoupper()
         },
         selectProject(item) {},
         filterAction() {
         jump(item) {
            if ((item.type === 0 || item.type === 2 || item.type === 5) && item.status === 0) { // 跳转出库(转库单)
               router.push({
                  name: 'issueOperation',
                  query: {
                     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
                  }
               })
               // router.push({ name: 'wTransferDetail', query: { id: item.objId, status: 0, type: item.type, dbid: item.id } })
            } else if ((item.type === 1 || item.type === 4 || item.type === 6) && item.status === 0) { // 跳转入库(转库单)
               if (item.type === 4) { // 跳转完工入库详情
                  router.push({
                     name: 'completionDetails',
                     query: {
                        id: item.objId,
                        dbid: item.id,
                        type: 7,
                        isShow: 1,
                        Type: item.type
                     }
                  })
                  return
               }
               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({
                     name: 'completionDetails',
                     query: {
                        id: item.objId,
                        dbid: item.id,
                        type: 7,
                        isShow: 2
                     }
                  })
                  return
               }
               router.push({
                  name: 'wTransferDetail',
                  query: {
                     id: item.objId
                  }
               })
            } else if (item.type === 3 && item.status === 0) { // 确认备料
               router.push({
                  name: 'orderStock',
                  query: {
                     id: item.objId,
                     dbid: item.id
                  }
               })
            } else if (item.type === 3 && item.status === 1) { // 备料(转库单详情)
               // router.push({ name: 'wInboundDetail', query: { id: item.objId } })
               router.push({
                  name: 'wTransferDetail',
                  query: {
                     id: item.objId
                  }
               })
            } else if (item.type === 9 && item.status === 0) { // 调整入库(入库单)
               router.push({
                  name: 'warehousing',
                  query: {
                     id: item.objId,
                     dbid: item.id,
                     type: 9
                  }
               })
            } else if (item.type === 9 && item.status === 1) {
               router.push({
                  name: 'wInboundDetail',
                  query: {
                     id: item.objId
                  }
               })
            }
         },
         filterAction() {
            this.show = true
         },
         close() {
            this.show = false
         },
         resetType() {
            this.type = ''
            this.searchForm.type = ''
            this.confirm()
         },
         confirm() {
            this.searchForm.type = this.type
            this.show = false
            this.scrolltoupper()
         }
      }
   }
@@ -172,10 +348,10 @@
               align-items: center;
               justify-content: space-between;
               span {
               span {
                  &:first-child {
                     font-size: 30rpx;
                     font-weight: 500;
                     font-weight: 500;
                     max-width: 450rpx;
                     color: #222222;
                     overflow: hidden;
@@ -184,7 +360,7 @@
                     -o-text-overflow: ellipsis;
                  }
                  &:last-child {
                  &:last-child {
                     flex-shrink: 0;
                     font-size: 24rpx;
                     font-weight: 400;
@@ -208,4 +384,23 @@
         }
      }
   }
   .contanir {
      height: calc(env(safe-area-inset-bottom) + 720rpx);
      .content {
         margin-top: 20rpx;
         .type-style {
            width: 325rpx;
            margin-bottom: 20rpx;
         }
      }
   }
   .bottom-view {
      left: 40rpx;
      right: 40rpx;
      bottom: 0
   }
</style>