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

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

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