提交 6269e420 authored 作者: lidongxu's avatar lidongxu

Merge branch 'dev'

...@@ -25,6 +25,3 @@ VITE_APP_REPORT_EDIT_URL = '#/report/jmreport/index' ...@@ -25,6 +25,3 @@ VITE_APP_REPORT_EDIT_URL = '#/report/jmreport/index'
# 促销计划上报模板表格 # 促销计划上报模板表格
VITE_APP_PLAN_TEMPLATE_EXCEL = 'https://link-promotion.oss-cn-shanghai.aliyuncs.com/file/%E6%96%B0%E5%A2%9E%E6%88%96%E4%BF%AE%E6%94%B9%E8%AE%A1%E5%88%92-%E6%A8%A1%E6%9D%BF4.0.xlsx' VITE_APP_PLAN_TEMPLATE_EXCEL = 'https://link-promotion.oss-cn-shanghai.aliyuncs.com/file/%E6%96%B0%E5%A2%9E%E6%88%96%E4%BF%AE%E6%94%B9%E8%AE%A1%E5%88%92-%E6%A8%A1%E6%9D%BF4.0.xlsx'
# 腾讯地图接口地址
VITE_APP_TENCENT_MAP_API = '/tencent_map_api'
\ No newline at end of file
...@@ -24,6 +24,3 @@ VITE_APP_REPORT_EDIT_URL = '#/report/jmreport/index' ...@@ -24,6 +24,3 @@ VITE_APP_REPORT_EDIT_URL = '#/report/jmreport/index'
# 促销计划上报模板表格 # 促销计划上报模板表格
VITE_APP_PLAN_TEMPLATE_EXCEL = 'https://link-promotion.oss-cn-shanghai.aliyuncs.com/file/%E6%96%B0%E5%A2%9E%E6%88%96%E4%BF%AE%E6%94%B9%E8%AE%A1%E5%88%92-%E6%A8%A1%E6%9D%BF4.0.xlsx' VITE_APP_PLAN_TEMPLATE_EXCEL = 'https://link-promotion.oss-cn-shanghai.aliyuncs.com/file/%E6%96%B0%E5%A2%9E%E6%88%96%E4%BF%AE%E6%94%B9%E8%AE%A1%E5%88%92-%E6%A8%A1%E6%9D%BF4.0.xlsx'
# 腾讯地图接口地址
VITE_APP_TENCENT_MAP_API = 'https://apis.map.qq.com/ws/geocoder/v1'
\ No newline at end of file
...@@ -23,6 +23,3 @@ VITE_APP_REPORT_EDIT_URL = '#/report/jmreport/index' ...@@ -23,6 +23,3 @@ VITE_APP_REPORT_EDIT_URL = '#/report/jmreport/index'
# 促销计划上报模板表格 # 促销计划上报模板表格
VITE_APP_PLAN_TEMPLATE_EXCEL = 'https://link-promotion.oss-cn-shanghai.aliyuncs.com/file/%E6%96%B0%E5%A2%9E%E6%88%96%E4%BF%AE%E6%94%B9%E8%AE%A1%E5%88%92-%E6%A8%A1%E6%9D%BF4.0.xlsx' VITE_APP_PLAN_TEMPLATE_EXCEL = 'https://link-promotion.oss-cn-shanghai.aliyuncs.com/file/%E6%96%B0%E5%A2%9E%E6%88%96%E4%BF%AE%E6%94%B9%E8%AE%A1%E5%88%92-%E6%A8%A1%E6%9D%BF4.0.xlsx'
# 腾讯地图接口地址
VITE_APP_TENCENT_MAP_API = 'https://apis.map.qq.com/ws/geocoder/v1'
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<meta name="renderer" <meta name="renderer"
content="webkit"> content="webkit">
<meta name="viewport" <meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="icon" <link rel="icon"
href="/favicon.ico"> href="/favicon.ico">
<title> <title>
......
...@@ -2,11 +2,9 @@ import request from '@/utils/request' ...@@ -2,11 +2,9 @@ import request from '@/utils/request'
// 逆地址编码 // 逆地址编码
export const getLocation = (params) => { export const getLocation = (params) => {
return request({ return request({
baseURL: import.meta.env.VITE_APP_TENCENT_MAP_API, url: '/system/tencent/lbs/address',
url: '/',
params: { params: {
location: params.lat + ',' + params.lng, // GCJ02坐标系(经度,维度) location: params.lat + ',' + params.lng // GCJ02坐标系(经度,维度)
key: 'UTEBZ-UJ3KG-OORQO-QT3PT-JDWU7-YRBZA'
} }
}) })
} }
\ No newline at end of file
...@@ -33,3 +33,20 @@ export function createInspectionTaskDetailAPI(data) { ...@@ -33,3 +33,20 @@ export function createInspectionTaskDetailAPI(data) {
data data
}) })
} }
// 售点稽查-任务列表
export function getInspectionTaskListAPI(params) {
return request({
url: '/operation/risk/query/i_store/page',
params
})
}
// 售点稽查-删除 tab 里面子任务中的小分组
export function deleteInspectionTaskAPI(params) {
return request({
url: '/operation/risk/core/d_store_detail',
method: 'DELETE',
params
})
}
\ No newline at end of file
/** /**
* v-hasRole 角色权限处理 * v-hasRole 角色权限处理
* Copyright (c) 2019 ruoyi * Copyright (c) 2019 ruoyi
*/ */
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
...@@ -10,10 +10,8 @@ export default { ...@@ -10,10 +10,8 @@ export default {
const { value } = binding const { value } = binding
const super_admin = "admin"; const super_admin = "admin";
const roles = useUserStore().roles const roles = useUserStore().roles
if (value && value instanceof Array && value.length > 0) { if (value && value instanceof Array && value.length > 0) {
const roleFlag = value const roleFlag = value
const hasRole = roles.some(role => { const hasRole = roles.some(role => {
return super_admin === role || roleFlag.includes(role) return super_admin === role || roleFlag.includes(role)
}) })
......
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import { set } from 'nprogress';
const useAppStore = defineStore( const useAppStore = defineStore(
'app', 'app',
...@@ -12,7 +11,7 @@ const useAppStore = defineStore( ...@@ -12,7 +11,7 @@ const useAppStore = defineStore(
}, },
device: 'desktop', device: 'desktop',
size: Cookies.get('size') || 'default', size: Cookies.get('size') || 'default',
belongSys: Cookies.get('belongSys') || '链路中心', belongSys: Cookies.get('belongSys') || 0,
}), }),
actions: { actions: {
toggleSideBar(withoutAnimation) { toggleSideBar(withoutAnimation) {
...@@ -28,6 +27,7 @@ const useAppStore = defineStore( ...@@ -28,6 +27,7 @@ const useAppStore = defineStore(
} }
}, },
closeSideBar({ withoutAnimation }) { closeSideBar({ withoutAnimation }) {
// 屏幕宽度小于 992px,或者在移动端,默认侧边栏导航是关闭的
Cookies.set('sidebarStatus', 0) Cookies.set('sidebarStatus', 0)
this.sidebar.opened = false this.sidebar.opened = false
this.sidebar.withoutAnimation = withoutAnimation this.sidebar.withoutAnimation = withoutAnimation
......
...@@ -44,7 +44,16 @@ const usePermissionStore = defineStore( ...@@ -44,7 +44,16 @@ const usePermissionStore = defineStore(
// 链路中心 // 链路中心
res.data = res.data.filter(item => item.belongSys == 0) res.data = res.data.filter(item => item.belongSys == 0)
} else { } else {
// 勤策 // 勤策移动端
const result = res.data.filter(item => item.belongSys == 1)
if (result.length == 0) {
showNotify({
message: '您没有《勤策移动端》菜单,联系"李秋林"开通!',
type: 'danger',
duration: 5000
})
return
}
res.data = res.data.filter(item => item.belongSys == 1)[0].children res.data = res.data.filter(item => item.belongSys == 1)[0].children
} }
const sdata = JSON.parse(JSON.stringify(res.data)) const sdata = JSON.parse(JSON.stringify(res.data))
......
...@@ -109,7 +109,7 @@ export default defineStore( ...@@ -109,7 +109,7 @@ export default defineStore(
}, },
getters: { getters: {
/** /**
* 获取促销系统身份 (0 null 为职能角色,1 为城市经理) * 获取促销系统身份 (null 2 为职能角色,1 为城市经理)
* @param {*} state * @param {*} state
* @returns (true 城市经理)(false 职能角色) * @returns (true 城市经理)(false 职能角色)
*/ */
......
...@@ -2,15 +2,14 @@ ...@@ -2,15 +2,14 @@
<div class="mobile-page-container"> <div class="mobile-page-container">
<!-- 类型选择 --> <!-- 类型选择 -->
<div class="category-select"> <div class="category-select">
<van-field label-width="4rem" <van-field label-width="3.8rem"
label-position="left" label-position="left"
label="品类选择:" label="品类选择:"
:model-value="selectedTypeObj.label" :model-value="selectedTypeObj.label"
placeholder="请输入"> placeholder="请输入">
<template #input> <template #input>
<el-select v-model="selectedTypeObj" <el-select v-model="selectedTypeObj"
placeholder="请选择" placeholder="请选择">
filterable>
<el-option v-for="item in typeOptions" <el-option v-for="item in typeOptions"
:label="item.label" :label="item.label"
:value="item" /> :value="item" />
...@@ -20,10 +19,11 @@ ...@@ -20,10 +19,11 @@
<van-field v-model="selectedTypeObj.price" <van-field v-model="selectedTypeObj.price"
type="number" type="number"
:label="selectedTypeObj.label + ' 价格:'" :label="selectedTypeObj.label + ' 价格:'"
label-width="4rem" label-width="3.8rem"
placeholder="请输入价格" placeholder="请输入价格"
clearable clearable
class="search-input" /> class="search-input"
@change="handlePriceChange" />
</div> </div>
<!-- 品类信息 --> <!-- 品类信息 -->
<div class="table-container"> <div class="table-container">
...@@ -47,7 +47,10 @@ ...@@ -47,7 +47,10 @@
<template #input> <template #input>
<el-date-picker v-model="obj.value" <el-date-picker v-model="obj.value"
type="month" type="month"
placeholder="选择月份" /> :editable="false"
value-format="YYYY-MM"
placeholder="选择月份"
@change="handleTasteChange(index)" />
</template> </template>
</van-field> </van-field>
</div> </div>
...@@ -58,13 +61,62 @@ ...@@ -58,13 +61,62 @@
</template> </template>
<script setup> <script setup>
import { createInspectionTaskDetailAPI } from '@/api'
const props = defineProps({ const props = defineProps({
form: { form: {
type: Object, type: Object,
default: () => { } default: () => { }
} }
}) })
const nowRstdId = ref('') // 当前品类任务部分 ID
// 品类型 // 品类型
// 后台用的英文字段,和我们的 label 名字做映射
const typeMap = {
' 虎皮凤爪 210g': {
priceKey: 'priceHp210',
tasteDateKey: 'kwYmHp210Map'
},
' 虎皮凤爪 105g': {
priceKey: 'priceHp105',
tasteDateKey: 'kwYmHp105Map'
},
' 虎皮凤爪 68g': {
priceKey: 'priceHp68',
tasteDateKey: 'kwYmHp68Map'
},
' 鸡肉豆堡 120g': {
priceKey: 'priceJrdb120',
tasteDateKey: 'kwYmJrdb120Map'
},
' 牛肉豆堡 120g': {
priceKey: 'priceNrdb120',
tasteDateKey: 'kwYmNrdb120Map'
},
' 去骨凤爪 72g': {
priceKey: 'priceQg72',
tasteDateKey: 'kwYmQg72Map'
},
' 去骨凤爪 138g': {
priceKey: 'priceQg138',
tasteDateKey: 'kwYmQg138Map'
},
' 虎皮小鸡腿 80g': {
priceKey: 'priceHpjt80',
tasteDateKey: 'kwYmHpjt80Map'
},
' 老卤系列 ': {
priceKey: 'priceLl',
tasteDateKey: 'kwYmLlMap'
},
' 单支虎皮凤爪 ': {
priceKey: 'priceHpDz',
tasteDateKey: 'kwYmHpDzMap'
},
' 散称虎皮凤爪 ': {
priceKey: 'priceHpSc',
tasteDateKey: 'kwYmHpScMap'
},
}
const typeOptions = ref([ const typeOptions = ref([
{ {
label: ' 虎皮凤爪 210g', value: ' 虎皮凤爪 210g', price: '', taste: [ label: ' 虎皮凤爪 210g', value: ' 虎皮凤爪 210g', price: '', taste: [
...@@ -257,28 +309,66 @@ const typeOptions = ref([ ...@@ -257,28 +309,66 @@ const typeOptions = ref([
]); ]);
const selectedTypeObj = ref(typeOptions.value[0]) const selectedTypeObj = ref(typeOptions.value[0])
// 创建任务 // 价格改变
const createTask = () => { const handlePriceChange = async () => {
displayGroup.value.push({ const prop = typeMap[selectedTypeObj.value.label].priceKey
type: selectedTypeObj.value.value, const res = await createInspectionTaskDetailAPI({
taste: selectedTypeObj.value.taste.map(item => ({ taskDetail: {
name: item.name, rstId: props.form.rstId,
value: '' rstdId: nowRstdId.value,
})) detailName: '品类信息',
[prop]: selectedTypeObj.value.price * 1
}
})
showNotify({ type: 'success', message: '价格,保存成功' })
}
// 口味生产日期设置
const handleTasteChange = async (index) => {
console.log(selectedTypeObj.value)
const prop = typeMap[selectedTypeObj.value.label].tasteDateKey
await createInspectionTaskDetailAPI({
taskDetail: {
rstId: props.form.rstId,
rstdId: nowRstdId.value,
detailName: '品类信息',
[prop]: selectedTypeObj.value.taste.reduce((acc, item) => {
acc[item.name] = item.value;
return acc;
}, {})
}
}) })
} }
const init = () => { const init = () => {
if (props.form.detailMap) { if (props.form.detailMap) {
if (props.form.detailMap['品类信息']) { if (props.form.detailMap['品类信息']) {
checkProperty(props.form.detailMap['品类信息']) // 回显
displayGroup.value = props.form.detailMap['品类信息'] || [] nowRstdId.value = props.form.detailMap['品类信息'][0].rstdId // 详情ID
// 循环设置
typeOptions.value.forEach(item => {
const priceProp = typeMap[item.label].priceKey // 设置价格
item.price = props.form.detailMap['品类信息'][0][priceProp]
const tasteProp = typeMap[item.label].tasteDateKey // 设置口味日期
const targetTasteObj = props.form.detailMap['品类信息'][0][tasteProp]
if (targetTasteObj) {
item.taste.forEach(item => {
item.value = targetTasteObj[item.name] // 取出日期
})
}
})
return return
} }
} }
// 没传递则自己至少新建 1 个 // 手动创建品类信息,得到 rstdId
if (displayGroup.value.length === 0) { createInspectionTaskDetailAPI({
createTask() taskDetail: {
rstId: props.form.rstId,
detailName: '品类信息'
} }
}).then(res => {
nowRstdId.value = res.data.rstdId
})
} }
defineExpose({ defineExpose({
init init
...@@ -288,7 +378,7 @@ defineExpose({ ...@@ -288,7 +378,7 @@ defineExpose({
<style lang="scss" <style lang="scss"
scoped> scoped>
.mobile-page-container { .mobile-page-container {
padding: 10px; padding: .2667rem;
background-color: #fff; background-color: #fff;
// 类型选择 // 类型选择
...@@ -298,35 +388,39 @@ defineExpose({ ...@@ -298,35 +388,39 @@ defineExpose({
.van-cell { .van-cell {
padding: 0; padding: 0;
align-items: center; align-items: center;
// font-size: 14px; // font-size: .3733rem;
// font-weight: 900; // font-weight: 900;
.el-select { .el-select {
width: 150px; width: 4rem;
} }
} }
.search-input { .search-input {
margin-top: 10px; margin-top: .2667rem;
::v-deep(input) {
border-bottom: 1px solid gray;
}
} }
} }
// 表格容器 // 表格容器
.table-container { .table-container {
margin-top: 10px; margin-top: .2667rem;
} }
.custom-table { .custom-table {
width: 100%; width: 100%;
border: 1px solid #ccc; border: .0267rem solid #ccc;
border-collapse: collapse; // 模拟表格边框合并 border-collapse: collapse; // 模拟表格边框合并
.table-row { .table-row {
display: flex; display: flex;
width: 100%; width: 100%;
height: 44px; height: 1.1733rem;
&.header-row { &.header-row {
background-color: #e5e5e5; background-color: #e5e5e5;
...@@ -349,9 +443,9 @@ defineExpose({ ...@@ -349,9 +443,9 @@ defineExpose({
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-right: 1px solid #ccc; border-right: .0267rem solid #ccc;
border-bottom: 1px solid #ccc; border-bottom: .0267rem solid #ccc;
font-size: 14px; font-size: .3733rem;
color: #333; color: #333;
&:last-child { &:last-child {
...@@ -359,14 +453,14 @@ defineExpose({ ...@@ -359,14 +453,14 @@ defineExpose({
} }
&.first-column { &.first-column {
width: 120px; width: 3.2rem;
font-weight: 500; font-weight: 500;
} }
&.second-column { &.second-column {
background: white; background: white;
flex: 1; flex: 1;
padding: 0 8px; padding: 0 .2133rem;
} }
} }
...@@ -375,7 +469,7 @@ defineExpose({ ...@@ -375,7 +469,7 @@ defineExpose({
width: 100%; width: 100%;
height: 100%; height: 100%;
text-align: center; text-align: center;
font-size: 14px; font-size: .3733rem;
padding: 0; padding: 0;
::v-deep(.van-cell__value) { ::v-deep(.van-cell__value) {
......
...@@ -3,7 +3,12 @@ ...@@ -3,7 +3,12 @@
<!-- 常规陈列 --> <!-- 常规陈列 -->
<div class="item" <div class="item"
v-for="(obj, index) in displayGroup"> v-for="(obj, index) in displayGroup">
<p class="title">常规陈列{{ index + 1 }}</p> <p class="title">
<span>常规陈列{{ index + 1 }}</span>
<van-icon name="delete"
size="0.45rem"
@click="deleteItem(obj, index)" />
</p>
<van-cell-group inset> <van-cell-group inset>
<van-field v-model="obj.modal" <van-field v-model="obj.modal"
name="modal" name="modal"
...@@ -30,7 +35,7 @@ ...@@ -30,7 +35,7 @@
:model-value="obj.photoArr" :model-value="obj.photoArr"
:name="index" :name="index"
:after-read="displayPhotosRead" :after-read="displayPhotosRead"
preview-size="78" preview-size="2.13333rem"
@delete="deletedisplayPhotos"> @delete="deletedisplayPhotos">
</van-uploader> </van-uploader>
</template> </template>
...@@ -54,7 +59,7 @@ ...@@ -54,7 +59,7 @@
<!-- 新增按钮 --> <!-- 新增按钮 -->
<van-button class="add-item" <van-button class="add-item"
type="primary" type="primary"
@click="createTask">新增一组陈列</van-button> @click="createTask">新增一组</van-button>
<!-- 总体判定 --> <!-- 总体判定 -->
<div class="overall"> <div class="overall">
<p class="title">常规陈列总体判定结果:</p> <p class="title">常规陈列总体判定结果:</p>
...@@ -72,7 +77,7 @@ ...@@ -72,7 +77,7 @@
</template> </template>
<script setup> <script setup>
import { uploadFileToOSSAPI, createInspectionTaskAPI, createInspectionTaskDetailAPI } from '@/api' import { uploadFileToOSSAPI, createInspectionTaskAPI, createInspectionTaskDetailAPI, deleteInspectionTaskAPI } from '@/api'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import { v4 as uuidv4 } from 'uuid' import { v4 as uuidv4 } from 'uuid'
...@@ -126,6 +131,30 @@ const init = () => { ...@@ -126,6 +131,30 @@ const init = () => {
createTask() createTask()
} }
} }
// 删除分组
const isDeleteNow = ref(false)
const deleteItem = async (obj, index) => {
// 确认询问框
showConfirmDialog({
title: '删除提示',
message: '确定删除吗?',
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
isDeleteNow.value = true
await deleteInspectionTaskAPI({
rstdId: obj.rstdId
})
displayGroup.value.splice(index, 1)
nextTick(() => {
isDeleteNow.value = false
})
showNotify({ type: 'success', message: '删除成功' })
})
}
/*************** 基本信息 ***************/ /*************** 基本信息 ***************/
// 形式修改 // 形式修改
const handleModalityChange = async (index) => { const handleModalityChange = async (index) => {
...@@ -154,9 +183,11 @@ const handleCostChange = async (index) => { ...@@ -154,9 +183,11 @@ const handleCostChange = async (index) => {
const displayPhotosRead = async (file, { name, index }) => { const displayPhotosRead = async (file, { name, index }) => {
// name:是当前照片组件所在陈列组的索引 // name:是当前照片组件所在陈列组的索引
// index: 当前照片组的索引 // index: 当前照片组的索引
const date = new Date()
const month = date.getMonth() + 1
const theDate = date.getDate()
const target = displayGroup.value[name] const target = displayGroup.value[name]
const pictureUrl = await uploadFileToOSSAPI(`risk/${date.getFullYear()}-${month}/displayPhoto/${useUserStore().empInfo.empNo}/${props.form.storeCode}/${uuidv4()}.png`, file.file)
const pictureUrl = await uploadFileToOSSAPI(`risk/displayPhoto/${useUserStore().empInfo.empNo}/${props.form.storeCode}/${uuidv4()}.png`, file.file)
target.photoArr.push({ target.photoArr.push({
url: pictureUrl url: pictureUrl
}) })
...@@ -186,6 +217,7 @@ const deletedisplayPhotos = async (file, { name, index }) => { ...@@ -186,6 +217,7 @@ const deletedisplayPhotos = async (file, { name, index }) => {
} }
// 核查结果 // 核查结果
const handleVerifyChange = async (index) => { const handleVerifyChange = async (index) => {
if (isDeleteNow.value) return
const target = displayGroup.value[index] const target = displayGroup.value[index]
await createInspectionTaskDetailAPI({ await createInspectionTaskDetailAPI({
taskDetail: { taskDetail: {
...@@ -224,6 +256,9 @@ defineExpose({ ...@@ -224,6 +256,9 @@ defineExpose({
margin: 0; margin: 0;
font-weight: 900; font-weight: 900;
color: var(--main-color); color: var(--main-color);
display: flex;
justify-content: space-between;
} }
/* 每个分组 */ /* 每个分组 */
......
...@@ -3,7 +3,12 @@ ...@@ -3,7 +3,12 @@
<!-- 档期补差 --> <!-- 档期补差 -->
<div class="item" <div class="item"
v-for="(obj, index) in displayGroup"> v-for="(obj, index) in displayGroup">
<p class="title">档期补差{{ index + 1 }}</p> <p class="title">
<span>档期补差{{ index + 1 }}</span>
<van-icon name="delete"
size="0.45rem"
@click="deleteItem(obj, index)" />
</p>
<van-cell-group inset> <van-cell-group inset>
<van-field v-model="obj.modal" <van-field v-model="obj.modal"
name="modal" name="modal"
...@@ -29,7 +34,7 @@ ...@@ -29,7 +34,7 @@
:model-value="obj.photoArr" :model-value="obj.photoArr"
:name="index" :name="index"
:after-read="displayPhotosRead" :after-read="displayPhotosRead"
preview-size="78" preview-size="2.13333rem"
@delete="deletedisplayPhotos"> @delete="deletedisplayPhotos">
</van-uploader> </van-uploader>
</template> </template>
...@@ -53,7 +58,7 @@ ...@@ -53,7 +58,7 @@
<!-- 新增按钮 --> <!-- 新增按钮 -->
<van-button class="add-item" <van-button class="add-item"
type="primary" type="primary"
@click="createTask">新增一组陈列</van-button> @click="createTask">新增一组</van-button>
<!-- 总体判定 --> <!-- 总体判定 -->
<!-- <div class="overall"> <!-- <div class="overall">
<p class="title">档期陈列总体判定结果:</p> <p class="title">档期陈列总体判定结果:</p>
...@@ -71,7 +76,7 @@ ...@@ -71,7 +76,7 @@
<script setup> <script setup>
import { uploadFileToOSSAPI, createInspectionTaskAPI, createInspectionTaskDetailAPI } from '@/api' import { uploadFileToOSSAPI, createInspectionTaskAPI, createInspectionTaskDetailAPI, deleteInspectionTaskAPI } from '@/api'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import { v4 as uuidv4 } from 'uuid' import { v4 as uuidv4 } from 'uuid'
...@@ -125,6 +130,29 @@ const init = () => { ...@@ -125,6 +130,29 @@ const init = () => {
createTask() createTask()
} }
} }
// 删除分组
const isDeleteNow = ref(false)
const deleteItem = async (obj, index) => {
// 确认询问框
showConfirmDialog({
title: '删除提示',
message: '确定删除吗?',
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
isDeleteNow.value = true
await deleteInspectionTaskAPI({
rstdId: obj.rstdId
})
displayGroup.value.splice(index, 1)
nextTick(() => {
isDeleteNow.value = false
})
showNotify({ type: 'success', message: '删除成功' })
})
}
/*************** 基本信息 ***************/ /*************** 基本信息 ***************/
// 形式修改 // 形式修改
const handleModalityChange = async (index) => { const handleModalityChange = async (index) => {
...@@ -153,9 +181,11 @@ const handleCostChange = async (index) => { ...@@ -153,9 +181,11 @@ const handleCostChange = async (index) => {
const displayPhotosRead = async (file, { name, index }) => { const displayPhotosRead = async (file, { name, index }) => {
// name:是当前照片组件所在陈列组的索引 // name:是当前照片组件所在陈列组的索引
// index: 当前照片组的索引 // index: 当前照片组的索引
const date = new Date()
const month = date.getMonth() + 1
const theDate = date.getDate()
const target = displayGroup.value[name] const target = displayGroup.value[name]
const pictureUrl = await uploadFileToOSSAPI(`risk/${date.getFullYear()}-${month}/scheduleAdjustmentPhoto/${useUserStore().empInfo.empNo}/${props.form.storeCode}/${uuidv4()}.png`, file.file)
const pictureUrl = await uploadFileToOSSAPI(`risk/scheduleAdjustmentPhoto/${useUserStore().empInfo.empNo}/${props.form.storeCode}/${uuidv4()}.png`, file.file)
target.photoArr.push({ target.photoArr.push({
url: pictureUrl url: pictureUrl
}) })
...@@ -185,6 +215,7 @@ const deletedisplayPhotos = async (file, { name, index }) => { ...@@ -185,6 +215,7 @@ const deletedisplayPhotos = async (file, { name, index }) => {
} }
// 核查结果 // 核查结果
const handleVerifyChange = async (index) => { const handleVerifyChange = async (index) => {
if (isDeleteNow.value) return
const target = displayGroup.value[index] const target = displayGroup.value[index]
await createInspectionTaskDetailAPI({ await createInspectionTaskDetailAPI({
taskDetail: { taskDetail: {
...@@ -213,6 +244,9 @@ defineExpose({ ...@@ -213,6 +244,9 @@ defineExpose({
margin: 0; margin: 0;
font-weight: 900; font-weight: 900;
color: var(--main-color); color: var(--main-color);
display: flex;
justify-content: space-between;
} }
/* 每个分组 */ /* 每个分组 */
......
...@@ -3,7 +3,12 @@ ...@@ -3,7 +3,12 @@
<!-- 档期陈列 --> <!-- 档期陈列 -->
<div class="item" <div class="item"
v-for="(obj, index) in displayGroup"> v-for="(obj, index) in displayGroup">
<p class="title">档期陈列{{ index + 1 }}</p> <p class="title">
<span>档期陈列{{ index + 1 }}</span>
<van-icon name="delete"
size="0.45rem"
@click="deleteItem(obj, index)" />
</p>
<van-cell-group inset> <van-cell-group inset>
<van-field v-model="obj.modal" <van-field v-model="obj.modal"
name="modal" name="modal"
...@@ -29,7 +34,7 @@ ...@@ -29,7 +34,7 @@
:model-value="obj.photoArr" :model-value="obj.photoArr"
:name="index" :name="index"
:after-read="displayPhotosRead" :after-read="displayPhotosRead"
preview-size="78" preview-size="2.13333rem"
@delete="deletedisplayPhotos"> @delete="deletedisplayPhotos">
</van-uploader> </van-uploader>
</template> </template>
...@@ -53,11 +58,11 @@ ...@@ -53,11 +58,11 @@
<!-- 新增按钮 --> <!-- 新增按钮 -->
<van-button class="add-item" <van-button class="add-item"
type="primary" type="primary"
@click="createTask">新增一组陈列</van-button> @click="createTask">新增一组</van-button>
<!-- 总体判定 --> <!-- 总体判定 -->
<div class="overall"> <div class="overall">
<p class="title">档期陈列总体判定结果:</p> <p class="title">档期陈列总体判定结果:</p>
<van-checkbox-group v-model="form.cgclRiskRArr" <van-checkbox-group v-model="form.dqclRiskRArr"
direction="horizontal" direction="horizontal"
shape="square" shape="square"
@change="handleOverallChange"> @change="handleOverallChange">
...@@ -71,7 +76,7 @@ ...@@ -71,7 +76,7 @@
</template> </template>
<script setup> <script setup>
import { uploadFileToOSSAPI, createInspectionTaskAPI, createInspectionTaskDetailAPI } from '@/api' import { uploadFileToOSSAPI, createInspectionTaskAPI, createInspectionTaskDetailAPI, deleteInspectionTaskAPI } from '@/api'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import { v4 as uuidv4 } from 'uuid' import { v4 as uuidv4 } from 'uuid'
...@@ -125,6 +130,29 @@ const init = () => { ...@@ -125,6 +130,29 @@ const init = () => {
createTask() createTask()
} }
} }
// 删除分组
const isDeleteNow = ref(false)
const deleteItem = async (obj, index) => {
// 确认询问框
showConfirmDialog({
title: '删除提示',
message: '确定删除吗?',
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
isDeleteNow.value = true
await deleteInspectionTaskAPI({
rstdId: obj.rstdId
})
displayGroup.value.splice(index, 1)
nextTick(() => {
isDeleteNow.value = false
})
showNotify({ type: 'success', message: '删除成功' })
})
}
/*************** 基本信息 ***************/ /*************** 基本信息 ***************/
// 形式修改 // 形式修改
const handleModalityChange = async (index) => { const handleModalityChange = async (index) => {
...@@ -153,9 +181,11 @@ const handleCostChange = async (index) => { ...@@ -153,9 +181,11 @@ const handleCostChange = async (index) => {
const displayPhotosRead = async (file, { name, index }) => { const displayPhotosRead = async (file, { name, index }) => {
// name:是当前照片组件所在陈列组的索引 // name:是当前照片组件所在陈列组的索引
// index: 当前照片组的索引 // index: 当前照片组的索引
const date = new Date()
const month = date.getMonth() + 1
const theDate = date.getDate()
const target = displayGroup.value[name] const target = displayGroup.value[name]
const pictureUrl = await uploadFileToOSSAPI(`risk/${date.getFullYear()}-${month}/scheduleDisplayPhoto/${useUserStore().empInfo.empNo}/${props.form.storeCode}/${uuidv4()}.png`, file.file)
const pictureUrl = await uploadFileToOSSAPI(`risk/scheduleDisplayPhoto/${useUserStore().empInfo.empNo}/${props.form.storeCode}/${uuidv4()}.png`, file.file)
target.photoArr.push({ target.photoArr.push({
url: pictureUrl url: pictureUrl
}) })
...@@ -185,6 +215,7 @@ const deletedisplayPhotos = async (file, { name, index }) => { ...@@ -185,6 +215,7 @@ const deletedisplayPhotos = async (file, { name, index }) => {
} }
// 核查结果 // 核查结果
const handleVerifyChange = async (index) => { const handleVerifyChange = async (index) => {
if (isDeleteNow.value) return
const target = displayGroup.value[index] const target = displayGroup.value[index]
await createInspectionTaskDetailAPI({ await createInspectionTaskDetailAPI({
taskDetail: { taskDetail: {
...@@ -201,7 +232,7 @@ const handleOverallChange = async () => { ...@@ -201,7 +232,7 @@ const handleOverallChange = async () => {
if (props.isInitializing) return if (props.isInitializing) return
await createInspectionTaskAPI({ await createInspectionTaskAPI({
rstId: props.form.rstId, rstId: props.form.rstId,
cgclRiskRArr: props.form.cgclRiskRArr dqclRiskRArr: props.form.dqclRiskRArr
}) })
showNotify({ type: 'success', message: '核查结果,保存成功' }) showNotify({ type: 'success', message: '核查结果,保存成功' })
} }
...@@ -223,6 +254,9 @@ defineExpose({ ...@@ -223,6 +254,9 @@ defineExpose({
margin: 0; margin: 0;
font-weight: 900; font-weight: 900;
color: var(--main-color); color: var(--main-color);
display: flex;
justify-content: space-between;
} }
/* 每个分组 */ /* 每个分组 */
......
...@@ -6,35 +6,53 @@ ...@@ -6,35 +6,53 @@
<div class="terminal-info-container"> <div class="terminal-info-container">
<p class="title">录入终端信息</p> <p class="title">录入终端信息</p>
<div class="content"> <div class="content">
<van-form ref="myFormRef">
<!-- 终端名称输入 --> <!-- 终端名称输入 -->
<van-field v-model="terminalName" <van-field v-model="form.storeName"
label="终端名称:" label="终端名称:"
label-align="top" label-align="top"
placeholder="请输入" placeholder="请输入"
class="input-field" /> class="input-field"
:rules="[{ required: true, message: '请输入终端名称' }]" />
<!-- 门头照上传 --> <!-- 门头照上传 -->
<div class="header-photo-section"> <div class="header-photo-section">
<van-field label="门头照" <van-field label="门头照"
label-align="top"> label-align="top"
:rules="[{ required: true, message: '请上传门头照' }]">
<template #input> <template #input>
<van-uploader :max-count="2" <van-uploader :max-count="1"
accept="image/*" accept="image/*"
v-model="form.posPhotos" capture="camera"
:model-value="form.storePicture"
:after-read="posPhotosRead" :after-read="posPhotosRead"
preview-size="120" preview-size="2.13333rem"
@delete="deletePosPhotos"> @delete="deletePosPhotos">
</van-uploader> </van-uploader>
</template> </template>
</van-field> </van-field>
</div> </div>
<!-- 门店类型选择 --> <!-- 门店类型选择 -->
<van-field :model-value="form.selectedType.join('')" <van-field label-width="150px"
label-position="top"
label="门店类型:"
:model-value="form.selectedType"
placeholder="请选择">
<template #input>
<el-select v-model="form.selectedType"
placeholder="请选择">
<el-option v-for="item in typeOptions"
:label="item.text"
:value="item.value" />
</el-select>
</template>
</van-field>
<!-- <van-field :model-value="form.selectedType.join('')"
readonly
label="门店类型" label="门店类型"
label-align="top" label-align="top"
placeholder="请选择" placeholder="请选择"
@click="showTypePopup = true" /> @click="showTypePopup = true"
:rules="[{ required: true, message: '请选择门店类型' }]" />
<van-popup v-model:show="showTypePopup" <van-popup v-model:show="showTypePopup"
position="bottom" position="bottom"
@close="showTypePopup = false"> @close="showTypePopup = false">
...@@ -42,9 +60,9 @@ ...@@ -42,9 +60,9 @@
:columns="typeOptions" :columns="typeOptions"
@confirm="handleTypeConfirm" @confirm="handleTypeConfirm"
@cancel="showTypePopup = false" /> @cancel="showTypePopup = false" />
</van-popup> </van-popup> -->
</van-form>
</div> </div>
</div> </div>
<!-- 操作按钮 --> <!-- 操作按钮 -->
<div class="button-group"> <div class="button-group">
...@@ -54,11 +72,6 @@ ...@@ -54,11 +72,6 @@
@click="handleCreateTask"> @click="handleCreateTask">
创建任务 创建任务
</van-button> </van-button>
<van-button type="info"
block
@click="handleCancel">
取消
</van-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -68,72 +81,60 @@ ...@@ -68,72 +81,60 @@
import { uploadFileToOSSAPI } from '@/api' import { uploadFileToOSSAPI } from '@/api'
import { v4 as uuidv4 } from 'uuid'; import { v4 as uuidv4 } from 'uuid';
import { typeOptions as typeOption } from '@/views/mobile/constant' import { typeOptions as typeOption } from '@/views/mobile/constant'
import useUserStore from '@/store/modules/user'
const router = useRouter(); const router = useRouter();
const form = ref({ const form = reactive({
selectedType: [] storeName: '',
storePicture: [],
selectedType: ''
}) })
const terminalName = ref('');
const headerPhotoUrl = ref('');
const typeOptions = ref(typeOption); // 门店类型 const typeOptions = ref(typeOption); // 门店类型
const selectedType = ref('');
const showTypePopup = ref(false); const showTypePopup = ref(false);
// 门头照上传逻辑 // 门头照上传逻辑
// POS 两张照片
const posPhotosRead = async (file) => { const posPhotosRead = async (file) => {
// 处理上传的文件
const date = new Date() const date = new Date()
const month = date.getMonth() + 1 const month = date.getMonth() + 1
const theDate = date.getDate() const theDate = date.getDate()
const pictureUrl = await uploadFileToOSSAPI(`risk/${date.getFullYear()}-${month}/${theDate}/${planId.value}/${employeeNo}/${uuidv4()}.png`, file.file) const pictureUrl = await uploadFileToOSSAPI(`risk/newTerminal-storePhoto/${date.getFullYear()}-${month}/${useUserStore().empInfo.empNo}/${uuidv4()}.png`, file.file)
// 判断 objectUrl form.storePicture = [{
const index = form.value.posPhotos.findIndex(o => o.objectUrl)
form.value.posPhotos[index] = {
url: pictureUrl url: pictureUrl
} }]
showNotify({ type: 'success', message: '照片上传成功' })
} }
// 删除 照片 // 删除照片
const deletePosPhotos = async () => { const deletePosPhotos = async () => {
if (isInitializing.value) return form.storePicture = []
await createExamine({ showNotify({ type: 'success', message: '照片删除成功' })
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) => { // const handleTypeConfirm = ({ selectedValues }) => {
form.selectedType = val; // form.selectedType = selectedValues;
showTypePopup.value = false; // showTypePopup.value = false;
}; // };
// 创建任务(可根据需求对接接口) // 创建任务(跳转路由传参即可)
const myFormRef = ref(null)
const handleCreateTask = () => { const handleCreateTask = () => {
console.log('创建任务:', { // 校验整个表单
terminalName: terminalName.value, myFormRef.value.validate().then(() => {
headerPhoto: headerPhotoUrl.value, // 校验通过,执行创建任务逻辑
storeType: selectedType.value, router.push({
}); path: '/inspectionTask',
// 此处可补充接口请求逻辑 query: {
taskStatus: true,
storeName: form.storeName,
storeCode: null,
storePicture: form.storePicture[0]?.url,
selectedType: form.selectedType
}
})
})
}; };
// 取消操作
const handleCancel = () => {
console.log('取消操作');
// 可重置表单等逻辑
terminalName.value = '';
headerPhotoUrl.value = '';
selectedType.value = 'KA';
};
</script> </script>
<style lang="scss" <style lang="scss"
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</template> </template>
<template #label> <template #label>
<div class="item-company">{{ item.dealersName }}</div> <div class="item-company">{{ item.dealersName }}</div>
<div class="item-address">{{ item.storeAddr }}</div> <div class="item-address">{{ item.address }}</div>
</template> </template>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
...@@ -56,6 +56,9 @@ ...@@ -56,6 +56,9 @@
<script setup> <script setup>
import { getTerminalStoreListAPI } from '@/api' import { getTerminalStoreListAPI } from '@/api'
defineOptions({
name: 'Sales_point_inspection'
})
const router = useRouter(); const router = useRouter();
...@@ -177,7 +180,8 @@ const addNewTerminal = () => { ...@@ -177,7 +180,8 @@ const addNewTerminal = () => {
} }
.van-pull-refresh {
min-height: 100vh;
.result-list { .result-list {
background-color: transparent; background-color: transparent;
...@@ -211,8 +215,7 @@ const addNewTerminal = () => { ...@@ -211,8 +215,7 @@ const addNewTerminal = () => {
} }
} }
} }
}
} }
.empty-tip { .empty-tip {
......
...@@ -3,91 +3,176 @@ ...@@ -3,91 +3,176 @@
<!-- 任务列表 --> <!-- 任务列表 -->
<van-nav-bar left-arrow <van-nav-bar left-arrow
@click-left="router.back()"> @click-left="router.back()">
<template #right>
<span class="search-text"
@click="showSearch = true">搜索</span>
</template>
</van-nav-bar> </van-nav-bar>
<van-pull-refresh v-model="refreshLoading"
:pull-distance="100"
success-text="刷新成功"
@refresh="onRefresh">
<van-list v-model:loading="loading" <van-list v-model:loading="loading"
:finished="finished" :finished="finished"
finished-text="没有更多结果了" finished-text="没有更多结果了"
class="result-list"> class="result-list"
@load="onLoadMore">
<van-cell-group inset> <van-cell-group inset>
<!-- <van-swipe-cell v-for="(item, index) in resultList"
:key="index"> -->
<van-cell v-for="(item, index) in resultList" <van-cell v-for="(item, index) in resultList"
:key="index" :key="index"
class="result-item" @click="handleClickStore(item)"
@click="handleClickStore(item)"> class="result-item">
<template #title> <template #title>
<div class="item-title"> <div class="item-title">
<span>{{ item.name }}</span> <span>{{ item.storeName }}</span>
<span>{{ item.code }}</span> <span>{{ parseTime(item.createTime, '{y}-{m}-{d}') }}</span>
</div> </div>
</template> </template>
<template #label> <template #label>
<div class="item-company">{{ item.company }}</div> <div class="item-company">{{ item.storeCode }}</div>
<div class="item-address">{{ item.address }}</div> <div class="item-address">{{ item.address }}</div>
</template> </template>
</van-cell> </van-cell>
<template #right>
<van-button square
type="danger"
text="删除"
@click="deleteFn(item, index)" />
</template>
<!-- </van-swipe-cell> -->
</van-cell-group> </van-cell-group>
</van-list> </van-list>
</van-pull-refresh>
<!-- 搜索 -->
<van-popup v-model:show="showSearch"
position="right"
class="wrap">
<van-nav-bar title="筛选条件" />
<van-field type="text">
<template #input>
<van-search v-model="query.storeName"
placeholder="输入搜索的勤策终端编码/名称"
@update:model-value="search"
class="search-bar" />
</template>
</van-field>
<!-- 日期区间 -->
<van-field type="text">
<template #input>
<el-date-picker v-model="query.operDate"
type="date"
value-format="YYYY-MM-DD"
placeholder="输入搜索的日期"
@change="getInspectionTaskListFn" />
</template>
</van-field>
<!-- 重置按钮 -->
<van-button icon="replay"
class="reset-btn"
block
@click="resetFn">重置</van-button>
</van-popup>
</div> </div>
</template> </template>
<script setup> <script setup>
import { getInspectionTaskListAPI} from '@/api'
import { parseTime } from '@/utils'
import { showNotify } from 'vant';
defineOptions({
name: 'Sales_point_inspection'
})
const router = useRouter(); const router = useRouter();
const resultList = ref([
{ // 搜索
name: '门店1', const showSearch = ref(false)
code: '123456',
company: '公司1', // 获取列表
address: '地址1' const query = reactive({
}, pageNum: 1,
{ pageSize: 10
name: '门店2', })
code: '123457', const resultList = ref([])
company: '公司2',
address: '地址2'
},
{
name: '门店3',
code: '123458',
company: '公司3',
address: '地址3'
},
])
const loading = ref(false); const loading = ref(false);
const finished = ref(true); const finished = ref(true);
const showEmpty = ref(false); const refreshLoading = ref(false)
// 搜索处理 const getInspectionTaskListFn = async () => {
const handleSearch = () => { const res = await getInspectionTaskListAPI(query)
if (!searchVal.value.trim()) { resultList.value = [...resultList.value, ...res.data.rows]
resultList.value = mockData; finished.value = res.data.total <= resultList.value.length
showEmpty.value = false; }
return; getInspectionTaskListFn()
}
// 刷新
// 模拟加载状态 const onRefresh = async () => {
loading.value = true; refreshLoading.value = true
query.pageNum = 1
// 模拟接口请求延迟 query.storeName = ''
setTimeout(() => { resultList.value = []
const filtered = mockData.filter(item => { await getInspectionTaskListFn()
const matchStr = `${item.name}${item.code}${item.company}${item.address}`; refreshLoading.value = false
return matchStr.includes(searchVal.value); }
}); // 更多
const onLoadMore = async () => {
resultList.value = filtered; query.pageNum++
loading.value = false; await getInspectionTaskListFn()
finished.value = true; loading.value = false
}, 500); }
};
// 搜索中重置
const resetFn = () => {
query.pageNum = 1
query.storeName = ''
query.operDate = ''
resultList.value = []
getInspectionTaskListFn()
}
// 门店点击 // 门店点击
const handleClickStore = (item) => { const handleClickStore = (item) => {
router.push({ router.push({
path: '/inspectionTask', path: '/inspectionTask',
query: { query: {
storeName: item.name, storeName: item.storeName,
storeCode: item.code storeCode: item.storeCode,
storePicture: item.storePictures?.split(",")[0]
} }
}) })
} }
// 路由离开守卫:控制是否缓存
onBeforeRouteLeave((to, from, next) => {
if (to.path === '/audit_activity/sales_point_inspection') {
// 强制刷新当前组件
resetFn()
}
next()
})
// 搜索地址
const search = () => {
resultList.value = []
getInspectionTaskListFn()
}
// 删除任务
const deleteFn = async (item, index) => {
// console.log(item)
// await deleteInspectionTaskAPI({
// rstdId: item.rstId
// })
// resultList.value.splice(index, 1)
// showNotify({
// message: '删除成功',
// type: 'success',
// })
}
</script> </script>
<style scoped <style scoped
...@@ -101,6 +186,13 @@ const handleClickStore = (item) => { ...@@ -101,6 +186,13 @@ const handleClickStore = (item) => {
background-color: #f5f5f5; background-color: #f5f5f5;
min-height: 100vh; min-height: 100vh;
.search-text {
color: var(--main-color);
}
.van-pull-refresh {
min-height: 100vh;
.result-list { .result-list {
background-color: transparent; background-color: transparent;
padding: 0 20px; padding: 0 20px;
...@@ -120,6 +212,12 @@ const handleClickStore = (item) => { ...@@ -120,6 +212,12 @@ const handleClickStore = (item) => {
margin-bottom: 4px; margin-bottom: 4px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
span:last-child {
width: 100px;
text-align: right;
display: inline-block;
}
} }
.item-company { .item-company {
...@@ -133,9 +231,44 @@ const handleClickStore = (item) => { ...@@ -133,9 +231,44 @@ const handleClickStore = (item) => {
color: #a6a4a4; color: #a6a4a4;
line-height: 1.4; line-height: 1.4;
} }
}
/* 滑动右侧按钮 */
::v-deep(.van-swipe-cell__right) {
height: 100px;
.van-button {
height: 100%;
}
} }
} }
} }
} }
/* 搜索 */
.wrap {
--van-field-label-width: 80px;
height: 100vh;
width: 85% !important;
.van-cell {
align-items: center;
.search-bar {
width: 100%;
padding: 0;
}
::v-deep(.el-input) {
width: 100%;
}
}
}
}
</style> </style>
\ No newline at end of file
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
@click-left="clickBack()" @click-left="clickBack()"
fixed fixed
placeholder> placeholder>
<template #right <template #right>
v-if="!isCityManager">
<p class="van-nav-bar__text" <p class="van-nav-bar__text"
@click="clickExamine()"> @click="clickExamine()"
v-hasRole="['fkwqjc']">
{{ (examined ? '已' : '未') + '稽查' }} {{ (examined ? '已' : '未') + '稽查' }}
</p> </p>
</template> </template>
......
...@@ -21,17 +21,17 @@ export const constantMobileRoutes = [ ...@@ -21,17 +21,17 @@ export const constantMobileRoutes = [
name: 'm_menu' name: 'm_menu'
}, },
{ {
path: 'promotion_plan_detail/:planId', // 详情 path: 'promotion_plan_detail/:planId', // CP 促销计划,详情页
component: () => import('@/views/mobile/pages/cp_activity/promotion/plan/detail'), component: () => import('@/views/mobile/pages/cp_activity/promotion/plan/detail'),
name: 'm_promotion_detail', name: 'm_promotion_detail',
}, },
{ {
path: 'promotion_plan_editing/:planId?', // path: 'promotion_plan_editing/:planId?', // CP 促销计划,增加,修
component: () => import('@/views/mobile/pages/cp_activity/promotion/plan/editing'), component: () => import('@/views/mobile/pages/cp_activity/promotion/plan/editing'),
name: 'm_promotion_editing', name: 'm_promotion_editing',
}, },
{ {
path: 'examine/:examineId', // 促销内稽查 path: 'examine/:examineId', // CP 促销计划,稽查
component: () => import('@/views/mobile/pages/cp_activity/examine'), component: () => import('@/views/mobile/pages/cp_activity/examine'),
name: 'm_promotion_examine', name: 'm_promotion_examine',
}, },
...@@ -41,17 +41,17 @@ export const constantMobileRoutes = [ ...@@ -41,17 +41,17 @@ export const constantMobileRoutes = [
name: 'logistics' name: 'logistics'
}, },
{ {
path: 'newTerminal', // 新建终端门店 path: 'newTerminal', // 售点稽查_新建终端门店
component: () => import('@/views/mobile/pages/audit_activity/sales_point_inspection/examine/newTerminal'), component: () => import('@/views/mobile/pages/audit_activity/sales_point_inspection/examine/newTerminal'),
name: 'newTerminal' name: 'newTerminal'
}, },
{ {
path: 'taskList', // 稽查记录 path: 'taskList', // 售点稽查_稽查记录列表
component: () => import('@/views/mobile/pages/audit_activity/sales_point_inspection/examine/taskList'), component: () => import('@/views/mobile/pages/audit_activity/sales_point_inspection/examine/taskList'),
name: 'taskList' name: 'taskList'
}, },
{ {
path: 'inspectionTask', // 稽查任务(终端门店) path: 'inspectionTask', // 售点稽查_稽查任务
component: () => import('@/views/mobile/pages/audit_activity/sales_point_inspection/examine/inspectionTask/index'), component: () => import('@/views/mobile/pages/audit_activity/sales_point_inspection/examine/inspectionTask/index'),
name: 'inspectionTask' name: 'inspectionTask'
}, },
......
...@@ -22,11 +22,6 @@ export default defineConfig(({ mode, command }) => { ...@@ -22,11 +22,6 @@ export default defineConfig(({ mode, command }) => {
host: true, host: true,
open: true, open: true,
proxy: { proxy: {
'/tencent_map_api': {
target: 'https://apis.map.qq.com/ws/geocoder/v1',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/tencent_map_api/, '')
},
'/dev-api': { '/dev-api': {
target: 'http://192.168.100.55:8080', target: 'http://192.168.100.55:8080',
// target: 'https://sfa-qa.wxl66.cn/api', // target: 'https://sfa-qa.wxl66.cn/api',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论