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

云仓新功能

上级 2e5e6aaa
......@@ -9,3 +9,21 @@ export default {
name: 'App'
}
</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'
Vue.use(Router)
/* Layout */
import Layout from '@/layout'
import Layout from '@/layout';
import Entry from '@/views/entry';
/**
* Note: 路由配置项
......@@ -57,7 +60,43 @@ export const constantRoutes = [
component: (resolve) => require(['@/views/error/401'], resolve),
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: '',
component: Layout,
redirect: 'index',
......@@ -69,6 +108,19 @@ export const constantRoutes = [
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',
......
......@@ -3,65 +3,46 @@
<script>
export default {
name: "Login2",
created() {
this.gotosso()
this.gotosso()
},
methods: {
getCookie() {
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(){
var ticket = this.$route.query.ticket
// let data = this.getUrlParam('ticket')
// this.loading = true
this.$store.dispatch('Login', {"ticket":ticket}).then((res) => {
// console.log(123456)
// console.log(res)
// return false
// debugger
if(res.token != ""){
this.$router.push({ path:'/' })
}else{
this.$store.dispatch('Statistic')
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
})
.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
})
},
getCookie() {
var de = this.$store.commit("SET_TOKEN")
},
gotosso() {
var ticket = this.$route.query.ticket
this.$store.dispatch('Login', {"ticket": ticket}).then((res) => {
if (res.token != "") {
this.$router.push({path: '/'})
} else {
this.$store.dispatch('Statistic')
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
})
.catch(() => {
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>
export default {
created() {
const { params, query } = this.$route
const { path } = params
this.$router.replace({ path: '/' + path, query })
},
render: function(h) {
return h() // avoid warning message
export default {
created() {
const {params, query} = this.$route
const {path} = params;
this.$router.replace({path: '/' + path, query})
},
render: function (h) {
return h()
}
}
}
</script>
<template>
<div class="app-container">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>提现记录</span>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>提现记录</span>
<el-button
style="float:right;margin-left: 10px;"
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除</el-button>
<el-button
style="float:right;"
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
>修改</el-button>
<el-button
style="float:right;margin-left: 20px;"
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button>
</div>
<el-button
style="float:right;margin-left: 10px;"
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除
</el-button>
<el-button
style="float:right;"
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
>修改
</el-button>
<el-button
style="float:right;margin-left: 20px;"
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增
</el-button>
</div>
<el-table v-loading="loading" :data="freightList" :height="tableHeight" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="Id" />
<el-table v-loading="loading" :data="freightList" :height="tableHeight" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="ID" align="center" prop="Id"/>
<el-table-column label="模板名称" align="center" prop="Name" />
<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="formatType" prop="ChargeType" />
<el-table-column label="模板名称" align="center" prop="Name"/>
<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="formatType" prop="ChargeType"/>
<el-table-column label="是否是默认" align="center" prop="Publish" />
<el-table-column label="创建时间" align="center" :formatter="formatTime" prop="Created" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改freight对话框 -->
<el-dialog :title="title" :visible.sync="open" v-if="open" width="90%" append-to-body>
<IndexBtn :option="form" />
</el-dialog>
</el-card>
</div>
<el-table-column label="是否是默认" align="center" prop="Publish"/>
<el-table-column label="创建时间" align="center" :formatter="formatTime" prop="Created"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改freight对话框 -->
<el-dialog :title="title" :visible.sync="open" v-if="open" width="90%" append-to-body>
<IndexBtn :option="form"/>
</el-dialog>
</el-card>
</div>
</template>
<script>
import IndexBtn from './indexbtn'
import { listFreight, getFreight, delFreight, addFreight, updateFreight } from '@/api/module/freight'
import {dateFormat} from '@/utils'
export default {
name: "freight",
data() {
return {
fullHeight: '',
tableHeight:null,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// freight表格数据
freightList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
import IndexBtn from './indexbtn'
import {listFreight, getFreight, delFreight, addFreight, updateFreight} from '@/api/module/freight'
import {dateFormat} from '@/utils'
export default {
name: "freight",
data() {
return {
fullHeight: '',
tableHeight: null,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// freight表格数据
freightList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 20,
......@@ -116,207 +121,204 @@ export default {
modified: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
name: [
{ required: true, message: "模板名称不能为空", trigger: "blur" }
],
}
form: {},
// 表单校验
rules: {
name: [
{required: true, message: "模板名称不能为空", trigger: "blur"}
],
}
};
},
components:{
IndexBtn
components: {
IndexBtn
},
created() {
this.getList();
this.$nextTick(()=>{
this.fullHeight = document.getElementsByClassName('box-card')[0].clientHeight
})
this.getList();
this.$nextTick(() => {
this.fullHeight = document.getElementsByClassName('box-card')[0].clientHeight
})
},
watch:{
fullHeight(val,oldval){
console.log(val)
this.tableHeight = val - 130
}
},
},
watch: {
fullHeight(val, oldval) {
console.log(val)
this.tableHeight = val - 130
}
},
methods: {
formatType(row){
formatType(row) {
var typese = row.ChargeType
var optDess = ''
if(typese==1){
if (typese == 1) {
optDess = "按重量"
}else if(typese==2){
} else if (typese == 2) {
optDess = "按数量"
}
return optDess
},
//格式化状态
formatDefault(row){
formatDefault(row) {
var types = row.IsDefault
var optDes = ''
if(types==1){
if (types == 1) {
optDes = "是"
}else if(types==0){
} else if (types == 0) {
optDes = "否"
}
return optDes
},
//格式化时间
formatTime(row){
formatTime(row) {
var Time = row.Created
var newtime = ""
if(Time>0){
newtime = dateFormat(Time*1000,"Y-m-d H:i:s");
if (Time > 0) {
newtime = dateFormat(Time * 1000, "Y-m-d H:i:s");
}
return newtime
},
/** 查询freight列表 */
getList() {
this.loading = true;
listFreight(this.queryParams).then(response => {
this.freightList = response.data.data.list;
this.total = response.data.data.count;
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,
/** 查询freight列表 */
getList() {
this.loading = true;
listFreight(this.queryParams).then(response => {
this.freightList = response.data.data.list;
this.total = response.data.data.count;
this.loading = false;
});
},
this.title = "添加运费模板";
},
reset() {
this.form = {
};
this.resetForm("form");
},
/** 修改按钮操作 */
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
// 取消按钮
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.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();
}
});
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 = "添加运费模板";
},
/** 修改按钮操作 */
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) {
console.log(row)
const ids = row.Id
this.$confirm('是否确认删除运费模板编号为"' + ids + '"的数据项?', "警告", {
});
},
/** 删除按钮操作 */
handleDelete(row) {
console.log(row)
const ids = row.Id
this.$confirm('是否确认删除运费模板编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
}).then(function () {
return delFreight(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
},
}).catch(function () {
});
},
} //methods结束
};
};
</script>
<style scoped>
.app-container{
height:100%;
}
.app-container {
height: 100%;
}
.box-card {
height: 100%;
}
.box-card /deep/ .el-card__body {
height: 100%;
overflow: hidden;
}
.box-card{
height:100%;
}
.box-card /deep/ .el-card__body{
height:100%;
overflow: hidden;
}
.el-table{
height:calc(100% - 120px);
}
.el-table {
height: calc(100% - 120px);
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论