diff --git a/src/views/stock/component/apply-form.vue b/src/views/stock/component/apply-form.vue index baf6a66..3ffc896 100644 --- a/src/views/stock/component/apply-form.vue +++ b/src/views/stock/component/apply-form.vue @@ -151,9 +151,9 @@ // 选中时在末尾新增一行 // value: number, option: { label: string, value: number } - const insertEvent = (value: string) => { + const insertEvent = (value: string | number) => { // 根据value找到对应的物料信息 - const m = materialList.value.find((item) => item.id === (value ? parseInt(value) : -1)) + const m = materialList.value.find((item) => item.id === value) if (m) { const row: RowVO = { id: m.id ? m.id : -1, @@ -174,12 +174,12 @@ } // 取消选中时,删除table中的行 - const removeEvent = (value: string) => { + const removeEvent = (value: string | number) => { const $table = tableRef.value // 根据value找到对应的行 if ($table) { $table.getTableData().fullData.forEach((item) => { - if (item.id === (value ? parseInt(value) : -1)) { + if (item.id === value) { $table.remove(item) } }) diff --git a/vite.config.ts b/vite.config.ts index d937eee..b95741e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -60,7 +60,7 @@ export default defineConfig(({ mode }) => { proxy: { '/api': { // target: 'https://iot.riemann.tech/api/', - target: 'http://127.0.0.1:7777', + target: 'http://127.0.0.1:8888', changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ''), },