| | |
| | | 待办</view>
|
| | | <view class="cY">
|
| | | <u-search placeholder="搜索关键字" bgColor="#f7f7f7" :showAction="false" @search="scrolltoupper"
|
| | | shape="square" v-model="searchForm.name"></u-search>
|
| | | 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 class="sbtn rd8" :class="searchForm.status==0?'sbtn_green':'sbtn_black_rim'"
|
| | | @click="selectType(0)">待办</view>
|
| | | <view class="sbtn rd8 ml20" :class="searchForm.status==1?'sbtn_green':'sbtn_black_rim'"
|
| | | @click="selectType(1)">已办</view>
|
| | | <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>
|
| | | </view>
|
| | | </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 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">
|
| | | <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 c9 type-style tc rd10"
|
| | | :class="type===item.id?'sbtn_green':'sbtn_gray'"
|
| | | <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>
|
| | |
| | |
|
| | | <script>
|
| | | import myTabbar from "@/components/myTabber.vue"
|
| | | import {
|
| | | getList,
|
| | | pageCount
|
| | | } from '@/util/api/agencyAPI'
|
| | | import {
|
| | | mapState
|
| | | } from 'vuex'
|
| | |
| | | id: 8,
|
| | | name: '客退/返品回厂检验'
|
| | | }
|
| | | ], |
| | | ],
|
| | | tagList: [{
|
| | | id: 0,
|
| | | name: '待办',
|
| | | num: 0
|
| | | },
|
| | | {
|
| | | id: 1,
|
| | | name: '已办',
|
| | | num: 0
|
| | | }
|
| | | ],
|
| | | type: '',
|
| | | searchForm: {
|
| | | name: '',
|
| | | 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,
|
| | | },
|
| | | 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
|
| | | },
|
| | | onLoad() {
|
| | | uni.getSystemInfo({
|
| | | success: res => {
|
| | | this.windowHeight = res.windowHeight
|
| | |
|
| | | }
|
| | | })
|
| | |
|
| | | var that = this
|
| | | uni.login({
|
| | | provider: 'weixin',
|
| | | success: function(loginRes) {
|
| | | // console.log(loginRes);
|
| | | that.code = loginRes.code
|
| | | }
|
| | | });
|
| | | this.loadData()
|
| | | },
|
| | | methods: {
|
| | | scrolltolower() {},
|
| | | 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 => {
|
| | |
|
| | | })
|
| | | },
|
| | | onRestore() {
|
| | | this.triggered = 'restore'; // 需要重置
|
| | | console.log("onRestore");
|
| | | },
|
| | | onAbort() {
|
| | | console.log("onAbort");
|
| | | },
|
| | | scrolltolower() {
|
| | | this.page.page = 1
|
| | | this.loadData()
|
| | | },
|
| | | scrolltoupper() {
|
| | | this.page.page += 1
|
| | | this.loadData()
|
| | | },
|
| | | selectType(status) {
|
| | | if (this.searchForm.status == status) return
|
| | | this.searchForm.status = status
|
| | | this.scrolltoupper()
|
| | | this.scrolltolower()
|
| | | },
|
| | | jump(item) {
|
| | | if ((item.type === 0 || item.type === 2 || item.type === 5) && item.status === 0) { // 跳转出库(转库单)
|
| | | router.push({
|
| | | name: 'issueOperation',
|
| | | 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
|
| | | }
|
| | | })
|
| | | } |
| | | })
|
| | | // 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 } })
|
| | | // router.push({
|
| | | // name: 'wTransferDetail',
|
| | | // query: {
|
| | | // id: item.objId,
|
| | | // status: item.status,
|
| | | // 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
|
| | | }
|
| | | })
|
| | | // 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
|
| | | }
|
| | | } |
| | | uni.navigateTo({ |
| | | url: '/pages/InOperation/InOperation', |
| | | query: { |
| | | 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({
|
| | | name: 'completionDetails',
|
| | | query: {
|
| | | id: item.objId,
|
| | | dbid: item.id,
|
| | | type: 7,
|
| | | isShow: 2
|
| | | }
|
| | | })
|
| | | // router.push({
|
| | | // name: 'completionDetails',
|
| | | // query: {
|
| | | // id: item.objId,
|
| | | // dbid: item.id,
|
| | | // type: 7,
|
| | | // isShow: 2
|
| | | // }
|
| | | // })
|
| | | return
|
| | | }
|
| | | router.push({
|
| | | name: 'wTransferDetail',
|
| | | query: {
|
| | | 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
|
| | | }
|
| | | })
|
| | | // 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
|
| | | }
|
| | | })
|
| | | // 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
|
| | | }
|
| | | })
|
| | | // 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
|
| | | }
|
| | | })
|
| | | // router.push({
|
| | | // name: 'wInboundDetail',
|
| | | // query: {
|
| | | // id: item.objId
|
| | | // }
|
| | | // })
|
| | | }
|
| | | },
|
| | | filterAction() {
|
| | |
| | | close() {
|
| | | this.show = false
|
| | | },
|
| | | resetType() { |
| | | resetType() {
|
| | | this.type = ''
|
| | | this.searchForm.type = ''
|
| | | this.confirm()
|
| | | },
|
| | | confirm() { |
| | | confirm() {
|
| | | this.searchForm.type = this.type
|
| | | this.show = false
|
| | | this.scrolltoupper()
|