提交 460fdcc8 authored 作者: lidongxu's avatar lidongxu

refactor(inspectiontask/index.vue): 修改:勤策移动端APP内_售点稽查查看时无需重新定位

上级 007656a5
......@@ -42,7 +42,7 @@
<p v-else>{{ addressStr }}</p>
<van-icon name="replay"
class="refresh-icon"
@click="handleClickLocation" />
@click="handleClickLocation" v-if="!isEdit"/>
</div>
<!-- 门头照上传 -->
......@@ -202,6 +202,7 @@ const categoryInformationRef = ref(null)
/*************** 稽查任务总体 ***************/
const isInitializing = ref(true)
const isEdit = ref(Boolean(route.query.rstId))
const form = reactive({ // 当前页信息总对象
rstId: route.query.rstId, // 稽查任务 ID(获取详情接口有则保存,没有则主动新建一次并获取 id)
storePicture: route.query.storePicture, // 门店照片(原始门店照片,来自于上一页的接口)
......@@ -228,7 +229,7 @@ const getInspectionTaskDetailFn = async () => {
})
if (res.data) {
Object.assign(form, res.data)
const { storeName, lhldArr, longTimePictureArr, storePicture, storeType, skuNum, cgclRiskRArr, dqclRiskRArr, dealerName, storeAddr } = res.data
const { storeName, lhldArr, longTimePictureArr, storePicture, storeType, skuNum, cgclRiskRArr, dqclRiskRArr, dealerName, storeAddr, address } = res.data
// 终端门店照片一直应该是路由上的照片参数,如果路由上没有门头照证明上一个页面列表里这个门店就本身没有照片,那就用门头照拍摄的
if (route.query.storePicture) form.storePicture = route.query.storePicture
// 详情接口有门头照照片,需要设置到特有的属性commitStorePicture
......@@ -261,6 +262,12 @@ const getInspectionTaskDetailFn = async () => {
if (storeType) form.selectedType = storeType
// 保存地址
if (address) {
addressLoading.value = false
addressStr.value = address
}
} else {
// 没有的话调用新建接口,得到一个总体稽查任务 id
const res = await createInspectionTaskAPI({
......@@ -398,7 +405,6 @@ const deleteCommitStorePhotos = async () => {
showNotify({ type: 'success', message: '门头照,删除成功' })
}
/*************** 渠道类型 ***************/
const typeOptions = ref(typeOption) // 渠道类型
const showTypePopup = ref(false)
......@@ -573,6 +579,7 @@ const deleteLongTimePictureArr = async (file, { name, index }) => {
/* 位置信息 */
.location-wrap {
width: 100%;
margin-top: 10px;
padding: 10px;
background-color: #fff;
......@@ -580,7 +587,8 @@ const deleteLongTimePictureArr = async (file, { name, index }) => {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
display: flex;
align-items: center;
justify-content: space-between;
/* justify-content: space-between; */
gap: 20px;
.location-icon {
font-size: 20px;
......@@ -591,6 +599,10 @@ const deleteLongTimePictureArr = async (file, { name, index }) => {
font-size: 14px;
margin: 0;
}
.refresh-icon{
margin-left: auto;
}
}
/* 门头照 */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论