|
|
@ -32,7 +32,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</u-popup> |
|
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
|
<comMessage ref="comMessageRef"></comMessage> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
@ -64,10 +64,7 @@ const props = defineProps({ |
|
|
|
}); |
|
|
|
const emit = defineEmits(['confirm']); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const popup = ref(null); |
|
|
|
const comMessage = ref(null); |
|
|
|
const comMessageRef = ref(null); |
|
|
|
|
|
|
|
const allQty = ref(0); |
|
|
|
const balanceQty = ref(0); |
|
|
@ -107,11 +104,11 @@ const calcQty = (val) => { |
|
|
|
const setValue = () => { |
|
|
|
const balanceQtyValue = Number(dataContent.value.qty); |
|
|
|
if (allQty.value === 0) { |
|
|
|
comMessage.value.showConfirmWarningModal('数量必须大于0', () => { |
|
|
|
comMessageRef.value.showConfirmWarningModal('数量必须大于0', () => { |
|
|
|
allQty.value = balanceQtyValue; |
|
|
|
}); |
|
|
|
} else if (allQty.value > balanceQtyValue) { |
|
|
|
comMessage.value.showConfirmWarningModal(`数量[${allQty.value}]不允许大于库存数量[${balanceQtyValue}]`, () => { |
|
|
|
comMessageRef.value.showConfirmWarningModal(`数量[${allQty.value}]不允许大于库存数量[${balanceQtyValue}]`, () => { |
|
|
|
allQty.value = balanceQtyValue; |
|
|
|
}); |
|
|
|
} else { |
|
|
|