| | |
| | | <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 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"
|
| | | 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"
|
| | | :class="searchForm.status==item.id?'sbtn_green':'sbtn_black_rim'" @click="selectType(item.id)">
|
| | | {{`${item.name}(${item.num})`}}
|
| | | </view>
|
| | | </view>
|
| | | <div class="content_search"> |
| | | <v-Search @searchInput="searchInput" @submit="search" @reset="reset" :isShow="true" |
| | | placeholder="搜索关键字"> |
| | | </v-Search> |
| | | <div class="content_search_x"></div> |
| | | <LabelSelection :TagList="tagList" :isShow="true" @change="clickTag"></LabelSelection> |
| | | </div>
|
| | | </view>
|
| | | </u-sticky>
|
| | | <scroll-view v-if="projectList.length" :style="windowHeight - (statusbarHeight + navHeight + 120) + 'px'"
|
| | | scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100"
|
| | | refresher-background="lightgreen" @refresherpulling="scrolltolower" @refresherrefresh="scrolltoupper"
|
| | | @refresherrestore="onRestore" @refresherabort="onAbort">
|
| | | <scroll-view v-if="projectList.length" scroll-y refresher-enabled="true" :refresher-triggered="triggered" @scrolltolower="loadMore"
|
| | | @refresherrefresh="refresh" |
| | | >
|
| | | <view v-for="(item, index) in projectList" :key="index">
|
| | | <view class="box_list">
|
| | | <view class="box_list_item" @click="jump(item)">
|
| | |
| | | <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>
|
| | |
| | | </template>
|
| | |
|
| | | <script>
|
| | | import myTabbar from "@/components/myTabber.vue"
|
| | | import myTabbar from "@/components/myTabber.vue" |
| | | import vSearch from '@/components/Search.vue' |
| | | import LabelSelection from '@/components/LabelSelection.vue'
|
| | | import {
|
| | | getList,
|
| | | pageCount
|
| | |
| | | } from 'vuex'
|
| | | export default {
|
| | | components: {
|
| | | myTabbar
|
| | | myTabbar, |
| | | vSearch, |
| | | LabelSelection
|
| | | },
|
| | | data() {
|
| | | return {
|
| | |
| | | total: 0,
|
| | | capacity: 10,
|
| | | page: 1,
|
| | | },
|
| | | }, |
| | | triggered: false, |
| | | finished: false,
|
| | | projectList: []
|
| | | }
|
| | | },
|
| | |
| | | uni.getSystemInfo({
|
| | | success: res => {
|
| | | this.windowHeight = res.windowHeight
|
| | |
|
| | | }
|
| | | })
|
| | | this.loadData()
|
| | | },
|
| | | methods: {
|
| | | methods: { |
| | | // 搜索 |
| | | searchInput(val) { |
| | | this.searchForm.mixParam = val; |
| | | this.search(); |
| | | this.getPageCount() |
| | | }, |
| | | getPageCount() { |
| | | pageCount({mixParam: this.searchForm.mixParam}) |
| | | .then(res => { |
| | | this.tagList[0].num = res.data.startNum |
| | | this.tagList[1].num = res.data.endNum |
| | | }) |
| | | .catch(err => {}) |
| | | },
|
| | | loadData() {
|
| | | getList({
|
| | | model: this.searchForm,
|
| | |
| | | })
|
| | | .catch(err => {
|
| | |
|
| | | }) |
| | | .finally(() => { |
| | | this.triggered = false |
| | | })
|
| | | },
|
| | | onRestore() {
|
| | | this.triggered = 'restore'; // 需要重置
|
| | | console.log("onRestore");
|
| | | },
|
| | | onAbort() {
|
| | | console.log("onAbort");
|
| | | },
|
| | | scrolltolower() {
|
| | | this.page.page = 1
|
| | | refresh() {
|
| | | if (this.triggered) return |
| | | this.triggered = true; |
| | | this.page.page = 1 |
| | | this.loadData()
|
| | | },
|
| | | scrolltoupper() {
|
| | | loadMore() {
|
| | | this.page.page += 1
|
| | | this.loadData()
|
| | | },
|
| | | selectType(status) {
|
| | | clickTag(status) {
|
| | | if (this.searchForm.status == status) return
|
| | | this.searchForm.status = status
|
| | | this.scrolltolower()
|
| | | this.searchForm.status = status |
| | | this.search()
|
| | | },
|
| | | jump(item) {
|
| | | if ((item.type === 0 || item.type === 2 || item.type === 5) && item.status === 0) { // 跳转出库(转库单) |
| | | uni.navigateTo({ |
| | | url: 'pages/OutOperation/OutOperation', |
| | | query: {
|
| | | id: item.objId,
|
| | | dbid: item.id,
|
| | | type: 7
|
| | | jump(item) { |
| | | 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}` |
| | | }) |
| | | } |
| | | })
|
| | | // 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
|
| | | // }
|
| | | // })
|
| | | 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({
|
| | |
| | | // }
|
| | | // })
|
| | | return
|
| | | } |
| | | uni.navigateTo({ |
| | | url: '/pages/InOperation/InOperation', |
| | | query: { |
| | | id: item.objId, |
| | | dbid: item.id, |
| | | type: 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({
|
| | |
| | | // }
|
| | | // })
|
| | | return
|
| | | }
|
| | | } |
| | | uni.navigateTo({ |
| | | url: `/pages/warehousingDetails/warehousingDetails?id=${item.objId}` |
| | | })
|
| | | // router.push({
|
| | | // name: 'wTransferDetail',
|
| | | // query: {
|
| | |
| | | // }
|
| | | // })
|
| | | } 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: {
|
| | |
| | | // 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
|
| | |
| | | },
|
| | | confirm() {
|
| | | this.searchForm.type = this.type
|
| | | this.show = false
|
| | | this.scrolltoupper()
|
| | | this.show = false |
| | | this.search()
|
| | | }, |
| | | search() { |
| | | this.page.page = 1 |
| | | this.loadData() |
| | | }
|
| | | }
|
| | | }
|
| | |
| | | .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; |
| | | } |
| | | .content_search_x { |
| | | height: 24rpx; |
| | | }
|
| | | </style> |