添加新页面
This commit is contained in:
parent
103bf42cbe
commit
417f759e87
@ -24,7 +24,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer">
|
||||
<view @click="gotoDetail" class="btn pg" style="margin-right: 40rpx">
|
||||
<view @click="gotoInWare" class="btn pg" style="margin-right: 40rpx">
|
||||
<!-- 在什么都不能操作的情况下,可以查看详情-->
|
||||
查看入库单
|
||||
</view>
|
||||
@ -93,6 +93,11 @@ export default {
|
||||
url: '/pages-warehouse/inOutWarehouse/part?soId=' + this.order.id
|
||||
})
|
||||
},
|
||||
gotoInWare(){
|
||||
uni.navigateTo({
|
||||
url: '/pages-order/inWare/inWare?soId=' + this.order.id
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 项目派工
|
||||
*/
|
||||
|
256
pages-order/inWare/inWare.vue
Normal file
256
pages-order/inWare/inWare.vue
Normal file
@ -0,0 +1,256 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<VNavigationBar background-color="#fff" title="入库单" title-color="#333"></VNavigationBar>
|
||||
<view class="body">
|
||||
<!-- <view class="tabList">-->
|
||||
<!-- <view v-for="(item, index) in tabList" :key="index" :class="{actived: item.id === activeKey}" class="tabItem"-->
|
||||
<!-- @click.stop="changeTabFun(item.id)">-->
|
||||
<!-- {{ item.title }}-->
|
||||
<!-- <view v-if="activeKey === item.id" class="activeLine"></view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<view class="orderList" v-if="!isRepairWarehouse">
|
||||
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||
<order-card v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh"
|
||||
@startWork="startWork"></order-card>
|
||||
<view style="text-align: center" v-if="orderList.length==0">
|
||||
<image class="" src="@/static/images/nothing.png"></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="orderList" v-else>
|
||||
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||
<repair-so-card v-for="(item, index) in repairSoList" :key="index" :order="item"
|
||||
@childEvent="onRefresherrefresh" @startWork="startWork"></repair-so-card>
|
||||
<view style="text-align: center" v-if="repairSoList.length==0">
|
||||
<image class="" src="@/static/images/nothing.png"></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<tabBarVue msg="2"></tabBarVue>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import VNavigationBar from '@/components/VNavigationBar.vue'
|
||||
import tabBarVue from '@/components/tabBar/tabBar.vue'
|
||||
import OrderCard from "@/components/orderCard.vue";
|
||||
import request from '@/utils/request';
|
||||
import {formatTimestamp, getOrderStatusText, builderOrder, saveTicketsRecords} from "@/utils/utils";
|
||||
import {
|
||||
getToken,
|
||||
getUserInfo,
|
||||
getStrData,
|
||||
getTenantId
|
||||
} from '@/utils/auth'
|
||||
import RepairSoCard from "@/components/repairSoCard.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
OrderCard,
|
||||
tabBarVue,
|
||||
VNavigationBar,
|
||||
RepairSoCard
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchText: "",
|
||||
payShow: false,
|
||||
activeKey: 0,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
isRepairWarehouse: false, //是否是仓库管理员
|
||||
//下来刷新状态
|
||||
isTriggered: false,
|
||||
imageUrl: '',
|
||||
soId: "",
|
||||
orderList: [],
|
||||
repairSoList: [],
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if (!getToken()) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
} else {
|
||||
//直接取缓存中的用户信息
|
||||
this.userInfo = getUserInfo()
|
||||
this.onRefresherrefresh()
|
||||
}
|
||||
},
|
||||
onLoad(data) {
|
||||
if (data.soId) {
|
||||
this.soId = data.soId
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 上滑加载数据
|
||||
*/
|
||||
onReachBottomCus() {
|
||||
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
||||
if (this.pageNo * this.pageSize >= this.total) {
|
||||
uni.$u.toast('没有更多数据了')
|
||||
return
|
||||
}
|
||||
//页码+1,调用获取数据的方法获取第二页数据
|
||||
this.pageNo++
|
||||
//此处调用自己获取数据列表的方法
|
||||
this.getRepairSoList()
|
||||
},
|
||||
/**
|
||||
* 下拉刷新数据
|
||||
*/
|
||||
onRefresherrefresh() {
|
||||
this.isTriggered = true
|
||||
this.pageNo = 1
|
||||
this.total = 0
|
||||
this.getRepairSoList()
|
||||
this.repairSoList = []
|
||||
},
|
||||
/**
|
||||
* 清空
|
||||
*/
|
||||
clearText() {
|
||||
this.searchText = ""
|
||||
this.onRefresherrefresh()
|
||||
},
|
||||
changeTabFun(id) {
|
||||
this.activeKey = id
|
||||
this.onRefresherrefresh()
|
||||
},
|
||||
gotoDetail(row) {
|
||||
if (row.goodsType === '2') {
|
||||
uni.navigateTo({
|
||||
url: '/pages-order/orderDetail/orderDetail?ticketsId=' + row.goodsId
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages-order/orderDetail/orderDetail'
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取采购单
|
||||
*/
|
||||
getRepairSoList() {
|
||||
console.log('soId', this.soId)
|
||||
const paramsObj = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
// userId: this.userInfo.id,
|
||||
mainId: this.soId,
|
||||
// soType: "01"
|
||||
}
|
||||
request({
|
||||
url: '/admin-api/repair/so/page',
|
||||
method: 'get',
|
||||
params: paramsObj
|
||||
}).then((res) => {
|
||||
console.log('获取的数据', res.data)
|
||||
|
||||
//判断 如果获取的数据的页码不是第一页,就让之前赋值获取过的数组数据 concat连接 刚获取的第n页数据
|
||||
if (this.pageNo != 1) {
|
||||
this.repairSoList = this.repairSoList.concat(res.data.records)
|
||||
} else {
|
||||
this.repairSoList = res.data.records
|
||||
}
|
||||
//将获取的总条数赋值
|
||||
this.total = res.data.total
|
||||
this.isTriggered = false
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.container {
|
||||
height: 100%;
|
||||
background: #F3F5F7;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: #333333;
|
||||
|
||||
.header {
|
||||
padding: 40rpx 32rpx 20rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.searchBox {
|
||||
background: #F3F5F7;
|
||||
padding: 20rpx 32rpx;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 12rpx;
|
||||
|
||||
.searchInput {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.searchBtn {
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #0174F6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.body {
|
||||
flex: 1;
|
||||
height: 0;
|
||||
padding: 24rpx 32rpx;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.tabList {
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 40rpx;
|
||||
|
||||
.tabItem {
|
||||
padding: 30rpx;
|
||||
flex: 1;
|
||||
z-index: 9999999;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
font-size: 24rpx;
|
||||
|
||||
&.actived {
|
||||
color: #0174F6;
|
||||
}
|
||||
|
||||
.activeLine {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 96rpx;
|
||||
height: 6rpx;
|
||||
background: #0174F6;
|
||||
border-radius: 4rpx 4rpx 0rpx 0rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.orderList {
|
||||
//padding: 30rpx 0;
|
||||
padding-top: 10rpx;
|
||||
height: calc(100% - 90rpx);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 20rpx;
|
||||
|
||||
.orderItem {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -111,6 +111,13 @@
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "inWare/inWare",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user