Commit 1997abcf by wuqian

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

parent 9508944f
......@@ -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
......@@ -7,21 +7,32 @@
-->
<template>
<div class="img_main" :style="!isFloat ? 'display:block' : ''">
<draggable v-model="list" group="people" @start="drag = true" @end="drag = false"
:style="!isFloat ? 'display:block' : ''" :move="onMove" class="draggable">
<draggable
v-model="list"
group="people"
@start="drag = true"
@end="drag = false"
:style="!isFloat ? 'display:block' : ''"
:move="onMove"
class="draggable">
<template v-if="isFloat">
<div class="img_img" v-for="(item, i) in fileList" :key="i">
<div class="img_item" :class="{ high: highLength > i }">
<div class="img">
<img width="58" height="58" :src="item.imagePath
? setimgUrl(formatUrl(item.imagePath, 75), {
w: width,
f: 'png',
isCustom: isCustom,
hasWidth: hasWidth
})
: formatUrl(item.filePath, 75)
" alt="" />
<img
width="58"
height="58"
:src="
item.imagePath
? setimgUrl(formatUrl(item.imagePath, 75), {
w: width,
f: 'png',
isCustom: isCustom,
hasWidth: hasWidth
})
: formatUrl(item.filePath, 75)
"
alt="" />
<span style="font-size: 12px">{{ item.id }}</span>
</div>
......@@ -29,30 +40,41 @@
<button type="button" @click="fullscreen(i)">
<i class="el-icon-zoom-in"></i>
</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>
</button>
</div>
<slot name="mark" :index="i" :item="item"></slot>
<template>
<span class="select-icon" v-if="item.type" :style="item.type === 'positively'
? 'background-color:#67C23A'
: item.type === 'negative'
? 'background-color:#409EFF'
: 'background-color:#B79860'
">
<span
class="select-icon"
v-if="item.type"
:style="
item.type === 'positively'
? 'background-color:#67C23A'
: item.type === 'negative'
? 'background-color:#409EFF'
: 'background-color:#B79860'
">
{{
item.type === 'positively'
? 'F'
: item.type === 'negative'
? 'B'
: 'D'
}}
item.type === 'positively'
? 'F'
: item.type === 'negative'
? 'B'
: 'D'
}}
</span>
</template>
</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>
</div>
</template>
......@@ -60,21 +82,26 @@
<div v-for="(item, i) in fileList" :key="i" class="include-other-info">
<div class="img_item" :class="{ high: highLength > i }">
<div class="img">
<img width="58" height="58" :src="item.imagePath
? setimgUrl(item.imagePath, {
w: width,
f: 'png',
hasWidth: hasWidth,
isCustom: isCustom,
hasOss: hasOss
})
: setimgUrl(item.filePath, {
w: width,
f: 'png',
hasWidth: hasWidth,
hasOss: hasOss
})
" alt="" />
<img
width="58"
height="58"
:src="
item.imagePath
? setimgUrl(item.imagePath, {
w: width,
f: 'png',
hasWidth: hasWidth,
isCustom: isCustom,
hasOss: hasOss
})
: setimgUrl(item.filePath, {
w: width,
f: 'png',
hasWidth: hasWidth,
hasOss: hasOss
})
"
alt="" />
<span style="font-size: 12px">{{ item.id }}</span>
</div>
......@@ -82,20 +109,32 @@
<button type="button" @click="fullscreen(i)">
<i class="el-icon-zoom-in"></i>
</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>
</button>
</div>
</div>
<slot name="other" :index="i" :item="item"></slot>
</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>
</div>
</template>
</draggable>
<el-image-viewer class="image_viewer" :initialIndex="initialIndex" :zIndex="9999" :urlList="urlList"
v-if="imageVisible" :on-close="closeViewer"></el-image-viewer>
<el-image-viewer
class="image_viewer"
:initialIndex="initialIndex"
:zIndex="9999"
:urlList="urlList"
v-if="imageVisible"
:on-close="closeViewer"></el-image-viewer>
</div>
</template>
<script>
......@@ -231,9 +270,9 @@ export default {
return this.list.map((item) => {
return item.imagePath
? this.setimgUrl(item.imagePath, {
f: 'png',
isCustom: this.isCustom
})
f: 'png',
isCustom: this.isCustom
})
: item.filePath
})
}
......@@ -310,21 +349,21 @@ export default {
if (this.joinBefore) {
data.imagePath
? list.unshift({
imagePath: data.imagePath
})
imagePath: data.imagePath
})
: list.unshift({
imagePath: data.filePath
})
imagePath: data.filePath
})
} else {
data.imagePath
? list.push({
imagePath: data.imagePath,
type: this.isMark ? 'positively' : ''
})
imagePath: data.imagePath,
type: this.isMark ? 'positively' : ''
})
: list.push({
imagePath: data.filePath,
type: this.isMark ? 'positively' : ''
})
imagePath: data.filePath,
type: this.isMark ? 'positively' : ''
})
}
}
this.$emit('selectImg', this.deduplication(list))
......@@ -349,7 +388,7 @@ export default {
const [imgobj] = this.fileList.splice(i, 1)
this.$emit('remove', imgobj)
})
.catch(() => { })
.catch(() => {})
} else {
const [imgobj] = this.fileList.splice(i, 1)
this.$emit('remove', imgobj)
......@@ -410,13 +449,17 @@ export default {
.img_item {
position: relative;
width: 100%;
height: auto;
width: 58px;
height: 58px;
text-align: center;
border: 1px solid #ddd;
margin-bottom: 5px;
}
.img_item .img {
width: 100%;
height: 100%;
position: relative;
}
.img_img:last-child {
margin-right: 6px;
}
......@@ -484,7 +527,7 @@ export default {
cursor: pointer;
}
.image_viewer>>>.el-image-viewer__close {
.image_viewer >>> .el-image-viewer__close {
color: #fff;
}
......
......@@ -43,7 +43,7 @@ const routes = [
name: 'saasMenu',
meta: { title: 'ERP菜单管理' }
},
{
{
path: '/saas/factoryMenu',
component: factoryMenuPage,
name: 'factoryMenu',
......@@ -112,10 +112,15 @@ const routes = [
{
path: '/saas/user/management',
component: () => import('@/views/user/management.vue'),
name: 'system_management',
meta: { title: '客户管理' }
name: 'user_management',
meta: { title: '潜在客户管理' }
},
{
path: '/saas/user/jm-management',
component: () => import('@/views/user/jmManagement.vue'),
name: 'user_jm_management',
meta: { title: '九猫客户管理' }
},
{
path: '/saas/user/recharge-record',
component: () => import('@/views/user/rechargeRecord.vue'),
......@@ -167,7 +172,7 @@ const routes = [
{
path: '/operation/lossOrder',
component: () => import('@/views/operation/lossOrder/index.vue'),
name: 'system_management',
name: 'operation_loss_order',
meta: { title: '丢单管理' }
},
{
......@@ -184,7 +189,8 @@ const routes = [
},
{
path: '/operation/amazonAttributeGrouping',
component: () => import('@/views/operation/amazon/amazonAttributeGrouping.vue'),
component: () =>
import('@/views/operation/amazon/amazonAttributeGrouping.vue'),
name: 'amazonAttributeGrouping',
meta: { title: '亚马逊属性分类' }
},
......@@ -203,7 +209,7 @@ const routes = [
{
path: '/dynamicForm',
component: () => import('@/components/dynamicForms/index.vue'),
name: 'system_management',
name: 'dynamic_form',
meta: { title: '动态表单' }
}
]
......
......@@ -385,9 +385,17 @@ export default {
index: '/user',
children: [
{
id: 4,
path: '',
label: '九猫客户管理',
icon: 'el-icon-user',
index: '/saas/user/jm-management',
children: []
},
{
id: 1,
path: '',
label: '客户管理',
label: '潜在客户管理',
icon: 'el-icon-s-custom',
index: '/saas/user/management',
children: []
......
......@@ -65,7 +65,7 @@
查询
</el-button>
</el-form-item>
<el-form-item>
<!-- <el-form-item>
<el-button
type="success"
size="small"
......@@ -73,7 +73,7 @@
@click="addData">
开通erp
</el-button>
</el-form-item>
</el-form-item> -->
<el-form-item>
<el-button
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