Bläddra i källkod

收货-代码文件优化

zhaohuanhuan 10 månader sedan
förälder
incheckning
5e8620961a

+ 9 - 7
src/views/inbound/TakeDelivery/components/Attribute.vue → src/views/inbound/takeDelivery/components/Attribute.vue

@@ -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)
     }

+ 0 - 0
src/views/inbound/TakeDelivery/components/LotDate.vue → src/views/inbound/takeDelivery/components/LotDate.vue


+ 0 - 0
src/views/inbound/TakeDelivery/components/UniqueCodeInput.vue → src/views/inbound/takeDelivery/components/UniqueCodeInput.vue


+ 0 - 0
src/views/inbound/TakeDelivery/task/hooks/attribute.js → src/views/inbound/takeDelivery/task/hooks/attribute.js


+ 1 - 4
src/views/inbound/TakeDelivery/task/index.vue → src/views/inbound/takeDelivery/task/index.vue

@@ -81,7 +81,6 @@
             @search="onConfirm"
             :class="[scanType===4?'search-input-barcode':'','van-hairline--bottom']"
             @focus="scanType=4"
-            @blur="scanType=2"
           >
             <template #action>
               <div style="display: flex; align-items: center;flex-direction: column;margin-left: 20px"
@@ -645,12 +644,10 @@ const onConfirm = () => {
     return
   }
   // 唯一码收集
-  if (uniqueRuleList.value.length > 0) {
-    if (uniqueCodeList.value.length != searchCount.value) {
+  if (uniqueRuleList.value.length > 0 && uniqueCodeList.value.length != searchCount.value) {
       scanType.value = 3
       uniqueCodeRef.value?.show('', '请扫描唯一码', `收货数量:${searchCount.value}`, uniqueRuleMap.value)
       return
-    }
   }
   receiving()
 }