| | |
| | | <template>
|
| | | <view class="index">
|
| | | <template> |
| | | <page-meta :page-style="ban ?'overflow: hidden;': ''"/>
|
| | | <view class="index" > |
| | | <!-- :class="ban?'scroll-ban': ''" --> |
| | | <!-- <view class="mask" @tap="tapMask" @touchmove="moveHandle"></view> -->
|
| | | <!-- <web-view v-if="show" @onPostMessage="onMessage" :src="'https://dmtest.ahapp.net/doumeeplant_h5/#/appletLogin?code=' + code"></web-view> -->
|
| | | <!-- {{$store.state.statusbarHeight}} --> |
| | | <!-- {{$store.state.statusbarHeight}} -->
|
| | |
|
| | | <u-sticky>
|
| | | <view class="plr50 pb30 nav-style">
|
| | | <view class="plr30 pb30 nav-style bg_w">
|
| | | <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.name"></u-search>
|
| | | <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'"
|
| | | @click="selectType(0)">待办</view>
|
| | | <view class="sbtn rd8 ml20" :class="searchForm.type==1?'sbtn_green':'sbtn_black_rim'"
|
| | | @click="selectType(1)">已办</view>
|
| | | </view>
|
| | | <div class="content_search"> |
| | | <v-Search @searchInput="searchInput" @submit="confirm" @reset="resetType" :isShow="true" |
| | | placeholder="搜索关键字" @scrollerBan="$event => ban=$event"> |
| | | <template v-slot:content> |
| | | <view class="rp 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 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> |
| | | </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> |
| | | </template> |
| | | </v-Search> |
| | | <div class="content_search_x"></div> |
| | | <LabelSelection :TagList="tagList" :isShow="true" @change="clickTag"></LabelSelection> |
| | | </div>
|
| | | </view>
|
| | | </u-sticky>
|
| | | </u-sticky> |
| | |
|
| | | <u-list :showScrollbar="false" @scrolltolower="scrolltolower" @scrolltoupper="scrolltoupper"
|
| | | :height="windowHeight - (statusbarHeight + navHeight + 120) + 'px'">
|
| | | <u-list-item v-for="(item, index) in projectList" :key="index">
|
| | | <scroll-view :style="{height: height}" 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="box_list_item_icon">
|
| | |
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | </u-list-item>
|
| | | </u-list>
|
| | | </view>
|
| | | </scroll-view>
|
| | | <view v-else class="tc c6">暂无数据...</view>
|
| | | <!-- <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 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>
|
| | | </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>
|
| | |
|
| | | <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 '@/util/api/agencyAPI'
|
| | | import {
|
| | | mapState
|
| | | } from 'vuex'
|
| | | export default {
|
| | | components: {
|
| | | myTabbar
|
| | | myTabbar, |
| | | vSearch, |
| | | LabelSelection
|
| | | },
|
| | | data() {
|
| | | return {
|
| | | return { |
| | | ban: false, |
| | | height: '', |
| | | top: '',
|
| | | 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: '客退/返品回厂检验'
|
| | | }
|
| | | ],
|
| | | tagList: [{
|
| | | id: 0,
|
| | | name: '待办',
|
| | | num: 0
|
| | | },
|
| | | {
|
| | | id: 1,
|
| | | name: '已办',
|
| | | num: 0
|
| | | }
|
| | | ],
|
| | | type: '',
|
| | | searchForm: {
|
| | | name: '',
|
| | | type: 0
|
| | | mixParam: '',
|
| | | 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'},
|
| | | ]
|
| | | page: {
|
| | | total: 0,
|
| | | capacity: 10,
|
| | | page: 1,
|
| | | }, |
| | | triggered: false, |
| | | finished: false,
|
| | | projectList: []
|
| | | }
|
| | | },
|
| | | computed: {
|
| | | ...mapState(['statusbarHeight', 'navHeight']),
|
| | | },
|
| | | async mounted() {
|
| | | await this.$store.dispatch('getUpcomingNum')
|
| | | this.tagList[0].num = this.$store.state.upcomingNum.d
|
| | | this.tagList[1].num = this.$store.state.upcomingNum.y
|
| | | }, |
| | | onReady() { |
| | | var that = this |
| | | |
| | | this.$nextTick(() => { |
| | | uni.createSelectorQuery() |
| | | .in(this) |
| | | .select('.content_search') |
| | | .boundingClientRect((rect) => { |
| | | that.height = `calc(100vh - ${rect.height + 150}px)` |
| | | that.top = `${rect.height}px` |
| | | }) |
| | | .exec() |
| | | }) |
| | | },
|
| | | onLoad() {
|
| | | uni.getSystemInfo({
|
| | | success: res => {
|
| | | this.windowHeight = res.windowHeight
|
| | | }
|
| | | }) |
| | | uni.$on('success', () => { |
| | | this.search(); |
| | | })
|
| | |
|
| | | var that = this
|
| | | uni.login({
|
| | | provider: 'weixin',
|
| | | success: function(loginRes) {
|
| | | // console.log(loginRes);
|
| | | that.code = loginRes.code
|
| | | that.show = true
|
| | | }
|
| | | });
|
| | | this.loadData()
|
| | | },
|
| | | methods: {
|
| | | onMessage(e) {
|
| | | console.log('12345654321')
|
| | | methods: { |
| | | // 搜索 |
| | | searchInput(val) { |
| | | this.searchForm.mixParam = val; |
| | | this.search(); |
| | | }, |
| | | getPageCount() { |
| | | pageCount({mixParam: this.searchForm.mixParam}) |
| | | .then(res => { |
| | | this.tagList[0].num = res.data.startNum |
| | | this.tagList[1].num = res.data.endNum |
| | | this.$store.commit('SETNUM', {
|
| | | d: res.data.startNum,
|
| | | y: res.data.endNum
|
| | | }) |
| | | }) |
| | | .catch(err => {}) |
| | | },
|
| | | scrolltolower() {},
|
| | | scrolltoupper() {},
|
| | | selectType(type) {
|
| | | if (this.searchForm.type == type) return
|
| | | this.searchForm.type = type
|
| | | this.scrolltoupper()
|
| | | loadData() {
|
| | | getList({
|
| | | model: this.searchForm,
|
| | | ...this.page
|
| | | })
|
| | | .then(res => {
|
| | | let data = res.data
|
| | | if (data.page == 1) {
|
| | | this.projectList = []
|
| | | }
|
| | | this.page.page = data.page
|
| | | this.page.total = data.total
|
| | | this.projectList.push(...data.records)
|
| | | })
|
| | | .catch(err => {
|
| | |
|
| | | }) |
| | | .finally(() => { |
| | | this.triggered = false |
| | | })
|
| | | },
|
| | | selectProject(item) {}, |
| | | filterAction() { |
| | | refresh() {
|
| | | if (this.triggered) return |
| | | this.triggered = true; |
| | | this.search() |
| | | // this.page.page = 1 |
| | | // this.loadData() |
| | | // this.getPageCount()
|
| | | },
|
| | | loadMore() {
|
| | | this.page.page += 1
|
| | | this.loadData()
|
| | | },
|
| | | clickTag(status) {
|
| | | if (this.searchForm.status == status) return
|
| | | this.searchForm.status = status |
| | | this.search()
|
| | | },
|
| | | jump(item) { |
| | | console.log(item.type); |
| | | switch(item.type) { |
| | | case 0: case 2: case 5: { |
| | | if (item.status === 0) { |
| | | uni.navigateTo({ |
| | | url: `/pages_inspect/pages/OutOperation/OutOperation?id=${item.objId}&dbid=${item.id}&type=7` |
| | | }) |
| | | } else { |
| | | debugger |
| | | uni.navigateTo({ |
| | | url: `/pages_adjust/pages/warehousingDetails/warehousingDetails?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_inspect/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_inspect/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({
|
| | | // name: 'completionDetails',
|
| | | // query: {
|
| | | // id: item.objId,
|
| | | // dbid: item.id,
|
| | | // type: 7,
|
| | | // isShow: 1,
|
| | | // Type: item.type
|
| | | // }
|
| | | // })
|
| | | return
|
| | | }
|
| | | uni.navigateTo({
|
| | | url: `/pages/InOperation/InOperation?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
|
| | | } |
| | | uni.navigateTo({ |
| | | url: `/pages/warehousingDetails/warehousingDetails?id=${item.objId}` |
| | | })
|
| | | // 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) { // 备料(转库单详情)
|
| | | 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) { // 调整入库(入库单) |
| | | uni.navigateTo({ |
| | | url: `/pages/InOperation/InOperation?id=${item.objId}&dbid=${item.id}&type=9` |
| | | })
|
| | | // router.push({
|
| | | // name: 'warehousing',
|
| | | // query: {
|
| | | // id: item.objId,
|
| | | // dbid: item.id,
|
| | | // type: 9
|
| | | // }
|
| | | // })
|
| | | } 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
|
| | | },
|
| | | close() {
|
| | | this.show = false
|
| | | },
|
| | | resetType() {
|
| | | this.type = ''
|
| | | this.searchForm.type = '' |
| | | this.ban =false
|
| | | this.confirm() |
| | | |
| | | },
|
| | | confirm() {
|
| | | this.searchForm.type = this.type
|
| | | this.show = false |
| | | this.ban =false |
| | | this.search()
|
| | | }, |
| | | search() { |
| | | this.page.page = 1 |
| | | this.loadData() |
| | | this.getPageCount() |
| | | }
|
| | | }
|
| | | }
|
| | |
| | | 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;
|
| | |
| | | -o-text-overflow: ellipsis;
|
| | | }
|
| | |
|
| | | &:last-child { |
| | | &:last-child {
|
| | | flex-shrink: 0;
|
| | | font-size: 24rpx;
|
| | | font-weight: 400;
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | .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: 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; |
| | | } |
| | | .mask { |
| | | z-index: 8000; |
| | | position: fixed; |
| | | left: 0; |
| | | top: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | height: 100vh; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | }
|
| | | </style> |