diff --git a/.gitignore b/.gitignore index 7ce6e504..b40aa1ba 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ dist *.ntvs* *.njsproj *.sln -*.sw? \ No newline at end of file +*.sw? +/.env.development diff --git a/src/api/request2.js b/src/api/request2.js index 4e158d8e..581912e8 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -273,11 +273,11 @@ export function getExpectoutByItemcode(params) { } /** - * 按库位查询库存事务 + * 查询库存事务 * @param {*} * */ -export function getTransactionByLocationcode(params) { +export function getTransaction(params) { return request({ url: baseApi + "/wms/transaction/senior", method: "post", diff --git a/src/pages/query/coms/comItemDetailCard.vue b/src/pages/query/coms/comItemDetailCard.vue index e9b084f1..61486b08 100644 --- a/src/pages/query/coms/comItemDetailCard.vue +++ b/src/pages/query/coms/comItemDetailCard.vue @@ -7,15 +7,21 @@ + + 仓库 + {{dataContent.warehouseCode}} + + style="font-size: 32rpx; padding-left: 10rpx ; padding-bottom: 10rpx;"> 任务号 {{dataContent.jobNumber}} - 业务类型 - {{businessTypeDesc(dataContent.businessType)}} + style="font-size: 32rpx; padding-left: 10rpx ; padding-bottom: 10rpx;"> + 业务类型 + {{dataContent.businessType}} + {{businessTypeDesc(dataContent.businessType)}} @@ -26,6 +32,24 @@ + + 事务类型:{{dataContent.transactionType}} + + + 库存动作:{{inventoryActionName(dataContent.inventoryAction)}} + + + 业务记录号:{{dataContent.recordNumber}} + + + 事务号:{{dataContent.number}} + + + 操作人:{{dataContent.worker}} + + + 创建时间:{{dateFormat(dataContent.createTime)}} + @@ -44,6 +68,9 @@ import { getBusinessTypeName, } from '@/common/directory.js'; + import { + dateFormat + } from '@/common/basic.js'; export default { components: { itemQty, @@ -88,6 +115,17 @@ businessTypeDesc(type){ return getBusinessTypeName(type) }, + dateFormat(times){ + return dateFormat(times) + }, + hasChinese(str){ + var reg = /[\u4e00-\u9fa5]/g; + return reg.test(str); + }, + + inventoryActionName(value){ + return value=="IN"?"入库":"出库" + } } } diff --git a/src/pages/query/coms/comLocationDetailCard.vue b/src/pages/query/coms/comLocationDetailCard.vue index 8843d6e4..0256eca5 100644 --- a/src/pages/query/coms/comLocationDetailCard.vue +++ b/src/pages/query/coms/comLocationDetailCard.vue @@ -31,22 +31,22 @@ - + 事务类型:{{dataContent.transactionType}} - + 库存动作:{{inventoryActionName(dataContent.inventoryAction)}} - + 业务记录号:{{dataContent.recordNumber}} - + 事务号:{{dataContent.number}} - + 操作人:{{dataContent.worker}} - + 创建时间:{{dateFormat(dataContent.createTime)}} diff --git a/src/pages/query/item.vue b/src/pages/query/item.vue index 5a119fbb..0801eec1 100644 --- a/src/pages/query/item.vue +++ b/src/pages/query/item.vue @@ -39,7 +39,7 @@ getExpectinByItemcode, getBalanceByItemCode, getBasicItemByCode, - getBalanceSummary + getTransaction } from '@/api/request2.js'; import { goHome @@ -51,7 +51,7 @@ import comItemDetailCard from '@/pages/query/coms/comItemDetailCard.vue' import itemFilter from '@/mycomponents/item/itemFilter.vue' import comEmptyView from '@/mycomponents/common/comEmptyView.vue' -import { nextTick } from 'vue'; + import { nextTick } from 'vue'; export default { components: { @@ -67,7 +67,7 @@ import { nextTick } from 'vue'; return { //v-model绑定的这个变量不要在分页请求结束中自己赋值!!! dataList: [], - tabList: ['汇总', '明细', '预计入', '预计出'], + tabList: ['库存余额', '预计入', '预计出', '库存事务'], tabIndex: 0, itemDetail: undefined, itemCode: '', @@ -154,7 +154,7 @@ import { nextTick } from 'vue'; }, // 汇总 - getSummary(pageNo, pageSize, type) { + getBalanceItem(pageNo, pageSize, type) { uni.showLoading({ title: "加载中...", mask: true @@ -190,7 +190,9 @@ import { nextTick } from 'vue'; var params = { filters: filters, pageNo: this.pageNo, - pageSize: pageSize + pageSize: pageSize, + sort:"createTime", + by: "ASC" } getBalanceByItemCode(params).then(res => { uni.hideLoading(); @@ -205,9 +207,6 @@ import { nextTick } from 'vue'; this.loadingType = "nomore"; return; } - list.forEach(item=>{ - item.packingNumber="" - }) this.dataList = type === "refresh" ? list : this.dataList.concat(list); this.pageNo++; @@ -218,7 +217,7 @@ import { nextTick } from 'vue'; }) }, //明细 - getDetailList(pageNo, pageSize, type) { + getTransactionByItemCode(pageNo, pageSize, type) { uni.showLoading({ title: "加载中...", mask: true @@ -254,9 +253,11 @@ import { nextTick } from 'vue'; var params = { filters: filters, pageNo: this.pageNo, - pageSize: pageSize + pageSize: pageSize, + sort:"createTime", + by: "DESC" } - getBalanceByItemCode(params).then(res => { + getTransaction(params).then(res => { uni.hideLoading(); if (type === "refresh") { @@ -280,12 +281,12 @@ import { nextTick } from 'vue'; }, getContentByTab(index, pageNo, pageSize, type) { - if (index === 0) this.getSummary(pageNo, pageSize, type); - else if (index === 1) this.getDetailList(pageNo, pageSize, type); + if (index === 0) this.getBalanceItem(pageNo, pageSize, type); + else if (index === 1) this.getExpectin(pageNo, pageSize, type); else if (index === 2) { - this.getExpectin(pageNo, pageSize, type); - } else if (index == 3) { this.getExpectout(pageNo, pageSize, type); + } else if (index == 3) { + this.getTransactionByItemCode(pageNo, pageSize, type); } }, //预计入 diff --git a/src/pages/query/location.vue b/src/pages/query/location.vue index e493d57e..05527c98 100644 --- a/src/pages/query/location.vue +++ b/src/pages/query/location.vue @@ -36,7 +36,7 @@