Authored by htoooth

Merge remote-tracking branch 'origin/release/1.0' into release/1.0

<template>
<Row class="filter-item">
<Col class="label-col" span="6" v-if="label">
<Col class="label-col" span="8" v-if="label">
<label>{{label}}:</label>
</Col>
<Col class="item-col" span="18">
<Col class="item-col" :span="label ? 16 : 24">
<slot></slot>
</Col>
</Row>
... ... @@ -28,7 +28,7 @@ export default {
<style lang="scss">
.label-col {
line-height: 32px;
max-width: 100px;
max-width: 80px;
}
.item-col {
input, select, .ivu-select, .ivu-cascader {
... ...
... ... @@ -6,9 +6,9 @@ export default {
render(createElement) {
let slotChunks = _.chunk(this.$slots.default.filter(slot =>
slot.data && slot.componentOptions.propsData.label), this.col);
let submitChunk = _.chunk(this.$slots.default.filter(slot =>
slot.data && !slot.componentOptions.propsData.label), this.col);
let rowElements = _.map(_.concat(slotChunks, submitChunk), slotChunk => {
let submitSlots = this.$slots.default.filter(slot =>
slot.data && !slot.componentOptions.propsData.label);
let rowElements = _.map(slotChunks, slotChunk => {
return createElement('Row', {
class: {
'filter-row': true
... ... @@ -25,6 +25,21 @@ export default {
}));
});
_.each(submitSlots, slot => {
rowElements.push(createElement('Row', {
class: {
'filter-row': true
},
props: {
gutter: this.gutter
}
}, [createElement('Col', {
props: {
span: 24
}
}, [slot])]));
});
if (!this.noLine) {
rowElements.push(createElement('div', {
class: {
... ...
... ... @@ -7,9 +7,3 @@ export default {
name: 'app'
};
</script>
<style lang="scss">
.tetst {
width: 100px;
}
</style>
... ...
let filterFields = {
sknCode: {
label: 'SKN编码',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
prodCode: {
label: '商家编码',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
prodName: {
label: '商品名称',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
prodBarCode: {
label: '商品条码',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
sort: {
first: {
label: '选择类目',
holder: '选择一级类目',
labelSpan: 6,
fieldSpan: 18,
model: ''
},
second: {
label: '二级类目',
holder: '选择二级类目',
labelSpan: 6,
fieldSpan: 18,
model: ''
},
third: {
label: '三级类目',
holder: '选择三级类目',
labelSpan: 6,
fieldSpan: 18,
model: ''
}
},
brand: {
label: '选择品牌',
labelSpan: 6,
fieldSpan: 18,
model: -1
},
verifyStatus: {
label: '审核状态',
labelSpan: 6,
fieldSpan: 18,
model: -1,
options: [
{
value: -1,
label: '全部'
},
{
value: 1,
label: '下架待审核'
},
{
value: 2,
label: '下架驳回'
}
]
},
stockStatus: {
label: '库存情况',
labelSpan: 6,
fieldSpan: 18,
model: -1,
options: [
{
value: -1,
label: '全部'
},
{
value: 1,
label: '有库存'
},
{
value: 0,
label: '无库存'
}
]
}
};
let initialFields = JSON.stringify(filterFields);
let tableCols = [
{
title: '对账单号',
key: 'image',
width: 120,
align: 'center',
render (row, column, index) {
return '<cell-image :image-src="row.picImgUrl" :product-url="row.productUrl"></cell-image>';
}
},
{
title: '生成日期',
key: 'info',
align: 'center',
render(row, column, index) {
return `<cell-info
:skn="row.productSkn"
:product-name="row.productName"
:brand-name="row.brandName"
:max-name="row.maxSortName"
:middle-name="row.middleSortName"
:small-name="row.smallSortName">
</cell-info>`;
}
},
{
title: '结算周期',
key: 'price',
align: 'center',
render(row, column, index) {
row.lineIndex = index;
return `<cell-price
@click-change="editPrice(row)"
@click-save="updatePrice"
:can-change="true"
:current-row="row"
:show-change="row.changePrice"
:retail-price="row.retailPrice"
:sales-price="row.salesPrice">
</cell-price>`;
}
},
{
title: '品牌',
key: 'stock',
width: 100,
align: 'center',
},
{
title: '供应商',
key: 'shelveTime',
width: 150,
align: 'center'
},
{
title: '结算金额',
key: 'verify',
align: 'center',
render(row, column, index) {
return `${auditStatus[row.auditStatus]}`
}
},
{
title: '操作',
key: 'action',
width: 180,
align: 'center',
render: function(row, column, index) {
return `<div class="action-btn-row">
<i-button type="primary" size="small" @click="editSize(row.productSkn)">尺码维护</i-button>
<i-button v-if="row._disabled" type="primary" size="small"
@click="editProduct(${row.productSkn})" disabled>内容编辑</i-button>
<i-button v-else type="primary" size="small" @click="editProduct(${row.productSkn})">内容编辑</i-button>
</div>
<div class="btn-row-space">
<i-button v-if="row._disabled" type="error" size="small"
@click="setOffSale(${row.productSkn})" disabled>下架</i-button>
<i-button v-else type="error" size="small" @click="setOffSale(${row.productSkn})" >下架</i-button>
</div>`;
}
}
];
let tableData = [];
let pageData = {
total: 0,
current: 1
};
export {
filterFields,
initialFields,
tableCols,
tableData,
pageData
};
... ... @@ -125,12 +125,6 @@ body {
transition: width .1s ease-in-out;
}
.ivu-table {
table {
}
}
.layout-logo-left {
width: 90%;
height: 30px;
... ...
const _ = require('lodash');
const Context = require('./context');
const Context = require('../framework/context');
const rp = require('request-promise');
const request = require('request');
... ...
... ... @@ -5,7 +5,7 @@
*/
'use strict';
const Context = require('../common/context');
const Context = require('../framework/context');
const FileService = require('../service/file-service');
const Api = require('../common/api');
const apiDomain = require('../common/api-domain');
... ...
... ... @@ -9,8 +9,7 @@
const Express = require('express');
const UserController = require('./user-controller');
const FileController = require('./file-controller');
const OutputController = require('./output-controller');
const middleware = require('../common/middleware');
const middleware = require('../framework/middleware');
const multipart = require('connect-multiparty');
const multipartMiddleware = multipart();
... ... @@ -20,7 +19,5 @@ router.post('/login', middleware(UserController, 'login'));
router.post('/logout', middleware(UserController, 'logout'));
router.post('/upload/image', multipartMiddleware, middleware(FileController, 'uploadImage'));
// router.get('/output/productList', middleware(OutputController, 'productList'));
module.exports = router;
... ...
const Context = require('../common/context');
const Context = require('../framework/context');
const nodeExcel = require('excel-export');
// 暂时弃用
... ...
... ... @@ -5,7 +5,7 @@
*/
'use strict';
const Context = require('../common/context');
const Context = require('../framework/context');
const UserService = require('../service/user-service');
const _ = require('lodash');
... ...
... ... @@ -4,7 +4,7 @@
* @date: 2017/04/13
*/
const Context = require('./context');
const Context = require('../framework/context');
module.exports = (Type, action) => {
return (req, res, next) => {
... ...
... ... @@ -4,7 +4,7 @@
* @date: 2017/04/13
*/
const _ = require('lodash');
const util = require('../common/util');
const util = require('../framework/util');
module.exports = (req, res, next) => {
let yoho = {
... ...
const Context = require('../common/context');
const Context = require('../framework/context');
class FileService extends Context {
constructor() {
... ...
... ... @@ -5,8 +5,7 @@
'use strict';
const _ = require('lodash');
const md5 = require('yoho-md5');
const Context = require('../common/context');
const Context = require('../framework/context');
const rp = require('request-promise');
const Api = require('../common/api');
const apiDomain = global.yoho.apiDomain;
... ...