| | |
| | | </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"> |
| | |
| | | <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() { |
| | |
| | | procedureIds: [], |
| | | departIds: '', |
| | | mixParam: '', |
| | | cateIds: [] |
| | | cateIds: null |
| | | }, |
| | | tagList: [ |
| | | { |
| | |
| | | } |
| | | ], |
| | | 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() { |
| | |
| | | }).exec() |
| | | }) |
| | | }, |
| | | onLoad() { |
| | | this.getLists() |
| | | this.getOrganizations() |
| | | }, |
| | | methods: { |
| | | // 切换工序 |
| | | changeTag(i) { |
| | | this.data[i].isActive = !this.data[i].isActive |
| | | }, |
| | | // 跳转 |
| | | jump(item) { |
| | | uni.navigateTo({ |
| | |
| | | // 获取头部组件高度 |
| | | getHeight(height) { |
| | | this.height = height |
| | | }, |
| | | // 下拉刷新 |
| | | async onRefresh() { |
| | | if (this.isLoading) return; |
| | | this.isLoading = true; |
| | | await this.getLists() |
| | | await this.pageCounts() |
| | | this.isLoading = false; |
| | | }, |
| | | // 重置 |
| | | reset() { |
| | |
| | | if (this.data.length > 0) { |
| | | this.data.forEach(item => { item.isActive = false }) |
| | | } |
| | | // this.getLists() |
| | | // this.pageCounts() |
| | | this.getLists() |
| | | this.pageCounts() |
| | | }, |
| | | // 日期确定 |
| | | timeConfirm(val) { |
| | |
| | | this.listData.page = 0 |
| | | this.finished = false |
| | | this.lists = [] |
| | | // this.getLists() |
| | | this.getLists() |
| | | }, |
| | | // 获取列表统计 |
| | | pageCounts() { |
| | |
| | | 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: { |
| | |
| | | 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: [ |