Browse Source

修改盘点数据量大加载卡顿

dev_pda
李俊城 2 years ago
parent
commit
1204be4271
  1. 11
      fe/PDA/common/new_style.css
  2. 105
      fe/PDA/mycomponents/common/comEasyInputCount.vue
  3. 63
      fe/PDA/pages/task/count_detail.vue

11
fe/PDA/common/new_style.css

@ -665,6 +665,17 @@ uni-page-head .uni-page-head__title {
z-index: 2;
}
.choose_marked_count {
position: absolute;
width: 100%;
/* height: 100%; */
top: 0;
left: 0;
border-top: 6rpx solid #5FCB94;
border-top-left-radius: 16rpx;
border-top-right-radius: 16rpx;
}
.choose_marked {
position: absolute;
width: 100%;

105
fe/PDA/mycomponents/common/comEasyInputCount.vue

@ -0,0 +1,105 @@
<template>
<view>
<uni-popup ref="popup">
<view class="popup_box">
<view class="pop_title">
数量
<text class="fr" @click="closeScanPopup()">关闭</text>
</view>
<view class="pop_tab">
<view class="tab_info">
<view class="conbox">
<textarea v-model="content" trim="all" style="margin-left: 5px;" :focus="true" type="number"></textarea>
<!-- <uni-easyinput v-model="content" type="number" ></uni-easyinput> -->
</view>
<view class="uni-flex">
<button class="clean_scan_btn" @click="clear()">清空</button>
<button class="scan_btn" @click="confirm()">确定</button>
</view>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
showErrorMsg,
} from '@/common/basic.js';
export default {
data() {
return {
content: '',
}
},
created() {
},
methods: {
openPopup(content) {
this.content = content;
this.$refs['popup'].open("bottom");
},
closeScanPopup(content) {
this.$refs.popup.close();
},
cancel() {
this.$refs['popup'].close();
},
confirm() {
if(!/^[0-9]+.?[0-9]*$/.test(this.content)){
uni.showToast({
title:"请输入数字"
})
this.content=""
return
}
this.$emit("confirm", this.content);
this.$refs['popup'].close();
},
clear() {
this.content = '';
},
maskClick() {
this.$emit("confirm", true);
}
}
}
</script>
<!-- background-color: #fff; -->
<style scoped lang="scss">
.center {
flex: auto;
display: flex;
flex-direction: column;
justify-content: center;
// align-items: center;
}
.flex-item {
width: 50%;
text-align: center;
}
.messageButton {
border-color: #F8F8F8;
}
.messagePopup {
background-color: #fff;
border-radius: 5px;
}
/deep/ .uni-input-input {
font-size: 20px;
height: 46px;
}
</style>

63
fe/PDA/pages/task/count_detail.vue

@ -42,7 +42,7 @@
<text class="text_black">{{item.inventoryQty}}</text>
</uni-th>
<uni-th width="100" align="center">
<com-number-box v-if="item.scaned && item.packingCode"
<!-- <com-number-box v-if="item.scaned && item.packingCode"
v-model="item.countQty" :max="99999" :min="0"
@change="qtyChanged($event,item)"
style='margin-right: 10px;padding: 2px;'>
@ -50,9 +50,26 @@
<com-number-box v-if="item.packingCode==''" v-model="item.countQty"
@change="qtyChanged($event,item)" :max="99999" :min="0"
style='margin-right: 10px;padding: 2px;'>
</com-number-box>
</com-number-box> -->
<view class="flex" style="align-items: center;justify-content: center;" v-if="item.scaned && item.packingCode">
<text class="text_black"
>{{item.countQty}} </text>
<view class="photo_btn fr" @click="openEditCount(item)">
<text class="fl font_xs" >修改</text>
</view>
</view>
<view class="flex" style="align-items: center;justify-content: center;" v-if="item.packingCode==''">
<text class="text_black"
>{{item.countQty}} </text>
<view class="photo_btn fr" @click="openEditCount(item)">
<text class="fl font_xs" >修改</text>
</view>
</view>
<view class="" v-else-if="!item.scaned">
<text class="text_black"
v-else-if="!item.scaned">{{item.countQty}}</text>
>{{item.countQty}}</text>
</view>
<!-- <text class="text_black" v-if="item.packingCode"
style="font-size: 1rem;">{{item.countQty}}</text>
@ -70,17 +87,20 @@
</view>
<view style="margin:0 20rpx 20rpx;">
<view class="uni-flex uni-row bot_card">
<view class="bot_card_item">
<label class="icon_bg icon_bg_kw">
<image class="icon_normal" src="@/static/icons_ui/icon_kw.svg">
</image>
<view class="bot_card_item" >
<label class="icon_bg icon_bg_kw" style="text-align: center;">
<text style=" display: block; color: white;text-align: center;font-size: 28rpx;"></text>
<!-- <image class="icon_normal" src="@/static/icons_ui/icon_kw.svg">
</image> -->
</label>
<text>{{ item.locationCode }}</text>
</view>
<view class="bot_card_item">
<label class="icon_bg icon_bg_pc">
<image class="icon_normal" src="@/static/icons_ui/icon_pc.svg">
</image>
<text style=" display: block; color: white;text-align: center;font-size: 28rpx;"></text>
<!-- <image class="icon_normal" src="@/static/icons_ui/icon_pc.svg">
</image> -->
</label>
<text>{{item.lot}}</text>
</view>
@ -115,8 +135,11 @@
</view>
</view>
<view v-if="item.scaned" class="choose_marked">
<image src="@/static/image_marked.svg"></image>
<view v-if="item.scaned" class="choose_marked_count" style="background-color: #5FCB94; opacity: 0.65">
<view class="" style="background-color: #5FCB94; width: 200rpx;height: 300rpx;">
</view>
<!-- <image src="@/static/image_marked.svg"></image> -->
</view>
</view>
</uni-swipe-action-item>
@ -131,6 +154,7 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-by-pack ref="scanPopup" @getScanResult='getScanResult' @close='closeScanPopup()'></win-scan-by-pack>
<com-easy-input ref="descPopup" @confirm='closeEditCountDesc'></com-easy-input>
<com-easy-input-count ref="countPopup" @confirm='closeEditCount'></com-easy-input-count>
<win-inventory-status ref="statusPopup"></win-inventory-status>
<!-- com-message必须放在最下层 -->
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></com-message>
@ -176,8 +200,11 @@
import comCountScanDetail from '@/mycomponents/coms/task/comCountScanDetail.vue';
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
import comEasyInput from '@/mycomponents/common/comEasyInput.vue';
import comEasyInputCount from '@/mycomponents/common/comEasyInputCount.vue';
import winInventoryStatus from '@/mycomponents/wincom/winInventoryStatus.vue';
export default {
components: {
// comCountItems,
@ -187,6 +214,7 @@
comCountScanDetail,
comNumberBox,
comEasyInput,
comEasyInputCount,
winInventoryStatus
},
data() {
@ -198,6 +226,7 @@
allDetails: [], //
currentItem: {},
editDescItem: {},
editCountItem:{},
scrollTop: 0,
old: {
scrollTop: 0
@ -331,7 +360,7 @@
that.datacontent = res;
if (res.details != null) {
res.details.forEach(r => {
r.scaned = false
r.scaned = true
r.countTime = new Date()
// r.countQty = r.inventoryQty;
r.countQty = 0;
@ -746,6 +775,16 @@
this.editDescItem.countDescription = content;
this.$forceUpdate();
},
openEditCount(item) {
this.editCountItem = item;
this.$refs.countPopup.openPopup(item.countQty);
},
closeEditCount(content) {
this.editCountItem.countQty = content;
this.$forceUpdate();
},
showCommitSuccessMessage() {
this.$refs.comMessage.showCommitSuccess();

Loading…
Cancel
Save