Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
3cf60d21
提交
3cf60d21
authored
9月 03, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(scheduledisplay.vue): 新增:档期陈列对接接口完成
上级
67171863
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
161 行增加
和
49 行删除
+161
-49
index.vue
...y/sales_point_inspection/examine/inspectionTask/index.vue
+17
-8
conventionalDisplay.vue
...ction/examine/inspectionTask/tabs/conventionalDisplay.vue
+8
-6
scheduleDisplay.vue
...nspection/examine/inspectionTask/tabs/scheduleDisplay.vue
+136
-35
没有找到文件。
src/views/mobile/pages/audit_activity/sales_point_inspection/examine/inspectionTask/index.vue
浏览文件 @
3cf60d21
...
...
@@ -81,16 +81,19 @@
ref=
"conventionRef"
/>
</van-tab>
<van-tab
title=
"档期陈列"
>
<scheduleDisplay
:rstId=
"form.rstId"
:form=
"form"
/>
<scheduleDisplay
:isInitializing=
"isInitializing"
:form=
"form"
ref=
"scheduleDisplayRef"
/>
</van-tab>
<van-tab
title=
"档期补差"
>
<scheduleAdjustment
:rstId=
"form.rstId"
:form=
"form"
/>
<scheduleAdjustment
:isInitializing=
"isInitializing"
:form=
"form"
ref=
"scheduleAdjustmentRef"
/>
</van-tab>
<van-tab
title=
"品类信息"
>
<categoryInfomation
:rstId=
"form.rstId"
:form=
"form"
/>
<categoryInfomation
:isInitializing=
"isInitializing"
:form=
"form"
ref=
"categoryInfomationRef"
/>
</van-tab>
</van-tabs>
<!-- 任务总结 -->
...
...
@@ -165,6 +168,9 @@ const router = useRouter()
const
route
=
useRoute
()
const
conventionRef
=
ref
(
null
)
const
scheduleDisplayRef
=
ref
(
null
)
const
scheduleAdjustmentRef
=
ref
(
null
)
const
categoryInfomationRef
=
ref
(
null
)
/*************** 稽查任务总体 ***************/
const
isInitializing
=
ref
(
true
)
...
...
@@ -223,6 +229,9 @@ const getInspectionTaskDetailFn = async () => {
nextTick
(()
=>
{
isInitializing
.
value
=
false
conventionRef
.
value
.
init
()
scheduleDisplayRef
.
value
.
init
()
// scheduleAdjustmentRef.value.init()
// categoryInfomationRef.value.init()
})
// 一定在这里获取地理位置(保证稽查任务 id 创建完毕)
...
...
@@ -343,7 +352,7 @@ const handleTypeConfirm = async ({ selectedValues }) => {
}
/*************** tabs 组 ***************/
const
active
=
ref
(
0
)
const
active
=
ref
(
1
)
/*************** 其他信息填写 ***************/
// 礼盒礼袋在售
...
...
@@ -532,7 +541,7 @@ const deleteLongTimePictureArr = async (file, { name, index }) => {
}
}
.van-overlay
{
.van-overlay
{
background-color
:
rgba
(
0
,
0
,
0
,
0
.2
);
display
:
flex
;
align-items
:
center
;
...
...
src/views/mobile/pages/audit_activity/sales_point_inspection/examine/inspectionTask/tabs/conventionalDisplay.vue
浏览文件 @
3cf60d21
...
...
@@ -115,14 +115,16 @@ const createTask = async () => {
const
init
=
()
=>
{
// 查询外层是否传入初始数据
if
(
props
.
form
.
detailMap
)
{
checkProperty
(
props
.
form
.
detailMap
[
'常规陈列'
])
displayGroup
.
value
=
props
.
form
.
detailMap
[
'常规陈列'
]
||
[]
}
else
{
// 没传递则自己至少新建 1 个
if
(
displayGroup
.
value
.
length
===
0
)
{
createTask
()
if
(
props
.
form
.
detailMap
[
'常规陈列'
])
{
checkProperty
(
props
.
form
.
detailMap
[
'常规陈列'
])
displayGroup
.
value
=
props
.
form
.
detailMap
[
'常规陈列'
]
||
[]
return
}
}
// 没传递则自己至少新建 1 个
if
(
displayGroup
.
value
.
length
===
0
)
{
createTask
()
}
}
/*************** 基本信息 ***************/
// 形式修改
...
...
src/views/mobile/pages/audit_activity/sales_point_inspection/examine/inspectionTask/tabs/scheduleDisplay.vue
浏览文件 @
3cf60d21
...
...
@@ -5,18 +5,20 @@
v-for=
"(obj, index) in displayGroup"
>
<p
class=
"title"
>
档期陈列
{{
index
+
1
}}
:
</p>
<van-cell-group
inset
>
<van-field
v-model=
"obj.modal
ity
"
name=
"modal
ity
"
<van-field
v-model=
"obj.modal"
name=
"modal"
label=
"形式"
placeholder=
"请输入形式"
auto-complete=
"off"
:rules=
"[
{ required: true, message: '请输入形式' }]" />
:rules=
"[
{ required: true, message: '请输入形式' }]"
@change="handleModalityChange(index)" />
<van-field
v-model=
"obj.cost"
name=
"cost"
label=
"费用"
placeholder=
"费用"
auto-complete=
"off"
:rules=
"[
{ required: true, message: '请输入费用' }]" />
:rules=
"[
{ required: true, message: '请输入费用' }]"
@change="handleCostChange(index)" />
<van-field
label=
"档期陈列照片"
label-align=
"top"
class=
"header-photo-section"
>
...
...
@@ -24,7 +26,7 @@
<van-uploader
:max-count=
"2"
accept=
"image/*"
capture=
"camera"
:model-value=
"obj.
displayPhotos
"
:model-value=
"obj.
photoArr
"
:name=
"index"
:after-read=
"displayPhotosRead"
preview-size=
"78"
...
...
@@ -35,9 +37,10 @@
<van-field
label=
"核查结果"
label-align=
"top"
>
<
template
#
input
>
<van-checkbox-group
v-model=
"obj.
verify
"
<van-checkbox-group
v-model=
"obj.
riskRArr
"
direction=
"horizontal"
shape=
"square"
>
shape=
"square"
@
change=
"handleVerifyChange(index)"
>
<van-checkbox
name=
"合格"
>
合格
</van-checkbox>
<van-checkbox
name=
"需整改"
>
需整改
</van-checkbox>
<van-checkbox
name=
"不合格"
>
不合格
</van-checkbox>
...
...
@@ -50,13 +53,14 @@
<!-- 新增按钮 -->
<van-button
class=
"add-item"
type=
"primary"
@
click=
"
addItem
"
>
新增一组陈列
</van-button>
@
click=
"
createTask
"
>
新增一组陈列
</van-button>
<!-- 总体判定 -->
<div
class=
"overall"
>
<p
class=
"title"
>
档期陈列总体判定结果:
</p>
<van-checkbox-group
v-model=
"
overAll.verify
"
<van-checkbox-group
v-model=
"
form.cgclRiskRArr
"
direction=
"horizontal"
shape=
"square"
>
shape=
"square"
@
change=
"handleOverallChange"
>
<van-checkbox
name=
"合格"
>
合格
</van-checkbox>
<van-checkbox
name=
"需整改"
>
需整改
</van-checkbox>
<van-checkbox
name=
"不合格"
>
不合格
</van-checkbox>
...
...
@@ -67,47 +71,144 @@
</template>
<
script
setup
>
import
{
uploadFileToOSSAPI
}
from
'@/api'
import
{
uploadFileToOSSAPI
,
createInspectionTaskAPI
,
createInspectionTaskDetailAPI
}
from
'@/api'
import
useUserStore
from
'@/store/modules/user'
import
{
v4
as
uuidv4
}
from
'uuid'
const
route
=
useRoute
()
const
props
=
defineProps
({
isInitializing
:
{
type
:
Boolean
,
default
:
false
},
form
:
{
type
:
Object
,
default
:
()
=>
{
}
}
})
const
displayGroup
=
ref
([])
/*************** 陈列组信息 ***************/
const
displayGroup
=
ref
([
{
modality
:
''
,
// 形式
cost
:
''
,
// 费用
displayPhotos
:
[],
// 陈列照片
verify
:
[]
// 核查结果
// 特殊字段处理
const
checkProperty
=
(
list
)
=>
{
list
.
map
(
item
=>
{
item
.
riskRArr
=
item
.
riskRArr
||
[]
item
.
photoArr
=
item
.
photoArr
?.
map
(
o
=>
({
url
:
o
}))
||
[]
})
}
// 创建任务组
const
createTask
=
async
()
=>
{
const
{
data
}
=
await
createInspectionTaskDetailAPI
({
taskDetail
:
{
rstId
:
props
.
form
.
rstId
,
detailName
:
'档期陈列'
}
})
checkProperty
([
data
])
displayGroup
.
value
.
push
(
data
)
}
const
init
=
()
=>
{
// 查询外层是否传入初始数据
if
(
props
.
form
.
detailMap
)
{
if
(
props
.
form
.
detailMap
[
'档期陈列'
])
{
checkProperty
(
props
.
form
.
detailMap
[
'档期陈列'
])
displayGroup
.
value
=
props
.
form
.
detailMap
[
'档期陈列'
]
||
[]
return
}
}
])
// 新增一组
const
addItem
=
()
=>
{
displayGroup
.
value
.
push
({
modality
:
''
,
// 形式
cost
:
''
,
// 费用
displayPhotos
:
[],
// 陈列照片
verify
:
[]
// 核查结果
// 没传递则自己至少新建 1 个
if
(
displayGroup
.
value
.
length
===
0
)
{
createTask
()
}
}
/*************** 基本信息 ***************/
// 形式修改
const
handleModalityChange
=
async
(
index
)
=>
{
await
createInspectionTaskDetailAPI
({
taskDetail
:
{
rstId
:
props
.
form
.
rstId
,
...
displayGroup
.
value
[
index
]
}
})
showNotify
({
type
:
'success'
,
message
:
'形式,保存成功'
})
}
// 费用修改
const
handleCostChange
=
async
(
index
)
=>
{
/*************** 照片 ***************/
await
createInspectionTaskDetailAPI
({
taskDetail
:
{
rstId
:
props
.
form
.
rstId
,
...
displayGroup
.
value
[
index
]
}
})
showNotify
({
type
:
'success'
,
message
:
'费用,保存成功'
})
}
// 上传照片
const
displayPhotosRead
=
async
(
file
,
{
name
,
index
})
=>
{
// 处理上传的文件
const
pictureUrl
=
await
uploadFileToOSSAPI
(
`risk/scheduleDisplayPhoto/
${
useUserStore
().
empInfo
.
empNo
}
/
${
form
.
storeCode
}
.png`
,
file
.
file
)
displayGroup
.
value
[
name
].
displayPhotos
.
push
({
// name:是当前照片组件所在陈列组的索引
// index: 当前照片组的索引
const
target
=
displayGroup
.
value
[
name
]
const
pictureUrl
=
await
uploadFileToOSSAPI
(
`risk/scheduleDisplayPhoto/
${
useUserStore
().
empInfo
.
empNo
}
/
${
props
.
form
.
storeCode
}
/
${
uuidv4
()}
.png`
,
file
.
file
)
target
.
photoArr
.
push
({
url
:
pictureUrl
})
showNotify
({
type
:
'success'
,
message
:
'照片上传成功'
})
await
createInspectionTaskDetailAPI
({
taskDetail
:
{
rstId
:
props
.
form
.
rstId
,
rstdId
:
target
.
rstdId
,
photoArr
:
target
.
photoArr
.
map
(
o
=>
o
.
url
)
}
})
showNotify
({
type
:
'success'
,
message
:
'档期陈列照片,上传成功'
})
}
// 删除
照片
// 删除照片
const
deletedisplayPhotos
=
async
(
file
,
{
name
,
index
})
=>
{
displayGroup
.
value
[
name
].
displayPhotos
.
splice
(
index
,
1
)
showNotify
({
type
:
'success'
,
message
:
'照片删除成功'
})
const
target
=
displayGroup
.
value
[
name
]
target
.
photoArr
.
splice
(
index
,
1
)
await
createInspectionTaskDetailAPI
({
taskDetail
:
{
rstId
:
props
.
form
.
rstId
,
rstdId
:
target
.
rstdId
,
photoArr
:
target
.
photoArr
.
map
(
o
=>
o
.
url
)
}
})
showNotify
({
type
:
'success'
,
message
:
'档期陈列照片,删除成功'
})
}
// 核查结果
const
handleVerifyChange
=
async
(
index
)
=>
{
const
target
=
displayGroup
.
value
[
index
]
await
createInspectionTaskDetailAPI
({
taskDetail
:
{
rstId
:
props
.
form
.
rstId
,
rstdId
:
target
.
rstdId
,
riskRArr
:
target
.
riskRArr
}
})
showNotify
({
type
:
'success'
,
message
:
'核查结果,保存成功'
})
}
/*************** 总体核查结果 ***************/
const
handleOverallChange
=
async
()
=>
{
if
(
props
.
isInitializing
)
return
await
createInspectionTaskAPI
({
rstId
:
props
.
form
.
rstId
,
cgclRiskRArr
:
props
.
form
.
cgclRiskRArr
})
showNotify
({
type
:
'success'
,
message
:
'核查结果,保存成功'
})
}
// 总体核查结果
const
overAll
=
ref
({})
defineExpose
({
init
})
</
script
>
<
style
scoped
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论