Kaynağa Gözat

Merge branch 'zhaohuanhuan_组合商品唯一码' into testing

zhaohuanhuan 1 hafta önce
ebeveyn
işleme
65a0eac5f0

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

@@ -14,6 +14,9 @@
 <!--            <van-button type="primary" size="mini" :plain="!newCheckAllType" @click="onCheckAllType" icon="exchange"  >条码校验</van-button>-->
           </div>
         </div>
+        <div v-if="combineSetCount > 0" class="combine-set-info">
+          组合{{ combineSetCount }}套 | 唯一码{{ containerList.length }}/{{ searchCount }}
+        </div>
         <div class="unique-input-list" v-if="newCheckAllType">
           <div class="unique-input-list-left">商品条码:</div>
           <div class="unique-input-list-right">
@@ -87,6 +90,8 @@ const props = defineProps({
   searchCount: [String, Number],
   asnInfo:Object,
   checkAllType:Boolean,
+  /** 组合商品收货套数,大于 0 时在弹窗内展示 */
+  combineSetCount: { type: Number, default: 0 },
   /** 组合外箱码获取内件码 */
   resolvePanpassCodes: { type: Function, default: undefined },
 })
@@ -278,5 +283,13 @@ defineExpose({ show ,uniqueBarcode,uniqueCodeScanType })
     font-size: 14px
     color: #ff4141
     line-height: 20px
+  .combine-set-info
+    font-size: 14px
+    color: #1989fa
+    font-weight: bold
+    line-height: 22px
+    padding: 4px 15px 0
+    width: 100%
+    box-sizing: border-box
 
 </style>

+ 10 - 3
src/views/inbound/takeDelivery/task/index.vue

@@ -137,6 +137,7 @@
                      v-model:scanType="scanType"
                      v-model:checkAllType="checkAllType"
                      :searchCount="searchCount"
+                     :combine-set-count="combineReceivingSetCount"
                      :asnInfo="asnInfo"
                      :resolve-panpass-codes="isCombinePanpass ? resolvePanpassScan : undefined"
                      @setUniqueCode="onConfirm"
@@ -345,6 +346,8 @@ const combineMatchedSku = ref([])
 const combineAsnSelectList = ref([])
 const isCombineSelectMode = ref(false)
 const combineReceivingData = ref([]) // 确认实收数后暂存,完成收货时提交
+/** 组合商品收货套数 */
+const combineReceivingSetCount = ref(0)
 
 /** 重置组合收货状态 */
 function resetCombineProductState() {
@@ -353,6 +356,7 @@ function resetCombineProductState() {
   combineAsnSelectList.value = []
   isCombineSelectMode.value = false
   combineReceivingData.value = []
+  combineReceivingSetCount.value = 0
   asnDetailsTrueFalseBy.value = false
 }
 
@@ -529,6 +533,7 @@ const onCombineCancel = () => {
   const total = combineMatchedSku.value.reduce((sum, row) => sum + (row.matchedJson?.quantity || 0), 0)
   searchCount.value = total ? String(total) : '1'
   combineReceivingData.value = []
+  combineReceivingSetCount.value = 0
 }
 
 const _onCombineAsnSelected = (item) => {
@@ -539,12 +544,14 @@ const _onCombineAsnSelected = (item) => {
 }
 
 // 组合商品确认实收数
-const setCombineReceiving = ({ dataList }) => {
+const setCombineReceiving = ({ dataList, count: setCount }) => {
   if (!dataList?.length) return
   const total = dataList.reduce((sum, row) => sum + (row.quantity || 0), 0)
   searchCount.value = String(total)
   combineReceivingData.value = dataList
-  showNotify({ type: 'success', duration: 2000, message: `已填入收货数量:${total},请点击完成收货提交` })
+  const sets = Number(setCount) > 0 ? Number(setCount) : 0
+  combineReceivingSetCount.value = sets
+  showNotify({ type: 'success', duration: 2000, message: `收货套数:${sets},共 ${total} 件,请点击完成收货提交` })
 }
 
 // 条码扫描:scanType 2商品/4数量/3唯一码/5容器
@@ -878,7 +885,7 @@ const isCheck = () => {
   if (needUnique && uniqueCodeList.value.length != searchCount.value) {
       scanType.value = 3
       const tips = isCombinePanpass.value
-        ? `收货数量:${searchCount.value},请逐套扫描组合外箱唯一码`
+        ? `收货数量:${searchCount.value},请扫描组合外箱唯一码`
         : `收货数量:${searchCount.value}`
       uniqueCodeRef.value?.show('', '请扫描唯一码', tips, uniqueRuleMap.value)
       return false