Commit 696d65ed by leic

last release

1 parent bf8b905e
Showing with 2024 additions and 1015 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 () {
(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();
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;
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("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('clean', function () {
return del([versionPath])
gulp.task("clean", function() {
return del([versionPath, `${distPath}/config`]);
});
gulp.task('default', ['clean'], function () {
gulp.task("default", ["clean"], function() {
// 获取环境配置
env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat ? 'uat' : 'prod'
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 () {
gulp.start(
[
"build",
"create:versionCatalog",
"replace:cdnUrl",
"replace:version",
"concat:config",
"revhtml"
],
function() {
// 清除, 编译 / 处理项目中产生的文件
del([`${distPath}/static`, `${versionPath}/static/config`])
})
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 () {
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' })) // 添加的类名
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文件存放的目录
.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' })) // 添加的类名
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文件存放的目录
.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' })) // 添加的类名
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文件存放的目录
.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' })) // 添加的类名
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文件存放的目录
.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>
......
......@@ -6506,6 +6506,99 @@
}
}
},
"gulp-rev": {
"version": "8.1.0",
"resolved": "https://registry.npmmirror.com/gulp-rev/-/gulp-rev-8.1.0.tgz",
"integrity": "sha512-7LEkVJoPCpvBz2n/R909KhHOm/IjvaGkG/v4XWHrViLxyQ9KOVje1MxSn/jJL90oAy/UKKag2H5PkgoCglh71A==",
"dev": true,
"requires": {
"gulp-util": "^3.0.0",
"modify-filename": "^1.1.0",
"rev-hash": "^2.0.0",
"rev-path": "^2.0.0",
"sort-keys": "^2.0.0",
"through2": "^2.0.0",
"vinyl-file": "^3.0.0"
},
"dependencies": {
"sort-keys": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/sort-keys/-/sort-keys-2.0.0.tgz",
"integrity": "sha512-/dPCrG1s3ePpWm6yBbxZq5Be1dXGLyLn9Z791chDC3NFrpkVbWGzkBwPN1knaciexFXgRJ7hzdnwZ4stHSDmjg==",
"dev": true,
"requires": {
"is-plain-obj": "^1.0.0"
}
}
}
},
"gulp-rev-collector": {
"version": "1.3.3",
"resolved": "https://registry.npmmirror.com/gulp-rev-collector/-/gulp-rev-collector-1.3.3.tgz",
"integrity": "sha512-0G6a4aYmNVESV76lhw1GFl4OkuYEN3CJXax6dy6L8EAZ394n23wNjs6ZoYZCN4FnPos8IoYVdCqKxcQlDI00vg==",
"dev": true,
"requires": {
"plugin-error": "^1.0.1",
"through2": "^2.0.0",
"underscore": "^1.10.2",
"vinyl": "^2.2.0"
},
"dependencies": {
"clone": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz",
"integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
"dev": true
},
"clone-stats": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/clone-stats/-/clone-stats-1.0.0.tgz",
"integrity": "sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag==",
"dev": true
},
"plugin-error": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/plugin-error/-/plugin-error-1.0.1.tgz",
"integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==",
"dev": true,
"requires": {
"ansi-colors": "^1.0.1",
"arr-diff": "^4.0.0",
"arr-union": "^3.1.0",
"extend-shallow": "^3.0.2"
}
},
"replace-ext": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/replace-ext/-/replace-ext-1.0.1.tgz",
"integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==",
"dev": true
},
"vinyl": {
"version": "2.2.1",
"resolved": "https://registry.npmmirror.com/vinyl/-/vinyl-2.2.1.tgz",
"integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==",
"dev": true,
"requires": {
"clone": "^2.1.1",
"clone-buffer": "^1.0.0",
"clone-stats": "^1.0.0",
"cloneable-readable": "^1.0.0",
"remove-trailing-separator": "^1.0.1",
"replace-ext": "^1.0.0"
}
}
}
},
"gulp-sequence": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/gulp-sequence/-/gulp-sequence-1.0.0.tgz",
"integrity": "sha512-c+p+EcyBl1UCpbfFA/vUD6MuC7uxoY6Y4g2lq9lLtzOHh9o1wijAQ4o0TIRQ14C7cG6zR6Zi+bpA0cW78CFt6g==",
"dev": true,
"requires": {
"thunks": "^4.9.0"
}
},
"gulp-shell": {
"version": "0.6.5",
"resolved": "https://registry.npmjs.org/gulp-shell/-/gulp-shell-0.6.5.tgz",
......@@ -9944,6 +10037,12 @@
}
}
},
"modify-filename": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/modify-filename/-/modify-filename-1.1.0.tgz",
"integrity": "sha512-EickqnKq3kVVaZisYuCxhtKbZjInCuwgwZWyAmRIp1NTMhri7r3380/uqwrUHfaDiPzLVTuoNy4whX66bxPVog==",
"dev": true
},
"moment": {
"version": "2.29.4",
"resolved": "https://registry.npmmirror.com/moment/-/moment-2.29.4.tgz",
......@@ -16147,6 +16246,21 @@
"resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
"integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg=="
},
"rev-hash": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/rev-hash/-/rev-hash-2.0.0.tgz",
"integrity": "sha512-U6EkYZI87C3B5KS46HAEy+g+rtueIdfF9Zb6XBlGe3R/RaF3V8drN7nRFm7/swHOK1zQLGvIYwQ4Q6WDAAlynw==",
"dev": true
},
"rev-path": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/rev-path/-/rev-path-2.0.0.tgz",
"integrity": "sha512-G5R2L9gYu9kEuqPfIFgO9gO+OhBWOAT83HyauOQmGHO6y9Fsa4acv+XsmNhNDrod0HDh1/VxJRmsffThzeHJlQ==",
"dev": true,
"requires": {
"modify-filename": "^1.0.0"
}
},
"right-align": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
......@@ -17437,6 +17551,75 @@
"is-utf8": "^0.2.0"
}
},
"strip-bom-buf": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz",
"integrity": "sha512-1sUIL1jck0T1mhOLP2c696BIznzT525Lkub+n4jjMHjhjhoAQA6Ye659DxdlZBr0aLDMQoTxKIpnlqxgtwjsuQ==",
"dev": true,
"requires": {
"is-utf8": "^0.2.1"
}
},
"strip-bom-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz",
"integrity": "sha512-yH0+mD8oahBZWnY43vxs4pSinn8SMKAdml/EOGBewoe1Y0Eitd0h2Mg3ZRiXruUW6L4P+lvZiEgbh0NgUGia1w==",
"dev": true,
"requires": {
"first-chunk-stream": "^2.0.0",
"strip-bom": "^2.0.0"
},
"dependencies": {
"first-chunk-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz",
"integrity": "sha512-X8Z+b/0L4lToKYq+lwnKqi9X/Zek0NibLpsJgVsSxpoYq7JtiCtRb5HqKVEjEw/qAb/4AKKRLOwwKHlWNpm2Eg==",
"dev": true,
"requires": {
"readable-stream": "^2.0.2"
}
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
"dev": true
},
"readable-stream": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.8.tgz",
"integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
"dev": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
"safe-buffer": "~5.1.0"
}
},
"strip-bom": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-2.0.0.tgz",
"integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==",
"dev": true,
"requires": {
"is-utf8": "^0.2.0"
}
}
}
},
"strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
......@@ -17900,6 +18083,12 @@
}
}
},
"thunks": {
"version": "4.9.6",
"resolved": "https://registry.npmmirror.com/thunks/-/thunks-4.9.6.tgz",
"integrity": "sha512-ulXG17ZokTO8j0rTx/23YHsBuz6KAK1xdBPLH4zB1FRDUkttCQeli3DxGhhYtrrsRwzacSG+ZIebjSgLseluMw==",
"dev": true
},
"thunky": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz",
......@@ -18245,6 +18434,12 @@
"integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==",
"dev": true
},
"underscore": {
"version": "1.13.6",
"resolved": "https://registry.npmmirror.com/underscore/-/underscore-1.13.6.tgz",
"integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==",
"dev": true
},
"unidecode": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/unidecode/-/unidecode-0.1.8.tgz",
......@@ -18527,6 +18722,59 @@
"replace-ext": "0.0.1"
}
},
"vinyl-file": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/vinyl-file/-/vinyl-file-3.0.0.tgz",
"integrity": "sha512-BoJDj+ca3D9xOuPEM6RWVtWQtvEPQiQYn82LvdxhLWplfQsBzBqtgK0yhCP0s1BNTi6dH9BO+dzybvyQIacifg==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"pify": "^2.3.0",
"strip-bom-buf": "^1.0.0",
"strip-bom-stream": "^2.0.0",
"vinyl": "^2.0.1"
},
"dependencies": {
"clone": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz",
"integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
"dev": true
},
"clone-stats": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/clone-stats/-/clone-stats-1.0.0.tgz",
"integrity": "sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag==",
"dev": true
},
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/pify/-/pify-2.3.0.tgz",
"integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==",
"dev": true
},
"replace-ext": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/replace-ext/-/replace-ext-1.0.1.tgz",
"integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==",
"dev": true
},
"vinyl": {
"version": "2.2.1",
"resolved": "https://registry.npmmirror.com/vinyl/-/vinyl-2.2.1.tgz",
"integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==",
"dev": true,
"requires": {
"clone": "^2.1.1",
"clone-buffer": "^1.0.0",
"clone-stats": "^1.0.0",
"cloneable-readable": "^1.0.0",
"remove-trailing-separator": "^1.0.1",
"replace-ext": "^1.0.0"
}
}
}
},
"vinyl-fs": {
"version": "0.3.14",
"resolved": "https://registry.npmmirror.com/vinyl-fs/-/vinyl-fs-0.3.14.tgz",
......
......@@ -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',
el: "#app",
router,
store,
template: '<App/>',
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()
}
};
......
<template>
<div>
<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">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
<div class="billDayCount-view">
<div class="news-tips">
<div class="tips-box">
<p class="info">
对账单数据自2019年4月12日起更新;
</p>
<p class="info">
对账单统计日期以账单明细中入账时间为准,如需下单时间维度的汇总,可在账单明细下载相应报表进行汇总;
</p>
<p class="info">
日汇总账单在次日12时生成。如遇特殊情况,则可能产生延迟生成情况,请谅解;
</p>
<p class="info">
提现支出为分销员、团长等平台特殊人群的收益提现支出以及商户针对店铺余额的提现;
</p>
<p class="info">
手续费支出金额可能为负值(支付成功为正值,退款为负值);
</p>
<p class="info">
净收入为收入总计金额-支出总计金额(退款支出及交易手续费支出)。
</p>
</div>
</div>
<div class="container">
<el-tabs v-model="activeName" @tab-click="getData()" style="border-bottom: 1px solid #e8e8e8">
<el-tab-pane label="日汇总" name="first"></el-tab-pane>
<el-tab-pane label="月汇总" name="second"></el-tab-pane>
</el-tabs>
<div style="display: flex;">
<div v-if="activeName == 'first'" style="margin-top: 20px;margin-bottom: 20px">
<el-date-picker v-model="activeName2" size="small" :picker-options="pickerOptions"
value-format="yyyy-MM" type="month" placeholder="选择月份" @change="checkMouth">
</el-date-picker>
</div>
<div v-if="activeName == 'second'" style="margin-top: 20px;margin-bottom: 20px">
<el-date-picker v-model="activeName3" size="small" type="year" placeholder="选择年份" @change="checkYear"
:picker-options="pickerOptions" value-format="yyyy">
</el-date-picker>
</div>
<!-- <a :href="handleExport2()" class="expoint-button"> -->
<!-- </a> -->
<el-button style="height: 32px" class="expoint-button" type="primary" size="small" icon="el-icon-download"
@click="explainAll">批量导出</el-button>
</div>
</div>
<el-table :data="tableData" v-loading="tableDataLoading">
<el-table-column prop="time" label="日期" fixed>
</el-table-column>
<el-table-column prop="kd_order_pay" label="快递订单金额" :formatter="(row, column) => tableFormatter(row, column, null, '元')">
<template slot-scope="scope">
{{ (scope.row.kd_order_pay / 100).toFixed(2) }}
</template>
<el-table-column prop="id" label="账号">
</el-table-column>
<el-table-column prop="userName" label="应用ID">
<el-table-column prop="coupon_order_pay" label="购买优惠券">
</el-table-column>
<el-table-column prop="vip_order_pay" label="购买会员">
</el-table-column>
<el-table-column prop="kd_add_order_pay" label="订单补缴费用">
</el-table-column>
<el-table-column prop="refund_amount" label="退款支出" :formatter="(row, column) => tableFormatter(row, column, null, '元')">
<template slot-scope="scope">
{{ (scope.row.refund_amount / 100).toFixed(2) }}
</template>
</el-table-column>
<el-table-column prop="phone" label="统计时间">
<el-table-column prop="fee" label="交易手续费支出" :formatter="(row, column) => tableFormatter(row, column, null, '元')">
<template slot-scope="scope">
{{ (scope.row.fee / 100).toFixed(2) }}
</template>
</el-table-column>
<el-table-column prop="title" label="付款金额">
<el-table-column prop="income_count" label="收入条数">
</el-table-column>
<el-table-column prop="content" label="结算金额">
<el-table-column prop="cost_count" label="退款条数">
</el-table-column>
<el-table-column prop="createTime" label="创建时间">
<el-table-column prop="income" label="总计到账金额" :formatter="(row, column) => tableFormatter(row, column, null, '元')">
<template slot-scope="scope">
{{ (scope.row.income / 100).toFixed(2) }}
</template>
</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">
</el-pagination>
</div>
</el-card>
</div>
</template>
<script>
import SearchForm from '@/components/SearchForm'
import moment from 'moment';
import { getMonth, getDate, distributorList } from '@/api/ldy/finance/billDetail.js'
import { getMallToken } from '@/utils/cookie'
import { urlEncode } from '@/utils/url2params'
export default {
components: {
SearchForm
},
name: "bill",
data() {
return {
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() - 8.64e7
}
},
activeName: 'first',
size: 10,
page: 1,
totalnum: 0,
activeName2: '',
activeName3: '',
value1: '',
value2: '',
time: '',
shortcuts: [{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date());
}
}, {
text: '昨天',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24);
picker.$emit('pick', date);
}
}, {
text: '一周前',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', date);
}
}],
tableDataLoading: false,
tableData: [],
searchData: {
userName: '', //账号
startTime: '', //开始时间
endTime: '', //截止时间
startEndTime: [], //开始结束日期
},
formItems: [
{
label: '账号',
prop: 'userName',
type: 'Select',
options: [],
},
{
label: '日期',
prop: 'startEndTime',
type: 'DateRange',
},
]
tableModule: [],
currentPage: 1,
totalPages: 0,
page_size: 10,
exportBaseUrl: process.env.NODE_ENV == 'development' ? this.$store.state.baseURL : this.$store.state.baseURL,
listTime: '',
}
},
methods: {
// 查询
serachHandle() {
this.page = 1
this.getTableData()
//导出明细
getTimeDetail(time) {
this.time = time;
let obj = this.getUserList(true);
let tmpa = document.createElement("a");
tmpa.href = obj; //绑定a标签
tmpa.click(); //模拟点击实现下载
setTimeout(function () { //延时释放
URL.revokeObjectURL(obj); //用URL.revokeObjectURL()来释放这个object URL
}, 100);
},
handleSizeChange(val) {
this.size = val;
this.getTableData()
//批量导出
explainAll() {
let obj = this.getUserList2(true);
let tmpa = document.createElement("a");
tmpa.href = obj; //绑定a标签
tmpa.click(); //模拟点击实现下载
setTimeout(function () { //延时释放
URL.revokeObjectURL(obj); //用URL.revokeObjectURL()来释放这个object URL
}, 100);
},
handleCurrentChange(val) {
this.page = val;
this.getTableData()
//选择月份
checkMouth(e) {
let date = e.split('-');
this.listTime = `${date[0]}${date[1]}`;
this.getData(true);
},
//获取列表数据
getTableData() {
if (this.searchData.startEndTime && this.searchData.startEndTime.length > 1) {
this.searchData.startTime = moment(this.searchData.startEndTime[0]).format('YYYY-DD-MM')
this.searchData.endTime = moment(this.searchData.startEndTime[1]).format('YYYY-DD-MM')
//选择年
checkYear(e) {
this.listTime = e;
this.getData(true);
},
//获取列表
getData(init = false) {
this.tableData = [];
this.tableDataLoading = true
if (!init) {
let now = new Date();
let mouth = now.getMonth();
if ((mouth + 1) < 10) {
mouth = '0' + (mouth + 1);
} else {
this.searchData.startTime = ''
this.searchData.endTime = ''
mouth = mouth + 1;
}
let { startEndTime, ...params } = this.searchData
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('Details/selectCouponList'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.size,
...params
if (this.activeName == 'first') {
this.listTime = String(now.getFullYear()) + String(mouth);
} else if (this.activeName == 'second') {
this.listTime = String(now.getFullYear());
}
}
let data = {
time: this.listTime
}
if (this.activeName == 'first') {
getDate(data).then(res => {
if (res.error == 0 && res.data) {
this.tableData = res.data
}
}).finally(() => {
this.tableDataLoading = false
})
}).then(({
data
}) => {
} else {
getMonth(data).then(res => {
if (res.error == 0 && res.data) {
this.tableData = res.data
}
}).finally(() => {
this.tableDataLoading = false
let tableData = data.data
this.tableData = tableData
this.totalnum = tableData.totalCount
})
}
},
// 导出账单明细
getUserList(is_exoprt = false) {
let params = {};
// this.loading = true;
if (is_exoprt) {
let token = getMallToken();
let RegExp = /^(\d{4})(-)(\d{2})(-)(\d{2})$/;
if (RegExp.test(this.time)) {
let substring = this.time.substring(0) //2019-04-02
params.time = substring;
var exportUrl = this.exportBaseUrl + 'funds/bill/export?token=' + token;
} else {
let substring = this.time.substring(0, 7) //2019
params.time = substring;
var exportUrl = this.exportBaseUrl + 'funds/bill/export?token=' + token;
}
return exportUrl + urlEncode(params);
} else {
this.loading = true;
distributorList(params).then(res => {
this.loading = false;
})
}
},
// 复制
copys(number) {
var _this = this
this.$copyText(number).then(function (e) {
_this.$message({
message: '复制成功',
type: 'success'
});
}, function (e) {
_this.$message.error('复制失败');
//批量导出
getUserList2(is_exoprt = false) {
let params = {};
if (is_exoprt) {
let token = getMallToken();
let substring = this.listTime; //2019
params.time = substring;
var exportUrl = this.exportBaseUrl + 'funds/bill/batch?token=' + token;
return exportUrl + urlEncode(params);
} else {
this.loading = true;
distributorList(params).then(res => {
this.loading = false;
})
}
},
sizeChange() {
},
handleCurrentChange() {
},
created() {
this.getTableData()
},
// watch: {
// 'tableData': {
// handler: (newVal, oldVal) => {
// console.log(newVal, oldVal);
// },
// deep: true //深度监听
// }
// },
activated() {
this.getData()
}
};
}
</script>
<style scoped>
.billDayCount-view {
background: #fff;
padding: 15px;
position: relative;
}
.tips-box {
background: rgba(255, 251, 228, 1);
border: 1px solid rgba(237, 227, 171, 1);
border-radius: 4px;
color: #4E4E4E;
font-size: 12px;
padding: 20px;
}
.tips-box .info {
line-height: 20px;
}
.container {
margin-top: 20px;
/*display: flex;*/
}
.expoint-button {
margin-top: 20px;
margin-left: 20px;
}
<style scoped="scoped"></style>
.el-tabs,
.el-table,
.el-tab-pane,
.el-button {
/*margin-top:20px;*/
}
</style>
......@@ -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>
......
......@@ -2,21 +2,24 @@
<el-dialog :title="!unique_id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="账号" prop="business_account">
<el-input v-model="dataForm.business_account" placeholder="登录帐号,例:手机号"></el-input>
<span class="info-account" v-if="infoStatus && accountStatus">此账号已经完成注册,权限分配完成后,可直接登录管理店铺</span>
<el-input v-model="dataForm.business_account" placeholder="登录帐号,例:手机号" autocomplete="off"></el-input>
<!-- <span class="info-account" v-if="infoStatus && accountStatus">此账号已经完成注册,权限分配完成后,可直接登录管理店铺</span>
<span class="info-account" v-if="infoStatus && !accountStatus">
此账号还未在平台注册,添加角色之前请完成注册
<a class="info-account-a" href="https://www.ledianyun.com/account/register">注册</a>
</span>
</span> -->
</el-form-item>
<el-form-item label="密码" prop="business_password" :class="{ 'is-required': !unique_id }">
<el-input v-model="dataForm.business_password" type="password" placeholder="密码"></el-input>
<!-- <el-form-item label="密码" prop="business_password" :class="{ 'is-required': !unique_id }">
<el-input v-model="dataForm.business_password" type="password" placeholder="密码" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="确认密码" prop="comfirmPassword" :class="{ 'is-required': !unique_id }">
<el-input v-model="dataForm.comfirmPassword" type="password" placeholder="确认密码"></el-input>
</el-form-item>
<el-form-item label="邮箱" prop="email">
<el-input v-model="dataForm.comfirmPassword" type="password" placeholder="确认密码" autocomplete="off"></el-input>
</el-form-item> -->
<!-- <el-form-item label="邮箱" prop="email">
<el-input v-model="dataForm.email" placeholder="邮箱"></el-input>
</el-form-item> -->
<el-form-item label="初始密码" prop="">
<el-input disabled v-model="initPwd" placeholder="创建用户初始密码"></el-input>
</el-form-item>
<el-form-item label="用户名" prop="name">
<el-input v-model="dataForm.name" placeholder="用户名"></el-input>
......@@ -24,7 +27,7 @@
<el-form-item label="联系方式" prop="phone">
<el-input v-model="dataForm.phone" placeholder="联系方式"></el-input>
</el-form-item>
<el-form-item label="角色" size="mini" prop="roleIdList">
<el-form-item label="角色" size="mini" prop="roles">
<el-checkbox-group v-model="dataForm.roles">
<el-checkbox v-for="(role, index) in roleList" :key="index" :label="role.roleId">{{ role.roleName
}}</el-checkbox>
......@@ -61,7 +64,7 @@
</template>
<script>
import { isEmail, isMobile } from '@/utils/validate'
import { isEmail, isMobile, isEmpty } from '@/utils/validate'
import {
checkBusinessAccount,
subAccountRole,
......@@ -110,6 +113,7 @@ export default {
}
return {
visible: false,
initPwd: '123456',
dataForm: {
business_account: "",
account: "",
......@@ -121,6 +125,17 @@ export default {
business_password: '',
comfirmPassword: '',
},
// dataForm: {
// id: 0,
// userName: '',
// password: '',
// comfirmPassword: '',
// salt: '',
// email: '',
// mobile: '',
// roleIdList: [],
// status: 1
// },
branches: "",
restaurants: [],
timeout: null,
......@@ -133,6 +148,8 @@ export default {
timers: null,
codeInfo: "获取验证码",
unique_id: "",
userId: 0,
createUserId: '',
authPhone: "",
dataRule: {
business_account: [
......@@ -144,14 +161,27 @@ export default {
comfirmPassword: [
{ validator: validateComfirmPassword, trigger: 'blur' }
],
email: [
{ required: true, message: '邮箱不能为空', trigger: 'blur' },
{ validator: validateEmail, trigger: 'blur' }
],
// email: [
// { required: true, message: '邮箱不能为空', trigger: 'blur' },
// { validator: validateEmail, trigger: 'blur' }
// ],
phone: [
{ required: true, message: '手机号不能为空', trigger: 'blur' },
{ validator: validateMobile, trigger: 'blur' }
]
// userName: [
// { required: true, message: '用户名不能为空', trigger: 'blur' }
// ],
// // password: [
// // { validator: validatePassword, trigger: 'blur' }
// // ],
// // comfirmPassword: [
// // { validator: validateComfirmPassword, trigger: 'blur' }
// // ],
// mobile: [
// { required: true, message: '手机号不能为空', trigger: 'blur' },
// { validator: validateMobile, trigger: 'blur' }
// ]
}
}
},
......@@ -171,35 +201,57 @@ export default {
},
methods: {
// 初始化表单
resetInfo() {
this.infoStatus = false;
this.accountStatus = false;
this.$refs.dataForm.resetFields()
},
async init() {
await this.getRoleList();
console.log(this.info)
// 如果是新增
if (this.info.type == 'add') {
this.resetInfo()
return
}
// this.getBranchList();
this.authPhone = this.info.authPhone;
this.dataForm.business_account = this.info.business_name;
if (this.info.unique_id) {
// this.dataForm.business_account = this.info.business_name;
if (!isEmpty(this.info.unique_id) && !isEmpty(this.info.userId)) {
this.unique_id = this.info.unique_id;
this.userId = this.info.userId;
const res = await subAccountDetails({
unique_id: this.unique_id
});
if (res.error == 0 && res.data) {
let roles = []
if (res.data.roles) {
if (!Array.isArray(res.data.roles)) {
roles = [Number(res.data.roles)]
} else {
roles = res.data.roles.map(role => Number(role))
}
}
console.log(roles)
this.unique_id = res.data.unique_id;
this.dataForm.business_account = res.data.business_account;
this.dataForm.business_password = res.data.business_password;
this.dataForm.comfirmPassword = this.dataForm.business_password;
this.dataForm.name = res.data.truename || "";
this.dataForm.phone = res.data.phone;
this.dataForm.roles = res.data.roles && res.data.roles.length ? res.data.roles.map(role => Number(role)) : [];
this.dataForm.roles = roles;
this.dataForm.status = res.data.status;
this.dataForm.email = res.data.email || '12@qq.com'
this.dataForm.email = res.data.email
console.log(res.data, "======res/data");
} else {
this.resetInfo()
}
const ares = await accountDetail({
account_phone: this.dataForm.business_account
});
if (ares.error === 0) {
this.branches = ares.data.map(v => v.id);
}
this.$http({
url: this.$http.adornUrl(`/sys/user/info/${this.info.userId}`),
method: 'get',
params: this.$http.adornParams()
})
}
},
async getRoleList() {
......@@ -271,11 +323,11 @@ export default {
async dataLdyFormSubmit() {
this.$refs['dataForm'].validate(async (valid) => {
if (valid) {
await this.checkAccount();
if (!this.accountStatus) {
// 去注册
return;
}
// await this.checkAccount();
// if (!this.accountStatus) {
// // 去注册
// return;
// }
if (this.dataForm.roles.length < 1) {
this.$message({
message: '请选择角色',
......@@ -286,24 +338,26 @@ export default {
let { business_account, business_password, name, phone, roles, email } = this.dataForm;
let data = {
business_account,
business_password,
// business_password,
name,
phone,
roles,
email
save_type: 'auto'
// email
};
if (this.unique_id) {
data.unique_id = this.unique_id;
}
subAccountSave(data).then(async (res) => {
if (this.dataForm.roles.indexOf("branch") !== -1) {
console.log(2131, '---321321')
await accountRelate({
account_phone: business_account,
branches: this.branches
});
}
// if (this.dataForm.roles.indexOf("branch") !== -1) {
// console.log(2131, '---321321')
// await accountRelate({
// account_phone: business_account,
// branches: this.branches
// });
// }
if (res.error == 0) {
this.createUserId = res.data.id
this.dataFormSubmit();
}
})
......@@ -313,19 +367,27 @@ export default {
},
// 表单提交
dataFormSubmit() {
let params = {
'userId': this.userId || undefined,
mtoken: sessionStorage.getItem('mtoken'),
btoken: sessionStorage.getItem('btoken'),
'username': this.dataForm.name,
'salt': this.info.salt,
'email': this.dataForm.email || '1@qq.com',
'mobile': this.dataForm.business_account,
'status': this.info.status,
'roleIdList': this.dataForm.roles,
createUserId: this.createUserId,
isMain: 0
}
if (!this.unique_id) {
// 如果是新建用户,设置初始密码
params.password = this.initPwd
}
this.$http({
url: this.$http.adornUrl(`/sys/user/${!this.unique_id ? 'save' : 'update'}`),
method: 'post',
data: this.$http.adornData({
'userId': this.unique_id || undefined,
'username': this.dataForm.business_account,
'password': this.dataForm.business_password,
'salt': this.dataForm.salt,
'email': this.dataForm.email,
'mobile': this.dataForm.phone,
'status': this.info.status,
'roleIdList': this.dataForm.roles
})
data: this.$http.adornData(params)
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
......
......@@ -14,40 +14,38 @@
</template>
<!-- <el-table-column type="selection" header-align="center" align="center" width="50">
</el-table-column> -->
<el-table-column prop="business_name" align="center" label="账号">
<el-table-column prop="userId" header-align="center" align="center" width="80" label="ID">
</el-table-column>
<el-table-column prop="truename" align="center" label="用户名">
<el-table-column prop="username" header-align="center" align="center" label="用户名">
</el-table-column>
<el-table-column prop="phone" align="center" label="联系方式">
<el-table-column prop="mobile" header-align="center" align="center" label="手机号">
</el-table-column>
<el-table-column prop="roles" align="center" label="角色">
<!-- <el-table-column prop="roleIdList" align="center" label="角色">
<template slot-scope="scope">
<div class="role-box">
<span v-for="(item, index) in scope.row.roles" :key="index">{{ item.label }}</span>
<span v-for="(item, index) in scope.row.roleIdList" :key="index">{{ roleList.filter((role) => role.roleId ==
item).roleName }}</span>
</div>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column prop="status" align="center" label="状态">
<template slot-scope="scope">
<div>{{ scope.row.status == 1 ? '启用' : '关闭' }}</div>
<div>
<el-switch :value="scope.row.status == 1 ? true : false"
@change="doUser(scope.row.unique_id, scope.row.status)"></el-switch>
</div>
<el-switch :disabled="!isAuth('sys:user:update')" :value="scope.row.status" :active-value="1" :inactive-value="0" @click.native="switchChange(scope.row)"></el-switch>
</template>
<!-- <template slot-scope="scope">
<el-tag v-if="scope.row.status === 0" size="small" type="danger">禁用</el-tag>
<el-tag v-else size="small">正常</el-tag>
</template> -->
</el-table-column>
<el-table-column prop="created_at" align="center" width="180" label="创建时间">
<el-table-column prop="createTime" align="center" width="180" label="创建时间">
</el-table-column>
<el-table-column fixed="right" align="center" width="160" label="操作">
<template slot-scope="scope">
<el-button :disabled="!isAuth('sys:user:update')" type="text" size="small"
<el-button :disabled="!isAuth('sys:user:update')" type="primary" size="mini"
@click="addOrUpdateHandle(scope.row)">修改</el-button>
<el-button class="text-danger" :disabled="!isAuth('sys:user:delete')" type="text" size="small"
@click="deleteHandle(scope.row.unique_id)">删除</el-button>
<el-button class="text-danger" :disabled="!isAuth('sys:user:delete')" type="danger" size="mini"
@click="deleteHandle(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
......@@ -69,32 +67,38 @@ export default {
data() {
return {
searchData: {
status: '',
keyword: '',
// status: '',
// keyword: '',
username: '',
},
formItems: [
// {
// label: '状态',
// prop: 'status',
// type: 'Select',
// options: [
// {
// label: '全部/不限',
// value: 0
// },
// {
// label: '启用',
// value: 1
// },
// {
// label: '禁用',
// value: 2
// },
// ]
// },
// {
// label: '账号/姓名',
// prop: 'keyword',
// type: 'Input',
// },
{
label: '状态',
prop: 'status',
type: 'Select',
options: [
{
label: '全部/不限',
value: 0
},
{
label: '启用',
value: 1
},
{
label: '禁用',
value: 2
},
]
},
{
label: '账号/姓名',
prop: 'keyword',
label: '用户名',
prop: 'username',
type: 'Input',
},
],
......@@ -114,7 +118,10 @@ export default {
usedProgress: 0,
dataListSelections: [],
popInfo: {
type: 'add',
unique_id: '',
userId: 0,
salt: '',
business_name: '',
authPhone: '',
status: false
......@@ -134,10 +141,6 @@ export default {
methods: {
// 角色列表
async getRoleList() {
// let res = await subAccountRole();
// if (res.error == 0 && res.data) {
// this.roleList = res.data;
// }
return this.$http({
url: this.$http.adornUrl('/sys/role/select'),
method: 'get',
......@@ -176,41 +179,73 @@ export default {
if (type == "delete") {
this.getAuthInfo();
}
} else {
this.$message.error("操作失败");
}
},
// 获取数据列表
getDataList(page = 1) {
this.loading = true;
this.loading = true
this.$http({
url: this.$http.adornUrl('sys/user/list'),
method: 'get',
params: this.$http.adornParams({
'page': page,
'limit': this.pageSize,
'username': this.searchData.username
})
}).then(({ data }) => {
if (data && data.code === 0) {
let list = data.page && Array.isArray(data.page.list) ? data.page.list : []
this.tableData = list
this.totalPages = data.page.totalCount
} else {
this.tableData = []
this.totalPages = 0
}
}).finally(() => {
this.loading = false
})
subAccountLists({
page_size: this.pageSize,
page: page,
...this.searchData
}).then((res) => {
this.loading = false;
this.tableData = [];
this.currentPage = 0;
this.totalPages = 0;
if (res.error == 0 && res.data) {
this.tableData = res.data.items.map(item => {
return {
...item,
roles: item.roles && item.roles.length ? this.roleList.filter(r => item.roles.some(i => r.roleId == i.value)).map((role) => {
return {
label: role.roleName,
value: role.roleId
}
}) : []
}
}) || [];
console.log(this.tableData)
this.currentPage = parseInt(page);
this.totalPages = parseInt(res.data.count);
}
}).catch(() => {
this.loading = false;
this.tableData = [];
})
},
// 获取数据列表
// getDataList(page = 1) {
// this.loading = true;
// subAccountLists({
// page_size: this.pageSize,
// page: page,
// ...this.searchData,
// status: this.searchData.status ? this.searchData.status : undefined,
// keyword: this.searchData.keyword ? this.searchData.keyword : undefined
// }).then((res) => {
// this.loading = false;
// this.tableData = [];
// this.currentPage = 0;
// this.totalPages = 0;
// if (res.error == 0 && res.data) {
// this.tableData = res.data.items.map(item => {
// return {
// ...item,
// roles: item.roles && item.roles.length ? this.roleList.filter(r => item.roles.some(i => r.roleId == i.value)).map((role) => {
// return {
// label: role.roleName,
// value: role.roleId
// }
// }) : []
// }
// }) || [];
// console.log(this.tableData)
// this.currentPage = parseInt(page);
// this.totalPages = parseInt(res.data.count);
// }
// }).catch(() => {
// this.loading = false;
// this.tableData = [];
// })
// },
// 每页数
sizeChangeHandle(val) {
this.pageSize = val;
......@@ -234,33 +269,77 @@ export default {
this.dataListSelections = val
},
// 新增 / 修改
addOrUpdateHandle({ unique_id, business_name, status }) {
if (unique_id) {
this.popInfo.unique_id = unique_id;
this.popInfo.business_name = business_name;
addOrUpdateHandle({ createUserId, userId, salt, mobile, status }) {
console.log(createUserId)
if (createUserId != null || createUserId != '') {
this.popInfo.type = 'edit'
this.popInfo.unique_id = createUserId;
this.popInfo.userId = userId;
this.popInfo.salt = salt;
// this.popInfo.business_name = mobile;
this.popInfo.status = status;
this.popInfo.authPhone = this.authInfo.business_account;
} else {
this.popInfo = {
type: 'add',
status: 0
}
}
this.addOrUpdateVisible = true
// this.addOrUpdateVisible = true
this.$nextTick(() => {
// this.$refs.addOrUpdate.init(id)
this.$refs.addOrUpdate.visible = true
// this.$refs.addOrUpdate.init()
})
},
// 删除
deleteHandle(id) {
let userIds = id ? [id] : this.dataListSelections.map(item => {
return item.unique_id
deleteHandle(row) {
let userIds = row.userId ? [row.userId] : this.dataListSelections.map(item => {
return item.createUserId
})
this.$confirm(`确定对[id=${userIds.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
this.$confirm(`确定对[id=${userIds.join(',')}]进行[${row.userId ? '删除' : '批量删除'}]操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.doUser(id)
// 乐店云删除
this.doUser(row.createUserId)
// 裹裹删除接口
this.$http({
url: this.$http.adornUrl('/sys/user/delete'),
method: 'post',
params: this.$http.adornParams({
id: row.userId
})
})
}).catch(() => { })
},
switchChange(row) {
this.$confirm(`是否${!row.status ? '开启' : '关闭'}该账号?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
iconClass: 'icon-warning',
}).then(() => {
this.$http({
url: this.$http.adornUrl(`/sys/user/update`),
method: 'post',
data: this.$http.adornData({
'userId': row.userId,
'username': row.username,
'password': row.password,
'salt': row.salt,
'email': row.email || '1@qq.com',
'mobile': row.mobile,
'status': row.status == 1 ? 0 : 1,
'roleIdList': row.roleIdList || []
})
}).then(() => {
this.doUser(row.createUserId, row.status)
console.log(row)
}).catch(() => {
this.$message.error("操作失败");
})
}).catch(()=>{})
},
}
}
</script>
......
......@@ -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,7 +599,8 @@
<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)">{{
<span style="cursor: pointer;color: var(--primary-color);"
@click="updates(detaDatle.userId)">{{
detaDatle.userName ? detaDatle.userName : '-' }}</span>
</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,13 +16,21 @@ export default {
components: {
sysSetTable
},
watch: {
tabName(val) {
if (val == 'kefu') {
this.getData()
}
}
},
data() {
return {
tableDataLoading: false,
tableData: [],
}
},
created() {
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,9 +88,30 @@ 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() {
activated() {
if (this.tabName == 'tishi')
this.getData();
},
}
......
......@@ -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,13 +16,21 @@ export default {
components: {
sysSetTable
},
watch: {
tabName(val) {
if (val == 'kaiguan') {
this.getData()
}
}
},
data() {
return {
tableDataLoading: false,
tableData: [],
}
},
created() {
activated() {
if (this.tabName == 'kaiguan')
this.getData();
},
methods: {
......
......@@ -22,7 +22,8 @@ export default {
tableData: [],
}
},
created() {
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,7 +22,8 @@ export default {
tableData: [],
}
},
created() {
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,7 +22,8 @@ export default {
tableData: [],
}
},
created() {
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() {
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
})
},
// 修改佣金比例
......
......@@ -18,10 +18,11 @@
<tr>
<th>编号</th>
<td>
{{ tableData.userEntity.userId }}
{{ tableData && tableData.userEntity ? tableData.userEntity.userId : '-' }}
</td>
<th>手机号</th>
<td>{{ tableData.userEntity.phone ? tableData.userEntity.phone : '未绑定' }}
<td>{{ tableData && tableData.userEntity && tableData.userEntity.phone ?
tableData.userEntity.phone : '未绑定' }}
<el-button size="mini" :disabled="!isAuth('userList:updatejf')"
style="color: var(--primary-color);background: #fff;border: none;"
@click="ageChangeP(tableData.userId, tableData.userEntity.phone)">修改
......@@ -29,7 +30,7 @@
</td>
<th>图像</th>
<td class="border-rt">
<img :src="tableData.userEntity.avatar ? tableData.userEntity.avatar : 'https://admin.sj088.cn/sqx_fast/logo.png'"
<img :src="tableData && tableData.userEntity && tableData.userEntity.avatar ? tableData.userEntity.avatar : 'https://admin.sj088.cn/sqx_fast/logo.png'"
width="80" height="80" />
<span style="color: var(--primary-color);cursor:pointer;"
@click="userChange(tableData.userEntity)">修改</span>
......@@ -53,7 +54,8 @@
<tr>
<th>佣金比例</th>
<td>
{{ tableData.userEntity.zhiRate ? tableData.userEntity.zhiRate : '0' }}
{{ tableData && tableData.userEntity && tableData.userEntity.zhiRate ?
tableData.userEntity.zhiRate : '0' }}
<el-button size="mini" :disabled="!isAuth('userList:updatejf')"
style="color: var(--primary-color);background: #fff;border: none;"
@click="userChange(tableData.userEntity, 1)">修改</el-button>
......@@ -64,7 +66,7 @@
</td> -->
<th>金额</th>
<td>
{{ tableData.money ? tableData.money : '0' }}
{{ tableData && tableData.money ? tableData.money : '0' }}
<el-button size="mini" :disabled="!isAuth('userList:updatejf')"
style="color: var(--primary-color);background: #fff;border: none;"
@click="rechargenone(tableData.userEntity.userId, 1)">修改</el-button>
......@@ -80,17 +82,20 @@
<tr>
<th>邀请人邀请码</th>
<td>{{ tableData.userEntity.inviterCode }}
<td>{{ tableData && tableData.userEntity && tableData.userEntity.inviterCode ?
tableData.userEntity.inviterCode : '-' }}
<span style="color: var(--primary-color);cursor:pointer;"
@click="userChange(tableData.userEntity, 2)">修改</span>
</td>
<th>邀请码</th>
<td>{{ tableData.userEntity.invitationCode }}
<td>{{ tableData && tableData.userEntity && tableData.userEntity.invitationCode ?
tableData.userEntity.invitationCode : '-' }}
<span style="color: var(--primary-color);cursor:pointer;"
@click="userChange(tableData.userEntity, 3)">修改</span>
</td>
<th>微信名称</th>
<td class="border-rt">{{ tableData.userEntity.userName }}
<td class="border-rt">{{ tableData && tableData.userEntity &&
tableData.userEntity.userName ? tableData.userEntity.userName : '-' }}
<span style="color: var(--primary-color);cursor:pointer;"
@click="userChange(tableData.userEntity)">修改</span>
</td>
......@@ -99,8 +104,11 @@
<tr>
<th>用户状态</th>
<td>
<span v-if="tableData.userEntity.status == 1">正常</span>
<span v-if="tableData.userEntity.status == 2" style="color: #f56c6c;">禁用</span>
<span
v-if="tableData && tableData.userEntity && tableData.userEntity.status == 1">正常</span>
<span
v-if="tableData && tableData.userEntity && tableData.userEntity.status == 2"
style="color: #f56c6c;">禁用</span>
<el-button size="mini" :disabled="!isAuth('userList:updateStatus')"
style="color: var(--primary-color);background: #fff;border: none;"
@click="stateChange(tableData.userEntity.status, tableData.userEntity.userId)">
......@@ -109,14 +117,18 @@
<!-- <th>地址</th>
<td>{{ tableData.userEntity.createTime }}</td> -->
<th>创建时间</th>
<td>{{ tableData.userEntity.createTime }}</td>
<td>{{ tableData && tableData.userEntity && tableData.userEntity.createTime ?
tableData.userEntity.createTime : '-' }}</td>
<th>是否是新用户</th>
<td class="border-rt">{{ tableData.userEntity.newUserFlag == 1 ? '新用户' : '老用户' }}</td>
<td class="border-rt">{{ tableData && tableData.userEntity &&
tableData.userEntity.newUserFlag == 1 ? '新用户' : '老用户' }}
</td>
</tr>
<tr>
<th>是否被拉入黑名单</th>
<td>
<span v-if="tableData.userEntity.errorUser == 1"
<span
v-if="tableData && tableData.userEntity && tableData.userEntity.errorUser == 1"
style="color: #f56c6c;"></span>
<span v-else></span>
<el-button size="mini" :disabled="!isAuth('userList:updateStatus')"
......@@ -125,21 +137,25 @@
更改</el-button>
</td>
<th>openId</th>
<td>{{ tableData.userEntity.openId ? tableData.userEntity.openId : '未绑定' }}</td>
<td>{{ tableData && tableData.userEntity && tableData.userEntity.openId ?
tableData.userEntity.openId : '未绑定' }}</td>
<th>是否是会员</th>
<td class="border-rt">
<span v-if="tableData.userEntity.member == 1" style="color: #f56c6c;"></span>
<span
v-if="tableData && tableData.userEntity && tableData.userEntity.member == 1"
style="color: #f56c6c;"></span>
<span v-else></span>
</td>
</tr>
<tr>
<th class="border-bt">会员到期时间</th>
<td class="border-bt">
{{ tableData.userEntity.vipEndTime }}
{{ tableData && tableData.userEntity && tableData.userEntity.vipEndTime ?
tableData.userEntity.vipEndTime : '-' }}
</td>
<th class="border-bt">unionId</th>
<td class="border-bt">
{{ tableData.userEntity.unionId ? tableData.userEntity.unionId : '-' }}</td>
{{ tableData && tableData.userEntity && tableData.userEntity.unionId ? tableData.userEntity.unionId : '-' }}</td>
<th class="border-bt"></th>
<td class="border-bt border-rt">
</td>
......@@ -150,7 +166,6 @@
</div>
</el-tab-pane>
<el-tab-pane label="我的订单" name="jiedan">
<el-table v-loading="tableDataLoading" :data="userDataJ.list">
<el-table-column prop="expressageId" label="编号" width="80" fixed="left">
</el-table-column>
......@@ -164,9 +179,9 @@
<tr>
<th>订单号</th>
<td class="border-rt">{{ scope.row.ordersNo }}
<span @click="copys(scope.row.ordersNo)"
<span v-if="scope.row.ordersNo" @click="copys(scope.row.ordersNo)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.ordersNo"
<icon-svg name="bianji"
class="el-icon-document-copy"></icon-svg>
</span>
</td>
......@@ -179,9 +194,10 @@
v-if="scope.row.expressageNo">{{ scope.row.expressageNo }}</a>
<span v-else> - </span>
<span @click="copys(scope.row.expressageNo)"
<span v-if="scope.row.expressageNo"
@click="copys(scope.row.expressageNo)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.expressageNo"
<icon-svg name="bianji"
class="el-icon-document-copy"></icon-svg>
</span>
<!-- <icon-svg name="bianji" class="el-icon-document-copy" style="color: var(--primary-color);"></icon-svg> -->
......@@ -191,13 +207,13 @@
<th>云洋单号</th>
<td class="border-rt">
<a :href="'https://www.baidu.com/s?wd=' + scope.row.waybill"
target="_blank" class="page-scroll"
v-if="scope.row.waybill">{{ scope.row.waybill }}</a>
target="_blank" class="page-scroll" v-if="scope.row.waybill">{{
scope.row.waybill }}</a>
<span v-else> - </span>
<span @click="copys(scope.row.waybill)"
<span v-if="scope.row.waybill" @click="copys(scope.row.waybill)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.waybill"
<icon-svg name="bianji"
class="el-icon-document-copy"></icon-svg>
</span>
<!-- <icon-svg name="bianji" class="el-icon-document-copy" style="color: var(--primary-color);"></icon-svg> -->
......@@ -219,7 +235,8 @@
<th class="border-bt">快递员</th>
<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>
@click="dataDel(scope.row, 1)">{{ scope.row.expressageName ?
scope.row.expressageName : '-' }}</span>
<span style="cursor: pointer;color: var(--primary-color);"
@click="dataDel(scope.row, 1)">查看</span>
</td>
......@@ -247,9 +264,10 @@
<th>手机号</th>
<td class="border-rt">
{{ scope.row.senderPhone }}
<span @click="copys(scope.row.senderPhone)"
<span v-if="scope.row.senderPhone"
@click="copys(scope.row.senderPhone)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.senderPhone"
<icon-svg name="bianji"
class="el-icon-document-copy"></icon-svg>
</span>
</td>
......@@ -258,15 +276,17 @@
<th>收件人</th>
<td class="border-rt">
<span style="cursor: pointer;color: var(--primary-color);"
@click="dataDel(scope.row, 3)">{{ scope.row.receiverName }}</span>
@click="dataDel(scope.row, 3)">{{ scope.row.receiverName
}}</span>
</td>
</tr>
<tr>
<th>手机号</th>
<td class="border-rt">{{ scope.row.receiverPhone }}
<span @click="copys(scope.row.receiverPhone)"
<span v-if="scope.row.receiverPhone"
@click="copys(scope.row.receiverPhone)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.receiverPhone"
<icon-svg name="bianji"
class="el-icon-document-copy"></icon-svg>
</span>
</td>
......@@ -275,14 +295,16 @@
<th>下单用户</th>
<td class="border-rt">
<span style="cursor: pointer;color: var(--primary-color);"
@click="updates(scope.row.userId)">{{ scope.row.userName }}</span>
@click="updates(scope.row.userId)">{{ scope.row.userName
}}</span>
</td>
</tr>
<tr>
<th class="border-bt">推广用户</th>
<td class="border-bt border-rt">
<span style="cursor: pointer;color: var(--primary-color);"
@click="updates(scope.row.zhiUserId)">{{ scope.row.zhiUserName }}</span>
@click="updates(scope.row.zhiUserId)">{{ scope.row.zhiUserName
}}</span>
</td>
</tr>
</tbody>
......@@ -313,7 +335,8 @@
<tr>
<th>运单状态</th>
<td class="border-rt">
<span>{{ scope.row.expressageStatus ? scope.row.expressageStatus : '-' }}</span>
<span>{{ scope.row.expressageStatus ? scope.row.expressageStatus :
'-' }}</span>
</td>
</tr>
<tr>
......@@ -373,17 +396,20 @@
</tr>
<tr>
<th>站点称重(单位:kg)</th>
<td class="border-rt">{{ scope.row.realWeight ? scope.row.realWeight : '-' }}
<td class="border-rt">{{ scope.row.realWeight ? scope.row.realWeight :
'-' }}
</td>
</tr>
<tr>
<th>计费重量(单位:kg)</th>
<td class="border-rt">{{ scope.row.calWeight ? scope.row.calWeight : '-' }}
<td class="border-rt">{{ scope.row.calWeight ? scope.row.calWeight : '-'
}}
</td>
</tr>
<tr>
<th>续重价格(单位:)</th>
<td class="border-rt">{{ scope.row.priceMore ? scope.row.priceMore : '-' }}
<td class="border-rt">{{ scope.row.priceMore ? scope.row.priceMore : '-'
}}
</td>
</tr>
<tr>
......@@ -408,8 +434,8 @@
<tr>
<th>下单付费(单位:)</th> <!-- 用户最终支付金额 -->
<td class="border-rt">
<span
v-if="scope.row.payMoney">{{ scope.row.payMoney ? scope.row.payMoney : '-' }}</span>
<span v-if="scope.row.payMoney">{{ scope.row.payMoney ?
scope.row.payMoney : '-' }}</span>
<span v-else>0</span>
</td>
</tr>
......@@ -420,7 +446,8 @@
</tr>
<tr>
<th>结算金额(单位:)</th> <!-- 最终支付快递公司金额 -->
<td class="border-rt">{{ scope.row.payFreight ? scope.row.payFreight : '-' }}
<td class="border-rt">{{ scope.row.payFreight ? scope.row.payFreight :
'-' }}
</td>
</tr>
<tr>
......@@ -430,7 +457,8 @@
</tr>
<tr>
<th>推广佣金(单位:)</th>
<td class="border-rt">{{ scope.row.zhiMoney ? scope.row.zhiMoney : '-' }}</td>
<td class="border-rt">{{ scope.row.zhiMoney ? scope.row.zhiMoney : '-'
}}</td>
</tr>
<tr>
<th class="border-bt">利润(单位:)</th>
......@@ -490,7 +518,8 @@
</tr>
<tr>
<th>取消时间</th>
<td class="border-rt">{{ scope.row.cancelTime ? scope.row.cancelTime : '-' }}
<td class="border-rt">{{ scope.row.cancelTime ? scope.row.cancelTime :
'-' }}
</td>
</tr>
<tr>
......@@ -608,9 +637,9 @@
<tr>
<th>订单号</th>
<td class="border-rt">{{ scope.row.ordersNo }}
<span @click="copys(scope.row.ordersNo)"
<span v-if="scope.row.ordersNo" @click="copys(scope.row.ordersNo)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.ordersNo"
<icon-svg name="bianji"
class="el-icon-document-copy"></icon-svg>
</span>
</td>
......@@ -623,9 +652,10 @@
v-if="scope.row.expressageNo">{{ scope.row.expressageNo }}</a>
<span v-else> - </span>
<span @click="copys(scope.row.expressageNo)"
<span v-if="scope.row.expressageNo"
@click="copys(scope.row.expressageNo)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.expressageNo"
<icon-svg name="bianji"
class="el-icon-document-copy"></icon-svg>
</span>
<!-- <icon-svg name="bianji" class="el-icon-document-copy" style="color: var(--primary-color);"></icon-svg> -->
......@@ -635,13 +665,13 @@
<th>云洋单号</th>
<td class="border-rt">
<a :href="'https://www.baidu.com/s?wd=' + scope.row.waybill"
target="_blank" class="page-scroll"
v-if="scope.row.waybill">{{ scope.row.waybill }}</a>
target="_blank" class="page-scroll" v-if="scope.row.waybill">{{
scope.row.waybill }}</a>
<span v-else> - </span>
<span @click="copys(scope.row.waybill)"
<span v-if="scope.row.waybill" @click="copys(scope.row.waybill)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.waybill"
<icon-svg name="bianji"
class="el-icon-document-copy"></icon-svg>
</span>
<!-- <icon-svg name="bianji" class="el-icon-document-copy" style="color: var(--primary-color);"></icon-svg> -->
......@@ -663,7 +693,8 @@
<th class="border-bt">快递员</th>
<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>
@click="dataDel(scope.row, 1)">{{ scope.row.expressageName ?
scope.row.expressageName : '-' }}</span>
<span style="cursor: pointer;color: var(--primary-color);"
@click="dataDel(scope.row, 1)">查看</span>
</td>
......@@ -691,9 +722,10 @@
<th>手机号</th>
<td class="border-rt">
{{ scope.row.senderPhone }}
<span @click="copys(scope.row.senderPhone)"
<span v-if="scope.row.senderPhone"
@click="copys(scope.row.senderPhone)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.senderPhone"
<icon-svg name="bianji"
class="el-icon-document-copy"></icon-svg>
</span>
</td>
......@@ -702,15 +734,17 @@
<th>收件人</th>
<td class="border-rt">
<span style="cursor: pointer;color: var(--primary-color);"
@click="dataDel(scope.row, 3)">{{ scope.row.receiverName }}</span>
@click="dataDel(scope.row, 3)">{{ scope.row.receiverName
}}</span>
</td>
</tr>
<tr>
<th>手机号</th>
<td class="border-rt">{{ scope.row.receiverPhone }}
<span @click="copys(scope.row.receiverPhone)"
<span v-if="scope.row.receiverPhone"
@click="copys(scope.row.receiverPhone)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.receiverPhone"
<icon-svg name="bianji"
class="el-icon-document-copy"></icon-svg>
</span>
</td>
......@@ -719,14 +753,16 @@
<th>下单用户</th>
<td class="border-rt">
<span style="cursor: pointer;color: var(--primary-color);"
@click="updates(scope.row.userId)">{{ scope.row.userName }}</span>
@click="updates(scope.row.userId)">{{ scope.row.userName
}}</span>
</td>
</tr>
<tr>
<th class="border-bt">推广用户</th>
<td class="border-bt border-rt">
<span style="cursor: pointer;color: var(--primary-color);"
@click="updates(scope.row.zhiUserId)">{{ scope.row.zhiUserName }}</span>
@click="updates(scope.row.zhiUserId)">{{ scope.row.zhiUserName
}}</span>
</td>
</tr>
</tbody>
......@@ -757,7 +793,8 @@
<tr>
<th>运单状态</th>
<td class="border-rt">
<span>{{ scope.row.expressageStatus ? scope.row.expressageStatus : '-' }}</span>
<span>{{ scope.row.expressageStatus ? scope.row.expressageStatus :
'-' }}</span>
</td>
</tr>
<tr>
......@@ -817,17 +854,20 @@
</tr>
<tr>
<th>站点称重(单位:kg)</th>
<td class="border-rt">{{ scope.row.realWeight ? scope.row.realWeight : '-' }}
<td class="border-rt">{{ scope.row.realWeight ? scope.row.realWeight :
'-' }}
</td>
</tr>
<tr>
<th>计费重量(单位:kg)</th>
<td class="border-rt">{{ scope.row.calWeight ? scope.row.calWeight : '-' }}
<td class="border-rt">{{ scope.row.calWeight ? scope.row.calWeight : '-'
}}
</td>
</tr>
<tr>
<th>续重价格(单位:)</th>
<td class="border-rt">{{ scope.row.priceMore ? scope.row.priceMore : '-' }}
<td class="border-rt">{{ scope.row.priceMore ? scope.row.priceMore : '-'
}}
</td>
</tr>
<tr>
......@@ -852,8 +892,8 @@
<tr>
<th>下单付费(单位:)</th> <!-- 用户最终支付金额 -->
<td class="border-rt">
<span
v-if="scope.row.payMoney">{{ scope.row.payMoney ? scope.row.payMoney : '-' }}</span>
<span v-if="scope.row.payMoney">{{ scope.row.payMoney ?
scope.row.payMoney : '-' }}</span>
<span v-else>0</span>
</td>
</tr>
......@@ -864,7 +904,8 @@
</tr>
<tr>
<th>结算金额(单位:)</th> <!-- 最终支付快递公司金额 -->
<td class="border-rt">{{ scope.row.payFreight ? scope.row.payFreight : '-' }}
<td class="border-rt">{{ scope.row.payFreight ? scope.row.payFreight :
'-' }}
</td>
</tr>
<tr>
......@@ -874,7 +915,8 @@
</tr>
<tr>
<th>推广佣金(单位:)</th>
<td class="border-rt">{{ scope.row.zhiMoney ? scope.row.zhiMoney : '-' }}</td>
<td class="border-rt">{{ scope.row.zhiMoney ? scope.row.zhiMoney : '-'
}}</td>
</tr>
<tr>
<th class="border-bt">利润(单位:)</th>
......@@ -934,7 +976,8 @@
</tr>
<tr>
<th>取消时间</th>
<td class="border-rt">{{ scope.row.cancelTime ? scope.row.cancelTime : '-' }}
<td class="border-rt">{{ scope.row.cancelTime ? scope.row.cancelTime :
'-' }}
</td>
</tr>
<tr>
......@@ -1361,7 +1404,8 @@
<div class="box_num">
<div class="box_color">寄件人地址</div>
<div class="text_color">
<span>{{ detaDatle.senderProvince }}{{ detaDatle.senderCity }}{{ detaDatle.senderDistrict }}{{ detaDatle.senderLocation }}</span>
<span>{{ detaDatle.senderProvince }}{{ detaDatle.senderCity }}{{
detaDatle.senderDistrict }}{{ detaDatle.senderLocation }}</span>
</div>
</div>
</div>
......@@ -1390,7 +1434,8 @@
<div class="box_num">
<div class="box_color">收件人地址</div>
<div class="text_color">
<span>{{ detaDatle.receiverProvince }}{{ detaDatle.receiverCity }}{{ detaDatle.receiverDistrict }}{{ detaDatle.receiverLocation }}</span>
<span>{{ detaDatle.receiverProvince }}{{ detaDatle.receiverCity }}{{
detaDatle.receiverDistrict }}{{ detaDatle.receiverLocation }}</span>
</div>
</div>
</div>
......@@ -1569,7 +1614,8 @@
<div class="box">
<div class="box_num">
<div class="box_color">超重补交(单位:)</div>
<div class="text_color"><span>{{ detaDatle.userPayMoney ? detaDatle.userPayMoney : '-' }}</span>
<div class="text_color"><span>{{ detaDatle.userPayMoney ? detaDatle.userPayMoney : '-'
}}</span>
</div>
</div>
</div>
......@@ -1597,7 +1643,8 @@
<div class="box">
<div class="box_num">
<div class="box_color">优惠券(单位:)</div>
<div class="text_color"><span>{{ detaDatle.couponMoney ? detaDatle.couponMoney : '-' }}</span>
<div class="text_color"><span>{{ detaDatle.couponMoney ? detaDatle.couponMoney : '-'
}}</span>
</div>
</div>
</div>
......@@ -1606,7 +1653,8 @@
<div class="box">
<div class="box_num">
<div class="box_color">会员优惠价格(单位:)</div>
<div class="text_color"><span>{{ detaDatle.memberMoney ? detaDatle.memberMoney : '-' }}</span>
<div class="text_color"><span>{{ detaDatle.memberMoney ? detaDatle.memberMoney : '-'
}}</span>
</div>
</div>
</div>
......@@ -1626,7 +1674,8 @@
<div class="box">
<div class="box_num">
<div class="box_color">耗材费(单位:)</div>
<div class="text_color"><span>{{ detaDatle.freightHaocai ? detaDatle.freightHaocai : '-' }}</span>
<div class="text_color"><span>{{ detaDatle.freightHaocai ? detaDatle.freightHaocai : '-'
}}</span>
</div>
</div>
</div>
......@@ -3272,8 +3321,6 @@ export default {
if (data.code == 0) {
this.wuliuDate = data.data;
this.dialogVisible = true
} else {
this.$message(data.msg);
}
})
......
......@@ -135,7 +135,8 @@
{{ tableData.userEntity.vipEndTime }}
</td>
<th class="border-bt">unionId</th>
<td class="border-bt">{{ tableData.userEntity.unionId ? tableData.userEntity.unionId : '-' }}
<td class="border-bt">{{ tableData.userEntity.unionId ? tableData.userEntity.unionId :
'-' }}
</td>
<th class="border-bt"></th>
<td class="border-bt border-rt">
......@@ -161,10 +162,9 @@
<tr>
<th>订单号</th>
<td class="border-rt">{{ scope.row.ordersNo }}
<span @click="copys(scope.row.ordersNo)"
<span v-if="scope.row.ordersNo" @click="copys(scope.row.ordersNo)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.ordersNo"
class="el-icon-document-copy"></icon-svg>
<icon-svg name="bianji" class="el-icon-document-copy"></icon-svg>
</span>
</td>
</tr>
......@@ -172,14 +172,14 @@
<th>运单号</th>
<td class="border-rt">
<a :href="'https://www.baidu.com/s?wd=' + scope.row.expressageNo"
target="_blank" class="page-scroll"
v-if="scope.row.expressageNo">{{ scope.row.expressageNo }}</a>
target="_blank" class="page-scroll" v-if="scope.row.expressageNo">{{
scope.row.expressageNo }}</a>
<span v-else> - </span>
<span @click="copys(scope.row.expressageNo)"
<span v-if="scope.row.expressageNo"
@click="copys(scope.row.expressageNo)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.expressageNo"
class="el-icon-document-copy"></icon-svg>
<icon-svg name="bianji" class="el-icon-document-copy"></icon-svg>
</span>
<!-- <icon-svg name="bianji" class="el-icon-document-copy" style="color: var(--primary-color);"></icon-svg> -->
</td>
......@@ -188,14 +188,13 @@
<th>云洋单号</th>
<td class="border-rt">
<a :href="'https://www.baidu.com/s?wd=' + scope.row.waybill"
target="_blank" class="page-scroll"
v-if="scope.row.waybill">{{ scope.row.waybill }}</a>
target="_blank" class="page-scroll" v-if="scope.row.waybill">{{
scope.row.waybill }}</a>
<span v-else> - </span>
<span @click="copys(scope.row.waybill)"
<span v-if="scope.row.waybill" @click="copys(scope.row.waybill)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.waybill"
class="el-icon-document-copy"></icon-svg>
<icon-svg name="bianji" class="el-icon-document-copy"></icon-svg>
</span>
<!-- <icon-svg name="bianji" class="el-icon-document-copy" style="color: var(--primary-color);"></icon-svg> -->
</td>
......@@ -216,7 +215,8 @@
<th class="border-bt">快递员</th>
<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>
@click="dataDel(scope.row, 1)">{{ scope.row.expressageName ?
scope.row.expressageName : '-' }}</span>
<span style="cursor: pointer;color: var(--primary-color);"
@click="dataDel(scope.row, 1)">查看</span>
</td>
......@@ -244,10 +244,9 @@
<th>手机号</th>
<td class="border-rt">
{{ scope.row.senderPhone }}
<span @click="copys(scope.row.senderPhone)"
<span v-if="scope.row.senderPhone" @click="copys(scope.row.senderPhone)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.senderPhone"
class="el-icon-document-copy"></icon-svg>
<icon-svg name="bianji" class="el-icon-document-copy"></icon-svg>
</span>
</td>
</tr>
......@@ -261,10 +260,10 @@
<tr>
<th>手机号</th>
<td class="border-rt">{{ scope.row.receiverPhone }}
<span @click="copys(scope.row.receiverPhone)"
<span v-if="scope.row.receiverPhone"
@click="copys(scope.row.receiverPhone)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.receiverPhone"
class="el-icon-document-copy"></icon-svg>
<icon-svg name="bianji" class="el-icon-document-copy"></icon-svg>
</span>
</td>
</tr>
......@@ -279,7 +278,8 @@
<th class="border-bt">推广用户</th>
<td class="border-bt border-rt">
<span style="cursor: pointer;color: var(--primary-color);"
@click="updates(scope.row.zhiUserId)">{{ scope.row.zhiUserName }}</span>
@click="updates(scope.row.zhiUserId)">{{ scope.row.zhiUserName
}}</span>
</td>
</tr>
</tbody>
......@@ -310,7 +310,8 @@
<tr>
<th>运单状态</th>
<td class="border-rt">
<span>{{ scope.row.expressageStatus ? scope.row.expressageStatus : '-' }}</span>
<span>{{ scope.row.expressageStatus ? scope.row.expressageStatus : '-'
}}</span>
</td>
</tr>
<tr>
......@@ -365,20 +366,24 @@
<tbody>
<tr>
<th>下单重量(单位:kg)</th>
<td class="border-rt">{{ scope.row.goodsWeight ? scope.row.goodsWeight : '-' }}
<td class="border-rt">{{ scope.row.goodsWeight ? scope.row.goodsWeight : '-'
}}
</td>
</tr>
<tr>
<th>站点称重(单位:kg)</th>
<td class="border-rt">{{ scope.row.realWeight ? scope.row.realWeight : '-' }}</td>
<td class="border-rt">{{ scope.row.realWeight ? scope.row.realWeight : '-'
}}</td>
</tr>
<tr>
<th>计费重量(单位:kg)</th>
<td class="border-rt">{{ scope.row.calWeight ? scope.row.calWeight : '-' }}</td>
<td class="border-rt">{{ scope.row.calWeight ? scope.row.calWeight : '-' }}
</td>
</tr>
<tr>
<th>续重价格(单位:)</th>
<td class="border-rt">{{ scope.row.priceMore ? scope.row.priceMore : '-' }}</td>
<td class="border-rt">{{ scope.row.priceMore ? scope.row.priceMore : '-' }}
</td>
</tr>
<tr>
<th class="border-bt">物品类型</th>
......@@ -402,28 +407,32 @@
<tr>
<th>下单付费(单位:)</th> <!-- 用户最终支付金额 -->
<td class="border-rt">
<span
v-if="scope.row.payMoney">{{ scope.row.payMoney ? scope.row.payMoney : '-' }}</span>
<span v-if="scope.row.payMoney">{{ scope.row.payMoney ?
scope.row.payMoney : '-' }}</span>
<span v-else>0</span>
</td>
</tr>
<tr>
<th>超重补缴(单位:)</th>
<td class="border-rt">{{ scope.row.userPayMoney ? scope.row.userPayMoney : '-' }}
<td class="border-rt">{{ scope.row.userPayMoney ? scope.row.userPayMoney :
'-' }}
</td>
</tr>
<tr>
<th>结算金额(单位:)</th> <!-- 最终支付快递公司金额 -->
<td class="border-rt">{{ scope.row.payMoneys ? scope.row.payMoneys : '-' }}</td>
<td class="border-rt">{{ scope.row.payMoneys ? scope.row.payMoneys : '-' }}
</td>
</tr>
<tr>
<th>优惠券金额(单位:)</th>
<td class="border-rt">{{ scope.row.couponMoney ? scope.row.couponMoney : '-' }}
<td class="border-rt">{{ scope.row.couponMoney ? scope.row.couponMoney : '-'
}}
</td>
</tr>
<tr>
<th>推广佣金(单位:)</th>
<td class="border-rt">{{ scope.row.zhiMoney ? scope.row.zhiMoney : '-' }}</td>
<td class="border-rt">{{ scope.row.zhiMoney ? scope.row.zhiMoney : '-' }}
</td>
</tr>
<tr>
<th class="border-bt">利润(单位:)</th>
......@@ -473,7 +482,8 @@
</tr>
<tr>
<th>补缴时间</th>
<td class="border-rt">{{ scope.row.userPayTime ? scope.row.userPayTime : '-' }}
<td class="border-rt">{{ scope.row.userPayTime ? scope.row.userPayTime : '-'
}}
</td>
</tr>
<tr>
......@@ -483,7 +493,8 @@
</tr>
<tr>
<th>取消时间</th>
<td class="border-rt">{{ scope.row.cancelTime ? scope.row.cancelTime : '-' }}</td>
<td class="border-rt">{{ scope.row.cancelTime ? scope.row.cancelTime : '-'
}}</td>
</tr>
<tr>
<th class="border-bt">推送时间</th>
......@@ -510,8 +521,8 @@
</el-table-column>
<el-table-column prop="zhifubao" label="支付宝账号" width="150">
<template slot-scope="scope">
<span style="color: var(--primary-color);cursor: pointer;"
@click="updates(scope.row.userId)">{{ scope.row.zhifubao ? scope.row.zhifubao :
<span style="color: var(--primary-color);cursor: pointer;" @click="updates(scope.row.userId)">{{
scope.row.zhifubao ? scope.row.zhifubao :
'null' }}</span>
</template>
</el-table-column>
......@@ -600,10 +611,9 @@
<tr>
<th>订单号</th>
<td class="border-rt">{{ scope.row.ordersNo }}
<span @click="copys(scope.row.ordersNo)"
<span v-if="scope.row.ordersNo" @click="copys(scope.row.ordersNo)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.ordersNo"
class="el-icon-document-copy"></icon-svg>
<icon-svg name="bianji" class="el-icon-document-copy"></icon-svg>
</span>
</td>
</tr>
......@@ -611,14 +621,14 @@
<th>运单号</th>
<td class="border-rt">
<a :href="'https://www.baidu.com/s?wd=' + scope.row.expressageNo"
target="_blank" class="page-scroll"
v-if="scope.row.expressageNo">{{ scope.row.expressageNo }}</a>
target="_blank" class="page-scroll" v-if="scope.row.expressageNo">{{
scope.row.expressageNo }}</a>
<span v-else> - </span>
<span @click="copys(scope.row.expressageNo)"
<span v-if="scope.row.expressageNo"
@click="copys(scope.row.expressageNo)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.expressageNo"
class="el-icon-document-copy"></icon-svg>
<icon-svg name="bianji" class="el-icon-document-copy"></icon-svg>
</span>
<!-- <icon-svg name="bianji" class="el-icon-document-copy" style="color: var(--primary-color);"></icon-svg> -->
</td>
......@@ -627,14 +637,13 @@
<th>云洋单号</th>
<td class="border-rt">
<a :href="'https://www.baidu.com/s?wd=' + scope.row.waybill"
target="_blank" class="page-scroll"
v-if="scope.row.waybill">{{ scope.row.waybill }}</a>
target="_blank" class="page-scroll" v-if="scope.row.waybill">{{
scope.row.waybill }}</a>
<span v-else> - </span>
<span @click="copys(scope.row.waybill)"
<span v-if="scope.row.waybill" @click="copys(scope.row.waybill)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.waybill"
class="el-icon-document-copy"></icon-svg>
<icon-svg name="bianji" class="el-icon-document-copy"></icon-svg>
</span>
<!-- <icon-svg name="bianji" class="el-icon-document-copy" style="color: var(--primary-color);"></icon-svg> -->
</td>
......@@ -655,7 +664,8 @@
<th class="border-bt">快递员</th>
<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>
@click="dataDel(scope.row, 1)">{{ scope.row.expressageName ?
scope.row.expressageName : '-' }}</span>
<span style="cursor: pointer;color: var(--primary-color);"
@click="dataDel(scope.row, 1)">查看</span>
</td>
......@@ -683,10 +693,9 @@
<th>手机号</th>
<td class="border-rt">
{{ scope.row.senderPhone }}
<span @click="copys(scope.row.senderPhone)"
<span v-if="scope.row.senderPhone" @click="copys(scope.row.senderPhone)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.senderPhone"
class="el-icon-document-copy"></icon-svg>
<icon-svg name="bianji" class="el-icon-document-copy"></icon-svg>
</span>
</td>
</tr>
......@@ -700,10 +709,10 @@
<tr>
<th>手机号</th>
<td class="border-rt">{{ scope.row.receiverPhone }}
<span @click="copys(scope.row.receiverPhone)"
<span v-if="scope.row.receiverPhone"
@click="copys(scope.row.receiverPhone)"
style="color: var(--primary-color);cursor: pointer;">
<icon-svg name="bianji" v-if="scope.row.receiverPhone"
class="el-icon-document-copy"></icon-svg>
<icon-svg name="bianji" class="el-icon-document-copy"></icon-svg>
</span>
</td>
</tr>
......@@ -718,7 +727,8 @@
<th class="border-bt">推广用户</th>
<td class="border-bt border-rt">
<span style="cursor: pointer;color: var(--primary-color);"
@click="updates(scope.row.zhiUserId)">{{ scope.row.zhiUserName }}</span>
@click="updates(scope.row.zhiUserId)">{{ scope.row.zhiUserName
}}</span>
</td>
</tr>
</tbody>
......@@ -749,7 +759,8 @@
<tr>
<th>运单状态</th>
<td class="border-rt">
<span>{{ scope.row.expressageStatus ? scope.row.expressageStatus : '-' }}</span>
<span>{{ scope.row.expressageStatus ? scope.row.expressageStatus : '-'
}}</span>
</td>
</tr>
<tr>
......@@ -804,20 +815,24 @@
<tbody>
<tr>
<th>下单重量(单位:kg)</th>
<td class="border-rt">{{ scope.row.goodsWeight ? scope.row.goodsWeight : '-' }}
<td class="border-rt">{{ scope.row.goodsWeight ? scope.row.goodsWeight : '-'
}}
</td>
</tr>
<tr>
<th>站点称重(单位:kg)</th>
<td class="border-rt">{{ scope.row.realWeight ? scope.row.realWeight : '-' }}</td>
<td class="border-rt">{{ scope.row.realWeight ? scope.row.realWeight : '-'
}}</td>
</tr>
<tr>
<th>计费重量(单位:kg)</th>
<td class="border-rt">{{ scope.row.calWeight ? scope.row.calWeight : '-' }}</td>
<td class="border-rt">{{ scope.row.calWeight ? scope.row.calWeight : '-' }}
</td>
</tr>
<tr>
<th>续重价格(单位:)</th>
<td class="border-rt">{{ scope.row.priceMore ? scope.row.priceMore : '-' }}</td>
<td class="border-rt">{{ scope.row.priceMore ? scope.row.priceMore : '-' }}
</td>
</tr>
<tr>
<th class="border-bt">物品类型</th>
......@@ -841,28 +856,32 @@
<tr>
<th>下单付费(单位:)</th> <!-- 用户最终支付金额 -->
<td class="border-rt">
<span
v-if="scope.row.payMoney">{{ scope.row.payMoney ? scope.row.payMoney : '-' }}</span>
<span v-if="scope.row.payMoney">{{ scope.row.payMoney ?
scope.row.payMoney : '-' }}</span>
<span v-else>0</span>
</td>
</tr>
<tr>
<th>超重补缴(单位:)</th>
<td class="border-rt">{{ scope.row.userPayMoney ? scope.row.userPayMoney : '-' }}
<td class="border-rt">{{ scope.row.userPayMoney ? scope.row.userPayMoney :
'-' }}
</td>
</tr>
<tr>
<th>结算金额(单位:)</th> <!-- 最终支付快递公司金额 -->
<td class="border-rt">{{ scope.row.payMoneys ? scope.row.payMoneys : '-' }}</td>
<td class="border-rt">{{ scope.row.payMoneys ? scope.row.payMoneys : '-' }}
</td>
</tr>
<tr>
<th>优惠券金额(单位:)</th>
<td class="border-rt">{{ scope.row.couponMoney ? scope.row.couponMoney : '-' }}
<td class="border-rt">{{ scope.row.couponMoney ? scope.row.couponMoney : '-'
}}
</td>
</tr>
<tr>
<th>推广佣金(单位:)</th>
<td class="border-rt">{{ scope.row.zhiMoney ? scope.row.zhiMoney : '-' }}</td>
<td class="border-rt">{{ scope.row.zhiMoney ? scope.row.zhiMoney : '-' }}
</td>
</tr>
<tr>
<th class="border-bt">利润(单位:)</th>
......@@ -912,7 +931,8 @@
</tr>
<tr>
<th>补缴时间</th>
<td class="border-rt">{{ scope.row.userPayTime ? scope.row.userPayTime : '-' }}
<td class="border-rt">{{ scope.row.userPayTime ? scope.row.userPayTime : '-'
}}
</td>
</tr>
<tr>
......@@ -922,7 +942,8 @@
</tr>
<tr>
<th>取消时间</th>
<td class="border-rt">{{ scope.row.cancelTime ? scope.row.cancelTime : '-' }}</td>
<td class="border-rt">{{ scope.row.cancelTime ? scope.row.cancelTime : '-'
}}</td>
</tr>
<tr>
<th class="border-bt">推送时间</th>
......@@ -1000,7 +1021,8 @@
</el-table-column>
<el-table-column prop="avatar" label="用户头像">
<template slot-scope="scope">
<img v-if="scope.row.avatar == null" src="~@/assets/img/avatar.png" alt="" width="40" height="40">
<img v-if="scope.row.avatar == null" src="~@/assets/img/avatar.png" alt="" width="40"
height="40">
<img v-else :src="scope.row.avatar" alt="" width="40" height="40">
</template>
</el-table-column>
......@@ -1060,7 +1082,8 @@
</el-table-column>
<el-table-column prop="avatar" label="用户头像">
<template slot-scope="scope">
<img v-if="scope.row.avatar == null" src="~@/assets/img/avatar.png" alt="" width="40" height="40">
<img v-if="scope.row.avatar == null" src="~@/assets/img/avatar.png" alt="" width="40"
height="40">
<img v-else :src="scope.row.avatar" alt="" width="40" height="40">
</template>
</el-table-column>
......@@ -1345,7 +1368,8 @@
<div class="box_num">
<div class="box_color">寄件人地址</div>
<div class="text_color">
<span>{{ detaDatle.senderProvince }}{{ detaDatle.senderCity }}{{ detaDatle.senderDistrict }}{{ detaDatle.senderLocation }}</span>
<span>{{ detaDatle.senderProvince }}{{ detaDatle.senderCity }}{{ detaDatle.senderDistrict
}}{{ detaDatle.senderLocation }}</span>
</div>
</div>
</div>
......@@ -1374,7 +1398,8 @@
<div class="box_num">
<div class="box_color">收件人地址</div>
<div class="text_color">
<span>{{ detaDatle.receiverProvince }}{{ detaDatle.receiverCity }}{{ detaDatle.receiverDistrict }}{{ detaDatle.receiverLocation }}</span>
<span>{{ detaDatle.receiverProvince }}{{ detaDatle.receiverCity }}{{
detaDatle.receiverDistrict }}{{ detaDatle.receiverLocation }}</span>
</div>
</div>
</div>
......@@ -1560,7 +1585,8 @@
<div class="box">
<div class="box_num">
<div class="box_color">退费金额(单位:)</div>
<div class="text_color"><span>{{ detaDatle.userRefundMoney ? detaDatle.userRefundMoney : '-' }}</span>
<div class="text_color"><span>{{ detaDatle.userRefundMoney ? detaDatle.userRefundMoney : '-'
}}</span>
</div>
</div>
</div>
......@@ -1607,7 +1633,8 @@
<div class="box">
<div class="box_num">
<div class="box_color">耗材费(单位:)</div>
<div class="text_color"><span>{{ detaDatle.freightHaocai ? detaDatle.freightHaocai : '-' }}</span>
<div class="text_color"><span>{{ detaDatle.freightHaocai ? detaDatle.freightHaocai : '-'
}}</span>
</div>
</div>
</div>
......@@ -1645,7 +1672,8 @@
<div class="box">
<div class="box_num">
<div class="box_color">物品金额(单位:)</div>
<div class="text_color"><span>{{ detaDatle.goodsOfferMoney ? detaDatle.goodsOfferMoney : '-' }}</span>
<div class="text_color"><span>{{ detaDatle.goodsOfferMoney ? detaDatle.goodsOfferMoney : '-'
}}</span>
</div>
</div>
</div>
......@@ -3251,8 +3279,6 @@ export default {
if (data.code == 0) {
this.wuliuDate = data.data;
this.dialogVisible = true
} else {
this.$message(data.msg);
}
})
......
......@@ -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!