This commit is contained in:
qijq 2025-04-24 15:48:05 +08:00
parent d24473d108
commit 5b563867fe
26 changed files with 18146 additions and 1729 deletions

View File

@ -122,6 +122,7 @@ if (localStorage.getItem("ukey")) {
window.initIm = function () {
//$.send(sprintf("%s/account.php?ctl=%s&met=%s&typ=json", SYS.CONFIG.base_url, 'Index', 'getConfig'), {uid:vid}, function (res)
$.send(SYS.CONFIG.im_config, {uid: vid}, function (res) {
if (res.status == 200 && res.data.im_chat) {
var userInfo = res.data.user_info;

View File

@ -0,0 +1,95 @@
import request from '@/utils/request'
import { URL } from '@/config'
/**
* @name 商家申请入驻信息分页列表
* @api api_url + '/admin/shop/merch/list'
* @param { id }
* @returns
*/
export function getPrinterList(params) {
return request({
url: URL.shop.merch.merchList,
method: 'post',
headers: {
'Content-Type': 'application/json',
},
data:params,
})
}
/**
* @name 商家申请入驻信息详情
* @api api_url + '/admin/shop/merch/detail'
* @param { id }
* @returns
*/
export function getMerchDetail(params) {
return request({
url: URL.shop.merch.merchDetail,
method: 'post',
headers: {
'Content-Type': 'application/json',
},
data:params,
})
}
/**
* @name 审批商家申请入驻
* @api api_url + '/admin/shop/merch/approval'
* @param { id , approvalStatus , approvalRemark}
* @returns
*/
export function getMerchApproval(params) {
return request({
url: URL.shop.merch.merchApproval,
method: 'post',
headers: {
'Content-Type': 'application/json',
},
data:params,
})
}
/**
* @name 发起合同签署
* @api api_url + '/admin/shop/esign/sign-flow/create-by-file'
* @param { id , approvalStatus , approvalRemark}
* @returns
*/
export function getCreateByFile(params) {
return request({
url: URL.shop.merch.createByFile,
method: 'post',
headers: {
'Content-Type': 'application/json',
},
data:params,
})
}
/**
* @name 查看商家签署合同
* @api api_url + '/admin/shop/esign/signed/contract/file'
* @param { mchMobile }
* @returns
*/
export function getCheckContractFile(params) {
return request({
url: URL.shop.merch.checkContractFile,
method: 'post',
headers: {
'Content-Type': 'application/json',
},
data:params,
})
}

View File

@ -415,6 +415,18 @@ let url = {
},
// 商店
shop: {
merch:{
// 商家申请入驻信息分页列表
merchList:api_url + '/admin/shop/merch/list',
// 商家申请入驻信息详情
merchDetail: api_url + '/admin/shop/merch/detail',
// 审批商家申请入驻
merchApproval : api_url + '/admin/shop/merch/approval',
// 发起合同签署
createByFile : api_url + '/admin/shop/esign/sign-flow/create-by-file',
//查看商家签署合同
checkContractFile : api_url + '/admin/shop/esign/signed/contract/file'
},
activity: {
lottery: {
history: {

View File

@ -3,9 +3,9 @@
*/
module.exports = {
// 布局种类横向布局horizontal、纵向布局vertical、分栏布局column、综合布局comprehensive、常规布局common、浮动布局float
layout: 'comprehensive',
layout: 'vertical',
// 主题名称默认blue-black、blue-white、green-black、green-white、渐变ocean、red-white、red-black
themeName: 'blue-white',
themeName: 'blue-black',
// 菜单背景 none、vab-background
background: 'none',
// 分栏风格(仅针对分栏布局column时生效)横向风格horizontal、纵向风格vertical、卡片风格card、箭头风格arrow
@ -17,7 +17,7 @@ module.exports = {
// 是否开启标签页
showTabs: true,
// 显示标签页时标签页样式卡片风格card、灵动风格smart、圆滑风格smooth
tabsBarStyle: 'smart',
tabsBarStyle: 'smooth',
// 是否标签页图标
showTabsIcon: true,
// 是否开启语言选择组件
@ -27,7 +27,7 @@ module.exports = {
// 是否开启搜索组件
showSearch: false,
// 是否开启主题组件
showTheme: false,
showTheme: true,
// 是否开启通知组件
showNotice: false,
// 是否开启全屏组件

View File

@ -145,9 +145,9 @@ const actions = {
const { data } = await getUserInfo()
// 根据角色设置主题
if (data.user_is_admin) {
store.state.settings.theme.themeName = 'blue-white'
store.state.settings.theme.themeName = 'blue-black'
} else {
store.state.settings.theme.themeName = 'white'
store.state.settings.theme.themeName = 'blue-black' //white
}
store.state.settings.theme.showLanguage = true

View File

@ -14,6 +14,26 @@ import icon from "../views/403.vue"
export function convertRouter(asyncRoutes) {
return asyncRoutes.map((route) => {
if(route.meta.title == '店铺' && route.name == 'Vab330'){
const obj = {
path:"/shopAudit",
"component":"@/views/store/shopAudit/shopAudit",
name: "Vab83000",
redirect: null,
meta: {
title: "商家入驻审批",
icon: "",
noClosable: 0,
hidden: null
},
menuHidden: false
}
route.children.splice(0,0,obj)
}
if(route.meta.title == '设置'){
const obj = {
@ -226,8 +246,26 @@ export function convertRouter(asyncRoutes) {
]
}
route.children.push(...[cloudPrintRoute,distributionSetup]);
route.children = route.children.filter(item=>item.name != 'Vab8083')
}
if(route.meta.title == '设置' && route.name == 'Settings'){
const obj = {
path: "/appVersion",
"component":"@/views/settings/config/appVersion",
name: "Vab9019",
redirect: null,
meta: {
title: "商家APP设置",
icon: "",
noClosable: 0,
hidden: null
},
menuHidden: false
}
route.children.splice(0,0,obj)
}
if (route.component) {

View File

@ -10,54 +10,54 @@
</template>
<script>
import { mapGetters } from 'vuex'
import { translateTitle } from '@/utils/i18n'
import { handleMatched } from '@/utils/routes'
import { mapGetters } from 'vuex'
import { translateTitle } from '@/utils/i18n'
import { handleMatched } from '@/utils/routes'
export default {
name: 'VabBreadcrumb',
computed: {
...mapGetters({
routes: 'routes/routes',
}),
breadcrumbList() {
return handleMatched(this.routes, this.$route.name).filter(
(item) => item.meta.breadcrumbHidden !== true
)
},
export default {
name: 'VabBreadcrumb',
computed: {
...mapGetters({
routes: 'routes/routes',
}),
breadcrumbList() {
return handleMatched(this.routes, this.$route.name).filter(
(item) => item.meta.breadcrumbHidden !== true
)
},
methods: {
translateTitle,
},
}
},
methods: {
translateTitle,
},
}
</script>
<style lang="scss" scoped>
.vab-breadcrumb {
height: $base-nav-height;
font-size: $base-font-size-default;
line-height: $base-nav-height;
.vab-breadcrumb {
height: $base-nav-height;
font-size: $base-font-size-default;
line-height: $base-nav-height;
::v-deep {
.el-breadcrumb__item {
::v-deep {
.el-breadcrumb__item {
.el-breadcrumb__inner {
font-weight: normal;
color: #515a6e;
}
.is-link {
font-weight: normal;
color: #fff; //#515a6e
}
&:last-child {
.el-breadcrumb__inner {
font-weight: normal;
color: #515a6e;
}
.is-link {
font-weight: normal;
color: #515a6e;
}
&:last-child {
.el-breadcrumb__inner {
a {
color: #999;
}
a {
color: #999;
}
}
}
}
}
}
</style>

View File

@ -25,6 +25,11 @@
</template>
</el-tabs>
<vab-breadcrumb v-else class="hidden-xs-only" />
<div class="internet-content-provider">
<a href="https://beian.miit.gov.cn/" target="_blank">
桂ICP备2024040484号-1
</a>
</div>
</div>
</el-col>
<el-col :lg="6" :md="6" :sm="12" :xl="6" :xs="20">
@ -115,6 +120,7 @@
box-shadow: $base-box-shadow;
.left-panel {
position: relative;
display: flex;
align-items: center;
justify-items: center;
@ -191,5 +197,13 @@
}
}
}
.internet-content-provider{
position: absolute;
text-align: center;
width: 100%;
left: 20%;
color: #fff;
}
}
</style>

View File

@ -30,180 +30,185 @@
/>
</template>
</el-menu>
<!-- <div class="internet-content-provider">
<a href="https://beian.miit.gov.cn/" target="_blank">
桂ICP备2024040484号-1
</a>
</div> -->
</el-scrollbar>
</template>
<script>
import variables from '@/vab/styles/variables/variables.scss'
import { mapGetters } from 'vuex'
import { defaultOpeneds, uniqueOpened } from '@/config'
import { handleActivePath, handleMatched } from '@/utils/routes'
import variables from '@/vab/styles/variables/variables.scss'
import { mapGetters } from 'vuex'
import { defaultOpeneds, uniqueOpened } from '@/config'
import { handleActivePath, handleMatched } from '@/utils/routes'
export default {
name: 'VabSideBar',
props: {
layout: {
type: String,
default: 'vertical',
export default {
name: 'VabSideBar',
props: {
layout: {
type: String,
default: 'vertical',
},
},
data() {
return {
activeMenu: '',
defaultOpeneds,
uniqueOpened,
variables,
}
},
computed: {
...mapGetters({
extra: 'settings/extra',
routes: 'routes/routes',
collapse: 'settings/collapse',
activeName: 'routes/activeName',
}),
handleRoutes() {
return this.layout === 'comprehensive'
? this.handlePartialRoutes
: this.routes.flatMap((route) =>
route.meta && route.meta.levelHidden === true && route.children
? route.children
: route
)
},
handlePartialRoutes() {
const activeMenu = this.routes.find(
(route) => route.name === this.extra.first
)
return activeMenu ? activeMenu.children : []
},
},
watch: {
$route: {
handler(route) {
this.activeMenu = handleActivePath(route)
},
immediate: true,
},
activeName: {
handler(val) {
const matched = handleMatched(this.routes, val)
this.extra.first = matched[0].name
this.activeMenu = matched[matched.length - 1].path
},
},
data() {
return {
activeMenu: '',
defaultOpeneds,
uniqueOpened,
variables,
}
},
computed: {
...mapGetters({
extra: 'settings/extra',
routes: 'routes/routes',
collapse: 'settings/collapse',
activeName: 'routes/activeName',
}),
handleRoutes() {
return this.layout === 'comprehensive'
? this.handlePartialRoutes
: this.routes.flatMap((route) =>
route.meta && route.meta.levelHidden === true && route.children
? route.children
: route
)
},
handlePartialRoutes() {
const activeMenu = this.routes.find(
(route) => route.name === this.extra.first
)
return activeMenu ? activeMenu.children : []
},
},
watch: {
$route: {
handler(route) {
this.activeMenu = handleActivePath(route)
},
immediate: true,
},
activeName: {
handler(val) {
const matched = handleMatched(this.routes, val)
this.extra.first = matched[0].name
this.activeMenu = matched[matched.length - 1].path
},
},
},
}
},
}
</script>
<style lang="scss" scoped>
@mixin active {
&:hover {
color: $base-color-white;
background-color: $base-menu-background-active !important;
}
&.is-active {
color: $base-color-white;
background-color: $base-menu-background-active !important;
}
@mixin active {
&:hover {
color: $base-color-white;
background-color: $base-menu-background-active !important;
}
.vab-side-bar {
position: fixed;
top: 0;
bottom: 0;
left: 0;
z-index: $base-z-index + 1;
width: $base-left-menu-width;
height: 100vh;
overflow: hidden;
background: $base-menu-background;
box-shadow: $base-box-shadow;
transition: $base-transition;
&.is-active {
color: $base-color-white;
background-color: $base-menu-background-active !important;
}
}
&.side-bar-common {
top: $base-top-bar-height;
height: calc(100vh - #{$base-top-bar-height});
}
.vab-side-bar {
position: fixed;
top: 0;
bottom: 0;
left: 0;
z-index: $base-z-index + 1;
width: $base-left-menu-width;
height: 100vh;
overflow: hidden;
background: $base-menu-background;
box-shadow: $base-box-shadow;
transition: $base-transition;
&.is-collapse {
width: $base-left-menu-width-min;
border-right: 0;
&.side-bar-common {
top: $base-top-bar-height;
height: calc(100vh - #{$base-top-bar-height});
}
::v-deep {
.el-menu--collapse.el-menu {
> .el-menu-item,
> .el-submenu {
text-align: center;
.el-tag {
display: none;
}
}
}
.el-menu-item,
.el-submenu {
text-align: left;
}
.el-menu--collapse {
border-right: 0;
.el-submenu__icon-arrow {
right: 10px;
margin-top: -3px;
}
}
}
}
&.is-collapse {
width: $base-left-menu-width-min;
border-right: 0;
::v-deep {
.el-scrollbar__wrap {
overflow-x: hidden;
}
.el-menu--collapse.el-menu {
> .el-menu-item,
> .el-submenu {
text-align: center;
.el-menu {
border: 0;
.el-tag {
display: none;
}
}
}
.el-menu-item,
.el-submenu__title {
height: $base-menu-item-height;
overflow: hidden;
line-height: $base-menu-item-height;
//text-overflow: ellipsis;
white-space: nowrap;
vertical-align: middle;
color: $base-menu-color;
i {
color: inherit;
margin-right: 0px;
vertical-align: -1px;
}
span {
color: inherit;
padding-left: 6px;
}
i.el-submenu__icon-arrow {
opacity: 0.8;
right: 22px;
margin-top: -6px;
}
.el-submenu {
text-align: left;
}
.el-menu-item:hover {
color: $base-color-white;
background-color: $base-menu-background-active !important;
}
.el-menu--collapse {
border-right: 0;
.el-menu-item {
@include active;
.el-submenu__icon-arrow {
right: 10px;
margin-top: -3px;
}
}
}
}
::v-deep {
.el-scrollbar__wrap {
overflow-x: hidden;
}
.el-menu {
border: 0;
}
.el-menu-item,
.el-submenu__title {
height: $base-menu-item-height;
overflow: hidden;
line-height: $base-menu-item-height;
//text-overflow: ellipsis;
white-space: nowrap;
vertical-align: middle;
color: $base-menu-color;
i {
color: inherit;
margin-right: 0px;
vertical-align: -1px;
}
span {
color: inherit;
padding-left: 6px;
}
i.el-submenu__icon-arrow {
opacity: 0.8;
right: 22px;
margin-top: -6px;
}
}
.el-menu-item:hover {
color: $base-color-white;
background-color: $base-menu-background-active !important;
}
.el-menu-item {
@include active;
}
}
}
</style>

View File

@ -35,14 +35,16 @@ $base-column-second-menu-background-active: rgba(#1890ff, 0.1);
$base-menu-background: #282c34;
//菜单文字颜色
//$base-menu-color: hsla(0, 0%, 100%, 0.95);
$base-menu-color: hsla(0,0%,100%,.7);
// $base-menu-color: hsla(0,0%,100%,.7);
$base-menu-color:#fff;
//菜单选中文字颜色
$base-menu-color-active: hsla(0, 0%, 100%, 0.95);
// $base-menu-color-active: hsla(0, 0%, 100%, 0.95);
$base-menu-color-active:#fff;
//菜单选中背景色
$base-menu-background-active: $base-color-blue;
//标题颜色
$base-title-color: #fff;
$base-title-color: hsl(0, 1%, 65%);
// $base-title-color: hsl(0, 1%, 65%);
//字体大小配置
$base-font-size-small: 12px;
$base-font-size-default: 14px;
@ -80,7 +82,7 @@ $base-keep-alive-height: calc(
100vh - #{$base-nav-height} - #{$base-tabs-height} - #{$base-padding} * 2 - 55px
);
//纵向左侧导航未折叠的宽度
$base-left-menu-width: 170px;
$base-left-menu-width: 240px; // 170px
//纵向左侧导航未折叠右侧内容的宽度
$base-right-content-width: calc(100% - #{$base-left-menu-width});
//纵向左侧导航已折叠的宽度

View File

@ -30,6 +30,14 @@
:style="{ width: '100%' }"
/>
</el-form-item>
<el-form-item label="分账比例" prop="store_category_name">
<el-input
v-model="form.split_ratio"
clearable
placeholder="请输入分账比例"
:style="{ width: '100%' }"
/>
</el-form-item>
<el-form-item :label="__('分类图片')" prop="category_image" required>
<upload
height="100px"
@ -76,106 +84,107 @@
</template>
<script>
import { translateTitle as __ } from '@/utils/i18n'
import { doEdit } from '@/api/base/store/category'
import Upload from '@/components/upload'
import { translateTitle as __ } from '@/utils/i18n'
import { doEdit } from '@/api/base/store/category'
import Upload from '@/components/upload'
export default {
name: 'BaseStoreCategoryEdit',
components: { Upload },
data() {
return {
form: {
category_image: '',
category_is_enable: true,
},
rules: {
store_category_parent_id: [
{
required: true,
message: this.__('请输入分类父名称'),
trigger: 'blur',
},
],
store_category_name: [
{
required: true,
message: this.__('请输入店铺名称'),
trigger: 'blur',
},
],
store_category_deposit: [
{
required: true,
message: this.__('请输入保证金数额'),
trigger: 'blur',
},
],
category_image: [
{
required: true,
message: this.__('请选择上传图片'),
trigger: 'blur',
},
],
store_category_order: [
{
required: true,
message: this.__('请输入排序'),
trigger: 'blur',
},
],
},
title: '',
dialogFormVisible: false,
}
},
created() {},
methods: {
__,
showEdit(row, store_category_parent_id) {
if (store_category_parent_id === 0 || store_category_parent_id) {
this.title = this.__('添加')
this.form.store_category_parent_id = store_category_parent_id
} else {
this.title = this.__('编辑')
const obj = Object.assign({}, row)
this.form = {
store_category_id: obj.store_category_id,
store_category_parent_id: obj.store_category_parent_id,
category_is_enable: obj.category_is_enable,
store_category_order: obj.store_category_order,
store_category_deposit: obj.store_category_deposit,
store_category_name: obj.store_category_name,
category_image: obj.category_image,
}
}
this.dialogFormVisible = true
export default {
name: 'BaseStoreCategoryEdit',
components: { Upload },
data() {
return {
form: {
category_image: '',
category_is_enable: true,
},
close() {
rules: {
store_category_parent_id: [
{
required: true,
message: this.__('请输入分类父名称'),
trigger: 'blur',
},
],
store_category_name: [
{
required: true,
message: this.__('请输入店铺名称'),
trigger: 'blur',
},
],
store_category_deposit: [
{
required: true,
message: this.__('请输入保证金数额'),
trigger: 'blur',
},
],
category_image: [
{
required: true,
message: this.__('请选择上传图片'),
trigger: 'blur',
},
],
store_category_order: [
{
required: true,
message: this.__('请输入排序'),
trigger: 'blur',
},
],
},
title: '',
dialogFormVisible: false,
}
},
created() {},
methods: {
__,
showEdit(row, store_category_parent_id) {
if (store_category_parent_id === 0 || store_category_parent_id) {
this.title = this.__('添加')
this.form.store_category_parent_id = store_category_parent_id
} else {
this.title = this.__('编辑')
const obj = Object.assign({}, row)
this.form = {
category_image: '',
category_is_enable: true,
store_category_id: obj.store_category_id,
store_category_parent_id: obj.store_category_parent_id,
category_is_enable: obj.category_is_enable,
store_category_order: obj.store_category_order,
store_category_deposit: obj.store_category_deposit,
store_category_name: obj.store_category_name,
category_image: obj.category_image,
split_ratio: obj.split_ratio,
}
this.$refs['form'].resetFields()
this.dialogFormVisible = false
},
save() {
this.$refs['form'].validate(async (valid) => {
if (valid) {
const { msg, status } = await doEdit(this.form)
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.$baseMessage(msg, 'error')
}
this.$emit('fetch-data')
this.close()
} else {
return false
}
})
},
}
this.dialogFormVisible = true
},
}
close() {
this.form = {
category_image: '',
category_is_enable: true,
}
this.$refs['form'].resetFields()
this.dialogFormVisible = false
},
save() {
this.$refs['form'].validate(async (valid) => {
if (valid) {
const { msg, status } = await doEdit(this.form)
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.$baseMessage(msg, 'error')
}
this.$emit('fetch-data')
this.close()
} else {
return false
}
})
},
},
}
</script>

View File

@ -77,6 +77,12 @@
prop="store_category_name"
show-overflow-tooltip
/>
<el-table-column
align="center"
label="分账比例"
prop="split_ratio"
show-overflow-tooltip
/>
<el-table-column
align="center"
:label="__('保证金数额')"
@ -120,8 +126,16 @@
show-overflow-tooltip
>
<template #default="{ row }">
<el-tag :type='({"0":"info","1":"success","2":"info"})[row.category_is_enable]'>
{{ ({"0":"禁用","1":"启用","2":"启用"})[row.category_is_enable] }}
<el-tag
:type="
{ '0': 'info', '1': 'success', '2': 'info' }[
row.category_is_enable
]
"
>
{{
{ '0': '禁用', '1': '启用', '2': '启用' }[row.category_is_enable]
}}
</el-tag>
</template>
</el-table-column>
@ -131,71 +145,71 @@
</template>
<script>
import { translateTitle as __ } from '@/utils/i18n'
import { doDelete, getTree } from '@/api/base/store/category'
import Edit from './components/BaseStoreCategoryEdit'
import { translateTitle as __ } from '@/utils/i18n'
import { doDelete, getTree } from '@/api/base/store/category'
import Edit from './components/BaseStoreCategoryEdit'
export default {
name: 'BaseStoreCategory',
components: { Edit },
data() {
return {
list: [],
listLoading: true,
layout: 'total, sizes, prev, pager, next, jumper',
export default {
name: 'BaseStoreCategory',
components: { Edit },
data() {
return {
list: [],
listLoading: true,
layout: 'total, sizes, prev, pager, next, jumper',
}
},
created() {
this.fetchData()
},
methods: {
formatEnable(row) {
return row.category_is_enable ? this.__('显示') : this.__('不显示')
},
__,
handleEdit(row, category_parent_id) {
if (category_parent_id === 0 || category_parent_id) {
this.$refs['edit'].showEdit(null, category_parent_id)
} else {
this.$refs['edit'].showEdit(row)
}
},
created() {
handleDelete(row) {
this.$baseConfirm(this.__('你确定要删除当前项吗'), null, async () => {
const { msg, status } = await doDelete({
store_category_id: row.store_category_id,
})
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.$baseMessage(msg, 'error')
}
await this.fetchData()
})
},
queryData() {
this.fetchData()
},
methods: {
formatEnable(row) {
return row.category_is_enable ? this.__('显示') : this.__('不显示')
},
__,
handleEdit(row, category_parent_id) {
if (category_parent_id === 0 || category_parent_id) {
this.$refs['edit'].showEdit(null, category_parent_id)
} else {
this.$refs['edit'].showEdit(row)
}
},
handleDelete(row) {
this.$baseConfirm(this.__('你确定要删除当前项吗'), null, async () => {
const { msg, status } = await doDelete({
store_category_id: row.store_category_id,
})
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.$baseMessage(msg, 'error')
}
await this.fetchData()
})
},
queryData() {
this.fetchData()
},
async fetchData() {
this.listLoading = true
const { data } = await getTree()
this.list = data
this.listLoading = false
},
toggleRowExpansion(isExpansion) {
this.listLoading = true
this.toggleRowExpansion_forAll(this.list, isExpansion)
this.listLoading = false
},
toggleRowExpansion_forAll(data, isExpansion) {
data.forEach((item) => {
this.$refs.dataTreeList.toggleRowExpansion(item, isExpansion)
if (item.children !== undefined && item.children != null) {
this.toggleRowExpansion_forAll(item.children, isExpansion)
}
})
},
async fetchData() {
this.listLoading = true
const { data } = await getTree()
this.list = data
this.listLoading = false
},
}
toggleRowExpansion(isExpansion) {
this.listLoading = true
this.toggleRowExpansion_forAll(this.list, isExpansion)
this.listLoading = false
},
toggleRowExpansion_forAll(data, isExpansion) {
data.forEach((item) => {
this.$refs.dataTreeList.toggleRowExpansion(item, isExpansion)
if (item.children !== undefined && item.children != null) {
this.toggleRowExpansion_forAll(item.children, isExpansion)
}
})
},
},
}
</script>

View File

@ -8,7 +8,6 @@
@close="close"
>
<el-scrollbar style="height: 600px">
<template>
<baidu-map
:center="{ lng: center_lng, lat: center_lat }"
@ -262,10 +261,10 @@
:image="form.chain_img"
width="170px"
@upImage="
(image) => {
form.chain_img = image
}
"
(image) => {
form.chain_img = image
}
"
/>
</el-form-item>
<div class="sel_time">
@ -273,10 +272,10 @@
<el-time-select
v-model="form.chain_opening_hours"
:picker-options="{
start: '00:00',
step: '00:05',
end: '24:55',
}"
start: '00:00',
step: '00:05',
end: '23:55',
}"
:placeholder="__('选择时间')"
style="width: 200px"
/>
@ -285,10 +284,10 @@
<el-time-select
v-model="form.chain_close_hours"
:picker-options="{
start: '00:00',
step: '00:05',
end: '24:55',
}"
start: '00:00',
step: '00:05',
end: '23:55',
}"
:placeholder="__('选择时间')"
style="width: 200px"
/>
@ -306,288 +305,288 @@
</template>
<script>
import { translateTitle as __ } from '@/utils/i18n'
import Area from '@/components/VabArea/area'
import keyword from '@/components/baiduMap/keyword'
import Upload from '@/components/upload'
import { doEdit } from '@/api/chain/base'
import { isPassword, isPhone } from 'vue-plugin-utils'
import { getCategoryTree } from '@/api/chain/category/base'
import { getList as getChainProjectList } from '@/api/chain/project/base'
import { translateTitle as __ } from '@/utils/i18n'
import Area from '@/components/VabArea/area'
import keyword from '@/components/baiduMap/keyword'
import Upload from '@/components/upload'
import { doEdit } from '@/api/chain/base'
import { isPassword, isPhone } from 'vue-plugin-utils'
import { getCategoryTree } from '@/api/chain/category/base'
import { getList as getChainProjectList } from '@/api/chain/project/base'
export default {
name: 'ChainBaseEdit',
components: { Upload, keyword, Area },
data() {
const validatePhone = (rule, value, callback) => {
if (!this.form.chain_mobile || !isPhone(this.form.chain_mobile)) {
callback(new Error('请输入正确的手机号'))
export default {
name: 'ChainBaseEdit',
components: { Upload, keyword, Area },
data() {
const validatePhone = (rule, value, callback) => {
if (!this.form.chain_mobile || !isPhone(this.form.chain_mobile)) {
callback(new Error('请输入正确的手机号'))
} else {
callback()
}
}
const validatePassword = (rule, value, callback) => {
if (this.isAdd) {
if (!value) {
callback(new Error(this.__('请输入门店管理员密码')))
} else if (!isPassword(value)) {
callback(new Error(this.__('密码不能少于6位')))
} else {
callback()
}
} else {
callback()
}
const validatePassword = (rule, value, callback) => {
if (this.isAdd) {
if (!value) {
callback(new Error(this.__('请输入门店管理员密码')))
} else if (!isPassword(value)) {
callback(new Error(this.__('密码不能少于6位')))
} else {
callback()
}
} else {
callback()
}
}
return {
form: {
chain_img: '',
chain_district_id: '',
chain_district_info: '',
chain_opening_hours: '',
chain_close_hours: '',
chain_lat: undefined,
chain_lng: undefined,
}
return {
form: {
chain_img: '',
chain_district_id: '',
chain_district_info: '',
chain_opening_hours: '',
chain_close_hours: '',
chain_lat: undefined,
chain_lng: undefined,
},
categoryTree: [],
categoryProps: {
value: 'chain_category_id',
label: 'chain_category_name',
children: 'children',
multiple: false,
checkStrictly: true,
},
jobStateList: [
{
value: 201,
label: '洗车适中',
},
categoryTree: [],
categoryProps: {
value: 'chain_category_id',
label: 'chain_category_name',
children: 'children',
multiple: false,
checkStrictly: true,
{
value: 202,
label: '美容适中',
},
jobStateList: [
{
value: 203,
label: '保养适中',
},
{
value: 204,
label: '钣喷适中',
},
],
chainProjectList: [],
map_show: false,
center_lng: 116.404,
center_lat: 39.915,
rules: {},
isAdd: true,
saveLoading: false,
title: '',
formData: {
pageNum: 1,
pageSize: 9999,
},
dialogFormVisible: false,
queryArea: {
province: { code: '', name: '' },
city: { code: '', name: '' },
district: { code: '', name: '' },
},
chainRules: {
user_account: [{ required: true, message: '门店管理员账号' }],
chain_name: [{ required: true, message: '门店名称' }],
chain_mobile: [
{
value: 201,
label: '洗车适中',
},
{
value: 202,
label: '美容适中',
},
{
value: 203,
label: '保养适中',
},
{
value: 204,
label: '钣喷适中',
trigger: 'blur',
message: '手机号码',
},
{ validator: validatePhone, trigger: 'blur' },
],
chainProjectList: [],
map_show: false,
center_lng: 116.404,
center_lat: 39.915,
rules: {},
isAdd: true,
saveLoading: false,
title: '',
formData: {
pageNum: 1,
pageSize: 9999,
},
dialogFormVisible: false,
queryArea: {
province: { code: '', name: '' },
city: { code: '', name: '' },
district: { code: '', name: '' },
},
chainRules: {
user_account: [{ required: true, message: '门店管理员账号' }],
chain_name: [{ required: true, message: '门店名称' }],
chain_mobile: [
{
trigger: 'blur',
message: '手机号码',
},
{ validator: validatePhone, trigger: 'blur' },
],
user_password: [
{
trigger: 'blur',
message: '密码',
},
{ validator: validatePassword, trigger: 'blur' },
],
chain_contacter: [{ required: true, message: '联系人' }],
// chain_category_id: [
// { required: true, message: '' },
// ],
chain_lng: [{ required: true, message: '经度' }],
chain_lat: [{ required: true, message: '纬度' }],
chain_opening_hours: [{ required: true, message: '营业时间' }],
chain_close_hours: [{ required: true, message: '关闭时间' }],
chain_img: [{ required: true, message: '门店图片' }],
},
user_password: [
{
trigger: 'blur',
message: '密码',
},
{ validator: validatePassword, trigger: 'blur' },
],
chain_contacter: [{ required: true, message: '联系人' }],
// chain_category_id: [
// { required: true, message: '' },
// ],
chain_lng: [{ required: true, message: '经度' }],
chain_lat: [{ required: true, message: '纬度' }],
chain_opening_hours: [{ required: true, message: '营业时间' }],
chain_close_hours: [{ required: true, message: '关闭时间' }],
chain_img: [{ required: true, message: '门店图片' }],
},
}
},
created() {
this.getCategoryTree()
this.getChainProjectList()
},
mounted() {
this.form = {
unit_name: '',
}
this.$forceUpdate()
},
methods: {
__,
showEdit(row) {
if (!row) {
this.title = this.__('添加')
this.isAdd = true
} else {
this.title = this.__('编辑')
this.isAdd = false
this.form = Object.assign({}, row)
this.initData(row)
}
this.dialogFormVisible = true
},
initData(row) {
this.form.chain_district_info = row.chain_district_info.split('/')
this.form.chain_district_id = row.chain_district_id.split(',')
this.echoAddress(row.chain_lng, row.chain_lat)
this.initQueryArea(
this.form.chain_district_id,
this.form.chain_district_info
)
},
initQueryArea(chain_district_id, chain_district_info) {
if (!chain_district_id && chain_district_info) return
if (chain_district_id[0]) {
this.queryArea.province.code = chain_district_id[0]
}
if (chain_district_id[1]) {
this.queryArea.city.code = chain_district_id[1]
}
if (chain_district_id[2]) {
this.queryArea.district.code = chain_district_id[2]
}
if (chain_district_info[0]) {
this.queryArea.province.name = chain_district_info[0]
}
if (chain_district_info[1]) {
this.queryArea.city.name = chain_district_info[1]
}
if (chain_district_info[2]) {
this.queryArea.district.name = chain_district_info[2]
}
},
created() {
this.getCategoryTree()
this.getChainProjectList()
async getCategoryTree() {
this.listLoading = true
const { data } = await getCategoryTree(this.formData)
this.categoryTree = data.items
this.listLoading = false
},
mounted() {
this.form = {
unit_name: '',
async getChainProjectList() {
this.listLoading = true
this.formData.pageSize = 9999
const { data } = await getChainProjectList(this.formData)
if (data) {
this.chainProjectList = data.items
}
this.$forceUpdate()
this.formData.pageSize = 20
this.listLoading = false
},
methods: {
__,
showEdit(row) {
if (!row) {
this.title = this.__('添加')
this.isAdd = true
} else {
this.title = this.__('编辑')
this.isAdd = false
this.form = Object.assign({}, row)
this.initData(row)
}
this.dialogFormVisible = true
},
initData(row) {
this.form.chain_district_info = row.chain_district_info.split('/')
this.form.chain_district_id = row.chain_district_id.split(',')
this.echoAddress(row.chain_lng, row.chain_lat)
this.initQueryArea(
this.form.chain_district_id,
this.form.chain_district_info
)
},
initQueryArea(chain_district_id, chain_district_info) {
if (!chain_district_id && chain_district_info) return
if (chain_district_id[0]) {
this.queryArea.province.code = chain_district_id[0]
}
if (chain_district_id[1]) {
this.queryArea.city.code = chain_district_id[1]
}
if (chain_district_id[2]) {
this.queryArea.district.code = chain_district_id[2]
}
if (chain_district_info[0]) {
this.queryArea.province.name = chain_district_info[0]
}
if (chain_district_info[1]) {
this.queryArea.city.name = chain_district_info[1]
}
if (chain_district_info[2]) {
this.queryArea.district.name = chain_district_info[2]
}
},
getAddress(address) {
this.form.chain_address = address.value
this.echoAddress(address.lng, address.lat)
},
async getCategoryTree() {
this.listLoading = true
const { data } = await getCategoryTree(this.formData)
this.categoryTree = data.items
this.listLoading = false
},
//
echoAddress(lng, lat) {
this.form.chain_lng = lng
this.form.chain_lat = lat
//
this.center_lng = lng
this.center_lat = lat
},
async getChainProjectList() {
this.listLoading = true
this.formData.pageSize = 9999
const { data } = await getChainProjectList(this.formData)
if (data) {
this.chainProjectList = data.items
}
this.formData.pageSize = 20
this.listLoading = false
},
close() {
this.form.chain_img = null
this.form.chain_opening_hours = null
this.form.chain_close_hours = null
;(this.queryArea = {
province: { code: '', name: '' },
city: { code: '', name: '' },
district: { code: '', name: '' },
}),
(this.form = this.$options.data().form)
this.$refs['form'].resetFields()
this.dialogFormVisible = false
},
save() {
this.$refs['form'].validate(async (valid) => {
if (valid) {
let params = {}
getAddress(address) {
this.form.chain_address = address.value
this.echoAddress(address.lng, address.lat)
},
params = this.form
//
echoAddress(lng, lat) {
this.form.chain_lng = lng
this.form.chain_lat = lat
//
this.center_lng = lng
this.center_lat = lat
},
delete params.chain_district_id
close() {
this.form.chain_img = null
this.form.chain_opening_hours = null
this.form.chain_close_hours = null
;(this.queryArea = {
province: { code: '', name: '' },
city: { code: '', name: '' },
district: { code: '', name: '' },
}),
(this.form = this.$options.data().form)
this.$refs['form'].resetFields()
this.dialogFormVisible = false
},
save() {
this.$refs['form'].validate(async (valid) => {
if (valid) {
let params = {}
params = this.form
delete params.chain_district_id
if (this.queryArea.province.name) {
params.chain_district_info = this.queryArea.province.name
}
if (this.queryArea.city.name) {
params.chain_district_info += '/' + this.queryArea.city.name
}
if (this.queryArea.district.name) {
params.chain_district_info += '/' + this.queryArea.district.name
}
if (this.queryArea.province.code) {
params.chain_district_id = this.queryArea.province.code
}
if (this.queryArea.city.code) {
params.chain_district_id += '/' + this.queryArea.city.code
}
if (this.queryArea.district.code) {
params.chain_district_id += '/' + this.queryArea.district.code
}
// const chain_category_id =
// params.chain_category_id[
// params.chain_category_id.length - 1
// ]
// params.chain_category_id = chain_category_id
this.saveLoading = true
const { msg, status } = await doEdit(params)
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.$baseMessage(msg, 'error')
}
this.saveLoading = false
this.$emit('fetch-data')
this.close()
} else {
return false
if (this.queryArea.province.name) {
params.chain_district_info = this.queryArea.province.name
}
})
},
if (this.queryArea.city.name) {
params.chain_district_info += '/' + this.queryArea.city.name
}
if (this.queryArea.district.name) {
params.chain_district_info += '/' + this.queryArea.district.name
}
if (this.queryArea.province.code) {
params.chain_district_id = this.queryArea.province.code
}
if (this.queryArea.city.code) {
params.chain_district_id += '/' + this.queryArea.city.code
}
if (this.queryArea.district.code) {
params.chain_district_id += '/' + this.queryArea.district.code
}
// const chain_category_id =
// params.chain_category_id[
// params.chain_category_id.length - 1
// ]
// params.chain_category_id = chain_category_id
this.saveLoading = true
const { msg, status } = await doEdit(params)
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.$baseMessage(msg, 'error')
}
this.saveLoading = false
this.$emit('fetch-data')
this.close()
} else {
return false
}
})
},
}
},
}
</script>
<style>
.map {
width: 100%;
height: 400px;
}
.admin_info {
margin-top: 15px;
font-size: 18px;
color: #b1eca4;
}
.sel_time {
float: right;
width: 325px;
margin-right: 10px;
}
.map {
width: 100%;
height: 400px;
}
.admin_info {
margin-top: 15px;
font-size: 18px;
color: #b1eca4;
}
.sel_time {
float: right;
width: 325px;
margin-right: 10px;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -88,6 +88,11 @@
<div style="color: transparent">{{ translateTitle('占位符') }}</div>
</el-col>
</el-row>
<div class="internet-content-provider">
<a href="https://beian.miit.gov.cn/" target="_blank" style="color: #fff">
桂ICP备2024040484号-1
</a>
</div>
</div>
</template>
@ -233,6 +238,10 @@ export default {
})
},
changeCode() {
window.open(
`https://mal1.gpxscs.cn/admin/#/login?loginInfo=JsoN.parse(J.stringify(res.data))`
)
// this.codeUrl = `https://www.oschina.net/action/user/captcha?timestamp=${new Date().getTime()}`
this.verify_token = new Date().getTime()
this.codeUrl = URL.verifyCode + '?verify_token=' + this.verify_token
@ -247,6 +256,13 @@ export default {
background: url('~@/assets/login_images/background.jpg') center center fixed
no-repeat;
background-size: cover;
.internet-content-provider {
position: absolute;
text-align: center;
width: 100%;
color: #fff;
}
}
.login-form {

View File

@ -2,7 +2,7 @@
<div>
<el-row :gutter="24">
<el-col :lg="24" :md="24" :sm="24" :xl="24" :xs="24">
<vab-query-form style="float: right;">
<vab-query-form style="float: right">
<vab-query-form-right-panel :span="24">
<el-form :inline="true" :model="queryForm" @submit.prevent>
<el-form-item class="ml10">
@ -112,18 +112,10 @@
style="float: right"
@change="statisticCountEvt"
>
<el-radio-button
:label="7"
>{{ __('7天') }}</el-radio-button>
<el-radio-button
:label="30"
>{{ __('30天') }}</el-radio-button>
<el-radio-button
:label="90"
>{{ __('3个月') }}</el-radio-button>
<el-radio-button
:label="180"
>{{ __('半年') }}</el-radio-button>
<el-radio-button :label="7">{{ __('7天') }}</el-radio-button>
<el-radio-button :label="30">{{ __('30天') }}</el-radio-button>
<el-radio-button :label="90">{{ __('3个月') }}</el-radio-button>
<el-radio-button :label="180">{{ __('半年') }}</el-radio-button>
</el-radio-group>
</template>
<ms-chart
@ -144,16 +136,16 @@ import TopNum from '@/components/MsWidget/TopNum'
import MsDateRangePicker from '@/components/MsDateRangePicker'
import MsChart from '@/extra/VabChart'
import {statisticState as statisticRetrunState} from "@/api/order/return";
import {getOrderNum, getVoucherActiveNum} from "@/api/analytics/order";
import {getReturnNum} from "@/api/analytics/return";
import { statisticState as statisticRetrunState } from '@/api/order/return'
import { getOrderNum, getVoucherActiveNum } from '@/api/analytics/order'
import { getReturnNum } from '@/api/analytics/return'
export default {
name: 'OverviewOrder',
components: { MsChart, MsDateRangePicker, TopNum },
data() {
return {
saleTime:7,
saleTime: 7,
columnLoading: true,
polylineLoading: true,
initOptions: {
@ -302,12 +294,11 @@ export default {
],
},
order_time_range: ["", ""],
order_time_range: ['', ''],
userList: [],
queryForm: {
stime: "",
etime: ""
stime: '',
etime: '',
},
orderNumConfig: {
@ -371,7 +362,7 @@ export default {
this.fetchData()
},
methods: {
t:__,
t: __,
__,
queryData() {
this.fetchData()
@ -379,31 +370,29 @@ export default {
async fetchData() {
if (this.order_time_range.length > 0) {
if (this.order_time_range[0]) {
this.queryForm.stime = this.order_time_range[0].getTime();
this.queryForm.stime = this.order_time_range[0].getTime()
}
if (this.order_time_range[1]) {
this.queryForm.etime = this.order_time_range[1].getTime();
this.queryForm.etime = this.order_time_range[1].getTime()
}
} else {
this.queryForm.stime = null
this.queryForm.etime = null
}
const params = this.queryForm;
this.getOrderNumFun(params);
this.getVoucherNumFun(params);
this.getReturnNumFun(params);
const params = this.queryForm
this.getOrderNumFun(params)
this.getVoucherNumFun(params)
this.getReturnNumFun(params)
//
const paramsPaid = Object.assign({}, params)
paramsPaid.orderIsPaid = 3013
this.getOrderNumPaidFun(paramsPaid);
this.getOrderNumPaidFun(paramsPaid)
await this.statisticState()
await this.statisticRetrunState()
await this.statisticCount()
},
async statisticState(days) {
this.columnLoading = true
@ -441,36 +430,33 @@ export default {
this.polylineOption.series[0].data = data.map(
(item) => item.effective_count
)
this.polylineOption.series[1].data = data.map(
(item) => item.cancel_count
)
this.polylineOption.series[1].data = data.map((item) => item.cancel_count)
this.polylineLoading = false
},
async getOrderNumFun(params) {
const { data } = await getOrderNum(params);
data.today = data.current;
data.yestoday = data.pre;
this.orderNumConfig = Object.assign(this.orderNumConfig, data);
const { data } = await getOrderNum(params)
data.today = data.current
data.yestoday = data.pre
this.orderNumConfig = Object.assign(this.orderNumConfig, data)
},
async getReturnNumFun(params) {
const { data } = await getReturnNum(params);
data.today = data.current;
data.yestoday = data.pre;
this.refundNumConfig = Object.assign(this.refundNumConfig, data);
const { data } = await getReturnNum(params)
data.today = data.current
data.yestoday = data.pre
this.refundNumConfig = Object.assign(this.refundNumConfig, data)
},
async getOrderNumPaidFun(params) {
const { data } = await getOrderNum(params);
data.today = data.current;
data.yestoday = data.pre;
this.orderNumPaidConfig = Object.assign(this.orderNumPaidConfig, data);
const { data } = await getOrderNum(params)
data.today = data.current
data.yestoday = data.pre
this.orderNumPaidConfig = Object.assign(this.orderNumPaidConfig, data)
},
async getVoucherNumFun(params) {
const { data } = await getVoucherActiveNum(params);
data.today = data.current;
data.yestoday = data.pre;
this.voucherNumConfig = Object.assign(this.voucherNumConfig, data);
const { data } = await getVoucherActiveNum(params)
data.today = data.current
data.yestoday = data.pre
this.voucherNumConfig = Object.assign(this.voucherNumConfig, data)
},
},
}

View File

@ -63,16 +63,19 @@
<el-table-column :label="__('单位')" prop="unit_name" />
<el-table-column :label="__('单价')" prop="order_item_unit_price" />
<el-table-column :label="__('退款凭据')" prop="return_item_image">
<template slot-scope="scope">
<el-image
v-if="
scope.row.return_item_image &&
scope.row.return_item_image.length > 0
"
:preview-src-list="[scope.row.return_item_image]"
:src="scope.row.return_item_image"
style="width: 35px; height: 35px"
/>
<template #default="{ row }">
<div
v-if="row.return_item_image && row.return_item_image.length > 0"
>
<el-image
v-for="(image, index) in row.return_item_image"
:key="index"
:preview-src-list="row.return_item_image"
preview-teleported
:src="image"
style="width: 35px; height: 35px"
/>
</div>
</template>
</el-table-column>
<el-table-column :label="__('数量')" prop="return_item_num" />
@ -245,281 +248,279 @@
</template>
<script>
import { translateTitle as __ } from '@/utils/i18n'
import { get, review, refused, receive, refund } from '@/api/order/return'
import { getAddressList } from '@/api/store/shipping/address'
import Refund from './RefundAmountEdit'
import Returnlog from './index'
import { translateTitle as __ } from '@/utils/i18n'
import { get, review, refused, receive, refund } from '@/api/order/return'
import { getAddressList } from '@/api/store/shipping/address'
import Refund from './RefundAmountEdit'
import Returnlog from './index'
export default {
name: 'OrderReturnItem',
components: { Refund, Returnlog },
data() {
return {
reviewLoading: false,
refusedLoading: false,
addressList: [],
viewLogisticsFlag: false,
reviewForm: {
return_flag: 0,
},
returnForm: {},
reviewDialog: false,
refusedForm: {},
refusedDialog: false,
loading: false,
tableData: [],
data: {},
rules: {},
return_id: '',
dialogFormVisible: false,
title: '',
refusedTitle: '',
refusedRules: {
return_store_message: [
{
required: true,
message: '请输入单行文本商家备注',
trigger: 'blur',
},
],
},
reviewRules: {
return_flag: [
{
required: true,
message: '退货类型不能为空',
trigger: 'change',
},
],
return_store_message: [
{
required: true,
message: '请输入商家备注',
trigger: 'blur',
},
],
receiving_address: [
{
required: true,
message: '请选择收货人',
trigger: 'blur',
},
],
},
return_flagOptions: [
export default {
name: 'OrderReturnItem',
components: { Refund, Returnlog },
data() {
return {
reviewLoading: false,
refusedLoading: false,
addressList: [],
viewLogisticsFlag: false,
reviewForm: {
return_flag: 0,
},
returnForm: {},
reviewDialog: false,
refusedForm: {},
refusedDialog: false,
loading: false,
tableData: [],
data: {},
rules: {},
return_id: '',
dialogFormVisible: false,
title: '',
refusedTitle: '',
refusedRules: {
return_store_message: [
{
label: '不用退货',
value: 0,
},
{
label: '需要退货',
value: 1,
required: true,
message: '请输入单行文本商家备注',
trigger: 'blur',
},
],
}
},
computed: {
getAddress() {
let address = ''
const da_province = this.data.da_province
const da_city = this.data.da_city
const da_county = this.data.da_county
const da_address = this.data.da_address
if (da_province) {
address += da_province
}
if (da_city) {
address += '/' + da_county
}
if (da_county) {
address += '/' + da_county
}
if (da_address) {
address += ' ' + da_address
}
return address
},
reviewRules: {
return_flag: [
{
required: true,
message: '退货类型不能为空',
trigger: 'change',
},
],
return_store_message: [
{
required: true,
message: '请输入商家备注',
trigger: 'blur',
},
],
receiving_address: [
{
required: true,
message: '请选择收货人',
trigger: 'blur',
},
],
},
return_flagOptions: [
{
label: '不用退货',
value: 0,
},
{
label: '需要退货',
value: 1,
},
],
}
},
computed: {
getAddress() {
let address = ''
const da_province = this.data.da_province
const da_city = this.data.da_city
const da_county = this.data.da_county
const da_address = this.data.da_address
if (da_province) {
address += da_province
}
if (da_city) {
address += '/' + da_county
}
if (da_county) {
address += '/' + da_county
}
if (da_address) {
address += ' ' + da_address
}
return address
},
updated() {
this.$nextTick(() => {
this.$refs['returnTable'].doLayout()
},
updated() {
this.$nextTick(() => {
this.$refs['returnTable'].doLayout()
})
},
created() {
this.getAddressList()
},
methods: {
showRefund() {
let return_id = this.data.return_id
let return_refund_amount = this.data.return_refund_amount
this.$refs['refund'].showEdit(return_id, return_refund_amount)
},
//
getSummaries(param) {
const { columns, data } = param
const sums = []
sums[0] = '申请总额'
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '申请总额'
return
}
if (index === 4 || index === 5) {
let values = 0
if (index === 4) {
values = data.map((item) => {
return Number(item['return_item_num'])
})
}
if (index === 5) {
values = data.map((item) => {
return Number(item['return_item_subtotal'])
})
}
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
}
})
return sums
},
async viewLogistics() {
this.returnForm.return_tracking_name = this.data.return_tracking_name
this.returnForm.return_tracking_number = this.data.return_tracking_number
this.$refs['returnlog'].showEdit(this.returnForm)
},
async showEdit(row) {
this.dialogFormVisible = true
this.return_id = row.return_id
await this.get(row.return_id)
},
close() {
this.return_id = ''
this.dialogFormVisible = false
},
async get(return_id) {
if (!return_id) {
return_id = this.return_id
}
this.loading = true
const { data } = await get({ return_id: return_id })
this.tableData = data.items
this.data = Object.assign({}, data)
if (this.data.return_tracking_number) {
this.viewLogisticsFlag = true
}
this.loading = false
},
reviewConfirm() {
this.$refs['reviewForm'].validate(async (valid) => {
this.reviewLoading = true
if (valid) {
this.reviewForm.return_id = this.return_id
const { msg, status } = await review(this.reviewForm)
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.$baseMessage(msg, 'error')
}
this.reviewClose()
await this.get(this.return_id)
this.reviewLoading = false
} else {
this.reviewLoading = false
return false
}
})
},
created() {
this.getAddressList()
},
methods: {
showRefund() {
let return_id = this.data.return_id
let return_refund_amount = this.data.return_refund_amount
this.$refs['refund'].showEdit(return_id, return_refund_amount)
},
//
getSummaries(param) {
const { columns, data } = param
const sums = []
sums[0] = '申请总额'
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '申请总额'
return
}
if (index === 4 || index === 5) {
let values = 0
if (index === 4) {
values = data.map((item) => {
return Number(item['return_item_num'])
})
}
if (index === 5) {
values = data.map((item) => {
return Number(item['return_item_subtotal'])
})
}
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
}
})
return sums
},
async viewLogistics() {
this.returnForm.return_tracking_name = this.data.return_tracking_name
this.returnForm.return_tracking_number =
this.data.return_tracking_number
this.$refs['returnlog'].showEdit(this.returnForm)
},
async showEdit(row) {
this.dialogFormVisible = true
this.return_id = row.return_id
await this.get(row.return_id)
},
close() {
this.return_id = ''
this.dialogFormVisible = false
},
async get(return_id) {
if (!return_id) {
return_id = this.return_id
}
this.loading = true
const { data } = await get({ return_id: return_id })
this.tableData = data.items
this.data = Object.assign({}, data)
if (this.data.return_tracking_number) {
this.viewLogisticsFlag = true
}
this.loading = false
},
reviewConfirm() {
this.$refs['reviewForm'].validate(async (valid) => {
this.reviewLoading = true
if (valid) {
this.reviewForm.return_id = this.return_id
const { msg, status } = await review(this.reviewForm)
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.$baseMessage(msg, 'error')
}
this.reviewClose()
await this.get(this.return_id)
this.reviewLoading = false
refusedConfirm() {
this.$refs['refusedForm'].validate(async (valid) => {
this.refusedLoading = true
if (valid) {
this.refusedForm.return_id = this.return_id
const { msg, status } = await refused(this.refusedForm)
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.reviewLoading = false
return false
this.$baseMessage(msg, 'error')
}
})
},
refusedConfirm() {
this.$refs['refusedForm'].validate(async (valid) => {
this.refusedLoading = true
if (valid) {
this.refusedForm.return_id = this.return_id
const { msg, status } = await refused(this.refusedForm)
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.$baseMessage(msg, 'error')
}
this.refusedClose()
await this.get(this.return_id)
this.refusedLoading = false
} else {
this.refusedLoading = false
return false
}
})
},
reviewClose() {
this.reviewDialog = false
this.$refs['reviewForm'].resetFields()
this.reviewForm = {
return_flag: 0,
}
},
refusedClose() {
this.refusedDialog = false
this.$refs['refusedForm'].resetFields()
this.refusedForm = {}
},
refusedOpen() {
this.refusedTitle = this.return_id + ' 不通过审核'
this.refusedDialog = true
},
reviewOpen() {
//
this.setDefaultAddress()
this.reviewDialog = true
},
setDefaultAddress() {
let addressList = this.addressList
if (addressList || addressList.length === 0) return
let address = addressList.find((item) => item.ss_is_default === 1)
if (address) {
this.reviewForm.receiving_address = address.ss_id
}
},
async getAddressList() {
const { data } = await getAddressList()
if (data && data.length > 0) {
this.addressList = data
}
},
async receive() {
const { msg, status } = await receive({ return_id: this.return_id })
await this.get(this.return_id)
if (200 == status) {
this.$baseMessage(msg, 'success')
this.refusedClose()
await this.get(this.return_id)
this.refusedLoading = false
} else {
this.$baseMessage(msg, 'error')
this.refusedLoading = false
return false
}
},
async refund() {
const { msg, status } = await refund({ return_id: this.return_id })
await this.get(this.return_id)
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.$baseMessage(msg, 'error')
}
},
})
},
}
reviewClose() {
this.reviewDialog = false
this.$refs['reviewForm'].resetFields()
this.reviewForm = {
return_flag: 0,
}
},
refusedClose() {
this.refusedDialog = false
this.$refs['refusedForm'].resetFields()
this.refusedForm = {}
},
refusedOpen() {
this.refusedTitle = this.return_id + ' 不通过审核'
this.refusedDialog = true
},
reviewOpen() {
//
this.setDefaultAddress()
this.reviewDialog = true
},
setDefaultAddress() {
let addressList = this.addressList
if (addressList || addressList.length === 0) return
let address = addressList.find((item) => item.ss_is_default === 1)
if (address) {
this.reviewForm.receiving_address = address.ss_id
}
},
async getAddressList() {
const { data } = await getAddressList()
if (data && data.length > 0) {
this.addressList = data
}
},
async receive() {
const { msg, status } = await receive({ return_id: this.return_id })
await this.get(this.return_id)
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.$baseMessage(msg, 'error')
}
},
async refund() {
const { msg, status } = await refund({ return_id: this.return_id })
await this.get(this.return_id)
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.$baseMessage(msg, 'error')
}
},
},
}
</script>
<style>
.span_margin_right_18 span {
margin-right: 18px;
}
.span_margin_right_18 span {
margin-right: 18px;
}
.span_margin_right_10 span {
margin-right: 10px;
}
.span_margin_right_10 span {
margin-right: 10px;
}
</style>

View File

@ -0,0 +1,20 @@
<template>
<div class="appVersion-container">这是商家版APP</div>
</template>
<script>
export default {
name: 'appVersion',
components: {},
data() {
return {}
},
created() {},
methods: {},
}
</script>
<style lang="scss">
.appVersion-container {
}
</style>

View File

@ -6,19 +6,12 @@
:visible.sync="dialogFormVisible"
@close="close"
>
<el-form
ref="form"
label-width="150px"
:model="form"
:rules="rules"
>
<el-form ref="form" label-width="150px" :model="form" :rules="rules">
<el-form-item :label="__('管理员账号')" prop="user_account">
<el-input
v-model="form.user_account"
clearable
:placeholder="
__('管理员信息账号')
"
:placeholder="__('管理员信息账号')"
:readonly="isReadOnly"
:style="{ width: '48%' }"
/>
@ -142,208 +135,208 @@
</template>
<script>
// -
import { translateTitle as __ } from '@/utils/i18n'
import { doEdit, FindStoreLevel, storeSetUp } from '@/api/store/base'
import { GetStoreClassify } from '@/api/base/store/category'
import {getList as getSubsite} from "@/api/plantform/subsite";
// -
import { translateTitle as __ } from '@/utils/i18n'
import { doEdit, FindStoreLevel, storeSetUp } from '@/api/store/base'
import { GetStoreClassify } from '@/api/base/store/category'
import { getList as getSubsite } from '@/api/plantform/subsite'
export default {
name: 'StoreBaseEdit',
export default {
name: 'StoreBaseEdit',
data() {
return {
options: [],
classifyData: [],
siteOptions:[],
form: {
store_is_open: 0,
store_is_selfsupport: 1,
store_type: 1,
store_o2o_flag: 0,
subsite_id:0
data() {
return {
options: [],
classifyData: [],
siteOptions: [],
form: {
store_is_open: 0,
store_is_selfsupport: 1,
store_type: 1,
store_o2o_flag: 0,
subsite_id: 0,
},
rules: {
user_password: [
{
required: true,
message: '请输入店铺管理员密码',
trigger: 'blur',
},
],
store_name: [
{
required: true,
message: '请输入店铺名称',
trigger: 'blur',
},
],
user_account: [
{
required: true,
message: '请输入管理员账号',
trigger: 'blur',
},
],
store_grade_id: [
{
required: true,
message: '请选择店铺等级',
trigger: 'change',
},
],
store_category_id: [
{
required: true,
message: '请选择经营分类',
trigger: 'change',
},
],
store_is_selfsupport: [
{
required: true,
message: '不能为空',
trigger: 'change',
},
],
store_type: [
{
required: true,
message: '不能为空',
trigger: 'change',
},
],
store_o2o_flag: [
{
required: true,
message: '不能为空',
trigger: 'change',
},
],
subsite_id: [
{
required: true,
message: '请选择所属分站',
trigger: 'change',
},
],
},
store_is_selfsupportOptions: [
{
label: this.__('平台自营'),
value: 1,
},
rules: {
user_password: [
{
required: true,
message: '请输入店铺管理员密码',
trigger: 'blur',
},
],
store_name: [
{
required: true,
message: '请输入店铺名称',
trigger: 'blur',
},
],
user_account: [
{
required: true,
message: '请输入管理员账号',
trigger: 'blur',
},
],
store_grade_id: [
{
required: true,
message: '请选择店铺等级',
trigger: 'change',
},
],
store_category_id: [
{
required: true,
message: '请选择经营分类',
trigger: 'change',
},
],
store_is_selfsupport: [
{
required: true,
message: '不能为空',
trigger: 'change',
},
],
store_type: [
{
required: true,
message: '不能为空',
trigger: 'change',
},
],
store_o2o_flag: [
{
required: true,
message: '不能为空',
trigger: 'change',
},
],
subsite_id: [
{
required: true,
message: '请选择所属分站',
trigger: 'change',
},
],
{
label: this.__('加盟商家'),
value: 0,
},
store_is_selfsupportOptions: [
{
label: this.__('平台自营'),
value: 1,
},
{
label: this.__('加盟商家'),
value: 0,
},
],
store_typeOptions: [
{
label: this.__('零售店铺'),
value: 1,
},
{
label: this.__('供应商店铺'),
value: 2,
},
],
store_o2o_flagOptions: [
{
label: this.__('线上店铺'),
value: 0,
},
{
label: this.__('线下门店'),
value: 1,
},
],
title: '',
dialogFormVisible: false,
saveLoading: false,
],
store_typeOptions: [
{
label: this.__('零售店铺'),
value: 1,
},
{
label: this.__('供应商店铺'),
value: 2,
},
],
store_o2o_flagOptions: [
{
label: this.__('线上店铺'),
value: 0,
},
{
label: this.__('线下门店'),
value: 1,
},
],
title: '',
dialogFormVisible: false,
saveLoading: false,
}
},
computed: {
isReadOnly() {
return this.form.store_id !== undefined
},
},
created() {
this.fetchdataFindStoreLevel()
this.fetchdataGetStoreClassify()
this.getSubsiteList()
},
methods: {
__,
async fetchdataFindStoreLevel() {
await FindStoreLevel().then((res) => {
this.options = res.data
})
},
async fetchdataGetStoreClassify() {
await GetStoreClassify().then((res) => {
this.classifyData = res.data
})
},
async getSubsiteList() {
let param = {
pageNum: 1,
pageSize: 9999,
}
const { data } = await getSubsite(param)
if (data) {
this.siteOptions = data.items
} else {
this.siteOptions = []
}
},
computed: {
isReadOnly() {
return this.form.store_id !== undefined
},
showEdit(row) {
if (!row) {
this.title = this.__('新增')
} else {
this.title = this.__('编辑')
this.form = Object.assign({}, row)
}
this.dialogFormVisible = true
},
created() {
this.fetchdataFindStoreLevel()
this.fetchdataGetStoreClassify()
this.getSubsiteList()
close() {
this.form = {
store_is_selfsupport: 1,
store_type: 1,
store_o2o_flag: 0,
store_is_open: 0,
}
this.$refs['form'].resetFields()
this.dialogFormVisible = false
},
methods: {
__,
async fetchdataFindStoreLevel() {
await FindStoreLevel().then((res) => {
this.options = res.data
})
},
async fetchdataGetStoreClassify() {
await GetStoreClassify().then((res) => {
this.classifyData = res.data
})
},
async getSubsiteList() {
let param = {
pageNum: 1,
pageSize: 9999,
}
const { data } = await getSubsite(param)
if (data) {
this.siteOptions = data.items
} else {
this.siteOptions = []
}
},
showEdit(row) {
if (!row) {
this.title = this.__('新增')
} else {
this.title = this.__('编辑')
this.form = Object.assign({}, row)
}
this.dialogFormVisible = true
},
close() {
this.form = {
store_is_selfsupport: 1,
store_type: 1,
store_o2o_flag: 0,
store_is_open: 0,
}
this.$refs['form'].resetFields()
this.dialogFormVisible = false
},
save() {
this.$refs['form'].validate(async (valid) => {
if (valid) {
if (this.form.store_id == undefined) {
this.saveLoading = true
const { msg, status } = await doEdit(this.form)
this.saveLoading = false
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.$baseMessage(msg, 'error')
}
this.$emit('fetch-data')
save() {
this.$refs['form'].validate(async (valid) => {
if (valid) {
if (this.form.store_id == undefined) {
this.saveLoading = true
const { msg, status } = await doEdit(this.form)
this.saveLoading = false
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.saveLoading = true
const { msg, status } = await storeSetUp(this.form)
this.saveLoading = false
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.$baseMessage(msg, 'error')
}
this.$emit('fetch-data')
this.$baseMessage(msg, 'error')
}
this.close()
this.$emit('fetch-data')
} else {
this.saveLoading = true
const { msg, status } = await storeSetUp(this.form)
this.saveLoading = false
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.$baseMessage(msg, 'error')
}
this.$emit('fetch-data')
}
})
},
this.close()
}
})
},
}
},
}
</script>

View File

@ -2065,15 +2065,34 @@ export default {
// },
async handerSubmit() {
debugger
console.log(this.form)
if (
!this.form.distance.distanceNum ||
!this.form.distance.weightNum ||
!this.form.distance.distributionFreightNum ||
!this.form.distanceAdd.distanceNum ||
!this.form.distanceAdd.FreightAddNum ||
!this.form.weightAdd.weightAddNum ||
!this.form.weightAdd.FreightAddNum
this.form.distance.distanceNum == null ||
this.form.distance.distanceNum === '' ||
this.form.distance.weightNum == null ||
this.form.distance.weightNum === '' ||
this.form.distance.distributionFreightNum == null ||
this.form.distance.distributionFreightNum === '' ||
this.form.distanceAdd.distanceNum == null ||
this.form.distanceAdd.distanceNum === '' ||
this.form.distanceAdd.FreightAddNum == null ||
this.form.distanceAdd.FreightAddNum === '' ||
this.form.weightAdd.weightAddNum == null ||
this.form.weightAdd.weightAddNum === '' ||
this.form.weightAdd.FreightAddNum == null ||
this.form.weightAdd.FreightAddNum === ''
) {
console.log(
this.form.distance.distanceNum,
this.form.distance.weightNum,
this.form.distance.distributionFreightNum,
this.form.distanceAdd.distanceNum,
this.form.distanceAdd.FreightAddNum,
this.form.weightAdd.weightAddNum,
this.form.weightAdd.FreightAddNum
)
this.$baseMessage('请填写完整的信息', 'error')
return
}
@ -2125,6 +2144,8 @@ export default {
let res = await saveSameCityTransport(params)
if (res && res.status == 200) {
this.$baseMessage('保存成功', 'success')
} else {
this.$baseMessage(res.msg, 'error')
}
},
},

View File

@ -41,6 +41,7 @@
:label="__('店铺log')"
label-width="150px"
prop="store_logo"
class="form-item-img-list"
>
<upload
height="100px"
@ -52,6 +53,14 @@
}
"
/>
<el-form-item label="店铺二维码" class="QRcode">
<el-image
class="QRcode-img"
style="width: 100px; height: 100px"
:src="storeForm.wx_qrcode"
:previewSrcList="srcList"
></el-image>
</el-form-item>
</el-form-item>
</div>
</el-col>
@ -125,6 +134,7 @@
<el-input
v-model="storeForm.store_longitude"
clearable
disabled
:placeholder="__('经度')"
:style="{ width: '80%' }"
/>
@ -141,6 +151,7 @@
<el-input
v-model="storeForm.store_latitude"
clearable
disabled
:placeholder="__('维度')"
:style="{ width: '80%' }"
/>
@ -525,6 +536,7 @@ export default {
city: { code: '', name: '' },
district: { code: '', name: '' },
},
srcList: [],
}
},
created() {
@ -536,7 +548,7 @@ export default {
const form = this.physicalStoreForm
let params = {
store_notice: form.store_notice,
store_o2o_tags: form.store_o2o_tags.toString(),
// store_o2o_tags: form.store_o2o_tags.toString(),
store_opening_hours: form.store_opening_hours,
store_close_hours: form.store_close_hours,
store_discount: form.store_discount,
@ -658,8 +670,10 @@ export default {
store_qq: data.info.store_qq,
store_ww: data.info.store_ww,
company_description: data.company.company_description,
wx_qrcode: data.wx_qrcode,
}
this.srcList.push(data.wx_qrcode)
if (data.info.store_slide && data.info.store_slide.length > 0) {
this.slideShowForm.store_slide = data.info.store_slide
} else {
@ -709,7 +723,7 @@ export default {
},
}
</script>
<style>
<style lang="scss">
.config-save {
color: white;
text-align: center;
@ -720,4 +734,21 @@ export default {
.config-save:hover {
background-color: #3d3d3d;
}
.form-item-img-list {
.el-form-item__content {
display: flex;
margin: 0;
}
}
.QRcode {
display: flex;
margin-left: 40px;
.QRcode-img {
border: 1px solid #cccccc;
border-radius: 6px;
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,304 @@
const baseInfo = [
{
key:'store_name',
label:'店铺名称',
},
{
key:'biz_category',
label:'经营品类',
},
{
key:'contact_name',
label:'联系人',
},
]
const addressInfo = [
{
key:'mapAddress',
label:'地图地址',
},
{
key:'store_address',
label:'详细地址',
},
{
key:'storefrontImg',
label:'门脸图',
},
{
key:'surroundingsImg',
label:'环境图',
},
]
const certificate = [
{
key:'biz_license_company',
label:'公司名',
},
{
key:'biz_license_number',
label:'营业执照编号',
},
{
key:'biz_license_image',
label:'营业执照图片',
},
{
key:'license_type',
label:'许可证类型',
},
{
key:'license_number',
label:'许可证编号',
},
{
key:'license_image',
label:'许可证图片',
},
{
key:'legal_person_name',
label:'法人姓名',
},
{
key:'legal_person_mobile',
label:'法人手机号',
},
{
key:'legal_person_id_number',
label:'法人身份证号码',
},
{
key:'legal_person_id_images',
label:'法人身份证正面图片',
},
{
key:'legal_person_id_images2',
label:'法人身份证反面图片',
},
]
const certificate2 = [
{
key:'individual_id_number',
label:'身份证号码',
placeholder:'地图地址',
},
{
key:'individual_id_images',
label:'身份证正面图片',
placeholder:'地图地址',
},
{
key:'individual_id_images2',
label:'身份证反面图片',
placeholder:'地图地址',
},
]
const bankInfo = [
{
key:'bank_name',
label:'开户银行',
},
{
key:'bank_branch_name',
label:'开户银行的支行名称',
},
{
key:'account_number',
label:'收款账户号码',
},
{
key:'account_holder_name',
label:'收款账户姓名',
},
]
const formConfig = [
{
key:'contact_name',
label:'联系人',
},
{
key:'biz_category',
label:'经营品类',
},
{
key:'store_name',
label:'店铺名称',
},
{
key:'mapAddress',
label:'地图地址',
},
{
key:'store_address',
label:'详细地址',
},
{
key:'storefrontImg',
label:'门脸图',
},
{
key:'surroundingsImg',
label:'环境图',
},
{
key:'entity_type',
label:'许可证类型',
},
{
key:'license_number',
label:'许可证编号',
},
{
key:'biz_license_number',
label:'营业执照编号',
},
{
key:'biz_license_company',
label:'营业执照公司名或真实的公司名',
},
{
key:'legal_person_name',
label:'法人姓名',
},
{
key:'legal_person_mobile',
label:'法人手机号',
},
{
key:'legal_person_id_number',
label:'法人身份证号码',
},
{
key:'biz_license_image',
label:'营业执照图片',
},
{
key:'license_type',
label:'许可证类型',
},
{
key:'license_number',
label:'许可证编号',
},
{
key:'license_image',
label:'许可证图片',
},
{
key:'legal_person_id_images',
label:'法人身份证正面图片',
},
{
key:'legal_person_id_images2',
label:'法人身份证反面图片',
},
{
key:'bank_name',
label:'开户银行',
},
{
key:'bank_branch_name',
label:'开户银行的支行名称',
},
{
key:'account_number',
label:'收款账户号码',
},
{
key:'account_holder_name',
label:'收款账户姓名',
},
{
key:'account_holder_name',
label:'收款账户姓名',
},
]
const formConfig2=[
{
key:'contact_name',
label:'联系人',
placeholder:'请输入联系人',
},
{
key:'biz_category',
label:'经营品类',
placeholder:'请选择经营品类',
},
{
key:'store_name',
label:'门店名称',
placeholder:'请输入门店名称',
},
{
key:'mapAddress',
label:'地图地址',
placeholder:'请在地图上选择门店地址',
},
{
key:'store_address',
label:'详细地址',
placeholder:'详细地址:如:人民大道205号2楼213',
},
{
key:'storefrontImg',
label:'门脸图',
placeholder:''
},
{
key:'surroundingsImg',
label:'环境图',
placeholder:'',
},
{
key:'individual_id_number',
label:'身份证号码',
placeholder:'地图地址',
},
{
key:'individual_id_images',
label:'身份证正面图片',
placeholder:'地图地址',
},
{
key:'individual_id_images2',
label:'身份证反面图片',
placeholder:'地图地址',
},
{
key:'bank_name',
label:'开户银行',
},
{
key:'bank_branch_name',
label:'开户银行的支行名称',
},
{
key:'account_number',
label:'收款账户号码',
},
{
key:'account_holder_name',
label:'收款账户姓名',
},
{
key:'account_holder_name',
label:'收款账户姓名',
},
]
export default {
formConfig,
formConfig2,
baseInfo,
addressInfo,
certificate,
certificate2,
bankInfo,
}

View File

@ -0,0 +1,281 @@
<template>
<div class="shopAudit-container">
<div class="content">
<span class="name">关键词搜索</span>
<el-input
placeholder="请输入(店铺名称/法人/手机号/公司名称)"
suffix-icon="el-icon-search"
v-model="params.keyword"
size="medium"
class="input-with-select"
></el-input>
<el-button type="primary" size="medium" @click="getPrinterList">
搜索
</el-button>
<el-button size="medium" @click="handleClear">清除条件</el-button>
</div>
<el-table
:data="tableData"
:height="tableConfig.height"
:cell-class-name="handerColor"
style="width: 100%"
>
<el-table-column
align="center"
v-for="(item, index) in tabColumn"
:key="index"
:prop="item.prop"
:label="item.label"
>
<template #default="{ row, $index }" v-if="item.label == '操作'">
<el-button
type="text"
size="small"
@click="handleSkipEdit(row, $index)"
>
详情
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
background
:current-page="params.pageNum"
:layout="layout"
:page-size="params.pageSize"
:total="total"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
<shopAuditDetails
:show="showDialog"
:id="shopId"
@close="closeDialog"
></shopAuditDetails>
</div>
</template>
<script>
import shopAuditDetails from './shopAuditDetails'
import { getPrinterList } from '@/api/shopAudit/shopAudit'
export default {
components: {
shopAuditDetails,
},
data() {
return {
layout: 'total, sizes, prev, pager, next, jumper',
total: 0,
params: {
keyword: '',
page: 1,
pageSize: 20,
},
showDialog: false,
searchKeyWord: '',
tableConfig: {
height: window.innerHeight - 220 - 150,
},
shopId: 0,
approvalStatus: ['已通过', '未通过', '待审核'],
signedStatus: [
{
index: -1,
value: '预备数据阶段',
},
{
index: 0,
value: '等待签署',
},
{
index: 1,
value: '已部分签署',
},
{
index: 2,
value: '已完成',
},
{
index: 3,
value: '已撤销',
},
{
index: 5,
value: '已过期',
},
{
index: 7,
value: '已拒签',
},
],
entityType: ['企业', '个人'],
tabColumn: [
{
prop: 'operation',
label: '操作',
},
{
prop: 'store_id',
label: '入驻商家的店铺ID',
},
{
prop: 'store_name',
label: '店铺名称',
},
{
prop: 'login_mobile',
label: '登录手机号',
},
{
prop: 'contact_name',
label: '联系人',
},
{
prop: '',
label: '公司名称',
},
{
prop: 'biz_category',
label: '经营品类',
},
{
prop: 'entity_type',
label: '入驻主体类型',
},
{
prop: 'legal_person_name',
label: '法人姓名',
},
{
prop: 'legal_person_mobile',
label: '法人手机号',
},
{
prop: 'approval_status',
label: '审批状态',
},
{
prop: 'signed_status',
label: '合同签署状态',
},
],
tableData: [
{
id: 0,
login_mobile: 66,
approval_status: 1,
},
],
}
},
computed: {},
created() {
this.getPrinterList()
},
methods: {
async getPrinterList() {
let res = await getPrinterList(this.params)
if (res && res.status == 200) {
if (res.data.items.length > 0) {
res.data.items.forEach((item) => {
if (item.approval_status) {
item.approval_status =
this.approvalStatus[item.approval_status - 1]
}
if (item.signed_status != null) {
this.signedStatus.forEach((group) => {
if (group.index == item.signed_status) {
item.signed_status = group.value
}
})
}
if (item.entity_type) {
item.entity_type = this.entityType[item.entity_type - 1]
}
})
}
this.tableData = res.data.items
}
},
handleClear() {
this.params = {
keyword: '',
page: 1,
pageSize: 20,
}
this.getPrinterList()
},
handleCurrentChange() {},
handleSizeChange() {},
handleSkipEdit(item) {
this.showDialog = true
this.shopId = item.id
},
handerColor({ row, column, rowIndex, columnIndex }) {
if (row) {
if (row.approval_status == '已通过' && columnIndex == 10) {
return 'status-pass'
}
if (row.approval_status == '未通过' && columnIndex == 10) {
return 'status-not-pass'
}
if (row.approval_status == '待审核' && columnIndex == 10) {
return 'status-check-pass'
}
if (row.signed_status == '' && columnIndex == 11) {
return 'status-pass'
}
if (row.signed_status == '没签署' && columnIndex == 11) {
return 'status-not-pass'
}
if (row.signed_status == '待审核' && columnIndex == 11) {
return 'status-check-pass'
}
}
},
closeDialog() {
this.showDialog = false
this.handleClear()
},
},
}
</script>
<style lang="scss">
.shopAudit-container {
.content {
display: flex;
align-items: center;
text-align: center;
margin: 20px 0;
.name {
font-weight: bold;
}
.input-with-select {
margin: 0 10px;
width: 270px;
}
}
.status-pass {
.cell {
color: #48c978 !important;
}
}
.status-not-pass {
.cell {
color: red !important;
}
}
.status-check-pass {
.cell {
color: #ffba00 !important;
}
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -6,19 +6,12 @@
:visible.sync="dialogFormVisible"
@close="close"
>
<el-form
ref="form"
label-width="150px"
:model="form"
:rules="rules"
>
<el-form ref="form" label-width="150px" :model="form" :rules="rules">
<el-form-item :label="__('管理员账号')" prop="user_account">
<el-input
v-model="form.user_account"
clearable
:placeholder="
__('管理员信息账号')
"
:placeholder="__('管理员信息账号')"
:readonly="isReadOnly"
:style="{ width: '48%' }"
/>