Browse Source

修改库位查询和零件查询

hella_online_20240911
lijuncheng 3 months ago
parent
commit
cbe8d66c08
  1. 124
      src/pages/query/coms/comItemDetailCard.vue
  2. 81
      src/pages/query/coms/comLocationDetailCard.vue
  3. 46
      src/pages/query/item.vue
  4. 43
      src/pages/query/location.vue

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

@ -1,58 +1,63 @@
<template> <template>
<view class="" style="width: 100%; background-color: #fff; border-radius: 10rpx;"> <view class="" style="width: 100%; background-color: #fff; border-radius: 10rpx;">
<view class="uni-flex uni-row space-between" style="align-items: center;"> <view class="uni-flex uni-row space-between" style="align-items: center;">
<view> <view>
<pack v-if="dataContent.parentNumber" title="父包装" :packingCode="dataContent.parentNumber"></pack> <pack v-if="dataContent.parentNumber" title="父包装" :packingCode="dataContent.parentNumber"></pack>
<pack v-if=" dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack> <pack v-if="isShowPack" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch> <batch :batch="dataContent.batch"></batch>
<location :locationCode="dataContent.locationCode"></location> <location :locationCode="dataContent.locationCode"></location>
<view class="" v-if="dataContent.warehouseCode" <view class="" v-if="isShowWarehouseCode"
style="font-size: 32rpx; margin-left: 15rpx ; padding-bottom: 10rpx; font-weight: bold;"> style=" margin-left: 5rpx ;margin-top: 5rpx; ">
<text style="">仓库</text> <text style="padding: 5px;font-size: 30rpx; color:#1DA4CF">仓库</text>
{{dataContent.warehouseCode}} <text style="font-size: 35rpx; font-weight: bold;">{{dataContent.warehouseCode}}</text>
</view> </view>
<view class="" v-if="dataContent.jobNumber"
style="font-size: 32rpx; padding-left: 10rpx ; padding-bottom: 10rpx;"> <view class="" v-if="isShowJobNumber" style="margin-left: 5rpx; margin-top: 5rpx;">
<text style="color: coral; ">任务号</text> <text style="color: coral;padding: 5px;font-size: 30rpx;">任务号 </text>
{{dataContent.jobNumber}} <text style="font-size: 35rpx; font-weight: bold;">{{dataContent.jobNumber}}</text>
</view> </view>
<view class="" v-if="dataContent.businessType"
style="font-size: 32rpx; padding-left: 10rpx ; padding-bottom: 10rpx;"> <view class="" v-if="isShowBusinessType" style="margin-left: 5rpx;margin-top: 5rpx;">
<text style="color:green; ">业务类型 </text> <text style="color: green;padding: 5px;font-size: 30rpx;">业务类型 </text>
<text v-if="hasChinese(dataContent.businessType)">{{dataContent.businessType}}</text> <text style="font-size: 35rpx; font-weight: bold;" v-if="dataContent.businessType&&hasChinese(dataContent.businessType)">{{dataContent.businessType}}</text>
<text v-else> {{businessTypeDesc(dataContent.businessType)}}</text> <text style="font-size: 35rpx; font-weight: bold;" v-if="dataContent.businessType&&!hasChinese(dataContent.businessType)"> {{businessTypeDesc(dataContent.businessType)}}</text>
</view> </view>
</view> </view>
<view class="uni-flex" style="flex-direction: column;"> <view class="uni-flex" style="flex-direction: column;">
<view class="uni-flex uni-row center"> <view class="uni-flex uni-row center">
<qty :dataContent="dataContent" <qty :dataContent="dataContent" :isShowStdPack="isShowStdPack" :isShowStatus="true"></qty>
:isShowStdPack="isShowStdPack" :isShowStatus="true"></qty>
</view> </view>
</view> </view>
</view> </view>
<view v-if="dataContent.transactionType" class="" style="margin-left: 10rpx; font-size: 32rpx;"> <view class="" v-if="isShowTransactionType" style="margin-left: 5rpx;margin-top: 5rpx; ">
事务类型{{dataContent.transactionType}} <text style="padding: 5px;font-size: 30rpx;color: #5383B3; ">事务类型 </text>
<text style="font-size: 35rpx; font-weight: bold;">{{dataContent.transactionType}}</text>
</view> </view>
<view v-if="dataContent.inventoryAction" class="" style="margin-left: 10rpx; font-size: 32rpx;"> <view class="" v-if="isShowInventoryAction" style="margin-left: 5rpx;margin-top: 5rpx; ">
库存动作{{inventoryActionName(dataContent.inventoryAction)}} <text style="padding: 5px;font-size: 30rpx; color: #B69863">库存动作 </text>
<text style="font-size: 35rpx; font-weight: bold;">{{inventoryActionName(dataContent.inventoryAction)}}</text>
</view> </view>
<view v-if="dataContent.recordNumber" class="" style="margin-left: 10rpx; font-size: 32rpx;">
业务记录号{{dataContent.recordNumber}} <view class="" v-if="isShowRecordNumber" style="margin-left: 5rpx; margin-top: 5rpx;">
<text style="padding: 5px;font-size: 30rpx;color: #B73681;">业务记录号 </text>
<text style="font-size: 35rpx; font-weight: bold;">{{dataContent.recordNumber}}</text>
</view> </view>
<view v-if="dataContent.number" class="" style="margin-left: 10rpx; font-size: 32rpx;">
事务号{{dataContent.number}} <view class="" v-if="isShowNumber" style="margin-left: 5rpx; margin-top: 5rpx;">
<text style="padding: 5px;font-size: 30rpx; color: #5B61C1;">事务号 </text>
<text style="font-size: 35rpx; font-weight: bold;">{{dataContent.number}}</text>
</view> </view>
<view v-if="dataContent.worker" class="" style="margin-left: 10rpx; font-size: 32rpx;">
操作人{{dataContent.worker}} <view class="" v-if="isShowWorker" style="margin-left: 5rpx; margin-top: 5rpx;">
<text style="padding: 5px;font-size: 30rpx;color: #ED77D9;">操作人 </text>
<text style="font-size: 35rpx; font-weight: bold;">{{dataContent.worker}}</text>
</view> </view>
<view class="" style="margin-left: 10rpx; font-size: 32rpx;"> <view class="" style="margin-left: 5rpx; margin-top: 5rpx;">
创建时间{{dateFormat(dataContent.createTime)}} <text style="padding: 5px;font-size: 30rpx;color:#569FE6">创建时间 </text>
<text v-if="dataContent.createTime" style="font-size: 35rpx; font-weight: bold;">{{dateFormat(dataContent.createTime)}}</text>
</view> </view>
</view> </view>
</template> </template>
@ -109,22 +114,57 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
isShowWarehouseCode: {
type: Boolean,
default: false
},
isShowJobNumber: {
type: Boolean,
default: false
},
isShowBusinessType: {
type: Boolean,
default: false
},
isShowTransactionType: {
type: Boolean,
default: false
},
isShowRecordNumber: {
type: Boolean,
default: false
},
isShowNumber: {
type: Boolean,
default: false
},
isShowWorker: {
type: Boolean,
default: false
},
isShowInventoryAction: {
type: Boolean,
default: false
},
}, },
methods: { methods: {
businessTypeDesc(type){ businessTypeDesc(type) {
return getBusinessTypeName(type) return getBusinessTypeName(type)
}, },
dateFormat(times){ dateFormat(times) {
return dateFormat(times) return dateFormat(times)
}, },
hasChinese(str){ hasChinese(str) {
var reg = /[\u4e00-\u9fa5]/g; var reg = /[\u4e00-\u9fa5]/g;
return reg.test(str); return reg.test(str);
}, },
inventoryActionName(value){ inventoryActionName(value) {
return value=="IN"?"入库":"出库" return value == "IN" ? "入库" : "出库"
} }
} }

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

@ -8,19 +8,16 @@
<view class="uni-flex uni-row space-between" style="align-items: center;"> <view class="uni-flex uni-row space-between" style="align-items: center;">
<view> <view>
<pack v-if="dataContent.parentNumber" title="父包装" :packingCode="dataContent.parentNumber"></pack> <pack v-if="dataContent.parentNumber" title="父包装" :packingCode="dataContent.parentNumber"></pack>
<pack v-if=" dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack> <pack v-if="isShowPack" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch> <batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
<view class="" v-if="dataContent.jobNumber" <view class="" v-if="isShowJobNumber" style="margin-left: 5rpx; margin-top: 5rpx;">
style="font-size: 30rpx; padding-left: 10rpx ; padding-bottom: 10rpx;"> <text style="color: coral;padding: 5px;font-size: 30rpx;">任务号 </text>
<text style="color: coral; ">任务号</text> <text style="font-size: 35rpx; font-weight: bold;">{{dataContent.jobNumber}}</text>
{{dataContent.jobNumber}}
</view> </view>
<view class="" v-if="dataContent.businessType" <view class="" v-if="isShowBusinessType" style="margin-left: 5rpx;margin-top: 5rpx;">
style="font-size: 30rpx; padding-left: 10rpx ; padding-bottom: 10rpx;"> <text style="color: green;padding: 5px;font-size: 30rpx;">业务类型 </text>
<text style="color:green; ">业务类型 </text> <text style="font-size: 35rpx; font-weight: bold;" v-if="dataContent.businessType&&hasChinese(dataContent.businessType)">{{dataContent.businessType}}</text>
<text v-if="hasChinese(dataContent.businessType)">{{dataContent.businessType}}</text> <text style="font-size: 35rpx; font-weight: bold;" v-if="dataContent.businessType&&!hasChinese(dataContent.businessType)"> {{businessTypeDesc(dataContent.businessType)}}</text>
<text v-else> {{businessTypeDesc(dataContent.businessType)}}</text>
<!-- {{businessTypeDesc(dataContent.businessType)}} -->
</view> </view>
</view> </view>
<view class="uni-flex" style="flex-direction: column;"> <view class="uni-flex" style="flex-direction: column;">
@ -31,27 +28,35 @@
</view> </view>
</view> </view>
<view v-if="dataContent.transactionType" class="" style="margin-left: 10rpx; font-size: 32rpx;"> <view class="" v-if="isShowTransactionType" style="margin-left: 5rpx;margin-top: 5rpx; ">
事务类型{{dataContent.transactionType}} <text style="padding: 5px;font-size: 30rpx;color: #5383B3; ">事务类型 </text>
<text style="font-size: 35rpx; font-weight: bold;">{{dataContent.transactionType}}</text>
</view> </view>
<view v-if="dataContent.inventoryAction" class="" style="margin-left: 10rpx; font-size: 32rpx;"> <view class="" v-if="isShowInventoryAction" style="margin-left: 5rpx;margin-top: 5rpx; ">
库存动作{{inventoryActionName(dataContent.inventoryAction)}} <text style="padding: 5px;font-size: 30rpx; color: #B69863">库存动作 </text>
<text style="font-size: 35rpx; font-weight: bold;">{{inventoryActionName(dataContent.inventoryAction)}}</text>
</view> </view>
<view v-if="dataContent.recordNumber" class="" style="margin-left: 10rpx; font-size: 32rpx;">
业务记录号{{dataContent.recordNumber}} <view class="" v-if="isShowRecordNumber" style="margin-left: 5rpx; margin-top: 5rpx;">
<text style="padding: 5px;font-size: 30rpx;color: #B73681;">业务记录号 </text>
<text style="font-size: 35rpx; font-weight: bold;">{{dataContent.recordNumber}}</text>
</view> </view>
<view v-if="dataContent.number" class="" style="margin-left: 10rpx; font-size: 32rpx;">
事务号{{dataContent.number}} <view class="" v-if="isShowNumber" style="margin-left: 5rpx; margin-top: 5rpx;">
<text style="padding: 5px;font-size: 30rpx; color: #5B61C1;">事务号 </text>
<text style="font-size: 35rpx; font-weight: bold;">{{dataContent.number}}</text>
</view> </view>
<view v-if="dataContent.worker" class="" style="margin-left: 10rpx; font-size: 32rpx;">
操作人{{dataContent.worker}} <view class="" v-if="isShowWorker" style="margin-left: 5rpx; margin-top: 5rpx;">
<text style="padding: 5px;font-size: 30rpx;color: #ED77D9;">操作人 </text>
<text style="font-size: 35rpx; font-weight: bold;">{{dataContent.worker}}</text>
</view> </view>
<view class="" style="margin-left: 10rpx; font-size: 32rpx;"> <view class="" style="margin-left: 5rpx; margin-top: 5rpx;">
创建时间{{dateFormat(dataContent.createTime)}} <text style="padding: 5px;font-size: 30rpx;color:#569FE6">创建时间 </text>
<text v-if="dataContent.createTime" style="font-size: 35rpx; font-weight: bold;">{{dateFormat(dataContent.createTime)}}</text>
</view> </view>
</view> </view>
</template> </template>
@ -107,6 +112,34 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
isShowJobNumber: {
type: Boolean,
default: false
},
isShowBusinessType: {
type: Boolean,
default: false
},
isShowTransactionType: {
type: Boolean,
default: false
},
isShowRecordNumber: {
type: Boolean,
default: false
},
isShowNumber: {
type: Boolean,
default: false
},
isShowWorker: {
type: Boolean,
default: false
},
isShowInventoryAction: {
type: Boolean,
default: false
},
}, },
methods: { methods: {

46
src/pages/query/item.vue

@ -6,7 +6,7 @@
<view ref="topContent" class="top" > <view ref="topContent" class="top" >
<com-blank-view @goScan='openScanPopup' v-if="itemCode==''"></com-blank-view> <com-blank-view @goScan='openScanPopup' v-if="itemCode==''"></com-blank-view>
<item-info v-if="itemDetail" :itemdetail='itemDetail'></item-info> <item-info v-if="itemDetail" :itemdetail='itemDetail'></item-info>
<z-tabs v-if="itemCode" :list="tabList" @change="tabChange" /> <z-tabs v-if="itemCode" :current="tabIndex" :list="tabList" @change="tabChange" />
</view> </view>
<view style="width:100%;" :style="{'margin-top':topHeight+'px'}"> <view style="width:100%;" :style="{'margin-top':topHeight+'px'}">
@ -18,7 +18,18 @@
<view class="" style="font-size:35rpx; "> <view class="" style="font-size:35rpx; ">
({{index+1}}) ({{index+1}})
</view> </view>
<comItemDetailCard :isShowPack="false" :dataContent="item" style='margin: 10rpx;'> <comItemDetailCard
:isShowPack="item.isShowPack"
:isShowWarehouseCode="item.isShowWarehouseCode"
:isShowJobNumber="item.isShowJobNumber"
:isShowBusinessType="item.isShowBusinessType"
:isShowTransactionType="item.isShowTransactionType"
:isShowInventoryAction="item.isShowInventoryAction"
:isShowRecordNumber="item.isShowRecordNumber"
:isShowNumber="item.isShowNumber"
:isShowWorker="item.isShowWorker"
:dataContent="item"
style='margin: 10rpx;'>
</comItemDetailCard> </comItemDetailCard>
</view> </view>
@ -141,6 +152,7 @@
console.log('topContent',this.$refs.topContent) console.log('topContent',this.$refs.topContent)
}) })
this.tabIndex=0;
this.tabChange(0) this.tabChange(0)
} else { } else {
this.showMessage('未查找到物料【' + code + '】'); this.showMessage('未查找到物料【' + code + '】');
@ -153,7 +165,7 @@
}) })
}, },
// //
getBalanceItem(pageNo, pageSize, type) { getBalanceItem(pageNo, pageSize, type) {
uni.showLoading({ uni.showLoading({
title: "加载中...", title: "加载中...",
@ -201,6 +213,10 @@
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
var list = res.data.list; var list = res.data.list;
list.forEach(item=>{
item.isShowPack=true
item.isShowWarehouseCode=true
})
this.totalCount = res.data.total this.totalCount = res.data.total
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
@ -216,7 +232,7 @@
this.showMessage(error); this.showMessage(error);
}) })
}, },
// //
getTransactionByItemCode(pageNo, pageSize, type) { getTransactionByItemCode(pageNo, pageSize, type) {
uni.showLoading({ uni.showLoading({
title: "加载中...", title: "加载中...",
@ -264,6 +280,16 @@
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
var list = res.data.list; var list = res.data.list;
list.forEach(item=>{
item.isShowPack=true
item.isShowWarehouseCode=true
item.isShowBusinessType=true
item.isShowTransactionType =true
item.isShowInventoryAction=true
item.isShowRecordNumber=true
item.isShowNumber=true
item.isShowWorker=true
})
this.totalCount = res.data.total this.totalCount = res.data.total
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
@ -337,6 +363,12 @@
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
var list = res.data.list; var list = res.data.list;
list.forEach(item=>{
item.isShowPack=false
item.isShowJobNumber=true
item.isShowBusinessType=true
item.isShowWarehouseCode=true
})
this.totalCount = res.data.total this.totalCount = res.data.total
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
@ -398,6 +430,12 @@
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
var list = res.data.list; var list = res.data.list;
list.forEach(item=>{
item.isShowPack=true
item.isShowJobNumber=true
item.isShowBusinessType=true
item.isShowWarehouseCode=true
})
this.totalCount = res.data.total this.totalCount = res.data.total
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {

43
src/pages/query/location.vue

@ -4,9 +4,9 @@
<view class="" style=" width: 100%; position: fixed; right: 0;"> <view class="" style=" width: 100%; position: fixed; right: 0;">
<com-blank-view @goScan='openScanPopup' v-if="locationCode==''"></com-blank-view> <com-blank-view @goScan='openScanPopup' v-if="locationCode==''"></com-blank-view>
<location-info :locationDetail='locationDetail' v-if="locationCode"></location-info> <location-info :locationDetail='locationDetail' v-if="locationCode"></location-info>
<z-tabs v-if="locationCode" :list="tabList" @change="tabChange" /> <z-tabs v-if="locationCode" :current="tabIndex" :list="tabList" @change="tabChange" />
</view> </view>
<view style="padding-top: 210rpx;width:100%"> <view style="padding-top: 280rpx;width:100%">
<view v-if="totalCount>0" style=" margin-left: 10rpx;margin-bottom: 10rpx; font-size:35rpx; font-weight:bold">总数 : {{totalCount}} <view v-if="totalCount>0" style=" margin-left: 10rpx;margin-bottom: 10rpx; font-size:35rpx; font-weight:bold">总数 : {{totalCount}}
</view> </view>
<view v-for="(item, index) in dataList" style="width:100%" :key="index"> <view v-for="(item, index) in dataList" style="width:100%" :key="index">
@ -15,7 +15,18 @@
<view class="" style="font-size:35rpx; "> <view class="" style="font-size:35rpx; ">
({{index+1}}) ({{index+1}})
</view> </view>
<comLocationDetailCard :isShowPack="false" :dataContent="item" style='margin: 10rpx;'> <comLocationDetailCard
:isShowPack="item.isShowPack"
:isShowWarehouseCode="item.isShowWarehouseCode"
:isShowJobNumber="item.isShowJobNumber"
:isShowBusinessType="item.isShowBusinessType"
:isShowTransactionType="item.isShowTransactionType"
:isShowInventoryAction="item.isShowInventoryAction"
:isShowRecordNumber="item.isShowRecordNumber"
:isShowNumber="item.isShowNumber"
:isShowWorker="item.isShowWorker"
:dataContent="item"
style='margin: 10rpx;'>
</comLocationDetailCard> </comLocationDetailCard>
</view> </view>
@ -131,7 +142,9 @@
this.summarys = []; this.summarys = [];
this.balances = []; this.balances = [];
this.locationCode = code; this.locationCode = code;
location.type =location.erpLocationCode
this.locationDetail = location this.locationDetail = location
this.tabIndex=0
this.tabChange(0) this.tabChange(0)
// this.getContentByTab(this.tabIndex); // this.getContentByTab(this.tabIndex);
}, },
@ -166,6 +179,9 @@
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
var list = res.data.list; var list = res.data.list;
list.forEach(item=>{
item.isShowPack=true
})
this.totalCount = res.data.total this.totalCount = res.data.total
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
@ -212,6 +228,17 @@
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
var list = res.data.list; var list = res.data.list;
list.forEach(item=>{
item.isShowPack=true
item.isShowWarehouseCode=true
item.isShowBusinessType=true
item.isShowTransactionType =true
item.isShowInventoryAction=true
item.isShowRecordNumber=true
item.isShowNumber=true
item.isShowWorker=true
})
this.totalCount = res.data.total this.totalCount = res.data.total
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
@ -257,6 +284,11 @@
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
var list = res.data.list; var list = res.data.list;
list.forEach(item=>{
item.isShowPack=false
item.isShowJobNumber=true
item.isShowBusinessType=true
})
this.totalCount = res.data.total this.totalCount = res.data.total
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
@ -302,6 +334,11 @@
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
var list = res.data.list; var list = res.data.list;
list.forEach(item=>{
item.isShowPack=true
item.isShowJobNumber=true
item.isShowBusinessType=true
})
this.totalCount = res.data.total this.totalCount = res.data.total
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {

Loading…
Cancel
Save