Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
黄南光
/
auto-restock
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8498df7b
authored
Nov 17, 2026
by
黄南光
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化前端
1 parent
dd0aa330
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
web/src/mobile/OrderPage.vue
web/src/mobile/mobile.css
web/src/mobile/OrderPage.vue
View file @
8498df7
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
单次补货只看结果和截图(提交在会话里 @机器人 回「确认提交」)。 -->
单次补货只看结果和截图(提交在会话里 @机器人 回「确认提交」)。 -->
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
'vant/lib/index.css'
import
'vant/lib/index.css'
import
{
Button
as
VanButton
,
Checkbox
as
VanCheckbox
,
Empty
as
VanEmpty
,
ImagePreview
as
VanImagePreview
,
import
{
Button
as
VanButton
,
Checkbox
as
VanCheckbox
,
Empty
as
VanEmpty
,
Loading
as
VanLoading
,
showConfirmDialog
,
showFailToast
,
showSuccessToast
,
Loading
as
VanLoading
,
showConfirmDialog
,
showFailToast
,
showSuccessToast
,
Stepper
as
VanStepper
}
from
'vant'
Stepper
as
VanStepper
}
from
'vant'
import
{
computed
,
onMounted
,
onUnmounted
,
ref
}
from
'vue'
import
{
computed
,
onMounted
,
onUnmounted
,
ref
}
from
'vue'
...
@@ -28,7 +28,6 @@ const busy = ref(false)
...
@@ -28,7 +28,6 @@ const busy = ref(false)
const
openSec
=
ref
<
Record
<
string
,
boolean
>>
({
stock
:
true
,
other
:
false
})
// 大组:常备件默认展开,其他出库件默认收起
const
openSec
=
ref
<
Record
<
string
,
boolean
>>
({
stock
:
true
,
other
:
false
})
// 大组:常备件默认展开,其他出库件默认收起
const
collapsed
=
ref
<
Record
<
string
,
boolean
>>
({})
// 二级分类折叠
const
collapsed
=
ref
<
Record
<
string
,
boolean
>>
({})
// 二级分类折叠
const
showExplain
=
ref
(
false
)
// 头部「口径说明」
const
showExplain
=
ref
(
false
)
// 头部「口径说明」
const
preview
=
ref
({
show
:
false
,
start
:
0
})
let
deadline
=
0
let
deadline
=
0
let
poll
:
any
=
null
let
poll
:
any
=
null
let
tick
:
any
=
null
let
tick
:
any
=
null
...
@@ -375,7 +374,8 @@ const fetchedAt = computed(() => String(st.value?.run.data_fetched_at || '').sli
...
@@ -375,7 +374,8 @@ const fetchedAt = computed(() => String(st.value?.run.data_fetched_at || '').sli
<div
v-else-if=
"status === 'awaiting_submit'"
class=
"m-po-sub"
>
不过期 · 提交前会先到 DMS 查这张单的状态
</div>
<div
v-else-if=
"status === 'awaiting_submit'"
class=
"m-po-sub"
>
不过期 · 提交前会先到 DMS 查这张单的状态
</div>
<div
v-if=
"st.shots_fallback"
class=
"m-fallback"
>
⚠ DMS 页面截图失败,以下截图是用 DMS 接口实际返回的数据渲染的,不是 DMS 原页面
</div>
<div
v-if=
"st.shots_fallback"
class=
"m-fallback"
>
⚠ DMS 页面截图失败,以下截图是用 DMS 接口实际返回的数据渲染的,不是 DMS 原页面
</div>
<div
v-if=
"st.shots.length"
class=
"m-shots"
>
<div
v-if=
"st.shots.length"
class=
"m-shots"
>
<img
v-for=
"(s, i) in st.shots"
:key=
"s.id"
:src=
"s.url"
alt=
"采购单截图"
@
click=
"preview = { show: true, start: i }"
/>
<el-image
v-for=
"s in st.shots"
:key=
"s.id"
:src=
"s.url"
:preview-src-list=
"st.shots.map((x: any) => x.url)"
:initial-index=
"st.shots.findIndex((x: any) => x.id === s.id)"
fit=
"contain"
alt=
"采购单截图"
/>
</div>
</div>
</div>
</div>
<div
v-if=
"status === 'submitting'"
class=
"m-card m-progress"
><van-loading
size=
"18"
/>
正在 DMS 提交…
</div>
<div
v-if=
"status === 'submitting'"
class=
"m-card m-progress"
><van-loading
size=
"18"
/>
正在 DMS 提交…
</div>
...
@@ -492,7 +492,6 @@ const fetchedAt = computed(() => String(st.value?.run.data_fetched_at || '').sli
...
@@ -492,7 +492,6 @@ const fetchedAt = computed(() => String(st.value?.run.data_fetched_at || '').sli
<van-button
v-else
class=
"m-bar-btn main"
disabled
:loading=
"true"
>
<van-button
v-else
class=
"m-bar-btn main"
disabled
:loading=
"true"
>
{{ ['scanning', 'refreshing', 'scan_retry'].includes(status) ? '正在取数(出库明细 → 库存 / 在途 / 可订)…' : st.stage_cn + '…' }}
</van-button>
{{ ['scanning', 'refreshing', 'scan_retry'].includes(status) ? '正在取数(出库明细 → 库存 / 在途 / 可订)…' : st.stage_cn + '…' }}
</van-button>
</div>
</div>
<van-image-preview
v-model:show=
"preview.show"
:images=
"st.shots.map((s: any) => s.url)"
:start-position=
"preview.start"
/>
</template>
</template>
</div>
</div>
</template>
</template>
web/src/mobile/mobile.css
View file @
8498df7
...
@@ -82,7 +82,8 @@
...
@@ -82,7 +82,8 @@
.m-label
{
font-size
:
12px
;
color
:
var
(
--c-text-3
);
}
.m-label
{
font-size
:
12px
;
color
:
var
(
--c-text-3
);
}
.m-po-no
{
font-size
:
17px
;
font-weight
:
650
;
font-family
:
var
(
--font-mono
);
margin-top
:
2px
;
}
.m-po-no
{
font-size
:
17px
;
font-weight
:
650
;
font-family
:
var
(
--font-mono
);
margin-top
:
2px
;
}
.m-shots
{
display
:
flex
;
gap
:
8px
;
overflow-x
:
auto
;
margin-top
:
10px
;
}
.m-shots
{
display
:
flex
;
gap
:
8px
;
overflow-x
:
auto
;
margin-top
:
10px
;
}
.m-shots
img
{
height
:
120px
;
border-radius
:
8px
;
border
:
1px
solid
var
(
--c-border
);
}
.m-shots
.el-image
{
flex-shrink
:
0
;
height
:
120px
;
border-radius
:
8px
;
border
:
1px
solid
var
(
--c-border
);
overflow
:
hidden
;
cursor
:
zoom-in
;
}
.m-shots
.el-image
img
{
height
:
100%
;
width
:
auto
;
display
:
block
;
}
.m-line-head
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
gap
:
10px
;
}
.m-line-head
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
gap
:
10px
;
}
.m-line-name
{
font-weight
:
600
;
font-size
:
14.5px
;
display
:
flex
;
align-items
:
center
;
gap
:
8px
;
min-width
:
0
;
}
.m-line-name
{
font-weight
:
600
;
font-size
:
14.5px
;
display
:
flex
;
align-items
:
center
;
gap
:
8px
;
min-width
:
0
;
}
.m-seq
{
flex-shrink
:
0
;
width
:
20px
;
height
:
20px
;
border-radius
:
6px
;
background
:
var
(
--c-primary-soft
);
color
:
var
(
--c-primary
);
.m-seq
{
flex-shrink
:
0
;
width
:
20px
;
height
:
20px
;
border-radius
:
6px
;
background
:
var
(
--c-primary-soft
);
color
:
var
(
--c-primary
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment