20260608173128

This commit is contained in:
oneao committed 2026-06-08 17:31:29 +08:00
1 parent 930f03954a
commit 65685d1a6a
29 files changed
+289 -58

No files matched your search

@@ -28,18 +28,30 @@ const subFileList2 = ref([]) // 发货单、签收单、过磅单
const tipContainerNo = ref('')
const initialized = ref(false)
onLoad(async () => {
toast.loading('正在初始化中...', {
overlay: true,
})
await getUniqueIdApi().then((res) => {
try {
const res = await getUniqueIdApi()
if (res.success) {
form.value.b_id = res.data
initialized.value = true
}
})
toast.hide()
else {
toast.fail('初始化失败,请重试')
}
}
catch (err) {
console.error('初始化失败:', err)
toast.fail('初始化失败,请重试')
}
finally {
toast.hide()
}
})
function handleBeforeChoose({ fileList, resolve }) {
@@ -156,6 +168,11 @@ function handleBeforeRemove({ file, fileList, resolve }) {
}
async function handleConfirm() {
if (!initialized.value) {
toast.fail('系统初始化未完成,请重试')
return
}
if (!boxImage.value) {
toast.fail('集装箱号图片不能为空')
return
@@ -348,12 +365,31 @@ function validateContainerNo(containerNo) {
}
async function continueAdd() {
const idRes = await getUniqueIdApi()
initialized.value = false
if (idRes.success) {
resetForm()
form.value.b_id = idRes.data
tipContainerNo.value = ''
toast.loading('正在初始化中...', {
overlay: true,
})
try {
const idRes = await getUniqueIdApi()
if (idRes.success) {
resetForm()
form.value.b_id = idRes.data
tipContainerNo.value = ''
initialized.value = true
}
else {
toast.fail('初始化失败,请重试')
}
}
catch (err) {
console.error('初始化失败:', err)
toast.fail('初始化失败,请重试')
}
finally {
toast.hide()
}
}
@@ -509,7 +545,6 @@ const templateCollapse = ref<string[]>(['template1'])
multiple
:accept="fileMode"
:max-size="50 * 1024 * 1024"
:before-choose="handleBeforeChoose"
/>
</view>
</wd-cell-group>