Browse Source

添加空库位查询

hella_online_20241226
lijuncheng 1 month ago
parent
commit
3d9cb98e7e
  1. 13
      src/api/request2.js
  2. 22
      src/pages.json
  3. 169
      src/pages/query/nullLocation.vue

13
src/api/request2.js

@ -4859,6 +4859,19 @@ export function getCallmaterials(params) {
});
}
/**
* 查询空库位
* @param {*} params
*/
export function getRecommendLocationEmpty(params) {
return request({
url: baseApi + "/wms/location/recommendLocationEmpty",
method: "post",
data:params,
});
}

22
src/pages.json

@ -133,6 +133,28 @@
}
}
},
{
"path": "pages/query/nullLocation",
"style": {
"navigationBarTitleText": "空库位查询",
"enablePullDownRefresh": true,
"titleNView": {
// "autoBackButton": "true",
"buttons": [
//
{
"float": "right",
"fontSize": "58rpx", //
"text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf"
}
]
}
}
},
{

169
src/pages/query/nullLocation.vue

@ -0,0 +1,169 @@
<template>
<view class="" style=" width: 100%; height: 100vh;">
<view class="uni-flex space-between u-col-center" style="width: 100%;padding-top: 20rpx;">
<view class="" style="font-size: 35rpx; font-weight: bold; margin-left: 20rpx;">
库区 :
</view>
<uni-easyinput style="margin-left: 20rpx;" v-model="locationAreaCode" placeholder="请输入库区" @confirm="getList('refresh')"></uni-easyinput>
</view>
<view class="" style="margin: 20rpx;">
<button type="primary" @click="getList('refresh')">查询</button>
</view>
<view v-for="(item, index) in dataList" :key="index">
<view class="task_card" style="padding: 15rpx; font-size: 35rpx; ">
<view class="uni-flex" style="margin: 5rpx; flex-direction: row; justify-content: space-between;">
<view class="">
ERP库位类型 :
</view>
<view class="">
<location-status :type="item.erpLocationCode" ></location-status>
</view>
</view>
<view class="" style="margin: 5rpx;">
仓库 : {{item.warehouseCode}}
</view>
<view class="" style="margin: 5rpx;">
库区代码 : {{item.areaCode}}
</view>
<view class="" style="margin: 5rpx;">
库位名称 : {{item.name}}
</view>
<view class="" style="margin: 5rpx;">
库位代码 : <text style="color:red;" > {{item.code}}</text>
</view>
<view class="" style="margin: 5rpx;">
库位组代码 : {{item.locationGroupCode}}
</view>
<view class="" style="margin: 5rpx;">
巷道 : {{item.aisle}}
</view>
<view class="" style="margin: 5rpx;">
QAD库位代码 : {{item.qadLocationCode}}
</view>
<view class="" style="margin: 10rpx;">
<view class="" style="display: flex; ">
<view class="">
是否可用:
</view>
<view class="" style="margin-left: 20rpx;">
<button v-if="item.available=='TRUE'" type="primary" size="mini">可用</button>
<button v-else type="warn" size="mini">不可用</button>
</view>
</view>
</view>
</view>
</view>
<uni-load-more :status="loadingType" v-if="dataList.length>0" />
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
getRecommendLocationEmpty,
} from '@/api/request2.js';
import {
goHome
} from '@/common/basic.js';
import locationStatus from '@/mycomponents/location/locationStatus.vue'
export default {
components: {
locationStatus
},
data() {
return {
loadingType: "nomore",
locationAreaCode: "",
dataList: [],
totalCount: 0,
pageNo: 1,
pageSize: 10,
};
},
onShow(option) {},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}
},
filters: {
},
mounted() {},
onPullDownRefresh() {
this.getList('refresh');
},
onReachBottom() {
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getList("more");
},
methods: {
getList(type) {
let that = this;
uni.showLoading({
title: "加载中­....",
mask: true
});
this.loadingType = "loading";
if (type === "refresh") {
this.pageNo = 1;
this.jobList = [];
}
var params = {
areaCode: this.locationAreaCode,
pageNo: this.pageNo,
pageSize: this.pageSize,
}
getRecommendLocationEmpty(params).then(res => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
}
var list = res.data.list;
this.totalCount = res.data.total
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
this.loadingType = "nomore";
return;
}
this.dataList = type === "refresh" ? list : this.dataList.concat(list);
this.pageNo++;
}).catch(error => {
uni.hideLoading();
this.showMessage(error);
})
},
showMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
});
},
}
};
</script>
<style>
</style>
Loading…
Cancel
Save