提交 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,60 +3,41 @@ ...@@ -3,60 +3,41 @@
<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");
// const rememberMe = Cookies.get('rememberMe')
// this.loginForm = {
// username: username === undefined ? this.loginForm.username : username,
// password: password === undefined ? this.loginForm.password : decrypt(password),
// rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
// };
}, },
gotosso(){ gotosso() {
var ticket = this.$route.query.ticket var ticket = this.$route.query.ticket
// let data = this.getUrlParam('ticket') this.$store.dispatch('Login', {"ticket": ticket}).then((res) => {
// this.loading = true if (res.token != "") {
this.$store.dispatch('Login', {"ticket":ticket}).then((res) => { this.$router.push({path: '/'})
// console.log(123456) } else {
// console.log(res)
// return false
// debugger
if(res.token != ""){
this.$router.push({ path:'/' })
}else{
this.$store.dispatch('Statistic') 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(() => { .catch(() => {
debugger
console.log(222222222222)
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
......
<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">
...@@ -12,7 +11,8 @@ ...@@ -12,7 +11,8 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
>删除</el-button> >删除
</el-button>
<el-button <el-button
style="float:right;" style="float:right;"
type="success" type="success"
...@@ -20,27 +20,29 @@ ...@@ -20,27 +20,29 @@
size="mini" size="mini"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
>修改</el-button> >修改
</el-button>
<el-button <el-button
style="float:right;margin-left: 20px;" style="float:right;margin-left: 20px;"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
>新增</el-button> >新增
</el-button>
</div> </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
...@@ -48,13 +50,15 @@ ...@@ -48,13 +50,15 @@
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 <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>删除</el-button> >删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -67,21 +71,22 @@ ...@@ -67,21 +71,22 @@
/> />
<!-- 添加或修改freight对话框 --> <!-- 添加或修改freight对话框 -->
<el-dialog :title="title" :visible.sync="open" v-if="open" width="90%" append-to-body> <el-dialog :title="title" :visible.sync="open" v-if="open" width="90%" append-to-body>
<IndexBtn :option="form" /> <IndexBtn :option="form"/>
</el-dialog> </el-dialog>
</el-card> </el-card>
</div> </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 {
export default {
name: "freight", name: "freight",
data() { data() {
return { return {
fullHeight: '', fullHeight: '',
tableHeight:null, tableHeight: null,
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 选中数组 // 选中数组
...@@ -120,55 +125,55 @@ export default { ...@@ -120,55 +125,55 @@ export default {
// 表单校验 // 表单校验
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
}, },
...@@ -216,7 +221,7 @@ export default { ...@@ -216,7 +221,7 @@ export default {
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map(item => item.id)
this.single = selection.length!==1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
...@@ -224,7 +229,7 @@ export default { ...@@ -224,7 +229,7 @@ export default {
this.reset(); this.reset();
this.open = true; this.open = true;
this.form = { this.form = {
Id:0, Id: 0,
Sort: 0, Sort: 0,
Name: "0", Name: "0",
IsDefault: 0, IsDefault: 0,
...@@ -243,12 +248,6 @@ export default { ...@@ -243,12 +248,6 @@ export default {
}, },
this.title = "添加运费模板"; this.title = "添加运费模板";
}, },
reset() {
this.form = {
};
this.resetForm("form");
},
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
console.log(row) console.log(row)
...@@ -294,29 +293,32 @@ export default { ...@@ -294,29 +293,32 @@ export default {
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{ .box-card {
height:100%; height: 100%;
} }
.box-card /deep/ .el-card__body{
height:100%; .box-card /deep/ .el-card__body {
height: 100%;
overflow: hidden; overflow: hidden;
} }
.el-table{
height:calc(100% - 120px); .el-table {
height: calc(100% - 120px);
} }
</style> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论