|
|
@@ -80,12 +80,14 @@ const height = ref('')
|
|
|
const packCarton = ref('')
|
|
|
//重量/千克
|
|
|
const weight = ref('')
|
|
|
+const packId=ref('')
|
|
|
const attribute = ref([])
|
|
|
const show = (item, attributeMap) => {
|
|
|
- length.value = ''
|
|
|
- width.value = ''
|
|
|
+ length.value =''
|
|
|
+ width.value =''
|
|
|
height.value = ''
|
|
|
- packCarton.value = ''
|
|
|
+ packCarton.value = attributeMap.packCarton
|
|
|
+ packId.value =attributeMap.packId
|
|
|
weight.value = ''
|
|
|
attribute.value = item
|
|
|
attributeTrueFalseBy.value = true
|
|
|
@@ -95,8 +97,8 @@ const emit = defineEmits()
|
|
|
const beforeClose = (action) =>
|
|
|
new Promise(async (resolve) => {
|
|
|
if (action === 'confirm') {
|
|
|
- if (['size', 'metering'].some(val => attribute.value.includes(val))) {
|
|
|
- if (!length.value || !width.value || !height.value || !height.value) {
|
|
|
+ if (['size'].some(val => attribute.value.includes(val))) {
|
|
|
+ if (!length.value || !width.value || !height.value ) {
|
|
|
showToast('请输入长宽高')
|
|
|
return resolve(false)
|
|
|
}
|
|
|
@@ -119,8 +121,8 @@ const beforeClose = (action) =>
|
|
|
width: width.value ? width.value / 100 : undefined,
|
|
|
packCarton: packCarton.value,
|
|
|
packId: packCarton.value ? '1/' + packCarton.value : 'STANDARD',
|
|
|
- weight: weight.value,
|
|
|
- cube: (height.value / 100) * (length.value / 100) * (width.value / 100),
|
|
|
+ weight: weight.value ? weight.value: undefined ,
|
|
|
+ cube:(height.value && width.value && length.value)? (height.value / 100) * (length.value / 100) * (width.value / 100):undefined,
|
|
|
}
|
|
|
emit('setAttribute', data)
|
|
|
}
|