From 1ff926df1311d1616075ae7eaaae4a186f873d7a Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Tue, 9 Jul 2024 18:33:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2=E7=89=A9?= =?UTF-8?q?=E6=96=99=E5=8F=B7=E6=B7=BB=E5=8A=A0=E5=BA=93=E4=BD=8D=E5=92=8C?= =?UTF-8?q?=E7=8A=B6=E6=80=81=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=89=AB=E6=8F=8F?= =?UTF-8?q?=E5=90=8E=E6=B8=85=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/request2.js | 31 +- src/common/basic.js | 23 +- src/common/directory.js | 26 ++ src/mycomponents/balance/bussinessType.vue | 10 +- src/mycomponents/item/itemFilter.vue | 149 +++++++ src/mycomponents/scan/winCheckFgLabel.vue | 4 +- src/mycomponents/scan/winScanAsnNumber.vue | 2 +- src/mycomponents/scan/winScanContainer.vue | 2 +- src/mycomponents/scan/winScanItem.vue | 2 +- src/mycomponents/scan/winScanJobNumber.vue | 2 +- src/pages.json | 23 +- src/pages/index/index.vue | 8 +- src/pages/query/coms/comItemBalance.vue | 10 +- src/pages/query/coms/comItemDetailCard.vue | 101 +++-- .../query/coms/comLocationDetailCard.vue | 19 +- src/pages/query/item.vue | 373 ++++++++++++------ .../uni-data-checkbox/uni-data-checkbox.vue | 11 +- 17 files changed, 604 insertions(+), 192 deletions(-) create mode 100644 src/mycomponents/item/itemFilter.vue 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 @@ + \ 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 @@ + 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 @@