Mr.Shi
2023-09-05 3878c57a2bd710295931303ea85439a596838dfd
minipro_standard/pages/plannedProgress/plannedProgress.vue
@@ -34,7 +34,14 @@
      </view>
      <view class="content_total" :style="{top: top}">共{{listData.total}}条数据</view>
      <view class="content_list">
         <scroll-view @scrolltolower="getLists" scroll-y :style="{height: height}">
         <scroll-view
         :refresher-enabled="true"
         :refresher-triggered="isLoading"
         @refresherrefresh="onRefresh"
         refresher-background="#fff"
         @scrolltolower="getLists"
         scroll-y
         :style="{height: height}">
            <view class="content_list_item" v-for="item in lists" :key="item.id" @click="jump(item)">
               <view class="content_list_item_top">
                  <view class="content_list_item_top_left">
@@ -102,6 +109,9 @@
<script>
   import Search from '@/components/Search.vue'
   import LabelSelection from '@/components/LabelSelection.vue'
   import { getList, pageCount } from '@/util/api/PlanningAPI'
   import { getWorkingProcedure, getOrganization } from '@/util/api'
   import { gsdate } from '@/util/utils.js'
   export default {
      components: { Search, LabelSelection },
      data() {
@@ -117,7 +127,7 @@
               procedureIds: [],
               departIds: '',
               mixParam: '',
               cateIds: []
               cateIds: null
            },
            tagList: [
               {
@@ -142,118 +152,13 @@
               }
            ],
            data: [],   // 工序数据
            factoryList: [],
            factoryList: [],   // 工厂
            finished: true,
            loading: false,
            refreshing: false,
            timeShow: false,
            lists: [
               {
                  id: 1,
                  status: 0,
                  urgent: 1,
                  num: 100,
                  batch: '11111',
                  planDate: '2023-08-29',
                  mmodel: {
                     name: '工序计划',
                     code: 'fbdseasafghb'
                  },
                  usermodel: {
                     realname: '计划人员'
                  },
                  pmodel: {
                     name: '工序计划'
                  },
                  fmodel: {
                     name: '工厂'
                  }
               },
               {
                  id: 2,
                  status: 0,
                  urgent: 1,
                  num: 100,
                  batch: '11111',
                  planDate: '2023-08-29',
                  mmodel: {
                     name: '工序计划',
                     code: 'fbdseasafghb'
                  },
                  usermodel: {
                     realname: '计划人员'
                  },
                  pmodel: {
                     name: '工序计划'
                  },
                  fmodel: {
                     name: '工厂'
                  }
               },
               {
                  id: 3,
                  status: 0,
                  urgent: 1,
                  num: 100,
                  batch: '11111',
                  planDate: '2023-08-29',
                  mmodel: {
                     name: '工序计划',
                     code: 'fbdseasafghb'
                  },
                  usermodel: {
                     realname: '计划人员'
                  },
                  pmodel: {
                     name: '工序计划'
                  },
                  fmodel: {
                     name: '工厂'
                  }
               },
               {
                  id: 4,
                  status: 0,
                  urgent: 1,
                  num: 100,
                  batch: '11111',
                  planDate: '2023-08-29',
                  mmodel: {
                     name: '工序计划',
                     code: 'fbdseasafghb'
                  },
                  usermodel: {
                     realname: '计划人员'
                  },
                  pmodel: {
                     name: '工序计划'
                  },
                  fmodel: {
                     name: '工厂'
                  }
               },
               {
                  id: 5,
                  status: 0,
                  urgent: 1,
                  num: 100,
                  batch: '11111',
                  planDate: '2023-08-29',
                  mmodel: {
                     name: '工序计划',
                     code: 'fbdseasafghb'
                  },
                  usermodel: {
                     realname: '计划人员'
                  },
                  pmodel: {
                     name: '工序计划'
                  },
                  fmodel: {
                     name: '工厂'
                  }
               }
            ]
            lists: [],
            isLoading: false
         };
      },
      onReady() {
@@ -265,7 +170,15 @@
            }).exec()
         })
      },
      onLoad() {
         this.getLists()
         this.getOrganizations()
      },
      methods: {
         // 切换工序
         changeTag(i) {
            this.data[i].isActive = !this.data[i].isActive
         },
         // 跳转
         jump(item) {
            uni.navigateTo({
@@ -275,6 +188,14 @@
         // 获取头部组件高度
         getHeight(height) {
            this.height = height
         },
         // 下拉刷新
         async onRefresh() {
            if (this.isLoading) return;
            this.isLoading = true;
            await this.getLists()
            await this.pageCounts()
            this.isLoading = false;
         },
         // 重置
         reset() {
@@ -291,8 +212,8 @@
            if (this.data.length > 0) {
               this.data.forEach(item => { item.isActive = false })
            }
            // this.getLists()
            // this.pageCounts()
            this.getLists()
            this.pageCounts()
         },
         // 日期确定
         timeConfirm(val) {
@@ -330,7 +251,7 @@
            this.listData.page = 0
            this.finished = false
            this.lists = []
            // this.getLists()
            this.getLists()
         },
         // 获取列表统计
         pageCounts() {
@@ -395,15 +316,14 @@
            this.listData.page = 0
            this.finished = false
            this.lists = []
            // this.getLists()
            // this.pageCounts()
            this.getLists()
            this.pageCounts()
         },
         // 获取计划列表数据
         getLists() {
            console.log('getLists')
            if (!this.finished) {
               this.loading = true
               this.listData.page = this.listData.page++
               this.listData.page = this.listData.page += 1
               getList({
                  capacity: this.listData.capacity,
                  model: {
@@ -412,7 +332,7 @@
                     endDate: this.listData.endDate,
                     procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
                     factoryId: this.listData.departIds,
                     statusList: this.listData.cateIds
                     statusList: this.listData.cateIds ? this.listData.cateIds.split(',') : []
                  },
                  page: this.listData.page,
                  sorts: [