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,21 +7,32 @@ ...@@ -7,21 +7,32 @@
--> -->
<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
? setimgUrl(formatUrl(item.imagePath, 75), { width="58"
w: width, height="58"
f: 'png', :src="
isCustom: isCustom, item.imagePath
hasWidth: hasWidth ? setimgUrl(formatUrl(item.imagePath, 75), {
}) w: width,
: formatUrl(item.filePath, 75) f: 'png',
" alt="" /> isCustom: isCustom,
hasWidth: hasWidth
})
: formatUrl(item.filePath, 75)
"
alt="" />
<span style="font-size: 12px">{{ item.id }}</span> <span style="font-size: 12px">{{ item.id }}</span>
</div> </div>
...@@ -29,30 +40,41 @@ ...@@ -29,30 +40,41 @@
<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
? 'background-color:#67C23A' class="select-icon"
: item.type === 'negative' v-if="item.type"
? 'background-color:#409EFF' :style="
: 'background-color:#B79860' item.type === 'positively'
"> ? 'background-color:#67C23A'
: item.type === 'negative'
? 'background-color:#409EFF'
: 'background-color:#B79860'
">
{{ {{
item.type === 'positively' item.type === 'positively'
? 'F' ? 'F'
: item.type === 'negative' : item.type === 'negative'
? 'B' ? 'B'
: 'D' : 'D'
}} }}
</span> </span>
</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,21 +82,26 @@ ...@@ -60,21 +82,26 @@
<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
? setimgUrl(item.imagePath, { width="58"
w: width, height="58"
f: 'png', :src="
hasWidth: hasWidth, item.imagePath
isCustom: isCustom, ? setimgUrl(item.imagePath, {
hasOss: hasOss w: width,
}) f: 'png',
: setimgUrl(item.filePath, { hasWidth: hasWidth,
w: width, isCustom: isCustom,
f: 'png', hasOss: hasOss
hasWidth: hasWidth, })
hasOss: hasOss : setimgUrl(item.filePath, {
}) w: width,
" alt="" /> f: 'png',
hasWidth: hasWidth,
hasOss: hasOss
})
"
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>
...@@ -231,9 +270,9 @@ export default { ...@@ -231,9 +270,9 @@ export default {
return this.list.map((item) => { return this.list.map((item) => {
return item.imagePath return item.imagePath
? this.setimgUrl(item.imagePath, { ? this.setimgUrl(item.imagePath, {
f: 'png', f: 'png',
isCustom: this.isCustom isCustom: this.isCustom
}) })
: item.filePath : item.filePath
}) })
} }
...@@ -310,21 +349,21 @@ export default { ...@@ -310,21 +349,21 @@ export default {
if (this.joinBefore) { if (this.joinBefore) {
data.imagePath data.imagePath
? list.unshift({ ? list.unshift({
imagePath: data.imagePath imagePath: data.imagePath
}) })
: list.unshift({ : list.unshift({
imagePath: data.filePath imagePath: data.filePath
}) })
} else { } else {
data.imagePath data.imagePath
? list.push({ ? list.push({
imagePath: data.imagePath, imagePath: data.imagePath,
type: this.isMark ? 'positively' : '' type: this.isMark ? 'positively' : ''
}) })
: list.push({ : list.push({
imagePath: data.filePath, imagePath: data.filePath,
type: this.isMark ? 'positively' : '' type: this.isMark ? 'positively' : ''
}) })
} }
} }
this.$emit('selectImg', this.deduplication(list)) this.$emit('selectImg', this.deduplication(list))
...@@ -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;
} }
......
...@@ -43,7 +43,7 @@ const routes = [ ...@@ -43,7 +43,7 @@ const routes = [
name: 'saasMenu', name: 'saasMenu',
meta: { title: 'ERP菜单管理' } meta: { title: 'ERP菜单管理' }
}, },
{ {
path: '/saas/factoryMenu', path: '/saas/factoryMenu',
component: factoryMenuPage, component: factoryMenuPage,
name: 'factoryMenu', name: 'factoryMenu',
...@@ -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