diff --git a/src/mycomponents/qty/balanceQtyEdit.vue b/src/mycomponents/qty/balanceQtyEdit.vue index 6b69f01a..2a350b22 100644 --- a/src/mycomponents/qty/balanceQtyEdit.vue +++ b/src/mycomponents/qty/balanceQtyEdit.vue @@ -23,7 +23,7 @@ 标包量 : - {{ Number(dataContent.packQty) }} + {{ Number(dataContent.packQty) || 0}} @@ -32,7 +32,9 @@ 数量 : - + @@ -86,7 +88,15 @@ const props = defineProps({ allowEditStatus: { type: Boolean, default: false - } + }, + queryBalance: { + type: Boolean, + default: true + }, + allowEditQty: { + type: Boolean, + default: true + }, }) const allQty = ref(0) const stdCount = ref(0) @@ -148,7 +158,7 @@ const calcQty = (e) => { } const setValue = () => { const balanceQty = Number(dataContent.value.balanceQty) - if (allQty.value < 0) { + if (allQty.value <= 0) { comMessageRef.value.showErrorMessage('数量必须等于0', (res) => { if (res) { allQty.value = balanceQty diff --git a/src/mycomponents/qty/countQtyEdit.vue b/src/mycomponents/qty/countQtyEdit.vue index ff2f932d..9b6d3e62 100644 --- a/src/mycomponents/qty/countQtyEdit.vue +++ b/src/mycomponents/qty/countQtyEdit.vue @@ -27,7 +27,7 @@ 标包量 : - {{ Number(dataContent.packQty) }} + {{ Number(dataContent.packQty) || 0}} diff --git a/src/mycomponents/qty/qtyEdit.vue b/src/mycomponents/qty/qtyEdit.vue new file mode 100644 index 00000000..c787a4d2 --- /dev/null +++ b/src/mycomponents/qty/qtyEdit.vue @@ -0,0 +1,161 @@ + + + + + diff --git a/src/mycomponents/qty/recommendQty.vue b/src/mycomponents/qty/recommendQty.vue index b7e007a0..29b5b843 100644 --- a/src/mycomponents/qty/recommendQty.vue +++ b/src/mycomponents/qty/recommendQty.vue @@ -2,7 +2,7 @@ - + {{ Number(dataContent.qty) }} @@ -58,10 +58,18 @@ const props = defineProps({ isShowPackCount: { type: Boolean, default: true + }, + isShowCount: { + type: Boolean, + default: true } }) const calc = (qty, packQty) => { - return Math.ceil(Number(qty) / Number(packQty)) + if(qty&&packQty){ + return Math.ceil(Number(qty) / Number(packQty)); + }else{ + return 0 + } }