Commit 529151af by leic

系统配置调整

1 parent d518e97b
Showing with 2588 additions and 1653 deletions
...@@ -3,5 +3,6 @@ import axios from 'axios' ...@@ -3,5 +3,6 @@ import axios from 'axios'
export default function getUpToken(key) { export default function getUpToken(key) {
let data = new FormData(); let data = new FormData();
data.append('key', key); data.append('key', key);
console.log(data)
return axios.get( 'https://api.ledianyun.com/api/get/qiniuUploadToken', data).then(res => res.data) return axios.get( 'https://api.ledianyun.com/api/get/qiniuUploadToken', data).then(res => res.data)
} }
...@@ -84,7 +84,7 @@ img { ...@@ -84,7 +84,7 @@ img {
------------------------------ */ ------------------------------ */
.site-wrapper { .site-wrapper {
position: relative; position: relative;
min-width: 1180px; // min-width: 1180px;
} }
...@@ -103,6 +103,7 @@ img { ...@@ -103,6 +103,7 @@ img {
.site-navbar__body, .site-navbar__body,
.site-content__wrapper { .site-content__wrapper {
margin-left: 64px; margin-left: 64px;
width: calc(100% - 64px);
} }
.site-navbar__brand { .site-navbar__brand {
...@@ -343,6 +344,9 @@ img { ...@@ -343,6 +344,9 @@ img {
z-index: 1020; z-index: 1020;
width: 230px; width: 230px;
overflow: hidden; overflow: hidden;
.site-content__wrapper {
width: calc(100% - 230px);
}
&--dark, &--dark,
&--dark-popper { &--dark-popper {
...@@ -871,4 +875,11 @@ img { ...@@ -871,4 +875,11 @@ img {
} }
} }
} }
// 编辑器样式
.quill-editor {
.ql-editor {
min-height: 200px;
}
}
} }
\ No newline at end of file
...@@ -3,13 +3,14 @@ ...@@ -3,13 +3,14 @@
<div class="search_form"> <div class="search_form">
<el-form :model="searchData" :size="size" :label-width="labelWidth" ref="searchForm"> <el-form :model="searchData" :size="size" :label-width="labelWidth" ref="searchForm">
<el-row class="search_form_box" :gutter="10"> <el-row class="search_form_box" :gutter="10">
<el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6" v-for='item in searchForm' :key='item.prop'> <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6" v-for='item in formList' :key='item.prop'>
<el-form-item :label="item.label" :prop="item.prop"> <el-form-item :label="item.label" :prop="item.prop">
<!-- 输入框 --> <!-- 输入框 -->
<el-input v-if="item.type === 'Input'" v-model="searchData[item.prop]" <el-input v-if="item.type === 'Input'" v-model="searchData[item.prop]"
:placeholder="item.placeholder || '请输入'"></el-input> :placeholder="item.placeholder || '请输入'"></el-input>
<!-- 下拉框 --> <!-- 下拉框 -->
<el-select v-if="item.type === 'Select'" v-model="searchData[item.prop]" clearable :disabled="item.disabled" :placeholder="item.placeholder || '请选择'"> <el-select v-if="item.type === 'Select'" v-model="searchData[item.prop]" clearable
:disabled="item.disabled" :placeholder="item.placeholder || '请选择'">
<el-option v-for="op in item.options" :label="op.label" :value="op.value" <el-option v-for="op in item.options" :label="op.label" :value="op.value"
:key="op.value"></el-option> :key="op.value"></el-option>
</el-select> </el-select>
...@@ -23,39 +24,59 @@ ...@@ -23,39 +24,59 @@
}}</el-radio-button> }}</el-radio-button>
</el-radio-group> </el-radio-group>
<!-- 复选框 --> <!-- 复选框 -->
<el-checkbox-group v-if="item.type === 'Checkbox'" v-model="searchData[item.prop]" :placeholder="item.placeholder || '请选择'"> <el-checkbox-group v-if="item.type === 'Checkbox'" v-model="searchData[item.prop]"
:placeholder="item.placeholder || '请选择'">
<el-checkbox v-for="ch in item.checkboxs" :label="ch.value" :key="ch.value">{{ ch.label <el-checkbox v-for="ch in item.checkboxs" :label="ch.value" :key="ch.value">{{ ch.label
}}</el-checkbox> }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<!-- 日期 --> <!-- 日期 -->
<el-date-picker v-if="item.type === 'Date'" v-model="searchData[item.prop]" clearable :placeholder="item.placeholder || '请选择'"></el-date-picker> <el-date-picker v-if="item.type === 'Date'" v-model="searchData[item.prop]" clearable
:placeholder="item.placeholder || '请选择'"></el-date-picker>
<!-- 日期范围选择 --> <!-- 日期范围选择 -->
<el-date-picker v-if="item.type === 'DateRange'" type='daterange' v-model="searchData[item.prop]" clearable start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> <el-date-picker v-if="item.type === 'DateRange'" type='daterange' v-model="searchData[item.prop]"
clearable start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<!-- 时间 --> <!-- 时间 -->
<el-time-select v-if="item.type === 'Time'" v-model="searchData[item.prop]" <el-time-select v-if="item.type === 'Time'" v-model="searchData[item.prop]" type=''
type='' clearable></el-time-select> clearable></el-time-select>
<!-- 日期时间 --> <!-- 日期时间 -->
<el-date-picker v-if="item.type === 'DateTime'" type='datetime' v-model="searchData[item.prop]" <el-date-picker v-if="item.type === 'DateTime'" type='datetime' v-model="searchData[item.prop]"
:disabled="item.disable && item.disable(searchData[item.prop])" clearable :placeholder="item.placeholder || '请选择'"></el-date-picker> :disabled="item.disable && item.disable(searchData[item.prop])" clearable
:placeholder="item.placeholder || '请选择'"></el-date-picker>
<!-- 滑块 --> <!-- 滑块 -->
<!-- <el-slider v-if="item.type==='Slider'" v-model="searchData[item.prop]"></el-slider> --> <!-- <el-slider v-if="item.type==='Slider'" v-model="searchData[item.prop]"></el-slider> -->
<!-- 开关 --> <!-- 开关 -->
<el-switch v-if="item.type === 'Switch'" v-model="searchData[item.prop]"></el-switch> <el-switch v-if="item.type === 'Switch'" v-model="searchData[item.prop]"></el-switch>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :xs="{span: 24}" :sm="{span: 24}" :md="{span: 12}" :lg="{span: 8}" :xl="{span: 6}"> <el-col :xs="24" :sm="24" :md="formList.length > 1 ? 24 : 12" :lg="formList.length > 2 ? 24 : 8"
:xl="formList.length > 3 ? 24 : 6">
<div class="searchForm_options">
<el-button type="primary" @click="searchHandle">查询</el-button>
<el-button @click="resetFields">重置</el-button>
<slot name="searchFormOptions"></slot>
<template v-if="searchForm.length > 5">
<el-button v-show="!isOpen" type="text" icon="el-icon-arrow-down"
@click="toggleForm">展开</el-button>
<el-button v-show="isOpen" type="text" icon="el-icon-arrow-up"
@click="toggleForm">收起</el-button>
</template>
</div>
</el-col>
<!-- <el-col :xs="{span: 24}" :sm="{span: 24}" :md="{span: 12}" :lg="{span: 8}" :xl="{span: 6}">
<el-form-item style="display: flex;justify-content: flex-start;"> <el-form-item style="display: flex;justify-content: flex-start;">
<div style="display: flex;"> <div style="display: flex;">
<el-button type="primary" @click="searchHandle">查询</el-button> <el-button type="primary" @click="searchHandle">查询</el-button>
<el-button @click="resetFields">重置</el-button> <el-button @click="resetFields">重置</el-button>
<slot name="searchFormOptions"></slot> <slot name="searchFormOptions"></slot>
<!-- <el-button v-if="!isOpen" type="text" icon="el-icon-arrow-down" <template v-if="searchForm.length > 5">
@click="toggleForm">展开</el-button> <el-button v-show="!isOpen" type="text" icon="el-icon-arrow-down"
<el-button v-else type="text" icon="el-icon-arrow-up" @click="toggleForm">展开</el-button>
@click="toggleForm">收起</el-button> --> <el-button v-show="isOpen" type="text" icon="el-icon-arrow-up"
@click="toggleForm">收起</el-button>
</template>
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
...@@ -86,11 +107,13 @@ export default { ...@@ -86,11 +107,13 @@ export default {
isOpen: false isOpen: false
}; };
}, },
mounted() { computed: {
// if(this.searchForm.length > 2) { formList() {
// this.searchForm = this.searchForm.slice(0, 2); if (this.searchForm.length > 5) {
// this.isOpen = false; return !this.isOpen ? this.searchForm.slice(0, 5) : this.searchForm
// } }
return this.searchForm
}
}, },
methods: { methods: {
// 查询 // 查询
...@@ -114,7 +137,8 @@ export default { ...@@ -114,7 +137,8 @@ export default {
<style lang="scss"> <style lang="scss">
.search_form { .search_form {
margin-bottom: 16px; margin-bottom: 16px;
padding: 24px 24px 0; // padding: 24px 24px 0;
padding: 24px;
background: #fff; background: #fff;
.search_form_box { .search_form_box {
...@@ -127,11 +151,25 @@ export default { ...@@ -127,11 +151,25 @@ export default {
padding-right: 10px; padding-right: 10px;
} }
.el-select, .el-date-editor.el-input { .el-select,
.el-date-editor.el-input {
width: 100%; width: 100%;
} }
.el-input__inner { .el-input__inner {
border-radius: 0; border-radius: 0;
} }
}</style>
\ No newline at end of file .searchForm_options {
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
&>.el-button {
padding-top: 8px;
padding-bottom: 8px;
}
}
}
</style>
\ No newline at end of file
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
<h3 class="title">主题色</h3> <h3 class="title">主题色</h3>
<div class="theme-color"> <div class="theme-color">
<div class="theme-color-content"> <div class="theme-color-content">
<div class="theme-color-block" v-for="(color, index) in colorList" :key="index" <div class="theme-color-block" v-for="(item, index) in colorList" :key="index"
:style="{ backgroundColor: color }" @click="themeClick(color)"> :style="{ backgroundColor: item.color }" @click="themeClick(item)">
<span class="themeicon-check" v-if="currentColor === color"> <span class="themeicon-check" v-if="currentTheme.color === item.color">
<i class="el-icon-check"></i> <i class="el-icon-check"></i>
</span> </span>
</div> </div>
...@@ -35,17 +35,25 @@ export default { ...@@ -35,17 +35,25 @@ export default {
data() { data() {
return { return {
isOpen: false, isOpen: false,
currentColor: sessionStorage.getItem('theme'), currentTheme: {},
colorList: themeList.list.slice(0, 4) colorList: themeList.list.slice(0, 4)
} }
}, },
mounted() {
try {
let theme = JSON.parse(sessionStorage.getItem("theme"));
this.currentTheme = theme
} catch (error) {
console.log(error)
}
},
methods: { methods: {
openSetting() { openSetting() {
this.isOpen = true this.isOpen = true
}, },
themeClick(color) { themeClick(theme) {
this.currentColor = color this.currentTheme = theme
changeTheme(this.currentColor) changeTheme(this.currentTheme)
} }
} }
} }
...@@ -60,8 +68,8 @@ export default { ...@@ -60,8 +68,8 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 48px; width: 40px;
height: 48px; height: 40px;
font-size: 16px; font-size: 16px;
text-align: center; text-align: center;
background-color: var(--primary-color); background-color: var(--primary-color);
......
...@@ -50,12 +50,12 @@ export default { ...@@ -50,12 +50,12 @@ export default {
}, },
}; };
</script> </script>
<style>
<style scoped>
.my_tooltip { .my_tooltip {
max-width: 80%; max-width: 80%;
} }
</style>
<style scoped>
.text-wrap { .text-wrap {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
......
...@@ -260,7 +260,8 @@ export default { ...@@ -260,7 +260,8 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.images-list { .images-list {
display: inline-block;
vertical-align: top;
// border: 1px dashed #d5d5d5; // border: 1px dashed #d5d5d5;
// padding: 10px; // padding: 10px;
// border-radius: 4px; // border-radius: 4px;
......
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
// 资源包订购详情 // 资源包订购详情
getPayInfo() { getPayInfo() {
let params = { let params = {
amount: this.inputMoney * 100 amount: this.inputMoney * 1
} }
if (this.tradeNo) { if (this.tradeNo) {
// 如果从充值记录发起支付 // 如果从充值记录发起支付
......
...@@ -3,12 +3,11 @@ ...@@ -3,12 +3,11 @@
<el-dialog title="修改" :visible.sync="dialogFormVisible" center> <el-dialog title="修改" :visible.sync="dialogFormVisible" center>
<el-form :model="form"> <el-form :model="form">
<el-form-item label="配置类型:" :label-width="formLabelWidth"> <el-form-item label="配置类型:" :label-width="formLabelWidth">
<el-input v-model="form.min" style="width:65%;" readonly></el-input> <el-input v-model="form.min" style="width:65%;"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="内容:" :label-width="formLabelWidth"> <el-form-item label="内容:" :label-width="formLabelWidth">
<quill-editor v-if="form.conditionFrom == 'xieyi'" ref="myTextEditor" v-model="form.value" <quill-editor v-if="form.conditionFrom == 'xieyi'" ref="myTextEditor" v-model="form.value"
:options="quillOption" :options="quillOption" style="width: 72%;">
style="padding-bottom: 50px;height: 300px;width: 72%;display: inline-table;margin-bottom: 60px;">
</quill-editor> </quill-editor>
<div v-else-if="form.conditionFrom == 'image'"> <div v-else-if="form.conditionFrom == 'image'">
<!-- <el-upload class="avatar-uploader" v-model="form.value" <!-- <el-upload class="avatar-uploader" v-model="form.value"
...@@ -205,8 +204,6 @@ export default { ...@@ -205,8 +204,6 @@ export default {
this.dataSelect() this.dataSelect()
} }
}) })
} else {
this.$message.error(data.msg)
} }
}) })
}, },
......
export const xitongList = [
{
title: '后台服务名称',
type: 'platName',
value: ''
},
{
title: '海报邀请语',
type: 'posterDesc',
value: ''
},
// {
// title: '推广佣金',
// type: 'distributeAwardsRate',
// value: ''
// },
// {
// title: '邀请收益数据 1模拟 2真实',
// type: 'distributeDataModel',
// value: ''
// },
{
title: '客服微信号',
type: 'kefuWechat',
value: ''
},
{
title: '下单须知',
type: 'orderAlarmDesc',
value: ''
},
]
export const duanxinList = [
{
title: '短信签名',
type: 'smsSignHeader',
value: ''
},
{
title: '短信服务商 (1 腾讯云 2阿里云)',
type: 'smsChannel',
value: ''
},
{
title: '腾讯云短信 clientId',
type: 'smsTencentClientId',
value: ''
},
{
title: '腾讯云短信 clientSecret',
type: 'smsTencentClientSecret',
value: ''
},
{
title: '阿里云耗材模板申请',
type: 'smsAliyunCodeCQ',
value: ''
},
{
title: '阿里云运单超重补缴通知',
type: 'smsAliyunCodeCZ',
value: ''
},
{
title: '阿里云登陆或注册模板 code(开启阿里云短信必须配置)',
type: 'smsAliyunCodeRegister',
value: ''
},
{
title: '阿里云找回密码模板 code(开启阿里云短信必须配置)',
type: 'smsAliyunCodeForget',
value: ''
},
{
title: '阿里云绑定手机号模板 code(开启阿里云短信必须配置)',
type: 'smsAliyunCodeBind',
value: ''
},
{
title: '阿里云短信accesssKeyId',
type: 'smsAliyunAccessKeyId',
value: ''
},
{
title: '阿里云短信accesssSecret',
type: 'smsAliyunAccessSecret',
value: ''
},
{
title: '短信宝smsDXBClientId',
type: 'smsDXBClientId',
value: ''
},
{
title: '短信宝smsDXBClientSecret',
type: 'smsDXBClientSecret',
value: ''
},
]
export const fuwufeiList = [
{
title: '提现低额度',
type: 'cashOutMix',
value: ''
},
{
title: '最高提现金额',
type: 'cashOutMax',
value: ''
},
]
export const vipList = [
{
title: '会员固定折扣',
type: 'vipDiscount',
value: ''
},
{
title: '会员开通费用',
type: 'vipPrice',
value: ''
},
{
title: '会员开通时长(月)',
type: 'vipTimes',
value: ''
},
{
title: '会员首单减免',
type: 'vipFirstOrderDiscount',
value: ''
},
]
export const yhqList = [
{
title: '新人优惠券',
type: 'couponNewUserCouponId',
value: ''
},
]
export const weixinList = [
{
title: '微信公众号APPID',
type: 'wxOfficialAppid',
value: ''
},
{
title: '微信公众号秘钥',
type: 'wxOfficialEncodingAESKey',
value: ''
},
{
title: '公众号Token',
type: 'wxOfficialSecret',
value: ''
},
{
title: '公众号EncodingAESKey',
type: 'wxOfficialEncodingAESKey',
value: ''
},
{
title: '微信小程序APPID',
type: 'wxLiteAppid',
value: ''
},
{
title: '微信小程序秘钥',
type: 'wxLiteSecret',
value: ''
},
{
title: '微信商户key',
type: 'weixinPayKey',
value: ''
},
{
title: '微信商户号mchId',
type: 'weixinPayMchId',
value: ''
},
{
title: '微信证书地址',
type: 'weixinPayCertPath',
value: ''
},
{
title: '订单状态更新提醒',
type: 'wxTemplateOrderStatueChange',
value: ''
},
{
title: '微信证书序列号',
type: 'weixinPaySerialNo',
value: ''
},
{
title: '微信秘钥证书地址',
type: 'weixinPayPrivateKeyPath',
value: ''
},
{
title: '微信提现方式 1新版 2旧版',
type: 'weixinTransType',
value: ''
},
]
export const kefuList = [
{
title: '客服链接',
type: 'wxKefuUrl',
value: ''
},
{
title: '客服AppId',
type: 'wxKefuAppid',
value: ''
},
{
title: '客服跳转方式(1,企业微信,2,打电话,3,客服二维码)',
type: 'KefuChannel',
value: ''
},
{
title: '客服电话',
type: 'KefuPhone',
value: ''
},
]
export const kaiguanList = [
{
title: '登录是否获取手机号',
type: 'loginNeedPhone',
value: ''
},
{
title: '是否开启微信提现',
type: 'weixinTransOpen',
value: ''
},
{
title: '小程序是否上架',
type: 'mpOpen',
value: ''
},
]
export const imageList = [
{
title: '客服二维码',
type: 'kefuQrcode',
value: ''
},
{
title: '公众号二维码',
type: 'wxOfficialQrcode',
value: ''
},
{
title: '公众号图标',
type: 'wxOfficialLogo',
value: ''
},
{
title: '会员权益图',
type: 'vipBenefitPic',
value: ''
},
]
export const gongzhonghaoList = [
{
title: '公众号名称',
type: 'wxOfficialName',
value: ''
},
{
title: '公众号描述',
type: 'wxOfficialDesc',
value: ''
},
{
title: '公众号跳转地址',
type: 'wxOfficialJumpUrl',
value: ''
},
]
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="table_option_btns"> <div class="table_option_btns">
<el-button class="btn" type="primary" @click="refresh">刷新</el-button> <el-button class="btn" type="primary" @click="refresh">刷新</el-button>
</div> </div>
<el-table v-loading="loading" :data="data"> <el-table v-loading="loading" :data="tableData">
<!-- <el-table-column prop="type" label="编号" align="center" width="80"> <!-- <el-table-column prop="type" label="编号" align="center" width="80">
</el-table-column> --> </el-table-column> -->
<el-table-column prop="min" label="类型" width="250"> <el-table-column prop="min" label="类型" width="250">
...@@ -23,11 +23,19 @@ ...@@ -23,11 +23,19 @@
</el-table-column> </el-table-column>
<el-table-column prop="createAt" label="创建时间" width="180"> <el-table-column prop="createAt" label="创建时间" width="180">
</el-table-column> </el-table-column>
<el-table-column label="操作" prop="id" width="120"> <el-table-column label="操作" prop="id" width="120"
v-if="isAuth(settingType == 'platform' ? 'sysSetting:update' : 'allocationList:update') || isAuth(settingType == 'platform' ? 'sysSetting:delete' : 'allocationList:delete')">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" :disabled="!isAuth('sysSetting:update')" <el-button size="mini" type="primary"
:disabled="!isAuth(settingType == 'platform' ? 'sysSetting:update' : 'allocationList:update')"
@click="amend(scope.$index, scope.row)">编辑 @click="amend(scope.$index, scope.row)">编辑
</el-button> </el-button>
<!-- <el-popconfirm title="确定删除这一项配置吗?" @confirm="amendDel(scope.$index, scope.row)"
v-if="isAuth(settingType == 'platform' ? 'sysSetting:delete' : 'allocationList:delete')">
<el-button slot="reference" size="mini" type="danger"
:disabled="!isAuth(settingType == 'platform' ? 'sysSetting:delete' : 'allocationList:delete')">删除
</el-button>
</el-popconfirm> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -39,6 +47,8 @@ ...@@ -39,6 +47,8 @@
<script> <script>
import sysSetDialog from '@/components/sysSetDialog' import sysSetDialog from '@/components/sysSetDialog'
import TooltipText from '@/components/Tooltip' import TooltipText from '@/components/Tooltip'
import { duanxinList, yhqList, vipList, weixinList, xitongList, kefuList, kaiguanList, imageList, gongzhonghaoList } from './data'
import moment from 'moment'
export default { export default {
props: { props: {
tabName: { tabName: {
...@@ -53,6 +63,11 @@ export default { ...@@ -53,6 +63,11 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
// 平台配置or系统配置
settingType: {
type: String,
default: ''
}
}, },
components: { components: {
sysSetDialog, sysSetDialog,
...@@ -67,12 +82,79 @@ export default { ...@@ -67,12 +82,79 @@ export default {
type: '', type: '',
couponList: [] couponList: []
}, },
tableData: []
} }
}, },
mounted() { watch: {
console.log(this.$scopedSlots, this.$slots) data: {
handler(val) {
console.log(this.tabName)
switch (this.tabName) {
case 'xitong':
this.tableData = this.dataFilter(xitongList, val, 'xitong')
break;
case 'duanxin':
this.tableData = this.dataFilter(duanxinList, val, 'duanxin')
break;
case 'yhq':
this.tableData = this.dataFilter(yhqList, val, 'yhq')
break;
case 'vip':
this.tableData = this.dataFilter(vipList, val, 'vip')
break;
case 'weixin':
this.tableData = this.dataFilter(weixinList, val, 'weixin')
break;
case 'kefu':
this.tableData = this.dataFilter(kefuList, val, 'kefu')
break;
case 'kaiguan':
this.tableData = this.dataFilter(kaiguanList, val, 'kaiguan')
break;
case 'image':
this.tableData = this.dataFilter(imageList, val, 'image')
break;
case 'gongzhonghao':
this.tableData = this.dataFilter(gongzhonghaoList, val, 'gongzhonghao')
break;
default:
this.tableData = this.data
break;
}
},
deep: true,
immediate: true
}
}, },
methods: { methods: {
// 数组过滤
dataFilter(arr1 = [], arr2 = [], name) {
let data = []
if (Array.isArray(arr1) && Array.isArray(arr2)) {
arr1.forEach((item, index) => {
let checkBool = false
arr2.forEach((item2) => {
if (item.type === item2.type) {
checkBool = true;
data.push(item2)
}
})
if (!checkBool) {
data.push({
id: null,
type: item.type,
max: null,
min: item.title,
value: '',
conditionFrom: name,
createAt: moment(new Date).format('YYYY-MM-DD HH:mm:ss')
});
}
})
}
return data
},
// 修改弹框 // 修改弹框
amend(index, rows) { amend(index, rows) {
this.form.id = rows.id; this.form.id = rows.id;
...@@ -89,6 +171,22 @@ export default { ...@@ -89,6 +171,22 @@ export default {
this.form.conditionFrom = rows.conditionFrom this.form.conditionFrom = rows.conditionFrom
this.$refs.sysSetDialogRef.dialogFormVisible = true; this.$refs.sysSetDialogRef.dialogFormVisible = true;
}, },
// 删除
amendDel(index, rows) {
this.$http({
url: this.$http.adornUrl('common/delete'),
method: 'get',
params: this.$http.adornParams({
id: rows.id,
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.$message.success('删除成功')
}
})
},
// 弹窗确认 // 弹窗确认
sysConfirm() { sysConfirm() {
//刷新表格数据 //刷新表格数据
......
...@@ -8,17 +8,66 @@ ...@@ -8,17 +8,66 @@
// import './element-#3E8EF7/index.css' // 当前主题色 // import './element-#3E8EF7/index.css' // 当前主题色
export default { export default {
list: [ list: [
'#3E8EF7', // 蓝色 {
'#0BB2D4', // 青色 color: '#3E8EF7',
'#11C26D', // 绿色 colorRgb: '62,142,247',
'#9463F7', // 紫色 },
'#17B3A3', // 蓝绿色 {
'#667AFA', // 靛青色 color: '#0BB2D4',
'#997B71', // 棕色 colorRgb: '11,178,212',
'#757575', // 灰色 },
'#EB6709', // 橙色 {
'#F74584', // 粉红色 color: '#11C26D',
'#FCB900', // 黄色 colorRgb: '17,194,109',
'#FF4C52' // 红色 },
] {
color: '#9463F7',
colorRgb: '148,99,247',
},
{
color: '#17B3A3',
colorRgb: '23,179,163',
},
{
color: '#667AFA',
colorRgb: '102,122,250',
},
{
color: '#997B71',
colorRgb: '153,123,113',
},
{
color: '#757575',
colorRgb: '117,117,117',
},
{
color: '#EB6709',
colorRgb: '235,103,9',
},
{
color: '#F74584',
colorRgb: '247,69,132',
},
{
color: '#FCB900',
colorRgb: '252,185,0',
},
{
color: '#FF4C52',
colorRgb: '255,76,82',
},
// '#3E8EF7', // 蓝色
// '#0BB2D4', // 青色
// '#11C26D', // 绿色
// '#9463F7', // 紫色
// '#17B3A3', // 蓝绿色
// '#667AFA', // 靛青色
// '#997B71', // 棕色
// '#757575', // 灰色
// '#EB6709', // 橙色
// '#F74584', // 粉红色
// '#FCB900', // 黄色
// '#FF4C52' // 红色
],
} }
...@@ -48,9 +48,13 @@ if (process.env.NODE_ENV !== "production") { ...@@ -48,9 +48,13 @@ if (process.env.NODE_ENV !== "production") {
} }
// 全局过滤器 // 全局过滤器
Vue.filter('priceFilter', function(value) { Vue.filter("priceFilter", function(value, dec = 2, div) {
return value && (typeof value === 'string' || typeof value === 'number') ? Number(value) / 100 : '' return value && (typeof value === "string" || typeof value === "number")
}) ? div
? (Number(value) / 100).toFixed(dec)
: Number(value).toFixed(dec)
: 0;
});
// 挂载全局 // 挂载全局
Vue.prototype.$http = httpRequest; // ajax请求方法 Vue.prototype.$http = httpRequest; // ajax请求方法
......
...@@ -402,7 +402,7 @@ router.beforeEach((to, from, next) => { ...@@ -402,7 +402,7 @@ router.beforeEach((to, from, next) => {
"color:blue" "color:blue"
); );
// router.push({name: 'login'}) // router.push({name: 'login'})
// window.location.href = store.state.domainURL + 'shoplist'; window.location.href = store.state.domainURL + 'shoplist';
}); });
} else if ( } else if (
router.options.isAddDynamicMenuRoutes || router.options.isAddDynamicMenuRoutes ||
...@@ -440,7 +440,7 @@ router.beforeEach((to, from, next) => { ...@@ -440,7 +440,7 @@ router.beforeEach((to, from, next) => {
"color:blue" "color:blue"
); );
// router.push({name: 'login'}) // router.push({name: 'login'})
// window.location.href = store.state.domainURL + 'shoplist'; window.location.href = store.state.domainURL + 'shoplist';
}); });
} }
}); });
......
...@@ -3,6 +3,10 @@ export default { ...@@ -3,6 +3,10 @@ export default {
state: { state: {
// 页面文档可视高度(随窗口改变大小) // 页面文档可视高度(随窗口改变大小)
documentClientHeight: 0, documentClientHeight: 0,
// 页面文档可视width(随窗口改变大小)
documentClientWidth: 0,
// 导航条, 布局风格, defalut(默认) / inverse(反向) // 导航条, 布局风格, defalut(默认) / inverse(反向)
navbarLayoutType: 'default', navbarLayoutType: 'default',
// 侧边栏, 布局皮肤, light(浅色) / dark(黑色) // 侧边栏, 布局皮肤, light(浅色) / dark(黑色)
...@@ -22,6 +26,9 @@ export default { ...@@ -22,6 +26,9 @@ export default {
updateDocumentClientHeight (state, height) { updateDocumentClientHeight (state, height) {
state.documentClientHeight = height state.documentClientHeight = height
}, },
updateDocumentClientWidth (state, width) {
state.documentClientWidth = width
},
updateNavbarLayoutType (state, type) { updateNavbarLayoutType (state, type) {
state.navbarLayoutType = type state.navbarLayoutType = type
}, },
......
...@@ -8,7 +8,7 @@ const cookie_pre = config.extraData.cookie.pre ...@@ -8,7 +8,7 @@ const cookie_pre = config.extraData.cookie.pre
export function getMallToken() { export function getMallToken() {
let token = let token =
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODQzMjEyNjgsIm5iZiI6MTY4NDMyMTI2OCwiZXhwIjoxNjg0OTI2MDY4LCJ0b2tlbiI6ImZkNjg2MGE4OTkwNTA4N2MwYjc4NzYxZWJmYzNiNDA3IiwiYnRva2VuIjoiZmQ2ODYwYTg5OTA1MDg3YzBiNzg3NjFlYmZjM2I0MDciLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIzMiIsIm5hbWUiOiIxNTEwMDAwMDAwMCIsInBob25lIjoiMTUxMDAwMDAwMDAiLCJzb3VyY2UiOiJwYyIsImluZHVzdHJ5X2lkIjoiMSIsImluZHVzdHJ5X2FsaWFzIjoic3RvcmUiLCJpbmR1c3RyeV9sZXZlbF9pZCI6IjIwMCIsImluZHVzdHJ5X2xldmVsX2FsaWFzIjoia3VhaWRpIiwic2hvcF9pZCI6IjE2IiwibXRva2VuIjoiZGE4MGJmZDk3NDA3MmMyNGJiMWQ1OWRlMDc3YmFkYzYiLCJ0eXBlIjoic3RvcmUiLCJ0aGlyZF9hcHBpZCI6IiIsImN1cnJlbnRfYnRva2VuIjoiZmQ2ODYwYTg5OTA1MDg3YzBiNzg3NjFlYmZjM2I0MDciLCJhY2NvdW50X3R5cGUiOiIxIiwiYWNjb3VudF9yb2xlcyI6WyJtYXN0ZXIiXSwic3dpdGNoX3RpbWUiOjE2ODQzMjE1NzB9.HdfzIIenGOOkbu2mGM3WQrvr-vr9lRJMPYnnckyBC2Y"; "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODUzMzA3MjcsIm5iZiI6MTY4NTMzMDcyNywiZXhwIjoxNjg1OTM1NTI3LCJ0b2tlbiI6ImI0M2I3OWMzYTdlMTE5Y2ZmOTYyYmQwY2Y0MTk1YTRmIiwiYnRva2VuIjoiYjQzYjc5YzNhN2UxMTljZmY5NjJiZDBjZjQxOTVhNGYiLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIxIiwibmFtZSI6IjE4NzEwODQ3MzA4IiwicGhvbmUiOiIxODcxMDg0NzMwOCIsInNvdXJjZSI6InBjIiwiaW5kdXN0cnlfaWQiOiIxIiwiaW5kdXN0cnlfYWxpYXMiOiJzdG9yZSIsImluZHVzdHJ5X2xldmVsX2lkIjoiMiIsImluZHVzdHJ5X2xldmVsX2FsaWFzIjoiYWR2YW5jZWQiLCJzaG9wX2lkIjoiMSIsIm10b2tlbiI6IjkyM2YyNjlmNTdmZGJhZWU4ZTFhMjA3ZjlmMWYyYThkIiwidHlwZSI6IiIsInRoaXJkX2FwcGlkIjoiIiwiY3VycmVudF9idG9rZW4iOiJiNDNiNzljM2E3ZTExOWNmZjk2MmJkMGNmNDE5NWE0ZiIsImFjY291bnRfdHlwZSI6IjEiLCJhY2NvdW50X3JvbGVzIjpbIm1hc3RlciJdLCJzd2l0Y2hfdGltZSI6MTY4NTMzMTAyOX0.sIu14c9lg_xop2brRmRcvNyFsxQ-JXXIV5Loq1k88LM";
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
return token; return token;
} else return getCookie("token"); } else return getCookie("token");
...@@ -32,7 +32,8 @@ export function getMallInfo() { ...@@ -32,7 +32,8 @@ export function getMallInfo() {
export function setCookie(cookie) { export function setCookie(cookie) {
if (cookie == "token") { if (cookie == "token") {
Vue.cookie.set( Vue.cookie.set(
cookie_pre + "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODM4NjI3MzIsIm5iZiI6MTY4Mzg2MjczMiwiZXhwIjoxNjg0NDY3NTMyLCJ0b2tlbiI6ImM3MWY0MjZjMTEzMjYyMjA0NzI3ZGNhZGNhNmU3NzM2IiwiYnRva2VuIjoiYzcxZjQyNmMxMTMyNjIyMDQ3MjdkY2FkY2E2ZTc3MzYiLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIyMyIsIm5hbWUiOiIxOTYwMDAwMDAwMCIsInBob25lIjoiMTk2MDAwMDAwMDAiLCJzb3VyY2UiOiJwYyIsImluZHVzdHJ5X2lkIjoiMSIsImluZHVzdHJ5X2FsaWFzIjoic3RvcmUiLCJpbmR1c3RyeV9sZXZlbF9pZCI6IjIwMCIsImluZHVzdHJ5X2xldmVsX2FsaWFzIjoia3VhaWRpIiwic2hvcF9pZCI6IjciLCJtdG9rZW4iOiIwYWI4NDQyMTgxZTdhZWM5OWY0NmIzYjg4ZTI2ZjdiNyIsInR5cGUiOiJzdG9yZSIsInRoaXJkX2FwcGlkIjoiIiwiY3VycmVudF9idG9rZW4iOiJjNzFmNDI2YzExMzI2MjIwNDcyN2RjYWRjYTZlNzczNiIsImFjY291bnRfdHlwZSI6IjEiLCJhY2NvdW50X3JvbGVzIjpbIm1hc3RlciJdLCJzd2l0Y2hfdGltZSI6MTY4Mzg2MzEyM30.2NMTgbZMsd2p_LiReRSv3nqx9yDBkbfv3AlxaxjyyzE" cookie_pre +
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODM4NjI3MzIsIm5iZiI6MTY4Mzg2MjczMiwiZXhwIjoxNjg0NDY3NTMyLCJ0b2tlbiI6ImM3MWY0MjZjMTEzMjYyMjA0NzI3ZGNhZGNhNmU3NzM2IiwiYnRva2VuIjoiYzcxZjQyNmMxMTMyNjIyMDQ3MjdkY2FkY2E2ZTc3MzYiLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIyMyIsIm5hbWUiOiIxOTYwMDAwMDAwMCIsInBob25lIjoiMTk2MDAwMDAwMDAiLCJzb3VyY2UiOiJwYyIsImluZHVzdHJ5X2lkIjoiMSIsImluZHVzdHJ5X2FsaWFzIjoic3RvcmUiLCJpbmR1c3RyeV9sZXZlbF9pZCI6IjIwMCIsImluZHVzdHJ5X2xldmVsX2FsaWFzIjoia3VhaWRpIiwic2hvcF9pZCI6IjciLCJtdG9rZW4iOiIwYWI4NDQyMTgxZTdhZWM5OWY0NmIzYjg4ZTI2ZjdiNyIsInR5cGUiOiJzdG9yZSIsInRoaXJkX2FwcGlkIjoiIiwiY3VycmVudF9idG9rZW4iOiJjNzFmNDI2YzExMzI2MjIwNDcyN2RjYWRjYTZlNzczNiIsImFjY291bnRfdHlwZSI6IjEiLCJhY2NvdW50X3JvbGVzIjpbIm1hc3RlciJdLCJzd2l0Y2hfdGltZSI6MTY4Mzg2MzEyM30.2NMTgbZMsd2p_LiReRSv3nqx9yDBkbfv3AlxaxjyyzE"
); );
} else { } else {
Vue.cookie.set(cookie); Vue.cookie.set(cookie);
......
...@@ -46,7 +46,7 @@ http.interceptors.response.use( ...@@ -46,7 +46,7 @@ http.interceptors.response.use(
onClose: () => { onClose: () => {
clearCookie(); clearCookie();
sessionStorage.clear(); sessionStorage.clear();
// window.location.href = store.state.domainURL + 'shoplist'; window.location.href = store.state.domainURL + 'shoplist';
} }
}); });
// router.push({ name: 'login' }) // router.push({ name: 'login' })
......
import elTheme from "@/element-ui-theme/index.js"; import elTheme from "@/element-ui-theme/index.js";
export function changeTheme(themeName) { export function changeTheme(themeName) {
console.log('----当前主题色----', themeName) console.log("----当前主题色----", themeName);
sessionStorage.setItem("theme", themeName); try {
let bodyEl = document.getElementsByTagName("body")[0]; sessionStorage.setItem("theme", JSON.stringify(themeName));
bodyEl.className = "theme_" + themeName.split('#')[1]; //改成相应类名 let bodyEl = document.getElementsByTagName("body")[0];
bodyEl.style.setProperty("--primary-color", themeName); let color = themeName.color || ''
let colorRgb = themeName.colorRgb || ''
if(color) {
bodyEl.className = "theme_" + color.split("#")[1]; //改成相应类名
bodyEl.style.setProperty("--primary-color", color);
bodyEl.style.setProperty("--primary-color-rgb", colorRgb);
}
} catch (error) {
console.log(error);
}
} }
export function initTheme() { export function initTheme() {
let theme = sessionStorage.getItem("theme"); sessionStorage.removeItem('theme')
if (theme) { try {
changeTheme(theme); let theme = JSON.parse(sessionStorage.getItem("theme"));
} else { if (theme) {
// 默认颜色 changeTheme(theme);
changeTheme(elTheme.list[0]); } else {
// 默认颜色
changeTheme(elTheme.list[0]);
}
} catch (error) {
console.log(error);
} }
} }
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="公众号配置" name="gongzhonghao"> <el-tab-pane label="公众号配置" name="gongzhonghao">
<el-table v-loading="tableDataLoading" :data="tableData"> <el-table v-loading="tableDataLoading" :data="tableData">
<el-table-column fixed prop="type" label="编号" align="center" width="80"> <el-table-column fixed prop="type" label="编号" align="center" width="80">
...@@ -147,9 +147,10 @@ ...@@ -147,9 +147,10 @@
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;"> style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;">
<div> <div>
<div v-if="scope.row.couponList"> <div v-if="scope.row.couponList">
<span v-for="(item,index) in scope.row.couponList">{{item.couponName}};</span> <span v-for="(item, index) in scope.row.couponList" :key="index">{{ item.couponName
}};</span>
</div> </div>
</div> </div>
<!-- <div v-else> <!-- <div v-else>
<span>{{scope.row.value}}</span> <span>{{scope.row.value}}</span>
...@@ -197,7 +198,7 @@ ...@@ -197,7 +198,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div <div
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;"> style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;">
{{scope.row.value}} {{ scope.row.value }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -222,7 +223,7 @@ ...@@ -222,7 +223,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div <div
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;"> style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;">
{{scope.row.value}}</div> {{ scope.row.value }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createAt" label="创建时间" width="180"> <el-table-column prop="createAt" label="创建时间" width="180">
...@@ -236,7 +237,7 @@ ...@@ -236,7 +237,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<!-- 修改弹框 --> <!-- 修改弹框 -->
<el-dialog title="修改" :visible.sync="dialogFormVisible" center> <el-dialog title="修改" :visible.sync="dialogFormVisible" center>
...@@ -245,29 +246,29 @@ ...@@ -245,29 +246,29 @@
<el-input v-model="form.min" style="width:65%;" readonly></el-input> <el-input v-model="form.min" style="width:65%;" readonly></el-input>
</el-form-item> </el-form-item>
<el-form-item label="内容:" :label-width="formLabelWidth"> <el-form-item label="内容:" :label-width="formLabelWidth">
<quill-editor v-if="form.conditionFrom=='xieyi' " ref="myTextEditor" v-model="form.value" <quill-editor v-if="form.conditionFrom == 'xieyi'" ref="myTextEditor" v-model="form.value"
:options="quillOption" :options="quillOption"
style="padding-bottom: 50px;height: 300px;width: 72%;display: inline-table;margin-bottom: 60px;"> style="padding-bottom: 50px;height: 300px;width: 72%;display: inline-table;margin-bottom: 60px;">
</quill-editor> </quill-editor>
<div v-else-if="form.conditionFrom=='image'"> <div v-else-if="form.conditionFrom == 'image'">
<el-upload class="avatar-uploader" v-model="form.value" <!-- <el-upload class="avatar-uploader" v-model="form.value"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false" action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
:on-success="handleAvatarSuccess1"> :on-success="handleAvatarSuccess1">
<img v-if="form.value" :src="form.value" class="avatar" style="width: 148px;height: 148px;" /> <img v-if="form.value" :src="form.value" class="avatar" style="width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i> <i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i>
</el-upload> </el-upload> -->
<upload-image v-model="form.value" @input="handleAvatarSuccess1"></upload-image>
</div> </div>
<div v-else-if="form.conditionFrom=='coupon'"> <div v-else-if="form.conditionFrom == 'coupon'">
<div <div style="height: 150px;width: 72%;border: 1px solid #efefef;border-radius: 6px;padding: 10px;">
style="height: 150px;width: 72%;border: 1px solid #efefef;border-radius: 6px;padding: 10px;"> <span v-for="(item, index) in form.couponList" style="border: 1px;margin-right: 5px;"
<span v-for="(item,index) in form.couponList" :key="index">{{ item.couponName }} <i class="el-icon-circle-close"
style="border: 1px;margin-right: 5px;">{{item.couponName}} <i @click="del(index, item)"></i> ;</span>
class="el-icon-circle-close" @click="del(index,item)"></i> ;</span>
</div> </div>
<el-button type="primary" @click="yhqbtn()" style="margin: 5px;">选择优惠券</el-button> <el-button type="primary" @click="yhqbtn()" style="margin: 5px;">选择优惠券</el-button>
</div> </div>
<div v-else-if="form.conditionFrom=='kaiguan'"> <div v-else-if="form.conditionFrom == 'kaiguan'">
<div> <div>
<el-radio-group v-model="form.value"> <el-radio-group v-model="form.value">
<el-radio label="是"></el-radio> <el-radio label="是"></el-radio>
...@@ -295,8 +296,7 @@ ...@@ -295,8 +296,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="couponPicture" label="优惠券图片"> <el-table-column prop="couponPicture" label="优惠券图片">
<template slot-scope="scope"> <template slot-scope="scope">
<img v-if="scope.row.couponPicture" :src="scope.row.couponPicture" alt="" width="40" <img v-if="scope.row.couponPicture" :src="scope.row.couponPicture" alt="" width="40" height="40">
height="40">
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="money" label="优惠券面值" width="100"> <el-table-column prop="money" label="优惠券面值" width="100">
...@@ -307,7 +307,7 @@ ...@@ -307,7 +307,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="150" fixed="right"> <el-table-column label="操作" width="150" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" @click="discuss(scope.$index,scope.row)">确认选择 <el-button size="mini" type="primary" @click="discuss(scope.$index, scope.row)">确认选择
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -323,309 +323,311 @@ ...@@ -323,309 +323,311 @@
</template> </template>
<script> <script>
import { import {
quillEditor quillEditor
} from 'vue-quill-editor' } from 'vue-quill-editor'
import 'quill/dist/quill.core.css' import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css' import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css' import 'quill/dist/quill.bubble.css'
import quillConfig from '../locality/quill-config.js' import quillConfig from '../locality/quill-config.js'
export default { import UploadImage from '@/components/UploadImage'
name: 'news', export default {
components: { name: 'news',
quillEditor components: {
}, quillEditor,
data() { UploadImage
return { },
openValue: '是', data() {
closeValue: '否', return {
limit: 10, openValue: '是',
page: 0, closeValue: '否',
size1: 10, limit: 10,
page1: 1, page: 0,
size1: 10,
page1: 1,
min: '',
value: '',
id: '',
couponList: [],
condition: 'xitong',
activeName: 'first',
dialogFormVisible: false,
dialogFormVisible1: false,
tableDataLoading: true,
formLabelWidth: '200px',
form: {
id: '',
min: '', min: '',
value: '', value: '',
id: '', type: '',
couponList: [], couponList: []
condition: 'xitong',
activeName: 'first',
dialogFormVisible: false,
dialogFormVisible1: false,
tableDataLoading: true,
formLabelWidth: '200px',
form: {
id: '',
min: '',
value: '',
type: '',
couponList: []
},
form2: {
id: '',
min: '',
value: '',
type: '',
},
values: [{
value: 1,
label: '是'
},
{
value: 2,
label: '否'
}
],
tableData: [],
checkBoxData: [], //多选框选择的值
quillOption: quillConfig,
dialogFormVisibleYhq: false,
tableDataYhq:{},
tableDataLoadingY:false,
}
},
methods: {
handleSizeChange(val) {
this.size1 = val;
this.yhqSelect();
}, },
handleCurrentChange(val) { form2: {
this.page1 = val; id: '',
this.yhqSelect(); min: '',
}, value: '',
handleClick(tab, event) { type: '',
if (tab._props.label == '全局系统配置') {
this.condition = 'xitong'
this.dataSelect()
}
if (tab._props.label == '服务费配置') {
this.condition = 'fuwufei'
this.dataSelect()
}
if (tab._props.label == '首页配置') {
this.condition = 'shouye'
this.dataSelect()
}
if (tab._props.label == '微信配置') {
this.condition = 'weixin'
this.dataSelect()
}
if (tab._props.label == '支付宝配置') {
this.condition = 'zhifubao'
this.dataSelect()
}
if (tab._props.label == '短信配置') {
this.condition = 'duanxin'
this.dataSelect()
}
if (tab._props.label == '任务系统配置') {
this.condition = 'renwu'
this.dataSelect()
}
if (tab._props.label == '公众号配置') {
this.condition = 'gongzhonghao'
this.dataSelect()
}
if (tab._props.label == '会员配置') {
this.condition = 'vip'
this.dataSelect()
}
if (tab._props.label == '协议配置') {
this.condition = 'xieyi'
this.dataSelect()
}
if (tab._props.label == '图片配置') {
this.condition = 'image'
this.dataSelect()
}
if (tab._props.label == '客服配置') {
this.condition = 'kefu'
this.dataSelect()
}
if (tab._props.label == '开关配置') {
this.condition = 'kaiguan'
this.dataSelect()
}
if (tab._props.label == '优惠券配置') {
this.condition = 'coupon'
this.dataSelect()
}
}, },
// 修改弹框 values: [{
amend(index, rows) { value: 1,
this.dialogFormVisible = true; label: '是'
this.form.id = rows.id;
this.form.type = rows.type
this.form.min = rows.min;
this.form.value = rows.value;
this.form.max = rows.max;
this.form.createAt = rows.createAt;
if (rows.couponList) {
this.form.couponList = rows.couponList
}else{
this.form.couponList = []
}
this.form.conditionFrom = rows.conditionFrom
}, },
// 修改 {
amendNoticeTo() { value: 2,
if (this.form.conditionFrom=='coupon') { label: '否'
this.values = [] }
for (var i in this.form.couponList) { ],
this.values.push(this.form.couponList[i].couponId) tableData: [],
} checkBoxData: [], //多选框选择的值
this.form.value = this.values.toString() quillOption: quillConfig,
dialogFormVisibleYhq: false,
tableDataYhq: {},
tableDataLoadingY: false,
}
},
methods: {
handleSizeChange(val) {
this.size1 = val;
this.yhqSelect();
},
handleCurrentChange(val) {
this.page1 = val;
this.yhqSelect();
},
handleClick(tab, event) {
if (tab._props.label == '全局系统配置') {
this.condition = 'xitong'
this.dataSelect()
}
if (tab._props.label == '服务费配置') {
this.condition = 'fuwufei'
this.dataSelect()
}
if (tab._props.label == '首页配置') {
this.condition = 'shouye'
this.dataSelect()
}
if (tab._props.label == '微信配置') {
this.condition = 'weixin'
this.dataSelect()
}
if (tab._props.label == '支付宝配置') {
this.condition = 'zhifubao'
this.dataSelect()
}
if (tab._props.label == '短信配置') {
this.condition = 'duanxin'
this.dataSelect()
}
if (tab._props.label == '任务系统配置') {
this.condition = 'renwu'
this.dataSelect()
}
if (tab._props.label == '公众号配置') {
this.condition = 'gongzhonghao'
this.dataSelect()
}
if (tab._props.label == '会员配置') {
this.condition = 'vip'
this.dataSelect()
}
if (tab._props.label == '协议配置') {
this.condition = 'xieyi'
this.dataSelect()
}
if (tab._props.label == '图片配置') {
this.condition = 'image'
this.dataSelect()
}
if (tab._props.label == '客服配置') {
this.condition = 'kefu'
this.dataSelect()
}
if (tab._props.label == '开关配置') {
this.condition = 'kaiguan'
this.dataSelect()
}
if (tab._props.label == '优惠券配置') {
this.condition = 'coupon'
this.dataSelect()
}
},
// 修改弹框
amend(index, rows) {
this.dialogFormVisible = true;
this.form.id = rows.id;
this.form.type = rows.type
this.form.min = rows.min;
this.form.value = rows.value;
this.form.max = rows.max;
this.form.createAt = rows.createAt;
if (rows.couponList) {
this.form.couponList = rows.couponList
} else {
this.form.couponList = []
}
this.form.conditionFrom = rows.conditionFrom
},
// 修改
amendNoticeTo() {
if (this.form.conditionFrom == 'coupon') {
this.values = []
for (var i in this.form.couponList) {
this.values.push(this.form.couponList[i].couponId)
} }
this.$http({ this.form.value = this.values.toString()
url: this.$http.adornUrl('common/update'), }
method: 'post', this.$http({
data: this.$http.adornData({ url: this.$http.adornUrl('common/update'),
'id': this.form.id, method: 'post',
'type': this.form.type, data: this.$http.adornData({
'value': this.form.value, 'id': this.form.id,
'min': this.form.min, 'type': this.form.type,
'max': this.form.max, 'value': this.form.value,
'createAt': this.form.createAt, 'min': this.form.min,
'conditionFrom': this.form.conditionFrom 'max': this.form.max,
}) 'createAt': this.form.createAt,
}).then(({ 'conditionFrom': this.form.conditionFrom
data
}) => {
if (data && data.code === 0) {
this.dialogFormVisible = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message.error(data.msg)
}
}) })
}, }).then(({
// 修改首页 data
amendWhether(index, rows) { }) => {
this.dialogFormVisible1 = true; if (data && data.code === 0) {
this.form2.id = rows.id; this.dialogFormVisible = false
this.form2.type = rows.type this.$message({
this.form2.min = rows.min; message: '操作成功',
this.form2.value = rows.value; type: 'success',
this.form2.max = rows.max; duration: 1500,
this.form2.createAt = rows.createAt; onClose: () => {
this.form2.conditionFrom = rows.conditionFrom this.dataSelect()
}, }
WhetherNoticeTo() {
this.$http({
url: this.$http.adornUrl('common/update'),
method: 'post',
data: this.$http.adornData({
'id': this.form2.id,
'type': this.form2.type,
'value': this.form2.value,
'min': this.form2.min,
'max': this.form2.max,
'createAt': this.form2.createAt,
'conditionFrom': this.form2.conditionFrom
}) })
}).then(({ } else {
data this.$message.error(data.msg)
}) => { }
if (data && data.code === 0) { })
},
this.$message({ // 修改首页
message: '操作成功', amendWhether(index, rows) {
type: 'success', this.dialogFormVisible1 = true;
duration: 1500, this.form2.id = rows.id;
onClose: () => { this.form2.type = rows.type
this.dataSelect() this.form2.min = rows.min;
this.dialogFormVisible1 = false this.form2.value = rows.value;
} this.form2.max = rows.max;
}) this.form2.createAt = rows.createAt;
} else { this.form2.conditionFrom = rows.conditionFrom
this.$message.error(data.msg) },
} WhetherNoticeTo() {
}) this.$http({
}, url: this.$http.adornUrl('common/update'),
// 获取数据列表 method: 'post',
dataSelect() { data: this.$http.adornData({
this.tableDataLoading = true 'id': this.form2.id,
this.$http({ 'type': this.form2.type,
url: this.$http.adornUrl(`common/type/condition/${this.condition}`), 'value': this.form2.value,
method: 'get', 'min': this.form2.min,
params: this.$http.adornParams({}) 'max': this.form2.max,
}).then(({ 'createAt': this.form2.createAt,
data 'conditionFrom': this.form2.conditionFrom
}) => {
if (data && data.code === 0) {
this.tableDataLoading = false
let returnData = data.data;
this.tableData = returnData
}
}) })
}, }).then(({
handleAvatarSuccess1(file, fileList) { data
this.form.value = file.data }) => {
}, if (data && data.code === 0) {
// 点击获取优惠券
yhqbtn() { this.$message({
console.log('this.couponList', this.form.couponList) message: '操作成功',
type: 'success',
this.page1 = 1 duration: 1500,
this.yhqSelect() onClose: () => {
this.dialogFormVisibleYhq = true this.dataSelect()
}, this.dialogFormVisible1 = false
// 优惠券列表数据 }
yhqSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('admin/coupon/seleteAllCoupon'),
method: 'get',
params: this.$http.adornParams({
'page': this.page1,
'limit': this.size1
}) })
}).then(({ } else {
data this.$message.error(data.msg)
}) => { }
if (data && data.code === 0) { })
this.tableDataLoading = false },
let returnData = data.data; // 获取数据列表
this.tableDataYhq = returnData dataSelect() {
} this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl(`common/type/condition/${this.condition}`),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.tableDataLoading = false
let returnData = data.data;
this.tableData = returnData
}
})
},
handleAvatarSuccess1(file, fileList) {
this.form.value = file.data
},
// 点击获取优惠券
yhqbtn() {
console.log('this.couponList', this.form.couponList)
this.page1 = 1
this.yhqSelect()
this.dialogFormVisibleYhq = true
},
// 优惠券列表数据
yhqSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('admin/coupon/seleteAllCoupon'),
method: 'get',
params: this.$http.adornParams({
'page': this.page1,
'limit': this.size1
}) })
}, }).then(({
refresh() { data
this.page1 = 1 }) => {
this.yhqSelect() if (data && data.code === 0) {
}, this.tableDataLoading = false
// 确认选择 let returnData = data.data;
discuss(index, row) { this.tableDataYhq = returnData
// this.values.push(row.couponId) }
this.form.couponList.push(row) })
this.dialogFormVisibleYhq = false
},
del(index, row) {
// this.values.splice(index,1)
this.form.couponList.splice(index, 1)
},
}, },
mounted() { refresh() {
this.dataSelect() this.page1 = 1
} this.yhqSelect()
},
// 确认选择
discuss(index, row) {
// this.values.push(row.couponId)
this.form.couponList.push(row)
this.dialogFormVisibleYhq = false
},
del(index, row) {
// this.values.splice(index,1)
this.form.couponList.splice(index, 1)
},
},
mounted() {
this.dataSelect()
} }
}
</script> </script>
<style scoped="scoped"> <style scoped="scoped">
.eit { .eit {
height: 120px; height: 120px;
} }
</style> </style>
<template> <template>
<div> <div>
<search-form :labelWidth="'100px'" :searchForm="formItems" :searchData="searchData" <search-form :labelWidth="'100px'" :searchForm="formItems" :searchData="searchData" @search="serachHandle">
@search="serachHandle"></search-form> <template slot="searchFormOptions">
<el-button size="mini" type="primary" :disabled="!isAuth('couponissue:add')" @click="amend()">添加
</el-button>
</template>
</search-form>
<el-table :key="activeName" v-loading="tableDataLoading" :data="tableData.list"> <el-table :key="activeName" v-loading="tableDataLoading" :data="tableData.list">
<!-- ele 暂无数据插槽 --> <!-- ele 暂无数据插槽 -->
<template slot="empty"> <template slot="empty">
...@@ -65,7 +69,7 @@ ...@@ -65,7 +69,7 @@
<el-input v-model="form.couponIssueName" style="width:65%;" placeholder="请输入券包名称"></el-input> <el-input v-model="form.couponIssueName" style="width:65%;" placeholder="请输入券包名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="券包图片:" :label-width="formLabelWidth"> <el-form-item label="券包图片:" :label-width="formLabelWidth">
<div <!-- <div
style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;display: inline-block;"> style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;display: inline-block;">
<el-upload class="avatar-uploader" v-model="form.couponIssueImage" <el-upload class="avatar-uploader" v-model="form.couponIssueImage"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false" action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
...@@ -74,10 +78,11 @@ ...@@ -74,10 +78,11 @@
style="width: 148px;height: 148px;" /> style="width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i> <i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i>
</el-upload> </el-upload>
</div> </div> -->
<upload-image v-model="form.couponIssueImage" @input="handleAvatarSuccess2"></upload-image>
</el-form-item> </el-form-item>
<el-form-item label="主页图:" :label-width="formLabelWidth" v-if="classify == 2"> <el-form-item label="主页图:" :label-width="formLabelWidth" v-if="classify == 2">
<div <!-- <div
style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;display: inline-block;"> style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;display: inline-block;">
<el-upload class="avatar-uploader" v-model="form.couponContentImage" <el-upload class="avatar-uploader" v-model="form.couponContentImage"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false" action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
...@@ -86,7 +91,8 @@ ...@@ -86,7 +91,8 @@
style="width: 148px;height: 148px;" /> style="width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i> <i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i>
</el-upload> </el-upload>
</div> </div> -->
<upload-image v-model="form.couponContentImage" @input="handleUploadSuccess"></upload-image>
<!-- <div class="imgs" v-for="(item,index) in couponContentImage" :key="index"> <!-- <div class="imgs" v-for="(item,index) in couponContentImage" :key="index">
<img width="100%" class="images" height="100%" :src="item" alt=""> <img width="100%" class="images" height="100%" :src="item" alt="">
<span class="dels"> <span class="dels">
...@@ -137,7 +143,7 @@ ...@@ -137,7 +143,7 @@
</el-form-item> </el-form-item>
<el-form-item label="购买须知:" :label-width="formLabelWidth" v-if="classify == 2"> <el-form-item label="购买须知:" :label-width="formLabelWidth" v-if="classify == 2">
<quill-editor ref="myTextEditor" v-model="form.payNotice" :options="quillOption" <quill-editor ref="myTextEditor" v-model="form.payNotice" :options="quillOption"
style="padding-bottom: 50px;height: 300px;width: 72%;display: inline-table;"> style="width: 65%;">
</quill-editor> </quill-editor>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -204,6 +210,7 @@ ...@@ -204,6 +210,7 @@
<script> <script>
import SearchForm from '@/components/SearchForm' import SearchForm from '@/components/SearchForm'
import quillConfig from '../../locality/quill-config' import quillConfig from '../../locality/quill-config'
import UploadImage from '@/components/UploadImage'
export default { export default {
props: { props: {
activeName: { activeName: {
...@@ -211,11 +218,11 @@ export default { ...@@ -211,11 +218,11 @@ export default {
default: 'huodong' default: 'huodong'
}, },
}, },
components: { SearchForm }, components: { SearchForm, UploadImage },
watch: { watch: {
activeName: { activeName: {
handler(val) { handler(val) {
if(val == 'huodong') { if (val == 'huodong') {
this.dataSelect() this.dataSelect()
} }
}, },
...@@ -512,7 +519,7 @@ export default { ...@@ -512,7 +519,7 @@ export default {
} }
} }
if (this.titles == '添加') { if (this.titles == '新增') {
var url = 'couponIssue/insertCouponIssue' var url = 'couponIssue/insertCouponIssue'
} else { } else {
var url = 'couponIssue/updateCouponIssue' var url = 'couponIssue/updateCouponIssue'
......
...@@ -58,10 +58,19 @@ export default { ...@@ -58,10 +58,19 @@ export default {
type: String, type: String,
default: 'kami' default: 'kami'
}, },
isShow: {
type: Boolean,
default: false
}
}, },
components: { SearchForm }, components: { SearchForm },
watch: { watch: {
couponCardTypeId(val) { // couponCardTypeId(val) {
// if (val) {
// this.serachHandle()
// }
// },
isShow(val) {
if (val) { if (val) {
this.serachHandle() this.serachHandle()
} }
......
<template> <template>
<div> <div>
<search-form :labelWidth="'100px'" :searchForm="formItems" :searchData="searchData" <search-form :labelWidth="'100px'" :searchForm="formItems" :searchData="searchData" @search="serachHandle">
@search="serachHandle"></search-form> <template slot="searchFormOptions">
<el-button size="mini" type="primary" :disabled="!isAuth('couponissue:add')" @click="amend()">添加
</el-button>
</template>
</search-form>
<el-table :key="activeName" v-loading="tableDataLoading" :data="tableData.list"> <el-table :key="activeName" v-loading="tableDataLoading" :data="tableData.list">
<!-- ele 暂无数据插槽 --> <!-- ele 暂无数据插槽 -->
<template slot="empty"> <template slot="empty">
...@@ -59,13 +63,13 @@ ...@@ -59,13 +63,13 @@
</el-pagination> </el-pagination>
</div> </div>
<!-- 修改 --> <!-- 修改 -->
<el-dialog :title="titles" :visible.sync="dialogFormVisible" center width="80%"> <el-dialog :title="titles" :visible.sync="dialogFormVisible" center width="70%">
<el-form :model="form"> <el-form :model="form">
<el-form-item label="券包名称:" :label-width="formLabelWidth"> <el-form-item label="券包名称:" :label-width="formLabelWidth">
<el-input v-model="form.couponIssueName" style="width:65%;" placeholder="请输入券包名称"></el-input> <el-input v-model="form.couponIssueName" style="width:65%;" placeholder="请输入券包名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="券包图片:" :label-width="formLabelWidth"> <el-form-item label="券包图片:" :label-width="formLabelWidth">
<div <!-- <div
style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;display: inline-block;"> style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;display: inline-block;">
<el-upload class="avatar-uploader" v-model="form.couponIssueImage" <el-upload class="avatar-uploader" v-model="form.couponIssueImage"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false" action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
...@@ -74,10 +78,11 @@ ...@@ -74,10 +78,11 @@
style="width: 148px;height: 148px;" /> style="width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i> <i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i>
</el-upload> </el-upload>
</div> </div> -->
<upload-image v-model="form.couponIssueImage" @input="handleAvatarSuccess2"></upload-image>
</el-form-item> </el-form-item>
<el-form-item label="主页图:" :label-width="formLabelWidth" v-if="classify == 2"> <el-form-item label="主页图:" :label-width="formLabelWidth" v-if="classify == 2">
<div <!-- <div
style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;display: inline-block;"> style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;display: inline-block;">
<el-upload class="avatar-uploader" v-model="form.couponContentImage" <el-upload class="avatar-uploader" v-model="form.couponContentImage"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false" action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
...@@ -86,7 +91,8 @@ ...@@ -86,7 +91,8 @@
style="width: 148px;height: 148px;" /> style="width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i> <i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i>
</el-upload> </el-upload>
</div> </div> -->
<upload-image v-model="form.couponContentImage" @input="handleUploadSuccess"></upload-image>
<!-- <div class="imgs" v-for="(item,index) in couponContentImage" :key="index"> <!-- <div class="imgs" v-for="(item,index) in couponContentImage" :key="index">
<img width="100%" class="images" height="100%" :src="item" alt=""> <img width="100%" class="images" height="100%" :src="item" alt="">
<span class="dels"> <span class="dels">
...@@ -137,7 +143,7 @@ ...@@ -137,7 +143,7 @@
</el-form-item> </el-form-item>
<el-form-item label="购买须知:" :label-width="formLabelWidth" v-if="classify == 2"> <el-form-item label="购买须知:" :label-width="formLabelWidth" v-if="classify == 2">
<quill-editor ref="myTextEditor" v-model="form.payNotice" :options="quillOption" <quill-editor ref="myTextEditor" v-model="form.payNotice" :options="quillOption"
style="padding-bottom: 50px;height: 300px;width: 72%;display: inline-table;"> style="width: 65%;">
</quill-editor> </quill-editor>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -203,7 +209,12 @@ ...@@ -203,7 +209,12 @@
<script> <script>
import SearchForm from '@/components/SearchForm' import SearchForm from '@/components/SearchForm'
import quillConfig from '../../locality/quill-config' import { quillEditor } from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import quillConfig from '@/views/locality/quill-config.js'
import UploadImage from '@/components/UploadImage'
export default { export default {
props: { props: {
activeName: { activeName: {
...@@ -211,7 +222,7 @@ export default { ...@@ -211,7 +222,7 @@ export default {
default: 'shoumai' default: 'shoumai'
}, },
}, },
components: { SearchForm }, components: { quillEditor, SearchForm, UploadImage },
watch: { watch: {
activeName: { activeName: {
handler(val) { handler(val) {
...@@ -536,7 +547,7 @@ export default { ...@@ -536,7 +547,7 @@ export default {
} }
} }
if (this.titles == '添加') { if (this.titles == '新增') {
var url = 'couponIssue/insertCouponIssue' var url = 'couponIssue/insertCouponIssue'
} else { } else {
var url = 'couponIssue/updateCouponIssue' var url = 'couponIssue/updateCouponIssue'
......
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
<!-- 卡密列表 --> <!-- 卡密列表 -->
<el-dialog title="卡密列表" :visible.sync="dialogFormVisibleKm" center width="70%"> <el-dialog title="卡密列表" :visible.sync="dialogFormVisibleKm" center width="70%">
<coupon-card-seal ref="couponCardSealRef" :activeName="activeName" :couponCardTypeId="couponCardTypeId" <coupon-card-seal ref="couponCardSealRef" :activeName="activeName" :couponCardTypeId="couponCardTypeId"
:isSlot="true"></coupon-card-seal> :isSlot="true" :isShow="dialogFormVisibleKm"></coupon-card-seal>
</el-dialog> </el-dialog>
</el-tabs> </el-tabs>
</div> </div>
......
<template> <template>
<div> <div>
<sys-set-table :key="tabName" :tabName="tabName" :loading="tableDataLoading" :data="tableData" @refresh="refresh"> <sys-set-table :key="tabName" :tabName="'yhq'" :loading="tableDataLoading" :data="tableData" settingType="platform" @refresh="refresh">
<template #content slot-scope="slotProps"> <template #content slot-scope="slotProps">
<div> <div>
<span v-for="(item, index) in slotProps.scopeRow.couponList" :key="index">{{ (item && item.couponName) || '' }};</span> <span v-for="(item, index) in slotProps.scopeRow.couponList" :key="index">{{ (item && item.couponName) || '' }};</span>
......
...@@ -80,15 +80,15 @@ ...@@ -80,15 +80,15 @@
</div> </div>
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">优惠券图片:</span> <span style="width: 200px;display: inline-block;text-align: right;">优惠券图片:</span>
<div style="display: inline-block; vertical-align: top;"> <!-- <div style="display: inline-block; vertical-align: top;">
<!-- <el-upload class="avatar-uploader" v-model="couponPicture" <el-upload class="avatar-uploader" v-model="couponPicture"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false" action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
:on-success="handleAvatarSuccess1"> :on-success="handleAvatarSuccess1">
<img v-if="couponPicture" :src="couponPicture" class="avatar" style="width: 148px;height: 148px;" /> <img v-if="couponPicture" :src="couponPicture" class="avatar" style="width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i> <i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i>
</el-upload> --> </el-upload>
<upload-image v-model="couponPicture" @input="handleAvatarSuccess1"></upload-image> </div> -->
</div> <upload-image v-model="couponPicture" @input="handleAvatarSuccess1"></upload-image>
</div> </div>
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">优惠券面值:</span> <span style="width: 200px;display: inline-block;text-align: right;">优惠券面值:</span>
...@@ -128,16 +128,14 @@ ...@@ -128,16 +128,14 @@
<el-input v-model="form.couponName" style="width:65%;" placeholder="请输入优惠券名称"></el-input> <el-input v-model="form.couponName" style="width:65%;" placeholder="请输入优惠券名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="优惠券图片:" :label-width="formLabelWidth"> <el-form-item label="优惠券图片:" :label-width="formLabelWidth">
<div> <!-- <el-upload class="avatar-uploader" v-model="form.couponPicture"
<!-- <el-upload class="avatar-uploader" v-model="form.couponPicture"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false" action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
:on-success="handleAvatarSuccess2"> :on-success="handleAvatarSuccess2">
<img v-if="form.couponPicture" :src="form.couponPicture" class="avatar" <img v-if="form.couponPicture" :src="form.couponPicture" class="avatar"
style="width: 148px;height: 148px;" /> style="width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i> <i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i>
</el-upload> --> </el-upload> -->
<upload-image v-model="form.couponPicture" @input="handleAvatarSuccess2"></upload-image> <upload-image v-model="form.couponPicture" @input="handleAvatarSuccess2"></upload-image>
</div>
</el-form-item> </el-form-item>
...@@ -303,8 +301,8 @@ ...@@ -303,8 +301,8 @@
</div> </div>
<el-button style="margin-left:15px;" :disabled="userIdList.length <= 0" size="mini" type="primary" <el-button style="margin-left:15px;" :disabled="userIdList.length <= 0" size="mini" type="primary"
icon="document" @click="closes2()">确定</el-button> icon="document" @click="closes2()">确定</el-button>
<el-table ref="multipleTableRef" v-loading="tableDataLoading1" @selection-change="changeFun1" :data="userData.list" <el-table ref="multipleTableRef" v-loading="tableDataLoading1" @selection-change="changeFun1"
:row-key="(row) => { return row.userId }"> :data="userData.list" :row-key="(row) => { return row.userId }">
<el-table-column :reserve-selection="true" type="selection" fixed> <el-table-column :reserve-selection="true" type="selection" fixed>
</el-table-column> </el-table-column>
<el-table-column fixed prop="userId" label="id" width="80"> <el-table-column fixed prop="userId" label="id" width="80">
...@@ -906,15 +904,7 @@ export default { ...@@ -906,15 +904,7 @@ export default {
} }
}) })
this.dialogFormVisible0 = false this.dialogFormVisible0 = false
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => { }
})
} }
}) })
}, },
......
...@@ -40,17 +40,17 @@ ...@@ -40,17 +40,17 @@
</div> </div>
<div class="userInfoContent"> <div class="userInfoContent">
<div class="userInfoContentItem"> <div class="userInfoContentItem">
<span class="uItemTitle">{{ Number(dataInfos.balance).toFixed(2) }}</span> <span class="uItemTitle">{{ dataInfos.balance | priceFilter }}</span>
<span class="uItemDesc">账户余额</span> <span class="uItemDesc">账户余额</span>
</div> </div>
<div class="divider"></div> <div class="divider"></div>
<div class="userInfoContentItem"> <div class="userInfoContentItem">
<span class="uItemTitle">{{ Number(dataInfos.moneyUsed).toFixed(2) }}</span> <span class="uItemTitle">{{ dataInfos.moneyUsed | priceFilter }}</span>
<span class="uItemDesc">累计消耗金额</span> <span class="uItemDesc">累计消耗金额</span>
</div> </div>
<div class="divider"></div> <div class="divider"></div>
<div class="userInfoContentItem"> <div class="userInfoContentItem">
<span class="uItemTitle">{{ Number(dataInfos.moneyCharge).toFixed(2) }}</span> <span class="uItemTitle">{{ dataInfos.moneyCharge | priceFilter }}</span>
<span class="uItemDesc">累计充值金额</span> <span class="uItemDesc">累计充值金额</span>
</div> </div>
</div> </div>
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="8" v-for="(item, index) in feature" :key="index"> <el-col :span="8" v-for="(item, index) in feature" :key="index">
<el-card @click.native="() => gnClick(index)" shadow="hover" <el-card @click.native="() => gnClick(index)" shadow="hover"
:body-style="{ padding: '24px', cursor: 'pointer', textAlign: 'center' }" :body-style="{ wdith: '100px', height: '69px', lineHeight: '69px', padding: '0 5px', cursor: 'pointer', textAlign: 'center' }"
style="border-radius: 0; margin-bottom: 8px;"> style="border-radius: 0; margin-bottom: 8px;">
{{ item.title }} {{ item.title }}
</el-card> </el-card>
...@@ -143,25 +143,29 @@ ...@@ -143,25 +143,29 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24" style="display: flex;justify-content: space-between;"> <el-col :span="24" style="display: flex;justify-content: space-between;">
<el-card shadow="never" class="card-common"> <el-card shadow="never" class="card-common order_error_count"
:body-style="{ padding: 0 }">
<div class="data-title">超重总数</div> <div class="data-title">超重总数</div>
<div class="data-content">{{ dataInfos.errorSum }}</div> <div class="data-content">{{ dataInfos.errorSum }}</div>
</el-card> </el-card>
<el-card shadow="never" class="card-common"> <el-card shadow="never" class="card-common order_error_count"
:body-style="{ padding: 0 }">
<div class="data-title"> <div class="data-title">
<span class="badge—common primary"></span> <span class="badge—common primary"></span>
已处理 已处理
</div> </div>
<div class="data-content">{{ dataInfos.errorHandled }}</div> <div class="data-content">{{ dataInfos.errorHandled }}</div>
</el-card> </el-card>
<el-card shadow="never" class="card-common"> <el-card shadow="never" class="card-common order_error_count"
:body-style="{ padding: 0 }">
<div class="data-title"> <div class="data-title">
<span class="badge—common warning"></span> <span class="badge—common warning"></span>
处理中 处理中
</div> </div>
<div class="data-content">{{ dataInfos.errorHandling }}</div> <div class="data-content">{{ dataInfos.errorHandling }}</div>
</el-card> </el-card>
<el-card shadow="never" class="card-common"> <el-card shadow="never" class="card-common order_error_count"
:body-style="{ padding: 0 }">
<div class="data-title"> <div class="data-title">
<span class="badge—common danger"></span> <span class="badge—common danger"></span>
未处理 未处理
...@@ -184,7 +188,7 @@ ...@@ -184,7 +188,7 @@
<div class="grid-content"> <div class="grid-content">
<el-card shadow="never" class="card-common"> <el-card shadow="never" class="card-common">
<div slot="header" class="card_header"> <div slot="header" class="card_header">
<span class="card_title">告通知</span> <span class="card_title">告通知</span>
<el-button style="height: auto" type="text" @click="toNotice" <el-button style="height: auto" type="text" @click="toNotice"
size="small">更多</el-button> size="small">更多</el-button>
</div> </div>
...@@ -217,9 +221,10 @@ ...@@ -217,9 +221,10 @@
</div> </div>
<div class="adv_container"> <div class="adv_container">
<el-carousel :interval="4000" height="307px" v-if="bannerList && bannerList.length"> <el-carousel :interval="4000" height="307px" v-if="bannerList && bannerList.length">
<el-carousel-item style="display: flex; justify-content: center; align-items: center;" <el-carousel-item
style="display: flex; justify-content: center; align-items: center;"
v-for="(item, index) in bannerList" :key="index"> v-for="(item, index) in bannerList" :key="index">
<el-image :src="item.picUrl"></el-image> <el-image style="cursor: pointer;" :src="item.pic_url" @click="advJump(item.event_source.url)"></el-image>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
<div class="not-list" v-else>暂无广告</div> <div class="not-list" v-else>暂无广告</div>
...@@ -321,6 +326,10 @@ export default { ...@@ -321,6 +326,10 @@ export default {
this.getAdvList(); this.getAdvList();
}, },
methods: { methods: {
// 广告点击跳转
advJump(url) {
if (url) window.open(url)
},
// 功能导航点击事件 // 功能导航点击事件
gnClick(index) { gnClick(index) {
switch (index) { switch (index) {
...@@ -340,10 +349,11 @@ export default { ...@@ -340,10 +349,11 @@ export default {
this.$router.push({ name: 'dataBase' }) this.$router.push({ name: 'dataBase' })
break; break;
case 5: case 5:
this.$notify({ // this.$notify({
message: '该功能暂未开放', // message: '该功能暂未开放',
type: 'warning' // type: 'warning'
}); // });
window.open('https://support.qq.com/product/594756')
// this.$router.push({ name: 'message' }) // this.$router.push({ name: 'message' })
break; break;
} }
...@@ -389,7 +399,7 @@ export default { ...@@ -389,7 +399,7 @@ export default {
// 通知列表 // 通知列表
noticeList() { noticeList() {
let params = { let params = {
status: 1, status: 0,
page: 1, page: 1,
page_size: 10 page_size: 10
} }
...@@ -531,9 +541,9 @@ export default { ...@@ -531,9 +541,9 @@ export default {
preChargeSumDetailAPI().then(response => { preChargeSumDetailAPI().then(response => {
let res = response.data; let res = response.data;
if (res.error == 0 && res.data) { if (res.error == 0 && res.data) {
this.dataInfos.moneyCharge = res.data.moneyCharge ? res.data.moneyCharge / 100 : 0 this.dataInfos.moneyCharge = res.data.moneyCharge
this.dataInfos.balance = res.data.balance ? res.data.balance / 100 : 0 this.dataInfos.balance = res.data.balance
this.dataInfos.moneyUsed = res.data.moneyUsed ? res.data.moneyUsed / 100 : 0 this.dataInfos.moneyUsed = res.data.moneyUsed
this.dataInfos.updatedAt = res.data.updatedAt || '' this.dataInfos.updatedAt = res.data.updatedAt || ''
} }
}).finally(() => { }).finally(() => {
...@@ -543,10 +553,11 @@ export default { ...@@ -543,10 +553,11 @@ export default {
// 广告位 // 广告位
getAdvList() { getAdvList() {
let params = { let params = {
"category" : 1 "category": 1
} }
getAdvListAPI(params).then(({data: res}) => { getAdvListAPI(params).then((res) => {
if(res.error == 0 && res.data) { console.log(res)
if (res.error == 0 && res.data) {
this.bannerList = res.data.info || [] this.bannerList = res.data.info || []
} }
}) })
...@@ -659,6 +670,17 @@ export default { ...@@ -659,6 +670,17 @@ export default {
font-size: 24px; font-size: 24px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
} }
.order_error_count {
flex: 1 1 0%;
padding: 20px 2px;
display: flex;
align-items: center;
justify-content: center;
// .data-content {
// text-align: center;
// }
}
} }
// 通知 // 通知
...@@ -672,6 +694,7 @@ export default { ...@@ -672,6 +694,7 @@ export default {
.message_list { .message_list {
.message_content { .message_content {
border-bottom: 1px solid rgba(0, 0, 0, .06); border-bottom: 1px solid rgba(0, 0, 0, .06);
padding-top: 0.5em;
cursor: pointer; cursor: pointer;
.message_desc { .message_desc {
...@@ -686,6 +709,7 @@ export default { ...@@ -686,6 +709,7 @@ export default {
} }
} }
} }
.not-list { .not-list {
position: absolute; position: absolute;
text-align: center; text-align: center;
...@@ -694,10 +718,12 @@ export default { ...@@ -694,10 +718,12 @@ export default {
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
} }
.adv_container { .adv_container {
height: 307px; height: 307px;
overflow-y: auto; overflow-y: auto;
position: relative; position: relative;
.not-list { .not-list {
position: absolute; position: absolute;
text-align: center; text-align: center;
...@@ -706,5 +732,4 @@ export default { ...@@ -706,5 +732,4 @@ export default {
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
} }
} }</style>
</style>
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
getTableData() { getTableData() {
this.tableDataLoading = true this.tableDataLoading = true
let params = { let params = {
status: 1, status: 0,
page: this.page, page: this.page,
page_size: this.pageSize page_size: this.pageSize
} }
......
...@@ -8,20 +8,29 @@ ...@@ -8,20 +8,29 @@
<template slot="empty"> <template slot="empty">
<TableEmpty /> <TableEmpty />
</template> </template>
<el-table-column prop="amount" label="金额" :formatter="(row, column) => tableFormatter(row, column, null, '元')"> <el-table-column prop="orderNo" label="订单号">
<template slot-scope="scope">
<span>{{ scope.row.orderNo }}</span>
<span v-if="scope.row.orderNo" @click="copys(scope.row.orderNo)" class="copy_icon">
<i class="el-icon-document-copy"></i>
</span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="beforeAmount" label="变化前" :formatter="(row, column) => tableFormatter(row, column, null, '元')"> <el-table-column prop="amount" label="金额"
:formatter="(row, column) => tableFormatter(row, column, null, '元')">
</el-table-column> </el-table-column>
<el-table-column prop="afterAmount" label="变化后" :formatter="(row, column) => tableFormatter(row, column, null, '元')"> <el-table-column prop="beforeAmount" label="变化前"
:formatter="(row, column) => tableFormatter(row, column, null, '元')">
</el-table-column>
<el-table-column prop="afterAmount" label="变化后"
:formatter="(row, column) => tableFormatter(row, column, null, '元')">
</el-table-column> </el-table-column>
<el-table-column prop="type" label="类型"> <el-table-column prop="type" label="类型">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.type == 0"><span class="badge—common primary"></span>订单支付</span> <span v-if="scope.row.type == 1"><span class="badge—common primary"></span>订单支付</span>
<span v-if="scope.row.type == 1"><span class="badge—common"></span>订单退款</span> <span v-if="scope.row.type == 0"><span class="badge—common"></span>订单退款</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="orderNo" label="订单号">
</el-table-column>
<el-table-column prop="remark" label="备注"> <el-table-column prop="remark" label="备注">
</el-table-column> </el-table-column>
<el-table-column prop="createdAt" label="创建时间"> <el-table-column prop="createdAt" label="创建时间">
......
<template> <template>
<div class="billDayCount-view"> <div class="billDayCount-view">
<div class="news-tips"> <!-- <div class="news-tips">
<div class="tips-box"> <div class="tips-box">
<p class="info"> <p class="info">
对账单数据自2019年4月12日起更新; 对账单数据自2019年4月12日起更新;
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
净收入为收入总计金额-支出总计金额(退款支出及交易手续费支出)。 净收入为收入总计金额-支出总计金额(退款支出及交易手续费支出)。
</p> </p>
</div> </div>
</div> </div> -->
<div class="container"> <div class="container">
<el-tabs v-model="activeName" @tab-click="getData()" style="border-bottom: 1px solid #e8e8e8"> <el-tabs v-model="activeName" @tab-click="getData()" style="border-bottom: 1px solid #e8e8e8">
...@@ -50,34 +50,34 @@ ...@@ -50,34 +50,34 @@
<el-table :data="tableData" v-loading="tableDataLoading"> <el-table :data="tableData" v-loading="tableDataLoading">
<el-table-column prop="time" label="日期" fixed> <el-table-column prop="time" label="日期" fixed>
</el-table-column> </el-table-column>
<el-table-column prop="kd_order_pay" label="快递订单金额" :formatter="(row, column) => tableFormatter(row, column, null, '元')"> <el-table-column prop="kd_order_pay" label="快递订单金额(元)">
<template slot-scope="scope"> <template slot-scope="scope">
{{ (scope.row.kd_order_pay / 100).toFixed(2) }} {{ scope.row.kd_order_pay | priceFilter }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="coupon_order_pay" label="购买优惠券"> <el-table-column prop="coupon_order_pay" label="购买优惠券">
</el-table-column> </el-table-column>
<el-table-column prop="vip_order_pay" label="购买会员"> <el-table-column prop="vip_order_pay" label="购买会员">
</el-table-column> </el-table-column>
<el-table-column prop="kd_add_order_pay" label="订单补缴费用"> <el-table-column prop="kd_add_order_pay" label="订单补缴费用(元)">
</el-table-column> </el-table-column>
<el-table-column prop="refund_amount" label="退款支出" :formatter="(row, column) => tableFormatter(row, column, null, '元')"> <el-table-column prop="refund_amount" label="退款支出(元)">
<template slot-scope="scope"> <template slot-scope="scope">
{{ (scope.row.refund_amount / 100).toFixed(2) }} {{ scope.row.refund_amount | priceFilter }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="fee" label="交易手续费支出" :formatter="(row, column) => tableFormatter(row, column, null, '元')"> <el-table-column prop="fee" label="交易手续费支出(元)">
<template slot-scope="scope"> <template slot-scope="scope">
{{ (scope.row.fee / 100).toFixed(2) }} {{ scope.row.fee | priceFilter }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="income_count" label="收入条数"> <el-table-column prop="income_count" label="收入条数">
</el-table-column> </el-table-column>
<el-table-column prop="cost_count" label="退款条数"> <el-table-column prop="cost_count" label="退款条数">
</el-table-column> </el-table-column>
<el-table-column prop="income" label="总计到账金额" :formatter="(row, column) => tableFormatter(row, column, null, '元')"> <el-table-column prop="income" label="总计到账金额(元)">
<template slot-scope="scope"> <template slot-scope="scope">
{{ (scope.row.income / 100).toFixed(2) }} {{ scope.row.income | priceFilter }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -300,5 +300,4 @@ export default { ...@@ -300,5 +300,4 @@ export default {
.el-tab-pane, .el-tab-pane,
.el-button { .el-button {
/*margin-top:20px;*/ /*margin-top:20px;*/
} }</style>
</style>
...@@ -48,8 +48,7 @@ ...@@ -48,8 +48,7 @@
</el-table> </el-table>
<div style="text-align: center;margin-top: 10px;"> <div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-sizes="[5, 10, 15]" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-sizes="[5, 10, 15]"
:page-size="size" :current-page="page" layout="total,sizes, prev, pager, next,jumper" :page-size="size" :current-page="page" layout="total,sizes, prev, pager, next,jumper" :total="totalnum">
:total="totalnum">
</el-pagination> </el-pagination>
</div> </div>
<rechargePop ref="rechargePopRef" :inputMoney="money" :tradeNo="tradeNo" @success="rechargeSuccess"></rechargePop> <rechargePop ref="rechargePopRef" :inputMoney="money" :tradeNo="tradeNo" @success="rechargeSuccess"></rechargePop>
......
...@@ -4,17 +4,17 @@ ...@@ -4,17 +4,17 @@
<el-tab-pane label="充值预存款" name="first"> <el-tab-pane label="充值预存款" name="first">
<div class="precharge_box"> <div class="precharge_box">
<div class="header-title"> <div class="header-title">
累计充值(元) 可用余额(元)
</div> </div>
<div class="detail"> <div class="detail">
<span class="num">{{ Number(tatalRechargeNumber).toFixed(2) }}</span> <span class="num">{{ balanceNumber | priceFilter(2) }}</span>
<el-button type="primary" size="small" @click="toPayClick">充值 <el-button type="primary" size="small" @click="toPayClick">充值
</el-button> </el-button>
<el-button type="text" size="small" @click="tabClick('two')">充值记录 <el-button type="text" size="small" @click="tabClick('two')">充值记录
</el-button> </el-button>
</div> </div>
<!-- 充值弹窗 --> <!-- 充值弹窗 -->
<payUp ref="payUpRef" /> <payUp ref="payUpRef" @success="paySucccess" />
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="充值订单列表" name="two" lazy> <el-tab-pane label="充值订单列表" name="two" lazy>
...@@ -39,6 +39,7 @@ export default { ...@@ -39,6 +39,7 @@ export default {
return { return {
activeName: 'first', activeName: 'first',
tatalRechargeNumber: 0, //累计充值 tatalRechargeNumber: 0, //累计充值
balanceNumber: 0, //账户余额
} }
}, },
...@@ -57,11 +58,16 @@ export default { ...@@ -57,11 +58,16 @@ export default {
toPayClick() { toPayClick() {
this.$refs.payUpRef.openDialog(); this.$refs.payUpRef.openDialog();
}, },
// 充值成功回调
paySucccess() {
this.gettotalRecharge();
},
// 获取充值金额 // 获取充值金额
gettotalRecharge() { gettotalRecharge() {
preChargeSumDetailAPI().then(res => { preChargeSumDetailAPI().then(({data: res}) => {
if (res.error == 0 && res.data) { if (res.error == 0 && res.data) {
this.tatalRechargeNumber = res.data.moneyCharge ? (res.data.moneyCharge / 100) : 0; this.tatalRechargeNumber = res.data.moneyCharge;
this.balanceNumber = res.data.balance;
} }
}); });
} }
......
<template> <template>
<main class="site-content" :class="{ 'site-content--tabs': $route.meta.isTab }"> <main class="site-content" :class="{ 'site-content--tabs': $route.meta.isTab }">
<!-- 主入口标签页 s --> <!-- 主入口标签页 s -->
<el-tabs v-if="$route.meta.isTab" v-model="mainTabsActiveName" type="border-card" @tab-click="selectedTabHandle" <el-tabs v-if="$route.meta.isTab" v-model="mainTabsActiveName" type="card" @tab-click="selectedTabHandle"
@tab-remove="removeTabHandle" class="navigation-tabs"> @tab-remove="removeTabHandle" class="navigation-tabs">
<!-- <el-dropdown class="site-tabs__tools" :show-timeout="0" trigger="click"> <!-- <el-dropdown class="site-tabs__tools" :show-timeout="0" trigger="click">
<i class="el-icon-arrow-down el-icon--right"></i> <i class="el-icon-arrow-down el-icon--right"></i>
...@@ -12,12 +12,14 @@ ...@@ -12,12 +12,14 @@
<el-dropdown-item @click.native="refresh()">刷新当前标签页</el-dropdown-item> <el-dropdown-item @click.native="refresh()">刷新当前标签页</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> --> </el-dropdown> -->
<ul v-show="tabMenuVisible" :style="{ left: tabMenuLeft + 'px', top: tabMenuTop + 'px' }" class="tabMenu"> <transition name="fade">
<li @click="tabsCloseCurrentHandle" v-if="currentTabName != 'home'">关闭当前标签页</li> <ul v-show="tabMenuVisible" :style="{ left: tabMenuLeft + 'px', top: tabMenuTop + 'px' }" class="tabMenu">
<li @click="tabsCloseOtherHandle">关闭其它标签页</li> <li @click="tabsCloseCurrentHandle" v-if="currentTabName != 'home'">关闭当前标签页</li>
<li @click="tabsCloseAllHandle">关闭全部标签页</li> <li @click="tabsCloseOtherHandle">关闭其它标签页</li>
<!-- <li @click="refresh()">刷新当前标签页</li> --> <li @click="tabsCloseAllHandle">关闭全部标签页</li>
</ul> <!-- <li @click="refresh()">刷新当前标签页</li> -->
</ul>
</transition>
<el-tab-pane v-for="item in mainTabs" :key="item.name" :label="item.title" :name="item.name" <el-tab-pane v-for="item in mainTabs" :key="item.name" :label="item.title" :name="item.name"
:closable="item.name != 'home'"> :closable="item.name != 'home'">
<span slot="label" :data-id="item.name"> <span slot="label" :data-id="item.name">
...@@ -65,12 +67,7 @@ export default { ...@@ -65,12 +67,7 @@ export default {
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
document.querySelector('.navigation-tabs .el-tabs__item').addEventListener('contextmenu', this.openRightMenu) document.querySelector('.navigation-tabs .el-tabs__nav').addEventListener('contextmenu', this.openRightMenu)
})
},
beforeDestroy() {
this.$nextTick(() => {
document.querySelector('.navigation-tabs .el-tabs__item').removeEventListener('contextmenu', this.openRightMenu)
}) })
}, },
watch: { watch: {
...@@ -117,13 +114,18 @@ export default { ...@@ -117,13 +114,18 @@ export default {
}, },
// tabs右键菜单 // tabs右键菜单
openRightMenu(e) { openRightMenu(e) {
this.closeRightMenu(); if ((e.srcElement.id != '' || e.target.getAttribute('data-id'))) {
if (e.srcElement.id != '' || e.target.getAttribute('data-id')) {
e.preventDefault() e.preventDefault()
this.currentTabName = e.srcElement.id || e.target.getAttribute('data-id') let tabName = ''
if (e.srcElement.id) {
tabName = e.srcElement.id.split('tab-').length > 0 ? e.srcElement.id.split('tab-')[1] : e.srcElement.id
} else {
tabName = e.target.getAttribute('data-id')
}
this.currentTabName = tabName
// 右键点击的是tab // 右键点击的是tab
this.tabMenuLeft = e.clientX; this.tabMenuLeft = e.clientX;
this.tabMenuTop = e.clientY + 10; this.tabMenuTop = e.clientY;
this.tabMenuVisible = true; this.tabMenuVisible = true;
} }
}, },
...@@ -201,6 +203,14 @@ export default { ...@@ -201,6 +203,14 @@ export default {
background-color: transparent; background-color: transparent;
border: none; border: none;
box-shadow: none; box-shadow: none;
/deep/ &>.el-tabs__header {
padding: 5px 24px 0 !important;
.el-tabs__item {
height: 38px;
line-height: 38px;
}
}
} }
.not-tab-card { .not-tab-card {
...@@ -209,11 +219,25 @@ export default { ...@@ -209,11 +219,25 @@ export default {
border: 0; border: 0;
} }
.fade-enter-active,
.fade-leave-active {
transition: opacity .2s;
}
.fade-enter,
.fade-leave-to
/* .fade-leave-active below version 2.1.8 */
{
opacity: 0;
}
.tabMenu { .tabMenu {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: 10; z-index: 2089;
min-width: 134px;
padding: 6px 0; padding: 6px 0;
margin: 12px 0 5px; margin: 12px 0 5px;
background-color: #fff; background-color: #fff;
...@@ -236,7 +260,7 @@ export default { ...@@ -236,7 +260,7 @@ export default {
font-size: 14px; font-size: 14px;
&:hover { &:hover {
background-color: rgba(var(--primary-color-rgb), .4); background-color: rgba(var(--primary-color-rgb), .1);
color: var(--primary-color); color: var(--primary-color);
} }
} }
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
<template v-if="!loading"> <template v-if="!loading">
<main-navbar /> <main-navbar />
<main-sidebar /> <main-sidebar />
<div class="site-content__wrapper" :style="{ 'min-height': documentClientHeight + 'px' }"> <div class="site-content__wrapper"
:style="{ 'min-height': documentClientHeight + 'px' }">
<main-content v-if="!$store.state.common.contentIsNeedRefresh" /> <main-content v-if="!$store.state.common.contentIsNeedRefresh" />
<Setting /> <Setting />
</div> </div>
...@@ -46,8 +47,13 @@ export default { ...@@ -46,8 +47,13 @@ export default {
get() { return this.$store.state.common.documentClientHeight }, get() { return this.$store.state.common.documentClientHeight },
set(val) { this.$store.commit('common/updateDocumentClientHeight', val) } set(val) { this.$store.commit('common/updateDocumentClientHeight', val) }
}, },
documentClientWidth: {
get() { return this.$store.state.common.documentClientWidth },
set(val) { this.$store.commit('common/updateDocumentClientWidth', val) }
},
sidebarFold: { sidebarFold: {
get() { return this.$store.state.common.sidebarFold } get() { return this.$store.state.common.sidebarFold },
set(val) { this.$store.commit('common/updateSidebarFold', val) }
}, },
userId: { userId: {
get() { return this.$store.state.user.id }, get() { return this.$store.state.user.id },
...@@ -63,6 +69,7 @@ export default { ...@@ -63,6 +69,7 @@ export default {
}, },
mounted() { mounted() {
this.resetDocumentClientHeight() this.resetDocumentClientHeight()
this.resetDocumentClientWidth()
}, },
methods: { methods: {
// 重置窗口可视高度 // 重置窗口可视高度
...@@ -72,6 +79,12 @@ export default { ...@@ -72,6 +79,12 @@ export default {
this.documentClientHeight = document.documentElement['clientHeight'] this.documentClientHeight = document.documentElement['clientHeight']
} }
}, },
resetDocumentClientWidth() {
this.sidebarFold = document.documentElement['clientWidth'] <= 992 ? true : false
window.onresize = () => {
this.sidebarFold = document.documentElement['clientWidth'] <= 992 ? true : false
}
},
// 获取当前管理员信息 // 获取当前管理员信息
getUserInfo() { getUserInfo() {
this.$http({ this.$http({
......
...@@ -70,11 +70,11 @@ export default { ...@@ -70,11 +70,11 @@ export default {
state: null, //状态 state: null, //状态
}, },
formItems: [ formItems: [
{ // {
label: '订单号', // label: '订单号',
prop: 'trade_no', // prop: 'trade_no',
type: 'Input', // type: 'Input',
}, // },
{ {
label: '套餐', label: '套餐',
prop: 'remark', prop: 'remark',
......
...@@ -3,29 +3,7 @@ ...@@ -3,29 +3,7 @@
<!-- <search-form :searchForm="formItems" :searchData="searchData" @search="serachHandle"> <!-- <search-form :searchForm="formItems" :searchData="searchData" @search="serachHandle">
</search-form> --> </search-form> -->
<el-card shadow="never" class="card-common"> <el-card shadow="never" class="card-common">
<el-table v-loading="tableDataLoading" :data="tableData"> <sys-set-table :key="'vip'" :tabName="'vip'" :loading="tableDataLoading" :data="tableData" @refresh="refresh"></sys-set-table>
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<!-- <el-table-column fixed prop="type" label="编号" align="center" width="80">
</el-table-column> -->
<el-table-column fixed type="index" label="编号" align="center" width="80">
</el-table-column>
<el-table-column prop="min" label="类型" width="250">
</el-table-column>
<el-table-column prop="value" label="内容">
</el-table-column>
<el-table-column prop="createAt" label="创建时间" width="180">
</el-table-column>
<el-table-column label="操作" prop="id" width="120">
<template slot-scope="scope">
<el-button size="mini" type="primary" :disabled="!isAuth('allocationList:update')"
@click="amend(scope.$index, scope.row)">编辑
</el-button>
</template>
</el-table-column>
</el-table>
</el-card> </el-card>
<!-- 修改弹框 --> <!-- 修改弹框 -->
<sysSetDialog ref="sysSetDialogRef" :formInfo="form" @confirm="sysConfirm" /> <sysSetDialog ref="sysSetDialogRef" :formInfo="form" @confirm="sysConfirm" />
...@@ -34,11 +12,13 @@ ...@@ -34,11 +12,13 @@
<script> <script>
import SearchForm from '@/components/SearchForm' import SearchForm from '@/components/SearchForm'
import sysSetTable from '@/components/sysSetTable'
import sysSetDialog from '@/components/sysSetDialog' import sysSetDialog from '@/components/sysSetDialog'
import moment from 'moment'; import moment from 'moment';
export default { export default {
components: { components: {
SearchForm, SearchForm,
sysSetTable,
sysSetDialog sysSetDialog
}, },
data() { data() {
...@@ -92,6 +72,9 @@ export default { ...@@ -92,6 +72,9 @@ export default {
}, },
methods: { methods: {
refresh() {
this.getTableData();
},
// 查询 // 查询
serachHandle() { serachHandle() {
this.page = 1 this.page = 1
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</div> </div>
<div class="logistics_bottom"> <div class="logistics_bottom">
<div class="price"> <div class="price">
<span>{{ packageChecked.price | priceFilter }}元 / {{ packageChecked.amount }}</span> <span>{{ packageChecked.price | priceFilter(0, true) }}元 / {{ packageChecked.amount }}</span>
</div> </div>
<div class="right"> <div class="right">
<el-button class="btn" type="primary" size="mini" <el-button class="btn" type="primary" size="mini"
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
{{ item.amount }} {{ item.amount }}
</div> </div>
<div class="checkcard-description"> <div class="checkcard-description">
{{ item.price | priceFilter }} {{ item.price | priceFilter(2, true) }}
</div> </div>
</div> </div>
</div> </div>
......
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
<div style="display: inline-block;"> <div style="display: inline-block;">
<span>系统用户:</span> <span>系统用户:</span>
<el-select v-model="userId" style="width:150px;margin-left: 10px;"> <el-select v-model="userId" style="width:150px;margin-left: 10px;">
<el-option v-for="item in userRwData" :key="item.userId" :label="item.nickName" <el-option v-for="item in userRwData" :key="item.userId" :label="item.nickName" :value="item.userId">
:value="item.userId">
</el-option> </el-option>
</el-select>&nbsp;&nbsp;&nbsp;&nbsp; </el-select>&nbsp;&nbsp;&nbsp;&nbsp;
<el-button style='margin:0 0 20px 20px;' :disabled="!isAuth('system:issue')" size="mini" type="primary" <el-button style='margin:0 0 20px 20px;' :disabled="!isAuth('system:issue')" size="mini" type="primary"
...@@ -19,8 +18,8 @@ ...@@ -19,8 +18,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="nickName" label="用户姓名" width="150"> <el-table-column prop="nickName" label="用户姓名" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color: var(--primary-color);cursor: pointer;" <span style="color: var(--primary-color);cursor: pointer;" @click="updates(scope.row)">{{
@click="updates(scope.row)">{{scope.row.nickName ? scope.row.nickName : '未绑定'}}</span> scope.row.nickName ? scope.row.nickName : '未绑定' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="title" label="标题"> <el-table-column prop="title" label="标题">
...@@ -37,8 +36,8 @@ ...@@ -37,8 +36,8 @@
</el-table-column> </el-table-column>
<el-table-column label="置顶状态" width="160"> <el-table-column label="置顶状态" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.isTop==1" style="color: var(--primary-color);">置顶中</span> <span v-if="scope.row.isTop == 1" style="color: var(--primary-color);">置顶中</span>
<span v-if="scope.row.isTop==0">未置顶</span> <span v-if="scope.row.isTop == 0">未置顶</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="endNum" label="接单数量" width="160"> <el-table-column prop="endNum" label="接单数量" width="160">
...@@ -53,11 +52,11 @@ ...@@ -53,11 +52,11 @@
</el-table-column> </el-table-column>
<el-table-column fixed='right' prop="state" label="状态" width="100"> <el-table-column fixed='right' prop="state" label="状态" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color: var(--primary-color);" v-if="scope.row.state === 0 ">待审核</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 0">待审核</span>
<span style="color: var(--primary-color);" v-if="scope.row.state === 1 ">进行中</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 1">进行中</span>
<span style="color: var(--primary-color);" v-if="scope.row.state === 2 ">已结束</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 2">已结束</span>
<span style="color: var(--primary-color);" v-if="scope.row.state === 3 ">已拒绝</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 3">已拒绝</span>
<span style="color: var(--primary-color);" v-if="scope.row.state === 4 ">已结算</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 4">已结算</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -82,7 +81,7 @@ ...@@ -82,7 +81,7 @@
<img :src="scope.row.label" alt="" width="60" height="60"> <img :src="scope.row.label" alt="" width="60" height="60">
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="title" label="标题"> <el-table-column prop="title" label="标题">
</el-table-column> </el-table-column>
<el-table-column prop="content" label="任务要求" width="150"> <el-table-column prop="content" label="任务要求" width="150">
</el-table-column> </el-table-column>
...@@ -106,15 +105,15 @@ ...@@ -106,15 +105,15 @@
</el-table-column> </el-table-column>
<el-table-column fixed='right' prop="state" label="状态" width="100"> <el-table-column fixed='right' prop="state" label="状态" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color: var(--primary-color);" v-if="scope.row.state === 0 ">待审核</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 0">待审核</span>
<span style="color: var(--primary-color);" v-if="scope.row.state === 1 ">已通过</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 1">已通过</span>
<span style="color: var(--primary-color);" v-if="scope.row.state === 3 ">已拒绝</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 3">已拒绝</span>
<span style="color: var(--primary-color);" v-if="scope.row.state === 4 ">已结算</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 4">已结算</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed='right' label="操作" width="120"> <el-table-column fixed='right' label="操作" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" v-if="scope.row.isTop == 0 && scope.row.state==1" <el-button size="mini" type="primary" v-if="scope.row.isTop == 0 && scope.row.state == 1"
@click="stick(scope.row)">置顶 @click="stick(scope.row)">置顶
</el-button> </el-button>
<el-button size="mini" type="primary" v-if="scope.row.isTop !== 0" disabled>置顶 <el-button size="mini" type="primary" v-if="scope.row.isTop !== 0" disabled>置顶
...@@ -143,7 +142,7 @@ ...@@ -143,7 +142,7 @@
<img :src="scope.row.label" alt="" width="60" height="60"> <img :src="scope.row.label" alt="" width="60" height="60">
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="title" label="标题"> <el-table-column prop="title" label="标题">
</el-table-column> </el-table-column>
<el-table-column prop="content" label="任务要求" width="150"> <el-table-column prop="content" label="任务要求" width="150">
</el-table-column> </el-table-column>
...@@ -167,11 +166,11 @@ ...@@ -167,11 +166,11 @@
</el-table-column> </el-table-column>
<el-table-column fixed='right' prop="state" label="状态" width="100"> <el-table-column fixed='right' prop="state" label="状态" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color: var(--primary-color);" v-if="scope.row.state === 0 ">待审核</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 0">待审核</span>
<span style="color: var(--primary-color);" v-if="scope.row.state === 1 ">进行中</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 1">进行中</span>
<span style="color: var(--primary-color);" v-if="scope.row.state === 2 ">已结束</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 2">已结束</span>
<span style="color: var(--primary-color);" v-if="scope.row.state === 3 ">已拒绝</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 3">已拒绝</span>
<span style="color: var(--primary-color);" v-if="scope.row.state === 4 ">已结算</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 4">已结算</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -189,7 +188,7 @@ ...@@ -189,7 +188,7 @@
<img :src="scope.row.label" alt="" width="60" height="60"> <img :src="scope.row.label" alt="" width="60" height="60">
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="title" label="标题"> <el-table-column prop="title" label="标题">
</el-table-column> </el-table-column>
<el-table-column prop="content" label="任务要求" width="150"> <el-table-column prop="content" label="任务要求" width="150">
</el-table-column> </el-table-column>
...@@ -213,12 +212,12 @@ ...@@ -213,12 +212,12 @@
</el-table-column> </el-table-column>
<el-table-column fixed='right' prop="state" label="状态" width="160"> <el-table-column fixed='right' prop="state" label="状态" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color: var(--primary-color);" v-if="scope.row.state === 0 ">待审核</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 0">待审核</span>
<span style="color: var(--primary-color);" v-if="scope.row.state === 1 ">已通过</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 1">已通过</span>
<span style="color: var(--primary-color);" v-if="scope.row.state === 2 ">已拒绝</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 2">已拒绝</span>
<span style="color: var(--primary-color);" v-if="scope.row.state === 3 ">已维权</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 3">已维权</span>
<span style="color: var(--primary-color);" v-if="scope.row.state === 4 ">已放弃</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 4">已放弃</span>
<span style="color: var(--primary-color);" v-if="scope.row.state === 5 ">已结束</span> <span style="color: var(--primary-color);" v-if="scope.row.state === 5">已结束</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed='right' label="操作"> <el-table-column fixed='right' label="操作">
...@@ -252,20 +251,19 @@ ...@@ -252,20 +251,19 @@
<el-table v-loading="tableDataLoading" :data="userData.list"> <el-table v-loading="tableDataLoading" :data="userData.list">
<el-table-column prop="nickName" label="昵称"> <el-table-column prop="nickName" label="昵称">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color: #f56c6c;">{{scope.row.nickName ? scope.row.nickName : '未绑定'}}</span> <span style="color: #f56c6c;">{{ scope.row.nickName ? scope.row.nickName : '未绑定' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="图像"> <el-table-column label="图像">
<template slot-scope="scope"> <template slot-scope="scope">
<img v-if="scope.row.imageUrl==null" src="~@/assets/img/avatar.png" alt="" width="40" <img v-if="scope.row.imageUrl == null" src="~@/assets/img/avatar.png" alt="" width="40" height="40">
height="40">
<img v-else :src="scope.row.imageUrl" alt="" width="40" height="40"> <img v-else :src="scope.row.imageUrl" alt="" width="40" height="40">
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="phone" label="手机号"> <el-table-column prop="phone" label="手机号">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color: var(--primary-color);cursor: pointer;" <span style="color: var(--primary-color);cursor: pointer;" @click="updates(scope.row)">{{
@click="updates(scope.row)">{{scope.row.phone ? scope.row.phone : '未绑定'}}</span> scope.row.phone ? scope.row.phone : '未绑定' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="invitationCode" label="邀请码"> <el-table-column prop="invitationCode" label="邀请码">
...@@ -297,8 +295,7 @@ ...@@ -297,8 +295,7 @@
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">选择任务:</span> <span style="width: 200px;display: inline-block;text-align: right;">选择任务:</span>
<el-select v-model="id" style="width:50%;"> <el-select v-model="id" style="width:50%;">
<el-option v-for="item in renwuData" :key="item.id" :label="item.classifyName" <el-option v-for="item in renwuData" :key="item.id" :label="item.classifyName" :value="item.list[0].id">
:value="item.list[0].id">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
...@@ -341,27 +338,29 @@ ...@@ -341,27 +338,29 @@
<p style="font-size: 14px;color: #3E8EF7;padding-left:200px;">在步骤1中添加需要扫描的二维码图片</p> <p style="font-size: 14px;color: #3E8EF7;padding-left:200px;">在步骤1中添加需要扫描的二维码图片</p>
</div> </div>
<div style="margin-bottom: 10px;padding:0 25%;"> <div style="margin-bottom: 10px;padding:0 25%;">
<div class="step_item" style="margin-bottom: 10px;" v-for="(item,index) in stepList" :key="index"> <div class="step_item" style="margin-bottom: 10px;" v-for="(item, index) in stepList" :key="index">
<div class="step_title" style="margin-bottom: 15px;background: rgb(240, 240, 240);padding: 0 10px;"> <div class="step_title" style="margin-bottom: 15px;background: rgb(240, 240, 240);padding: 0 10px;">
第{{index+1}}步 <span @click="deleteStep(index)" style="float: right;">删除</span></div> 第{{ index + 1 }}步 <span @click="deleteStep(index)" style="float: right;">删除</span></div>
<div style="display: flex;"> <div style="display: flex;">
<div <!-- <div
style="display: inline-block;width:148px;height:137px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 137px;"> style="display: inline-block;width:148px;height:137px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 137px;">
<el-upload class="avatar-uploader" v-model="picture" <el-upload class="avatar-uploader" v-model="picture"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false" action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
:on-success="handleAvatarSuccess"> :on-success="handleAvatarSuccess">
<img v-if="item.picture" :src="item.picture" class="avatar" <img v-if="item.picture" :src="item.picture" class="avatar"
style="width: 148px;height:137px;" /> style="width: 148px;height:137px;" />
<i v-else class="el-icon-plus avatar-uploader-icon" @click="curRowIndex=index"></i> <i v-else class="el-icon-plus avatar-uploader-icon" @click="curRowIndex = index"></i>
</el-upload> </el-upload>
</div> </div> -->
<upload-image v-model="picture" @input="handleAvatarSuccess"
@click="curRowIndex = index"></upload-image>
<div style="display: inline-block;margin-left:50px;"> <div style="display: inline-block;margin-left:50px;">
<el-input style="width:148px;" v-model="item.content" type="textarea" :rows="6" <el-input style="width:148px;" v-model="item.content" type="textarea" :rows="6"
placeholder="请输入步骤说明"></el-input> placeholder="请输入步骤说明"></el-input>
</div> </div>
</div> </div>
<div> <div>
<el-switch v-model="item.isVerify" @change="switch1Change(item.isVerify,index)" <el-switch v-model="item.isVerify" @change="switch1Change(item.isVerify, index)"
:active-value="openValue" :inactive-value="closeValue" active-color="#13ce66" :active-value="openValue" :inactive-value="closeValue" active-color="#13ce66"
inactive-color="#ff4949"> inactive-color="#ff4949">
</el-switch> </el-switch>
...@@ -424,7 +423,7 @@ ...@@ -424,7 +423,7 @@
</div> </div>
<div style="margin-bottom: 10px;display:flex;"> <div style="margin-bottom: 10px;display:flex;">
<span style="width: 200px;display: inline-block;text-align: right;">图像:</span> <span style="width: 200px;display: inline-block;text-align: right;">图像:</span>
<div <!-- <div
style=" width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;"> style=" width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
<el-upload class="avatar-uploader" v-model="imageUrl" <el-upload class="avatar-uploader" v-model="imageUrl"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false" action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
...@@ -433,7 +432,8 @@ ...@@ -433,7 +432,8 @@
style="border-radius: 6px;width: 148px;height: 148px;" /> style="border-radius: 6px;width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
</div> </div> -->
<upload-image v-model="imageUrl" @input="handleAvatarSuccess1"></upload-image>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible1 = false">取 消</el-button> <el-button @click="dialogFormVisible1 = false">取 消</el-button>
...@@ -456,7 +456,7 @@ ...@@ -456,7 +456,7 @@
<el-input v-model="form.zhifubaoName" placeholder="请输入支付宝名称" style="width:65%;"></el-input> <el-input v-model="form.zhifubaoName" placeholder="请输入支付宝名称" style="width:65%;"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="图像:" :label-width="formLabelWidth"> <el-form-item label="图像:" :label-width="formLabelWidth">
<div <!-- <div
style=" width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;"> style=" width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
<el-upload class="avatar-uploader" v-model="imageUrl" <el-upload class="avatar-uploader" v-model="imageUrl"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false" action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
...@@ -465,7 +465,8 @@ ...@@ -465,7 +465,8 @@
style="border-radius: 6px;width: 148px;height: 148px;" /> style="border-radius: 6px;width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
</div> </div> -->
<upload-image v-model="imageUrl" @input="handleAvatarSuccess2"></upload-image>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -489,795 +490,827 @@ ...@@ -489,795 +490,827 @@
</template> </template>
<script> <script>
export default { import UploadImage from '@/components/UploadImage'
data() { export default {
return { components: { UploadImage },
openValue: '1', data() {
closeValue: '0', return {
limit: 10, openValue: '1',
page: 1, closeValue: '0',
isVerify: 0, limit: 10,
page: 1,
isVerify: 0,
nickName: '',
member: '',
phone: '',
password: '',
invitationCode: '',
title: '',
content: '',
taskNum: '',
taskOriginalPrice: '',
openContent: '',
verifyContent: '',
picture: '',
sort: 0,
way: 1,
isway: true,
isway1: false,
isway2: false,
label: '',
index: '0',
imageUrl: '',
index_time: '0',
index_date: '0',
tiem: '',
helpTaskId: '',
form: {
userId: '',
nickName: '', nickName: '',
member: '',
phone: '', phone: '',
password: '',
invitationCode: '',
title: '',
content: '',
taskNum: '',
taskOriginalPrice: '',
openContent: '',
verifyContent: '',
picture: '',
sort: 0,
way: 1,
isway: true,
isway1: false,
isway2: false,
label: '',
index: '0',
imageUrl: '', imageUrl: '',
index_time: '0', zhifubao: '',
index_date: '0', zhifubaoName: '',
tiem: '', },
helpTaskId: '', sorts: [{
form: { label: '全部',
userId: '', value: 0
nickName: '', },
phone: '', {
imageUrl: '', label: '最多',
zhifubao: '', value: 1
zhifubaoName: '', },
}, {
sorts: [{ label: '最热',
label: '全部', value: 2
value: 0 },
}, {
{ label: '最早',
label: '最多', value: 3
value: 1
},
{
label: '最热',
value: 2
},
{
label: '最早',
value: 3
}
],
restrictTime: '10分钟',
restrictTimes: [{
label: '10分钟',
value: 0
},
{
label: '30分钟',
value: 1
},
{
label: '1小时',
value: 2
},
{
label: '6小时',
value: 3
},
{
label: '24小时',
value: 4
},
{
label: '2天',
value: 5
},
{
label: '3天',
value: 6
},
{
label: '5天',
value: 7
}
],
auditTime: '12小时',
auditTimes: [{
label: '12小时',
value: 0
},
{
label: '24小时',
value: 1
},
{
label: '48小时',
value: 2
},
],
endTime: '3小时后',
endTimes: [{
label: '3小时后',
value: 0
},
{
label: '6小时后',
value: 1
},
{
label: '12小时后',
value: 2
},
{
label: '18小时后',
value: 3
},
{
label: '1天后',
value: 4
},
{
label: '2天后',
value: 5
},
{
label: '3天后',
value: 6
},
{
label: '6天后',
value: 7
},
{
label: '12天后',
value: 8
},
{
label: '30天后',
value: 9
}
],
array1: ['10', '30', '60', '360', '1440', '2880', '4320', '7200'],
time1: ['720', '1440', '2880'],
date1: ['180', '360', '720', '1080', '1440', '2880', '4320', '8640', '17280', '43200'],
helpTaskDetailss: [],
stepList: [],
logo: [],
userData: [],
userId: '',
state: -1,
describes: '',
token: '',
states: [{
label: '全部',
value: -1
},
{
label: '待审核',
value: 0
},
{
label: '进行中',
value: 1
},
{
label: '已结束',
value: 2
},
{
label: '已拒绝',
value: 3
},
{
label: '已结算',
value: 4
}
],
taskstates: [{
label: '全部',
value: -1
},
{
label: '待审核',
value: 1
},
{
label: '已通过',
value: 2
},
{
label: '已拒绝',
value: 3
},
{
label: '已维权',
value: 4
},
{
label: '已放弃',
value: 5
},
{
label: '已超时',
value: 6
}
],
id: '',
time: '',
btnChangeEnable: true,
helpTakeId: '',
helpMaintainId: '',
content: '',
formLabelWidth: '200px',
activeName: 'first',
tableDataLoading: false,
dialogFormVisible: false,
dialogFormVisible1: false,
dialogFormVisible2: false,
dialogFormVisible3: false,
tableData: [],
tableData2: [],
helpTaskData: [],
protectjieData: [],
protectpaiData: [],
helpTaskData: [],
safeguardData: [],
classData: [],
renwuData: [],
userRwData: []
} }
}, ],
methods: { restrictTime: '10分钟',
// 图片上传 restrictTimes: [{
handleAvatarSuccess1(file) { label: '10分钟',
this.imageUrl = file.data; value: 0
}, },
handleAvatarSuccess2(file) { {
this.form.imageUrl = file.data; label: '30分钟',
value: 1
}, },
// 是否验证图 {
switch1Change(event, index) { label: '1小时',
var sort1 = event == true ? '1' : '0'; value: 2
this.stepList[index].isVerify = sort1;
}, },
bindPickerChange(value) { {
this.index = value; label: '6小时',
var restrictTime = this.array1[this.index]; value: 3
console.log(restrictTime)
}, },
timePickerChange(value) { {
this.index_time = value; label: '24小时',
var auditTime = this.time1[this.index_time]; value: 4
console.log(auditTime)
}, },
datePickerChange(value) { {
this.index_date = value; label: '2天',
var endTime = this.date1[this.index_date]; value: 5
console.log(endTime)
}, },
// 增加步 {
addStep() { label: '3天',
const step = {}; value: 6
step.picture = '';
step.content = '';
step.isVerify = '0';
step.sort = '';
this.stepList.push(step);
}, },
// 删除步 {
deleteStep(index) { label: '5天',
this.stepList.splice(index, 1); value: 7
}
],
auditTime: '12小时',
auditTimes: [{
label: '12小时',
value: 0
}, },
handleAvatarSuccess(file) { {
if (this.curRowIndex == 0) { label: '24小时',
this.picture = file.data; value: 1
this.stepList[0].picture = this.picture
return
} else {
this.picture = file.data;
this.stepList[this.curRowIndex].picture = this.picture
this.stepList[this.curRowIndex].sort = this.curRowIndex
}
}, },
// 查询 {
select() { label: '48小时',
this.userSelect() value: 2
}, },
// 重置 ],
cleans() { endTime: '3小时后',
this.phone = '' endTimes: [{
this.userSelect() label: '3小时后',
value: 0
}, },
handleSizeChange(val) { {
this.limit = val; label: '6小时后',
this.dataSelect() value: 1
}, },
handleCurrentChange(val) { {
this.page = val; label: '12小时后',
this.dataSelect() value: 2
}, },
handleSizeChange1(val) { {
this.limit = val; label: '18小时后',
this.safeguardSelect() value: 3
}, },
handleCurrentChange1(val) { {
this.page = val; label: '1天后',
this.safeguardSelect() value: 4
}, },
handleSizeChange2(val) { {
this.limit = val; label: '2天后',
this.classifySelect() value: 5
}, },
handleCurrentChange2(val) { {
this.page = val; label: '3天后',
this.classifySelect() value: 6
}, },
handleSizeChange3(val) { {
this.limit = val; label: '6天后',
this.taskdataSelect() value: 7
}, },
handleCurrentChange3(val) { {
this.page = val; label: '12天后',
this.taskdataSelect() value: 8
}, },
// 打开方式 {
wayChange(val) { label: '30天后',
if (val == 1) { value: 9
this.isway = true }
this.isway1 = false ],
this.isway2 = false array1: ['10', '30', '60', '360', '1440', '2880', '4320', '7200'],
} time1: ['720', '1440', '2880'],
if (val == 2) { date1: ['180', '360', '720', '1080', '1440', '2880', '4320', '8640', '17280', '43200'],
this.isway = false helpTaskDetailss: [],
this.isway1 = true stepList: [],
this.isway2 = false logo: [],
} userData: [],
if (val == 3) { userId: '',
this.isway = false state: -1,
this.isway1 = false describes: '',
this.isway2 = true token: '',
} states: [{
label: '全部',
value: -1
}, },
// tabs切换 {
handleClick(tab, event) { label: '待审核',
if (tab._props.label == '任务大厅') { value: 0
this.page = 1
this.limit = 10
this.dataSelect()
this.userRwSelect()
}
if (tab._props.label == '我的派单') {
this.page = 1
this.limit = 10
this.taskdataSelect()
}
if (tab._props.label == '接单审核') {
this.page = 1
this.limit = 10
this.safeguardSelect()
}
if (tab._props.label == '我的维权') {
this.page = 1
this.limit = 10
this.classifySelect()
}
if (tab._props.label == '系统用户') {
this.page = 1
this.limit = 10
this.userSelect()
}
}, },
// 详情跳转 {
updates(row) { label: '进行中',
this.$router.push({ value: 1
path: '/userDetail',
query: {
userId: row.userId
}
})
}, },
// select选择事件 {
animeDat1(state) { label: '已结束',
this.taskdataSelect() value: 2
}, },
animeDat2(state) { {
this.safeguardSelect() label: '已拒绝',
value: 3
}, },
animeDat3(state) { {
this.classifySelect() label: '已结算',
value: 4
}
],
taskstates: [{
label: '全部',
value: -1
}, },
// 发布任务 {
passClick() { label: '待审核',
this.dialogFormVisible = true value: 1
}, },
// 置顶弹框 {
stick(row) { label: '已通过',
this.dialogFormVisible3 = true value: 2
this.helpTaskId = row.id
}, },
// 置顶 {
sticktionto() { label: '已拒绝',
this.$http({ value: 3
url: this.$http.adornUrl('helpTask/topHelpTask'),
method: 'get',
params: this.$http.adornParams({
'time': this.time,
'helpTaskId': this.helpTaskId,
'userId': this.userId
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.time = ''
this.dialogFormVisible3 = false
this.taskdataSelect()
}
})
} else {
this.$message.error(data.msg)
}
})
}, },
// 获取任务数据信息 {
dataSelect() { label: '已维权',
this.tableDataLoading = true value: 4
this.$http({ },
url: this.$http.adornUrl('helpTask/selectHelpTask'), {
method: 'get', label: '已放弃',
params: this.$http.adornParams({ value: 5
'page': this.page, },
'limit': this.limit, {
'sort': this.sort, label: '已超时',
'userId': this.userId value: 6
}
],
id: '',
time: '',
btnChangeEnable: true,
helpTakeId: '',
helpMaintainId: '',
content: '',
formLabelWidth: '200px',
activeName: 'first',
tableDataLoading: false,
dialogFormVisible: false,
dialogFormVisible1: false,
dialogFormVisible2: false,
dialogFormVisible3: false,
tableData: [],
tableData2: [],
helpTaskData: [],
protectjieData: [],
protectpaiData: [],
helpTaskData: [],
safeguardData: [],
classData: [],
renwuData: [],
userRwData: []
}
},
methods: {
// 图片上传
handleAvatarSuccess1(file) {
this.imageUrl = file.data;
},
handleAvatarSuccess2(file) {
this.form.imageUrl = file.data;
},
// 是否验证图
switch1Change(event, index) {
var sort1 = event == true ? '1' : '0';
this.stepList[index].isVerify = sort1;
},
bindPickerChange(value) {
this.index = value;
var restrictTime = this.array1[this.index];
console.log(restrictTime)
},
timePickerChange(value) {
this.index_time = value;
var auditTime = this.time1[this.index_time];
console.log(auditTime)
},
datePickerChange(value) {
this.index_date = value;
var endTime = this.date1[this.index_date];
console.log(endTime)
},
// 增加步
addStep() {
const step = {};
step.picture = '';
step.content = '';
step.isVerify = '0';
step.sort = '';
this.stepList.push(step);
},
// 删除步
deleteStep(index) {
this.stepList.splice(index, 1);
},
handleAvatarSuccess(file) {
if (this.curRowIndex == 0) {
this.picture = file.data;
this.stepList[0].picture = this.picture
return
} else {
this.picture = file.data;
this.stepList[this.curRowIndex].picture = this.picture
this.stepList[this.curRowIndex].sort = this.curRowIndex
}
},
// 查询
select() {
this.userSelect()
},
// 重置
cleans() {
this.phone = ''
this.userSelect()
},
handleSizeChange(val) {
this.limit = val;
this.dataSelect()
},
handleCurrentChange(val) {
this.page = val;
this.dataSelect()
},
handleSizeChange1(val) {
this.limit = val;
this.safeguardSelect()
},
handleCurrentChange1(val) {
this.page = val;
this.safeguardSelect()
},
handleSizeChange2(val) {
this.limit = val;
this.classifySelect()
},
handleCurrentChange2(val) {
this.page = val;
this.classifySelect()
},
handleSizeChange3(val) {
this.limit = val;
this.taskdataSelect()
},
handleCurrentChange3(val) {
this.page = val;
this.taskdataSelect()
},
// 打开方式
wayChange(val) {
if (val == 1) {
this.isway = true
this.isway1 = false
this.isway2 = false
}
if (val == 2) {
this.isway = false
this.isway1 = true
this.isway2 = false
}
if (val == 3) {
this.isway = false
this.isway1 = false
this.isway2 = true
}
},
// tabs切换
handleClick(tab, event) {
if (tab._props.label == '任务大厅') {
this.page = 1
this.limit = 10
this.dataSelect()
this.userRwSelect()
}
if (tab._props.label == '我的派单') {
this.page = 1
this.limit = 10
this.taskdataSelect()
}
if (tab._props.label == '接单审核') {
this.page = 1
this.limit = 10
this.safeguardSelect()
}
if (tab._props.label == '我的维权') {
this.page = 1
this.limit = 10
this.classifySelect()
}
if (tab._props.label == '系统用户') {
this.page = 1
this.limit = 10
this.userSelect()
}
},
// 详情跳转
updates(row) {
this.$router.push({
path: '/userDetail',
query: {
userId: row.userId
}
})
},
// select选择事件
animeDat1(state) {
this.taskdataSelect()
},
animeDat2(state) {
this.safeguardSelect()
},
animeDat3(state) {
this.classifySelect()
},
// 发布任务
passClick() {
this.dialogFormVisible = true
},
// 置顶弹框
stick(row) {
this.dialogFormVisible3 = true
this.helpTaskId = row.id
},
// 置顶
sticktionto() {
this.$http({
url: this.$http.adornUrl('helpTask/topHelpTask'),
method: 'get',
params: this.$http.adornParams({
'time': this.time,
'helpTaskId': this.helpTaskId,
'userId': this.userId
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.time = ''
this.dialogFormVisible3 = false
this.taskdataSelect()
}
}) })
}).then(({ } else {
data this.$message.error(data.msg)
}) => { }
if (data && data.code === 0) {
this.tableDataLoading = false
let returnData = data.data.pageUtils;
this.tableData = returnData
} else {
this.$message.error(data.msg)
}
})
},
// 获取任务数据信息
dataSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('helpTask/selectHelpTask'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit,
'sort': this.sort,
'userId': this.userId
}) })
}, }).then(({
// 发布 data
triumph() { }) => {
var auditTime = this.time1[this.index_time]; if (data && data.code === 0) {
var restrictTime = this.array1[this.index]; this.tableDataLoading = false
var endTime = this.date1[this.index_date]; let returnData = data.data.pageUtils;
if (this.picture == '') { this.tableData = returnData
this.$notify({ } else {
title: '提示', this.$message.error(data.msg)
duration: 1800,
message: '图片信息不能为空',
type: 'warning'
});
return
}
if (this.title == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入标题',
type: 'warning'
});
return
} }
if (this.content == '') {
this.$notify({ })
title: '提示', },
duration: 1800, // 发布
message: '请输入任务要求', triumph() {
type: 'warning' var auditTime = this.time1[this.index_time];
}); var restrictTime = this.array1[this.index];
return var endTime = this.date1[this.index_date];
if (this.picture == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '图片信息不能为空',
type: 'warning'
});
return
}
if (this.title == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入标题',
type: 'warning'
});
return
}
if (this.content == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入任务要求',
type: 'warning'
});
return
}
if (this.taskNum < 20) {
this.$notify({
title: '提示',
duration: 1800,
message: '任务数量不能低于20个',
type: 'warning'
});
return
}
if (this.taskOriginalPrice < 0.32) {
this.$notify({
title: '提示',
duration: 1800,
message: '每单金额不能低于0.32元',
type: 'warning'
});
return
}
if (this.openContent == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请打开方式内容',
type: 'warning'
});
return
}
if (this.verifyContent == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入验证消息',
type: 'warning'
});
return
}
this.$http({
url: this.$http.adornUrl('helpTask/saveMyHelpTask'),
method: 'post',
data: this.$http.adornData({
title: this.title,
content: this.content,
taskOriginalPrice: this.taskOriginalPrice,
taskNum: this.taskNum,
label: this.label,
helpTaskDetailss: JSON.stringify(this.stepList),
openType: this.way,
openContent: this.openContent,
openApp: '',
verifyContent: this.verifyContent,
auditTime: auditTime,
restrictTime: restrictTime,
endTimes: endTime,
userId: this.userId,
classifyDetailsId: this.id
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.dialogFormVisible1 = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dialogFormVisible = false
this.dataSelect()
}
})
} else {
this.$message.error(data.msg)
} }
if (this.taskNum < 20) { })
this.$notify({ },
title: '提示', // 获取我的派单列表
duration: 1800, taskdataSelect() {
message: '任务数量不能低于20个', this.tableDataLoading = true
type: 'warning' this.$http({
}); url: this.$http.adornUrl('helpTask/selectMyHelpTask'),
return method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit,
'userId': this.userId,
'state': this.state
})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.tableDataLoading = false
let returnData = data.data.pageUtils;
this.tableData2 = returnData
} else {
this.$message.error(data.msg)
} }
if (this.taskOriginalPrice < 0.32) { })
this.$notify({ },
title: '提示', // 接单审核
duration: 1800, safeguardSelect() {
message: '每单金额不能低于0.32元', this.tableDataLoading = true
type: 'warning' this.$http({
}); url: this.$http.adornUrl('helpTask/selectAuditHelpTask'),
return method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit,
'userId': this.userId,
'state': this.state
})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.tableDataLoading = false
let returnData = data.data.pageUtils;
this.safeguardData = returnData
} else {
this.$message.error(data.msg)
} }
if (this.openContent == '') { })
this.$notify({ },
title: '提示', // 我的维权
duration: 1800, classifySelect() {
message: '请打开方式内容', this.tableDataLoading = true
type: 'warning' this.$http({
}); url: this.$http.adornUrl('helpTask/selectHelpMaintainListBySendOrder'),
return method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit,
'userId': this.userId,
'state': 0
})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.tableDataLoading = false
let returnData = data.data;
this.classData = returnData
} else {
this.$message.error(data.msg)
} }
if (this.verifyContent == '') { })
this.$notify({ },
title: '提示', // 获取任务分类
duration: 1800, renwuSelect() {
message: '请输入验证消息', this.tableDataLoading = true
type: 'warning' this.$http({
}); url: this.$http.adornUrl('helpClassify/select'),
return method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.tableDataLoading = false
let returnData = data.data;
this.renwuData = returnData
} else {
this.$message.error(data.msg)
} }
this.$http({ })
url: this.$http.adornUrl('helpTask/saveMyHelpTask'), },
method: 'post', // 获取官方邀请码
data: this.$http.adornData({ guanCode() {
title: this.title, this.$http({
content: this.content, url: this.$http.adornUrl('common/type/88'),
taskOriginalPrice: this.taskOriginalPrice, method: 'get',
taskNum: this.taskNum, params: this.$http.adornParams({
label: this.label, 'page': this.page,
helpTaskDetailss: JSON.stringify(this.stepList), 'limit': this.limit,
openType: this.way, 'member': this.member,
openContent: this.openContent, 'phone': this.phone
openApp: '',
verifyContent: this.verifyContent,
auditTime: auditTime,
restrictTime: restrictTime,
endTimes: endTime,
userId: this.userId,
classifyDetailsId: this.id
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.dialogFormVisible1 = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dialogFormVisible = false
this.dataSelect()
}
})
} else {
this.$message.error(data.msg)
}
})
},
// 获取我的派单列表
taskdataSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('helpTask/selectMyHelpTask'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit,
'userId': this.userId,
'state': this.state
})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.tableDataLoading = false
let returnData = data.data.pageUtils;
this.tableData2 = returnData
} else {
this.$message.error(data.msg)
}
})
},
// 接单审核
safeguardSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('helpTask/selectAuditHelpTask'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit,
'userId': this.userId,
'state': this.state
})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.tableDataLoading = false
let returnData = data.data.pageUtils;
this.safeguardData = returnData
} else {
this.$message.error(data.msg)
}
}) })
}, }).then(({
// 我的维权 data
classifySelect() { }) => {
this.tableDataLoading = true if (data && data.code == 0) {
this.$http({ let returnData = data.data.value
url: this.$http.adornUrl('helpTask/selectHelpMaintainListBySendOrder'), this.invitationCode = returnData
method: 'get', } else {
params: this.$http.adornParams({ this.$message.error(data.msg)
'page': this.page, }
'limit': this.limit,
'userId': this.userId,
'state': 0
})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.tableDataLoading = false
let returnData = data.data;
this.classData = returnData
} else {
this.$message.error(data.msg)
}
})
},
// 添加系统用户弹框
addUser() {
this.dialogFormVisible1 = true
},
// 添加系统用户
userAtionto() {
if (this.nickName == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入用户名',
type: 'warning'
});
return
}
if (this.phone == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入手机号',
type: 'warning'
});
return
}
if (this.password == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入密码',
type: 'warning'
});
return
}
if (this.invitationCode == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请填写邀请码',
type: 'warning'
});
return
}
this.$http({
url: this.$http.adornUrl('user/insertSysUser'),
method: 'post',
data: this.$http.adornData({
nickName: this.nickName,
phone: this.phone,
invitationCode: this.invitationCode,
password: this.password,
imageUrl: this.imageUrl
}) })
}, }).then(({
// 获取任务分类 data
renwuSelect() { }) => {
this.tableDataLoading = true if (data && data.code === 0) {
this.$http({ this.dialogFormVisible1 = false
url: this.$http.adornUrl('helpClassify/select'), this.$message({
method: 'get', message: '操作成功',
params: this.$http.adornParams({}) type: 'success',
}).then(({ duration: 1500,
data onClose: () => {
}) => { this.dialogFormVisible1 = false
if (data && data.code == 0) { this.nickName = ''
this.tableDataLoading = false this.phone = ''
let returnData = data.data; this.invitationCode = ''
this.renwuData = returnData this.password = ''
} else { this.userSelect()
this.$message.error(data.msg) }
}
})
},
// 获取官方邀请码
guanCode() {
this.$http({
url: this.$http.adornUrl('common/type/88'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit,
'member': this.member,
'phone': this.phone
}) })
}).then(({ } else {
data this.$message.error(data.msg)
}) => {
if (data && data.code == 0) {
let returnData = data.data.value
this.invitationCode = returnData
} else {
this.$message.error(data.msg)
}
})
},
// 添加系统用户弹框
addUser() {
this.dialogFormVisible1 = true
},
// 添加系统用户
userAtionto() {
if (this.nickName == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入用户名',
type: 'warning'
});
return
}
if (this.phone == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入手机号',
type: 'warning'
});
return
}
if (this.password == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入密码',
type: 'warning'
});
return
}
if (this.invitationCode == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请填写邀请码',
type: 'warning'
});
return
} }
this.$http({ })
url: this.$http.adornUrl('user/insertSysUser'), },
method: 'post', // 修改系统用户
data: this.$http.adornData({ Compile(rows) {
nickName: this.nickName, this.dialogFormVisible2 = true;
phone: this.phone, this.form.userId = rows.userId;
invitationCode: this.invitationCode, this.form.nickName = rows.nickName;
password: this.password, this.form.phone = rows.phone;
imageUrl: this.imageUrl this.form.password = rows.password;
}) this.form.imageUrl = rows.imageUrl;
}).then(({ this.form.zhifubao = rows.zhifubao;
data this.form.zhifubaoName = rows.zhifubaoName;
}) => { },
if (data && data.code === 0) { // 修改系统用户确定
this.dialogFormVisible1 = false CompileNoticeTo() {
this.$message({ this.$http({
message: '操作成功', url: this.$http.adornUrl('user/updateSysUser'),
type: 'success', method: 'post',
duration: 1500, data: this.$http.adornData({
onClose: () => { 'userId': this.form.userId,
this.dialogFormVisible1 = false 'nickName': this.form.nickName,
this.nickName = '' 'phone': this.form.phone,
this.phone = '' 'imageUrl': this.form.imageUrl,
this.invitationCode = '' 'zhifubao': this.form.zhifubao,
this.password = '' 'zhifubaoName': this.form.zhifubaoName
this.userSelect()
}
})
} else {
this.$message.error(data.msg)
}
}) })
}, }).then(({
// 修改系统用户 data
Compile(rows) { }) => {
this.dialogFormVisible2 = true; if (data && data.code == 0) {
this.form.userId = rows.userId; this.dialogFormVisible2 = false
this.form.nickName = rows.nickName; this.$message({
this.form.phone = rows.phone; message: '操作成功',
this.form.password = rows.password; type: 'success',
this.form.imageUrl = rows.imageUrl; duration: 1500,
this.form.zhifubao = rows.zhifubao; onClose: () => {
this.form.zhifubaoName = rows.zhifubaoName; this.userSelect()
}, }
// 修改系统用户确定 })
CompileNoticeTo() { } else {
this.$message.error(data.msg)
}
})
},
//删除用户
deleteuser(row) {
let delid = row.userId
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({ this.$http({
url: this.$http.adornUrl('user/updateSysUser'), url: this.$http.adornUrl(`user/deleteByUserId/?userId=${delid}`),
method: 'post', method: 'post',
data: this.$http.adornData({ params: this.$http.adornData({})
'userId': this.form.userId,
'nickName': this.form.nickName,
'phone': this.form.phone,
'imageUrl': this.form.imageUrl,
'zhifubao': this.form.zhifubao,
'zhifubaoName': this.form.zhifubaoName
})
}).then(({ }).then(({
data data
}) => { }) => {
if (data && data.code == 0) { if (data && data.code == 0) {
this.dialogFormVisible2 = false
this.$message({ this.$message({
message: '操作成功', message: '删除成功',
type: 'success', type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
...@@ -1289,98 +1322,66 @@ ...@@ -1289,98 +1322,66 @@
} }
}) })
}, })
//删除用户 },
deleteuser(row) { //系统用户列表
let delid = row.userId userSelect() {
this.$confirm(`确定删除此条信息?`, '提示', { this.tableDataLoading = true
confirmButtonText: '确定', this.$http({
cancelButtonText: '取消', url: this.$http.adornUrl('user/selectSysUserList'),
type: 'warning' method: 'get',
}).then(() => { params: this.$http.adornParams({
this.$http({ 'page': this.page,
url: this.$http.adornUrl(`user/deleteByUserId/?userId=${delid}`), 'limit': this.limit,
method: 'post', 'member': this.member,
params: this.$http.adornData({}) 'phone': this.phone
}).then(({
data
}) => {
if (data && data.code == 0) {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.userSelect()
}
})
} else {
this.$message.error(data.msg)
}
})
})
},
//系统用户列表
userSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('user/selectSysUserList'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit,
'member': this.member,
'phone': this.phone
})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.tableDataLoading = false
let returnData = data.data
this.userData = returnData
} else {
this.$message.error(data.msg)
}
}) })
}, }).then(({
//系统用户列表任务 data
userRwSelect() { }) => {
this.tableDataLoading = true if (data && data.code == 0) {
this.$http({
url: this.$http.adornUrl('user/selectSysUserLists'),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
this.tableDataLoading = false this.tableDataLoading = false
let returnData = data.data let returnData = data.data
this.userRwData = returnData this.userData = returnData
if (this.userRwData.length === 0) { } else {
this.$message({ this.$message.error(data.msg)
message: '请先添加系统用户', }
type: 'error',
duration: 1500, })
})
} else {
if (this.userId == '') {
this.userId = this.userRwData[0].userId
}
}
})
}
}, },
mounted() { //系统用户列表任务
this.dataSelect() userRwSelect() {
this.renwuSelect() this.tableDataLoading = true
this.userRwSelect() this.$http({
url: this.$http.adornUrl('user/selectSysUserLists'),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
this.tableDataLoading = false
let returnData = data.data
this.userRwData = returnData
if (this.userRwData.length === 0) {
this.$message({
message: '请先添加系统用户',
type: 'error',
duration: 1500,
})
} else {
if (this.userId == '') {
this.userId = this.userRwData[0].userId
}
}
})
} }
}; },
mounted() {
this.dataSelect()
this.renwuSelect()
this.userRwSelect()
}
};
</script> </script>
<style> <style></style>
</style>
...@@ -1645,12 +1645,12 @@ export default { ...@@ -1645,12 +1645,12 @@ export default {
} }
}) })
} else { } else {
this.$message({ // this.$message({
message: data.msg, // message: data.msg,
type: 'warning', // type: 'warning',
duration: 1500, // duration: 1500,
onClose: () => { } // onClose: () => { }
}) // })
} }
...@@ -1785,12 +1785,12 @@ export default { ...@@ -1785,12 +1785,12 @@ export default {
} }
}) })
} else { } else {
this.$message({ // this.$message({
message: data.msg, // message: data.msg,
type: 'warning', // type: 'warning',
duration: 1500, // duration: 1500,
onClose: () => { } // onClose: () => { }
}) // })
} }
}) })
...@@ -1858,12 +1858,12 @@ export default { ...@@ -1858,12 +1858,12 @@ export default {
} }
}) })
} else { } else {
this.$message({ // this.$message({
message: data.msg, // message: data.msg,
type: 'warning', // type: 'warning',
duration: 1500, // duration: 1500,
onClose: () => { } // onClose: () => { }
}) // })
} }
}) })
...@@ -1948,12 +1948,12 @@ export default { ...@@ -1948,12 +1948,12 @@ export default {
} }
}) })
} else { } else {
this.$message({ // this.$message({
message: data.msg, // message: data.msg,
type: 'warning', // type: 'warning',
duration: 1500, // duration: 1500,
onClose: () => { } // onClose: () => { }
}) // })
} }
}) })
...@@ -1991,12 +1991,12 @@ export default { ...@@ -1991,12 +1991,12 @@ export default {
} }
}) })
} else { } else {
this.$message({ // this.$message({
message: data.msg, // message: data.msg,
type: 'warning', // type: 'warning',
duration: 1500, // duration: 1500,
onClose: () => { } // onClose: () => { }
}) // })
} }
}) })
......
<template> <template>
<el-dialog class="pay-up-box" title="账户充值" :visible.sync="dialogVisible"> <el-dialog class="pay-up-box" title="账户充值" :visible.sync="dialogVisible" @close="closeDialog">
<div class="tips-box"> <div class="tips-box">
<p class="info">注意事项:</p> <p class="info">注意事项:</p>
<p class="info">1、每次充值金额不超过10000元;</p> <!-- <p class="info">1、每次充值金额不超过10000元;</p> -->
<p class="info">
2、充值成功后可以通过充值记录查看;</p>
<p class="info"> <p class="info">
1、充值成功后可以通过充值记录查看;</p>
<!-- <p class="info">
3、充值过程中遇到其他问题,联系客服400-6865539。 3、充值过程中遇到其他问题,联系客服400-6865539。
</p> </p> -->
</div> </div>
<div class="container-setting"> <div class="container-setting">
<el-form label-width="120px" size="small" class="form"> <el-form label-width="120px" size="small" class="form">
<el-form-item label="账户可用余额:" v-if="payType == 'FUPAY'"> <el-form-item label="账户可用余额:" v-if="payType == 'FUPAY'">
<span class="can-use-money"> <span class="can-use-money">
{{ balance }} {{ balance | priceFilter(2) }}
</span> </span>
</el-form-item> </el-form-item>
<el-form-item label="累计充值:" v-else> <!-- <el-form-item label="累计充值:" v-else>
<span class="can-use-money"> <span class="can-use-money">
{{ Number(tatalRechargeNumber).toFixed(2) }} {{ tatalRechargeNumber | priceFilter(2) }}
</span> </span>
</el-form-item> </el-form-item> -->
<el-form-item label="充值金额:"> <el-form-item label="充值金额:">
<el-input class="money-input" v-model="money" placeholder="请输入充值金额"></el-input> <el-input class="money-input" v-model="money" placeholder="请输入充值金额"></el-input>
</el-form-item> </el-form-item>
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
dialogVisible: false, dialogVisible: false,
money: '', money: '',
trade_no: '', //订单编号 trade_no: '', //订单编号
balance: '0.00', balance: 0,
payType: '', payType: '',
tatalRechargeNumber: 0 tatalRechargeNumber: 0
}; };
...@@ -63,6 +63,11 @@ export default { ...@@ -63,6 +63,11 @@ export default {
openDialog() { openDialog() {
this.dialogVisible = true; this.dialogVisible = true;
}, },
// 关闭弹窗
closeDialog() {
this.money = ''
this.dialogVisible = false;
},
//判断金额的正则 //判断金额的正则
checkIsMoney(value, info) { checkIsMoney(value, info) {
let reg = /^([1-9]\d{0,5}|0)([.]?|(\.\d{1,2})?)$/; let reg = /^([1-9]\d{0,5}|0)([.]?|(\.\d{1,2})?)$/;
...@@ -85,15 +90,18 @@ export default { ...@@ -85,15 +90,18 @@ export default {
}, },
// 获取充值金额 // 获取充值金额
gettotalRecharge() { gettotalRecharge() {
preChargeSumDetailAPI().then(res => { preChargeSumDetailAPI().then(({ data: res }) => {
if (res.error == 0 && res.data) { if (res.error == 0 && res.data) {
this.tatalRechargeNumber = res.data.moneyCharge ? (res.data.moneyCharge / 100) : 0; this.tatalRechargeNumber = res.data.moneyCharge;
this.balance = res.data.balance;
} }
}); });
}, },
//充值成功回调 //充值成功回调
rechargeSuccess() { rechargeSuccess() {
this.$emit('success')
this.throttleStatus = false; this.throttleStatus = false;
this.dialogVisible = false;
} }
}, },
activated() { activated() {
......
<template> <template>
<div> <div>
<sys-set-table :key="tabName" :loading="tableDataLoading" :data="tableData" @refresh="refresh"></sys-set-table> <sys-set-table :key="tabName" :tabName="'kefu'" :loading="tableDataLoading" :data="tableData" settingType="platform" @refresh="refresh"></sys-set-table>
</div> </div>
</template> </template>
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
}) => { }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.tableDataLoading = false this.tableDataLoading = false
let returnData = data.data; let returnData = data.data || [];
this.tableData = returnData this.tableData = returnData
} }
}) })
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
:autosize="{ minRows: 3, maxRows: 3 }"></el-input> :autosize="{ minRows: 3, maxRows: 3 }"></el-input>
</el-form-item> </el-form-item>
<el-form-item size="large"> <el-form-item size="large">
<el-button type="primary" @click="submit">提交</el-button> <el-button type="primary" @click="submit" :disabled="!isAuth('sysSetting:update')">提交</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
......
<template> <template>
<div class="sellRatioSetting_wrapper"> <div class="sellRatioSetting_wrapper">
<div v-if="loading" v-loading="loading"></div> <div v-if="false" v-loading="loading"></div>
<el-card v-else shadow="never" class="card-common"> <el-card v-else shadow="never" class="card-common">
<div slot="header" class="card_header"> <div slot="header" class="card_header">
<span class="card_title">*注:销售比例信息设置,用于总控成本价基础上进行加价。</span> <span class="card_title">*注:销售比例信息设置,用于总控成本价基础上进行加价。</span>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
:min="0"></el-input-number> :min="0"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item size="large"> <el-form-item size="large">
<el-button type="primary" size="small" @click="save(1)">提交</el-button> <el-button type="primary" size="small" :disabled="!isAuth('sysSetting:update')" @click="save(1)">提交</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form v-if="tabPosition === 'bili'" ref="form" :model="ratioForm" label-suffix=" (%)" label-width="150px" <el-form v-if="tabPosition === 'bili'" ref="form" :model="ratioForm" label-suffix=" (%)" label-width="150px"
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
:min="0"></el-input-number> :min="0"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item size="large"> <el-form-item size="large">
<el-button type="primary" size="small" @click="save(2)">提交</el-button> <el-button type="primary" size="small" :disabled="!isAuth('sysSetting:update')" @click="save(2)">提交</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -95,8 +95,8 @@ export default { ...@@ -95,8 +95,8 @@ export default {
this.sumForm.first_weight = data.data.firstWeightAddPrice || 0 this.sumForm.first_weight = data.data.firstWeightAddPrice || 0
this.sumForm.renew_weight = data.data.xuWeightAddPrice || 0 this.sumForm.renew_weight = data.data.xuWeightAddPrice || 0
this.ratioForm.first_weight = data.data.firstWeightAddRate || 0 this.ratioForm.first_weight = (data.data.firstWeightAddRate || 0) * 100
this.ratioForm.renew_weight = data.data.xuWeightAddRate || 0 this.ratioForm.renew_weight = (data.data.xuWeightAddRate || 0) * 100
} }
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
...@@ -108,8 +108,8 @@ export default { ...@@ -108,8 +108,8 @@ export default {
type, type,
firstWeightAddPrice: this.sumForm.first_weight, firstWeightAddPrice: this.sumForm.first_weight,
xuWeightAddPrice: this.sumForm.renew_weight, xuWeightAddPrice: this.sumForm.renew_weight,
firstWeightAddRate: this.ratioForm.first_weight, firstWeightAddRate: this.ratioForm.first_weight / 100,
xuWeightAddRate: this.ratioForm.renew_weight xuWeightAddRate: this.ratioForm.renew_weight / 100
} }
this.$http({ this.$http({
url: this.$http.adornUrl(`proxy/expressage/priceSetting/save`), url: this.$http.adornUrl(`proxy/expressage/priceSetting/save`),
......
<template> <template>
<div> <div>
<sys-set-table :key="tabName" :loading="tableDataLoading" :data="tableData" @refresh="refresh"></sys-set-table> <sys-set-table :key="tabName" :tabName="'kaiguan'" :loading="tableDataLoading" :data="tableData" settingType="platform" @refresh="refresh"></sys-set-table>
</div> </div>
</template> </template>
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
}) => { }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.tableDataLoading = false this.tableDataLoading = false
let returnData = data.data; let returnData = data.data || [];
this.tableData = returnData this.tableData = returnData
} }
}) })
......
<template>
<div>
<sys-set-table :key="tabName" :tabName="tabName" :loading="tableDataLoading" :data="tableData" @refresh="refresh"></sys-set-table>
</div>
</template>
<script>
import sysSetTable from '@/components/sysSetTable'
export default {
props: {
tabName: {
type: String,
default: ''
}
},
components: {
sysSetTable
},
watch: {
tabName: {
handler(val) {
if (val == 'xitong') {
this.getData()
}
},
immediate: true,
}
},
data() {
return {
tableDataLoading: false,
tableData: [],
}
},
activated() {
if (this.tabName == 'xitong')
this.getData();
},
methods: {
// 获取数据列表
getData() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl(`common/type/condition/xitong`),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.tableDataLoading = false
let returnData = data.data;
this.tableData = returnData
}
})
},
refresh() {
this.getData();
}
}
}
</script>
<style></style>
\ No newline at end of file
<template>
<div>
<sys-set-table :key="tabName" :tabName="tabName" :loading="tableDataLoading" :data="tableData" @refresh="refresh"></sys-set-table>
</div>
</template>
<script>
import sysSetTable from '@/components/sysSetTable'
export default {
props: {
tabName: {
type: String,
default: ''
}
},
components: {
sysSetTable
},
watch: {
tabName: {
handler(val) {
if (val == 'gongzhonghao') {
this.getData()
}
},
immediate: true,
}
},
data() {
return {
tableDataLoading: false,
tableData: [],
}
},
activated() {
if (this.tabName == 'gongzhonghao')
this.getData();
},
methods: {
// 获取数据列表
getData() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl(`common/type/condition/gongzhonghao`),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.tableDataLoading = false
let returnData = data.data;
this.tableData = returnData
}
})
},
refresh() {
this.getData();
}
}
}
</script>
<style></style>
\ No newline at end of file
<template>
<div>
<sys-set-table :key="tabName" :tabName="tabName" :loading="tableDataLoading" :data="tableData" @refresh="refresh"></sys-set-table>
</div>
</template>
<script>
import sysSetTable from '@/components/sysSetTable'
export default {
props: {
tabName: {
type: String,
default: ''
}
},
components: {
sysSetTable
},
watch: {
tabName: {
handler(val) {
if (val == 'image') {
this.getData()
}
},
immediate: true,
}
},
data() {
return {
tableDataLoading: false,
tableData: [],
}
},
activated() {
if (this.tabName == 'image')
this.getData();
},
methods: {
// 获取数据列表
getData() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl(`common/type/condition/image`),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.tableDataLoading = false
let returnData = data.data || [];
this.tableData = returnData
}
})
},
refresh() {
this.getData();
}
}
}
</script>
<style></style>
\ No newline at end of file
<template> <template>
<div class="setting_wrapper"> <div class="setting_wrapper">
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane label="服务费配置" name="fuwufei" lazy> <el-tab-pane label="全局系统配置" name="xitong" lazy>
<cover-charge :tabName="activeName" ></cover-charge> <global-setting :tabName="activeName" ></global-setting>
</el-tab-pane> </el-tab-pane>
<!-- <el-tab-pane label="服务费配置" name="fuwufei" lazy>
<cover-charge :tabName="activeName" ></cover-charge>
</el-tab-pane> -->
<el-tab-pane label="短信配置" name="duanxin" lazy> <el-tab-pane label="短信配置" name="duanxin" lazy>
<note-setting :tabName="activeName"></note-setting> <note-setting :tabName="activeName"></note-setting>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="微信配置" name="weixin" lazy>
<weixin-setting :tabName="activeName"></weixin-setting>
</el-tab-pane>
<el-tab-pane label="公众号配置" name="gongzhonghao" lazy>
<gongzhonghao-setting :tabName="activeName"></gongzhonghao-setting>
</el-tab-pane>
<el-tab-pane label="图片配置" name="image" lazy>
<image-setting :tabName="activeName"></image-setting>
</el-tab-pane>
<!-- <el-tab-pane label="公众号通知(订阅消息)通知商家" name="tongzhi" lazy> <!-- <el-tab-pane label="公众号通知(订阅消息)通知商家" name="tongzhi" lazy>
<notice-setting :tabName="activeName"></notice-setting> <notice-setting :tabName="activeName"></notice-setting>
</el-tab-pane> --> </el-tab-pane> -->
<el-tab-pane label="渠道管理" name="qudao" lazy> <!-- <el-tab-pane label="渠道管理" name="qudao" lazy>
<channel-setting :tabName="activeName"></channel-setting> <channel-setting :tabName="activeName"></channel-setting>
</el-tab-pane> </el-tab-pane> -->
<el-tab-pane label="协议配置" name="xieyi" lazy> <!-- <el-tab-pane label="协议配置" name="xieyi" lazy>
<agreement-setting :tabName="activeName"></agreement-setting> <agreement-setting :tabName="activeName"></agreement-setting>
</el-tab-pane> </el-tab-pane> -->
</el-tabs> </el-tabs>
</div> </div>
</template> </template>
...@@ -24,16 +36,24 @@ ...@@ -24,16 +36,24 @@
import moment from 'moment'; import moment from 'moment';
import coverCharge from '@/views/setting/coverCharge'; import coverCharge from '@/views/setting/coverCharge';
import noteSetting from '@/views/setting/noteSetting'; import noteSetting from '@/views/setting/noteSetting';
import weixinSetting from '@/views/setting/weixinSetting';
import agreementSetting from '@/views/setting/agreementSetting'; import agreementSetting from '@/views/setting/agreementSetting';
import channelSetting from '@/views/setting/channelSetting'; import channelSetting from '@/views/setting/channelSetting';
import noticeSetting from '@/views/setting/noticeSetting'; import noticeSetting from '@/views/setting/noticeSetting';
import globalSetting from '@/views/setting/globalSetting';
import imageSetting from '@/views/setting/imageSetting';
import gongzhonghaoSetting from '@/views/setting/gongzhonghaoSetting';
export default { export default {
components: { components: {
coverCharge, coverCharge,
noteSetting, noteSetting,
weixinSetting,
agreementSetting, agreementSetting,
channelSetting, channelSetting,
noticeSetting noticeSetting,
globalSetting,
imageSetting,
gongzhonghaoSetting
}, },
data() { data() {
return { return {
...@@ -59,7 +79,7 @@ export default { ...@@ -59,7 +79,7 @@ export default {
}, },
}, },
created() { created() {
this.activeName = 'fuwufei' this.activeName = 'xitong'
}, },
}; };
</script> </script>
......
<template> <template>
<div> <div>
<sys-set-table :key="tabName" :loading="tableDataLoading" :data="tableData" @refresh="refresh"></sys-set-table> <sys-set-table :key="tabName" :tabName="tabName" :loading="tableDataLoading" :data="tableData" @refresh="refresh"></sys-set-table>
</div> </div>
</template> </template>
......
<template>
<div>
<sys-set-table :key="tabName" :tabName="tabName" :loading="tableDataLoading" :data="tableData" @refresh="refresh"></sys-set-table>
</div>
</template>
<script>
import sysSetTable from '@/components/sysSetTable'
export default {
props: {
tabName: {
type: String,
default: ''
}
},
components: {
sysSetTable
},
watch: {
tabName: {
handler(val) {
if (val == 'weixin') {
this.getData()
}
},
immediate: true,
}
},
data() {
return {
tableDataLoading: false,
tableData: [],
}
},
activated() {
if (this.tabName == 'weixin')
this.getData();
},
methods: {
// 获取数据列表
getData() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl(`common/type/condition/weixin`),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.tableDataLoading = false
let returnData = data.data;
this.tableData = returnData
}
})
},
refresh() {
this.getData();
}
}
}
</script>
<style></style>
\ No newline at end of file
...@@ -155,7 +155,8 @@ ...@@ -155,7 +155,8 @@
</td> </td>
<th class="border-bt">unionId</th> <th class="border-bt">unionId</th>
<td class="border-bt"> <td class="border-bt">
{{ tableData && tableData.userEntity && tableData.userEntity.unionId ? tableData.userEntity.unionId : '-' }}</td> {{ tableData && tableData.userEntity && tableData.userEntity.unionId ?
tableData.userEntity.unionId : '-' }}</td>
<th class="border-bt"></th> <th class="border-bt"></th>
<td class="border-bt border-rt"> <td class="border-bt border-rt">
</td> </td>
...@@ -167,6 +168,10 @@ ...@@ -167,6 +168,10 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="我的订单" name="jiedan"> <el-tab-pane label="我的订单" name="jiedan">
<el-table v-loading="tableDataLoading" :data="userDataJ.list"> <el-table v-loading="tableDataLoading" :data="userDataJ.list">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column prop="expressageId" label="编号" width="80" fixed="left"> <el-table-column prop="expressageId" label="编号" width="80" fixed="left">
</el-table-column> </el-table-column>
<el-table-column prop="nickName" label="订单信息" width="370"> <el-table-column prop="nickName" label="订单信息" width="370">
...@@ -543,6 +548,10 @@ ...@@ -543,6 +548,10 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="提现记录" name="sixth"> <el-tab-pane label="提现记录" name="sixth">
<el-table v-loading="tableDataLoading" :data="withdrawData.list"> <el-table v-loading="tableDataLoading" :data="withdrawData.list">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column fixed prop="id" label="编号" width="80"> <el-table-column fixed prop="id" label="编号" width="80">
</el-table-column> </el-table-column>
<el-table-column prop="zhifubao" label="支付宝账号" width="150"> <el-table-column prop="zhifubao" label="支付宝账号" width="150">
...@@ -587,6 +596,10 @@ ...@@ -587,6 +596,10 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="钱包明细" name="eighth"> <el-tab-pane label="钱包明细" name="eighth">
<el-table v-loading="tableDataLoading" :data="walletData.records"> <el-table v-loading="tableDataLoading" :data="walletData.records">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column prop="id" label="编号" width="100"></el-table-column> <el-table-column prop="id" label="编号" width="100"></el-table-column>
<el-table-column prop="title" label="标题" width="220"></el-table-column> <el-table-column prop="title" label="标题" width="220"></el-table-column>
<el-table-column prop="content" label="内容"></el-table-column> <el-table-column prop="content" label="内容"></el-table-column>
...@@ -625,6 +638,10 @@ ...@@ -625,6 +638,10 @@
</el-button> </el-button>
</div> --> </div> -->
<el-table v-loading="tableDataLoading" :data="sendData.list"> <el-table v-loading="tableDataLoading" :data="sendData.list">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column prop="expressageId" label="编号" width="80" fixed="left"> <el-table-column prop="expressageId" label="编号" width="80" fixed="left">
</el-table-column> </el-table-column>
<el-table-column prop="nickName" label="订单信息" width="370"> <el-table-column prop="nickName" label="订单信息" width="370">
...@@ -1047,6 +1064,10 @@ ...@@ -1047,6 +1064,10 @@
</el-row> </el-row>
</div> </div>
<el-table v-loading="tableDataLoading" :data="tableData3.list"> <el-table v-loading="tableDataLoading" :data="tableData3.list">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column prop="userId" label="编号" width="80"></el-table-column> <el-table-column prop="userId" label="编号" width="80"></el-table-column>
<el-table-column prop="userName" label="用户名"> <el-table-column prop="userName" label="用户名">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -1073,6 +1094,10 @@ ...@@ -1073,6 +1094,10 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="我的优惠券" name="youhuiquan"> <el-tab-pane label="我的优惠券" name="youhuiquan">
<el-table v-loading="tableDataLoading" :data="youhuiquanData.list"> <el-table v-loading="tableDataLoading" :data="youhuiquanData.list">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column prop="id" label="编号" width="80"> <el-table-column prop="id" label="编号" width="80">
</el-table-column> </el-table-column>
<el-table-column prop="couponName" label="优惠券名称" width="150"> <el-table-column prop="couponName" label="优惠券名称" width="150">
...@@ -1108,6 +1133,10 @@ ...@@ -1108,6 +1133,10 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="我的粉丝" name="dailishang"> <el-tab-pane label="我的粉丝" name="dailishang">
<el-table v-loading="tableDataLoading" :data="dailituiguangData.list"> <el-table v-loading="tableDataLoading" :data="dailituiguangData.list">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column prop="userId" label="编号" width="80"></el-table-column> <el-table-column prop="userId" label="编号" width="80"></el-table-column>
<el-table-column prop="userName" label="用户名"> <el-table-column prop="userName" label="用户名">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -1151,6 +1180,10 @@ ...@@ -1151,6 +1180,10 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="我的地址" name="dizhis"> <el-tab-pane label="我的地址" name="dizhis">
<el-table v-loading="tableDataLoading" :data="dizhiData.list"> <el-table v-loading="tableDataLoading" :data="dizhiData.list">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column prop="addressId" label="编号" width="100"></el-table-column> <el-table-column prop="addressId" label="编号" width="100"></el-table-column>
<el-table-column prop="userName" label="姓名"></el-table-column> <el-table-column prop="userName" label="姓名"></el-table-column>
<el-table-column prop="userPhone" label="电话"></el-table-column> <el-table-column prop="userPhone" label="电话"></el-table-column>
...@@ -1180,6 +1213,10 @@ ...@@ -1180,6 +1213,10 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="会员开通记录" name="vips"> <el-tab-pane label="会员开通记录" name="vips">
<el-table v-loading="tableDataLoading" :data="huiyuanData.records"> <el-table v-loading="tableDataLoading" :data="huiyuanData.records">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column fixed prop="id" label="编号" width="80"> <el-table-column fixed prop="id" label="编号" width="80">
</el-table-column> </el-table-column>
<el-table-column prop="title" label="标题"> <el-table-column prop="title" label="标题">
...@@ -1216,6 +1253,10 @@ ...@@ -1216,6 +1253,10 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="优惠券购买记录" name="yiuhuiquanM"> <el-tab-pane label="优惠券购买记录" name="yiuhuiquanM">
<el-table v-loading="tableDataLoading" :data="huiyuanData.records"> <el-table v-loading="tableDataLoading" :data="huiyuanData.records">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column fixed prop="id" label="编号" width="80"> <el-table-column fixed prop="id" label="编号" width="80">
</el-table-column> </el-table-column>
<el-table-column prop="title" label="标题"> <el-table-column prop="title" label="标题">
...@@ -1301,7 +1342,7 @@ ...@@ -1301,7 +1342,7 @@
</div> </div>
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">头像:</span> <span style="width: 200px;display: inline-block;text-align: right;">头像:</span>
<div <!-- <div
style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;display: inline-block;"> style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;display: inline-block;">
<el-upload class="avatar-uploader" v-model="imageUser" <el-upload class="avatar-uploader" v-model="imageUser"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false" action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
...@@ -1311,7 +1352,8 @@ ...@@ -1311,7 +1352,8 @@
<i v-else class="el-icon-plus avatar-uploader-icon" <i v-else class="el-icon-plus avatar-uploader-icon"
style="font-size: 28px;color: #8c939d"></i> style="font-size: 28px;color: #8c939d"></i>
</el-upload> </el-upload>
</div> </div> -->
<upload-image v-model="imageUser" @input="handleAvatarSuccess1"></upload-image>
</div> </div>
</div> </div>
...@@ -1803,7 +1845,9 @@ import { ...@@ -1803,7 +1845,9 @@ import {
CodeToText, CodeToText,
TextToCode TextToCode
} from 'element-china-area-data' } from 'element-china-area-data'
import UploadImage from '@/components/UploadImage'
export default { export default {
components: { UploadImage },
data() { data() {
return { return {
openValue: 1, openValue: 1,
...@@ -3487,4 +3531,5 @@ export default { ...@@ -3487,4 +3531,5 @@ export default {
.text_color span { .text_color span {
margin-right: 5px; margin-right: 5px;
}</style> }
</style>
...@@ -1266,7 +1266,7 @@ ...@@ -1266,7 +1266,7 @@
</div> </div>
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">头像:</span> <span style="width: 200px;display: inline-block;text-align: right;">头像:</span>
<div <!-- <div
style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;display: inline-block;"> style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;display: inline-block;">
<el-upload class="avatar-uploader" v-model="imageUser" <el-upload class="avatar-uploader" v-model="imageUser"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false" action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
...@@ -1275,7 +1275,8 @@ ...@@ -1275,7 +1275,8 @@
<i v-else class="el-icon-plus avatar-uploader-icon" <i v-else class="el-icon-plus avatar-uploader-icon"
style="font-size: 28px;color: #8c939d"></i> style="font-size: 28px;color: #8c939d"></i>
</el-upload> </el-upload>
</div> </div> -->
<upload-image v-model="imageUser" @input="handleAvatarSuccess1"></upload-image>
</div> </div>
</div> </div>
...@@ -1761,7 +1762,9 @@ import { ...@@ -1761,7 +1762,9 @@ import {
CodeToText, CodeToText,
TextToCode TextToCode
} from 'element-china-area-data' } from 'element-china-area-data'
import UploadImage from '@/components/UploadImage'
export default { export default {
components: { UploadImage },
data() { data() {
return { return {
openValue: 1, openValue: 1,
...@@ -3445,4 +3448,5 @@ export default { ...@@ -3445,4 +3448,5 @@ export default {
.text_color span { .text_color span {
margin-right: 5px; margin-right: 5px;
}</style> }
</style>
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
icon="document" @click="addNotice">添加会员特权</el-button> icon="document" @click="addNotice">添加会员特权</el-button>
</div> </div>
<el-table v-loading="tableDataLoading" :data="tableData.list"> <el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column fixed prop="memberId" label="编号" width="50"> <el-table-column fixed prop="memberId" label="编号" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="memberImg" label="图片"> <el-table-column prop="memberImg" label="图片">
<template slot-scope="scope"> <template slot-scope="scope">
  <img :src="scope.row.memberImg" width="60" height="60" /> <img :src="scope.row.memberImg" width="60" height="60" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="memberName" label="特权名称"> <el-table-column prop="memberName" label="特权名称">
...@@ -29,14 +29,14 @@ ...@@ -29,14 +29,14 @@
</el-table> </el-table>
<div style="text-align: center;margin-top: 10px;"> <div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[10, 20, 30, 50, 100]" :page-size="limit" :current-page="page" layout="total,sizes, prev, pager, next,jumper" :page-sizes="[10, 20, 30, 50, 100]" :page-size="limit" :current-page="page"
:total="tableData.totalCount"> layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
</el-pagination> </el-pagination>
</div> </div>
<el-dialog :title="title" :visible.sync="dialogFormVisible" center> <el-dialog :title="title" :visible.sync="dialogFormVisible" center>
<div style="margin-bottom: 10px;display: flex;"> <div style="margin-bottom: 10px;display: flex;">
<span style="width: 200px;display: inline-block;text-align: right;">图片:</span> <span style="width: 200px;display: inline-block;text-align: right;">图片:</span>
<div style=" width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;"> <!-- <div style=" width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
v-model="memberImg" v-model="memberImg"
...@@ -47,15 +47,17 @@ ...@@ -47,15 +47,17 @@
<img v-if="memberImg" :src="memberImg" class="avatar" style="border-radius: 6px;width: 148px;height: 148px;"/> <img v-if="memberImg" :src="memberImg" class="avatar" style="border-radius: 6px;width: 148px;height: 148px;"/>
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
</div> </div> -->
</div> <upload-image v-model="memberImg" @input="handleAvatarSuccess"></upload-image>
<div style="margin-bottom: 10px;"> </div>
<span style="width: 200px;display: inline-block;text-align: right;">名称:</span>
<el-input style="width:50%;" v-model="memberName" placeholder="请输入名称"></el-input>
</div>
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">排序:</span> <span style="width: 200px;display: inline-block;text-align: right;">名称:</span>
<el-input style="width:50%;" v-model="sort" placeholder="请输入排序" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"></el-input> <el-input style="width:50%;" v-model="memberName" placeholder="请输入名称"></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">排序:</span>
<el-input style="width:50%;" v-model="sort" placeholder="请输入排序"
onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"></el-input>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button> <el-button @click="dialogFormVisible = false">取 消</el-button>
...@@ -66,177 +68,179 @@ ...@@ -66,177 +68,179 @@
</template> </template>
<script> <script>
export default { import UploadImage from '@/components/UploadImage'
data() {
return { export default {
page:1, components: { UploadImage },
limit:10, data() {
tableDataLoading: true, return {
dialogFormVisible:false, page: 1,
tableData: [], limit: 10,
memberName:'', tableDataLoading: true,
memberImg:'', dialogFormVisible: false,
memberId:'', tableData: [],
sort:'', memberName: '',
title:'添加' memberImg: '',
memberId: '',
sort: '',
title: '添加'
}
},
methods: {
// 获取数据列表
dataSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('member/selectMemberPage'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit
})
}).then(({
data
}) => {
if (data && data.code === 0) {
console.log('会员列表', data)
this.tableDataLoading = false
let returnData = data.data;
this.tableData = returnData;
}
})
},
//上传成功
handleAvatarSuccess(file) {
this.memberImg = file.data
},
addNotice() {
this.dialogFormVisible = true
},
handleCurrentChange(val) {
this.page = val
this.dataSelect()
},
handleSizeChange(val) {
this.limit = val
this.dataSelect()
},
// 添加banner图
addNoticeTo() {
if (this.memberImg == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传图片',
type: 'warning'
});
return
}
if (this.memberName == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入名称',
type: 'warning'
});
return
} }
this.classify = 1
if (this.title == '添加') {
var url = 'member/insertMember'
} else {
var url = 'member/updateMember'
}
this.$http({
url: this.$http.adornUrl(url),
method: 'post',
data: this.$http.adornData({
'memberImg': this.memberImg,
'memberId': this.memberId,
'memberName': this.memberName,
'sort': this.sort
})
}).then(({ data }) => {
this.dialogFormVisible = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.memberImg = ''
this.memberId = ''
this.memberName = ''
this.sort = ''
this.title = '添加'
this.dataSelect()
}
})
})
},
// 修改
amendBanner(index, rows, a) {
if (a == 1) {
this.pl = 1
} else {
this.pl = 0
}
this.dialogFormVisible = true
this.id = rows.id
this.memberImg = rows.memberImg
this.memberId = rows.memberId
this.sort = rows.sort
this.memberName = rows.memberName
this.title = '修改'
},
// 修改
amendNoticeTo() {
this.$http({
url: this.$http.adornUrl(`?memberId=${this.memberId}&memberImg=${this.memberImg}&sort=${this.sort}&memberName=${this.memberName}`),
method: 'post',
data: this.$http.adornData({
})
}).then(({ data }) => {
this.dialogFormVisible = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
})
}, },
methods: { //删除一级
// 获取数据列表 deletes(row) {
dataSelect() { let delid = row.memberId
this.tableDataLoading = true this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({ this.$http({
url: this.$http.adornUrl('member/selectMemberPage'), url: this.$http.adornUrl(`member/deleteMemberById/?memberId=${delid}`),
method: 'get', method: 'post',
params: this.$http.adornParams({ data: this.$http.adornData({})
'page': this.page,
'limit': this.limit
})
}).then(({ }).then(({
data data
}) => { }) => {
if (data && data.code === 0) { this.$message({
console.log('会员列表',data) message: '删除成功',
this.tableDataLoading = false type: 'success',
let returnData = data.data; duration: 1500,
this.tableData = returnData; onClose: () => {
} this.dataSelect()
}
})
},
//上传成功
handleAvatarSuccess(file) {
this.memberImg= file.data
},
addNotice(){
this.dialogFormVisible = true
},
handleCurrentChange(val){
this.page = val
this.dataSelect()
},
handleSizeChange(val){
this.limit = val
this.dataSelect()
},
// 添加banner图
addNoticeTo(){
if (this.memberImg == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传图片',
type: 'warning'
});
return
}
if (this.memberName == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入名称',
type: 'warning'
});
return
}
this.classify = 1
if(this.title=='添加'){
var url = 'member/insertMember'
}else{
var url = 'member/updateMember'
}
this.$http({
url: this.$http.adornUrl(url),
method: 'post',
data: this.$http.adornData({
'memberImg':this.memberImg,
'memberId':this.memberId,
'memberName':this.memberName,
'sort':this.sort
})
}).then(({data}) => {
this.dialogFormVisible = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.memberImg = ''
this.memberId = ''
this.memberName=''
this.sort = ''
this.title ='添加'
this.dataSelect()
}
})
})
},
// 修改
amendBanner(index,rows,a){
if(a==1){
this.pl = 1
}else{
this.pl = 0
}
this.dialogFormVisible = true
this.id = rows.id
this.memberImg = rows.memberImg
this.memberId = rows.memberId
this.sort = rows.sort
this.memberName = rows.memberName
this.title = '修改'
},
// 修改
amendNoticeTo(){
this.$http({
url: this.$http.adornUrl(`?memberId=${this.memberId}&memberImg=${this.memberImg}&sort=${this.sort}&memberName=${this.memberName}`),
method: 'post',
data: this.$http.adornData({
})
}).then(({data}) => {
this.dialogFormVisible = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
})
},
//删除一级
deletes(row) {
let delid = row.memberId
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl(`member/deleteMemberById/?memberId=${delid}`),
method: 'post',
data: this.$http.adornData({})
}).then(({
data
}) => {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
}) })
}).catch(() => {}) })
}, }).catch(() => { })
}, },
mounted() { },
this.dataSelect() mounted() {
} this.dataSelect()
} }
}
</script> </script>
<style> <style></style>
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!