Browse Source

加工组扫描-后端

lisongyi 2 weeks ago
parent
commit
7a93a71167
2 changed files with 14 additions and 5 deletions
  1. 5 4
      src/api/processing/index.ts
  2. 9 1
      src/views/processing/groupScan/index.vue

+ 5 - 4
src/api/processing/index.ts

@@ -108,14 +108,15 @@ export function status(){
 }
 
 /**
- * 加工组扫描 - 提交快递单号
+ * 加工组扫描 - 提交快递单号,更新签收类型为加工
  * @param deliveryNo 快递单号
+ * @param warehouse 仓库编码
  */
-export function submitProcessingGroupScan(deliveryNo: string) {
+export function submitProcessingGroupScan(deliveryNo: string, warehouse: string) {
   return request({
-    url: '/api/wms/processing/group-scan',
+    url: '/api/entryOrder/processing/group-scan',
     method: 'post',
-    data: { deliveryNo },
+    data: { deliveryNo, warehouse },
   })
 }
 

+ 9 - 1
src/views/processing/groupScan/index.vue

@@ -69,6 +69,7 @@ import { submitProcessingGroupScan } from '@/api/processing/index'
 import { androidFocus, getHeader, goBack, scanSuccess, scanError } from '@/utils/android'
 import { closeListener, openListener, scanInit } from '@/utils/keydownListener'
 import { barcodeToUpperCase } from '@/utils/dataType'
+import { useStore } from '@/store/modules/user'
 
 try {
   getHeader()
@@ -77,6 +78,9 @@ try {
   console.log(error)
 }
 
+const store = useStore()
+const warehouse = store.warehouse
+
 const submitting = ref(false)
 const expressNo = ref('')
 const expressNoRef = ref(null)
@@ -92,12 +96,16 @@ const handleSubmit = async () => {
     return
   }
   if (submitting.value) return
+  if (!warehouse) {
+    showFailToast('未获取到仓库信息')
+    return
+  }
 
   submitting.value = true
   showLoadingToast({ message: '提交中...', forbidClick: true })
 
   try {
-    const response = await submitProcessingGroupScan(deliveryNo)
+    const response = await submitProcessingGroupScan(deliveryNo, warehouse)
     closeToast()
     if (response.code === 200) {
       showNotify({ type: 'success', message: '提交成功' })