From e17df7b0d83f8125df592e442eb5c64c8b604332 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Mon, 9 Dec 2024 13:37:14 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20scan=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/mycomponents/qty/numbeIntegerrBox.vue | 213 ++++++++++++++++++
src/mycomponents/qty/recommendQty.vue | 17 +-
src/mycomponents/qty/recommendQtyEdit.vue | 21 +-
.../record/recordComDetailCard.vue | 35 ++-
src/mycomponents/scan/winComScan.vue | 71 +++---
src/mycomponents/scan/winScanPack.vue | 9 +-
.../scan/winScanPackAndLocation.vue | 64 ++++--
7 files changed, 340 insertions(+), 90 deletions(-)
create mode 100644 src/mycomponents/qty/numbeIntegerrBox.vue
diff --git a/src/mycomponents/qty/numbeIntegerrBox.vue b/src/mycomponents/qty/numbeIntegerrBox.vue
new file mode 100644
index 00000000..45df04a1
--- /dev/null
+++ b/src/mycomponents/qty/numbeIntegerrBox.vue
@@ -0,0 +1,213 @@
+
+
+
+ -
+
+
+
+ +
+
+
+
+
+
diff --git a/src/mycomponents/qty/recommendQty.vue b/src/mycomponents/qty/recommendQty.vue
index 29b5b843..6974c3bd 100644
--- a/src/mycomponents/qty/recommendQty.vue
+++ b/src/mycomponents/qty/recommendQty.vue
@@ -1,19 +1,19 @@
-
+
- {{ Number(dataContent.qty) }}
+ {{ Number(dataContent.qty) ? Number(dataContent.qty) : '' }}
-
+
-
+
@@ -65,11 +65,10 @@ const props = defineProps({
}
})
const calc = (qty, packQty) => {
- if(qty&&packQty){
- return Math.ceil(Number(qty) / Number(packQty));
- }else{
- return 0
+ if (qty && packQty) {
+ return Math.ceil(Number(qty) / Number(packQty))
}
+ return 0
}
diff --git a/src/mycomponents/qty/recommendQtyEdit.vue b/src/mycomponents/qty/recommendQtyEdit.vue
index 5de6cf6b..3999bc05 100644
--- a/src/mycomponents/qty/recommendQtyEdit.vue
+++ b/src/mycomponents/qty/recommendQtyEdit.vue
@@ -40,8 +40,8 @@
库存数量 :
-
- {{Number(dataContent.balanceQty)}}
+
+ {{ Number(dataContent.balanceQty) }}
@@ -86,10 +86,15 @@ const props = defineProps({
type: Boolean,
default: true
},
- showBalanceQty: {
+ // 是否提示大于包装信息
+ isNumPackTips: {
type: Boolean,
default: false
},
+ showBalanceQty: {
+ type: Boolean,
+ default: false
+ }
})
const allQty = ref(0)
const stdCount = ref(0)
@@ -130,7 +135,7 @@ const openTaskEditPopup = (recommendQtyParams, handleQty, labelQtyParams) => {
allQty.value = Number(handleQty)
setTimeout((res) => {
show.value = true
- stdCount.value = Math.ceil(allQty.value / dataContent.value.packQty);
+ stdCount.value = Math.ceil(allQty.value / dataContent.value.packQty)
}, 500)
}
const openRecordEditPopup = (labelQtyParams, item) => {
@@ -159,6 +164,14 @@ const calcQty = (e) => {
const setValue = () => {
// var recommendQty = Number(this.dataContent.qty);
// var labelQty = Number(this.dataContent.record.label.qty);
+ // 采购收货判断是否大于包装数量isNumPackTips这个字段做判断
+ if (allQty.value > parseFloat(dataContent.value.packQty) && props.isNumPackTips) {
+ comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许大于包装数量[${dataContent.value.packQty}]`, (res) => {
+ allQty.value = dataContent.value.packQty
+ })
+ return
+ }
+ // 其他功能判断是否大于标签数量
if (allQty.value > labelQty.value && props.isNumTips) {
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许大于标签数量[${labelQty.value}]`, (res) => {
allQty.value = labelQty.value
diff --git a/src/mycomponents/record/recordComDetailCard.vue b/src/mycomponents/record/recordComDetailCard.vue
index e66ea87f..7effe8a7 100644
--- a/src/mycomponents/record/recordComDetailCard.vue
+++ b/src/mycomponents/record/recordComDetailCard.vue
@@ -4,20 +4,15 @@
removeItem(event, dataContent)">
-
-
-
-
-
+
+
+
+
swipeClick(event, detail)">
-
+
@@ -36,7 +31,7 @@ import location from '@/mycomponents/balance/location.vue'
import recordDetailPopup from '@/mycomponents/detail/recordDetailPopup.vue'
import pack from '@/mycomponents/balance/pack.vue'
import PackageAndItemCard from '@/mycomponents/package/PackageAndItemCard.vue'
-import { getDetailOption, getDetailEditRemoveOption, getClearOption,getEditLocationRemoveOption ,getRecordOption} from '@/common/array.js'
+import { getDetailOption, getDetailEditRemoveOption, getClearOption, getEditLocationRemoveOption, getRecordOption } from '@/common/array.js'
const props = defineProps({
dataContent: {
@@ -94,6 +89,10 @@ const props = defineProps({
type: Boolean,
default: true
},
+ isShowPackingNumberProps: {
+ type: Boolean,
+ default: false
+ }
})
const collapse1 = ref()
// 监视属性
@@ -131,18 +130,18 @@ dataContent.value.subList.forEach((item) => {
})
onMounted(() => {
detailOptions.value = getDetailOption()
- scanOptions.value = getRecordOption(props.allowModifyQty,props.allowModifyLocation);
- removeOptions.value = props.isShowModifedLocation ? getEditLocationRemoveOption():getClearOption();
+ scanOptions.value = getRecordOption(props.allowModifyQty, props.allowModifyLocation)
+ removeOptions.value = props.isShowModifedLocation ? getEditLocationRemoveOption() : getClearOption()
})
const removeItem = (params, dataContent) => {
const { text } = removeOptions.value[params[1]]
if (text == '移除') {
comMessageRef.value.showQuestionMessage('确定清空物料及箱码信息?', (res) => {
if (res) {
- emit('removeItem',dataContent)
+ emit('removeItem', dataContent)
}
})
- }else {
+ } else {
editLocation(dataContent)
}
}
@@ -181,12 +180,12 @@ const confirm = (qty) => {
editItem.value.handleQty = qty
emit('updateData')
}
-const editLocation = (item)=> {
- editItem.value = item;
+const editLocation = (item) => {
+ editItem.value = item
emit('editLocation', item)
}
// 传递给父类
-const emit = defineEmits(['updateData', 'removePack','editLocation'])
+const emit = defineEmits(['updateData', 'removePack', 'editLocation'])