Authored by zhangwenxue

chore(eslint): apply eslint auto fix

add rules:
- no-multiple-empty-lines
- object-shorthand
- change .editorconfig indent_size
Showing 74 changed files with 2154 additions and 2155 deletions

Too many changes to show.

To preserve performance only 74 of 74+ files are displayed.

... ... @@ -3,7 +3,7 @@ root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
... ...
... ... @@ -5,13 +5,18 @@
},
"extends": "yoho",
"parserOptions": {
"sourceType": "module"
"sourceType": "module",
"ecmaVersion": 2018
},
"plugins": [
"html"
],
"rules": {
"camelcase": "off",
"max-len": "off"
"max-len": "off",
"no-multiple-empty-lines": ["error", {
"max": 1
}],
"object-shorthand": ["error"]
}
}
... ...
... ... @@ -15,7 +15,7 @@ Vue.use(yohoPluginAuth);
Vue.use(yohoPluginCache);
Vue.render({
el: '#app',
template: '<App/>',
components: {App}
el: '#app',
template: '<App/>',
components: {App}
});
... ...
... ... @@ -3,7 +3,7 @@ import CellInfo from './cell-info';
import CellPrice from './cell-price';
export default {
CellImage,
CellInfo,
CellPrice,
CellImage,
CellInfo,
CellPrice,
};
... ...
... ... @@ -3,10 +3,9 @@ import CheckboxColor from './checkbox-color';
import CheckboxSize from './checkbox-size';
import CheckboxMaterial from './checkbox-material';
export default {
CheckboxAge,
CheckboxColor,
CheckboxSize,
CheckboxMaterial
CheckboxAge,
CheckboxColor,
CheckboxSize,
CheckboxMaterial
};
... ...
const component = (resolve) => {
require.ensure([], () => {
let echart = require('./echart');
require.ensure([], () => {
let echart = require('./echart');
resolve(echart);
}, 'echart');
resolve(echart);
}, 'echart');
};
export default [
'EChart',
component
'EChart',
component
];
... ...
... ... @@ -3,76 +3,75 @@ import _ from 'lodash';
import MultiImage from './multi-image';
import './editor.scss';
export default [
'editor',
() => ({
component: import(/* webpackChunkName: "components.editor" */'vue-html5-editor').then(VueHtml5Editor => {
const editorInstance = new VueHtml5Editor({
hiddenModules: ['info', 'image'],
visibleModules: [
'text',
'color',
'font',
'align',
'list',
'link',
'unlink',
'tabulation',
'multi-image',
'hr',
'eraser',
'undo',
'full-screen',
'info',
],
icons: {
text: 'iconfont icon-pencil',
color: 'iconfont icon-paintbrush',
font: 'iconfont icon-font',
align: 'iconfont icon-alignjustify',
list: 'iconfont icon-list',
link: 'iconfont icon-chain',
unlink: 'iconfont icon-chainbroken',
tabulation: 'iconfont icon-table',
image: 'iconfont icon-images',
'multi-image': 'iconfont icon-images',
hr: 'iconfont icon-minus',
eraser: 'iconfont icon-eraser',
undo: 'iconfont icon-undo',
'full-screen': 'iconfont icon-arrows-alt',
},
image: {
sizeLimit: 512 * 1024,
upload: {
url: '/Api/upload/image',
headers: {},
params: {
bucket: 'goodsimg'
},
fieldName: 'file'
},
compress: null,
uploadHandler(responseText) {
let json = JSON.parse(responseText);
'editor',
() => ({
component: import(/* webpackChunkName: "components.editor" */'vue-html5-editor').then(VueHtml5Editor => {
const editorInstance = new VueHtml5Editor({
hiddenModules: ['info', 'image'],
visibleModules: [
'text',
'color',
'font',
'align',
'list',
'link',
'unlink',
'tabulation',
'multi-image',
'hr',
'eraser',
'undo',
'full-screen',
'info',
],
icons: {
text: 'iconfont icon-pencil',
color: 'iconfont icon-paintbrush',
font: 'iconfont icon-font',
align: 'iconfont icon-alignjustify',
list: 'iconfont icon-list',
link: 'iconfont icon-chain',
unlink: 'iconfont icon-chainbroken',
tabulation: 'iconfont icon-table',
image: 'iconfont icon-images',
'multi-image': 'iconfont icon-images',
hr: 'iconfont icon-minus',
eraser: 'iconfont icon-eraser',
undo: 'iconfont icon-undo',
'full-screen': 'iconfont icon-arrows-alt',
},
image: {
sizeLimit: 512 * 1024,
upload: {
url: '/Api/upload/image',
headers: {},
params: {
bucket: 'goodsimg'
},
fieldName: 'file'
},
compress: null,
uploadHandler(responseText) {
let json = JSON.parse(responseText);
if (json.code === 200) {
return _.get(json, 'data.imagesList[0]', '');
}
return json.data;
}
},
language: 'zh-cn',
modules: [{
name: 'multi-image',
icon: 'fa fa-file-image-o',
i18n: '多图片上传',
show: true,
dashboard: MultiImage
}]
});
if (json.code === 200) {
return _.get(json, 'data.imagesList[0]', '');
}
return json.data;
}
},
language: 'zh-cn',
modules: [{
name: 'multi-image',
icon: 'fa fa-file-image-o',
i18n: '多图片上传',
show: true,
dashboard: MultiImage
}]
});
return editorInstance;
}),
})
return editorInstance;
}),
})
];
... ...
import Editor from './editor';
export {
Editor
Editor
};
... ...
... ... @@ -19,23 +19,23 @@ import BackTopDom from './back-top-dom';
import FilterTips from './filter-tips';
export default {
LayoutUserInfo,
Menus,
Breadcrumb,
FilterItem,
LayoutBody,
LayoutAction,
LayoutList,
LayoutTab,
LayoutFilter,
LayoutPrint,
ActionGroup,
EChart,
Editor,
FileUpload,
DragFileUpload,
IFrame,
UploadXlsx,
BackTopDom,
FilterTips
LayoutUserInfo,
Menus,
Breadcrumb,
FilterItem,
LayoutBody,
LayoutAction,
LayoutList,
LayoutTab,
LayoutFilter,
LayoutPrint,
ActionGroup,
EChart,
Editor,
FileUpload,
DragFileUpload,
IFrame,
UploadXlsx,
BackTopDom,
FilterTips
};
... ...
... ... @@ -2,6 +2,6 @@ import ImageGoodsMain from './image-goods-main';
import ImagePurview from './image-purview';
export default {
ImageGoodsMain,
ImagePurview
ImageGoodsMain,
ImagePurview
};
... ...
... ... @@ -10,14 +10,14 @@ import Table from './table';
import Input from './input';
export default {
Cell,
CheckBox,
Global,
Image,
Modal,
Pop,
Radio,
Select,
Table,
Input
Cell,
CheckBox,
Global,
Image,
Modal,
Pop,
Radio,
Select,
Table,
Input
};
... ...
... ... @@ -2,6 +2,6 @@ import InputSafe from './input-safe';
import InputLength from './input-length';
export default {
InputSafe,
InputLength
InputSafe,
InputLength
};
... ...
... ... @@ -7,11 +7,11 @@ import ModalSknImage from './modal-skn-image';
import ModalPurview from './modal-purview';
export default {
ModalSizeEdit,
ModalStockOut,
ModalDeliver,
ModalExample,
ModalImport,
ModalSknImage,
ModalPurview,
ModalSizeEdit,
ModalStockOut,
ModalDeliver,
ModalExample,
ModalImport,
ModalSknImage,
ModalPurview,
};
... ...
... ... @@ -5,5 +5,5 @@
import ExamplePop from './example-pop';
export default {
ExamplePop
ExamplePop
};
... ...
import RadioGender from './radio-gender';
import RadioSeason from './radio-season';
export default {
RadioGender,
RadioSeason
RadioGender,
RadioSeason
};
... ...
... ... @@ -8,12 +8,12 @@ import SelectSellType from './select-sell-type';
import SelectSearchBrand from './select-search-brand';
export default {
SelectBrand,
SelectCategory,
SelectSeason,
SelectRoom,
SelectExpress,
SelectStockStatus,
SelectSellType,
SelectSearchBrand
SelectBrand,
SelectCategory,
SelectSeason,
SelectRoom,
SelectExpress,
SelectStockStatus,
SelectSellType,
SelectSearchBrand
};
... ...
import TableGoodSize from './table-good-size';
export default {
TableGoodSize
TableGoodSize
};
... ...
export default {
dev: {
historyMode: 'history',
shopsFeDomain: '//shop-manage.yohobuy.com/oldshops',
axiosBaseUrl: '/Api',
axiosResponseType: 'json',
homePage: 'home.overview',
storeKeys: {
user: '_user',
}
},
production: {
historyMode: 'history',
shopsFeDomain: '//shopmanage.yohobuy.com/oldshops',
axiosBaseUrl: '/Api',
axiosResponseType: 'json',
homePage: 'home.overview',
storeKeys: {
user: '_user',
}
dev: {
historyMode: 'history',
shopsFeDomain: '//shop-manage.yohobuy.com/oldshops',
axiosBaseUrl: '/Api',
axiosResponseType: 'json',
homePage: 'home.overview',
storeKeys: {
user: '_user',
}
},
production: {
historyMode: 'history',
shopsFeDomain: '//shopmanage.yohobuy.com/oldshops',
axiosBaseUrl: '/Api',
axiosResponseType: 'json',
homePage: 'home.overview',
storeKeys: {
user: '_user',
}
}
};
... ...
... ... @@ -4,52 +4,52 @@
import _ from 'lodash';
function sknImage({skn, sku, size}) {
let baseUrl = '/Api/platform/getRemoteImageUrlBySku';
let params = [];
let baseUrl = '/Api/platform/getRemoteImageUrlBySku';
let params = [];
if (skn) {
params.push(`skn_id=${skn}`);
}
if (skn) {
params.push(`skn_id=${skn}`);
}
if (sku) {
params.push(`sku_id=${sku}`);
}
if (sku) {
params.push(`sku_id=${sku}`);
}
params.push(size ? `size=${size}` : 'size=80x80');
params.push(size ? `size=${size}` : 'size=80x80');
params.push(`t=${new Date().getTime()}`);
params.push(`t=${new Date().getTime()}`);
return `${baseUrl}?${params.join('&')}`;
return `${baseUrl}?${params.join('&')}`;
}
export default {
bind(el, binding) {
// v-prod-img.skn="{ val: 'fdsa', size: '121X123'}" skn
// v-prod-img.sku="{ val: 'fdsa', size: '121X123'}" sku
// v-prod-img.sku="row.productSkn" sku
// v-prod-img.skn="row.productSkn" skn
// v-prod-img="row.productSkn" skn
let data = null;
let key = null;
if (!_.isEmpty(binding.modifiers)) {
key = _.first(_.keys(binding.modifiers));
} else {
key = 'skn';
}
if (_.isPlainObject(binding.value)) {
data = {
[key]: binding.value.val,
size: binding.value.size
};
} else {
data = {
[key]: binding.value
};
}
el.src = sknImage(data);
bind(el, binding) {
// v-prod-img.skn="{ val: 'fdsa', size: '121X123'}" skn
// v-prod-img.sku="{ val: 'fdsa', size: '121X123'}" sku
// v-prod-img.sku="row.productSkn" sku
// v-prod-img.skn="row.productSkn" skn
// v-prod-img="row.productSkn" skn
let data = null;
let key = null;
if (!_.isEmpty(binding.modifiers)) {
key = _.first(_.keys(binding.modifiers));
} else {
key = 'skn';
}
if (_.isPlainObject(binding.value)) {
data = {
[key]: binding.value.val,
size: binding.value.size
};
} else {
data = {
[key]: binding.value
};
}
el.src = sknImage(data);
}
};
... ...
... ... @@ -2,22 +2,22 @@ import Vue from 'vue';
import _ from 'lodash';
const getPurview = name => {
let url = `/${_.split(name, '.').join('/')}`;
let url = `/${_.split(name, '.').join('/')}`;
return _.find(Vue.$purviews, p => p.menu_url === url);
return _.find(Vue.$purviews, p => p.menu_url === url);
};
export default {
bind(el, binding) {
let pur = getPurview(binding.value);
bind(el, binding) {
let pur = getPurview(binding.value);
if (!pur) {
let routePath = _.get(Vue.$router, 'history.current.name', '');
if (!pur) {
let routePath = _.get(Vue.$router, 'history.current.name', '');
pur = getPurview(`${routePath}.${binding.value}`);
if (!pur) {
el.remove();
}
}
pur = getPurview(`${routePath}.${binding.value}`);
if (!pur) {
el.remove();
}
}
}
};
... ...
export default (value) => {
if (value > 10000) {
return `${Math.round(value / 10000)}万`;
}
if (value > 1000) {
return `${Math.round(value / 1000)}千`;
}
return value;
if (value > 10000) {
return `${Math.round(value / 10000)}万`;
}
if (value > 1000) {
return `${Math.round(value / 1000)}千`;
}
return value;
};
... ...
... ... @@ -12,22 +12,22 @@ import moment from 'moment';
*/
export default (value) => {
let format;
let unixStamp;
const isNum = _.isFinite(value);
const isObj = _.isPlainObject(value);
const defaultFmt = 'YYYY-MM-DD HH:mm:ss';
let format;
let unixStamp;
const isNum = _.isFinite(value);
const isObj = _.isPlainObject(value);
const defaultFmt = 'YYYY-MM-DD HH:mm:ss';
if (isNum) {
unixStamp = value;
format = defaultFmt;
} else if (isObj) {
unixStamp = value.time;
format = value.format || defaultFmt;
} else {
unixStamp = 'Invalid value.';
}
if (isNum) {
unixStamp = value;
format = defaultFmt;
} else if (isObj) {
unixStamp = value.time;
format = value.format || defaultFmt;
} else {
unixStamp = 'Invalid value.';
}
return moment.unix(unixStamp).format(format);
return moment.unix(unixStamp).format(format);
};
... ...
... ... @@ -2,6 +2,6 @@ import Captcha from './captcha';
import GeeCaptcha from './gee-captcha';
export {
Captcha,
GeeCaptcha
Captcha,
GeeCaptcha
};
... ...
const router = [{
path: '/login.html',
name: 'login',
component: () => import(/* webpackChunkName: "common" */'./login'),
meta: {
authPass: true
}
path: '/login.html',
name: 'login',
component: () => import(/* webpackChunkName: "common" */'./login'),
meta: {
authPass: true
}
}, {
path: '/401.html',
name: 'error.401',
component: () => import(/* webpackChunkName: "common" */'./error'),
meta: {
authPass: true
}
path: '/401.html',
name: 'error.401',
component: () => import(/* webpackChunkName: "common" */'./error'),
meta: {
authPass: true
}
}, {
path: '*',
name: 'error.404',
component: () => import(/* webpackChunkName: "common" */'./error'),
meta: {
authPass: true
}
path: '*',
name: 'error.404',
component: () => import(/* webpackChunkName: "common" */'./error'),
meta: {
authPass: true
}
}, {
path: '/500.html',
name: 'error.500',
component: () => import(/* webpackChunkName: "common" */'./error'),
meta: {
authPass: true
}
path: '/500.html',
name: 'error.500',
component: () => import(/* webpackChunkName: "common" */'./error'),
meta: {
authPass: true
}
}];
export default router;
... ...
export default [{
path: '/clearing.html',
name: 'clearing',
component: () => import(/* webpackChunkName: "finance.clearing" */'./clearing'),
meta: {
pageName: '对账单'
}
path: '/clearing.html',
name: 'clearing',
component: () => import(/* webpackChunkName: "finance.clearing" */'./clearing'),
meta: {
pageName: '对账单'
}
}, {
path: '/detail.html',
name: 'detail',
component: () => import(/* webpackChunkName: "finance.clearing" */'./detail'),
meta: {
pageName: '对账单明细'
}
path: '/detail.html',
name: 'detail',
component: () => import(/* webpackChunkName: "finance.clearing" */'./detail'),
meta: {
pageName: '对账单明细'
}
}, {
path: '/stock.html',
name: 'stock',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./stock'),
meta: {
pageName: '对账单库存'
}
path: '/stock.html',
name: 'stock',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./stock'),
meta: {
pageName: '对账单库存'
}
}];
... ...
... ... @@ -4,136 +4,136 @@
* @date: 2017/07/11
*/
export default function() {
return {
tableCols: [
{
title: '对账单号',
key: 'balanceId',
align: 'center'
},
{
title: 'SKU',
key: 'productSku',
align: 'center'
},
{
title: '产品名称',
key: 'productName',
align: 'center',
},
{
title: '商家商品编码',
key: 'factoryCode',
align: 'center',
},
{
title: '品牌',
key: 'brandName',
align: 'center'
},
{
title: '订单号',
key: 'orderCode',
align: 'center'
},
{
title: '业务类型',
key: 'typeDesc',
align: 'center'
},
{
title: '吊牌价',
key: 'retailPrice',
align: 'center'
},
{
title: '成交价',
key: 'lastPrice',
align: 'center'
},
{
title: '折扣',
key: 'purchaseDiscount',
align: 'center'
},
{
title: '结算类型',
key: 'sellTypeDesc',
align: 'center'
},
{
title: '数量',
key: 'salesNums',
align: 'center'
},
{
title: '结算价',
key: 'clearingPrice',
align: 'center'
},
{
title: '审核',
key: 'checkDesc',
align: 'center'
},
{
title: '状态',
key: 'statusDesc',
align: 'center'
}
],
tableData: [],
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
},
filters: {
orderCode: {
label: '订单号',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
sku: {
label: 'SKU',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
balanceId: {
label: '对账单号',
labelSpan: 6,
model: this.$route.query.balanceId,
holder: '',
fieldSpan: 18
},
brandId: {
label: '品牌',
labelSpan: 6,
model: this.$route.query.brandId,
holder: '',
fieldSpan: 18
},
status: {
label: '状态',
labelSpan: 6,
model: this.$route.query.status,
holder: '',
fieldSpan: 18,
options: [
{
value: 1,
label: '未结算'
},
{
value: 2,
label: '已结算'
}
]
}
}
};
return {
tableCols: [
{
title: '对账单号',
key: 'balanceId',
align: 'center'
},
{
title: 'SKU',
key: 'productSku',
align: 'center'
},
{
title: '产品名称',
key: 'productName',
align: 'center',
},
{
title: '商家商品编码',
key: 'factoryCode',
align: 'center',
},
{
title: '品牌',
key: 'brandName',
align: 'center'
},
{
title: '订单号',
key: 'orderCode',
align: 'center'
},
{
title: '业务类型',
key: 'typeDesc',
align: 'center'
},
{
title: '吊牌价',
key: 'retailPrice',
align: 'center'
},
{
title: '成交价',
key: 'lastPrice',
align: 'center'
},
{
title: '折扣',
key: 'purchaseDiscount',
align: 'center'
},
{
title: '结算类型',
key: 'sellTypeDesc',
align: 'center'
},
{
title: '数量',
key: 'salesNums',
align: 'center'
},
{
title: '结算价',
key: 'clearingPrice',
align: 'center'
},
{
title: '审核',
key: 'checkDesc',
align: 'center'
},
{
title: '状态',
key: 'statusDesc',
align: 'center'
}
],
tableData: [],
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
},
filters: {
orderCode: {
label: '订单号',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
sku: {
label: 'SKU',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
balanceId: {
label: '对账单号',
labelSpan: 6,
model: this.$route.query.balanceId,
holder: '',
fieldSpan: 18
},
brandId: {
label: '品牌',
labelSpan: 6,
model: this.$route.query.brandId,
holder: '',
fieldSpan: 18
},
status: {
label: '状态',
labelSpan: 6,
model: this.$route.query.status,
holder: '',
fieldSpan: 18,
options: [
{
value: 1,
label: '未结算'
},
{
value: 2,
label: '已结算'
}
]
}
}
};
}
... ...
... ... @@ -3,44 +3,44 @@ let agoMonthFirstDay = new Date(date.getFullYear(), date.getMonth() - 1, 1);
let agoMonthLastDay = new Date(date.getFullYear(), date.getMonth(), 1);
export default {
filters: {
balanceId: {
label: '对账单号',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
filters: {
balanceId: {
label: '对账单号',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
brandId: {
label: '品牌',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
createTime: {
label: '创建时间',
labelSpan: 6,
model: [agoMonthFirstDay, agoMonthLastDay],
holder: '',
fieldSpan: 18
},
status: {
label: '状态',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18,
options: [
{
value: 1,
label: '未结算'
},
brandId: {
label: '品牌',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
createTime: {
label: '创建时间',
labelSpan: 6,
model: [agoMonthFirstDay, agoMonthLastDay],
holder: '',
fieldSpan: 18
},
status: {
label: '状态',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18,
options: [
{
value: 1,
label: '未结算'
},
{
value: 2,
label: '已结算'
}
]
{
value: 2,
label: '已结算'
}
]
}
}
};
... ...
... ... @@ -7,84 +7,84 @@
import moment from 'moment';
export default function() {
return {
tableCols: [
{
title: '对账单号',
key: 'balanceId',
align: 'center'
},
{
title: '生成日期',
key: 'createTimeString',
align: 'center',
render: function(h, params) {
if (params.row.createTime) {
let time = moment.unix(params.row.createTime);
return {
tableCols: [
{
title: '对账单号',
key: 'balanceId',
align: 'center'
},
{
title: '生成日期',
key: 'createTimeString',
align: 'center',
render(h, params) {
if (params.row.createTime) {
let time = moment.unix(params.row.createTime);
return (
<div>
<div> {time.format('YYYY/MM/DD')} </div>
<div> {time.format('HH:mm:ss')} </div>
</div>
);
} else {
return '';
}
}
},
{
title: '结算周期',
key: 'clearingCycle',
align: 'center',
},
{
title: '品牌',
key: 'brandName',
align: 'center',
},
{
title: '供应商',
key: 'supplierName',
align: 'center'
},
{
title: '应收金额',
key: 'clearingAmount',
align: 'center'
},
{
title: '状态',
key: 'statusDesc',
align: 'center'
},
{
title: '操作',
key: 'action',
width: 250,
align: 'center',
render: (h, params) => {
let info = (
<i-button type="primary" size="small" onClick={() => this.onClickInfo(params)}>查看明细</i-button>
);
return (
<div>
<div> {time.format('YYYY/MM/DD')} </div>
<div> {time.format('HH:mm:ss')} </div>
</div>
);
} else {
return '';
}
}
},
{
title: '结算周期',
key: 'clearingCycle',
align: 'center',
},
{
title: '品牌',
key: 'brandName',
align: 'center',
},
{
title: '供应商',
key: 'supplierName',
align: 'center'
},
{
title: '应收金额',
key: 'clearingAmount',
align: 'center'
},
{
title: '状态',
key: 'statusDesc',
align: 'center'
},
{
title: '操作',
key: 'action',
width: 250,
align: 'center',
render: (h, params) => {
let info = (
<i-button type="primary" size="small" onClick={() => this.onClickInfo(params)}>查看明细</i-button>
);
let stock = (
<i-button type="primary" size="small" onClick={() => this.onClickStock(params)}>库存</i-button>
);
let stock = (
<i-button type="primary" size="small" onClick={() => this.onClickStock(params)}>库存</i-button>
);
return (
<div class="action-btn-row">
{info} {stock}
</div>
);
}
}
],
tableData: [],
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
return (
<div class="action-btn-row">
{info} {stock}
</div>
);
}
};
}
],
tableData: [],
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
}
};
}
... ...
... ... @@ -6,98 +6,98 @@
import moment from 'moment';
export default function() {
return {
tableCols: [
{
title: '商品编号',
key: 'productSku',
align: 'center'
},
{
title: '产品名称',
key: 'productName',
align: 'center'
},
{
title: '厂家编号',
key: 'factoryCode',
align: 'center',
},
{
title: '请购类型',
key: 'sellTypeName',
align: 'center',
},
{
title: '初期数量',
key: 'supplier90Sell',
align: 'center'
},
{
title: '进货数量',
key: 'supplier11Sell',
align: 'center'
},
{
title: '销售数量',
key: 'supplier30Sell',
align: 'center'
},
{
title: '销退数量',
key: 'supplier33Sell',
align: 'center'
},
{
title: '退供应商数量',
key: 'supplier10Sell',
align: 'center'
},
{
title: '其他出库数量',
key: 'supplier60Sell',
align: 'center'
},
{
title: '地面店出库数量',
key: 'supplier70Sell',
align: 'center'
},
{
title: '地面店入库数量',
key: 'supplier71Sell',
align: 'center'
},
{
title: '期末库存数量',
key: 'supplier100Sell',
align: 'center'
}
return {
tableCols: [
{
title: '商品编号',
key: 'productSku',
align: 'center'
},
{
title: '产品名称',
key: 'productName',
align: 'center'
},
{
title: '厂家编号',
key: 'factoryCode',
align: 'center',
},
{
title: '请购类型',
key: 'sellTypeName',
align: 'center',
},
{
title: '初期数量',
key: 'supplier90Sell',
align: 'center'
},
{
title: '进货数量',
key: 'supplier11Sell',
align: 'center'
},
{
title: '销售数量',
key: 'supplier30Sell',
align: 'center'
},
{
title: '销退数量',
key: 'supplier33Sell',
align: 'center'
},
{
title: '退供应商数量',
key: 'supplier10Sell',
align: 'center'
},
{
title: '其他出库数量',
key: 'supplier60Sell',
align: 'center'
},
{
title: '地面店出库数量',
key: 'supplier70Sell',
align: 'center'
},
{
title: '地面店入库数量',
key: 'supplier71Sell',
align: 'center'
},
{
title: '期末库存数量',
key: 'supplier100Sell',
align: 'center'
}
],
tableData: [],
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
},
filters: {
brandId: {
label: '品牌',
labelSpan: 6,
model: this.$route.query.brandId,
holder: '',
fieldSpan: 18
},
createTime: {
label: '创建时间',
labelSpan: 6,
model: [
new Date(+this.$route.query.begin * 1000),
new Date(moment(this.$route.query.begin * 1000).endOf('month').format('YYYY-MM-DD') + ' 00:00:00')
],
tableData: [],
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
},
filters: {
brandId: {
label: '品牌',
labelSpan: 6,
model: this.$route.query.brandId,
holder: '',
fieldSpan: 18
},
createTime: {
label: '创建时间',
labelSpan: 6,
model: [
new Date(+this.$route.query.begin * 1000),
new Date(moment(this.$route.query.begin * 1000).endOf('month').format('YYYY-MM-DD') + ' 00:00:00')
],
holder: '',
fieldSpan: 18
}
}
};
holder: '',
fieldSpan: 18
}
}
};
}
... ...
... ... @@ -3,8 +3,8 @@ import payment from './payment';
import print from './print';
import stock from './stock';
export default {
clearing,
payment,
print,
stock
clearing,
payment,
print,
stock
};
... ...
export default [{
path: '/payment.html',
name: 'payment',
component: () => import(/* webpackChunkName: "finance.payment" */'./payment'),
meta: {
pageName: '结算单'
}
path: '/payment.html',
name: 'payment',
component: () => import(/* webpackChunkName: "finance.payment" */'./payment'),
meta: {
pageName: '结算单'
}
}, {
path: '/detail.html',
name: 'detail',
component: () => import(/* webpackChunkName: "finance.payment" */'./detail'),
meta: {
pageName: '结算单详情'
}
path: '/detail.html',
name: 'detail',
component: () => import(/* webpackChunkName: "finance.payment" */'./detail'),
meta: {
pageName: '结算单详情'
}
}, {
path: '/stock.html',
name: 'stock',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./stock'),
meta: {
pageName: '库存'
}
path: '/stock.html',
name: 'stock',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./stock'),
meta: {
pageName: '库存'
}
}];
... ...
... ... @@ -4,115 +4,115 @@
* @date: 2017/07/11
*/
export default function() {
return {
tableCols: [
{
title: '产品编号',
key: 'productSku',
align: 'center'
},
{
title: '产品名称',
key: 'productName',
align: 'center',
},
{
title: '厂家编号',
key: 'factoryCode',
align: 'center',
},
{
title: '尺码',
key: 'sizeName',
align: 'center'
},
{
title: '结算金额',
key: 'salesAmount',
align: 'center'
},
{
title: '数量',
key: 'salesNums',
align: 'center'
},
{
title: '品牌',
key: 'brandName',
align: 'center'
},
{
title: '对账起止日期',
key: 'clearingInterval',
align: 'center'
}
],
tableData: [],
tableCols2: [
{
title: '产品编号',
key: 'productSku',
align: 'center'
},
{
title: '产品名称',
key: 'productName',
align: 'center',
},
{
title: '厂家编号',
key: 'factoryCode',
align: 'center',
},
{
title: '尺码',
key: 'sizeName',
align: 'center'
},
{
title: '结算金额',
key: 'salesAmount',
align: 'center'
},
{
title: '业务类型',
key: 'agencyTypeDesc',
align: 'center'
},
{
title: '品牌',
key: 'brandName',
align: 'center'
},
{
title: '对账起止日期',
key: 'clearingInterval',
align: 'center'
}
],
tableData2: [],
filters: {
sku: {
label: 'SKU',
labelSpan: 6,
model: this.$route.query.sku,
holder: '',
fieldSpan: 18
},
balanceId: {
label: '结算单号',
labelSpan: 6,
model: this.$route.query.balanceId,
holder: '',
fieldSpan: 18
},
brandId: {
label: '品牌',
labelSpan: 6,
model: this.$route.query.brandId,
holder: '',
fieldSpan: 18
}
}
};
return {
tableCols: [
{
title: '产品编号',
key: 'productSku',
align: 'center'
},
{
title: '产品名称',
key: 'productName',
align: 'center',
},
{
title: '厂家编号',
key: 'factoryCode',
align: 'center',
},
{
title: '尺码',
key: 'sizeName',
align: 'center'
},
{
title: '结算金额',
key: 'salesAmount',
align: 'center'
},
{
title: '数量',
key: 'salesNums',
align: 'center'
},
{
title: '品牌',
key: 'brandName',
align: 'center'
},
{
title: '对账起止日期',
key: 'clearingInterval',
align: 'center'
}
],
tableData: [],
tableCols2: [
{
title: '产品编号',
key: 'productSku',
align: 'center'
},
{
title: '产品名称',
key: 'productName',
align: 'center',
},
{
title: '厂家编号',
key: 'factoryCode',
align: 'center',
},
{
title: '尺码',
key: 'sizeName',
align: 'center'
},
{
title: '结算金额',
key: 'salesAmount',
align: 'center'
},
{
title: '业务类型',
key: 'agencyTypeDesc',
align: 'center'
},
{
title: '品牌',
key: 'brandName',
align: 'center'
},
{
title: '对账起止日期',
key: 'clearingInterval',
align: 'center'
}
],
tableData2: [],
filters: {
sku: {
label: 'SKU',
labelSpan: 6,
model: this.$route.query.sku,
holder: '',
fieldSpan: 18
},
balanceId: {
label: '结算单号',
labelSpan: 6,
model: this.$route.query.balanceId,
holder: '',
fieldSpan: 18
},
brandId: {
label: '品牌',
labelSpan: 6,
model: this.$route.query.brandId,
holder: '',
fieldSpan: 18
}
}
};
}
... ...
... ... @@ -4,92 +4,92 @@
* @date: 2017/07/11
*/
export default function() {
return {
tableCols: [
{
title: '结算单号',
key: 'balanceId',
align: 'center'
},
{
title: 'SKU',
key: 'productSku',
align: 'center'
},
{
title: '产品名称',
key: 'productName',
align: 'center',
},
{
title: '商家商品编码',
key: 'factoryCode',
align: 'center',
},
{
title: '尺码',
key: 'sizeName',
align: 'center'
},
{
title: '品牌',
key: 'brandName',
align: 'center'
},
{
title: '业务类型',
key: 'agencyTypeDesc',
align: 'center'
},
{
title: '数量',
key: 'salesNums',
align: 'center'
},
{
title: '结算金额',
key: 'salesAmount',
align: 'center'
},
{
title: '付款状态',
key: 'payerStatusDesc',
align: 'center'
},
{
title: '对账起止日期',
key: 'clearingInterval',
align: 'center'
}
],
tableData: [],
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
},
filters: {
sku: {
label: 'SKU',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
balanceId: {
label: '结算单号',
labelSpan: 6,
model: this.$route.query.balanceId,
holder: '',
fieldSpan: 18
},
brandId: {
label: '品牌',
labelSpan: 6,
model: this.$route.query.brandId,
holder: '',
fieldSpan: 18
},
}
};
return {
tableCols: [
{
title: '结算单号',
key: 'balanceId',
align: 'center'
},
{
title: 'SKU',
key: 'productSku',
align: 'center'
},
{
title: '产品名称',
key: 'productName',
align: 'center',
},
{
title: '商家商品编码',
key: 'factoryCode',
align: 'center',
},
{
title: '尺码',
key: 'sizeName',
align: 'center'
},
{
title: '品牌',
key: 'brandName',
align: 'center'
},
{
title: '业务类型',
key: 'agencyTypeDesc',
align: 'center'
},
{
title: '数量',
key: 'salesNums',
align: 'center'
},
{
title: '结算金额',
key: 'salesAmount',
align: 'center'
},
{
title: '付款状态',
key: 'payerStatusDesc',
align: 'center'
},
{
title: '对账起止日期',
key: 'clearingInterval',
align: 'center'
}
],
tableData: [],
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
},
filters: {
sku: {
label: 'SKU',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
balanceId: {
label: '结算单号',
labelSpan: 6,
model: this.$route.query.balanceId,
holder: '',
fieldSpan: 18
},
brandId: {
label: '品牌',
labelSpan: 6,
model: this.$route.query.brandId,
holder: '',
fieldSpan: 18
},
}
};
}
... ...
... ... @@ -3,27 +3,27 @@ let agoMonthFirstDay = new Date(date.getFullYear(), date.getMonth() - 1, 1);
let agoMonthLastDay = new Date(date.getFullYear(), date.getMonth(), 1);
export default {
filters: {
balanceId: {
label: '结算单号',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
brandId: {
label: '品牌',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
createTime: {
label: '创建时间',
labelSpan: 6,
model: [agoMonthFirstDay, agoMonthLastDay],
holder: '',
fieldSpan: 18
}
filters: {
balanceId: {
label: '结算单号',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
brandId: {
label: '品牌',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
createTime: {
label: '创建时间',
labelSpan: 6,
model: [agoMonthFirstDay, agoMonthLastDay],
holder: '',
fieldSpan: 18
}
}
};
... ...
... ... @@ -7,75 +7,75 @@
import moment from 'moment';
export default function() {
return {
tableCols: [
{
title: '对账单号',
key: 'balanceId',
align: 'center'
},
{
title: '生成日期',
key: 'createTimeString',
align: 'center',
render: function(h, params) {
let time = moment.unix(params.row.createTime);
return {
tableCols: [
{
title: '对账单号',
key: 'balanceId',
align: 'center'
},
{
title: '生成日期',
key: 'createTimeString',
align: 'center',
render(h, params) {
let time = moment.unix(params.row.createTime);
return (
<div>
<div> {time.format('YYYY/MM/DD')} </div>
<div> {time.format('HH:mm:ss')} </div>
</div>
);
}
},
{
title: '结算周期',
key: 'clearingCycle',
align: 'center',
},
{
title: '品牌',
key: 'brandName',
align: 'center',
},
{
title: '供应商',
key: 'supplierName',
align: 'center'
},
{
title: '应收金额',
key: 'clearingAmount',
align: 'center'
},
{
title: '操作',
key: 'action',
width: 250,
align: 'center',
render: (h, params) => {
let info = (
<i-button type="primary" size="small" onClick={() => this.onClickInfo(params)}>查看明细</i-button>
);
return (
<div>
<div> {time.format('YYYY/MM/DD')} </div>
<div> {time.format('HH:mm:ss')} </div>
</div>
);
}
},
{
title: '结算周期',
key: 'clearingCycle',
align: 'center',
},
{
title: '品牌',
key: 'brandName',
align: 'center',
},
{
title: '供应商',
key: 'supplierName',
align: 'center'
},
{
title: '应收金额',
key: 'clearingAmount',
align: 'center'
},
{
title: '操作',
key: 'action',
width: 250,
align: 'center',
render: (h, params) => {
let info = (
<i-button type="primary" size="small" onClick={() => this.onClickInfo(params)}>查看明细</i-button>
);
let stock = (
<i-button type="primary" size="small" onClick={() => this.onClickStock(params)}>库存</i-button>
);
let stock = (
<i-button type="primary" size="small" onClick={() => this.onClickStock(params)}>库存</i-button>
);
return (
<div class="action-btn-row">
{info} {stock}
</div>
);
}
}
],
tableData: [],
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
return (
<div class="action-btn-row">
{info} {stock}
</div>
);
}
};
}
],
tableData: [],
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
}
};
}
... ...
... ... @@ -5,98 +5,98 @@
*/
import moment from 'moment';
export default function() {
return {
tableCols: [
{
title: '商品编号',
key: 'productSku',
align: 'center'
},
{
title: '产品名称',
key: 'productName',
align: 'center'
},
{
title: '厂家编号',
key: 'factoryCode',
align: 'center',
},
{
title: '请购类型',
key: 'sellTypeName',
align: 'center',
},
{
title: '初期数量',
key: 'supplier90Sell',
align: 'center'
},
{
title: '进货数量',
key: 'supplier11Sell',
align: 'center'
},
{
title: '销售数量',
key: 'supplier30Sell',
align: 'center'
},
{
title: '销退数量',
key: 'supplier33Sell',
align: 'center'
},
{
title: '退供应商数量',
key: 'supplier10Sell',
align: 'center'
},
{
title: '其他出库数量',
key: 'supplier60Sell',
align: 'center'
},
{
title: '地面店出库数量',
key: 'supplier70Sell',
align: 'center'
},
{
title: '地面店入库数量',
key: 'supplier71Sell',
align: 'center'
},
{
title: '期末库存数量',
key: 'supplier100Sell',
align: 'center'
}
return {
tableCols: [
{
title: '商品编号',
key: 'productSku',
align: 'center'
},
{
title: '产品名称',
key: 'productName',
align: 'center'
},
{
title: '厂家编号',
key: 'factoryCode',
align: 'center',
},
{
title: '请购类型',
key: 'sellTypeName',
align: 'center',
},
{
title: '初期数量',
key: 'supplier90Sell',
align: 'center'
},
{
title: '进货数量',
key: 'supplier11Sell',
align: 'center'
},
{
title: '销售数量',
key: 'supplier30Sell',
align: 'center'
},
{
title: '销退数量',
key: 'supplier33Sell',
align: 'center'
},
{
title: '退供应商数量',
key: 'supplier10Sell',
align: 'center'
},
{
title: '其他出库数量',
key: 'supplier60Sell',
align: 'center'
},
{
title: '地面店出库数量',
key: 'supplier70Sell',
align: 'center'
},
{
title: '地面店入库数量',
key: 'supplier71Sell',
align: 'center'
},
{
title: '期末库存数量',
key: 'supplier100Sell',
align: 'center'
}
],
tableData: [],
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
},
filters: {
brandId: {
label: '品牌',
labelSpan: 6,
model: this.$route.query.brandId,
holder: '',
fieldSpan: 18
},
createTime: {
label: '创建时间',
labelSpan: 6,
model: [
new Date(+this.$route.query.begin * 1000),
new Date(moment(this.$route.query.begin * 1000).endOf('month').format('YYYY-MM-DD') + ' 00:00:00')
],
tableData: [],
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
},
filters: {
brandId: {
label: '品牌',
labelSpan: 6,
model: this.$route.query.brandId,
holder: '',
fieldSpan: 18
},
createTime: {
label: '创建时间',
labelSpan: 6,
model: [
new Date(+this.$route.query.begin * 1000),
new Date(moment(this.$route.query.begin * 1000).endOf('month').format('YYYY-MM-DD') + ' 00:00:00')
],
holder: '',
fieldSpan: 18
}
}
};
holder: '',
fieldSpan: 18
}
}
};
}
... ...
export default [{
path: '/payment/detail.html',
name: 'printdetail',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./payment-print-detail'),
meta: {
pageName: '结算单详情打印'
}
path: '/payment/detail.html',
name: 'printdetail',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./payment-print-detail'),
meta: {
pageName: '结算单详情打印'
}
}, {
path: '/payment/stock.html',
name: 'printPaymentStock',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./payment-print-stock'),
meta: {
pageName: '结算单库存打印'
}
path: '/payment/stock.html',
name: 'printPaymentStock',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./payment-print-stock'),
meta: {
pageName: '结算单库存打印'
}
}, {
path: '/clearing/stock.html',
name: 'printClearingStock',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./clearing-print-stock'),
meta: {
pageName: '对账单库存打印'
}
path: '/clearing/stock.html',
name: 'printClearingStock',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./clearing-print-stock'),
meta: {
pageName: '对账单库存打印'
}
}];
... ...
export default [{
path: '/stock.html',
name: 'stock',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./stock'),
meta: {
pageName: '库存'
}
path: '/stock.html',
name: 'stock',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./stock'),
meta: {
pageName: '库存'
}
}];
... ...
export default {
filters: {
brandId: {
label: '品牌',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
createTime: {
label: '创建时间',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
}
filters: {
brandId: {
label: '品牌',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
createTime: {
label: '创建时间',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
}
}
};
... ...
... ... @@ -4,87 +4,87 @@
* @date: 2017/07/13
*/
export default function() {
return {
tableCols: [
{
title: '商品编号',
key: '',
align: 'center'
},
{
title: '产品名称',
key: 'productName',
align: 'center'
},
{
title: '厂家编号',
key: '',
align: 'center',
},
{
title: '请购类型',
key: '',
align: 'center',
},
{
title: '初期数量',
key: 'supplier90Sell',
align: 'center'
},
{
title: '进货数量',
key: 'supplier11Sell',
align: 'center'
},
{
title: '销售数量',
key: 'supplier30Sell',
align: 'center'
},
{
title: '销退数量',
key: 'supplier33Sell',
align: 'center'
},
{
title: '退供应商数量',
key: 'supplier10Sell',
align: 'center'
},
{
title: '其他出库数量',
key: 'supplier60Sell',
align: 'center'
},
{
title: '地面店出库数量',
key: 'supplier70Sell',
align: 'center',
width: 150
},
{
title: '地面店入库数量',
key: 'supplier71Sell',
align: 'center',
width: 150
},
{
title: '期末库存数量',
key: 'supplier100Sell',
align: 'center'
},
{
title: '库房',
key: '',
align: 'center'
}
],
tableData: [],
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
},
curDay: Math.round(new Date().getTime() / 1000)
};
return {
tableCols: [
{
title: '商品编号',
key: '',
align: 'center'
},
{
title: '产品名称',
key: 'productName',
align: 'center'
},
{
title: '厂家编号',
key: '',
align: 'center',
},
{
title: '请购类型',
key: '',
align: 'center',
},
{
title: '初期数量',
key: 'supplier90Sell',
align: 'center'
},
{
title: '进货数量',
key: 'supplier11Sell',
align: 'center'
},
{
title: '销售数量',
key: 'supplier30Sell',
align: 'center'
},
{
title: '销退数量',
key: 'supplier33Sell',
align: 'center'
},
{
title: '退供应商数量',
key: 'supplier10Sell',
align: 'center'
},
{
title: '其他出库数量',
key: 'supplier60Sell',
align: 'center'
},
{
title: '地面店出库数量',
key: 'supplier70Sell',
align: 'center',
width: 150
},
{
title: '地面店入库数量',
key: 'supplier71Sell',
align: 'center',
width: 150
},
{
title: '期末库存数量',
key: 'supplier100Sell',
align: 'center'
},
{
title: '库房',
key: '',
align: 'center'
}
],
tableData: [],
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
},
curDay: Math.round(new Date().getTime() / 1000)
};
}
... ...
import overview from './overview';
export default {
overview
overview
};
... ...
export default {
path: '/overview.html',
name: 'overview',
component: () => import(/* webpackChunkName: "home.overview" */'./overview'),
path: '/overview.html',
name: 'overview',
component: () => import(/* webpackChunkName: "home.overview" */'./overview'),
};
... ...
... ... @@ -9,13 +9,13 @@ import user from './user';
import kol from './kol';
export default {
product,
home,
shop,
repository,
statistics,
finance,
trade,
user,
kol
product,
home,
shop,
repository,
statistics,
finance,
trade,
user,
kol
};
... ...
import Price from './price';
export {
Price,
Price,
};
... ...
export default {
path: '/list.html',
name: 'list',
component: () => import(/* webpackChunkName: "kol.candidate-list" */'./candidate-list'),
meta: {
pageName: '我的商品库'
}
path: '/list.html',
name: 'list',
component: () => import(/* webpackChunkName: "kol.candidate-list" */'./candidate-list'),
meta: {
pageName: '我的商品库'
}
};
... ...
... ... @@ -6,9 +6,9 @@ import settlementList from './settlement-list';
import settlementDetail from './settlement-detail';
export default {
sell,
candidate,
profile,
reconciliation,
settlement: [settlementList, settlementDetail]
sell,
candidate,
profile,
reconciliation,
settlement: [settlementList, settlementDetail]
};
... ...
export default {
path: '/index.html',
name: 'index',
component: () => import(/* webpackChunkName: "kol.candidate-list" */'./profile'),
meta: {
pageName: '帐户信息'
}
path: '/index.html',
name: 'index',
component: () => import(/* webpackChunkName: "kol.candidate-list" */'./profile'),
meta: {
pageName: '帐户信息'
}
};
... ...
import Confirm from './confirm.vue';
export {
Confirm
Confirm
};
... ...
export default {
path: '/list.html',
name: 'list',
component: () => import(/* webpackChunkName: "kol.reconciliation" */'./list'),
meta: {
pageName: '对帐单管理'
}
path: '/list.html',
name: 'list',
component: () => import(/* webpackChunkName: "kol.reconciliation" */'./list'),
meta: {
pageName: '对帐单管理'
}
};
... ...
import Demo from './demo';
export {
Demo
Demo
};
... ...
export default {
path: '/list.html',
name: 'list',
component: () => import(/* webpackChunkName: "kol.sell-list" */'./sell-list'),
meta: {
pageName: '我的推广商品'
}
path: '/list.html',
name: 'list',
component: () => import(/* webpackChunkName: "kol.sell-list" */'./sell-list'),
meta: {
pageName: '我的推广商品'
}
};
... ...
import Demo from './demo';
export {
Demo
Demo
};
... ...
export default {
path: '/detail/:id.html',
name: 'detail',
component: () => import(/* webpackChunkName: "kol.settlement-detail" */'./settlement-detail'),
meta: {
pageName: '结算单详情'
}
path: '/detail/:id.html',
name: 'detail',
component: () => import(/* webpackChunkName: "kol.settlement-detail" */'./settlement-detail'),
meta: {
pageName: '结算单详情'
}
};
... ...
import Demo from './demo';
export {
Demo
Demo
};
... ...
export default {
path: '/list.html',
name: 'list',
component: () => import(/* webpackChunkName: "kol.Settlement-list" */'./settlement-list'),
meta: {
pageName: '结算单管理'
}
path: '/list.html',
name: 'list',
component: () => import(/* webpackChunkName: "kol.Settlement-list" */'./settlement-list'),
meta: {
pageName: '结算单管理'
}
};
... ...
... ... @@ -2,24 +2,24 @@
* Created by TaoHuang on 2017/4/18.
*/
export default [{
path: 'step1.html',
name: 'step1',
component: () => import(/* webpackChunkName: "product.create" */'./step1'),
meta: {
pageName: '类目选择',
}
path: 'step1.html',
name: 'step1',
component: () => import(/* webpackChunkName: "product.create" */'./step1'),
meta: {
pageName: '类目选择',
}
}, {
path: 'step2.html',
name: 'step2',
component: () => import(/* webpackChunkName: "product.create" */'./step2'),
meta: {
pageName: '基础信息',
}
path: 'step2.html',
name: 'step2',
component: () => import(/* webpackChunkName: "product.create" */'./step2'),
meta: {
pageName: '基础信息',
}
}, {
path: 'step3.html',
name: 'step3',
component: () => import(/* webpackChunkName: "product.create" */'./step3'),
meta: {
pageName: '网销信息',
}
path: 'step3.html',
name: 'step3',
component: () => import(/* webpackChunkName: "product.create" */'./step3'),
meta: {
pageName: '网销信息',
}
}];
... ...
... ... @@ -5,11 +5,11 @@
import childrenViews from './components';
export default {
path: '/create',
name: 'create',
component: () => import(/* webpackChunkName: "product.create" */'./create'),
children: childrenViews,
meta: {
pageName: '发布新商品',
}
path: '/create',
name: 'create',
component: () => import(/* webpackChunkName: "product.create" */'./create'),
children: childrenViews,
meta: {
pageName: '发布新商品',
}
};
... ...
... ... @@ -3,35 +3,35 @@
*/
export default function() {
return {
step: {
value: 0
},
product: {
brandId: '',
brandName: '',
maxSortId: '',
maxSortName: '',
middleSortId: '',
middleSortName: '',
smallSortId: '',
smallSortName: '',
sortName: '',
productName: '',
phrase: '',
factoryCode: '',
goodsYears: new Date().getFullYear().toString(),
goodsSeason: '',
gender: '',
seasons: '',
expectSaleTimeStr: '',
ageLevel: '',
retailPrice: '',
salesPrice: '',
sellerGoodsInfoStr: '',
selectSize: [],
selectColor: [],
sellType: ''
}
};
return {
step: {
value: 0
},
product: {
brandId: '',
brandName: '',
maxSortId: '',
maxSortName: '',
middleSortId: '',
middleSortName: '',
smallSortId: '',
smallSortName: '',
sortName: '',
productName: '',
phrase: '',
factoryCode: '',
goodsYears: new Date().getFullYear().toString(),
goodsSeason: '',
gender: '',
seasons: '',
expectSaleTimeStr: '',
ageLevel: '',
retailPrice: '',
salesPrice: '',
sellerGoodsInfoStr: '',
selectSize: [],
selectColor: [],
sellType: ''
}
};
}
... ...
... ... @@ -8,8 +8,8 @@ import step2 from './step2';
import step3 from './step3';
export {
create,
step1,
step2,
step3
create,
step1,
step2,
step3
};
... ...
... ... @@ -2,51 +2,50 @@
* Created by TaoHuang on 2017/6/20.
*/
export default function() {
const validateEmpty = (rule, value, callback) => {
if (!value) {
return callback(new Error('品牌不能为空'));
}
callback();
};
const validateValue = (rule, value, callback) => {
let max = value[0];
let mid = value[1];
let min = value[2];
if (!max || !max.value) {
return callback(new Error('一级类目不能为空'));
} else if (!mid.value) {
return callback(new Error('二级类目不能为空'));
} else if (!min.value) {
return callback(new Error('三级类目不能为空'));
} else {
return callback();
}
};
return {
brands: [],
formData: {
brandId: '',
sortId: [],
sellType: ''
},
ruleValidate: {
brandId: [
{ required: true, message: '品牌不能为空', trigger: 'change', validator: validateEmpty}
],
sellType: [
{ required: true, message: '销售类型不能为空', trigger: 'change', validator: validateEmpty}
],
sortId: [
{ required: true, trigger: 'NONE', validator: validateValue},
],
}
};
const validateEmpty = (rule, value, callback) => {
if (!value) {
return callback(new Error('品牌不能为空'));
}
callback();
};
const validateValue = (rule, value, callback) => {
let max = value[0];
let mid = value[1];
let min = value[2];
if (!max || !max.value) {
return callback(new Error('一级类目不能为空'));
} else if (!mid.value) {
return callback(new Error('二级类目不能为空'));
} else if (!min.value) {
return callback(new Error('三级类目不能为空'));
} else {
return callback();
}
};
return {
brands: [],
formData: {
brandId: '',
sortId: [],
sellType: ''
},
ruleValidate: {
brandId: [
{ required: true, message: '品牌不能为空', trigger: 'change', validator: validateEmpty}
],
sellType: [
{ required: true, message: '销售类型不能为空', trigger: 'change', validator: validateEmpty}
],
sortId: [
{ required: true, trigger: 'NONE', validator: validateValue},
],
}
};
}
... ...
... ... @@ -5,101 +5,101 @@
import _ from 'lodash';
export default function() {
const validateEmpty = (rule, value, callback) => {
if (!value) {
return callback(new Error());
} else {
return callback();
}
};
const validateEmpty = (rule, value, callback) => {
if (!value) {
return callback(new Error());
} else {
return callback();
}
};
const validateMustLessRetailPrice = (rule, value, callback) => {
if (!value) {
return callback(new Error('不能为空'));
}
const validateMustLessRetailPrice = (rule, value, callback) => {
if (!value) {
return callback(new Error('不能为空'));
}
if (!Number.isInteger(value)) {
return callback(new Error('请输入数字值'));
}
if (value > +this.product.retailPrice) {
return callback(new Error('必须小于等于吊牌价'));
}
return callback();
};
if (!Number.isInteger(value)) {
return callback(new Error('请输入数字值'));
}
if (value > +this.product.retailPrice) {
return callback(new Error('必须小于等于吊牌价'));
}
return callback();
};
const validateRetailPrice = (rule, value, callback) => {
if (!value) {
return callback(new Error('不能为空'));
}
const validateRetailPrice = (rule, value, callback) => {
if (!value) {
return callback(new Error('不能为空'));
}
if (!Number.isInteger(value)) {
return callback(new Error('请输入整数,不能有小数点'));
}
if (value > 99999) {
return callback(new Error('价格不能大于5位'));
}
return callback();
};
if (!Number.isInteger(value)) {
return callback(new Error('请输入整数,不能有小数点'));
}
if (value > 99999) {
return callback(new Error('价格不能大于5位'));
}
return callback();
};
const validateColor = (rule, value, callback) => {
if (_.isEmpty(value)) {
return callback(new Error('颜色不能为空'));
}
return callback();
};
const validateColor = (rule, value, callback) => {
if (_.isEmpty(value)) {
return callback(new Error('颜色不能为空'));
}
return callback();
};
const validateSize = (rule, value, callback) => {
if (_.isEmpty(value)) {
return callback(new Error('尺码不能为空'));
}
return callback();
};
const validateSize = (rule, value, callback) => {
if (_.isEmpty(value)) {
return callback(new Error('尺码不能为空'));
}
return callback();
};
return {
colors: [],
table: {
data: [],
selectedSizes: [],
selectedColors: [],
showValidateColor: false,
showValidateSize: false,
showValidateOtherProp: false,
showValidateTable: false,
},
ruleValidate: {
productName: [
{ required: true, message: '商品名不能为空', trigger: 'blur'}
],
goodsYears: [
{ required: true, message: '货品年不能为空', trigger: 'change', type: 'string'}
],
goodsSeason: [
{ required: true, message: '货品季不能为空', trigger: 'change', validator: validateEmpty}
],
expectSaleTimeStr: [
{ required: true, message: '请选择日期', trigger: 'change', type: 'string'}
],
gender: [
{ required: true, message: '请选择性别', trigger: 'change'}
],
seasons: [
{ required: true, message: '不能为空', trigger: 'change'}
],
ageLevel: [
{ required: true, message: '不能为空', trigger: 'change'}
],
retailPrice: [
{ required: true, trigger: 'blur', validator: validateRetailPrice},
],
salesPrice: [
{ required: true, trigger: 'blur', validator: validateMustLessRetailPrice},
],
selectColor: [
{ required: true, trigger: 'NONE', validator: validateColor},
],
selectSize: [
{ required: true, trigger: 'NONE', validator: validateSize},
],
},
};
return {
colors: [],
table: {
data: [],
selectedSizes: [],
selectedColors: [],
showValidateColor: false,
showValidateSize: false,
showValidateOtherProp: false,
showValidateTable: false,
},
ruleValidate: {
productName: [
{ required: true, message: '商品名不能为空', trigger: 'blur'}
],
goodsYears: [
{ required: true, message: '货品年不能为空', trigger: 'change', type: 'string'}
],
goodsSeason: [
{ required: true, message: '货品季不能为空', trigger: 'change', validator: validateEmpty}
],
expectSaleTimeStr: [
{ required: true, message: '请选择日期', trigger: 'change', type: 'string'}
],
gender: [
{ required: true, message: '请选择性别', trigger: 'change'}
],
seasons: [
{ required: true, message: '不能为空', trigger: 'change'}
],
ageLevel: [
{ required: true, message: '不能为空', trigger: 'change'}
],
retailPrice: [
{ required: true, trigger: 'blur', validator: validateRetailPrice},
],
salesPrice: [
{ required: true, trigger: 'blur', validator: validateMustLessRetailPrice},
],
selectColor: [
{ required: true, trigger: 'NONE', validator: validateColor},
],
selectSize: [
{ required: true, trigger: 'NONE', validator: validateSize},
],
},
};
}
... ...
... ... @@ -3,15 +3,15 @@
*/
export default function() {
return {
desc: '',
model: {
goodsImagesReqStr: [],
productStandardRelationStr: [],
attributeProValuesOne: [],
attributeProValuesTwo: [],
productMaterial: {}
},
showExample: false
};
return {
desc: '',
model: {
goodsImagesReqStr: [],
productStandardRelationStr: [],
attributeProValuesOne: [],
attributeProValuesTwo: [],
productMaterial: {}
},
showExample: false
};
}
... ...
... ... @@ -2,10 +2,10 @@
* Created by TaoHuang on 2017/4/26.
*/
export default {
path: '/edit/:id.html',
name: 'edit',
component: () => import(/* webpackChunkName: "product.edit" */'./edit'),
meta: {
pageName: '商品编辑',
}
path: '/edit/:id.html',
name: 'edit',
component: () => import(/* webpackChunkName: "product.edit" */'./edit'),
meta: {
pageName: '商品编辑',
}
};
... ...
export default function() {
return {
form: '',
showLoading: true,
btnFixClass: {fix: true},
btnFixStyle: {},
product: {
seasons: '',
productIntro: ''
},
table: {
data: [],
defaultSelectedSizes: [],
defaultSelectedColors: [],
},
desc: '',
model: {
goodsImagesReqStr: [],
productStandardRelationStr: [],
attributeProValuesOne: [],
attributeProValuesTwo: [],
productMaterial: {}
},
ruleValidate: {
productName: [
{required: true, message: '商品名不能为空', trigger: 'blur'}
],
phrase: [
{required: true, message: '商品卖点不能为空', trigger: 'blur'}
],
expectSaleTimeStr: [
{required: true, message: '上市时间不能为空', trigger: 'change'}
],
seasons: [
{required: true, message: '适销季不能为空', trigger: 'change'}
],
ageLevel: [
{required: true, message: '年龄层不能为空', trigger: 'change'}
]
},
colors: [],
sizes: []
};
return {
form: '',
showLoading: true,
btnFixClass: {fix: true},
btnFixStyle: {},
product: {
seasons: '',
productIntro: ''
},
table: {
data: [],
defaultSelectedSizes: [],
defaultSelectedColors: [],
},
desc: '',
model: {
goodsImagesReqStr: [],
productStandardRelationStr: [],
attributeProValuesOne: [],
attributeProValuesTwo: [],
productMaterial: {}
},
ruleValidate: {
productName: [
{required: true, message: '商品名不能为空', trigger: 'blur'}
],
phrase: [
{required: true, message: '商品卖点不能为空', trigger: 'blur'}
],
expectSaleTimeStr: [
{required: true, message: '上市时间不能为空', trigger: 'change'}
],
seasons: [
{required: true, message: '适销季不能为空', trigger: 'change'}
],
ageLevel: [
{required: true, message: '年龄层不能为空', trigger: 'change'}
]
},
colors: [],
sizes: []
};
}
... ...
import edit from './edit';
export {
edit
edit
};
... ...
export default {
path: '/feedback.html',
name: 'feedback',
component: () => import(/* webpackChunkName: "product.feedback" */'./feedback'),
meta: {
pageName: '商品咨询'
}
path: '/feedback.html',
name: 'feedback',
component: () => import(/* webpackChunkName: "product.feedback" */'./feedback'),
meta: {
pageName: '商品咨询'
}
};
... ...
... ... @@ -6,216 +6,216 @@
import CellInfo from 'components/cell/cell-info';
export default function() {
return {
categoryValue: [],
tableCols: [
return {
categoryValue: [],
tableCols: [
{
title: 'SKN',
key: 'productSKN',
align: 'center',
},
{
title: '商品信息',
align: 'center',
render: (h, params) => {
const row = params.row;
const infoItems = [
{
title: 'SKN',
key: 'productSKN',
align: 'center',
type: 'link',
label: row.productName,
value: `//item.yohobuy.com/${row.productSKN}.html`
},
{
title: '商品信息',
align: 'center',
render: (h, params) => {
const row = params.row;
const infoItems = [
{
type: 'link',
label: row.productName,
value: `//item.yohobuy.com/${row.productSKN}.html`
},
{
label: '品牌',
value: row.brandName
}, {
label: '品类',
value: `${row.maxSortName}/${row.middleSortName}/${row.smallSortName}`
}
];
label: '品牌',
value: row.brandName
}, {
label: '品类',
value: `${row.maxSortName}/${row.middleSortName}/${row.smallSortName}`
}
];
return h(CellInfo, {
props: {
items: infoItems
}
});
}
},
{
title: '商品图片',
key: 'image',
width: 120,
align: 'center',
render: (h, params) => {
return (
<img v-prod-img={params.row.productSKN}/>
);
}
},
{
title: '咨询内容',
key: 'ask',
align: 'center'
},
{
title: '回复内容',
align: 'center',
render: (h, params) => {
let answer = params.row.answer;
return h(CellInfo, {
props: {
items: infoItems
}
});
}
},
{
title: '商品图片',
key: 'image',
width: 120,
align: 'center',
render: (h, params) => {
return (
<img v-prod-img={params.row.productSKN}/>
);
}
},
{
title: '咨询内容',
key: 'ask',
align: 'center'
},
{
title: '回复内容',
align: 'center',
render: (h, params) => {
let answer = params.row.answer;
if (answer.length > 0) {
return <span>{answer}</span>;
} else {
return <span></span>;;
}
}
},
if (answer.length > 0) {
return <span>{answer}</span>;
} else {
return <span></span>;
}
}
},
// {
// title: '回复人',
// align: 'center',
// render: (h, params) => {
// let answerUserName = params.row.answerUserName;
//
// if (answerUserName) {
// return params.row.answerUserName;
// } else {
// return '—';
// }
// },
// },
{
title: '咨询及回复时间',
key: 'image',
align: 'left',
render: (h, params) => {
const row = params.row;
// {
// title: '回复人',
// align: 'center',
// render: (h, params) => {
// let answerUserName = params.row.answerUserName;
//
// if (answerUserName) {
// return params.row.answerUserName;
// } else {
// return '—';
// }
// },
// },
{
title: '咨询及回复时间',
key: 'image',
align: 'left',
render: (h, params) => {
const row = params.row;
return (
<div>
<p>咨询:{row.askTimeStr.length > 0 ? row.askTimeStr : '—'}</p>
<p>{row.answerTimeStr.length > 0 ? `回复:${row.answerTimeStr}` : ''}</p>
</div>
);
}
},
return (
<div>
<p>咨询:{row.askTimeStr.length > 0 ? row.askTimeStr : '—'}</p>
<p>{row.answerTimeStr.length > 0 ? `回复:${row.answerTimeStr}` : ''}</p>
</div>
);
}
},
// {
// title: '操作',
// key: 'action',
// align: 'center',
// render: (h, params) => {
// const row = params.row;
//
// let status = row.operateFlag;
//
// if (status === 2) {
// return (
// <div class="cell-action-row">
// <i-button type="error" size="small"
// onClick={() => this.editAnswer(row)}>
// 修改
// </i-button>
// </div>
// );
// } else if (status === 0) {
// return (
// <div class="cell-action-row">
// <i-button type="primary" size="small"
// onClick={() => this.editAnswer(row)}>
// 回复
// </i-button>
// </div>
// );
// } else if (status === 1) {
// return (
// <div class="cell-action-row">
// <i-button type="error" size="small" style="backgroundColor: #999;border-color: #999;cursor: not-allowed;">
// 修改
// </i-button>
// </div>
// );
// }
// },
// }
],
tableData: [],
pageData: {
total: 0,
current: 1,
pageSize: 20
},
filters: {
productSKN: {
label: 'SKN',
model: '',
holder: ''
},
prodName: {
label: '商品名称',
model: '',
holder: ''
},
brandId: {
label: '选择品牌',
model: ''
},
// {
// title: '操作',
// key: 'action',
// align: 'center',
// render: (h, params) => {
// const row = params.row;
//
// let status = row.operateFlag;
//
// if (status === 2) {
// return (
// <div class="cell-action-row">
// <i-button type="error" size="small"
// onClick={() => this.editAnswer(row)}>
// 修改
// </i-button>
// </div>
// );
// } else if (status === 0) {
// return (
// <div class="cell-action-row">
// <i-button type="primary" size="small"
// onClick={() => this.editAnswer(row)}>
// 回复
// </i-button>
// </div>
// );
// } else if (status === 1) {
// return (
// <div class="cell-action-row">
// <i-button type="error" size="small" style="backgroundColor: #999;border-color: #999;cursor: not-allowed;">
// 修改
// </i-button>
// </div>
// );
// }
// },
// }
],
tableData: [],
pageData: {
total: 0,
current: 1,
pageSize: 20
},
filters: {
productSKN: {
label: 'SKN',
model: '',
holder: ''
},
prodName: {
label: '商品名称',
model: '',
holder: ''
},
brandId: {
label: '选择品牌',
model: ''
},
// answerUserName: {
// label: '回复人',
// model: ''
// },
sort: {
first: {
label: '选择类目',
holder: '选择一级类目',
model: ''
},
second: {
label: '二级类目',
holder: '选择二级类目',
model: ''
},
third: {
label: '三级类目',
holder: '选择三级类目',
model: ''
}
},
isReply: {
label: '是否回复',
model: '',
options: [
{
value: 1,
label: '已回复'
},
{
value: 2,
label: '未回复'
}
]
},
askTimeStr: {
label: '咨询时间',
model: ''
},
askStartTime: {
model: ''
},
askEndTime: {
model: ''
},
answerTimeStr: {
label: '回复时间',
model: ''
},
answerStartTime: {
model: ''
},
answerEndTime: {
model: ''
},
// answerUserName: {
// label: '回复人',
// model: ''
// },
sort: {
first: {
label: '选择类目',
holder: '选择一级类目',
model: ''
},
second: {
label: '二级类目',
holder: '选择二级类目',
model: ''
},
third: {
label: '三级类目',
holder: '选择三级类目',
model: ''
}
};
},
isReply: {
label: '是否回复',
model: '',
options: [
{
value: 1,
label: '已回复'
},
{
value: 2,
label: '未回复'
}
]
},
askTimeStr: {
label: '咨询时间',
model: ''
},
askStartTime: {
model: ''
},
askEndTime: {
model: ''
},
answerTimeStr: {
label: '回复时间',
model: ''
},
answerStartTime: {
model: ''
},
answerEndTime: {
model: ''
},
}
};
}
... ...
... ... @@ -7,12 +7,12 @@ import output from './output';
import feedback from './feedback';
import share from './share';
export default {
create,
edit,
onsale,
offsale,
vips,
output,
feedback,
share
create,
edit,
onsale,
offsale,
vips,
output,
feedback,
share
};
... ...
export default {
path: '/offsale.html',
name: 'offsale',
component: () => import(/* webpackChunkName: "product.offsale" */'./offsale'),
meta: {
pageName: '未上架商品'
}
path: '/offsale.html',
name: 'offsale',
component: () => import(/* webpackChunkName: "product.offsale" */'./offsale'),
meta: {
pageName: '未上架商品'
}
};
... ...
... ... @@ -8,269 +8,269 @@ import CellInfo from 'components/cell/cell-info';
import CellPrice from 'components/cell/cell-price';
const auditStatus = {
0: '新品未上架',
1: '上架待审核',
2: '上架驳回',
3: '已下架'
0: '新品未上架',
1: '上架待审核',
2: '上架驳回',
3: '已下架'
};
export default function() {
return {
batchOnSale: [],
useFilterSign: false,
showSizeEdit: false,
categoryValue: [],
filters: {
sknCode: {
label: 'SKN编码',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
return {
batchOnSale: [],
useFilterSign: false,
showSizeEdit: false,
categoryValue: [],
filters: {
sknCode: {
label: 'SKN编码',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
prodCode: {
label: '商家编码',
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
},
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: ''
}
},
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: ''
},
brand: {
label: '选择品牌',
labelSpan: 6,
fieldSpan: 18,
model: ''
},
verifyStatus: {
label: '审核状态',
labelSpan: 6,
fieldSpan: 18,
model: '',
options: [
{
value: 1,
label: '上架待审核'
},
{
value: 2,
label: '上架驳回'
}
]
},
verifyStatus: {
label: '审核状态',
labelSpan: 6,
fieldSpan: 18,
model: '',
options: [
{
value: 1,
label: '上架待审核'
},
{
value: 2,
label: '上架驳回'
}
]
},
stockStatus: {
label: '库存情况',
labelSpan: 6,
fieldSpan: 18,
model: '',
options: [
{
value: 1,
label: '有库存'
},
{
value: 0,
label: '无库存'
}
]
},
stockStatus: {
label: '库存情况',
labelSpan: 6,
fieldSpan: 18,
model: '',
options: [
{
value: 1,
label: '有库存'
},
{
value: 0,
label: '无库存'
}
]
},
publishStatus: {
label: '商品状态',
labelSpan: 6,
fieldSpan: 18,
model: '',
options: [
{
value: 0,
label: '新品未上架'
},
{
value: 1,
label: '我下架的'
}
]
publishStatus: {
label: '商品状态',
labelSpan: 6,
fieldSpan: 18,
model: '',
options: [
{
value: 0,
label: '新品未上架'
},
{
value: 1,
label: '我下架的'
}
]
}
},
tableCols: [
{
type: 'selection',
width: 60,
align: 'center'
},
{
title: '商品图片',
key: 'image',
width: 120,
align: 'center',
render: (h, params) => {
return h(CellImage, {
props: {
imageSrc: params.row.picImgUrl,
productUrl: params.row.productUrl
}
},
tableCols: [
{
type: 'selection',
width: 60,
align: 'center'
},
{
title: '商品图片',
key: 'image',
width: 120,
align: 'center',
render: (h, params) => {
return h(CellImage, {
props: {
imageSrc: params.row.picImgUrl,
productUrl: params.row.productUrl
}
});
}
},
});
}
},
{
title: '商品信息',
key: 'info',
align: 'center',
render: (h, params) => {
const row = params.row;
const infoItems = [
{
title: '商品信息',
key: 'info',
align: 'center',
render: (h, params) => {
const row = params.row;
const infoItems = [
{
label: 'SKN',
value: row.productSkn
}, {
label: '名称',
value: row.productName
}, {
label: '品牌',
value: row.brandName
}, {
label: '品类',
value: `${row.maxSortName}/${row.middleSortName}/${row.smallSortName}`
}
];
label: 'SKN',
value: row.productSkn
}, {
label: '名称',
value: row.productName
}, {
label: '品牌',
value: row.brandName
}, {
label: '品类',
value: `${row.maxSortName}/${row.middleSortName}/${row.smallSortName}`
}
];
return h(CellInfo, {
props: {
items: infoItems
}
});
}
},
{
title: '价格(元)',
width: '180',
align: 'center',
render: (h, params) => {
const row = params.row;
return h(CellInfo, {
props: {
items: infoItems
}
});
}
},
{
title: '价格(元)',
width: '180',
align: 'center',
render: (h, params) => {
const row = params.row;
row.lineIndex = params.index;
return h(CellPrice, {
props: {
canChange: true,
currentRow: row,
showChange: row.changePrice,
retailPrice: row.retailPrice,
salesPrice: row.salesPrice
},
on: {
'click-change': () => this.editPrice(row),
'click-save': this.updatePrice
}
});
}
row.lineIndex = params.index;
return h(CellPrice, {
props: {
canChange: true,
currentRow: row,
showChange: row.changePrice,
retailPrice: row.retailPrice,
salesPrice: row.salesPrice
},
{
title: '可售库存',
key: 'stock',
width: 100,
align: 'center',
},
{
title: '下架时间',
key: 'offshelveTime',
width: 150,
align: 'center'
},
{
title: '状态',
align: 'center',
render: (h, params) => {
const row = params.row;
const as = row.auditStatus;
const asText = as === 2 ? `${auditStatus[row.auditStatus]}(${row.rejectReason})` : auditStatus[as];
on: {
'click-change': () => this.editPrice(row),
'click-save': this.updatePrice
}
});
}
},
{
title: '可售库存',
key: 'stock',
width: 100,
align: 'center',
},
{
title: '下架时间',
key: 'offshelveTime',
width: 150,
align: 'center'
},
{
title: '状态',
align: 'center',
render: (h, params) => {
const row = params.row;
const as = row.auditStatus;
const asText = as === 2 ? `${auditStatus[row.auditStatus]}(${row.rejectReason})` : auditStatus[as];
row.lineIndex = params.index;
return (
<p class={{'high-light': as === 2}}>{asText}</p>
);
},
className: 'status-column'
},
{
title: '操作',
width: 180,
align: 'center',
render: (h, params) => {
const row = params.row;
const disabled = row._disabled;
row.lineIndex = params.index;
return (
<p class={{'high-light': as === 2}}>{asText}</p>
);
},
className: 'status-column'
},
{
title: '操作',
width: 180,
align: 'center',
render: (h, params) => {
const row = params.row;
const disabled = row._disabled;
return (
<div>
<div class="cell-action-row">
<i-button type="primary" size="small" disabled={disabled}
onClick={() => this.editSize(row.productSkn)}>
return (
<div>
<div class="cell-action-row">
<i-button type="primary" size="small" disabled={disabled}
onClick={() => this.editSize(row.productSkn)}>
尺码维护
</i-button>
</div>
<div class="cell-action-row">
<i-button type="primary" size="small" disabled={disabled}
onClick={() => this.editProduct(row.productSkn)}>
</i-button>
</div>
<div class="cell-action-row">
<i-button type="primary" size="small" disabled={disabled}
onClick={() => this.editProduct(row.productSkn)}>
内容编辑
</i-button>
</div>
<div class="cell-action-row">
<i-button type="success" size="small" disabled={disabled}
onClick={() => this.setOnSale(row)}>
</i-button>
</div>
<div class="cell-action-row">
<i-button type="success" size="small" disabled={disabled}
onClick={() => this.setOnSale(row)}>
商品上架
</i-button>
</div>
</div>
);
},
className: 'action-column'
}
],
tableData: [],
pageData: {
total: 0,
current: 1
}
};
</i-button>
</div>
</div>
);
},
className: 'action-column'
}
],
tableData: [],
pageData: {
total: 0,
current: 1
}
};
}
... ...
export default {
path: '/onsale.html',
name: 'onsale',
component: () => import(/* webpackChunkName: "product.onsale" */'./onsale'),
meta: {
pageName: '已上架商品'
}
path: '/onsale.html',
name: 'onsale',
component: () => import(/* webpackChunkName: "product.onsale" */'./onsale'),
meta: {
pageName: '已上架商品'
}
};
... ...
... ... @@ -8,230 +8,230 @@ import CellInfo from 'components/cell/cell-info';
import CellPrice from 'components/cell/cell-price';
const auditStatus = {
0: '无状态',
1: '下架待审核',
2: '下架驳回',
3: '已上架'
0: '无状态',
1: '下架待审核',
2: '下架驳回',
3: '已上架'
};
export default function() {
return {
showSizeEdit: false,
batchOffSale: [],
useFilterSign: false,
categoryValue: [],
tableCols: [
{
type: 'selection',
width: 60,
align: 'center'
},
{
title: '商品图片',
key: 'image',
width: 120,
align: 'center',
render: (h, params) => {
return h(CellImage, {
props: {
imageSrc: params.row.picImgUrl,
productUrl: params.row.productUrl
}
});
}
},
return {
showSizeEdit: false,
batchOffSale: [],
useFilterSign: false,
categoryValue: [],
tableCols: [
{
type: 'selection',
width: 60,
align: 'center'
},
{
title: '商品图片',
key: 'image',
width: 120,
align: 'center',
render: (h, params) => {
return h(CellImage, {
props: {
imageSrc: params.row.picImgUrl,
productUrl: params.row.productUrl
}
});
}
},
{
title: '商品信息',
align: 'center',
render: (h, params) => {
const row = params.row;
const infoItems = [
{
title: '商品信息',
align: 'center',
render: (h, params) => {
const row = params.row;
const infoItems = [
{
label: 'SKN',
value: row.productSkn
}, {
label: '名称',
value: row.productName
}, {
label: '品牌',
value: row.brandName
}, {
label: '品类',
value: `${row.maxSortName}/${row.middleSortName}/${row.smallSortName}`
}
];
label: 'SKN',
value: row.productSkn
}, {
label: '名称',
value: row.productName
}, {
label: '品牌',
value: row.brandName
}, {
label: '品类',
value: `${row.maxSortName}/${row.middleSortName}/${row.smallSortName}`
}
];
return h(CellInfo, {
props: {
items: infoItems
}
});
}
},
{
title: '价格(元)',
width: '180',
align: 'center',
render: (h, params) => {
const row = params.row;
return h(CellInfo, {
props: {
items: infoItems
}
});
}
},
{
title: '价格(元)',
width: '180',
align: 'center',
render: (h, params) => {
const row = params.row;
row.lineIndex = params.index;
return h(CellPrice, {
props: {
canChange: true,
currentRow: row,
showChange: row.changePrice,
retailPrice: row.retailPrice,
salesPrice: row.salesPrice
},
on: {
'click-change': () => this.editPrice(row),
'click-save': this.updatePrice
}
});
}
},
{
title: '可售库存',
key: 'stock',
width: 100,
align: 'center',
},
{
title: '上架时间',
key: 'shelveTime',
width: 150,
align: 'center'
row.lineIndex = params.index;
return h(CellPrice, {
props: {
canChange: true,
currentRow: row,
showChange: row.changePrice,
retailPrice: row.retailPrice,
salesPrice: row.salesPrice
},
{
title: '状态',
key: 'verify',
align: 'center',
render: (h, params) => {
const row = params.row;
const as = row.auditStatus;
const asText = as === 2 ? `${auditStatus[row.auditStatus]}(${row.rejectReason})` : auditStatus[as];
on: {
'click-change': () => this.editPrice(row),
'click-save': this.updatePrice
}
});
}
},
{
title: '可售库存',
key: 'stock',
width: 100,
align: 'center',
},
{
title: '上架时间',
key: 'shelveTime',
width: 150,
align: 'center'
},
{
title: '状态',
key: 'verify',
align: 'center',
render: (h, params) => {
const row = params.row;
const as = row.auditStatus;
const asText = as === 2 ? `${auditStatus[row.auditStatus]}(${row.rejectReason})` : auditStatus[as];
row.lineIndex = params.index;
return (
<p class={{'high-light': as === 2}}>{asText}</p>
);
},
className: 'status-column'
},
{
title: '操作',
key: 'action',
width: 180,
align: 'center',
render: (h, params) => {
const row = params.row;
const disabled = row._disabled;
const status = row.auditStatus;
row.lineIndex = params.index;
return (
<p class={{'high-light': as === 2}}>{asText}</p>
);
},
className: 'status-column'
},
{
title: '操作',
key: 'action',
width: 180,
align: 'center',
render: (h, params) => {
const row = params.row;
const disabled = row._disabled;
const status = row.auditStatus;
return (
<div>
<div class="cell-action-row">
<i-button type="primary" size="small"
onClick={() => this.editSize(row.productSkn)}>
return (
<div>
<div class="cell-action-row">
<i-button type="primary" size="small"
onClick={() => this.editSize(row.productSkn)}>
尺码维护
</i-button>
</div>
{status !== 3 ? (
<div class="cell-action-row">
<i-button type="primary" size="small"
onClick={() => this.editProduct(row.productSkn)}>
</i-button>
</div>
{status !== 3 ? (
<div class="cell-action-row">
<i-button type="primary" size="small"
onClick={() => this.editProduct(row.productSkn)}>
内容编辑
</i-button>
</div>
) : void 0}
<div class="cell-action-row">
<i-button type="error" size="small" disabled={disabled}
onClick={() => this.setOffSale(row.productSkn)}>
</i-button>
</div>
) : void 0}
<div class="cell-action-row">
<i-button type="error" size="small" disabled={disabled}
onClick={() => this.setOffSale(row.productSkn)}>
商品下架
</i-button>
</div>
</div>
);
},
className: 'action-column'
}
],
tableData: [],
pageData: {
total: 0,
current: 1
</i-button>
</div>
</div>
);
},
filters: {
sknCode: {
label: 'SKN编码',
model: '',
holder: ''
},
prodCode: {
label: '商家编码',
model: '',
holder: ''
},
prodName: {
label: '商品名称',
model: '',
holder: ''
},
prodBarCode: {
label: '商品条码',
model: '',
holder: ''
},
sort: {
first: {
label: '选择类目',
holder: '选择一级类目',
model: ''
},
second: {
label: '二级类目',
holder: '选择二级类目',
model: ''
},
third: {
label: '三级类目',
holder: '选择三级类目',
model: ''
}
},
brand: {
label: '选择品牌',
model: ''
},
verifyStatus: {
label: '审核状态',
model: '',
options: [
{
value: 1,
label: '下架待审核'
},
{
value: 2,
label: '下架驳回'
}
]
},
stockStatus: {
label: '库存情况',
model: '',
options: [
{
value: 1,
label: '有库存'
},
{
value: 0,
label: '无库存'
}
]
}
className: 'action-column'
}
],
tableData: [],
pageData: {
total: 0,
current: 1
},
filters: {
sknCode: {
label: 'SKN编码',
model: '',
holder: ''
},
prodCode: {
label: '商家编码',
model: '',
holder: ''
},
prodName: {
label: '商品名称',
model: '',
holder: ''
},
prodBarCode: {
label: '商品条码',
model: '',
holder: ''
},
sort: {
first: {
label: '选择类目',
holder: '选择一级类目',
model: ''
},
second: {
label: '二级类目',
holder: '选择二级类目',
model: ''
},
third: {
label: '三级类目',
holder: '选择三级类目',
model: ''
}
};
},
brand: {
label: '选择品牌',
model: ''
},
verifyStatus: {
label: '审核状态',
model: '',
options: [
{
value: 1,
label: '下架待审核'
},
{
value: 2,
label: '下架驳回'
}
]
},
stockStatus: {
label: '库存情况',
model: '',
options: [
{
value: 1,
label: '有库存'
},
{
value: 0,
label: '无库存'
}
]
}
}
};
}
... ...
export default {
path: '/output.html',
name: 'output',
component: () => import(/* webpackChunkName: "product.output" */'./output'),
meta: {
pageName: '批量功能'
}
path: '/output.html',
name: 'output',
component: () => import(/* webpackChunkName: "product.output" */'./output'),
meta: {
pageName: '批量功能'
}
};
... ...
export default {
path: '/share.html',
name: 'share',
component: () => import(/* webpackChunkName: "product.share" */'./share'),
meta: {
pageName: '晒单评价'
}
path: '/share.html',
name: 'share',
component: () => import(/* webpackChunkName: "product.share" */'./share'),
meta: {
pageName: '晒单评价'
}
};
... ...