change mirror
Some checks failed
CI / build (18.x) (push) Failing after 17m19s
CI / build (20.x) (push) Failing after 1m33s
CI / deploy-preview (push) Has been skipped
CI / lint (push) Failing after 1m32s
CI / test (push) Failing after 32s
CI / security (push) Failing after 32s

This commit is contained in:
97694731 2026-06-04 11:39:58 +08:00
parent 0543936df8
commit 4284aff3bb
6 changed files with 76 additions and 17 deletions

View File

@ -6,6 +6,9 @@ on:
pull_request: pull_request:
branches: [ main, master, develop ] branches: [ main, master, develop ]
env:
NODE_MIRROR: 'https://npmmirror.com/mirrors/node'
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -23,9 +26,14 @@ jobs:
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'npm' cache: 'npm'
registry-url: 'https://registry.npmmirror.com'
env:
NODE_MIRROR: 'https://npmmirror.com/mirrors/node'
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
env:
NODE_REGISTRY: 'https://registry.npmmirror.com'
- name: Build - name: Build
run: npm run build run: npm run build
@ -49,9 +57,14 @@ jobs:
with: with:
node-version: '20.x' node-version: '20.x'
cache: 'npm' cache: 'npm'
registry-url: 'https://registry.npmmirror.com'
env:
NODE_MIRROR: 'https://npmmirror.com/mirrors/node'
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
env:
NODE_REGISTRY: 'https://registry.npmmirror.com'
- name: Run ESLint - name: Run ESLint
run: npm run lint run: npm run lint
@ -72,9 +85,14 @@ jobs:
with: with:
node-version: '20.x' node-version: '20.x'
cache: 'npm' cache: 'npm'
registry-url: 'https://registry.npmmirror.com'
env:
NODE_MIRROR: 'https://npmmirror.com/mirrors/node'
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
env:
NODE_REGISTRY: 'https://registry.npmmirror.com'
- name: Run tests - name: Run tests
run: npm run test run: npm run test
@ -106,6 +124,14 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmmirror.com'
env:
NODE_MIRROR: 'https://npmmirror.com/mirrors/node'
- name: Run npm audit - name: Run npm audit
run: npm audit --audit-level=moderate run: npm audit --audit-level=moderate
continue-on-error: true continue-on-error: true

6
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -1,71 +1,71 @@
{ {
"hash": "c8d6646a", "hash": "a0d5344e",
"browserHash": "51f44cd9", "browserHash": "906d96e7",
"optimized": { "optimized": {
"@element-plus/icons-vue": { "@element-plus/icons-vue": {
"src": "../../@element-plus/icons-vue/dist/index.js", "src": "../../@element-plus/icons-vue/dist/index.js",
"file": "@element-plus_icons-vue.js", "file": "@element-plus_icons-vue.js",
"fileHash": "e1804a89", "fileHash": "b0bff00e",
"needsInterop": false "needsInterop": false
}, },
"axios": { "axios": {
"src": "../../axios/index.js", "src": "../../axios/index.js",
"file": "axios.js", "file": "axios.js",
"fileHash": "5e251265", "fileHash": "3661d772",
"needsInterop": false "needsInterop": false
}, },
"crypto-js": { "crypto-js": {
"src": "../../crypto-js/index.js", "src": "../../crypto-js/index.js",
"file": "crypto-js.js", "file": "crypto-js.js",
"fileHash": "04a448bd", "fileHash": "42456c05",
"needsInterop": true "needsInterop": true
}, },
"dayjs": { "dayjs": {
"src": "../../dayjs/dayjs.min.js", "src": "../../dayjs/dayjs.min.js",
"file": "dayjs.js", "file": "dayjs.js",
"fileHash": "0e7fdea7", "fileHash": "00d3ce60",
"needsInterop": true "needsInterop": true
}, },
"element-plus": { "element-plus": {
"src": "../../element-plus/es/index.mjs", "src": "../../element-plus/es/index.mjs",
"file": "element-plus.js", "file": "element-plus.js",
"fileHash": "aee2348a", "fileHash": "8289c005",
"needsInterop": false "needsInterop": false
}, },
"element-plus/es/locale/lang/zh-cn": { "element-plus/es/locale/lang/zh-cn": {
"src": "../../element-plus/es/locale/lang/zh-cn.mjs", "src": "../../element-plus/es/locale/lang/zh-cn.mjs",
"file": "element-plus_es_locale_lang_zh-cn.js", "file": "element-plus_es_locale_lang_zh-cn.js",
"fileHash": "76c0457d", "fileHash": "2b74d0fe",
"needsInterop": false "needsInterop": false
}, },
"jsbarcode": { "jsbarcode": {
"src": "../../jsbarcode/bin/JsBarcode.js", "src": "../../jsbarcode/bin/JsBarcode.js",
"file": "jsbarcode.js", "file": "jsbarcode.js",
"fileHash": "85a1d1c7", "fileHash": "5774375a",
"needsInterop": true "needsInterop": true
}, },
"json-bigint": { "json-bigint": {
"src": "../../json-bigint/index.js", "src": "../../json-bigint/index.js",
"file": "json-bigint.js", "file": "json-bigint.js",
"fileHash": "c0eb862c", "fileHash": "a76f358e",
"needsInterop": true "needsInterop": true
}, },
"pinia": { "pinia": {
"src": "../../pinia/dist/pinia.mjs", "src": "../../pinia/dist/pinia.mjs",
"file": "pinia.js", "file": "pinia.js",
"fileHash": "d3cad104", "fileHash": "3c37150a",
"needsInterop": false "needsInterop": false
}, },
"vue": { "vue": {
"src": "../../vue/dist/vue.runtime.esm-bundler.js", "src": "../../vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js", "file": "vue.js",
"fileHash": "7f734e4f", "fileHash": "c01889f7",
"needsInterop": false "needsInterop": false
}, },
"vue-router": { "vue-router": {
"src": "../../vue-router/dist/vue-router.mjs", "src": "../../vue-router/dist/vue-router.mjs",
"file": "vue-router.js", "file": "vue-router.js",
"fileHash": "fd382cd4", "fileHash": "ced1274b",
"needsInterop": false "needsInterop": false
} }
}, },

View File

@ -22,7 +22,7 @@
<el-button type="primary">修改</el-button> <el-button type="primary">修改</el-button>
<el-button type="primary">删除</el-button> <el-button type="primary">删除</el-button>
<el-button type="primary">导出</el-button> <el-button type="primary">导出</el-button>
<el-button type="primary">到处模板</el-button> <el-button type="primary">导出模板</el-button>
<el-button type="primary">导入</el-button> <el-button type="primary">导入</el-button>
<el-button type="primary">发布</el-button> <el-button type="primary">发布</el-button>
<el-button type="primary">一键发布</el-button> <el-button type="primary">一键发布</el-button>

View File

@ -104,6 +104,7 @@
import { ref, onMounted, onBeforeUnmount, watch, computed, Ref, nextTick, unref, inject, provide } from 'vue' import { ref, onMounted, onBeforeUnmount, watch, computed, Ref, nextTick, unref, inject, provide } from 'vue'
import { ElButton, ElMessage, ElMessageBox } from 'element-plus' import { ElButton, ElMessage, ElMessageBox } from 'element-plus'
import { createPurchaseOrderWithWave, releaseWave, updatePurchaseOrder } from '@/api/purchase-order' import { createPurchaseOrderWithWave, releaseWave, updatePurchaseOrder } from '@/api/purchase-order'
import { getWaveStatusById } from '@/api/wave-task.js'
import type { GoodsInfo } from './goodsInfo.vue' import type { GoodsInfo } from './goodsInfo.vue'
import SuitBookDialog from './suitBookDialog.vue' import SuitBookDialog from './suitBookDialog.vue'
import OcrResultDialog from './OcrResultDialog.vue' import OcrResultDialog from './OcrResultDialog.vue'
@ -1961,6 +1962,16 @@ async function handleScannedCode(code: string) {
} }
emit('update:modelValue', newFormData) emit('update:modelValue', newFormData)
//
if (hasActiveWave.value && currentWaveId.value) {
try {
const res = await getWaveStatusById(currentWaveId.value)
console.log('[WaveStatus] 波次状态:', res)
} catch (err) {
console.error('[WaveStatus] 查询失败:', err)
}
}
// ISBN // ISBN
if (isValidISBN13(normalizedCode) || isValidISBN10(normalizedCode)) { if (isValidISBN13(normalizedCode) || isValidISBN10(normalizedCode)) {
// 使 // 使
@ -2879,7 +2890,7 @@ async function callSyncBookApi(params: {
} }
} }
defineExpose({ hasActiveWave, handlePhotoAction, retakePhoto, loadBookInfo }) defineExpose({ hasActiveWave, handlePhotoAction, retakePhoto, loadBookInfo, currentWaveId, waveNo })
</script> </script>
<style scoped> <style scoped>

View File

@ -51,6 +51,7 @@ import GoodsInfo from '@/components/wave/goodsInfo.vue'
import type { GoodsInfo as GoodsInfoType } from '@/components/wave/goodsInfo.vue' import type { GoodsInfo as GoodsInfoType } from '@/components/wave/goodsInfo.vue'
import GoosList from '@/components/wave/goosList.vue' import GoosList from '@/components/wave/goosList.vue'
import Car from '@/components/wave/car.vue' import Car from '@/components/wave/car.vue'
import { getWaveStatusById } from '@/api/wave-task.js'
// Image // Image
interface Image { interface Image {
@ -114,6 +115,8 @@ watch(() => image.value.isbn, (newIsbn) => {
// Camera ref // Camera ref
const cameraRef = ref<{ const cameraRef = ref<{
hasActiveWave?: boolean hasActiveWave?: boolean
currentWaveId?: number | null
waveNo?: string
loadBookInfo?: (isbn: string) => Promise<void> loadBookInfo?: (isbn: string) => Promise<void>
handleScannedCode?: (code: string) => Promise<void> handleScannedCode?: (code: string) => Promise<void>
} | null>(null) } | null>(null)
@ -382,9 +385,22 @@ function switchWarehouse(warehouseId: number) {
/** /**
* 处理 ISBN 查询调用 camera.vue loadBookInfo 方法 * 处理 ISBN 查询调用 camera.vue loadBookInfo 方法
* 与隐藏扫码输入框的 handleScan 执行相同的 ISBN 查询逻辑但不执行快捷键识别 * 与隐藏扫码输入框的 handleScan 执行相同的 ISBN 查询逻辑但不执行快捷键识别
* 当存在活跃波次时先查询波次状态并打印到控制台
*/ */
function handleIsbnQuery(isbn: string) { async function handleIsbnQuery(isbn: string) {
const cam = cameraRef.value as { loadBookInfo?: (isbn: string) => Promise<void> } | null const cam = cameraRef.value
if (!cam) return
//
if (cam.hasActiveWave && cam.currentWaveId) {
try {
const res = await getWaveStatusById(cam.currentWaveId)
console.log('[WaveStatus] 波次状态:', res)
} catch (err) {
console.error('[WaveStatus] 查询失败:', err)
}
}
if (cam?.loadBookInfo) { if (cam?.loadBookInfo) {
cam.loadBookInfo(isbn) cam.loadBookInfo(isbn)
} else { } else {