change mirror
Some checks failed
Some checks failed
This commit is contained in:
parent
0543936df8
commit
4284aff3bb
26
.github/workflows/ci.yaml
vendored
26
.github/workflows/ci.yaml
vendored
@ -6,6 +6,9 @@ on:
|
||||
pull_request:
|
||||
branches: [ main, master, develop ]
|
||||
|
||||
env:
|
||||
NODE_MIRROR: 'https://npmmirror.com/mirrors/node'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@ -23,9 +26,14 @@ jobs:
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
registry-url: 'https://registry.npmmirror.com'
|
||||
env:
|
||||
NODE_MIRROR: 'https://npmmirror.com/mirrors/node'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
env:
|
||||
NODE_REGISTRY: 'https://registry.npmmirror.com'
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
@ -49,9 +57,14 @@ jobs:
|
||||
with:
|
||||
node-version: '20.x'
|
||||
cache: 'npm'
|
||||
registry-url: 'https://registry.npmmirror.com'
|
||||
env:
|
||||
NODE_MIRROR: 'https://npmmirror.com/mirrors/node'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
env:
|
||||
NODE_REGISTRY: 'https://registry.npmmirror.com'
|
||||
|
||||
- name: Run ESLint
|
||||
run: npm run lint
|
||||
@ -72,9 +85,14 @@ jobs:
|
||||
with:
|
||||
node-version: '20.x'
|
||||
cache: 'npm'
|
||||
registry-url: 'https://registry.npmmirror.com'
|
||||
env:
|
||||
NODE_MIRROR: 'https://npmmirror.com/mirrors/node'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
env:
|
||||
NODE_REGISTRY: 'https://registry.npmmirror.com'
|
||||
|
||||
- name: Run tests
|
||||
run: npm run test
|
||||
@ -106,6 +124,14 @@ jobs:
|
||||
- name: Checkout code
|
||||
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
|
||||
run: npm audit --audit-level=moderate
|
||||
continue-on-error: true
|
||||
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal 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>
|
||||
26
node_modules/.vite/deps/_metadata.json
generated
vendored
26
node_modules/.vite/deps/_metadata.json
generated
vendored
@ -1,71 +1,71 @@
|
||||
{
|
||||
"hash": "c8d6646a",
|
||||
"browserHash": "51f44cd9",
|
||||
"hash": "a0d5344e",
|
||||
"browserHash": "906d96e7",
|
||||
"optimized": {
|
||||
"@element-plus/icons-vue": {
|
||||
"src": "../../@element-plus/icons-vue/dist/index.js",
|
||||
"file": "@element-plus_icons-vue.js",
|
||||
"fileHash": "e1804a89",
|
||||
"fileHash": "b0bff00e",
|
||||
"needsInterop": false
|
||||
},
|
||||
"axios": {
|
||||
"src": "../../axios/index.js",
|
||||
"file": "axios.js",
|
||||
"fileHash": "5e251265",
|
||||
"fileHash": "3661d772",
|
||||
"needsInterop": false
|
||||
},
|
||||
"crypto-js": {
|
||||
"src": "../../crypto-js/index.js",
|
||||
"file": "crypto-js.js",
|
||||
"fileHash": "04a448bd",
|
||||
"fileHash": "42456c05",
|
||||
"needsInterop": true
|
||||
},
|
||||
"dayjs": {
|
||||
"src": "../../dayjs/dayjs.min.js",
|
||||
"file": "dayjs.js",
|
||||
"fileHash": "0e7fdea7",
|
||||
"fileHash": "00d3ce60",
|
||||
"needsInterop": true
|
||||
},
|
||||
"element-plus": {
|
||||
"src": "../../element-plus/es/index.mjs",
|
||||
"file": "element-plus.js",
|
||||
"fileHash": "aee2348a",
|
||||
"fileHash": "8289c005",
|
||||
"needsInterop": false
|
||||
},
|
||||
"element-plus/es/locale/lang/zh-cn": {
|
||||
"src": "../../element-plus/es/locale/lang/zh-cn.mjs",
|
||||
"file": "element-plus_es_locale_lang_zh-cn.js",
|
||||
"fileHash": "76c0457d",
|
||||
"fileHash": "2b74d0fe",
|
||||
"needsInterop": false
|
||||
},
|
||||
"jsbarcode": {
|
||||
"src": "../../jsbarcode/bin/JsBarcode.js",
|
||||
"file": "jsbarcode.js",
|
||||
"fileHash": "85a1d1c7",
|
||||
"fileHash": "5774375a",
|
||||
"needsInterop": true
|
||||
},
|
||||
"json-bigint": {
|
||||
"src": "../../json-bigint/index.js",
|
||||
"file": "json-bigint.js",
|
||||
"fileHash": "c0eb862c",
|
||||
"fileHash": "a76f358e",
|
||||
"needsInterop": true
|
||||
},
|
||||
"pinia": {
|
||||
"src": "../../pinia/dist/pinia.mjs",
|
||||
"file": "pinia.js",
|
||||
"fileHash": "d3cad104",
|
||||
"fileHash": "3c37150a",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vue": {
|
||||
"src": "../../vue/dist/vue.runtime.esm-bundler.js",
|
||||
"file": "vue.js",
|
||||
"fileHash": "7f734e4f",
|
||||
"fileHash": "c01889f7",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vue-router": {
|
||||
"src": "../../vue-router/dist/vue-router.mjs",
|
||||
"file": "vue-router.js",
|
||||
"fileHash": "fd382cd4",
|
||||
"fileHash": "ced1274b",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -104,6 +104,7 @@
|
||||
import { ref, onMounted, onBeforeUnmount, watch, computed, Ref, nextTick, unref, inject, provide } from 'vue'
|
||||
import { ElButton, ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { createPurchaseOrderWithWave, releaseWave, updatePurchaseOrder } from '@/api/purchase-order'
|
||||
import { getWaveStatusById } from '@/api/wave-task.js'
|
||||
import type { GoodsInfo } from './goodsInfo.vue'
|
||||
import SuitBookDialog from './suitBookDialog.vue'
|
||||
import OcrResultDialog from './OcrResultDialog.vue'
|
||||
@ -1961,6 +1962,16 @@ async function handleScannedCode(code: string) {
|
||||
}
|
||||
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格式验证
|
||||
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>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@ -51,6 +51,7 @@ import GoodsInfo from '@/components/wave/goodsInfo.vue'
|
||||
import type { GoodsInfo as GoodsInfoType } from '@/components/wave/goodsInfo.vue'
|
||||
import GoosList from '@/components/wave/goosList.vue'
|
||||
import Car from '@/components/wave/car.vue'
|
||||
import { getWaveStatusById } from '@/api/wave-task.js'
|
||||
|
||||
// 定义 Image 接口
|
||||
interface Image {
|
||||
@ -114,6 +115,8 @@ watch(() => image.value.isbn, (newIsbn) => {
|
||||
// Camera 组件 ref,用于读取活跃波次状态和调用查询方法
|
||||
const cameraRef = ref<{
|
||||
hasActiveWave?: boolean
|
||||
currentWaveId?: number | null
|
||||
waveNo?: string
|
||||
loadBookInfo?: (isbn: string) => Promise<void>
|
||||
handleScannedCode?: (code: string) => Promise<void>
|
||||
} | null>(null)
|
||||
@ -382,9 +385,22 @@ function switchWarehouse(warehouseId: number) {
|
||||
/**
|
||||
* 处理 ISBN 查询——调用 camera.vue 的 loadBookInfo 方法
|
||||
* 与隐藏扫码输入框的 handleScan 执行相同的 ISBN 查询逻辑,但不执行快捷键识别
|
||||
* 当存在活跃波次时,先查询波次状态并打印到控制台
|
||||
*/
|
||||
function handleIsbnQuery(isbn: string) {
|
||||
const cam = cameraRef.value as { loadBookInfo?: (isbn: string) => Promise<void> } | null
|
||||
async function handleIsbnQuery(isbn: string) {
|
||||
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) {
|
||||
cam.loadBookInfo(isbn)
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user