|
|
@@ -267,7 +267,9 @@
|
|
|
<van-col span="4">
|
|
|
<van-image
|
|
|
:key="`box-photos-${index}-${imgIndex}`"
|
|
|
- @click="previewImages(item.boxPhotos,imgIndex,'外箱图')"
|
|
|
+ @click="
|
|
|
+ previewImages(item.boxPhotos, imgIndex, '外箱图')
|
|
|
+ "
|
|
|
width="100%"
|
|
|
height="50"
|
|
|
:src="i.src"
|
|
|
@@ -286,7 +288,13 @@
|
|
|
<van-col span="4">
|
|
|
<van-image
|
|
|
:key="`product-photos-${index}-${imgIndex}`"
|
|
|
- @click="previewImages(item.productPhotos,imgIndex,'内物图')"
|
|
|
+ @click="
|
|
|
+ previewImages(
|
|
|
+ item.productPhotos,
|
|
|
+ imgIndex,
|
|
|
+ '内物图',
|
|
|
+ )
|
|
|
+ "
|
|
|
width="100%"
|
|
|
height="50"
|
|
|
:src="i.src"
|
|
|
@@ -684,7 +692,7 @@ import {
|
|
|
showConfirmDialog,
|
|
|
showImagePreview,
|
|
|
} from 'vant'
|
|
|
-import { getHeader, goBack } from '@/utils/android'
|
|
|
+import { getHeader, goBack, scanError, scanSuccess } from '@/utils/android'
|
|
|
import {
|
|
|
deleteDetails,
|
|
|
getQualityInspection,
|
|
|
@@ -805,9 +813,6 @@ onMounted(() => {
|
|
|
})
|
|
|
logisticsMap.value = map
|
|
|
})
|
|
|
- try {
|
|
|
- getHeader()
|
|
|
- } catch (error) {}
|
|
|
})
|
|
|
|
|
|
// 商品外箱图
|
|
|
@@ -1030,6 +1035,7 @@ function getOwnerName(owner) {
|
|
|
|
|
|
// 仓库名
|
|
|
function getWarehouseName() {
|
|
|
+ console.log()
|
|
|
return warehousesMap.value[params.value.warehouseCode]
|
|
|
}
|
|
|
|
|
|
@@ -1043,6 +1049,7 @@ function inputExpressNo() {
|
|
|
const express_no = initExpressNo(no)
|
|
|
if (!express_no || express_no.length === 0) {
|
|
|
showFailToast('快递单号异常')
|
|
|
+ scanError()
|
|
|
return
|
|
|
}
|
|
|
params.value.returnNo = express_no
|
|
|
@@ -1084,11 +1091,13 @@ function matchReturned(express_no) {
|
|
|
matchOrder(express_no)
|
|
|
expressNo.value = null
|
|
|
showInitialPage.value = false
|
|
|
+ scanSuccess()
|
|
|
} else {
|
|
|
showNotify({
|
|
|
type: 'danger',
|
|
|
message: '当前退回单号已进行过登记 如需修改请前往PC端进行',
|
|
|
})
|
|
|
+ scanSuccess()
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -1323,6 +1332,7 @@ function showQualityStatus() {
|
|
|
scancodeDialog.value = true
|
|
|
return
|
|
|
}
|
|
|
+ scanSuccess()
|
|
|
qualityStatusDialog.value = true
|
|
|
qualityStatus.value = '正品'
|
|
|
}
|
|
|
@@ -1339,6 +1349,7 @@ async function queryBarcode() {
|
|
|
if (ownerCode) {
|
|
|
const result = await queryOwnerBarcode(ownerCode, barcode)
|
|
|
if (result) {
|
|
|
+ scanSuccess()
|
|
|
scancodeDialog.value = false
|
|
|
qualityStatusDialog.value = false
|
|
|
closeToast()
|
|
|
@@ -1356,12 +1367,10 @@ async function queryBarcode() {
|
|
|
// 根据获取查询信息
|
|
|
async function queryOwnerBarcode(ownerCode, barcode) {
|
|
|
try {
|
|
|
- console.log('queryOwnerBarcode')
|
|
|
const results = await searchOwnerBarcode({ ownerCode, barcode })
|
|
|
const {
|
|
|
data: { basSku },
|
|
|
} = results
|
|
|
- console.log(results)
|
|
|
if (!basSku) {
|
|
|
return false
|
|
|
}
|
|
|
@@ -1383,11 +1392,14 @@ async function queryBarcodeBy(barcode) {
|
|
|
return null
|
|
|
}
|
|
|
if (!basSku) {
|
|
|
+ scanError()
|
|
|
return null
|
|
|
}
|
|
|
addDetailByBasSku(basSku)
|
|
|
+ scanSuccess()
|
|
|
return null
|
|
|
} catch (err) {
|
|
|
+ scanError()
|
|
|
console.log(err.message)
|
|
|
}
|
|
|
return null
|
|
|
@@ -1422,8 +1434,6 @@ const accessories = ref([])
|
|
|
const showAccessories = ref(false)
|
|
|
|
|
|
function showAccessoriesItems(items) {
|
|
|
- console.log(items)
|
|
|
- console.log(!items || items.length === 0)
|
|
|
if (!items || items.length === 0) {
|
|
|
accessories.value = []
|
|
|
showAccessories.value = false
|
|
|
@@ -1464,18 +1474,18 @@ const manufactureTimeConfirm = async (result) => {
|
|
|
// 正确解构参数
|
|
|
const { selectedValues } = result
|
|
|
const [year, month, day] = selectedValues
|
|
|
- const formattedMonth = month.padStart(2, '0')
|
|
|
- const formattedDay = day.padStart(2, '0')
|
|
|
- const manufactureTime = `${year}-${formattedMonth}-${formattedDay}`
|
|
|
+ const formatted_month = month.padStart(2, '0')
|
|
|
+ const formatted_day = day.padStart(2, '0')
|
|
|
+ const manufactureTime = `${year}-${formatted_month}-${formatted_day}`
|
|
|
const { sku } = selectDetail.value
|
|
|
const { ownerCode } = params.value
|
|
|
- const isValid = await checkValidateDate(
|
|
|
+ const check_validate_date = await checkValidateDate(
|
|
|
ownerCode,
|
|
|
sku,
|
|
|
manufactureTime,
|
|
|
'manufactureTime',
|
|
|
)
|
|
|
- if (!isValid) {
|
|
|
+ if (!check_validate_date) {
|
|
|
console.log('检验出现异常')
|
|
|
return
|
|
|
}
|
|
|
@@ -1493,21 +1503,21 @@ const validityTimeConfirm = async (result) => {
|
|
|
// 正确解构参数
|
|
|
const { selectedValues } = result
|
|
|
const [year, month, day] = selectedValues
|
|
|
- const formattedMonth = month.padStart(2, '0')
|
|
|
- const formattedDay = day.padStart(2, '0')
|
|
|
- const validityTime = `${year}-${formattedMonth}-${formattedDay}`
|
|
|
+ const formatted_month = month.padStart(2, '0')
|
|
|
+ const formatted_day = day.padStart(2, '0')
|
|
|
+ const validityTime = `${year}-${formatted_month}-${formatted_day}`
|
|
|
const { sku } = selectDetail.value
|
|
|
- const { owner: ownerCode } = params.value
|
|
|
- const isValid = await checkValidateDate(
|
|
|
+ const { ownerCode } = params.value
|
|
|
+ const check_validate_date = await checkValidateDate(
|
|
|
ownerCode,
|
|
|
sku,
|
|
|
validityTime,
|
|
|
'validityTime',
|
|
|
)
|
|
|
- if (!isValid) {
|
|
|
+ if (!check_validate_date) {
|
|
|
return
|
|
|
}
|
|
|
- selectDetail.value.validityTime = `${year}-${formattedMonth}-${formattedDay}`
|
|
|
+ selectDetail.value.validityTime = `${year}-${formatted_month}-${formatted_day}`
|
|
|
showValidityTime.value = false
|
|
|
}
|
|
|
|
|
|
@@ -1530,26 +1540,27 @@ const addDetails = async () => {
|
|
|
return true
|
|
|
}
|
|
|
const {
|
|
|
- sku: detailSku,
|
|
|
- batchNumber: detailBatchNumber,
|
|
|
- validityTime: detailValidityTime,
|
|
|
- manufactureTime: detailManufactureTime,
|
|
|
- qualityStatus: detailQualityStatus,
|
|
|
+ sku: detail_sku,
|
|
|
+ batchNumber: detail_batch_number,
|
|
|
+ validityTime: detail_validity_time,
|
|
|
+ manufactureTime: detail_manufacture_time,
|
|
|
+ qualityStatus: detail_quality_status,
|
|
|
number: detailNumber,
|
|
|
} = selectDetail.value
|
|
|
- if (['次品', '待修复'].includes(detailQualityStatus)) {
|
|
|
+ if (['次品', '待修复'].includes(detail_quality_status)) {
|
|
|
params.value.details.push(detail)
|
|
|
+ initDetail()
|
|
|
return
|
|
|
}
|
|
|
const searchIndex = params.value.details.findIndex((item) => {
|
|
|
const { sku, batchNumber, qualityStatus, validityTime, manufactureTime } =
|
|
|
item
|
|
|
return (
|
|
|
- sku === detailSku &&
|
|
|
- batchNumber === detailBatchNumber &&
|
|
|
- detailValidityTime === validityTime &&
|
|
|
- detailManufactureTime === manufactureTime &&
|
|
|
- detailQualityStatus === qualityStatus
|
|
|
+ sku === detail_sku &&
|
|
|
+ batchNumber === detail_batch_number &&
|
|
|
+ detail_validity_time === validityTime &&
|
|
|
+ detail_manufacture_time === manufactureTime &&
|
|
|
+ detail_quality_status === qualityStatus
|
|
|
)
|
|
|
})
|
|
|
if (searchIndex > -1) {
|
|
|
@@ -2059,7 +2070,7 @@ function previewImages(filenames, index, type) {
|
|
|
images.push(src)
|
|
|
}
|
|
|
}
|
|
|
- if(!images || images.length === 0) {
|
|
|
+ if (!images || images.length === 0) {
|
|
|
return
|
|
|
}
|
|
|
showImagePreview({
|