diff --git a/src/api/request2.js b/src/api/request2.js
index cc88d8d6..7f5ead99 100644
--- a/src/api/request2.js
+++ b/src/api/request2.js
@@ -230,16 +230,18 @@ export function getBusinesstypeByCode(code) {
});
}
+
+
+
/**
- * 按物料代码查询库存明细
+ * 按物品查询库存
* @param {*} itemCode
*
*/
-
export function getBalanceByItemCode(params) {
return request({
- url: baseApi + "/wms/balance/page",
- method: "get",
+ url: baseApi + "/wms/balance/seniorAll",
+ method: "post",
data: params,
});
}
@@ -251,8 +253,8 @@ export function getBalanceByItemCode(params) {
*/
export function getExpectinByItemcode(params) {
return request({
- url: baseApi + "/wms/expectin/page",
- method: "get",
+ url: baseApi + "/wms/expectin/senior",
+ method: "post",
data: params,
});
}
@@ -264,8 +266,8 @@ export function getExpectinByItemcode(params) {
*/
export function getExpectoutByItemcode(params) {
return request({
- url: baseApi + "/wms/expectout/page",
- method: "get",
+ url: baseApi + "/wms/expectout/senior",
+ method: "post",
data: params,
});
}
@@ -4207,3 +4209,16 @@ export function getBalanceByParams(data) {
data:data
});
}
+
+/**
+ * 获取业务类型
+ * @param {*}
+ */
+
+export function getBusinessType() {
+ return request({
+ url: baseApi + "/wms/businesstype/page?pageSize=1000&pageNo=1",
+ method: "get",
+ data:{}
+ });
+}
diff --git a/src/common/basic.js b/src/common/basic.js
index 7bab6b38..f0f4ab1f 100644
--- a/src/common/basic.js
+++ b/src/common/basic.js
@@ -18,7 +18,7 @@ let unplannedIissueReason = [];
let scrapReasonList = [];
let inspectFailedReasonList = [];
let switchList=[]
-
+let businessList=[]
//获取字典信息
@@ -36,6 +36,7 @@ export function clearCacheData() {
scrapReasonList = [];
inspectFailedReasonList = [];
switchList=[]
+ businessList=[]
}
@@ -355,6 +356,26 @@ export function getSwitchInfoByCode(code) {
return isCheck;
}
+//获取业务类型名称
+export function getBusinessTypeName(code) {
+ var resultInfo = null
+ if (businessList.length == 0) {
+ businessList = uni.getStorageSync("businessType")
+ }
+
+ for (let item of businessList) {
+ if (item.code == code) {
+ resultInfo = item
+ break;
+ }
+ }
+ return resultInfo.name;
+}
+
+
+
+
+
diff --git a/src/common/directory.js b/src/common/directory.js
index 5eae6dcb..fcdfc188 100644
--- a/src/common/directory.js
+++ b/src/common/directory.js
@@ -20,6 +20,7 @@ let sampleMethodList = [];
let transferModeList = [];
let countStageList = [];
let locationAreaTypeList = [];
+let businessList=[]
@@ -60,6 +61,7 @@ export function clearCacheData() {
transferModeList = [];
countStageList = [];
locationAreaTypeList=[]
+ businessList=[]
}
//获取字典信息
@@ -225,6 +227,22 @@ export function getItemStateInfo(value) {
return resultInfo
}
+//获取业务类型名称
+export function getBusinessTypeName(code) {
+ var resultInfo = null
+ if (businessList.length == 0) {
+ businessList = uni.getStorageSync("businessType")
+ }
+
+ for (let item of businessList) {
+ if (item.code == code) {
+ resultInfo = item
+ break;
+ }
+ }
+ return resultInfo.name;
+}
+
//获取库区类型
export function getLocationAreaTypeInfo(value) {
var resultInfo = "";
@@ -335,6 +353,14 @@ export function getRequestStateInfo(value) {
return resultInfo
}
+//获取库存状态集合
+export function getInventoryStatusList() {
+ if (inventoryStatusList.length == 0) {
+ inventoryStatusList = getDirectoryInfo("inventory_status")
+ }
+ return inventoryStatusList
+}
+
//获取库存状态
export function getInventoryStatusInfo(value) {
diff --git a/src/mycomponents/balance/bussinessType.vue b/src/mycomponents/balance/bussinessType.vue
index 82029e3e..3a7e43f2 100644
--- a/src/mycomponents/balance/bussinessType.vue
+++ b/src/mycomponents/balance/bussinessType.vue
@@ -1,13 +1,14 @@
- {{businessTypeDesc(bussinessType)}}
- {{number}}
+
+ 业务类型
+ {{businessTypeDesc(bussinessType)}}
+
\ No newline at end of file
diff --git a/src/mycomponents/scan/winCheckFgLabel.vue b/src/mycomponents/scan/winCheckFgLabel.vue
index 41622a0a..f4e38ac5 100644
--- a/src/mycomponents/scan/winCheckFgLabel.vue
+++ b/src/mycomponents/scan/winCheckFgLabel.vue
@@ -16,7 +16,7 @@
+ :isShowHistory="false" :clearResult="true" :headerType="headerType">
{{itemCode}}
@@ -24,7 +24,7 @@
diff --git a/src/mycomponents/scan/winScanAsnNumber.vue b/src/mycomponents/scan/winScanAsnNumber.vue
index 38a7f906..d01b5cbd 100644
--- a/src/mycomponents/scan/winScanAsnNumber.vue
+++ b/src/mycomponents/scan/winScanAsnNumber.vue
@@ -13,7 +13,7 @@
-
+
diff --git a/src/mycomponents/scan/winScanContainer.vue b/src/mycomponents/scan/winScanContainer.vue
index 3324db49..806a650b 100644
--- a/src/mycomponents/scan/winScanContainer.vue
+++ b/src/mycomponents/scan/winScanContainer.vue
@@ -12,7 +12,7 @@
-
diff --git a/src/mycomponents/scan/winScanItem.vue b/src/mycomponents/scan/winScanItem.vue
index bac4db70..d0e7aae3 100644
--- a/src/mycomponents/scan/winScanItem.vue
+++ b/src/mycomponents/scan/winScanItem.vue
@@ -13,7 +13,7 @@
-
diff --git a/src/mycomponents/scan/winScanJobNumber.vue b/src/mycomponents/scan/winScanJobNumber.vue
index 96cfe6c7..21679a53 100644
--- a/src/mycomponents/scan/winScanJobNumber.vue
+++ b/src/mycomponents/scan/winScanJobNumber.vue
@@ -16,7 +16,7 @@
diff --git a/src/pages.json b/src/pages.json
index 2a6381f9..06152d5d 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -57,11 +57,28 @@
{
"path": "pages/query/item",
"style": {
- "enablePullDownRefresh": false, // 是否配置下拉刷新的功能
+ "enablePullDownRefresh": true, // 是否配置下拉刷新的功能
"navigationBarTitleText": "按物料查询库存",
"titleNView": {
- "autoBackButton": "true",
- "buttons": [{}]
+ // "autoBackButton": "true",
+ "buttons": [
+ // 右边按钮
+ {
+
+ "float": "right",
+ "fontSize": "58rpx", //按钮上文字的大小
+ "text": "\ue696",
+ "fontSrc": "/static/ali_icon/iconfont.ttf"
+
+ },
+ {
+
+ "float": "right",
+ "fontSize": "52rpx", //按钮上文字的大小
+ "text": "\ue6e2",
+ "fontSrc": "/static/ali_icon/iconfont.ttf"
+ }
+ ]
}
}
},
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 128d1822..43a73abd 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -75,7 +75,8 @@
getDictionaryItem,
getPackageUnitList,
getMainMessage,
- getSwitchByCode
+ getSwitchByCode,
+ getBusinessType
} from '@/api/request2.js';
export default {
@@ -393,6 +394,11 @@
uni.setStorageSync("switch", res.data)
}).catch(error=>{
})
+ // 获取业务类型
+ getBusinessType().then(res=>{
+ uni.setStorageSync("businessType", res.data.list)
+ }).catch(error=>{
+ })
},
openCheck(url) {
diff --git a/src/pages/query/coms/comItemBalance.vue b/src/pages/query/coms/comItemBalance.vue
index aab76ce0..bce77749 100644
--- a/src/pages/query/coms/comItemBalance.vue
+++ b/src/pages/query/coms/comItemBalance.vue
@@ -1,12 +1,16 @@
-
+
+
+ 任务号:{{dataContent.jobNumber}}
+
-
+
+
-
-
-
-
+
+
+
-
-
+
+
+
+
+
+ 任务号
+ {{dataContent.jobNumber}}
+
+
+ 业务类型
+ {{businessTypeDesc(dataContent.businessType)}}
+
+
+
+
+
+
+
+
+
+
+
+ methods: {
+ businessTypeDesc(type){
+ return getBusinessTypeName(type)
+ },
+ }
+ }
+
+
\ No newline at end of file
diff --git a/src/pages/query/coms/comLocationDetailCard.vue b/src/pages/query/coms/comLocationDetailCard.vue
index 3f4a5fcb..e7e9d81a 100644
--- a/src/pages/query/coms/comLocationDetailCard.vue
+++ b/src/pages/query/coms/comLocationDetailCard.vue
@@ -19,7 +19,7 @@
业务类型
- {{dataContent.businessType}}
+ {{businessTypeDesc(dataContent.businessType)}}
@@ -44,6 +44,10 @@
import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue'
import status from '@/mycomponents/status/status.vue'
+
+ import {
+ getBusinessTypeName,
+ } from '@/common/directory.js';
export default {
components: {
itemQty,
@@ -84,18 +88,9 @@
},
methods: {
- edit() {
-
- },
- detail() {
-
+ businessTypeDesc(type){
+ return getBusinessTypeName(type)
},
- remove() {
-
- },
- resetScan() {
-
- }
}
}
diff --git a/src/pages/query/item.vue b/src/pages/query/item.vue
index bcdc8592..80ab2063 100644
--- a/src/pages/query/item.vue
+++ b/src/pages/query/item.vue
@@ -1,31 +1,31 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ 总数 : {{totalCount}}
+
+
+
+
+ ({{index+1}})
+
+
+
-
-
-
-
-
-
-
-
-
+
+
-
@@ -49,6 +49,9 @@
import winScanItem from '@/mycomponents/scan/winScanItem.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comItemDetailCard from '@/pages/query/coms/comItemDetailCard.vue'
+ import itemFilter from '@/mycomponents/item/itemFilter.vue'
+ import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
+
export default {
components: {
itemInfo,
@@ -56,6 +59,8 @@
winScanItem,
winScanButton,
comItemDetailCard,
+ itemFilter,
+ comEmptyView
},
data() {
return {
@@ -66,17 +71,37 @@
itemDetail: undefined,
itemCode: '',
balances: [],
+ loadingType: "nomore",
+ totalCount: 0,
+ locationCode: "",
+ inventoryStatus: "",
+ pageSize:10
}
},
//返回首页
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
+ } else if (e.index == 1) {
+ this.$refs.filter.openFilter();
}
},
+
+ onReachBottom() {
+ console.log("底部")
+ //避免多次触发
+ if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
+ return;
+ }
+ this.getContentByTab(this.tabIndex, this.pageNo, this.pageSize, "more");
+
+ },
mounted() {
this.openScanPopup();
},
+ onPullDownRefresh() {
+ this.getContentByTab(this.tabIndex, this.pageNo, this.pageSize, "refresh");
+ },
methods: {
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
@@ -117,25 +142,64 @@
},
// 汇总
- getSummary(pageNo, pageSize) {
+ getSummary(pageNo, pageSize, type) {
uni.showLoading({
title: "加载中...",
mask: true
});
+ this.loadingType = "loading";
+ if (type === "refresh") {
+ this.pageNo = 1;
+ this.dataList = [];
+ }
+
+ var filters = [];
+ filters.push({
+ column: "itemCode",
+ action: "==",
+ value: this.itemCode
+ })
+ if (this.locationCode) {
+ filters.push({
+ column: "locationCode",
+ action: "==",
+ value: this.locationCode
+ })
+ }
+
+ if (this.inventoryStatus) {
+ filters.push({
+ column: "inventoryStatus",
+ action: "in",
+ value: this.inventoryStatus
+ })
+ }
+
var params = {
- itemCode: this.itemCode,
- pageNo: pageNo,
+ filters: filters,
+ pageNo: this.pageNo,
pageSize: pageSize
}
- console.log("getSummary", pageNo)
- getBalanceSummary(params).then(res => {
+ getBalanceByItemCode(params).then(res => {
uni.hideLoading();
- if (res.data.list.length > 0) {
- this.$refs.paging.complete(res.data.list);
- } else {
- this.$refs.paging.complete(false);
- this.showMessage('未查找到物料【' + this.itemCode + '】');
+
+ 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;
}
+ list.forEach(item=>{
+ item.packingNumber=""
+ })
+
+ this.dataList = type === "refresh" ? list : this.dataList.concat(list);
+ this.pageNo++;
+
}).catch(error => {
this.$refs.paging.complete(false);
uni.hideLoading();
@@ -143,95 +207,199 @@
})
},
//明细
- getDetailList(pageNo, pageSize) {
+ getDetailList(pageNo, pageSize, type) {
uni.showLoading({
title: "加载中...",
mask: true
});
+ this.loadingType = "loading";
+ if (type === "refresh") {
+ this.pageNo = 1;
+ this.dataList = [];
+ }
+
+ var filters = [];
+ filters.push({
+ column: "itemCode",
+ action: "==",
+ value: this.itemCode
+ })
+ if (this.locationCode) {
+ filters.push({
+ column: "locationCode",
+ action: "==",
+ value: this.locationCode
+ })
+ }
+
+ if (this.inventoryStatus) {
+ filters.push({
+ column: "inventoryStatus",
+ action: "in",
+ value: this.inventoryStatus
+ })
+ }
+
var params = {
- itemCode: this.itemCode,
- pageNo: pageNo,
+ filters: filters,
+ pageNo: this.pageNo,
pageSize: pageSize
}
getBalanceByItemCode(params).then(res => {
uni.hideLoading();
- if (res.data.list.length > 0) {
- this.$refs.paging.complete(res.data.list);
- } else {
- this.$refs.paging.complete(false);
- this.showMessage('未查找到物料【' + this.itemCode + '】');
+
+ 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 => {
- this.$refs.paging.complete(false);
uni.hideLoading();
this.showMessage(error);
})
},
- ontabtap(e) {
- let index = e.target.dataset.current || e.currentTarget.dataset.current;
- this.tabIndex = index;
- this.getContentByTab(index);
- },
- getContentByTab(index, pageNo, pageSize) {
- if (index === 0) this.getSummary(pageNo, pageSize);
- else if (index === 1) this.getDetailList(pageNo, pageSize);
+ getContentByTab(index, pageNo, pageSize, type) {
+ if (index === 0) this.getSummary(pageNo, pageSize, type);
+ else if (index === 1) this.getDetailList(pageNo, pageSize, type);
else if (index === 2) {
- this.getExpectin(pageNo, pageSize);
+ this.getExpectin(pageNo, pageSize, type);
} else if (index == 3) {
- this.getExpectout(pageNo, pageSize);
+ this.getExpectout(pageNo, pageSize, type);
}
},
//预计入
- getExpectin(pageNo, pageSize) {
+ getExpectin(pageNo, pageSize, type) {
uni.showLoading({
title: "加载中...",
mask: true
});
+
+
+ this.loadingType = "loading";
+ if (type === "refresh") {
+ this.pageNo = 1;
+ this.dataList = [];
+ }
+
+ var filters = [];
+ filters.push({
+ column: "itemCode",
+ action: "==",
+ value: this.itemCode
+ })
+ if (this.locationCode) {
+ filters.push({
+ column: "locationCode",
+ action: "==",
+ value: this.locationCode
+ })
+ }
+
+ if (this.inventoryStatus) {
+ filters.push({
+ column: "inventoryStatus",
+ action: "in",
+ value: this.inventoryStatus
+ })
+ }
+
var params = {
- itemCode: this.itemCode,
- pageNo: pageNo,
+ filters: filters,
+ pageNo: this.pageNo,
pageSize: pageSize
}
getExpectinByItemcode(params).then(res => {
uni.hideLoading();
- if (res.data.total > 0) {
- this.$refs.paging.complete(res.data.list);
- } else {
- this.showMessage('未查找到物料【' + this.itemCode + '】');
+
+ 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 => {
- this.$refs.paging.complete(false);
uni.hideLoading();
this.showMessage(error);
})
+
},
//预计出
- getExpectout(pageNo, pageSize) {
+ getExpectout(pageNo, pageSize, type) {
uni.showLoading({
title: "加载中...",
mask: true
});
+
+ this.loadingType = "loading";
+ if (type === "refresh") {
+ this.pageNo = 1;
+ this.dataList = [];
+ }
+
+ var filters = [];
+ filters.push({
+ column: "itemCode",
+ action: "==",
+ value: this.itemCode
+ })
+ if (this.locationCode) {
+ filters.push({
+ column: "locationCode",
+ action: "==",
+ value: this.locationCode
+ })
+ }
+
+ if (this.inventoryStatus) {
+ filters.push({
+ column: "inventoryStatus",
+ action: "in",
+ value: this.inventoryStatus
+ })
+ }
+
var params = {
- itemCode: this.itemCode,
- pageNo: pageNo,
+ filters: filters,
+ pageNo: this.pageNo,
pageSize: pageSize
}
getExpectoutByItemcode(params).then(res => {
uni.hideLoading();
- if (res.data.total > 0) {
- this.$refs.paging.complete(res.data.list);
- } else {
- this.$refs.paging.complete(false);
- this.showMessage('未查找到物料【' + this.itemCode + '】');
+ 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 => {
- this.$refs.paging.complete(false);
uni.hideLoading();
this.showMessage(error);
})
+
},
showMessage(message) {
@@ -248,55 +416,38 @@
},
tabChange(index) {
this.tabIndex = index;
- this.$refs.paging.reload(true);
+ this.getContentByTab(index, this.pageNo, this.pageSize, "refresh")
},
- queryList(pageNo, pageSize) {
- console.log("加载", pageNo)
- if (this.itemCode != "") {
- this.getContentByTab(this.tabIndex, pageNo, pageSize)
- }
- },
- itemClick(item) {
- console.log('点击了', item.title);
+ confirm(locationCode, status) {
+ this.locationCode = locationCode;
+ if(status.length>0){
+ var arrayItems = status.join(',')
+ this.inventoryStatus = arrayItems
+ }else {
+ this.inventoryStatus=""
+ }
+ this.tabChange(this.tabIndex)
}
}
}
-
+
\ No newline at end of file
diff --git a/src/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue b/src/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue
index 2e517123..edc199b0 100644
--- a/src/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue
+++ b/src/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue
@@ -487,7 +487,9 @@
flex-direction: row;
align-items: center;
position: relative;
- margin: 5px 0;
+ // margin: 10px 0;
+ margin-left: 25rpx;
+ margin-top: 30rpx;
margin-right: 25px;
.hidden {
@@ -502,11 +504,13 @@
flex-direction: row;
align-items: center;
justify-content: space-between;
+ ma
.checklist-text {
- font-size: 14px;
+ font-size: 18px;
color: #666;
- margin-left: 5px;
+ margin-left: 10px;
line-height: 14px;
+ padding: 10rpx;
}
.checkobx__list {
@@ -522,6 +526,7 @@
transform-origin: center;
transform: rotate(45deg);
opacity: 0;
+ padding: 10rpx;
}
}