Authored by htoooth

Merge branch 'release/2.0' of http://git.yoho.cn/fe/yoho-shop-manage into release/2.0

<template>
<Breadcrumb class="brand-curmb" v-if="showBreadcrumb">
<i class="iconfont icon-alignjustify" aria-hidden="true" @click="$emit('menu-trigger')"></i>
<i class="iconfont icon-align14" aria-hidden="true" @click="$emit('menu-trigger')"></i>
<Breadcrumb-item v-bind:href="item.path" v-for="item in items" :key="item.name">{{item.name}}</Breadcrumb-item>
</Breadcrumb>
</template>
... ...
<template>
<Row class="layout-header">
<Col :span="12" class="brand-title">
<i class="iconfont icon-alignjustify" aria-hidden="true" @click="$emit('menu-trigger')"></i>
<i class="iconfont icon-align14" aria-hidden="true" @click="$emit('menu-trigger')"></i>
{{userInfo.name}}
</Col>
<Col :span="12" class="shop-info">
... ...
... ... @@ -23,7 +23,7 @@ export default {
name: 'purview-menu',
data() {
return {
purviews: this.$oriPurviews, // TODO 根据用户权限,初始化菜单
purviews: this.$oriPurviews,
openNames: [],
activeName: ''
};
... ... @@ -47,9 +47,7 @@ export default {
let menu = _.find(this.$purviews, purview => purview.id === menuId);
if (menu) {
setTimeout(() => {
this.$router.push(menu.menu_url);
}, 100);
this.$router.push(menu.menu_url);
}
}
},
... ... @@ -75,10 +73,6 @@ $collapseLeftBorder: 2px;
}
}
.ivu-menu-item-group-title {
color: #9ea7b4 !important;
}
.ivu-menu-submenu-title {
.collapse {
display: none;
... ... @@ -122,11 +116,12 @@ $collapseLeftBorder: 2px;
}
.ivu-menu {
background: #313540 !important;
display: none;
position: absolute;
top: 49px;
left: $collapseWidth - $collapseLeftBorder;
z-index: 2;
z-index: 999;
width: $collapseMenuWidth;
}
}
... ...
... ... @@ -13,5 +13,5 @@ export default {
repository,
statistics,
finance,
trade,
trade
};
... ...
... ... @@ -8,7 +8,7 @@
<layout-action>
<Button type="error" @click="onClickCreate" :disabled="this.selection.length === 0">发货</Button>
<Button type="primary" @click="back">返回发货入库列表</Button>
<Button type="primary" @click="$router.go(-1)">返回发货入库列表</Button>
</layout-action>
<layout-list>
... ...
... ... @@ -85,14 +85,14 @@ export default {
return this.search();
},
getParams() {
let params = _.toPairs(Object.assign(this.query, {
let params = Object.assign(this.query, {
maxSortId: _.get(this.category, '[0].value'),
middleSortId: _.get(this.category, '[1].value'),
smallSortId: _.get(this.category, '[2].value')
}, this.pageData));
}, this.pageData);
delete params.total;
return _.fromPairs(params.filter(item => item[1]));
return _.pickBy(params, val => val);
},
reset() {
this.category = [];
... ...
import overview from './overview-iframe';
import sale from './sale';
import sale from './sale-iframe';
import outinstore from './outinstore-iframe';
import stock from './stock-iframe';
export default {
overview,
sale
sale,
outinstore,
stock
};
... ...
const page = r => require.ensure([], () => r(require('./outinstore')), 'statistics.outinstore');
export default {
path: '/outinstore.html',
name: 'outinstore',
component: page,
meta: {
pageName: '出入库统计'
}
};
... ...
<template>
<layout-body>
<iFrame :src="`${$config.shopsFeDomain}/report/importExportStock`"></iFrame>
</layout-body>
</template>
... ...
const page = r => require.ensure([], () => r(require('./stock')), 'statistics.stock');
export default {
path: '/stock.html',
name: 'stock',
component: page,
meta: {
pageName: '库存统计'
}
};
... ...
<template>
<layout-body>
<iFrame :src="`${$config.shopsFeDomain}/report/stock`"></iFrame>
</layout-body>
</template>
... ...
... ... @@ -5,12 +5,10 @@ let exportExpress = {
"computed": false,
"key": {
"type": "Identifier",
"name": "b"
},
"kind": "init",
"value": {
"type": "Identifier",
"name": "b"
}
};
... ...
... ... @@ -5,20 +5,17 @@ let importExress = {
"type": "ImportDefaultSpecifier",
"local": {
"type": "Identifier",
"name": "b"
}
}
],
"source": {
"type": "Literal",
"value": "./b",
"raw": "'./b'"
}
};
module.exports = (name) => {
importExress.specifiers[0].local.name = name;
importExress.source.value.raw = importExress.source.value = `./${name}`;
importExress.source.raw = importExress.source.value = `./${name}`;
return importExress;
};
... ...
<template>
<layout-body>
<Form :label-width="100" ref="form1" :model="modelData" :rules="ruleValidate">
<Form-item label="字段1名称:" prop="field1">
<Input v-model="modelData.field1" placeholder="请输入..." style="width: 400px;" />
</Form-item>
<Form-item label="字段2名称:" prop="field2">
<Input v-model="modelData.field2" placeholder="请输入..." style="width: 400px;" />
</Form-item>
<Form-item label="字段3:" prop="field3">
<radio-season v-model="modelData.field3"></radio-season>
</Form-item>
<Form-item label="字段4:" prop="field4">
<select-season v-model="modelData.field4"></select-season>
</Form-item>
<Form-item label="图片:" prop="img">
<div class="upload-item">
<div class="upload-item-img">
<drag-file-upload bucket="yhb-img01" @success="uploadImageSuccess" @remove="uploadImageRemove">
</drag-file-upload>
</div>
</div>
</Form-item>
<Form-item label="简介:" prop="intro">
<editor :content="modelData.intro" @change="editorChange" :z-index="2">
</editor>
</Form-item>
<Form-item>
<Button type="primary" @click="submit">保存</Button>
</Form-item>
</Form>
</layout-body>
</template>
<script>
import {RadioSeason} from 'components/radio';
import {SelectSeason} from 'components/select';
export default {
data() {
return {
modelData: {
field1: '',
field2: '',
field3: '',
field4: '',
img: '',
intro: ''
},
ruleValidate: {
field1: [
{ required: true, message: '字段不能为空', trigger: 'blur' }
],
field2: [
{ required: true, message: '字段不能为空', trigger: 'blur' },
],
field3: [
{ required: true, message: '请选择季节', trigger: 'change' }
],
field4: [
{ required: true, message: '请选择季节', trigger: 'change' }
],
img: [
{ required: true, message: '请上传图片' },
],
intro: [
{ required: true, message: '请填写备注', trigger: 'change' }
]
}
};
},
methods: {
editorChange: function(content) {
this.modelData.intro = content;
},
uploadImageSuccess: function(attach, file) {
this.modelData.img = file.url;
},
uploadImageRemove: function() {
this.modelData.img = '';
},
submit: function() {
this.$refs.form1.validate((valid) => {
if (valid) {
this.$Message.success('提交成功!');
} else {
this.$Message.error('表单验证失败!');
}
});
}
},
components: {
RadioSeason,
SelectSeason
}
};
</script>
\ No newline at end of file
... ...
const page = r => require.ensure([], () => r(require('./#{pageName}')), '#{moduleName}.#{pageName}');
export default {
path: '/#{pageName}.html',
name: '#{pageName}',
component: page,
meta: {
pageName: '新建页面'
}
};
... ...