Commit 5dca8a3e by qinjianhui

Merge branch 'dev' into 'master'

Dev

See merge request !31
parents 73d4887b 107e5931
import axios from '../axios'
export function listTableData(data) {
return axios.post('/order/loseOrderInfo/list_page', data)
}
export function listShopPlateformData() {
return axios.get('/order/loseOrderInfo/getPlatform')
}
export function deleteData(data) {
return axios.post('/order/loseOrderInfo/deleteLoseOrderInfoByIds?ids=' + data)
}
...@@ -117,6 +117,12 @@ const routes = [ ...@@ -117,6 +117,12 @@ const routes = [
title: '商品属性管理', title: '商品属性管理',
}, },
}, },
{
path: '/operation/lossOrder',
component: () => import('@/views/operation/lossOrder/index.vue'),
name: 'system_management',
meta: { title: '丢单管理' },
},
], ],
}, },
] ]
......
...@@ -11,15 +11,13 @@ ...@@ -11,15 +11,13 @@
text-color="#fff" text-color="#fff"
style="flex: 1" style="flex: 1"
background-color="#1565C0" background-color="#1565C0"
@click.native="onClickMenus" @select="onClickMenus"
active-text-color="#ffd04b" active-text-color="#ffd04b">
>
<template v-for="(nav, index) in menuList"> <template v-for="(nav, index) in menuList">
<el-menu-item <el-menu-item
:key="index" :key="index"
v-if="nav.children.length === 0" v-if="nav.children.length === 0"
:index="nav.index" :index="nav.index">
>
<template slot="title"> <template slot="title">
<i :class="nav.icon"></i> <i :class="nav.icon"></i>
<span class="label">{{ nav.label }}</span> <span class="label">{{ nav.label }}</span>
...@@ -33,14 +31,11 @@ ...@@ -33,14 +31,11 @@
<el-menu-item <el-menu-item
:index="subs.index" :index="subs.index"
v-for="(subs, index) in nav.children" v-for="(subs, index) in nav.children"
:key="index" :key="index">
>
<template slot="title"> <template slot="title">
<i :class="subs.icon"></i> <i :class="subs.icon"></i>
<span class="label">{{ <span class="label">{{ subs.label }}</span>
subs.label </template>
}}</span></template
>
</el-menu-item> </el-menu-item>
</el-submenu> </el-submenu>
</template> </template>
...@@ -51,18 +46,14 @@ ...@@ -51,18 +46,14 @@
</span> </span>
<el-dropdown> <el-dropdown>
<div size="mini" style="color: #fff"> <div size="mini" style="color: #fff">
{{ userInfo && userInfo.realName {{ userInfo && userInfo.realName }}
}}<i <i class="el-icon-arrow-down el-icon--right"></i>
class="el-icon-arrow-down el-icon--right"
></i>
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="updatePassword" <el-dropdown-item @click.native="updatePassword">
>修改密码</el-dropdown-item 修改密码
> </el-dropdown-item>
<el-dropdown-item @click.native="logout" <el-dropdown-item @click.native="logout">退出登录</el-dropdown-item>
>退出登录</el-dropdown-item
>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
...@@ -77,56 +68,60 @@ ...@@ -77,56 +68,60 @@
:close-on-click-modal="false" :close-on-click-modal="false"
title="修改密码" title="修改密码"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="400px" width="400px">
> <el-form :inline="true" label-width="100px" size="small">
<el-form
:inline="true"
label-width="100px"
size="small"
>
<el-form-item label="原密码"> <el-form-item label="原密码">
<el-input <el-input
show-password show-password
v-model="oldPwd" v-model="oldPwd"
placeholder="原密码" placeholder="原密码"></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="新密码"> <el-form-item label="新密码">
<el-input <el-input
show-password show-password
v-model="newPwd" v-model="newPwd"
placeholder="新密码" placeholder="新密码"></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="确认新密码"> <el-form-item label="确认新密码">
<el-input <el-input
show-password show-password
v-model="confimPwd" v-model="confimPwd"
placeholder="确认新密码" placeholder="确认新密码"></el-input>
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer"> <div slot="footer">
<el-button <el-button size="small" @click="dialogVisible = false">取 消</el-button>
size="small" <el-button size="small" type="primary" @click="resetPasswordSumbit">
@click="dialogVisible = false"
>取 消</el-button
>
<el-button
size="small"
type="primary"
@click="resetPasswordSumbit"
>
确 定 确 定
</el-button> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog
title="运维工具"
:visible.sync="omVisible"
:close-on-click-modal="false"
width="800px">
<el-form :model="editForm">
<el-form-item>
<el-input
type="textarea"
:rows="10"
placeholder="请输入内容"
v-model="editForm.content"></el-input>
</el-form-item>
</el-form>
<span slot="footer">
<el-button @click="omVisible = false">取消</el-button>
<el-button @click="submitOm" type="primary">确认</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters, mapState } from 'vuex' import { mapGetters, mapState } from 'vuex'
import { logout, resetPassword } from '@/common/api/login' import { logout, resetPassword } from '@/common/api/login'
import { setToken, setUser } from '@/utils/auth' import { setToken, setUser } from '@/utils/auth'
import { post } from '@/common/api/axios'
export default { export default {
name: 'navMenu', name: 'navMenu',
data() { data() {
...@@ -138,7 +133,7 @@ export default { ...@@ -138,7 +133,7 @@ export default {
label: 'ERP管理', label: 'ERP管理',
icon: 'el-icon-menu', icon: 'el-icon-menu',
index: '/saas/manage', index: '/saas/manage',
children: [], children: []
}, },
{ {
id: 3, id: 3,
...@@ -146,7 +141,7 @@ export default { ...@@ -146,7 +141,7 @@ export default {
label: 'ERP菜单管理', label: 'ERP菜单管理',
icon: 'el-icon-menu', icon: 'el-icon-menu',
index: '/saas/menu', index: '/saas/menu',
children: [], children: []
}, },
{ {
id: 4, id: 4,
...@@ -154,7 +149,7 @@ export default { ...@@ -154,7 +149,7 @@ export default {
label: '工单管理', label: '工单管理',
icon: 'el-icon-s-order', icon: 'el-icon-s-order',
index: '/saas/taskManage', index: '/saas/taskManage',
children: [], children: []
}, },
{ {
id: 2, id: 2,
...@@ -169,7 +164,7 @@ export default { ...@@ -169,7 +164,7 @@ export default {
label: '用户管理', label: '用户管理',
icon: 'el-icon-s-order', icon: 'el-icon-s-order',
index: 'user', index: 'user',
children: [], children: []
}, },
{ {
id: 2, id: 2,
...@@ -177,7 +172,7 @@ export default { ...@@ -177,7 +172,7 @@ export default {
label: '角色管理', label: '角色管理',
icon: 'el-icon-s-order', icon: 'el-icon-s-order',
index: 'user', index: 'user',
children: [], children: []
}, },
{ {
id: 3, id: 3,
...@@ -185,7 +180,7 @@ export default { ...@@ -185,7 +180,7 @@ export default {
label: '定时任务', label: '定时任务',
icon: 'el-icon-message-solid', icon: 'el-icon-message-solid',
index: '/saas/timed_task', index: '/saas/timed_task',
children: [], children: []
}, },
{ {
id: 4, id: 4,
...@@ -193,9 +188,9 @@ export default { ...@@ -193,9 +188,9 @@ export default {
label: '公告管理', label: '公告管理',
icon: 'el-icon-s-promotion', icon: 'el-icon-s-promotion',
index: '/saas/announceManage', index: '/saas/announceManage',
children: [], children: []
}, }
], ]
}, },
{ {
id: 5, id: 5,
...@@ -210,7 +205,7 @@ export default { ...@@ -210,7 +205,7 @@ export default {
label: '汇率币种', label: '汇率币种',
icon: 'el-icon-bank-card', icon: 'el-icon-bank-card',
index: '/saas/currency', index: '/saas/currency',
children: [], children: []
}, },
{ {
id: 4, id: 4,
...@@ -218,7 +213,7 @@ export default { ...@@ -218,7 +213,7 @@ export default {
label: '国家代码', label: '国家代码',
icon: 'el-icon-s-flag', icon: 'el-icon-s-flag',
index: '/saas/countryCode', index: '/saas/countryCode',
children: [], children: []
}, },
{ {
id: 5, id: 5,
...@@ -226,7 +221,7 @@ export default { ...@@ -226,7 +221,7 @@ export default {
label: '州省简称', label: '州省简称',
icon: 'el-icon-s-help', icon: 'el-icon-s-help',
index: '/saas/abbreviation', index: '/saas/abbreviation',
children: [], children: []
}, },
{ {
id: 6, id: 6,
...@@ -234,7 +229,7 @@ export default { ...@@ -234,7 +229,7 @@ export default {
label: '客户管理', label: '客户管理',
icon: 'el-icon-s-custom', icon: 'el-icon-s-custom',
index: '/saas/management', index: '/saas/management',
children: [], children: []
}, },
{ {
id: 7, id: 7,
...@@ -242,7 +237,7 @@ export default { ...@@ -242,7 +237,7 @@ export default {
label: '运输商列表', label: '运输商列表',
icon: 'el-icon-s-operation', icon: 'el-icon-s-operation',
index: '/saas/logistics/transporters', index: '/saas/logistics/transporters',
children: [], children: []
}, },
{ {
id: 8, id: 8,
...@@ -250,36 +245,65 @@ export default { ...@@ -250,36 +245,65 @@ export default {
label: '类别风格', label: '类别风格',
icon: 'el-icon-box', icon: 'el-icon-box',
index: '/saas/category-style', index: '/saas/category-style',
children: [], children: []
}, },
{ {
id: 9, id: 9,
path: '', path: '',
label: '属性类管理', label: '属性类管理',
icon: 'el-icon-box', icon: 'el-icon-box',
index: '/saas/sku-sort', index: '/saas/sku-sort',
children: [], children: []
}, },
{ {
id: 10, id: 10,
path: '', path: '',
label: '商品属性管理', label: '商品管理',
icon: 'el-icon-box', icon: 'el-icon-box',
index: '/saas/sku-manage', index: '/saas/sku-manage',
children: [], children: []
}, }
], ]
}, },
{
id: 6,
path: '',
label: '运维',
icon: 'el-icon-s-operation',
index: '/operation',
children: [
{
id: 6_1,
path: '',
label: '丢单管理',
icon: 'el-icon-s-order',
index: '/operation/lossOrder',
children: []
},
{
id: 9,
path: '',
label: '运维工具',
icon: 'el-icon-bank-card',
index: '',
children: []
},
]
}
], ],
dialogVisible: false, dialogVisible: false,
oldPwd: '', oldPwd: '',
newPwd: '', newPwd: '',
confimPwd: '', confimPwd: '',
omVisible: false,
editForm: {
content: ''
}
} }
}, },
computed: { computed: {
...mapGetters('tags', ['currentTag']), ...mapGetters('tags', ['currentTag']),
...mapState(['userInfo']), ...mapState(['userInfo'])
}, },
watch: { watch: {
currentTag(v) { currentTag(v) {
...@@ -294,7 +318,7 @@ export default { ...@@ -294,7 +318,7 @@ export default {
if (parent) { if (parent) {
this.$refs.menu.open(parent.path) this.$refs.menu.open(parent.path)
} }
}, }
}, },
methods: { methods: {
updatePassword() { updatePassword() {
...@@ -320,7 +344,7 @@ export default { ...@@ -320,7 +344,7 @@ export default {
const res = await resetPassword({ const res = await resetPassword({
account: this.userInfo.account, account: this.userInfo.account,
oldPwd: this.oldPwd, oldPwd: this.oldPwd,
newPwd: this.newPwd, newPwd: this.newPwd
}) })
if (res.code === 200) { if (res.code === 200) {
this.dialogVisible = false this.dialogVisible = false
...@@ -345,8 +369,26 @@ export default { ...@@ -345,8 +369,26 @@ export default {
this.$store.commit('tags/removeAllTags') this.$store.commit('tags/removeAllTags')
this.$router.push('/login') this.$router.push('/login')
}, },
onClickMenus() {}, onClickMenus(index) {
}, if (!index) {
this.omVisible = true
}
},
async submitOm() {
if (!this.editForm.content) {
return this.$message.warning('请输入内容')
}
try {
const res = await post('sys/announcement/get/tool', {
...this.editForm
})
if (res.code !== 200) return
this.$message.success(res.message)
} catch (e) {
console.error(e)
}
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
<template>
<div class="saas-manage card">
<div class="search">
<el-form
:model="searchForm"
size="small"
:inline="true"
>
<el-form-item label="所属平台">
<el-select
style="width: 120px"
filterable
clearable
v-model="searchForm.salesPlatform"
placeholder="请选择所属平台"
>
<el-option
v-for="(value,
index) in plateformList"
:key="index"
:value="value"
:label="index"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="三方平台订单ID">
<el-input
style="width: 160px"
clearable
v-model="searchForm.orderThirdId"
placeholder="请输入三方平台订单ID"
></el-input>
</el-form-item>
<el-form-item label="店铺单号">
<el-input
style="width: 140px"
clearable
v-model="searchForm.shopNumber"
placeholder="请输入店铺单号"
></el-input>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker
style="width: 360px"
v-model="searchForm.createTimeText"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type="primary"
size="small"
icon="el-icon-search"
@click="search"
>查询</el-button
>
</el-form-item>
<el-form-item>
<el-button
type="danger"
size="small"
icon="el-icon-delete"
@click="deleteData()"
>删除</el-button
>
</el-form-item>
</el-form>
</div>
<div class="table-wrap" v-loading="loading">
<el-table
ref="table"
:data="manageData"
border
width="100%"
height="100%"
:highlight-current-row="true"
@selection-change="handleSelectionChange"
@row-click="rowClick"
header-row-class-name="header-row-class-name"
>
<el-table-column type="expand">
<template slot-scope="props">
<el-form label-position="right" inline class="demo-table-expand" style="display: none;">
<el-form-item label="所属平台">
<span>{{ props.row.salesPlatform }}</span>
</el-form-item>
<el-form-item label="三方平台订单ID">
<span>{{ props.row.orderThirdId }}</span>
</el-form-item>
<el-form-item label="店铺单号">
<span>{{ props.row.shopNumber }}</span>
</el-form-item>
</el-form>
<el-form label-position="right" label-width="100px" size="medium" class="demo-table-expand">
<el-form-item label="失败原因:">
<span style="background-color: #f8f8f9;display: block;padding: 0 13px 0 13px;">{{ props.row.failReason }}</span>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column
type="selection"
width="55"
header-align="center"
align="center"
>
</el-table-column>
<el-table-column
label="序号"
type="index"
width="50"
align="center"
header-align="center"
>
</el-table-column>
<el-table-column
label="所属平台"
prop="salesPlatform"
header-align="center"
align="center"
width="180"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="三方平台订单ID"
prop="orderThirdId"
width="200"
header-align="center"
>
</el-table-column>
<el-table-column
label="店铺单号"
prop="shopNumber"
header-align="center"
align="center"
width="200"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="失败原因"
prop="failReason"
header-align="center"
align="center"
min-width="160"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="创建时间"
prop="createTime"
header-align="center"
align="center"
width="160"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="操作"
header-align="center"
align="center"
width="55"
fixed="right"
>
<template slot-scope="scope">
<i
style="cursor: pointer;color:#F56C6C"
class="el-icon-delete"
@click="deleteData(scope.row)"
></i>
</template>
</el-table-column>
</el-table>
</div>
<div class="pagination">
<el-pagination
layout="sizes, total, prev, pager, next, jumper"
background
:total="total"
:page-size="pageSize"
:current-page="currentPage"
@size-change="sizeChange"
@current-change="onCurrentChange"
>
</el-pagination>
</div>
</div>
</template>
<script>
import {
listTableData,
deleteData, // eslint-disable-line no-unused-vars
listShopPlateformData,
} from '@/common/api/operation/lossOrder'
export default {
name: 'lossOrderManage',
data() {
return {
manageData: [],
searchForm: {},
total: 0,
pageSize: 50,
currentPage: 1,
loading: false,
selection: [],
plateformList: [],
}
},
async created() {
this.getList()
this.getShopPlateform()
},
methods: {
async getList() {
this.loading = true
try {
const res = await listTableData(
{
...this.searchForm,
createTimeStart: this.searchForm.createTimeText && this.searchForm.createTimeText[0],
createTimeEnd: this.searchForm.createTimeText && this.searchForm.createTimeText[1],
currentPage: this.currentPage,
pageSize: this.pageSize,
},
)
this.manageData = res.data.records
this.total = res.data.total
} catch (e) {
console.error(e)
} finally {
this.loading = false
}
},
async getShopPlateform() {
const res = await listShopPlateformData()
this.plateformList = res.data
},
search() {
this.getList()
},
async deleteData(row) {
let ids = []
let arr = [] // eslint-disable-line no-unused-vars
if (row) {
arr.push(row)
} else {
arr = this.selection
}
console.log(this.selection)
if (arr.length === 0) {
this.$message.error('请至少选择一条记录')
return
}
try {
await this.$confirm('确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
} catch {
return
}
ids = this.selection.map((item) => item.id)
ids = ids.join()
const l = this.$loading({
background: 'rgba(0, 0, 0, 0.3)',
})
try {
await deleteData(ids)
this.selection = []
this.getList()
} catch (e) {
console.error(e)
} finally {
l.close()
}
},
handleSelectionChange(selection) {
this.selection = selection
},
onCurrentChange(currentPage) {
this.currentPage = currentPage
this.getList()
},
sizeChange(pageSize) {
this.pageSize = pageSize
this.getList()
},
rowClick(row) {
if (
this.selection.length === 1 &&
this.selection[0] === row
) {
this.selection = []
this.$refs.table.clearSelection()
} else {
this.selection = [row]
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(row, true)
}
},
},
}
</script>
<style lang="scss" scoped>
.saas-manage {
height: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
&::v-deep {
.el-table .el-table__cell {
padding: 6px 0;
}
.el-input__inner {
padding: 0 4px;
}
.el-input--small .el-input__inner {
height: 30px;
line-height: 30px;
}
.el-icon-time:before {
content: '';
}
.el-dialog__footer {
text-align: center;
.el-button--small {
padding: 9px 50px;
}
}
.el-dialog__body {
padding: 10px 20px;
}
.el-icon-edit:before {
color: #ff9800;
font-weight: bold;
}
.el-range-editor--small .el-range-separator {
line-height: 31px;
}
.header-row-class-name th {
background-color: #f8f8f9;
}
.el-input-group__append {
padding-left: 0;
}
}
}
.search {
background: #fff;
}
.table-wrap {
background: #fff;
flex: 1;
overflow: hidden;
}
.demo-table-expand {
font-size: 0;
//padding: 0 20px 0 20px;
}
.el-form-item__label{
width: 90px!important;
color: #99a9bf!important;
}
</style>
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