提交 ce2551c5 authored 作者: huaxinzhu's avatar huaxinzhu

云仓新功能

上级 2e5e6aaa
...@@ -9,3 +9,21 @@ export default { ...@@ -9,3 +9,21 @@ export default {
name: 'App' name: 'App'
} }
</script> </script>
<style>
body {
font-family:Microsoft YaHei,Arial,Helvetica,sans-serif;
}
/* 在全局CSS里引用: */
/* 滚动条宽度 */
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
/* 滚动条的滑块 */
::-webkit-scrollbar-thumb {
background-color: #c0ccda;
border-radius: 6px;
}
</style>
...@@ -4,7 +4,10 @@ import Router from 'vue-router' ...@@ -4,7 +4,10 @@ import Router from 'vue-router'
Vue.use(Router) Vue.use(Router)
/* Layout */ /* Layout */
import Layout from '@/layout' import Layout from '@/layout';
import Entry from '@/views/entry';
/** /**
* Note: 路由配置项 * Note: 路由配置项
...@@ -57,7 +60,43 @@ export const constantRoutes = [ ...@@ -57,7 +60,43 @@ export const constantRoutes = [
component: (resolve) => require(['@/views/error/401'], resolve), component: (resolve) => require(['@/views/error/401'], resolve),
hidden: true hidden: true
}, },
// 阅读协议
{
path: '/agreement',
component: (resolve) => require(['@/views/entry/agreement'], resolve),
hidden: true
},
// 主体信息 fillStoreInf
{
path: '/fillMainInf',
component: (resolve) => require(['@/views/entry/fillMainInf'], resolve),
hidden: true
},
// 品牌信息
{
path: '/fillBrandInf',
component: (resolve) => require(['@/views/entry/fillBrandInf'], resolve),
hidden: true
},
// 店铺信息
{
path: '/fillShopInf',
component: (resolve) => require(['@/views/entry/fillShopInf'], resolve),
hidden: true
},
// 提交审核
{
path: '/reviewing',
component: (resolve) => require(['@/views/entry/reviewing'], resolve),
hidden: true
},
// 审核失败
{ {
path: '/reviewFail',
component: (resolve) => require(['@/views/entry/reviewFail'], resolve),
hidden: true
},
/*{
path: '', path: '',
component: Layout, component: Layout,
redirect: 'index', redirect: 'index',
...@@ -69,6 +108,19 @@ export const constantRoutes = [ ...@@ -69,6 +108,19 @@ export const constantRoutes = [
meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
} }
] ]
},*/
{
path: '',
component: Entry,
redirect: 'index',
children: [
{
path: 'index',
component: (resolve) => require(['@/views/index'], resolve),
name: '首页',
meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
}
]
}, },
{ {
path: '/user', path: '/user',
......
...@@ -3,65 +3,46 @@ ...@@ -3,65 +3,46 @@
<script> <script>
export default { export default {
name: "Login2", name: "Login2",
created() { created() {
this.gotosso() this.gotosso()
}, },
methods: { methods: {
getCookie() { getCookie() {
var de = this.$store.commit("SET_TOKEN") var de = this.$store.commit("SET_TOKEN")
console.log("SET_TOKEN",de) },
// const password = Cookies.get("password"); gotosso() {
// const rememberMe = Cookies.get('rememberMe') var ticket = this.$route.query.ticket
// this.loginForm = { this.$store.dispatch('Login', {"ticket": ticket}).then((res) => {
// username: username === undefined ? this.loginForm.username : username, if (res.token != "") {
// password: password === undefined ? this.loginForm.password : decrypt(password), this.$router.push({path: '/'})
// rememberMe: rememberMe === undefined ? false : Boolean(rememberMe) } else {
// }; this.$store.dispatch('Statistic')
}, this.$store.dispatch('FedLogOut')
gotosso(){ var ssa = window.location.host
var ticket = this.$route.query.ticket setTimeout(function () {
// let data = this.getUrlParam('ticket') if (ssa == 'localhost:1024') {
// this.loading = true window.location.href = 'http://sso.jxhh.com/logout?redirect=http://' + ssa + '/login'
this.$store.dispatch('Login', {"ticket":ticket}).then((res) => { } else {
// console.log(123456) window.location.href = 'http://sso.jxhh.com/logout?redirect=http://' + ssa + '/login'
// console.log(res) }
// return false }, 1000)
// debugger }
if(res.token != ""){ this.loading = false
this.$router.push({ path:'/' }) })
}else{ .catch(() => {
this.$store.dispatch('Statistic') this.$store.dispatch('FedLogOut')
this.$store.dispatch('FedLogOut') var ssa = window.location.host
var ssa = window.location.host setTimeout(function () {
setTimeout(function (){ if (ssa == 'localhost:1024') {
if(ssa =='localhost:1024'){ window.location.href = 'http://sso.jxhh.com/logout?redirect=http://' + ssa + '/login'
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa+'/login' } else {
}else{ window.location.href = 'http://sso.jxhh.com/logout?redirect=http://' + ssa + '/login'
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa+'/login' }
} }, 1000)
}, 1000) this.loading = false
})
} },
this.loading = false
})
.catch(() => {
debugger
console.log(222222222222)
this.$store.dispatch('FedLogOut')
var ssa = window.location.host
setTimeout(function (){
if(ssa =='localhost:1024'){
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa+'/login'
}else{
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa+'/login'
}
}, 1000)
this.loading = false
})
},
} }
}; };
......
<script> <script>
export default { export default {
created() { created() {
const { params, query } = this.$route const {params, query} = this.$route
const { path } = params const {path} = params;
this.$router.replace({ path: '/' + path, query }) this.$router.replace({path: '/' + path, query})
}, },
render: function(h) { render: function (h) {
return h() // avoid warning message return h()
}
} }
}
</script> </script>
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>提现记录</span> <span>提现记录</span>
<el-button <el-button
style="float:right;margin-left: 10px;" style="float:right;margin-left: 10px;"
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
>删除</el-button> >删除
<el-button </el-button>
style="float:right;" <el-button
type="success" style="float:right;"
icon="el-icon-edit" type="success"
size="mini" icon="el-icon-edit"
:disabled="single" size="mini"
@click="handleUpdate" :disabled="single"
>修改</el-button> @click="handleUpdate"
<el-button >修改
style="float:right;margin-left: 20px;" </el-button>
type="primary" <el-button
icon="el-icon-plus" style="float:right;margin-left: 20px;"
size="mini" type="primary"
@click="handleAdd" icon="el-icon-plus"
>新增</el-button> size="mini"
</div> @click="handleAdd"
>新增
</el-button>
</div>
<el-table v-loading="loading" :data="freightList" :height="tableHeight" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="freightList" :height="tableHeight" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="ID" align="center" prop="Id" /> <el-table-column label="ID" align="center" prop="Id"/>
<el-table-column label="模板名称" align="center" prop="Name" /> <el-table-column label="模板名称" align="center" prop="Name"/>
<el-table-column label="排序" align="center" prop="Sort" /> <el-table-column label="排序" align="center" prop="Sort"/>
<el-table-column label="是否是默认模板" align="center" :formatter="formatDefault" prop="IsDefault" /> <el-table-column label="是否是默认模板" align="center" :formatter="formatDefault" prop="IsDefault"/>
<el-table-column label="类型" align="center" :formatter="formatType" prop="ChargeType" /> <el-table-column label="类型" align="center" :formatter="formatType" prop="ChargeType"/>
<el-table-column label="是否是默认" align="center" prop="Publish" /> <el-table-column label="是否是默认" align="center" prop="Publish"/>
<el-table-column label="创建时间" align="center" :formatter="formatTime" prop="Created" /> <el-table-column label="创建时间" align="center" :formatter="formatTime" prop="Created"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>修改</el-button> >修改
<el-button </el-button>
size="mini" <el-button
type="text" size="mini"
icon="el-icon-delete" type="text"
@click="handleDelete(scope.row)" icon="el-icon-delete"
>删除</el-button> @click="handleDelete(scope.row)"
</template> >删除
</el-table-column> </el-button>
</el-table> </template>
<pagination </el-table-column>
v-show="total>0" </el-table>
:total="total" <pagination
:page.sync="queryParams.pageNum" v-show="total>0"
:limit.sync="queryParams.pageSize" :total="total"
@pagination="getList" :page.sync="queryParams.pageNum"
/> :limit.sync="queryParams.pageSize"
<!-- 添加或修改freight对话框 --> @pagination="getList"
<el-dialog :title="title" :visible.sync="open" v-if="open" width="90%" append-to-body> />
<IndexBtn :option="form" /> <!-- 添加或修改freight对话框 -->
</el-dialog> <el-dialog :title="title" :visible.sync="open" v-if="open" width="90%" append-to-body>
</el-card> <IndexBtn :option="form"/>
</div> </el-dialog>
</el-card>
</div>
</template> </template>
<script> <script>
import IndexBtn from './indexbtn' import IndexBtn from './indexbtn'
import { listFreight, getFreight, delFreight, addFreight, updateFreight } from '@/api/module/freight' import {listFreight, getFreight, delFreight, addFreight, updateFreight} from '@/api/module/freight'
import {dateFormat} from '@/utils' import {dateFormat} from '@/utils'
export default {
name: "freight", export default {
data() { name: "freight",
return { data() {
fullHeight: '', return {
tableHeight:null, fullHeight: '',
// 遮罩层 tableHeight: null,
loading: true, // 遮罩层
// 选中数组 loading: true,
ids: [], // 选中数组
// 非单个禁用 ids: [],
single: true, // 非单个禁用
// 非多个禁用 single: true,
multiple: true, // 非多个禁用
// 显示搜索条件 multiple: true,
showSearch: true, // 显示搜索条件
// 总条数 showSearch: true,
total: 0, // 总条数
// freight表格数据 total: 0,
freightList: [], // freight表格数据
// 弹出层标题 freightList: [],
title: "", // 弹出层标题
// 是否显示弹出层 title: "",
open: false, // 是否显示弹出层
// 查询参数 open: false,
// 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 20, pageSize: 20,
...@@ -116,207 +121,204 @@ export default { ...@@ -116,207 +121,204 @@ export default {
modified: null, modified: null,
}, },
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
name: [ name: [
{ required: true, message: "模板名称不能为空", trigger: "blur" } {required: true, message: "模板名称不能为空", trigger: "blur"}
], ],
} }
}; };
}, },
components:{ components: {
IndexBtn IndexBtn
}, },
created() { created() {
this.getList(); this.getList();
this.$nextTick(()=>{ this.$nextTick(() => {
this.fullHeight = document.getElementsByClassName('box-card')[0].clientHeight this.fullHeight = document.getElementsByClassName('box-card')[0].clientHeight
}) })
}, },
watch:{ watch: {
fullHeight(val,oldval){ fullHeight(val, oldval) {
console.log(val) console.log(val)
this.tableHeight = val - 130 this.tableHeight = val - 130
} }
}, },
methods: { methods: {
formatType(row){ formatType(row) {
var typese = row.ChargeType var typese = row.ChargeType
var optDess = '' var optDess = ''
if(typese==1){ if (typese == 1) {
optDess = "按重量" optDess = "按重量"
}else if(typese==2){ } else if (typese == 2) {
optDess = "按数量" optDess = "按数量"
} }
return optDess return optDess
}, },
//格式化状态 //格式化状态
formatDefault(row){ formatDefault(row) {
var types = row.IsDefault var types = row.IsDefault
var optDes = '' var optDes = ''
if(types==1){ if (types == 1) {
optDes = "是" optDes = "是"
}else if(types==0){ } else if (types == 0) {
optDes = "否" optDes = "否"
} }
return optDes return optDes
}, },
//格式化时间 //格式化时间
formatTime(row){ formatTime(row) {
var Time = row.Created var Time = row.Created
var newtime = "" var newtime = ""
if(Time>0){ if (Time > 0) {
newtime = dateFormat(Time*1000,"Y-m-d H:i:s"); newtime = dateFormat(Time * 1000, "Y-m-d H:i:s");
} }
return newtime return newtime
}, },
/** 查询freight列表 */ /** 查询freight列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listFreight(this.queryParams).then(response => { listFreight(this.queryParams).then(response => {
this.freightList = response.data.data.list; this.freightList = response.data.data.list;
this.total = response.data.data.count; this.total = response.data.data.count;
this.loading = false; this.loading = false;
}); });
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
seller_id: null,
name: null,
sort: null,
is_default: null,
charge_type: null,
dispatching: null,
disdispatching: null,
publish: null,
created: null,
modified: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.form = {
Id:0,
Sort: 0,
Name: "0",
IsDefault: 0,
ChargeType: 0,
Dispatching: [
{
a: "全国",
f: 500,
fp: 10,
n: 100,
np: 5,
}
],
Disdispatching: "",
Publish: 0,
}, },
this.title = "添加运费模板"; // 取消按钮
}, cancel() {
reset() { this.open = false;
this.form = { this.reset();
},
}; // 表单重置
this.resetForm("form"); reset() {
}, this.form = {
/** 修改按钮操作 */ id: null,
handleUpdate(row) { seller_id: null,
console.log(row) name: null,
this.reset(); sort: null,
const id = row.Id is_default: null,
getFreight(id).then(response => { charge_type: null,
let formdate = response.data dispatching: null,
response.data.Dispatching = JSON.parse(formdate.Dispatching) disdispatching: null,
this.form = response.data publish: null,
created: null,
modified: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true; this.open = true;
this.title = "修改运费模板"; this.form = {
}); Id: 0,
}, Sort: 0,
/** 提交按钮 */ Name: "0",
submitForm() { IsDefault: 0,
this.$refs["form"].validate(valid => { ChargeType: 0,
if (valid) { Dispatching: [
if (this.form.id != null) { {
updateFreight(this.form).then(response => { a: "全国",
if (response.code === 0) { f: 500,
this.msgSuccess("修改成功"); fp: 10,
this.open = false; n: 100,
this.getList(); np: 5,
} }
}); ],
} else { Disdispatching: "",
addFreight(this.form).then(response => { Publish: 0,
if (response.code === 0) { },
this.msgSuccess("新增成功"); this.title = "添加运费模板";
this.open = false; },
this.getList(); /** 修改按钮操作 */
} handleUpdate(row) {
}); console.log(row)
this.reset();
const id = row.Id
getFreight(id).then(response => {
let formdate = response.data
response.data.Dispatching = JSON.parse(formdate.Dispatching)
this.form = response.data
this.open = true;
this.title = "修改运费模板";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateFreight(this.form).then(response => {
if (response.code === 0) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addFreight(this.form).then(response => {
if (response.code === 0) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
} }
} });
}); },
}, /** 删除按钮操作 */
/** 删除按钮操作 */ handleDelete(row) {
handleDelete(row) { console.log(row)
console.log(row) const ids = row.Id
const ids = row.Id this.$confirm('是否确认删除运费模板编号为"' + ids + '"的数据项?', "警告", {
this.$confirm('是否确认删除运费模板编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(function() { }).then(function () {
return delFreight(ids); return delFreight(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");
}).catch(function() {}); }).catch(function () {
}, });
},
} //methods结束 } //methods结束
}; };
</script> </script>
<style scoped> <style scoped>
.app-container{ .app-container {
height:100%; height: 100%;
} }
.box-card {
height: 100%;
}
.box-card /deep/ .el-card__body {
height: 100%;
overflow: hidden;
}
.box-card{ .el-table {
height:100%; height: calc(100% - 120px);
} }
.box-card /deep/ .el-card__body{
height:100%;
overflow: hidden;
}
.el-table{
height:calc(100% - 120px);
}
</style> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论