Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
9c71634b
提交
9c71634b
authored
8月 28, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(newterminal.vue): 新增:创建终端页面
上级
8a026383
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
228 行增加
和
7 行删除
+228
-7
newTerminal.vue
...t_activity/sales_point_inspection/examine/newTerminal.vue
+207
-3
storeList.vue
...dit_activity/sales_point_inspection/examine/storeList.vue
+16
-3
index.vue
src/views/mobile/pages/cp_activity/examine/index.vue
+0
-1
index.js
src/views/mobile/router/index.js
+5
-0
没有找到文件。
src/views/mobile/pages/audit_activity/sales_point_inspection/examine/newTerminal.vue
浏览文件 @
9c71634b
<
template
>
<
template
>
<!-- 新建终端 -->
<div
class=
"terminal-info-container"
>
<p
class=
"title"
>
录入终端信息
</p>
<div
class=
"content"
>
<!-- 终端名称输入 -->
<van-field
v-model=
"terminalName"
label=
"终端名称:"
label-align=
"top"
placeholder=
"请输入"
class=
"input-field"
/>
<!-- 门头照上传 -->
<div
class=
"header-photo-section"
>
<van-field
label=
"门头照"
label-align=
"top"
>
<template
#
input
>
<van-uploader
:max-count=
"2"
accept=
"image/*"
v-model=
"form.posPhotos"
:after-read=
"posPhotosRead"
preview-size=
"120"
@
delete=
"deletePosPhotos"
>
</van-uploader>
</
template
>
</van-field>
</div>
<!-- 门店类型选择 -->
<van-field
:model-value=
"form.selectedType.join('')"
label=
"门店类型"
label-align=
"top"
placeholder=
"请选择"
@
click=
"showTypePopup = true"
/>
<van-popup
v-model:show=
"showTypePopup"
position=
"bottom"
@
close=
"showTypePopup = false"
>
<van-picker
v-model=
"form.selectedType"
:columns=
"typeOptions"
@
confirm=
"handleTypeConfirm"
@
cancel=
"showTypePopup = false"
/>
</van-popup>
</div>
<!-- 操作按钮 -->
<div
class=
"button-group"
>
<van-button
type=
"danger"
block
@
click=
"handleCreateTask"
>
创建任务
</van-button>
<van-button
type=
"info"
block
@
click=
"handleCancel"
>
取消
</van-button>
</div>
</div>
</template>
</template>
<
script
setup
>
<
script
setup
>
import
{
uploadFileToOSSAPI
}
from
'@/api'
import
{
v4
as
uuidv4
}
from
'uuid'
;
const
form
=
ref
({
selectedType
:
[]
})
const
terminalName
=
ref
(
''
);
const
headerPhotoUrl
=
ref
(
''
);
const
typeOptions
=
ref
([
{
text
:
'KA'
,
value
:
'KA'
},
{
text
:
'BC'
,
value
:
'BC'
},
{
text
:
'CVS'
,
value
:
'CVS'
},
{
text
:
'零食'
,
value
:
'零食'
},
{
text
:
'批发'
,
value
:
'批发'
}
]);
// 示例类型
const
selectedType
=
ref
(
''
);
const
showTypePopup
=
ref
(
false
);
// 门头照上传逻辑
// POS 两张照片
const
posPhotosRead
=
async
(
file
)
=>
{
// 处理上传的文件
const
date
=
new
Date
()
const
month
=
date
.
getMonth
()
+
1
const
theDate
=
date
.
getDate
()
const
pictureUrl
=
await
uploadFileToOSSAPI
(
`risk/
${
date
.
getFullYear
()}
-
${
month
}
/
${
theDate
}
/
${
planId
.
value
}
/
${
employeeNo
}
/
${
uuidv4
()}
.png`
,
file
.
file
)
// 判断 objectUrl
const
index
=
form
.
value
.
posPhotos
.
findIndex
(
o
=>
o
.
objectUrl
)
form
.
value
.
posPhotos
[
index
]
=
{
url
:
pictureUrl
}
}
// 删除 照片
const
deletePosPhotos
=
async
()
=>
{
if
(
isInitializing
.
value
)
return
await
createExamine
({
id
:
form
.
value
.
id
,
posPhotos
:
form
.
value
.
posPhotos
.
map
(
o
=>
o
.
url
),
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
employeeNo
,
// 稽查人工号
})
showNotify
({
type
:
'success'
,
message
:
'POS 照片删除成功'
})
}
// 确认门店类型
const
handleTypeConfirm
=
(
val
)
=>
{
form
.
selectedType
=
val
;
showTypePopup
.
value
=
false
;
};
// 创建任务(可根据需求对接接口)
const
handleCreateTask
=
()
=>
{
console
.
log
(
'创建任务:'
,
{
terminalName
:
terminalName
.
value
,
headerPhoto
:
headerPhotoUrl
.
value
,
storeType
:
selectedType
.
value
,
});
// 此处可补充接口请求逻辑
};
// 取消操作
const
handleCancel
=
()
=>
{
console
.
log
(
'取消操作'
);
// 可重置表单等逻辑
terminalName
.
value
=
''
;
headerPhotoUrl
.
value
=
''
;
selectedType
.
value
=
'KA'
;
};
</
script
>
</
script
>
<
style
scoped
></
style
>
<
style
lang=
"scss"
\ No newline at end of file
scoped
>
.terminal-info-container
{
padding
:
20px
;
box-sizing
:
border-box
;
background-color
:
#f8f8f8
;
min-height
:
100vh
;
.title
{
font-size
:
14px
;
font-weight
:
bold
;
margin-top
:
0
;
margin-bottom
:
10px
;
}
.content
{
background-color
:
white
;
}
.input-field
{
margin-bottom
:
12px
;
}
.header-photo-section
{
margin-bottom
:
12px
;
.header-photo-label
{
display
:
block
;
cursor
:
pointer
;
.header-photo-placeholder
{
width
:
80px
;
height
:
80px
;
border
:
1px
dashed
#ccc
;
border-radius
:
4px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
background-color
:
#f8f8f8
;
}
}
.preview-image
{
width
:
80px
;
height
:
80px
;
margin-top
:
8px
;
border-radius
:
4px
;
}
}
.button-group
{
display
:
flex
;
flex-direction
:
column
;
gap
:
12px
;
margin-top
:
24px
;
van-button
{
flex
:
1
;
}
}
}
</
style
>
\ No newline at end of file
src/views/mobile/pages/audit_activity/sales_point_inspection/examine/storeList.vue
浏览文件 @
9c71634b
...
@@ -48,6 +48,9 @@
...
@@ -48,6 +48,9 @@
<van-empty
v-if=
"showEmpty"
<van-empty
v-if=
"showEmpty"
description=
"未找到匹配的结果"
description=
"未找到匹配的结果"
class=
"empty-tip"
/>
class=
"empty-tip"
/>
<van-floating-bubble
icon=
"plus"
@
click=
"addNewTerminal"
/>
</div>
</div>
</template>
</template>
...
@@ -81,11 +84,20 @@ const loading = ref(false);
...
@@ -81,11 +84,20 @@ const loading = ref(false);
const
finished
=
ref
(
true
);
const
finished
=
ref
(
true
);
const
showEmpty
=
ref
(
false
);
const
showEmpty
=
ref
(
false
);
const
router
=
useRouter
();
// 监听结果列表变化,控制空状态显示
// 监听结果列表变化,控制空状态显示
watch
(
resultList
,
(
newVal
)
=>
{
watch
(
resultList
,
(
newVal
)
=>
{
showEmpty
.
value
=
newVal
.
length
===
0
&&
searchVal
.
value
.
trim
()
!==
''
;
showEmpty
.
value
=
newVal
.
length
===
0
&&
searchVal
.
value
.
trim
()
!==
''
;
});
});
/*******新增终端********/
const
addNewTerminal
=
()
=>
{
router
.
push
({
path
:
'/newTerminal'
})
}
// 搜索处理
// 搜索处理
const
handleSearch
=
()
=>
{
const
handleSearch
=
()
=>
{
if
(
!
searchVal
.
value
.
trim
())
{
if
(
!
searchVal
.
value
.
trim
())
{
...
@@ -140,7 +152,7 @@ const handleClear = () => {
...
@@ -140,7 +152,7 @@ const handleClear = () => {
padding
:
0
20px
;
padding
:
0
20px
;
border-bottom
:
2px
solid
#e5e5e5
;
border-bottom
:
2px
solid
#e5e5e5
;
span
{
span
{
font-size
:
14px
;
font-size
:
14px
;
}
}
...
@@ -149,9 +161,10 @@ const handleClear = () => {
...
@@ -149,9 +161,10 @@ const handleClear = () => {
height
:
auto
!
important
;
height
:
auto
!
important
;
background-color
:
transparent
;
background-color
:
transparent
;
::v-deep
(
.van-search__content
)
{
::v-deep
(
.van-search__content
)
{
background-color
:
white
;
background-color
:
white
;
.van-cell
{
.van-cell
{
height
:
auto
;
height
:
auto
;
}
}
}
}
...
...
src/views/mobile/pages/cp_activity/examine/index.vue
浏览文件 @
9c71634b
...
@@ -665,7 +665,6 @@ const deletePosPhotos = async () => {
...
@@ -665,7 +665,6 @@ const deletePosPhotos = async () => {
employeeNo
:
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
})
showNotify
({
type
:
'success'
,
message
:
'POS 照片删除成功'
})
showNotify
({
type
:
'success'
,
message
:
'POS 照片删除成功'
})
}
}
// POS 金额修改
// POS 金额修改
...
...
src/views/mobile/router/index.js
浏览文件 @
9c71634b
...
@@ -39,6 +39,11 @@ export const constantMobileRoutes = [
...
@@ -39,6 +39,11 @@ export const constantMobileRoutes = [
path
:
'logistics'
,
// 物流信息页面
path
:
'logistics'
,
// 物流信息页面
component
:
()
=>
import
(
'@/views/mobile/pages/other/logistics'
),
component
:
()
=>
import
(
'@/views/mobile/pages/other/logistics'
),
name
:
'logistics'
name
:
'logistics'
},
{
path
:
'newTerminal'
,
component
:
()
=>
import
(
'@/views/mobile/pages/audit_activity/sales_point_inspection/examine/newTerminal'
),
name
:
'newTerminal'
}
}
]
]
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论