Browse Source

修改零件号查询

hella_online_20240911
lijuncheng 2 weeks ago
parent
commit
0956aee5cc
  1. 1
      .gitignore
  2. 4
      src/api/request2.js
  3. 46
      src/pages/query/coms/comItemDetailCard.vue
  4. 12
      src/pages/query/coms/comLocationDetailCard.vue
  5. 31
      src/pages/query/item.vue
  6. 4
      src/pages/query/location.vue

1
.gitignore

@ -19,3 +19,4 @@ dist
*.njsproj *.njsproj
*.sln *.sln
*.sw? *.sw?
/.env.development

4
src/api/request2.js

@ -273,11 +273,11 @@ export function getExpectoutByItemcode(params) {
} }
/** /**
* 按库位查询库存事务 * 查询库存事务
* @param {*} * @param {*}
* *
*/ */
export function getTransactionByLocationcode(params) { export function getTransaction(params) {
return request({ return request({
url: baseApi + "/wms/transaction/senior", url: baseApi + "/wms/transaction/senior",
method: "post", method: "post",

46
src/pages/query/coms/comItemDetailCard.vue

@ -7,15 +7,21 @@
<pack v-if=" dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack> <pack v-if=" dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch> <batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
<location :locationCode="dataContent.locationCode"></location> <location :locationCode="dataContent.locationCode"></location>
<view class="" v-if="dataContent.warehouseCode"
style="font-size: 32rpx; margin-left: 15rpx ; padding-bottom: 10rpx; font-weight: bold;">
<text style="">仓库</text>
{{dataContent.warehouseCode}}
</view>
<view class="" v-if="dataContent.jobNumber" <view class="" v-if="dataContent.jobNumber"
style="font-size: 30rpx; padding-left: 10rpx ; padding-bottom: 10rpx;"> style="font-size: 32rpx; padding-left: 10rpx ; padding-bottom: 10rpx;">
<text style="color: coral; ">任务号</text> <text style="color: coral; ">任务号</text>
{{dataContent.jobNumber}} {{dataContent.jobNumber}}
</view> </view>
<view class="" v-if="dataContent.businessType" <view class="" v-if="dataContent.businessType"
style="font-size: 30rpx; padding-left: 10rpx ; padding-bottom: 10rpx;"> style="font-size: 32rpx; padding-left: 10rpx ; padding-bottom: 10rpx;">
<text style="color:green; ">业务类型</text> <text style="color:green; ">业务类型 </text>
{{businessTypeDesc(dataContent.businessType)}} <text v-if="hasChinese(dataContent.businessType)">{{dataContent.businessType}}</text>
<text v-else> {{businessTypeDesc(dataContent.businessType)}}</text>
</view> </view>
</view> </view>
<view class="uni-flex" style="flex-direction: column;"> <view class="uni-flex" style="flex-direction: column;">
@ -26,6 +32,24 @@
</view> </view>
</view> </view>
<view v-if="dataContent.transactionType" class="" style="margin-left: 10rpx; font-size: 32rpx;">
事务类型{{dataContent.transactionType}}
</view>
<view v-if="dataContent.inventoryAction" class="" style="margin-left: 10rpx; font-size: 32rpx;">
库存动作{{inventoryActionName(dataContent.inventoryAction)}}
</view>
<view v-if="dataContent.recordNumber" class="" style="margin-left: 10rpx; font-size: 32rpx;">
业务记录号{{dataContent.recordNumber}}
</view>
<view v-if="dataContent.number" class="" style="margin-left: 10rpx; font-size: 32rpx;">
事务号{{dataContent.number}}
</view>
<view v-if="dataContent.worker" class="" style="margin-left: 10rpx; font-size: 32rpx;">
操作人{{dataContent.worker}}
</view>
<view class="" style="margin-left: 10rpx; font-size: 32rpx;">
创建时间{{dateFormat(dataContent.createTime)}}
</view>
@ -44,6 +68,9 @@
import { import {
getBusinessTypeName, getBusinessTypeName,
} from '@/common/directory.js'; } from '@/common/directory.js';
import {
dateFormat
} from '@/common/basic.js';
export default { export default {
components: { components: {
itemQty, itemQty,
@ -88,6 +115,17 @@
businessTypeDesc(type){ businessTypeDesc(type){
return getBusinessTypeName(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"?"入库":"出库"
}
} }
} }

12
src/pages/query/coms/comLocationDetailCard.vue

@ -31,22 +31,22 @@
</view> </view>
</view> </view>
<view v-if="dataContent.transactionType" class="" style="margin-left: 10rpx; font-size: 30rpx;"> <view v-if="dataContent.transactionType" class="" style="margin-left: 10rpx; font-size: 32rpx;">
事务类型{{dataContent.transactionType}} 事务类型{{dataContent.transactionType}}
</view> </view>
<view v-if="dataContent.inventoryAction" class="" style="margin-left: 10rpx; font-size: 30rpx;"> <view v-if="dataContent.inventoryAction" class="" style="margin-left: 10rpx; font-size: 32rpx;">
库存动作{{inventoryActionName(dataContent.inventoryAction)}} 库存动作{{inventoryActionName(dataContent.inventoryAction)}}
</view> </view>
<view v-if="dataContent.recordNumber" class="" style="margin-left: 10rpx; font-size: 30rpx;"> <view v-if="dataContent.recordNumber" class="" style="margin-left: 10rpx; font-size: 32rpx;">
业务记录号{{dataContent.recordNumber}} 业务记录号{{dataContent.recordNumber}}
</view> </view>
<view v-if="dataContent.number" class="" style="margin-left: 10rpx; font-size: 30rpx;"> <view v-if="dataContent.number" class="" style="margin-left: 10rpx; font-size: 32rpx;">
事务号{{dataContent.number}} 事务号{{dataContent.number}}
</view> </view>
<view v-if="dataContent.worker" class="" style="margin-left: 10rpx; font-size: 30rpx;"> <view v-if="dataContent.worker" class="" style="margin-left: 10rpx; font-size: 32rpx;">
操作人{{dataContent.worker}} 操作人{{dataContent.worker}}
</view> </view>
<view class="" style="margin-left: 10rpx; font-size: 30rpx;"> <view class="" style="margin-left: 10rpx; font-size: 32rpx;">
创建时间{{dateFormat(dataContent.createTime)}} 创建时间{{dateFormat(dataContent.createTime)}}
</view> </view>

31
src/pages/query/item.vue

@ -39,7 +39,7 @@
getExpectinByItemcode, getExpectinByItemcode,
getBalanceByItemCode, getBalanceByItemCode,
getBasicItemByCode, getBasicItemByCode,
getBalanceSummary getTransaction
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome goHome
@ -51,7 +51,7 @@
import comItemDetailCard from '@/pages/query/coms/comItemDetailCard.vue' import comItemDetailCard from '@/pages/query/coms/comItemDetailCard.vue'
import itemFilter from '@/mycomponents/item/itemFilter.vue' import itemFilter from '@/mycomponents/item/itemFilter.vue'
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import { nextTick } from 'vue'; import { nextTick } from 'vue';
export default { export default {
components: { components: {
@ -67,7 +67,7 @@ import { nextTick } from 'vue';
return { return {
//v-model //v-model
dataList: [], dataList: [],
tabList: ['汇总', '明细', '预计入', '预计出'], tabList: ['库存余额', '预计入', '预计出', '库存事务'],
tabIndex: 0, tabIndex: 0,
itemDetail: undefined, itemDetail: undefined,
itemCode: '', itemCode: '',
@ -154,7 +154,7 @@ import { nextTick } from 'vue';
}, },
// //
getSummary(pageNo, pageSize, type) { getBalanceItem(pageNo, pageSize, type) {
uni.showLoading({ uni.showLoading({
title: "加载中...", title: "加载中...",
mask: true mask: true
@ -190,7 +190,9 @@ import { nextTick } from 'vue';
var params = { var params = {
filters: filters, filters: filters,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: pageSize pageSize: pageSize,
sort:"createTime",
by: "ASC"
} }
getBalanceByItemCode(params).then(res => { getBalanceByItemCode(params).then(res => {
uni.hideLoading(); uni.hideLoading();
@ -205,9 +207,6 @@ import { nextTick } from 'vue';
this.loadingType = "nomore"; this.loadingType = "nomore";
return; return;
} }
list.forEach(item=>{
item.packingNumber=""
})
this.dataList = type === "refresh" ? list : this.dataList.concat(list); this.dataList = type === "refresh" ? list : this.dataList.concat(list);
this.pageNo++; this.pageNo++;
@ -218,7 +217,7 @@ import { nextTick } from 'vue';
}) })
}, },
// //
getDetailList(pageNo, pageSize, type) { getTransactionByItemCode(pageNo, pageSize, type) {
uni.showLoading({ uni.showLoading({
title: "加载中...", title: "加载中...",
mask: true mask: true
@ -254,9 +253,11 @@ import { nextTick } from 'vue';
var params = { var params = {
filters: filters, filters: filters,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: pageSize pageSize: pageSize,
sort:"createTime",
by: "DESC"
} }
getBalanceByItemCode(params).then(res => { getTransaction(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (type === "refresh") { if (type === "refresh") {
@ -280,12 +281,12 @@ import { nextTick } from 'vue';
}, },
getContentByTab(index, pageNo, pageSize, type) { getContentByTab(index, pageNo, pageSize, type) {
if (index === 0) this.getSummary(pageNo, pageSize, type); if (index === 0) this.getBalanceItem(pageNo, pageSize, type);
else if (index === 1) this.getDetailList(pageNo, pageSize, type); else if (index === 1) this.getExpectin(pageNo, pageSize, type);
else if (index === 2) { else if (index === 2) {
this.getExpectin(pageNo, pageSize, type);
} else if (index == 3) {
this.getExpectout(pageNo, pageSize, type); this.getExpectout(pageNo, pageSize, type);
} else if (index == 3) {
this.getTransactionByItemCode(pageNo, pageSize, type);
} }
}, },
// //

4
src/pages/query/location.vue

@ -36,7 +36,7 @@
<script> <script>
import { import {
getBalanceByLocationcode, getBalanceByLocationcode,
getTransactionByLocationcode, getTransaction,
getExpectInByLocationCode, getExpectInByLocationCode,
getExpectOutByLocationCode getExpectOutByLocationCode
} from '@/api/request2.js'; } from '@/api/request2.js';
@ -206,7 +206,7 @@
sort:"createTime", sort:"createTime",
by: "DESC" by: "DESC"
} }
getTransactionByLocationcode(params).then(res => { getTransaction(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();

Loading…
Cancel
Save