Commit 1997abcf by wuqian

feat:九猫客户管理新增、开通及关闭ERP#ID1010699

parent 9508944f
...@@ -154,4 +154,21 @@ export function post(url, params, headers) { ...@@ -154,4 +154,21 @@ export function post(url, params, headers) {
}) })
} }
export function remove(url, params) {
return new Promise((resolve, reject) => {
axios
.delete(url, { params })
.then((res) => {
if (res.status === 200 && res.data) {
resolve(res.data)
} else {
resolve(res)
}
})
.catch((err) => {
reject(err)
})
})
}
export default axios export default axios
...@@ -7,13 +7,23 @@ ...@@ -7,13 +7,23 @@
--> -->
<template> <template>
<div class="img_main" :style="!isFloat ? 'display:block' : ''"> <div class="img_main" :style="!isFloat ? 'display:block' : ''">
<draggable v-model="list" group="people" @start="drag = true" @end="drag = false" <draggable
:style="!isFloat ? 'display:block' : ''" :move="onMove" class="draggable"> v-model="list"
group="people"
@start="drag = true"
@end="drag = false"
:style="!isFloat ? 'display:block' : ''"
:move="onMove"
class="draggable">
<template v-if="isFloat"> <template v-if="isFloat">
<div class="img_img" v-for="(item, i) in fileList" :key="i"> <div class="img_img" v-for="(item, i) in fileList" :key="i">
<div class="img_item" :class="{ high: highLength > i }"> <div class="img_item" :class="{ high: highLength > i }">
<div class="img"> <div class="img">
<img width="58" height="58" :src="item.imagePath <img
width="58"
height="58"
:src="
item.imagePath
? setimgUrl(formatUrl(item.imagePath, 75), { ? setimgUrl(formatUrl(item.imagePath, 75), {
w: width, w: width,
f: 'png', f: 'png',
...@@ -21,7 +31,8 @@ ...@@ -21,7 +31,8 @@
hasWidth: hasWidth hasWidth: hasWidth
}) })
: formatUrl(item.filePath, 75) : formatUrl(item.filePath, 75)
" alt="" /> "
alt="" />
<span style="font-size: 12px">{{ item.id }}</span> <span style="font-size: 12px">{{ item.id }}</span>
</div> </div>
...@@ -29,13 +40,21 @@ ...@@ -29,13 +40,21 @@
<button type="button" @click="fullscreen(i)"> <button type="button" @click="fullscreen(i)">
<i class="el-icon-zoom-in"></i> <i class="el-icon-zoom-in"></i>
</button> </button>
<button class="remove" v-if="isdel" type="button" @click="remove(i)"> <button
class="remove"
v-if="isdel"
type="button"
@click="remove(i)">
<i class="el-icon-close"></i> <i class="el-icon-close"></i>
</button> </button>
</div> </div>
<slot name="mark" :index="i" :item="item"></slot> <slot name="mark" :index="i" :item="item"></slot>
<template> <template>
<span class="select-icon" v-if="item.type" :style="item.type === 'positively' <span
class="select-icon"
v-if="item.type"
:style="
item.type === 'positively'
? 'background-color:#67C23A' ? 'background-color:#67C23A'
: item.type === 'negative' : item.type === 'negative'
? 'background-color:#409EFF' ? 'background-color:#409EFF'
...@@ -52,7 +71,10 @@ ...@@ -52,7 +71,10 @@
</template> </template>
</div> </div>
</div> </div>
<div v-show="add && fileList.length < length" class="img_wrap" @click="upload"> <div
v-show="add && fileList.length < length"
class="img_wrap"
@click="upload">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</div> </div>
</template> </template>
...@@ -60,7 +82,11 @@ ...@@ -60,7 +82,11 @@
<div v-for="(item, i) in fileList" :key="i" class="include-other-info"> <div v-for="(item, i) in fileList" :key="i" class="include-other-info">
<div class="img_item" :class="{ high: highLength > i }"> <div class="img_item" :class="{ high: highLength > i }">
<div class="img"> <div class="img">
<img width="58" height="58" :src="item.imagePath <img
width="58"
height="58"
:src="
item.imagePath
? setimgUrl(item.imagePath, { ? setimgUrl(item.imagePath, {
w: width, w: width,
f: 'png', f: 'png',
...@@ -74,7 +100,8 @@ ...@@ -74,7 +100,8 @@
hasWidth: hasWidth, hasWidth: hasWidth,
hasOss: hasOss hasOss: hasOss
}) })
" alt="" /> "
alt="" />
<span style="font-size: 12px">{{ item.id }}</span> <span style="font-size: 12px">{{ item.id }}</span>
</div> </div>
...@@ -82,20 +109,32 @@ ...@@ -82,20 +109,32 @@
<button type="button" @click="fullscreen(i)"> <button type="button" @click="fullscreen(i)">
<i class="el-icon-zoom-in"></i> <i class="el-icon-zoom-in"></i>
</button> </button>
<button class="remove" v-if="isdel" type="button" @click="remove(i)"> <button
class="remove"
v-if="isdel"
type="button"
@click="remove(i)">
<i class="el-icon-close"></i> <i class="el-icon-close"></i>
</button> </button>
</div> </div>
</div> </div>
<slot name="other" :index="i" :item="item"></slot> <slot name="other" :index="i" :item="item"></slot>
</div> </div>
<div v-show="add && fileList.length < length" class="img_wrap" @click="upload"> <div
v-show="add && fileList.length < length"
class="img_wrap"
@click="upload">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</div> </div>
</template> </template>
</draggable> </draggable>
<el-image-viewer class="image_viewer" :initialIndex="initialIndex" :zIndex="9999" :urlList="urlList" <el-image-viewer
v-if="imageVisible" :on-close="closeViewer"></el-image-viewer> class="image_viewer"
:initialIndex="initialIndex"
:zIndex="9999"
:urlList="urlList"
v-if="imageVisible"
:on-close="closeViewer"></el-image-viewer>
</div> </div>
</template> </template>
<script> <script>
...@@ -349,7 +388,7 @@ export default { ...@@ -349,7 +388,7 @@ export default {
const [imgobj] = this.fileList.splice(i, 1) const [imgobj] = this.fileList.splice(i, 1)
this.$emit('remove', imgobj) this.$emit('remove', imgobj)
}) })
.catch(() => { }) .catch(() => {})
} else { } else {
const [imgobj] = this.fileList.splice(i, 1) const [imgobj] = this.fileList.splice(i, 1)
this.$emit('remove', imgobj) this.$emit('remove', imgobj)
...@@ -410,13 +449,17 @@ export default { ...@@ -410,13 +449,17 @@ export default {
.img_item { .img_item {
position: relative; position: relative;
width: 100%; width: 58px;
height: auto; height: 58px;
text-align: center; text-align: center;
border: 1px solid #ddd; border: 1px solid #ddd;
margin-bottom: 5px; margin-bottom: 5px;
} }
.img_item .img {
width: 100%;
height: 100%;
position: relative;
}
.img_img:last-child { .img_img:last-child {
margin-right: 6px; margin-right: 6px;
} }
...@@ -484,7 +527,7 @@ export default { ...@@ -484,7 +527,7 @@ export default {
cursor: pointer; cursor: pointer;
} }
.image_viewer>>>.el-image-viewer__close { .image_viewer >>> .el-image-viewer__close {
color: #fff; color: #fff;
} }
......
...@@ -112,10 +112,15 @@ const routes = [ ...@@ -112,10 +112,15 @@ const routes = [
{ {
path: '/saas/user/management', path: '/saas/user/management',
component: () => import('@/views/user/management.vue'), component: () => import('@/views/user/management.vue'),
name: 'system_management', name: 'user_management',
meta: { title: '客户管理' } meta: { title: '潜在客户管理' }
},
{
path: '/saas/user/jm-management',
component: () => import('@/views/user/jmManagement.vue'),
name: 'user_jm_management',
meta: { title: '九猫客户管理' }
}, },
{ {
path: '/saas/user/recharge-record', path: '/saas/user/recharge-record',
component: () => import('@/views/user/rechargeRecord.vue'), component: () => import('@/views/user/rechargeRecord.vue'),
...@@ -167,7 +172,7 @@ const routes = [ ...@@ -167,7 +172,7 @@ const routes = [
{ {
path: '/operation/lossOrder', path: '/operation/lossOrder',
component: () => import('@/views/operation/lossOrder/index.vue'), component: () => import('@/views/operation/lossOrder/index.vue'),
name: 'system_management', name: 'operation_loss_order',
meta: { title: '丢单管理' } meta: { title: '丢单管理' }
}, },
{ {
...@@ -184,7 +189,8 @@ const routes = [ ...@@ -184,7 +189,8 @@ const routes = [
}, },
{ {
path: '/operation/amazonAttributeGrouping', path: '/operation/amazonAttributeGrouping',
component: () => import('@/views/operation/amazon/amazonAttributeGrouping.vue'), component: () =>
import('@/views/operation/amazon/amazonAttributeGrouping.vue'),
name: 'amazonAttributeGrouping', name: 'amazonAttributeGrouping',
meta: { title: '亚马逊属性分类' } meta: { title: '亚马逊属性分类' }
}, },
...@@ -203,7 +209,7 @@ const routes = [ ...@@ -203,7 +209,7 @@ const routes = [
{ {
path: '/dynamicForm', path: '/dynamicForm',
component: () => import('@/components/dynamicForms/index.vue'), component: () => import('@/components/dynamicForms/index.vue'),
name: 'system_management', name: 'dynamic_form',
meta: { title: '动态表单' } meta: { title: '动态表单' }
} }
] ]
......
...@@ -385,9 +385,17 @@ export default { ...@@ -385,9 +385,17 @@ export default {
index: '/user', index: '/user',
children: [ children: [
{ {
id: 4,
path: '',
label: '九猫客户管理',
icon: 'el-icon-user',
index: '/saas/user/jm-management',
children: []
},
{
id: 1, id: 1,
path: '', path: '',
label: '客户管理', label: '潜在客户管理',
icon: 'el-icon-s-custom', icon: 'el-icon-s-custom',
index: '/saas/user/management', index: '/saas/user/management',
children: [] children: []
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
查询 查询
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item> <!-- <el-form-item>
<el-button <el-button
type="success" type="success"
size="small" size="small"
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
@click="addData"> @click="addData">
开通erp 开通erp
</el-button> </el-button>
</el-form-item> </el-form-item> -->
<el-form-item> <el-form-item>
<el-button <el-button
type="danger" type="danger"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment