Commit 696d65ed by leic

last release

1 parent bf8b905e
Showing with 1040 additions and 665 deletions
......@@ -78,6 +78,8 @@ module.exports = {
loader: 'url-loader',
options: {
limit: 10000,
// 解决打包编译后icon不显示问题
publicPath: '../../',
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
......
var gulp = require('gulp');
var cleanCSS = require('gulp-clean-css')
var cssWrap = require('gulp-css-wrap')
var merge = require('merge-stream');
var $ = require('gulp-load-plugins')();
var path = require('path');
var del = require('del');
var gulp = require("gulp");
var rev = require("gulp-rev");
var revCollector = require("gulp-rev-collector");
var cleanCSS = require("gulp-clean-css");
var cssWrap = require("gulp-css-wrap");
var merge = require("merge-stream");
var $ = require("gulp-load-plugins")();
var path = require("path");
var del = require("del");
var distPath = path.resolve('./dist');
var version = ''; // 版本号
var versionPath = ''; // 版本号路径
var env = ''; // 运行环境
var distPath = path.resolve("./dist");
var version = ""; // 版本号
var versionPath = ""; // 版本号路径
var env = ""; // 运行环境
// 创建版本号(年月日时分)
(function () {
var d = new Date();
var yy = d.getFullYear().toString().slice(2);
var MM = d.getMonth() + 1 >= 10 ? (d.getMonth() + 1) : '0' + (d.getMonth() + 1);
var DD = d.getDate() >= 10 ? d.getDate() : '0' + d.getDate();
var h = d.getHours() >= 10 ? d.getHours() : '0' + d.getHours();
var mm = d.getMinutes() >= 10 ? d.getMinutes() : '0' + d.getMinutes();
version = yy + MM + DD + h + mm;
versionPath = distPath + '/' + version;
(function() {
var d = new Date();
var yy = d
.getFullYear()
.toString()
.slice(2);
var MM =
d.getMonth() + 1 >= 10 ? d.getMonth() + 1 : "0" + (d.getMonth() + 1);
var DD = d.getDate() >= 10 ? d.getDate() : "0" + d.getDate();
var h = d.getHours() >= 10 ? d.getHours() : "0" + d.getHours();
var mm = d.getMinutes() >= 10 ? d.getMinutes() : "0" + d.getMinutes();
version = yy + MM + DD + h + mm;
versionPath = distPath + "/" + version;
})();
// 编译
gulp.task('build', $.shell.task([ 'node build/build.js' ]));
gulp.task("build", $.shell.task(["node build/build.js"]));
// 创建版本号目录
gulp.task('create:versionCatalog', ['build'], function () {
return gulp.src(`${distPath}/static/**/*`)
.pipe(gulp.dest(`${versionPath}/static/`))
gulp.task("create:versionCatalog", ["build"], function() {
return gulp
.src(`${distPath}/static/**/*`)
.pipe(gulp.dest(`${versionPath}/static/`));
});
// 替换${versionPath}/static/js/manifest.js window.SITE_CONFIG.cdnUrl占位变量
gulp.task('replace:cdnUrl', ['create:versionCatalog'], function () {
return gulp.src(`${versionPath}/static/js/manifest.js`)
.pipe($.replace(new RegExp(`"${require('./config').build.assetsPublicPath}"`, 'g'), 'window.SITE_CONFIG.cdnUrl + "/"'))
.pipe(gulp.dest(`${versionPath}/static/js/`))
gulp.task("replace:cdnUrl", ["create:versionCatalog"], function() {
return gulp
.src(`${versionPath}/static/js/manifest.js`)
.pipe(
$.replace(
new RegExp(
`"${require("./config").build.assetsPublicPath}"`,
"g"
),
'window.SITE_CONFIG.cdnUrl + "/"'
)
)
.pipe(gulp.dest(`${versionPath}/static/js/`));
});
// 替换${versionPath}/static/config/index-${env}.js window.SITE_CONFIG['version']配置变量
gulp.task('replace:version', ['create:versionCatalog'], function () {
return gulp.src(`${versionPath}/static/config/index-${env}.js`)
.pipe($.replace(/window.SITE_CONFIG\['version'\] = '.*'/g, `window.SITE_CONFIG['version'] = '${version}'`))
.pipe(gulp.dest(`${versionPath}/static/config/`))
gulp.task("replace:version", ["create:versionCatalog"], function() {
return gulp
.src(`${versionPath}/static/config/index-${env}.js`)
.pipe(
$.replace(
/window.SITE_CONFIG\['version'\] = '.*'/g,
`window.SITE_CONFIG['version'] = '${version}'`
)
)
.pipe(gulp.dest(`${versionPath}/static/config/`));
});
// 合并${versionPath}/static/config/[index-${env}, init].js 至 ${distPath}/config/index.js
gulp.task('concat:config', ['replace:version'], function () {
return gulp.src([`${versionPath}/static/config/index-${env}.js`, `${versionPath}/static/config/init.js`])
.pipe($.concat('index.js'))
.pipe(gulp.dest(`${distPath}/config/`))
gulp.task("concat:config", ["replace:version"], function() {
return gulp
.src([
`${versionPath}/static/config/index-${env}.js`,
`${versionPath}/static/config/init.js`
])
.pipe($.concat("index.js"))
.pipe(rev()) //添加md5,防止缓存
.pipe(gulp.dest(`${versionPath}/static/config`)) // 将生成的hash文件添加到打包目录
.pipe(rev.manifest("js-rev.json"))
.pipe(gulp.dest(`${versionPath}/static/config`))// 将map映射文件添加到打包目录
});
// 清空
gulp.task('clean', function () {
return del([versionPath])
gulp.task("revhtml", ["concat:config"], function() {
return gulp
.src([`${versionPath}/static/config/js-rev.json`, `${distPath}/*.html`])
.pipe(
revCollector({
replaceReved: true //允许替换, 已经被替换过的文件
})
) // 把引用的js替换成有版本号的名字
.pipe(gulp.dest(distPath));
});
gulp.task('default', ['clean'], function () {
// 获取环境配置
env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat ? 'uat' : 'prod'
// 开始打包编译
gulp.start(['build', 'create:versionCatalog', 'replace:cdnUrl', 'replace:version', 'concat:config'], function () {
// 清除, 编译 / 处理项目中产生的文件
del([`${distPath}/static`, `${versionPath}/static/config`])
})
// 清空
gulp.task("clean", function() {
return del([versionPath, `${distPath}/config`]);
});
gulp.task("default", ["clean"], function() {
// 获取环境配置
env = process.env.npm_config_qa
? "qa"
: process.env.npm_config_uat
? "uat"
: "prod";
// 开始打包编译
gulp.start(
[
"build",
"create:versionCatalog",
"replace:cdnUrl",
"replace:version",
"concat:config",
"revhtml"
],
function() {
// 清除, 编译 / 处理项目中产生的文件
del([
`${distPath}/static`,
`${versionPath}/static/config/index-${env}.js`,
`${versionPath}/static/config/init.js`,
`${versionPath}/static/config/index.js`,
`${versionPath}/static/config/js-rev.json`,
]);
}
);
});
// 主题清空
gulp.task("theme-clean", function() {
return del(['./src/assets/theme/theme_0BB2D4/index.css','./src/assets/theme/theme_3E8EF7/index.css','./src/assets/theme/theme_11C26D/index.css','./src/assets/theme/theme_9463F7/index.css']);
});
// 名为themeTask的任务
gulp.task('themetask', function () {
//主题1
var theme_0BB2D4 = gulp.src(path.resolve('./src/element-ui-theme/element-#0BB2D4/index.css')) // 需要添加类名的css文件,支持正则表达式
.pipe(cssWrap({ selector: '.theme_0BB2D4' })) // 添加的类名
.pipe(cleanCSS())
.pipe(gulp.dest('./src/assets/theme/theme_0BB2D4'));// 生成的css文件存放的目录
//主题2
var theme_3E8EF7 = gulp.src(path.resolve('./src/element-ui-theme/element-#3E8EF7/index.css')) // 需要添加类名的css文件,支持正则表达式
.pipe(cssWrap({ selector: '.theme_3E8EF7' })) // 添加的类名
.pipe(cleanCSS())
.pipe(gulp.dest('./src/assets/theme/theme_3E8EF7'));// 生成的css文件存放的目录
//主题3
var theme_11C26D = gulp.src(path.resolve('./src/element-ui-theme/element-#11C26D/index.css')) // 需要添加类名的css文件,支持正则表达式
.pipe(cssWrap({ selector: '.theme_11C26D' })) // 添加的类名
.pipe(cleanCSS())
.pipe(gulp.dest('./src/assets/theme/theme_11C26D'));// 生成的css文件存放的目录
//主题4
var theme_9463F7 = gulp.src(path.resolve('./src/element-ui-theme/element-#9463F7/index.css')) // 需要添加类名的css文件,支持正则表达式
.pipe(cssWrap({ selector: '.theme_9463F7' })) // 添加的类名
.pipe(cleanCSS())
.pipe(gulp.dest('./src/assets/theme/theme_9463F7'));// 生成的css文件存放的目录
return merge(theme_0BB2D4, theme_3E8EF7, theme_11C26D, theme_9463F7);
})
gulp.task("themetask", ['theme-clean'], function() {
//主题1
var theme_0BB2D4 = gulp
.src(path.resolve("./src/element-ui-theme/element-#0BB2D4/index.css")) // 需要添加类名的css文件,支持正则表达式
.pipe(cssWrap({ selector: ".theme_0BB2D4" })) // 添加的类名
.pipe(cleanCSS())
.pipe(gulp.dest("./src/assets/theme/theme_0BB2D4")); // 生成的css文件存放的目录
//主题2
var theme_3E8EF7 = gulp
.src(path.resolve("./src/element-ui-theme/element-#3E8EF7/index.css")) // 需要添加类名的css文件,支持正则表达式
.pipe(cssWrap({ selector: ".theme_3E8EF7" })) // 添加的类名
.pipe(cleanCSS())
.pipe(gulp.dest("./src/assets/theme/theme_3E8EF7")); // 生成的css文件存放的目录
//主题3
var theme_11C26D = gulp
.src(path.resolve("./src/element-ui-theme/element-#11C26D/index.css")) // 需要添加类名的css文件,支持正则表达式
.pipe(cssWrap({ selector: ".theme_11C26D" })) // 添加的类名
.pipe(cleanCSS())
.pipe(gulp.dest("./src/assets/theme/theme_11C26D")); // 生成的css文件存放的目录
//主题4
var theme_9463F7 = gulp
.src(path.resolve("./src/element-ui-theme/element-#9463F7/index.css")) // 需要添加类名的css文件,支持正则表达式
.pipe(cssWrap({ selector: ".theme_9463F7" })) // 添加的类名
.pipe(cleanCSS())
.pipe(gulp.dest("./src/assets/theme/theme_9463F7")); // 生成的css文件存放的目录
return merge(theme_0BB2D4, theme_3E8EF7, theme_11C26D, theme_9463F7);
});
......@@ -9,7 +9,7 @@
<title>裹裹快递上门取件寄快递系统</title>
<% if (process.env.NODE_ENV==='production' ) { %>
<!-- 生产环境 -->
<script>document.write('<script src="./config/index.js?t=' + new Date().getTime() + '"><\/script>');</script>
<!-- <script>document.write('<script src="./config/index.js?t=' + new Date().getTime() + '"><\/script>');</script> -->
<link rel="shortcut icon" type="image/x-icon" href="./static/img/favicon.ico">
<script src="./static/config/index.js"></script>
<script src="./static/plugins/mock-1.0.0-beta3/mock-min.js"></script>
......
......@@ -73,6 +73,9 @@
"gulp": "^3.9.1",
"gulp-clean-css": "^4.3.0",
"gulp-css-wrap": "^0.1.2",
"gulp-rev": "^8.1.0",
"gulp-rev-collector": "^1.3.3",
"gulp-sequence": "^1.0.0",
"html-webpack-plugin": "2.30.1",
"jest": "21.2.0",
"jest-serializer-vue": "0.3.0",
......
......@@ -7,10 +7,15 @@
<script>
import { setCookie } from './utils/cookie';
import { initTheme } from './utils/theme';
import { getBaseInfo } from '@/api/ldy/miniProgram'
export default {
created() {
// setCookie('token')
getBaseInfo().then(res => {
sessionStorage.setItem("mtoken", res.data.mtoken)
sessionStorage.setItem("btoken", res.data.btoken)
})
},
mounted() {
initTheme()
......
......@@ -51,3 +51,28 @@ export function preChargeSumDetailAPI(data) {
data: $http.adornData(data),
});
}
export function getMonth(data) {
return $http({
url: $http.adornLdyUrl('funds/bill/month'),
method: 'post',
data: $http.adornData(data),
source: 'cm'
})
}
export function getDate(data) {
return $http({
url: $http.adornLdyUrl('funds/bill/day'),
method: 'post',
data: $http.adornData(data),
source: 'cm'
})
}
// 获取分销员列表
export const distributorList = data => $http({
url: $http.adornLdyUrl('distribution/user/list'),
method: 'post',
data: $http.adornData(data),
});
......@@ -81,7 +81,7 @@ export function wxpayConfigSave(data) {
url: $http.adornLdyUrl("payments/wxpay/config/save"),
method: "post",
source: "cm",
data: $http.adornData(data),
data: data,
headers: {
"Content-Type": "multipart/form-data"
}
......
......@@ -519,6 +519,14 @@ img {
}
}
}
// 处理tabs基础样式被card样式覆盖
.el-tabs--top .el-tabs__item.is-top:nth-child(2) {
padding-left: 0 !important;
}
.el-tabs--top .el-tabs__item.is-top:last-child {
padding-right: 0 !important;
}
}
}
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
<template>
<div class="setting_container" @click="openSetting">
<div v-show="!isOpen" class="setting_container" @click="openSetting">
<span class="action-setting">
<svg viewBox="64 64 896 896" focusable="false" data-icon="setting" width="1em" height="1em" fill="currentColor"
aria-hidden="true">
......
<template>
<el-tooltip effect="dark" popper-class="my_tooltip" :content="content" placement="top" :disabled="isShowTooltip"
:open-delay="100">
<div :class="['text-wrap', multiLine ? 'multi' : '']" @mouseenter="onMouseenter">
<span ref="tooltipText">{{ text }}</span>
</div>
</el-tooltip>
</template>
<script>
import { Tooltip } from 'element-ui'
export default {
name: 'text-tooltip',
props: {
text: {
type: String,
default: ''
},
multiLine: {
type: Boolean,
default: false
}
},
components: {
Tooltip
},
data() {
return {
isShowTooltip: false,
content: "",
};
},
methods: {
onMouseenter() {
// 内容超出,显示文字提示内容
const tag = this.$refs.tooltipText;
const parentWidth = tag.parentNode.offsetWidth; // 获取元素父级可视宽度
const contentWidth = tag.offsetWidth; // 获取元素可视宽度
const parentHeight = tag.parentNode.clientHeight;
const contentHeight = tag.offsetHeight;
if (this.multiLine) {
// 如果是多行文本溢出
this.isShowTooltip = contentHeight <= parentHeight;
} else {
this.isShowTooltip = contentWidth <= parentWidth;
}
// 鼠标悬停后显示的内容
this.content = this.text;
}
},
};
</script>
<style scoped>
.my_tooltip {
max-width: 80%;
}
.text-wrap {
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.text-wrap.multi {
width: 100%;
overflow: hidden;
white-space: normal;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
</style>
\ No newline at end of file
<template>
<div class="images-list">
<el-upload v-if="showFileList" class="avatar-uploader" :action="uploadUrl" :before-upload="handleBeforeUpload"
:on-success="handleSuccess" :on-error="handleUploadError" :on-remove="handleRemove" :on-exceed="handleExceed"
:file-list="fileList" :multiple="fileLimit > 1" :data="paramsData" :limit="fileLimit" :list-type="listType"
:show-file-list="true">
<i v-if="listType === 'picture-card'" class="el-icon-plus"></i>
<el-button v-else size="small" type="primary">点击上传</el-button>
<div v-if="showTip" slot="tip" class="el-upload__tip">只能上传{{ fileTypeName || 'jpg/png' }}文件,且不超过 {{ fileSize }}MB
</div>
</el-upload>
<el-upload class="avatar-uploader" :action="uploadUrl" :before-upload="handleBeforeUpload" :on-success="handleSuccess"
:on-error="handleUploadError" :on-remove="handleRemove" :on-exceed="handleExceed" :multiple="false"
:show-file-list="false"
:data="paramsData" :list-type="listType">
<img v-if="value" :src="value" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
<div v-if="showTip" slot="tip" class="el-upload__tip">只能上传{{ fileTypeName || 'jpg/png' }}文件,且不超过 {{ fileSize }}MB
</div>
</el-upload>
</div>
</template>
<script>
export default {
props: {
// 值
value: [String, Object, Array],
// 大小限制(MB)
fileSize: {
type: Number,
default: 5,
},
// 文件类型, 例如["doc", "xls", "ppt", "txt", "pdf"]
fileType: {
type: Array,
default: () => ['png', 'jpg', 'jpeg'],
},
// 文件列表类型 text/picture/picture-card
listType: {
type: String,
default: 'picture'
},
// 是否显示提示
isShowTip: {
type: Boolean,
default: false
},
// 最大允许上传个数
fileLimit: {
type: Number,
default: 99
},
// 是否显示文件列表
showFileList: {
type: Boolean,
default: false
}
},
data() {
return {
uploadUrl: "https://xxxxxxxxxxxxxxxxxxx/upload", // 上传的图片服务器地址
paramsData: {
}, // 上传携带的参数,看需求要不要
fileList: [],
tempFileList: [] // 因为 fileList为只读属性,所以用了一个中间变量来进行数据改变的交互。
}
},
watch: {
value: {
handler: function (newVal, oldVa) {
this.tempFileList = newVal
},
immediate: true,
deep: true
}
},
computed: {
// 是否显示提示
showTip() {
return this.isShowTip && (this.fileType || this.fileSize);
},
fileTypeName() {
let typeName = ''
this.fileType.forEach(item => {
typeName += `${item},`
})
return typeName
},
fileAccept() {
let fileAccept = ''
this.fileType.forEach(element => {
fileAccept += `.${element},`
})
return fileAccept
}
},
created() {
console.log(this.value)
if (this.value) {
if (Array.isArray(this.value)) {
this.fileList = JSON.parse(JSON.stringify(this.value))
} else {
this.fileList = [{ name: '1', url: this.value }]
}
}
},
methods: {
// 上传前校检格式和大小
handleBeforeUpload(file) {
// 校检文件类型
if (this.fileType && file) {
let fileExtension = "";
if (file.name.lastIndexOf(".") > -1) {
fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
}
const isTypeOk = this.fileType.some((type) => {
if (file.type.indexOf(type) > -1) return true;
if (fileExtension && fileExtension.indexOf(type) > -1) return true;
return false;
});
if (!isTypeOk & file) {
this.$message.error(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
return false;
}
}
// 校检文件大小
if (this.fileSize && file) {
const isLt = file.size / 1024 / 1024 < this.fileSize;
if (!isLt) {
this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
return false;
}
}
return true;
},
handleUploadError(err) {
this.$message.error("上传失败, 请重试");
},
// 文件个数超出
handleExceed() {
this.$message.error(`超出上传文件个数,请删除以后再上传!`);
},
// 文件上传成功的钩子
handleSuccess(res, file, fileList) {
this.$message.success("上传成功")
this.changeFileList(fileList)
},
// 文件列表移除文件时的钩子
handleRemove(file, fileList) {
this.changeFileList(fileList)
},
// 文件列表改变的时候,更新组件的v-model的文的数据
changeFileList(fileList) {
const tempFileList = fileList.map(item => {
let tempItem = {
name: item.name,
url: item.response ? item.response.url : item.url
}
return tempItem
})
this.$emit("input", tempFileList)
}
},
}
</script>
<style lang="scss" scoped>
.images-list {
// border: 1px dashed #d5d5d5;
// padding: 10px;
// border-radius: 4px;
// background: #fff;
.avatar-uploader {
/deep/ .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
&:hover {
border-color: var(--primary-color);
}
}
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 178px;
height: 178px;
line-height: 178px;
text-align: center;
}
.avatar {
width: 178px;
height: 178px;
display: block;
}
}
</style>
\ No newline at end of file
<template>
<div class="images-list">
<el-upload v-if="multiple" class="avatar-uploader" accept="image/*" :action="uploadUrl"
:before-upload="handleBeforeUpload" :on-success="handleSuccess" :on-error="handleUploadError"
:on-remove="handleRemove" :on-preview="handlePictureCardPreview" :on-exceed="handleExceed" :multiple="multiple"
:file-list="fileList" :limit="fileLimit" :show-file-list="false" list-type="picture-card" :data="paramsData">
<i class="el-icon-plus"></i>
<div v-if="showTip" slot="tip" class="el-upload__tip">只能上传{{ fileTypeName || 'jpg/png' }}文件,且不超过 {{ fileSize }}MB
</div>
</el-upload>
<el-upload v-else class="avatar-uploader" accept="image/*" :action="uploadUrl" :before-upload="handleBeforeUpload"
:on-success="handleSuccess" :on-error="handleUploadError" :on-remove="handleRemove"
:on-preview="handlePictureCardPreview" :on-exceed="handleExceed" :show-file-list="false" list-type="picture"
:data="paramsData">
<template v-if="value">
<img :src="value" class="avatar">
<span class="upload-action" @click.stop="() => { }">
<span><i class="el-icon-zoom-in" @click.stop="handlePictureCardPreview({ url: value })"></i></span>
<span><i class="el-icon-delete" @click.stop="handleRemove([{ url: value }])"></i></span>
</span>
</template>
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
<div v-if="showTip" slot="tip" class="el-upload__tip">只能上传{{ fileTypeName || 'jpg/png' }}文件,且不超过 {{ fileSize }}MB
</div>
</el-upload>
<image-viewer
v-if="previewVisible"
:z-index="10000"
:urlList="previewList"
:on-close="onClose"></image-viewer>
<!-- <el-dialog :visible.sync="previewVisible" append-to-body>
<img width="100%" :src="previewUrl" alt="">
</el-dialog> -->
</div>
</template>
<script>
import moment from 'moment'
import getUpToken from '@/api/ldy/getUpToken'
import ImageViewer from "element-ui/packages/image/src/image-viewer";
export default {
props: {
// 值
value: [String, Object, Array],
// 大小限制(MB)
fileSize: {
type: Number,
default: 5,
},
// 文件类型, 例如["doc", "xls", "ppt", "txt", "pdf"]
fileType: {
type: Array,
default: () => ['png', 'jpg', 'jpeg'],
},
// 文件列表类型 text/picture/picture-card
listType: {
type: String,
default: 'picture'
},
// 是否显示提示
isShowTip: {
type: Boolean,
default: false
},
// 最大允许上传个数
fileLimit: {
type: Number,
default: 99
},
// 是否显示文件列表
showFileList: {
type: Boolean,
default: false
},
// 是否多选
multiple: {
type: Boolean,
default: false
},
// 上传样式
fileStyle: {
type: Object,
default: () => {
return {}
}
}
},
components: { ImageViewer },
data() {
return {
loading: false,
previewVisible: false,
previewUrl: '',
previewList: [],
uploadUrl: "//up.qbox.me", // 上传的图片服务器地址
paramsData: {
key: "",
token: ""
}, // 上传携带的参数,看需求要不要
fileList: [],
tempFileList: [], // 因为 fileList为只读属性,所以用了一个中间变量来进行数据改变的交互。
}
},
watch: {
value: {
handler: function (newVal, oldVa) {
if (Array.isArray(newVal))
this.tempFileList = newVal
},
immediate: true,
deep: true
}
},
computed: {
// 是否显示提示
showTip() {
return this.isShowTip && (this.fileType || this.fileSize);
},
fileTypeName() {
let typeName = ''
this.fileType.forEach(item => {
typeName += `${item},`
})
return typeName
},
fileAccept() {
let fileAccept = ''
this.fileType.forEach(element => {
fileAccept += `.${element},`
})
return fileAccept
}
},
created() {
if (this.value) {
if (Array.isArray(this.value)) {
this.fileList = JSON.parse(JSON.stringify(this.value))
}
}
},
methods: {
// 上传前校检格式和大小
handleBeforeUpload(file) {
// 校检文件类型
if (this.fileType && file) {
let fileExtension = "";
if (file.name.lastIndexOf(".") > -1) {
fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
}
const isTypeOk = this.fileType.some((type) => {
if (file.type.indexOf(type) > -1) return true;
if (fileExtension && fileExtension.indexOf(type) > -1) return true;
return false;
});
if (!isTypeOk & file) {
this.$message.error(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
return false;
}
}
// 校检文件大小
if (this.fileSize && file) {
const isLt = file.size / 1024 / 1024 < this.fileSize;
if (!isLt) {
this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
return false;
}
}
this.loading = true
let splitArray = file.name.split(".");
let current = moment()
.format("YYYYMMDD")
.toString(),
prefix = moment(file.lastModified)
.format("HHmmss")
.toString(),
suffix = new Date().getTime() + "." + splitArray[splitArray.length - 1],
key = encodeURI(`${current}/${prefix}_${suffix}`);
return getUpToken({ key })
.then(res => {
this.paramsData = {
key: key,
token: res.data.uptoken
};
})
.catch(() => {
this.loading = false
this.$message.error("上传图片失败");
});
},
handleUploadError(err) {
this.loading = false;
this.$message.error("上传失败, 请重试");
},
// 文件个数超出
handleExceed() {
this.loading = false;
this.$message.error(`超出上传文件个数,请删除以后再上传!`);
},
// 文件上传成功的钩子
handleSuccess(res, file, fileList) {
console.log(res, file, fileList)
this.$message.success("上传成功")
this.loading = false;
if (!this.multiple) {
this.$emit("input", res.domain + res.truekey)
} else {
this.changeFileList(fileList)
}
},
// 文件列表移除文件时的钩子
handleRemove(file, fileList) {
if (!this.multiple) {
this.$emit("input", '')
} else {
this.changeFileList(fileList)
}
},
// 预览
handlePictureCardPreview(file) {
this.previewUrl = file.url;
if(!this.multiple) {
this.previewList = [this.previewUrl]
}
this.previewVisible = true;
// 解决 显示大图预览后发现鼠标上下滚动放大缩小图片时,遮罩后面的页面如果有滚动条,也会跟着滚动,体验感不好
this.stopMove();
},
// 文件列表改变的时候,更新组件的v-model的数据
changeFileList(fileList) {
const tempFileList = fileList.map(item => {
let tempItem = {
name: item.key,
url: item.response.domain + item.response.truekey
}
return tempItem
})
this.$emit("input", tempFileList)
},
onClose() {
this.previewVisible = false;
// 解决 显示大图预览后发现鼠标上下滚动放大缩小图片时,遮罩后面的页面如果有滚动条,也会跟着滚动,体验感不好
this.move();
},
// 停止页面滚动
stopMove() {
const m = (e) => {
e.preventDefault();
};
document.body.style.overflow = "hidden";
document.addEventListener("touchmove", m, false); // 禁止页面滑动
},
// 开启页面滚动
move() {
const m = (e) => {
e.preventDefault();
};
document.body.style.overflow = "auto";
document.removeEventListener("touchmove", m, true);
},
},
}
</script>
<style lang="scss" scoped>
.images-list {
// border: 1px dashed #d5d5d5;
// padding: 10px;
// border-radius: 4px;
// background: #fff;
.avatar-uploader {
/deep/ .el-upload {
width: 178px;
height: 178px;
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
&:hover {
border-color: var(--primary-color);
}
}
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 178px;
height: 178px;
line-height: 178px;
text-align: center;
}
.avatar {
width: 100%;
height: 100%;
display: block;
}
.upload-action {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
cursor: default;
text-align: center;
color: #fff;
opacity: 0;
font-size: 20px;
background-color: rgba(0, 0, 0, .5);
transition: opacity .3s;
display: flex;
align-items: center;
justify-content: center;
span {
display: none;
cursor: pointer;
margin: 0 10px;
}
&:hover {
opacity: 1;
span {
display: inline-block;
}
}
}
}
</style>
\ No newline at end of file
......@@ -10,15 +10,7 @@
</el-table-column>
<el-table-column prop="value" label="内容">
<template slot-scope="scope">
<el-tooltip placement="top" popper-class="sysSetTable_tooltip">
<div slot="content">
{{ scope.row.value }}
</div>
<div
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;">
{{ scope.row.value }}
</div>
</el-tooltip>
<tooltip-text :text="scope.row.value" multiLine />
</template>
</el-table-column>
<el-table-column prop="createAt" label="创建时间" width="180">
......@@ -38,6 +30,7 @@
<script>
import sysSetDialog from '@/components/sysSetDialog'
import TooltipText from '@/components/Tooltip'
export default {
props: {
data: {
......@@ -50,7 +43,8 @@ export default {
},
},
components: {
sysSetDialog
sysSetDialog,
TooltipText
},
data() {
return {
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -81,7 +81,8 @@ import {
Link,
Avatar,
Skeleton,
SkeletonItem
SkeletonItem,
Popconfirm
} from 'element-ui'
Vue.use(Pagination)
......@@ -153,6 +154,7 @@ Vue.use(Link)
Vue.use(Avatar)
Vue.use(Skeleton)
Vue.use(SkeletonItem)
Vue.use(Popconfirm)
Vue.use(Loading.directive)
......
import Vue from 'vue'
import App from '@/App'
import router from '@/router' // api: https://github.com/vuejs/vue-router
import store from '@/store' // api: https://github.com/vuejs/vuex
import VueCookie from 'vue-cookie' // api: https://github.com/alfhen/vue-cookie
import '@/element-ui' // api: https://github.com/ElemeFE/element
import '@/icons' // api: http://www.iconfont.cn/
import Vue from "vue";
import App from "@/App";
import router from "@/router"; // api: https://github.com/vuejs/vue-router
import store from "@/store"; // api: https://github.com/vuejs/vuex
import VueCookie from "vue-cookie"; // api: https://github.com/alfhen/vue-cookie
import "@/element-ui"; // api: https://github.com/ElemeFE/element
import "@/icons"; // api: http://www.iconfont.cn/
// 引入echarts
import echarts from "@/components/ecahrts";
// 挂载到vue实例中
Vue.prototype.$echarts = echarts
Vue.prototype.$echarts = echarts;
// import '@/element-ui-theme'
// 引入主题样式
import '@/assets/theme/theme_0BB2D4/index.css'
import '@/assets/theme/theme_3E8EF7/index.css'
import '@/assets/theme/theme_11C26D/index.css'
import '@/assets/theme/theme_9463F7/index.css'
import '@/assets/scss/index.scss'
import "@/assets/theme/theme_0BB2D4/index.css";
import "@/assets/theme/theme_3E8EF7/index.css";
import "@/assets/theme/theme_11C26D/index.css";
import "@/assets/theme/theme_9463F7/index.css";
import "@/assets/scss/index.scss";
import httpRequest from '@/utils/httpRequest' // api: https://github.com/axios/axios
import { isAuth } from '@/utils'
import cloneDeep from 'lodash/cloneDeep'
import BaiduMap from 'vue-baidu-map'
import {VueJsonp} from 'vue-jsonp'
import httpRequest from "@/utils/httpRequest"; // api: https://github.com/axios/axios
import { isAuth } from "@/utils";
import cloneDeep from "lodash/cloneDeep";
import BaiduMap from "vue-baidu-map";
import { VueJsonp } from "vue-jsonp";
import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)
import VueClipboard from "vue-clipboard2";
Vue.use(VueClipboard);
// 全局注册表格empty组件
import TableEmpty from '@/components/TableEmpty/'
import { isEmpty } from '@/utils/validate.js'
Vue.component('TableEmpty', TableEmpty)
import TableEmpty from "@/components/TableEmpty/";
import { isEmpty } from "@/utils/validate.js";
Vue.component("TableEmpty", TableEmpty);
Vue.use(VueJsonp)
Vue.use(VueJsonp);
Vue.use(BaiduMap, {
ak: 'miP4RMG1yZoROVRSqTPghvUaRb68iGUB'
})
ak: "miP4RMG1yZoROVRSqTPghvUaRb68iGUB"
});
Vue.use(VueCookie)
Vue.config.productionTip = false
Vue.use(VueCookie);
Vue.config.productionTip = false;
// 非生产环境, 适配mockjs模拟数据 // api: https://github.com/nuysoft/Mock
if (process.env.NODE_ENV !== 'production') {
require('@/mock')
if (process.env.NODE_ENV !== "production") {
require("@/mock");
}
// 挂载全局
Vue.prototype.$http = httpRequest // ajax请求方法
Vue.prototype.isAuth = isAuth // 权限方法
Vue.prototype.isEmpty = isEmpty //非空判断
Vue.prototype.$http = httpRequest; // ajax请求方法
Vue.prototype.isAuth = isAuth; // 权限方法
Vue.prototype.isEmpty = isEmpty; //非空判断
// 保存整站vuex本地储存初始状态
window.SITE_CONFIG['storeState'] = cloneDeep(store.state)
window.SITE_CONFIG["storeState"] = cloneDeep(store.state);
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
store,
template: '<App/>',
components: { App }
})
el: "#app",
router,
store,
template: "<App/>",
components: { App }
});
......@@ -370,7 +370,7 @@ router.beforeEach((to, from, next) => {
// 添加动态(菜单)路由
// 1. 已经添加 or 全局路由, 直接访问
// 2. 获取菜单列表, 添加并保存本地存储
if (token != "" && menuList && (menuList == "[]" || menuList.length == 0)) {
if (token != "" && menuList && (menuList == "[]" || menuList .length == 0) && !router.options.isAddDynamicMenuRoutes) {
http({
url: http.adornUrl("/sys/menu/nav"),
method: "get",
......
......@@ -8,7 +8,7 @@ const cookie_pre = config.extraData.cookie.pre
export function getMallToken() {
let token =
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODIyNDY0MzgsIm5iZiI6MTY4MjI0NjQzOCwiZXhwIjoxNjgyODUxMjM4LCJ0b2tlbiI6ImI0M2I3OWMzYTdlMTE5Y2ZmOTYyYmQwY2Y0MTk1YTRmIiwiYnRva2VuIjoiYjQzYjc5YzNhN2UxMTljZmY5NjJiZDBjZjQxOTVhNGYiLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIxIiwibmFtZSI6IjE4NzEwODQ3MzA4IiwicGhvbmUiOiIxODcxMDg0NzMwOCIsInNvdXJjZSI6InBjIiwiaW5kdXN0cnlfaWQiOiIxIiwiaW5kdXN0cnlfYWxpYXMiOiJzdG9yZSIsImluZHVzdHJ5X2xldmVsX2lkIjoiMiIsImluZHVzdHJ5X2xldmVsX2FsaWFzIjoiYWR2YW5jZWQiLCJzaG9wX2lkIjoiMSIsIm10b2tlbiI6IjkyM2YyNjlmNTdmZGJhZWU4ZTFhMjA3ZjlmMWYyYThkIiwidHlwZSI6IiIsInRoaXJkX2FwcGlkIjoiIiwiY3VycmVudF9idG9rZW4iOiJiNDNiNzljM2E3ZTExOWNmZjk2MmJkMGNmNDE5NWE0ZiIsImFjY291bnRfdHlwZSI6IjEiLCJhY2NvdW50X3JvbGVzIjpbIm1hc3RlciJdLCJzd2l0Y2hfdGltZSI6MTY4MjQxNTQwNn0.XHJXEZdOOC3V8sdQsk6xQBccrWSCVPdXXqbkJ5zuzr0";
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODM4NzUxMTQsIm5iZiI6MTY4Mzg3NTExNCwiZXhwIjoxNjg0NDc5OTE0LCJ0b2tlbiI6ImVlOTNmN2VkMDNhZGFlZjVlODQ1MTg3MTFjOWU5MzMwIiwiYnRva2VuIjoiZWU5M2Y3ZWQwM2FkYWVmNWU4NDUxODcxMWM5ZTkzMzAiLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIzMCIsIm5hbWUiOiIxOTIwMDAwMDAwMCIsInBob25lIjoiMTkyMDAwMDAwMDAiLCJzb3VyY2UiOiJwYyIsImluZHVzdHJ5X2lkIjoiMSIsImluZHVzdHJ5X2FsaWFzIjoic3RvcmUiLCJpbmR1c3RyeV9sZXZlbF9pZCI6IjIwMCIsImluZHVzdHJ5X2xldmVsX2FsaWFzIjoia3VhaWRpIiwic2hvcF9pZCI6IjE0IiwibXRva2VuIjoiODUxMjc0YTI0NjUwMTgwYjc3OWZmZjk1ZTY2YTAyMzMiLCJ0eXBlIjoic3RvcmUiLCJ0aGlyZF9hcHBpZCI6IiIsImN1cnJlbnRfYnRva2VuIjoiZWU5M2Y3ZWQwM2FkYWVmNWU4NDUxODcxMWM5ZTkzMzAiLCJhY2NvdW50X3R5cGUiOiIxIiwiYWNjb3VudF9yb2xlcyI6WyJtYXN0ZXIiXSwic3dpdGNoX3RpbWUiOjE2ODM4NzU0MTd9.wBPUbouiSs2HeQPZUuwVQ62BHUoNWFydE6vre8ulwZs";
if (process.env.NODE_ENV === "development") {
return token;
} else return getCookie("token");
......@@ -32,8 +32,7 @@ export function getMallInfo() {
export function setCookie(cookie) {
if (cookie == "token") {
Vue.cookie.set(
cookie_pre + "storeMallToken",
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODEyMDUwNzYsIm5iZiI6MTY4MTIwNTA3NiwiZXhwIjoxNjgxODA5ODc2LCJ0b2tlbiI6ImI0M2I3OWMzYTdlMTE5Y2ZmOTYyYmQwY2Y0MTk1YTRmIiwiYnRva2VuIjoiYjQzYjc5YzNhN2UxMTljZmY5NjJiZDBjZjQxOTVhNGYiLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIxIiwibmFtZSI6IjE4NzEwODQ3MzA4IiwicGhvbmUiOiIxODcxMDg0NzMwOCIsInNvdXJjZSI6InBjIiwiY2VtZXRlcnlfaWQiOiIiLCJpbmR1c3RyeV9pZCI6IjEiLCJpbmR1c3RyeV9hbGlhcyI6InN0b3JlIiwiaW5kdXN0cnlfbGV2ZWxfaWQiOiIyIiwiaW5kdXN0cnlfbGV2ZWxfYWxpYXMiOiJhZHZhbmNlZCIsInNob3BfaWQiOiIxIiwibXRva2VuIjoiOTIzZjI2OWY1N2ZkYmFlZThlMWEyMDdmOWYxZjJhOGQiLCJ0eXBlIjoiIiwidGhpcmRfYXBwaWQiOiIiLCJjdXJyZW50X2J0b2tlbiI6ImI0M2I3OWMzYTdlMTE5Y2ZmOTYyYmQwY2Y0MTk1YTRmIiwiYWNjb3VudF90eXBlIjoiMSIsImFjY291bnRfcm9sZXMiOlsibWFzdGVyIl0sInN3aXRjaF90aW1lIjoxNjgxMjA1NDk0fQ._D73SkAoataYGsDhKy_-0_tyobYsEM2EFkPVaAL5QAk"
cookie_pre + "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODM4NjI3MzIsIm5iZiI6MTY4Mzg2MjczMiwiZXhwIjoxNjg0NDY3NTMyLCJ0b2tlbiI6ImM3MWY0MjZjMTEzMjYyMjA0NzI3ZGNhZGNhNmU3NzM2IiwiYnRva2VuIjoiYzcxZjQyNmMxMTMyNjIyMDQ3MjdkY2FkY2E2ZTc3MzYiLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIyMyIsIm5hbWUiOiIxOTYwMDAwMDAwMCIsInBob25lIjoiMTk2MDAwMDAwMDAiLCJzb3VyY2UiOiJwYyIsImluZHVzdHJ5X2lkIjoiMSIsImluZHVzdHJ5X2FsaWFzIjoic3RvcmUiLCJpbmR1c3RyeV9sZXZlbF9pZCI6IjIwMCIsImluZHVzdHJ5X2xldmVsX2FsaWFzIjoia3VhaWRpIiwic2hvcF9pZCI6IjciLCJtdG9rZW4iOiIwYWI4NDQyMTgxZTdhZWM5OWY0NmIzYjg4ZTI2ZjdiNyIsInR5cGUiOiJzdG9yZSIsInRoaXJkX2FwcGlkIjoiIiwiY3VycmVudF9idG9rZW4iOiJjNzFmNDI2YzExMzI2MjIwNDcyN2RjYWRjYTZlNzczNiIsImFjY291bnRfdHlwZSI6IjEiLCJhY2NvdW50X3JvbGVzIjpbIm1hc3RlciJdLCJzd2l0Y2hfdGltZSI6MTY4Mzg2MzEyM30.2NMTgbZMsd2p_LiReRSv3nqx9yDBkbfv3AlxaxjyyzE"
);
} else {
Vue.cookie.set(cookie);
......@@ -42,10 +41,6 @@ export function setCookie(cookie) {
export function getCookie(cookie) {
if (cookie == "token") {
console.log(
"----token---",
Vue.cookie.get(cookie_pre + "storeMallToken")
);
return Vue.cookie.get(cookie_pre + "storeMallToken");
}
return Vue.cookie.get(cookie_pre + cookie);
......
......@@ -46,14 +46,14 @@ http.interceptors.response.use(
onClose: () => {
clearCookie();
sessionStorage.clear();
window.location.href = store.state.domainURL + 'shoplist';
// window.location.href = store.state.domainURL + 'shoplist';
}
});
// router.push({ name: 'login' })
} else if (response.data.error && response.data.error !== 0) {
console.log("----------", response.data);
Message({
message: response.data["error_reason"],
message: response.data["error_reason"] || response.data["msg"],
type: "error",
duration: 1.5 * 1000
});
......
/***
* 将url参数转化为url参数
* @param param 需要转化的js 对象
* @param key
* @param encode
* @returns {string} &minimum=1530374400&maximum=1530547200&type=2
*/
export function urlEncode(param, key, encode) {
if (param == null) return '';
let paramStr = '';
let t = typeof (param);
if (t == 'string' || t == 'number' || t == 'boolean') {
paramStr += '&' + key + '=' + ((encode == null || encode) ? encodeURIComponent(param) : param);
} else {
for (let i in param) {
let k = key == null ? i : key + (param instanceof Array ? '[' + i + ']' : '.' + i);
paramStr += urlEncode(param[i], k, encode);
}
}
return paramStr;
}
\ No newline at end of file
......@@ -337,7 +337,7 @@
</el-table-column>
<el-table-column prop="state" label="是否启用">
<template slot-scope="scope">
<el-switch v-model="scope.row.state" @change="change(scope.row.state,scope.row)"
<el-switch v-model="scope.row.state" :disabled="!isAuth('bannerList:update')" @change="change(scope.row.state,scope.row)"
:active-value="openValue" :inactive-value="closeValue" active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
......@@ -528,19 +528,19 @@
// this.state = 1
// this.dataSelect1()
// }
if (tab._props.label == '轮播图') {
if (tab.name == 'first') {
this.page = 1
this.limit = 10
this.classify = 1
this.dataSelect()
}
if (tab._props.label == '首页分类') {
if (tab.name == 'fourthly') {
this.page = 1
this.limit = 10
this.classify = 2
this.dataSelect()
}
if (tab._props.label == '分类活动') {
if (tab.name == 'fenleihuodong') {
this.page = 1
this.limit = 10
this.classify = 3
......@@ -552,13 +552,13 @@
// this.classify = 4
// this.dataSelect()
// }
if (tab._props.label == '其他背景图') {
if (tab.name == 'qita') {
this.page = 1
this.limit = 10
this.classify = 4
this.dataSelect()
}
if (tab._props.label == '分享图') {
if (tab.name == 'fivethly') {
this.page = 1
this.limit = 10
this.classify = 5
......@@ -1322,8 +1322,8 @@
}).catch(() => {})
},
},
mounted() {
this.dataSelect()
activated() {
this.handleClick({name: this.activeName})
}
}
</script>
......
......@@ -226,14 +226,6 @@ export default {
this.page = val;
this.dataSelect()
},
handleSizeChange(val) {
this.size = val;
this.dataSelect()
},
handleCurrentChange(val) {
this.page = val;
this.dataSelect()
},
handleSizeChangeY(val) {
this.size1 = val;
......@@ -418,7 +410,7 @@ export default {
this.tableDataLoading = false
let returnData = data.data;
this.tableData = returnData
if (data.data.list.length == 0) {
if (data.data.list.length == 0 && this.page > 1) {
this.page = this.page - 1
this.dataSelect()
}
......
......@@ -125,15 +125,15 @@
<el-input v-model="form.couponName" style="width:65%;" placeholder="请输入优惠券名称"></el-input>
</el-form-item>
<el-form-item label="优惠券图片:" :label-width="formLabelWidth">
<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;">
<el-upload class="avatar-uploader" v-model="form.couponPicture"
<div>
<!-- <el-upload class="avatar-uploader" v-model="form.couponPicture"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
:on-success="handleAvatarSuccess2">
<img v-if="form.couponPicture" :src="form.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>
</el-upload>
<!-- <upload :value="form.couponPicture" @input="uploadInput"></upload> -->
</el-upload> -->
<upload-image v-model="form.couponPicture"></upload-image>
</div>
</el-form-item>
......@@ -388,13 +388,15 @@
</template>
<script>
import Upload from '@/components/Upload'
import UploadImage from '@/components/UploadImage'
export default {
components: {
Upload
UploadImage
},
data() {
return {
dialogImageUrl: '',
dialogVisible: false,
size: 10,
page: 1,
size1: 10,
......@@ -469,10 +471,6 @@ export default {
},
methods: {
// 文件上传改变
uploadInput(fileList) {
console.log(fileList, 'fileList')
},
// 通用券/商品券
couponClick(val) {
if (val = 1) {
......@@ -707,6 +705,13 @@ export default {
this.dialogFormVisible2 = false
})
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
// 删除优惠券
shopdeletes(row) {
this.$confirm(`确定删除此条信息?`, '提示', {
......@@ -1070,7 +1075,7 @@ export default {
})
},
},
mounted() {
activated() {
this.dataSelect()
}
};
......
......@@ -162,7 +162,7 @@ export default {
})
},
},
created() {
activated() {
this.dataSelect()
}
};
......
......@@ -257,7 +257,7 @@ export default {
title: '订单管理',
},
{
title: '寄件提交',
title: '平台数据',
},
{
title: '建议反馈',
......@@ -333,10 +333,14 @@ export default {
this.$router.push({ name: 'orderCenter' })
break;
case 4:
// this.$router.push({ name: 'miniProgram' })
this.$router.push({ name: 'dataBase' })
break;
case 5:
this.$router.push({ name: 'message' })
this.$notify({
message: '该功能暂未开放',
type: 'warning'
});
// this.$router.push({ name: 'message' })
break;
}
},
......
......@@ -61,7 +61,7 @@ export default {
tableData: []
}
},
mounted() {
activated() {
this.getList(1);
},
watch: {
......@@ -118,29 +118,11 @@ export default {
getNoticeList(data).then(res => {
this.currentPage = 1;
this.total = 0;
this.tableData = [
{
attach: "W4VAI56js5r611s99satp3bbIh1TIRs6",
category: 4,
content: "您好,教培行业整体解决方案上线,详细请咨询客户经理!",
created_at: "2021-07-01 07:17:42",
industry: "ADVANCED",
is_read: "1",
origin_unique_id: "26",
post_time: "2021-07-01 07:17",
role: "BUSINESS",
scene: "SYSTEM_UPGRADE",
title: "系统升级",
type: "LESTORE_NOTICE",
unique_id: "8B927B78-21BB-5C01-33AD-8CDCF3DEF27B",
}
];
// if (res.error == 0 && res.data) {
// this.currentPage = val;
// this.total = res.data.count;
// this.tableData = res.data.item;
// }
if (res.error == 0 && res.data) {
this.currentPage = val;
this.total = res.data.count;
this.tableData = res.data.item;
}
})
}
}
......
......@@ -695,7 +695,7 @@ export default {
return this.dataInfos.ordersMoney_month - this.dataInfos.sumMoney_month;
},
},
created() {
activated() {
//当日数据
this.getViewData();
// 当月数据
......
......@@ -3,34 +3,34 @@
<search-form :searchForm="formItems" :searchData="searchData" @search="serachHandle">
</search-form>
<el-card shadow="never" class="card-common">
<el-table v-loading="tableDataLoading" :data="tableData.records">
<el-table v-loading="tableDataLoading" :data="tableData.list">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column prop="id" label="金额">
<el-table-column prop="amount" label="金额" :formatter="(row, column) => tableFormatter(row, column, null, '元')">
</el-table-column>
<el-table-column prop="userName" label="变化前">
<el-table-column prop="beforeAmount" label="变化前" :formatter="(row, column) => tableFormatter(row, column, null, '元')">
</el-table-column>
<el-table-column prop="phone" label="变化后">
<el-table-column prop="afterAmount" label="变化后" :formatter="(row, column) => tableFormatter(row, column, null, '元')">
</el-table-column>
<el-table-column prop="type" label="类型">
<template slot-scope="scope">
<span v-if="scope.row.type == 1"><span class="badge—common primary"></span>订单支付</span>
<span v-if="scope.row.type == 2"><span class="badge—common"></span>订单退款</span>
<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"></span>订单退款</span>
</template>
</el-table-column>
<el-table-column prop="ordersNo" label="订单号">
<el-table-column prop="orderNo" label="订单号">
</el-table-column>
<el-table-column prop="remark" label="备注">
</el-table-column>
<el-table-column prop="createTime" label="创建时间">
<el-table-column prop="createdAt" label="创建时间">
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<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" :total="tableData.total">
layout="total,sizes, prev, pager, next,jumper" :total="totalnum">
</el-pagination>
</div>
</el-card>
......@@ -46,7 +46,6 @@ export default {
},
data() {
return {
activeName: 'first',
size: 10,
page: 1,
totalnum: 0,
......@@ -65,11 +64,11 @@ export default {
options: [
{
label: '订单支付',
value: 1,
value: 0,
},
{
label: '订单退款',
value: 2,
value: 1,
},
],
},
......@@ -105,20 +104,21 @@ export default {
getTableData() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('Details/selectCouponList'),
method: 'get',
params: this.$http.adornParams({
url: this.$http.adornUrl('expressageAccount/logs'),
method: 'post',
data: this.$http.adornData({
'page': this.page,
'limit': this.size,
'pageSize': this.size,
...this.searchData
})
}).then(({
data
}) => {
this.tableDataLoading = false
let tableData = data.data
this.tableData = tableData
this.totalnum = tableData.totalCount
}).finally(() => {
this.tableDataLoading = false
})
},
// 复制
......@@ -133,8 +133,21 @@ export default {
_this.$message.error('复制失败');
})
},
// 表格数据格式化
tableFormatter(row, column, type, unit) {
if (!this.isEmpty(row[column.property])) {
switch (type) {
case 'datetime':
return row[column.property] ? moment(row[column.property]).format('YYYY-MM-DD HH:mm:ss') : row[column.property]
case 'date':
return row[column.property] ? moment(row[column.property]).format('YYYY-MM-DD') : row[column.property]
default:
return unit ? row[column.property] + unit : row[column.property]
}
}
},
},
created() {
activated() {
this.getTableData()
}
};
......
......@@ -255,7 +255,7 @@ export default {
}
}
},
mounted() {
activated() {
this.getTableData("POST", res => {
this.saveTableData(res);
});
......
......@@ -10,8 +10,8 @@
<el-table-column prop="tradeNo" label="充值编号">
<template slot-scope="scope">
<span>{{ scope.row.tradeNo }}</span>
<span @click="copys(scope.row.tradeNo)" class="copy_icon">
<i name="bianji" v-if="scope.row.tradeNo" class="el-icon-copy-document"></i>
<span v-if="scope.row.tradeNo" @click="copys(scope.row.tradeNo)" class="copy_icon">
<i class="el-icon-document-copy"></i>
</span>
</template>
</el-table-column>
......@@ -27,14 +27,14 @@
<span v-if="scope.row.state == 1"><span class="badge—common success"></span>已付款</span>
</template>
</el-table-column>
<el-table-column prop="pay_channel" label="充值渠道">
<!-- <el-table-column prop="pay_channel" label="充值渠道">
<template slot-scope="scope">
<span v-if="scope.row.pay_channel == 'wechat'">
<span class="badge—common success"></span>
微信
</span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column prop="createdAt" label="创建时间"
:formatter="(row, column) => tableFormatter(row, column, 'datetime')">
</el-table-column>
......@@ -107,17 +107,17 @@ export default {
},
],
},
{
label: '充值渠道',
prop: 'pay_channel',
type: 'Select',
options: [
{
label: '微信',
value: 'wechat',
},
],
},
// {
// label: '充值渠道',
// prop: 'pay_channel',
// type: 'Select',
// options: [
// {
// label: '微信',
// value: 'wechat',
// },
// ],
// },
],
money: 0,
tradeNo: '',
......
......@@ -159,7 +159,7 @@ export default {
})
},
},
created() {
activated() {
this.getTableData()
}
};
......
......@@ -1004,33 +1004,33 @@ export default {
this.rechargeSelectYhq()
},
handleClick(tab, event) {
if (tab._props.label == '提现管理') {
if (tab.name == 'first') {
this.page = 1
this.limit = 10
this.dataSelect()
}
if (tab._props.label == '收入统计') {
if (tab.name == 'sixth') {
this.flag = 1
this.incomeSelect()
}
if (tab._props.label == '会员开通统计') {
if (tab.name == 'vip') {
this.flag = 1
this.rechSelect()
}
if (tab._props.label == '优惠券购买统计') {
if (tab.name == 'youhuiquan') {
this.flag = 1
this.rechSelectYhq()
}
if (tab._props.label == '提现统计') {
if (tab.name == 'third') {
this.flag = 1
this.withdrawSelect()
}
if (tab._props.label == '会员开通记录') {
if (tab.name == 'fourth') {
this.page = 1
this.limit = 10
this.rechargeSelect()
}
if (tab._props.label == '优惠券购买记录') {
if (tab.name == 'youhuiquanL') {
this.page = 1
this.limit = 10
this.rechargeSelectYhq()
......@@ -1393,8 +1393,8 @@ export default {
})
},
},
mounted() {
this.dataSelect()
activated() {
this.handleClick({name: this.activeName})
}
}
</script>
......
......@@ -159,7 +159,7 @@ export default {
})
},
},
created() {
activated() {
this.getTableData()
}
};
......
......@@ -51,7 +51,6 @@ export default {
}
},
created() {
console.log(this.mainTabs)
},
computed: {
documentClientHeight: {
......@@ -89,13 +88,13 @@ export default {
},
// tabs, 删除tab
removeTabHandle(tabName) {
let isHome = find(this.mainTabs, { name: 'home' })
if (isHome) {
this.mainTabs = [isHome]
this.menuActiveName = 'home'
this.$router.push({ path: '/' })
return
}
// let isHome = find(this.mainTabs, { name: 'home' })
// if (isHome) {
// this.mainTabs = [isHome]
// this.menuActiveName = 'home'
// this.$router.push({ path: '/' })
// return
// }
this.mainTabs = this.mainTabs.filter(item => item.name !== tabName)
if (this.mainTabs.length >= 1) {
// 当前选中tab被删除
......
......@@ -10,14 +10,16 @@
<el-table-column prop="trade_no" label="订单号" min-width="180px">
<template slot-scope="scope">
<span>{{ scope.row.trade_no }}</span>
<span @click="copys(scope.row.trade_no)" class="copy_icon">
<i name="bianji" v-if="scope.row.trade_no" class="el-icon-copy-document"></i>
<span v-if="scope.row.trade_no" @click="copys(scope.row.trade_no)" class="copy_icon">
<i class="el-icon-document-copy"></i>
</span>
</template>
</el-table-column>
<el-table-column prop="name" label="名称">
<!-- <el-table-column prop="name" label="名称">
</el-table-column> -->
<el-table-column prop="remark" label="套餐" :formatter="(row, column) => tableFormatter(row, column, null, '次')">
</el-table-column>
<el-table-column prop="tc" 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 prop="used" label="已使用" :formatter="(row, column) => tableFormatter(row, column, null, '次')">
</el-table-column>
......@@ -64,7 +66,7 @@ export default {
tableData: [],
searchData: {
trade_no: '', //订单号
name: '', //名称
remark: '', //套餐
state: null, //状态
},
formItems: [
......@@ -74,8 +76,8 @@ export default {
type: 'Input',
},
{
label: '名称',
prop: 'name',
label: '套餐',
prop: 'remark',
type: 'Input',
},
{
......
......@@ -152,7 +152,7 @@ export default {
console.log(value)
}
},
created() {
activated() {
this.getTableData()
}
};
......
......@@ -155,7 +155,7 @@ export default {
this.getTableData();
}
},
created() {
activated() {
this.getTableData()
}
};
......
......@@ -152,7 +152,7 @@ export default {
console.log(value)
}
},
created() {
activated() {
this.getTableData()
}
};
......
......@@ -16,7 +16,7 @@
</div>
<div class="logistics_bottom">
<div class="price">
<span>50元 / 10000</span>
<span>{{ packageChecked.price }}元 / {{ packageChecked.amount }}</span>
</div>
<div class="right">
<el-button class="btn" type="primary" size="mini"
......@@ -65,17 +65,20 @@
<div style="display: flex; align-items: center;">
<!-- <el-avatar class="checkcard-avatar" shape="square" :size="48"
:src="item.pay_icon" fit="cover"></el-avatar> -->
<svg style="width: 48px;height: 48px" t="1682219172782" class="icon" viewBox="0 0 1068 1024" version="1.1"
<!-- <svg style="width: 48px;height: 48px" t="1682219172782" class="icon" viewBox="0 0 1068 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="1151" width="64" height="64">
<path d="M3.710145 0h1024v1024H3.710145z" fill="#D8D8D8" fill-opacity="0"
p-id="1152"></path>
<path
d="M402.216812 278.229333h215.296c66.56 0 117.418667-151.893333 117.418666-151.893333 0-45.525333-4.309333-79.957333-78.293333-82.346667-73.984-2.432-91.690667 54.357333-144.853333 54.357334-54.442667 0-81.706667-44.672-148.736-54.4-66.986667-9.685333-78.293333 36.864-78.293334 82.389333 0 0 50.773333 151.893333 117.461334 151.893333z m227.029333 46.976H402.216812C150.782145 325.205333 89.043478 844.586667 89.043478 844.586667 89.043478 912.853333 141.608812 981.333333 206.462145 981.333333h618.496C889.811478 981.333333 942.376812 912.810667 942.376812 844.586667c0 0-61.738667-519.381333-313.130667-519.381334z m25.770667 399.189334c15.189333 0 27.477333 12.928 27.477333 28.842666 0 15.957333-12.288 28.885333-27.477333 28.885334h-111.36v75.690666a29.226667 29.226667 0 0 1-13.397334 25.770667 26.282667 26.282667 0 0 1-27.946666 0 29.226667 29.226667 0 0 1-13.44-25.770667v-75.690666H376.830145c-15.189333 0-27.477333-12.928-27.477333-28.885334 0-15.914667 12.288-28.842667 27.477333-28.842666h112.042667v-36.650667H376.830145c-15.189333 0-27.477333-12.928-27.477333-28.842667 0-15.957333 12.288-28.842667 27.477333-28.842666h75.733333L375.038145 485.12a29.696 29.696 0 0 1 10.666667-38.229333 26.666667 26.666667 0 0 1 36.821333 9.386666l93.354667 173.781334h4.693333l93.397333-173.781334a26.709333 26.709333 0 0 1 37.461334-10.538666c13.141333 7.978667 17.621333 25.6 10.026666 39.381333l-77.525333 144.938667h71.082667c15.189333 0 27.477333 12.928 27.477333 28.842666 0 15.957333-12.288 28.885333-27.477333 28.885334h-111.36v36.608h111.36z"
fill="#4A90E2" p-id="1153"></path>
<!-- <path
d="M844.243478 883.2m-42.666666 0a42.666667 42.666667 0 1 0 85.333333 0 42.666667 42.666667 0 1 0-85.333333 0Z"
fill="#E02020" p-id="1154"></path> -->
</svg>
</svg> -->
<div style="display: flex; align-items: center;margin-right: 5px;">
<img style="width: 20px;height: 20px;margin-right: 2px;"
src="../../assets/img/wPay2.png" alt="">
<img style="width: 20px;height: 20px" src="../../assets/img/aliPay2.png"
alt="">
</div>
<div class="checkcard-title">
{{ item.pay_title }}
</div>
......@@ -113,7 +116,8 @@
<div style="margin-top: 20px;display: flex;flex-direction: row;">
<img src="../../assets/wechat/WeChatPay.png" style="margin-right: 5px;" />
微信支付
<img width="16px" height="16px" src="../../assets/wechat/aliPay.png" style="margin-right: 5px;margin-left: 10px;" />
<img width="16px" height="16px" src="../../assets/wechat/aliPay.png"
style="margin-right: 5px;margin-left: 10px;" />
支付宝
</div>
<p style="font-size: 20px;margin: 20px 0;">扫一扫完成支付</p>
......@@ -172,7 +176,6 @@ export default {
},
// 立即购买
buyClick() {
this.getPackageList()
this.dialogVisible = true
},
// 资源包列表
......@@ -180,7 +183,7 @@ export default {
packageListAPI().then((res) => {
if (res.error == 0) {
this.packageList = res.data || []
if(this.packageList.length > 0) {
if (this.packageList.length > 0) {
this.packageChecked = this.packageList[0]
this.price = this.packageChecked.price
}
......@@ -194,7 +197,7 @@ export default {
},
// 确认订购
payGo(row) {
if(!this.packageChecked.id) {
if (!this.packageChecked.id) {
this.$message.error('请选择订购套餐');
return;
}
......@@ -243,7 +246,8 @@ export default {
}
}
},
created() {
activated() {
this.getPackageList()
}
};
</script>
......
......@@ -323,7 +323,7 @@ export default {
})
},
},
mounted() {
activated() {
this.dataSelect()
}
};
......
......@@ -709,7 +709,7 @@ export default {
});
}
},
created() {
activated() {
this.getList();
this.getDoAuthUrl();
// this.getStoreInfo();
......@@ -717,8 +717,6 @@ export default {
// this.isAdmin = getMallInfo().mall_payment == "1" ? true : false;
// }
},
mounted() {
}
}
</script>
......
......@@ -73,8 +73,8 @@
width="160"
label="操作">
<template slot-scope="scope">
<el-button :disabled="!isAuth('sys:menu:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.menuId)">修改</el-button>
<el-button class="text-danger" :disabled="!isAuth('sys:menu:delete')" type="text" size="small" @click="deleteHandle(scope.row.menuId)">删除</el-button>
<el-button :disabled="!isAuth('sys:menu:update')" type="primary" size="mini" @click="addOrUpdateHandle(scope.row.menuId)">修改</el-button>
<el-button class="text-danger" :disabled="!isAuth('sys:menu:delete')" type="danger" size="mini" @click="deleteHandle(scope.row.menuId)">删除</el-button>
</template>
</el-table-column>
</el-table>
......
......@@ -26,9 +26,9 @@
</el-table-column>
<el-table-column fixed="right" header-align="center" align="center" width="160" label="操作">
<template slot-scope="scope">
<el-button :disabled="!isAuth('sys:role:update')" type="text" size="small"
<el-button :disabled="!isAuth('sys:role:update')" type="primary" size="mini"
@click="addOrUpdateHandle(scope.row.roleId)">修改</el-button>
<el-button class="text-danger" :disabled="!isAuth('sys:role:delete')" type="text" size="small"
<el-button class="text-danger" :disabled="!isAuth('sys:role:delete')" type="danger" size="mini"
@click="deleteHandle(scope.row.roleId)">删除</el-button>
</template>
</el-table-column>
......
......@@ -10,7 +10,7 @@
<template slot-scope="scope">
<el-link :underline="false" @click="updates(scope.row)">{{ scope.row.ordersNo }}</el-link>
<span @click="copys(scope.row.ordersNo)" class="copy_icon">
<i name="bianji" v-if="scope.row.ordersNo" class="el-icon-copy-document"></i>
<i v-if="scope.row.ordersNo" class="el-icon-document-copy"></i>
</span>
</template>
</el-table-column>
......
......@@ -10,8 +10,8 @@
<el-table-column prop="ordersNo" label="订单编号" width="220px">
<template slot-scope="scope">
<el-link :underline="false" @click="updates(scope.row)">{{ scope.row.ordersNo }}</el-link>
<span @click="copys(scope.row.ordersNo)" class="copy_icon">
<i name="bianji" v-if="scope.row.ordersNo" class="el-icon-copy-document"></i>
<span v-if="scope.row.ordersNo" @click="copys(scope.row.ordersNo)" class="copy_icon">
<i class="el-icon-document-copy"></i>
</span>
</template>
</el-table-column>
......@@ -28,12 +28,12 @@
scope.row.goodsVolumeHeight || 0 }}cm</span>
</template>
</el-table-column>
<el-table-column prop="type" label="类型">
<!-- <el-table-column prop="type" label="类型">
<template slot-scope="scope">
<div v-if="scope.row.type == 1"><span class="badge—common success"></span>超轻</div>
<div v-if="scope.row.type == 2"><span class="badge—common danger"></span>超重</div>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column prop="goodsImage" label="寄件图片">
<template slot-scope="scope">
<span v-if="scope.row.goodsImage">
......@@ -95,7 +95,7 @@ export default {
ordersNo: '', //订单号
parentParentName: '', //物流单号
haoCaiStatus: '', //处理状态
type: '', //类型
// type: '', //类型
},
formItems: [
{
......@@ -108,22 +108,22 @@ export default {
prop: 'parentParentName',
type: 'Input',
},
{
label: '类型',
prop: 'type',
type: 'Select',
placeholder: '请选择',
options: [
{
label: '超重',
value: '0'
},
{
label: '超轻',
value: '1'
},
]
},
// {
// label: '类型',
// prop: 'type',
// type: 'Select',
// placeholder: '请选择',
// options: [
// {
// label: '超重',
// value: '0'
// },
// {
// label: '超轻',
// value: '1'
// },
// ]
// },
{
label: '处理状态',
prop: 'haoCaiStatus',
......@@ -170,7 +170,7 @@ export default {
this.page = val;
this.getTableData()
},
//获取已发布优惠券数据
//获取数据
getTableData() {
this.tableDataLoading = true
selectWeightErrorExpressageListAPI({
......@@ -212,11 +212,11 @@ export default {
tableFormatter(row, column, type, unit) {
switch (type) {
case 'datetime':
return row[column.property] ? moment(row[column.property]).format('YYYY-MM-DD HH:mm:ss') : row[column.property]
return !this.isEmpty(row[column.property]) ? moment(row[column.property]).format('YYYY-MM-DD HH:mm:ss') : row[column.property]
case 'date':
return row[column.property] ? moment(row[column.property]).format('YYYY-MM-DD') : row[column.property]
return !this.isEmpty(row[column.property]) ? moment(row[column.property]).format('YYYY-MM-DD') : row[column.property]
default:
return unit && row[column.property] ? row[column.property] + unit : row[column.property]
return unit && !this.isEmpty(row[column.property]) ? row[column.property] + unit : row[column.property]
}
},
// 超轻退款
......@@ -224,7 +224,7 @@ export default {
// 超轻作废
cancellation() { }
},
mounted() {
activated() {
this.getTableData()
}
};
......
......@@ -139,8 +139,7 @@
<td class="border-rt">
<span>{{ scope.row.ordersNo }}</span>
<span @click="copys(scope.row.ordersNo)" class="copy_icon">
<i name="bianji" v-if="scope.row.ordersNo"
class="el-icon-copy-document"></i>
<i class="el-icon-document-copy"></i>
</span>
</td>
</tr>
......@@ -151,9 +150,9 @@
target="_blank" class="page-scroll" v-if="scope.row.expressageNo">{{
scope.row.expressageNo }}</a>
<span v-else> - </span>
<span @click="copys(scope.row.expressageNo)" class="copy_icon">
<i name="bianji" v-if="scope.row.expressageNo"
class="el-icon-copy-document"></i>
<span v-show="scope.row.expressageNo" @click="copys(scope.row.expressageNo)"
class="copy_icon">
<i class="el-icon-document-copy"></i>
</span>
<!-- <icon-svg name="bianji" class="el-icon-document-copy" style="color: var(--primary-color);"></icon-svg> -->
</td>
......@@ -165,9 +164,9 @@
class="page-scroll" v-if="scope.row.waybill">{{
scope.row.waybill }}</a>
<span v-else> - </span>
<span @click="copys(scope.row.waybill)" class="copy_icon">
<i name="bianji" v-if="scope.row.waybill"
class="el-icon-copy-document"></i>
<span v-if="scope.row.waybill" @click="copys(scope.row.waybill)"
class="copy_icon">
<i class="el-icon-document-copy"></i>
</span>
<!-- <icon-svg name="bianji" class="el-icon-document-copy" style="color: var(--primary-color);"></icon-svg> -->
</td>
......@@ -186,7 +185,8 @@
</tr>
<tr>
<th class="border-bt">快递员</th>
<td class="border-bt border-rt"><span style="cursor: pointer;color: var(--primary-color);"
<td class="border-bt border-rt"><span
style="cursor: pointer;color: var(--primary-color);"
@click="dataDel(scope.row, 1)">{{ scope.row.expressageName ?
scope.row.expressageName : '-' }}</span>
<span style="cursor: pointer;color: var(--primary-color);"
......@@ -216,9 +216,9 @@
<th>手机号</th>
<td class="border-rt">
{{ scope.row.senderPhone }}
<span @click="copys(scope.row.senderPhone)" class="copy_icon">
<i name="bianji" v-if="scope.row.senderPhone"
class="el-icon-copy-document"></i>
<span v-if="scope.row.senderPhone" @click="copys(scope.row.senderPhone)"
class="copy_icon">
<i class="el-icon-document-copy"></i>
</span>
</td>
</tr>
......@@ -233,9 +233,9 @@
<tr>
<th>手机号</th>
<td class="border-rt">{{ scope.row.receiverPhone }}
<span @click="copys(scope.row.receiverPhone)" class="copy_icon">
<i name="bianji" v-if="scope.row.receiverPhone"
class="el-icon-copy-document"></i>
<span v-if="scope.row.receiverPhone" @click="copys(scope.row.receiverPhone)"
class="copy_icon">
<i class="el-icon-document-copy"></i>
</span>
</td>
</tr>
......@@ -558,7 +558,7 @@
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;float:right">
<div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
......@@ -599,8 +599,9 @@
<div class="box_num">
<div class="box_color">寄件人昵称</div>
<div class="text_color">
<span style="cursor: pointer;color: var(--primary-color);" @click="updates(detaDatle.userId)">{{
detaDatle.userName ? detaDatle.userName : '-' }}</span>
<span style="cursor: pointer;color: var(--primary-color);"
@click="updates(detaDatle.userId)">{{
detaDatle.userName ? detaDatle.userName : '-' }}</span>
</div>
</div>
</div>
......@@ -1569,12 +1570,12 @@ export default {
}).then(({
data
}) => {
console.log(data)
if (data && data.code === 0) {
this.tableDataLoading = false
let returnData = data.data
this.tableData = returnData
}
}).finally(() => {
this.tableDataLoading = false
})
},
// 详情跳转
......@@ -1882,8 +1883,6 @@ export default {
if (data.code == 0) {
this.wuliuDate = data.data;
this.dialogVisible = true
} else {
this.$message(data.msg);
}
})
......@@ -2071,15 +2070,13 @@ export default {
},
},
created() {
activated() {
let ordersNo = this.$route.query.ordersNo || ''
this.searchData.ordersNo = ordersNo;
this.animeDat();
this.kuaid()
},
mounted() {
this.tableDataLoading = false
this.dataSelect()
this.kuaid()
}
}
</script>
......
......@@ -16,14 +16,22 @@ export default {
components: {
sysSetTable
},
watch: {
tabName(val) {
if (val == 'kefu') {
this.getData()
}
}
},
data() {
return {
tableDataLoading: false,
tableData: [],
}
},
created() {
this.getData();
activated() {
if (this.tabName == 'kefu')
this.getData();
},
methods: {
// 获取数据列表
......
......@@ -5,25 +5,29 @@
<div style="width: 50%;margin: 0 auto;">
<el-form ref="form" :model="ruleForm" label-width="150px" size="mini">
<el-form-item label="下单提示弹框">
<el-switch v-model="ruleForm.form1"></el-switch>
<el-switch v-model="ruleForm.needPop" :active-value="1" :inactive-value="0"></el-switch>
<div class="form_item_explain">
<div>开启后,用户下单时候会有弹框提示</div>
</div>
</el-form-item>
<el-form-item label="弹框标题">
<el-input v-model="ruleForm.form2" clearable></el-input>
<el-input v-model="ruleForm.title" clearable></el-input>
</el-form-item>
<el-form-item label="弹框内容">
<el-input type="textarea" v-model="ruleForm.form3" :autosize="{ minRows: 3, maxRows: 3}"></el-input>
<el-input type="textarea" v-model="ruleForm.content"
:autosize="{ minRows: 3, maxRows: 3 }"></el-input>
</el-form-item>
<el-form-item label="重货弹框内容">
<el-input type="textarea" v-model="ruleForm.form4" :autosize="{ minRows: 3, maxRows: 3}"></el-input>
<el-input type="textarea" v-model="ruleForm.hiveWeightContent"
:autosize="{ minRows: 3, maxRows: 3 }"></el-input>
</el-form-item>
<el-form-item label="快递下单上方提示语">
<el-input type="textarea" v-model="ruleForm.form5" :autosize="{ minRows: 3, maxRows: 3}"></el-input>
<el-input type="textarea" v-model="ruleForm.kdUpNotice"
:autosize="{ minRows: 3, maxRows: 3 }"></el-input>
</el-form-item>
<el-form-item label="重物下单上方提示语">
<el-input type="textarea" v-model="ruleForm.form6" :autosize="{ minRows: 3, maxRows: 3}"></el-input>
<el-input type="textarea" v-model="ruleForm.hiveWeightUpNotice"
:autosize="{ minRows: 3, maxRows: 3 }"></el-input>
</el-form-item>
<el-form-item size="large">
<el-button type="primary" @click="submit">提交</el-button>
......@@ -54,12 +58,12 @@ export default {
return {
loading: true,
ruleForm: {
form1: false, //下单提示框是否开启
form2: '', //弹框标题
form3: '', //弹框内容
form4: '', //重货弹框内容
form5: '', //快递下单上方提示语
form6: '', //重物下单上方提示语
needPop: 0, //下单提示框是否开启
title: '', //弹框标题
content: '', //弹框内容
hiveWeightContent: '', //重货弹框内容
kdUpNotice: '', //快递下单上方提示语
hiveWeightUpNotice: '', //重物下单上方提示语
},
}
},
......@@ -67,15 +71,15 @@ export default {
// 获取数据
getData() {
this.$http({
url: this.$http.adornUrl(`common/type/condition/kefu`),
url: this.$http.adornUrl(`orderNotice/detail`),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data && data.code === 0) {
if (data && data.error === 0 && data.code === 0) {
this.loading = false
this.ruleForm = { ...data.data }
}
}).catch(() => {
this.loading = false
......@@ -84,10 +88,31 @@ export default {
// 提交
submit() {
console.log(this.ruleForm)
let params = {
needPop: this.ruleForm.needPop,
title: this.ruleForm.title,
content: this.ruleForm.content,
hiveWeightContent: this.ruleForm.hiveWeightContent,
kdUpNotice: this.ruleForm.kdUpNotice,
hiveWeightUpNotice: this.ruleForm.hiveWeightUpNotice,
}
this.$http({
url: this.$http.adornUrl(`orderNotice/save`),
method: 'post',
data: this.$http.adornData(params)
}).then(({
data
}) => {
if (data && data.error === 0 && data.code === 0) {
this.$message.success('操作成功!')
this.getData()
}
})
},
},
created() {
this.getData();
activated() {
if (this.tabName == 'tishi')
this.getData();
},
}
</script>
......
......@@ -6,39 +6,41 @@
<span class="card_title">*注:销售比例信息设置,用于总控成本价基础上进行加价。</span>
</div>
<div style="width: 50%;margin: 0 auto;">
<el-radio-group v-model="tabPosition" size="small" style="margin-bottom: 30px;">
<el-radio-group v-model="tabPosition" size="small" style="margin-bottom: 30px;" @input="radioChange">
<!-- <el-radio label="jine">金额设置</el-radio>
<el-radio label="bili">比例设置</el-radio> -->
<el-radio-button label="jine">金额设置</el-radio-button>
<el-radio-button label="bili">比例设置</el-radio-button>
</el-radio-group>
<el-form v-if="tabPosition === 'jine'" ref="form" :model="sumForm" label-suffix=" (元)" label-width="150px" size="mini">
<el-form v-if="tabPosition === 'jine'" ref="form" :model="sumForm" label-suffix=" (元)" label-width="150px"
size="mini">
<el-form-item label="首重增加金额">
<el-input-number v-model="sumForm.first_weight" controls-position="right"
:precision="2" :step="0.1" :min="0.8"></el-input-number>
<el-input-number v-model="sumForm.first_weight" controls-position="right" :precision="2" :step="0.1"
:min="0.8"></el-input-number>
<div class="form_item_explain">
<div>为避免内耗,首重建议最低加0.8元以上!</div>
</div>
</el-form-item>
<el-form-item label="续重增加金额">
<el-input-number v-model="sumForm.renew_weight" controls-position="right" :precision="2"
:step="0.1" :min="0"></el-input-number>
<el-input-number v-model="sumForm.renew_weight" controls-position="right" :precision="2" :step="0.1"
:min="0"></el-input-number>
</el-form-item>
<el-form-item size="large">
<el-button type="primary" @click="sumSubmit">提交</el-button>
<el-button type="primary" size="small" @click="save(1)">提交</el-button>
</el-form-item>
</el-form>
<el-form v-if="tabPosition === 'bili'" ref="form" :model="ratioForm" label-suffix=" (%)" label-width="150px" size="mini">
<el-form v-if="tabPosition === 'bili'" ref="form" :model="ratioForm" label-suffix=" (%)" label-width="150px"
size="mini">
<el-form-item label="首重增加比例">
<el-input-number v-model="ratioForm.first_weight" controls-position="right" :precision="2"
:step="1" :min="0"></el-input-number>
<el-input-number v-model="ratioForm.first_weight" controls-position="right" :precision="2" :step="1"
:min="0"></el-input-number>
</el-form-item>
<el-form-item label="续重增加比例">
<el-input-number v-model="ratioForm.renew_weight" controls-position="right" :precision="2"
:step="1" :min="0"></el-input-number>
<el-input-number v-model="ratioForm.renew_weight" controls-position="right" :precision="2" :step="1"
:min="0"></el-input-number>
</el-form-item>
<el-form-item size="large">
<el-button type="primary" @click="ratioSubmit">提交</el-button>
<el-button type="primary" size="small" @click="save(2)">提交</el-button>
</el-form-item>
</el-form>
</div>
......@@ -58,7 +60,7 @@ export default {
watch: {
tabName(val) {
if (val == 'xiaoshou') {
this.getSumData()
this.getData()
}
}
},
......@@ -78,9 +80,9 @@ export default {
},
methods: {
// 获取金额数据列表
getSumData() {
getData() {
this.$http({
url: this.$http.adornUrl(`common/type/condition/kefu`),
url: this.$http.adornUrl(`proxy/expressage/priceSetting/detail`),
method: 'get',
params: this.$http.adornParams({})
}).then(({
......@@ -88,39 +90,45 @@ export default {
}) => {
if (data && data.code === 0) {
this.loading = false
this.sumForm.first_weight = data.data.firstWeightAddPrice || 0
this.sumForm.renew_weight = data.data.xuWeightAddPrice || 0
this.ratioForm.first_weight = data.data.firstWeightAddRate || 0
this.ratioForm.renew_weight = data.data.xuWeightAddRate || 0
}
}).catch(() => {
this.loading = false
})
},
// 获取比例数据列表
getRatioData() {
// 设置提交
save(type) {
let params = {
type,
firstWeightAddPrice: this.sumForm.first_weight,
xuWeightAddPrice: this.sumForm.renew_weight,
firstWeightAddRate: this.ratioForm.first_weight,
xuWeightAddRate: this.ratioForm.renew_weight
}
this.$http({
url: this.$http.adornUrl(`common/type/condition/kefu`),
method: 'get',
params: this.$http.adornParams({})
url: this.$http.adornUrl(`proxy/expressage/priceSetting/save`),
method: 'post',
data: this.$http.adornData(params)
}).then(({
data
}) => {
if (data && data.code === 0) {
this.loading = false
if (data && data.error === 0 && data.code === 0) {
this.$message.success('操作成功!')
this.getData()
}
}).catch(() => {
this.loading = false
})
},
// 金额设置提交
sumSubmit() {
console.log(this.sumForm)
},
// 比例设置提交
ratioSubmit() {
console.log(this.ratioForm)
},
radioChange() {
this.getData()
}
},
created() {
this.getSumData();
activated() {
if (this.tabName == 'xiaoshou')
this.getData();
},
}
</script>
......@@ -130,9 +138,11 @@ export default {
/deep/ .el-card__header {
padding: 0;
border: 0;
.card_title {
font-size: 14px;
color: #ff8d03;
}
}
}</style>
\ No newline at end of file
}
</style>
\ No newline at end of file
......@@ -16,14 +16,22 @@ export default {
components: {
sysSetTable
},
watch: {
tabName(val) {
if (val == 'kaiguan') {
this.getData()
}
}
},
data() {
return {
tableDataLoading: false,
tableData: [],
}
},
created() {
this.getData();
activated() {
if (this.tabName == 'kaiguan')
this.getData();
},
methods: {
// 获取数据列表
......
......@@ -22,8 +22,9 @@ export default {
tableData: [],
}
},
created() {
this.getData()
activated() {
if (this.tabName == 'xieyi')
this.getData()
},
methods: {
// 获取数据列表
......
......@@ -5,21 +5,22 @@
<div style="width: 50%;margin: 0 auto;">
<el-form ref="form" :model="ruleForm" label-width="150px" size="mini">
<el-form-item label="关闭渠道">
<el-select v-model="ruleForm.form1">
<el-option v-for="(op, index) in options" :key="index" :label="op.label" :value="op.value"></el-option>
<el-select v-model="ruleForm.form1" clearable>
<el-option v-for="(op, index) in channelList" :key="index" :label="op.expressageCompanyName"
:value="op.expressageCompanyName"></el-option>
</el-select>
<div class="form_item_explain">
<div>显示已开通的渠道,并选择关闭那些快递渠道</div>
</div>
</el-form-item>
<el-form-item label="申通开通城市">
<el-form-item label="申通开通城市" v-if="ruleForm.form1 == '申通'">
<el-input v-model="ruleForm.form2" clearable placeholder="当申通快递关闭时,可选择开通部分城市"></el-input>
<div class="form_item_explain">
<div>例如:北京市|南京市,多个之间用|隔开,留空表示都开启</div>
</div>
</el-form-item>
<el-form-item size="large">
<el-button type="primary" @click="submit">提交</el-button>
<el-button type="primary" @click="submit" size="small">提交</el-button>
</el-form-item>
</el-form>
</div>
......@@ -28,6 +29,7 @@
</template>
<script>
import { getExpressageCompanySimpleAPI } from '@/api/ldy/home'
export default {
props: {
tabName: {
......@@ -39,7 +41,7 @@ export default {
watch: {
tabName(val) {
if (val == 'qudao') {
this.getData()
this.getExpressageCompanySimple()
}
}
},
......@@ -50,39 +52,35 @@ export default {
form1: '', //关闭渠道
form2: '', //申通开通城市
},
options: [
{
label: '申通',
value: 1
}
]
channelList: []
}
},
methods: {
// 获取数据
getData() {
this.$http({
url: this.$http.adornUrl(`common/type/condition/kefu`),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.loading = false
// 已开通渠道
getExpressageCompanySimple() {
getExpressageCompanySimpleAPI().then((response) => {
let res = response.data
if (res.error == 0 && res.code == 0 && res.data) {
this.channelList = res.data
}
}).catch(() => {
}).finally(() => {
this.loading = false
})
},
// 提交
submit() {
if (!this.ruleForm.form1) {
return this.$message.error('请选择需要关闭的快递渠道!')
}
if (this.ruleForm.form1 == '申通' && !this.ruleForm.form2) {
return this.$message.error('请输入申通快递所开通的城市!')
}
console.log(this.ruleForm)
},
},
created() {
this.getData();
activated() {
if (this.tabName == 'qudao')
this.getExpressageCompanySimple();
},
}
</script>
......
......@@ -22,8 +22,9 @@ export default {
tableData: [],
}
},
created() {
this.getData();
activated() {
if (this.tabName == 'fuwufei')
this.getData();
},
methods: {
// 获取数据列表
......
......@@ -7,9 +7,9 @@
<el-tab-pane label="短信配置" name="duanxin" lazy>
<note-setting :tabName="activeName"></note-setting>
</el-tab-pane>
<el-tab-pane label="公众号通知(订阅消息)通知商家" name="tongzhi" lazy>
<!-- <el-tab-pane label="公众号通知(订阅消息)通知商家" name="tongzhi" lazy>
<notice-setting :tabName="activeName"></notice-setting>
</el-tab-pane>
</el-tab-pane> -->
<el-tab-pane label="渠道管理" name="qudao" lazy>
<channel-setting :tabName="activeName"></channel-setting>
</el-tab-pane>
......@@ -65,8 +65,6 @@ export default {
},
},
created() {
},
mounted() {
this.activeName = 'fuwufei'
},
};
......
......@@ -22,8 +22,9 @@ export default {
tableData: [],
}
},
created() {
this.getData();
activated() {
if (this.tabName == 'duanxin')
this.getData();
},
methods: {
// 获取数据列表
......
......@@ -163,6 +163,7 @@ export default {
this.uploadForm.append("mch_id", this.newform.PartnerId);
this.uploadForm.append("md5_key", this.newform.PartnerKey);
console.log(this.uploadForm.getAll('mch_id'))
if (this.type == 1) {
wxpayConfigSave(this.uploadForm).then(res => {
if (res.error == 0) {
......
......@@ -14,10 +14,9 @@
<span class="label">通联支付({{ allConfig }}):</span>
<el-switch v-model="UnionPayType" @change="savePayType($event, 'ALLINPAY')"></el-switch>
</div> -->
<div class="switch-type"><span class="label">新申请微信支付({{ is_meepay ? meConfig : fuConfig }}):</span>
<!-- <div class="switch-type"><span class="label">新申请微信支付({{ is_meepay ? meConfig : fuConfig }}):</span>
<el-switch v-model="mePayType" @change="savePayType($event, 'MEEPAY')"></el-switch>
</div>
</div> -->
<div class="switch-type" v-if="is_wxpay">
<span class="label">已有微信支付({{ wxConfig }}):</span>
<el-switch v-model="wechatPayType" @change="savePayType($event, 'WXPAY')"></el-switch>
......@@ -41,9 +40,9 @@
<!-- <span class="tabs-span" :class="{active:payType==0}" v-if="is_all_config" @click="toggle(0)">
通联支付
</span> -->
<span class="tabs-span" :class="{ active: payType == 1 }" @click="toggle(1)">
<!-- <span class="tabs-span" :class="{ active: payType == 1 }" @click="toggle(1)">
微信支付(新申请)
</span>
</span> -->
<span class="tabs-span" :class="{ active: payType == 2 }" v-if="is_wxpay" @click="toggle(2)">
申请过微信支付
</span>
......@@ -54,7 +53,7 @@
<div class="content">
<!-- <payConfig v-if="payType==0 && is_all_config"></payConfig> -->
<wechatPay v-if="payType == 1 && is_meepay"></wechatPay>
<!-- <wechatPay v-if="payType == 1 && is_meepay"></wechatPay> -->
<oldWePay v-if="payType == 2 && is_wxpay" type="1"></oldWePay>
<!-- <merchantPay v-if="payType==1&&!is_meepay"></merchantPay>
<wechatPay v-if="payType==4 && show_meepay"></wechatPay> -->
......@@ -95,7 +94,7 @@ export default {
UnionPayType: false,
wechatPayType: false,
mePayType: false,
payType: 1,
payType: 2,
centerDialogVisible: false,
allConfig: '未配置',
meConfig: '未配置',
......@@ -107,7 +106,7 @@ export default {
show_meepay: false,
}
},
beforeMount() {
activated() {
this.getStatus();
},
methods: {
......@@ -142,7 +141,7 @@ export default {
this.wxConfig = status.WXPAY ? '已配置' : '未配置';
this.fuConfig = status.FUPAY ? '已配置' : '未配置';
this.payType = status.ALLINPAY ? 0 : status.MEEPAY ? 1 : status.WXPAY ? 2 : 1;
this.payType = status.ALLINPAY ? 0 : status.MEEPAY ? 1 : status.WXPAY ? 2 : 2;
// this.is_wxpay = res.data.is_wxpay;
this.is_wxpay = true;
......
<template>
<div>
<el-table :key="tabName" v-loading="tableDataLoading" :data="tableData.list">
<el-table v-loading="tableDataLoading" :data="tableData.list">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
......@@ -71,8 +71,8 @@
<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
@click="deleteuser(scope.row)">删除用户</el-button>
<el-button size="mini" type="warning" @click="updatesVip(scope.row)">赠送会员</el-button>
<el-button v-if="tabName === 'yichang'" :disabled="!isAuth('userList:updateStatus')" size="mini" type="danger" plain
@click="stateChangeHmd(scope.row.userId)">拉出黑名单</el-button>
<el-button v-if="tabName === 'yichang'" :disabled="!isAuth('userList:updateStatus')" size="mini"
type="danger" plain @click="stateChangeHmd(scope.row.userId)">拉出黑名单</el-button>
</template>
</el-table-column>
</el-table>
......@@ -105,15 +105,18 @@ export default {
return {
limit: 10,
page: 1,
tableDataLoading: true,
tableDataLoading: false,
tableData: [],
openValue: 1,
closeValue: 2,
}
},
created() {
this.dataSelect();
watch: {
tabName(val) {
if (val)
this.dataSelect();
}
},
methods: {
handleSizeChange(val) {
......@@ -155,9 +158,10 @@ export default {
}).then(({
data
}) => {
this.tableDataLoading = false
let returnData = data.data
this.tableData = returnData
}).finally(() => {
this.tableDataLoading = false
})
},
// 修改佣金比例
......
......@@ -11,32 +11,21 @@
</div> -->
<el-card shadow="never" class="card-common">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="全部用户" name="all" lazy>
<user-table ref="userTableRef_all" :tabName="activeName" :searchData="searchData" :tabInfo="tabInfo">
</user-table>
<el-tab-pane label="全部用户" name="all">
</el-tab-pane>
<el-tab-pane label="普通用户" name="putong" lazy>
<user-table ref="userTableRef_putong" :tabName="activeName" :searchData="searchData" :tabInfo="tabInfo">
</user-table>
<el-tab-pane label="普通用户" name="putong">
</el-tab-pane>
<el-tab-pane label="会员用户" name="huiyuan" lazy>
<user-table ref="userTableRef_huiyuan" :tabName="activeName" :searchData="searchData" :tabInfo="tabInfo">
</user-table>
<el-tab-pane label="会员用户" name="huiyuan">
</el-tab-pane>
<el-tab-pane label="钱包用户" name="qianbao" lazy>
<user-table ref="userTableRef_qianbao" :tabName="activeName" :searchData="searchData" :tabInfo="tabInfo">
</user-table>
<el-tab-pane label="钱包用户" name="qianbao">
</el-tab-pane>
<el-tab-pane label="订单用户" name="dingdan" lazy>
<user-table ref="userTableRef_dingdan" :tabName="activeName" :searchData="searchData" :tabInfo="tabInfo">
</user-table>
<el-tab-pane label="订单用户" name="dingdan">
</el-tab-pane>
<el-tab-pane label="黑名单用户" name="yichang" lazy>
<user-table ref="userTableRef_yichang" :tabName="activeName" :searchData="searchData" :tabInfo="tabInfo">
</user-table>
<el-tab-pane label="黑名单用户" name="yichang">
</el-tab-pane>
</el-tabs>
<user-table ref="userTableRef" :tabName="activeName" :searchData="searchData" :tabInfo="tabInfo">
</user-table>
</el-card>
</div>
</template>
......@@ -141,6 +130,11 @@ export default {
],
}
},
activated() {
this.$nextTick(() => {
this.$refs.userTableRef.dataSelect()
})
},
methods: {
// 查询
serachHandle() {
......@@ -196,6 +190,4 @@ export default {
}
</script>
<style scoped="scoped">
</style>
<style scoped="scoped"></style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!