Authored by htoooth

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

... ... @@ -88,6 +88,16 @@ export default {
expressGoodsMap: {}
};
if (!(params.expressId + '').length) {
this.$Message.error('请选择物流公司');
return;
}
if (!(params.expressNumber + '').length) {
this.$Message.error('请填写物流单号');
return;
}
let goods = {};
let keyId;
... ...
... ... @@ -74,7 +74,7 @@
this.getChildren(2, max)
.then(res => {
item.children.shift();
item.children.splice(0);
_.each(res, i => {
item.children.push({
value: i.value,
... ... @@ -104,7 +104,7 @@
this.getChildren(3, mid)
.then(res => {
midItem.children.shift();
midItem.children.splice(0);
_.each(res, i => {
midItem.children.push({
value: i.value,
... ...
... ... @@ -52,7 +52,7 @@
</LayoutFilter>
<LayoutAction>
<Button type="error" @click="batchSetOnSale">上架</Button>
<Button type="success" @click="batchSetOnSale">上架</Button>
</LayoutAction>
<LayoutList>
... ... @@ -136,7 +136,7 @@
},
productList(params) {
if (_.isObject(params) &&
params.productSkn !== undefined &&
typeof params.productSkn !== 'undefined' &&
!_.isFinite(+params.productSkn)) {
this.$Message.error('SKN编码只能是数字', 3);
return;
... ... @@ -173,6 +173,7 @@
_.each(data.list, (item) => {
item.changePrice = false;
item._disabled = item.auditStatus === 1;
item.offshelveTime = item.offshelveTime || '-';
});
this.tableData = data.list;
... ...
... ... @@ -149,7 +149,7 @@ export default () => {
key: 'image',
width: 120,
align: 'center',
render(row, column, index) {
render(row) { // eslint-disable-line
return '<cell-image :image-src="row.picImgUrl" :product-url="row.productUrl"></cell-image>';
}
},
... ... @@ -157,7 +157,7 @@ export default () => {
title: '商品信息',
key: 'info',
align: 'center',
render(row, column, index) {
render(row) { // eslint-disable-line
return `<cell-info
:skn="row.productSkn"
:product-name="row.productName"
... ... @@ -215,7 +215,7 @@ export default () => {
key: 'action',
width: 180,
align: 'center',
render: function(row, column, index) {
render: function(row) { // eslint-disable-line
return `<div class="action-btn-row">
<i-button type="primary" size="small" @click="editSize(row.productSkn)">尺码维护</i-button>
<i-button type="primary" size="small" @click="editProduct(${row.productSkn})">内容编辑</i-button>
... ...
... ... @@ -130,7 +130,7 @@
productList(params) {
if (_.isObject(params) &&
params.productSkn !== undefined &&
typeof params.productSkn !== 'undefined' &&
!_.isFinite(+params.productSkn)) {
this.$Message.error('SKN编码只能是数字', 3);
return;
... ... @@ -167,6 +167,7 @@
_.each(data.list, (item) => {
item.changePrice = false;
item._disabled = item.auditStatus === 1;
item.shelveTime = item.shelveTime || '-';
});
this.tableData = data.list;
... ...
... ... @@ -24,7 +24,7 @@ export default () => {
key: 'image',
width: 120,
align: 'center',
render(row, column, index) {
render(row) { // eslint-disable-line
return '<cell-image :image-src="row.picImgUrl" :product-url="row.productUrl"></cell-image>';
}
},
... ... @@ -32,7 +32,7 @@ export default () => {
title: '商品信息',
key: 'info',
align: 'center',
render(row) {
render(row) { // eslint-disable-line
return `<cell-info
:skn="row.productSkn"
:product-name="row.productName"
... ...
... ... @@ -18,8 +18,6 @@
</template>
<script>
import _ from 'lodash';
import service from 'product-service';
import {SelectCategory} from 'components/select';
export default {
... ...
/**
* on sale page store
* @author: qi.li <qi.li@yoho.cn>
* @date: 2017/04/13
*/
const auditStatus = {
0: '无状态',
1: '上架待审核',
2: '上架驳回',
3: '已下架'
};
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: '选择二级类目',
fieldSpan: 18,
model: ''
},
third: {
label: '三级类目',
holder: '选择三级类目',
fieldSpan: 18,
model: ''
}
},
brand: {
label: '选择品牌',
labelSpan: 6,
fieldSpan: 18,
model: -1
},
verifyStatus: {
label: '销售状态',
labelSpan: 6,
fieldSpan: 18,
model: -1,
options: [
{
value: -1,
label: '全部'
},
{
value: 0,
label: '已上架'
},
{
value: 1,
label: '已下架'
}
]
},
stockStatus: {
label: '库存情况',
labelSpan: 6,
fieldSpan: 18,
model: -1,
options: [
{
value: -1,
label: '全部'
},
{
value: 1,
label: '有库存'
},
{
value: 0,
label: '无库存'
}
]
},
publishStatus: {
label: '价格状态',
labelSpan: 6,
fieldSpan: 18,
model: -1,
options: [
{
value: -1,
label: '全部'
},
{
value: 0,
label: '启用'
},
{
value: 1,
label: '禁用'
}
]
}
};
let initialFields = JSON.parse(JSON.stringify(filterFields));
let tableCols = [
{
type: 'selection',
width: 60,
align: 'center'
},
{
title: '商品图片',
key: 'image',
align: 'center',
render(row, column, index) {
return `<img class="prd-img" src="${row.picImgUrl}">`;
}
},
{
title: '商品信息',
key: 'info',
align: 'center',
render(row, column, index) {
return `<p>SKN${row.productSkn}</p>
<p>名称:${row.productName}</p>
<p>品牌:${row.brandName}</p>
<p>品类:${row.maxSortName}/${row.middleSortName}/${row.smallSortName}</p>`;
}
},
{
title: '价格(元)',
key: 'price',
align: 'center',
label: 'test',
render(row, column, index) {
row.lineIndex = index;
return `<p>吊牌价:${row.retailPrice}</p>
<p v-if="!row.changePrice">销售价:${row.salesPrice}</p>`;
}
},
{
title: '可售库存',
key: 'stock',
align: 'center',
},
{
key: 'offshelveTime',
align: 'center'
},
{
title: '审核状态',
key: 'verify',
align: 'center',
render(row, column, index) {
return `${auditStatus[row.auditStatus]}`;
}
},
{
title: '操作',
key: 'action',
align: 'center',
render: function(row, column, index) {
return `<div class="action-btn-row"><i-button type="primary" size="small" @click="setOnSale(${row.productSkn})">启用</i-button></div>`;
}
}
];
let tableData = [];
let pageData = {
total: 0,
current: 1
};
export {
filterFields,
initialFields,
tableCols,
tableData,
pageData
};
<template>
<div class="onsale-list">
<Row :gutter="24" class-name="filter-row">
<Col span="6">
<Row>
<Col :span="filters.sknCode.labelSpan">
<label class="field-label">{{filters.sknCode.label}}:</label>
</Col>
<Col :span="filters.sknCode.fieldSpan">
<Input v-model="filters.sknCode.model" :placeholder="filters.sknCode.holder"></Input>
</Col>
</Row>
</Col>
<Col span="6">
<Row>
<Col :span="filters.prodCode.labelSpan">
<label class="field-label">{{filters.prodCode.label}}:</label>
</Col>
<Col :span="filters.prodCode.fieldSpan">
<Input v-model="filters.prodCode.model" :placeholder="filters.prodCode.holder"></Input>
</Col>
</Row>
</Col>
<Col span="6">
<Row>
<Col :span="filters.prodName.labelSpan">
<label class="field-label">{{filters.prodName.label}}:</label>
</Col>
<Col :span="filters.prodName.fieldSpan">
<Input v-model="filters.prodName.model" :placeholder="filters.prodName.holder"></Input>
</Col>
</Row>
</Col>
<Col span="6">
<Row>
<Col :span="filters.prodBarCode.labelSpan">
<label class="field-label">{{filters.prodBarCode.label}}:</label>
</Col>
<Col :span="filters.prodBarCode.fieldSpan">
<Input v-model="filters.prodBarCode.model" :placeholder="filters.prodBarCode.holder"></Input>
</Col>
</Row>
</Col>
</Row>
<Row :gutter="24" class-name="filter-row">
<Col span="6">
<SelectBrand @on-change="brandChange"
:field-label="filters.brand.label"
:field-model="filters.brand.model"
:label-span="filters.brand.labelSpan"
:field-span="filters.brand.fieldSpan"
:option-list="filters.brand.options">
</SelectBrand>
</Col>
<Col span="6">
<Row>
<Col :span="filters.verifyStatus.labelSpan">
<label class="field-label">{{filters.verifyStatus.label}}:</label>
</Col>
<Col :span="filters.verifyStatus.fieldSpan">
<Select v-model="filters.verifyStatus.model" clearable>
<Option v-for="option in filters.verifyStatus.options" :value="option.value" :key="option.value">{{option.label}}</Option>
</Select>
</Col>
</Row>
</Col>
<Col span="6">
<Row>
<Col :span="filters.stockStatus.labelSpan">
<label class="field-label">{{filters.stockStatus.label}}:</label>
</Col>
<Col :span="filters.stockStatus.fieldSpan">
<Select v-model="filters.stockStatus.model" clearable>
<Option v-for="option in filters.stockStatus.options" :value="option.value" :key="option.value">{{option.label}}</Option>
</Select>
</Col>
</Row>
</Col>
<Col span="6">
<Row>
<Col :span="filters.publishStatus.labelSpan">
<label class="field-label">{{filters.publishStatus.label}}:</label>
</Col>
<Col :span="filters.publishStatus.fieldSpan">
<Select v-model="filters.publishStatus.model" clearable>
<Option v-for="option in filters.publishStatus.options" :value="option.value" :key="option.value">{{option.label}}</Option>
</Select>
</Col>
</Row>
</Col>
</Row>
<div class="filter-row">
<SelectCategory :field-sort="filters.sort" @on-change="sortChange"></SelectCategory>
</div>
<Row class-name="filter-row">
<Button type="primary" @click="filterSearch">筛选</Button>
<Button @click="clearFilter">清空条件</Button>
</Row>
<div class="hr"></div>
<div class="batch-row">
<Button type="primary" @click="batchSetOnSale">启用</Button>
<Button type="error" @click="batchSetOnSale">禁用</Button>
</div>
<Table border :context="self" :columns="tableCols" :data="tableData" @on-selection-change="selectChange"></Table>
<div class="list-page">
<Page :total="pageData.total" :current="pageData.current" @on-change="pageChange" :page-size="20" show-total></Page>
</div>
<SizeEdit></SizeEdit>
</div>
</template>
<script>
import _ from 'lodash';
import service from 'product-service';
import {SizeEdit} from 'components/modal';
import {SelectBrand, SelectCategory} from 'components/select';
import {filterFields, initialFields, tableCols, tableData, pageData} from './store';
export default {
data() {
return {
self: this,
tableCols,
tableData,
pageData,
filters: filterFields,
initialFilters: '',
batchOffSale: [],
useFilterSign: false
};
},
created() {
this.productList();
this.initialFilters = JSON.stringify(filterFields);
},
methods: {
filterParams() {
const fts = this.filters;
const data = {
productSkn: fts.sknCode.model,
factoryCode: fts.prodCode.model,
skuFactoryCode: fts.prodBarCode.model,
maxSortId: fts.sort.first.model,
middleSortId: fts.sort.second.model,
smallSortId: fts.sort.third.model,
isPublished: fts.publishStatus.model,
brandId: fts.brand.model != -1 ? fts.brand.model : null,
auditStatus: fts.verifyStatus.model != -1 ? fts.verifyStatus.model : null,
stock: fts.stockStatus.model != -1 ? this.filters.stockStatus.model : null
};
return data;
},
filterSearch() {
const params = this.filterParams();
this.useFilterSign = true;
this.productList(params);
},
clearFilter() {
this.filters = JSON.parse(this.initialFilters);
this.productList();
this.useFilterSign = false;
},
productList(params) {
service.productList(
_.merge(params || {}, {
shelfStatus: 0,
size: 20
}))
.then(res => {
let code = _.get(res, 'data.code');
if (code === 200) {
this.updateStore(res.data.data);
}
});
},
updateStore(data) {
_.each(data.list, (item) => {
item.changePrice = false;
});
this.tableData = data.list;
this.pageData.total = data.total;
this.pageData.current = 1;
},
sortChange(sort) {
this.filters.sort.first.model = sort.first;
this.filters.sort.second.model = sort.second;
this.filters.sort.third.model = sort.third;
},
brandChange(val) {
_.set(this.filters, 'brand.model', val);
},
pageChange(page) {
let params = {};
if (this.useFilterSign) {
params = this.filterParams();
}
_.merge(params, {
page,
size: 20,
productStatusStr: 1
});
this.productList(params);
},
setOnSale(skns) {
const params = {
targetStatus: 1
};
if (_.isArray(skns)) {
params.productSkns = `[${skns.join(',')}]`;
} else {
params.productSkns = `[${skns}]`;
}
service.setOnSale(params)
.then(res => {
this.$Message.success(res.data.message);
});
},
batchSetOnSale() {
if (!this.batchOffSale.length) {
return this.$Message.error('请选择要上架的商品');
}
let skns = [];
_.each(this.batchOffSale, (item) => {
skns.push(item.productSkn);
});
this.setOnSale(skns);
},
changePrice(row) {
row.changePrice = true;
},
updatePrice(row) {
const index = row.lineIndex;
const salesPrice = row.salesPrice;
const productSkn = row.productSkn;
const params = {
salesPrice,
productSkn
};
service.updateSalesPrice(params)
.then(res => {
this.tableData[index].salesPrice = salesPrice;
row.changePrice = false;
this.$Message.success(res.data.message);
});
},
editProduct(skn) {
this.$router.push({
name: 'product.create.step1',
query: {
skn
}
});
},
selectChange(selection) {
this.batchOffSale = selection;
}
},
components: {
SelectBrand,
SelectCategory,
SizeEdit
}
};
</script>
<style lang="scss">
.filter-row {
margin-bottom: 20px;
.field-label {
line-height: 32px;
}
}
.hr {
border-top: 1px solid #eee;
margin-bottom: 20px;
}
.batch-row {
margin-bottom: 20px;
}
.list-page {
float: right;
margin-top: 20px;
}
.prd-img {
max-height: 200px;
}
.action-btn-row {
margin-top: 10px;
}
</style>
... ...
... ... @@ -37,6 +37,12 @@ export default () => {
model: '',
holder: ''
},
startTime: {
model: ''
},
endTime: {
model: '',
},
prodStatus: {
label: '商品状态',
model: -1,
... ...
... ... @@ -32,6 +32,12 @@ export default () => {
model: '',
holder: ''
},
startTime: {
model: ''
},
endTime: {
model: '',
},
prodStatus: {
label: '商品状态',
model: -1,
... ...
... ... @@ -10,7 +10,7 @@
:placeholder="filters.expressNo.holder"></Input>
</FilterItem>
<FilterItem :label="filters.prodCode.label">
<Input v-model.trim="filters.prodCode.model"
<Input v-model.trim.number="filters.prodCode.model"
:placeholder="filters.prodCode.holder"></Input>
</FilterItem>
<FilterItem :label="filters.merChantCode.label">
... ... @@ -22,8 +22,10 @@
:placeholder="filters.prodBarCode.holder"></Input>
</FilterItem>
<FilterItem :label="filters.orderTime.label">
<Date-picker type="date" placeholder="选择日期"
@on-change="dateChange" :value="filters.orderTime.model"></Date-picker>
<Date-picker type="daterange"
placeholder="选择日期"
@on-change="dateChange"
:value="filters.orderTime.model"></Date-picker>
</FilterItem>
<FilterItem :label="filters.prodStatus.label">
<Select v-model.trim="filters.prodStatus.model">
... ... @@ -51,7 +53,7 @@
import _ from 'lodash';
import moment from 'moment';
import service from 'trade-service';
import Store from '../store/done';
import dataStore from '../store/done';
import { CellPrdInfo, CellDispatch } from '../components';
export default {
... ... @@ -67,7 +69,7 @@
};
},
created() {
const store = Store();
const store = dataStore();
this.filters = store.filters;
this.page = store.page;
... ... @@ -100,7 +102,7 @@
return data;
},
filterValues(){
filterValues() {
let values = {};
const keyMap = {
proRequisitionFormId: 'orderNo',
... ... @@ -108,8 +110,8 @@
productSkn: 'prodCode',
sknFactoryCode: 'merChantCode',
skuFactoryCode: 'prodBarCode',
startTime: 'orderTime',
endTime: 'orderTime',
startTime: 'startTime',
endTime: 'endTime',
statusList: 'prodStatus',
isOvertime: 'prodStatus'
};
... ... @@ -118,30 +120,36 @@
values[k] = this.filters[v].model;
});
if (values.productSkn !== undefined &&
!_.isFinite(+values.productSkn)) {
this.$Message.error('SKN编码只能是数字', 3);
if (values.proRequisitionFormId !== 'undefined' &&
!_.isFinite(+values.proRequisitionFormId)) {
this.$Message.error('入库单号只能是数字', 3);
return;
}
if (values.proRequisitionFormId !== undefined &&
!_.isFinite(+values.proRequisitionFormId)) {
this.$Message.error('入库单号只能是数字', 3);
if (typeof values.productSkn !== 'undefined' &&
!_.isFinite(+values.productSkn)) {
this.$Message.error('SKN编码只能是数字', 3);
return;
}
const ot = values.isOvertime;
const date = values.startTime;
const start = values.startTime;
const end = values.endTime;
const status = values.statusList;
values.isOvertime = ot === -2 ? 'Y' : '';
if (date && moment(date).isValid()) {
values.startTime = +moment(date).format('X');
values.endTime = +moment(date).add(1, 'days').format('X');
if (start && moment(start).isValid()) {
values.startTime = +moment(start).format('X');
} else {
values.startTime = '';
}
if (end && moment(end).isValid()) {
values.endTime = +moment(end).add(1, 'days').format('X');
} else {
values.endTime = '';
}
if (status === -1) {
values.statusList = [2, 3];
} else if (status === -2) {
... ... @@ -172,7 +180,7 @@
this.page.current = 1;
},
clearFilter() {
this.filters = Store().filters;
this.filters = dataStore().filters;
this.useFilterSign = false;
this.productList(this.params());
this.page.current = 1;
... ... @@ -188,7 +196,8 @@
this.filters[k].model = v;
},
dateChange(date) {
this.setModel('orderTime', date);
this.setModel('startTime', date[0]);
this.setModel('endTime', date[1]);
},
rowClassName(row) {
if (row.isOvertime === 'Y') {
... ... @@ -197,10 +206,7 @@
return '';
},
exportList() {
let params = {
pageSize: 20,
pageNo: this.page.current
};
let params = {};
_.assign(params, this.filterValues());
params = _.pickBy(params, (v) => {
... ... @@ -213,11 +219,7 @@
temp.push(`${key}=${val}`);
});
if (temp.length === 2) {
this.$Message.error('请至少输入一个筛选条件');
return;
}
const href = `/Api/erp/allotExportForSended?${temp.join('&')}`;
const href = `/Api/erp/allotExportList?${temp.join('&')}`;
window.open(href, '_blank');
}
... ...
... ... @@ -2,16 +2,16 @@
<div class="un-done">
<LayoutFilter>
<FilterItem :label="filters.orderNo.label">
<Input v-model.trim="filters.orderNo.model"
:placeholder="filters.orderNo.holder" number></Input>
<Input v-model.trim.number="filters.orderNo.model"
:placeholder="filters.orderNo.holder"></Input>
</FilterItem>
<FilterItem :label="filters.expressNo.label">
<Input v-model.trim="filters.expressNo.model"
:placeholder="filters.expressNo.holder" number></Input>
:placeholder="filters.expressNo.holder"></Input>
</FilterItem>
<FilterItem :label="filters.prodCode.label">
<Input v-model.trim="filters.prodCode.model"
:placeholder="filters.prodCode.holder" number></Input>
<Input v-model.trim.number="filters.prodCode.model"
:placeholder="filters.prodCode.holder"></Input>
</FilterItem>
<FilterItem :label="filters.prodBarCode.label">
<Input v-model.trim="filters.prodBarCode.model"
... ... @@ -35,7 +35,7 @@
import _ from 'lodash';
import moment from 'moment';
import service from 'trade-service';
import Store from '../store/express';
import dataStore from '../store/express';
export default {
name: 'TabDone',
... ... @@ -49,7 +49,7 @@
};
},
created() {
const store = Store();
const store = dataStore();
const params = {
pageNo: 1,
pageSize: 20,
... ... @@ -77,7 +77,7 @@
this.useFilter = false;
this.getExpList(this.params());
this.page.current = 1;
this.filters = Store().filters;
this.filters = dataStore().filters;
},
pageChange(page) {
let params = this.params();
... ... @@ -110,15 +110,15 @@
});
}
if (data.sknFactoryCode !== undefined &&
!_.isFinite(+data.sknFactoryCode)) {
this.$Message.error('SKN编码只能是数字', 3);
if (typeof data.proRequisitionFormId !== 'undefined' &&
!_.isFinite(+data.proRequisitionFormId)) {
this.$Message.error('入库单号只能是数字', 3);
return;
}
if (data.proRequisitionFormId !== undefined &&
!_.isFinite(+data.proRequisitionFormId)) {
this.$Message.error('入库单号只能是数字', 3);
if (typeof data.sknFactoryCode !== 'undefined' &&
!_.isFinite(+data.sknFactoryCode)) {
this.$Message.error('SKN编码只能是数字', 3);
return;
}
... ...
... ... @@ -2,11 +2,11 @@
<div class="un-done">
<LayoutFilter>
<FilterItem :label="filters.orderNo.label">
<Input v-model.trim="filters.orderNo.model"
<Input v-model.trim.number="filters.orderNo.model"
:placeholder="filters.orderNo.holder"></Input>
</FilterItem>
<FilterItem :label="filters.prodCode.label">
<Input v-model.trim="filters.prodCode.model"
<Input v-model.trim.number="filters.prodCode.model"
:placeholder="filters.prodCode.holder"></Input>
</FilterItem>
<FilterItem :label="filters.merChantCode.label">
... ... @@ -18,7 +18,8 @@
:placeholder="filters.prodBarCode.holder"></Input>
</FilterItem>
<FilterItem :label="filters.orderTime.label">
<Date-picker type="date" placeholder="选择日期"
<Date-picker type="daterange"
placeholder="选择日期"
@on-change="dateChange"
:value="filters.orderTime.model">
</Date-picker>
... ... @@ -64,7 +65,7 @@
import _ from 'lodash';
import moment from 'moment';
import service from 'trade-service';
import Store from '../store/undone';
import dataStore from '../store/undone';
import { ModalDeliver, ModalStockOut } from 'components/modal';
import { CellPrdInfo, CellDispatch, CellDeliver, CellStockOut, CellSkuImage } from '../components';
... ... @@ -83,7 +84,7 @@
};
},
created() {
const store = Store();
const store = dataStore();
this.filters = store.filters;
this.page = store.page;
... ... @@ -95,7 +96,7 @@
let params = {
pageNo: 1,
pageSize: 20,
statusList: [1,2]
statusList: [1, 2]
};
if (!this.useFilter) {
... ... @@ -115,8 +116,8 @@
productSkn: 'prodCode',
sknFactoryCode: 'merChantCode',
skuFactoryCode: 'prodBarCode',
startTime: 'orderTime',
endTime: 'orderTime',
startTime: 'startTime',
endTime: 'endTime',
isOvertime: 'prodStatus'
};
let values = {};
... ... @@ -129,29 +130,35 @@
}
});
if (values.productSkn !== undefined &&
!_.isFinite(+values.productSkn)) {
this.$Message.error('SKN编码只能是数字', 3);
if (typeof values.proReqFormId !== 'undefined' &&
!_.isFinite(+values.proReqFormId)) {
this.$Message.error('入库单号只能是数字', 3);
return;
}
if (values.proReqFormId !== undefined &&
!_.isFinite(+values.proReqFormId)) {
this.$Message.error('入库单号只能是数字', 3);
if (typeof values.productSkn !== 'undefined' &&
!_.isFinite(+values.productSkn)) {
this.$Message.error('SKN编码只能是数字', 3);
return;
}
const ot = values.isOvertime;
const date = values.startTime;
const start = values.startTime;
const end = values.endTime;
if (date && moment(date).isValid()) {
values.startTime = +moment(date).format('X');
values.endTime = +moment(date).add(1, 'days').format('X');
if (start && moment(start).isValid()) {
values.startTime = +moment(start).format('X');
} else {
values.endTime = '';
values.startTime = '';
}
values.isOvertime = ot === -1 ? '' : (ot === 1 ? 'N' : 'Y');
if (end && moment(end).isValid()) {
values.endTime = +moment(end).add(1, 'days').format('X');
} else {
values.endTime = '';
}
values.isOvertime = ot === -1 ? '' : (ot === 1 ? 'N' : 'Y'); // eslint-disable-line
return values;
},
... ... @@ -183,7 +190,7 @@
this.page.current = 1;
},
clearFilter() {
this.filters = Store().filters;
this.filters = dataStore().filters;
this.useFilter = false;
this.productList(this.params());
this.page.current = 1;
... ... @@ -235,10 +242,7 @@
});
if (invalidRows.length) {
_.each(invalidRows, (v) => {
sku += v;
});
this.$Message.error('已选择的条目、请输入大于0且不大于当前需发数的发货数', 5)
this.$Message.error('已选择的条目、请输入大于0且不大于当前需发数的发货数', 5);
return false;
}
... ... @@ -253,7 +257,8 @@
this.filters[k].model = v;
},
dateChange(date) {
this.setModel('orderTime', date);
this.setModel('startTime', date[0]);
this.setModel('endTime', date[1]);
},
rowClassName(row) {
if (row.isOvertime === 'Y') {
... ... @@ -285,9 +290,7 @@
},
exportList() {
let params = {
pageSize: 20,
statusList: 1,
pageNo: this.page.current
statusList: 1
};
let filters = this.filterValues();
... ... @@ -303,12 +306,7 @@
temp.push(`${key}=${val}`);
});
if (temp.length === 3) {
this.$Message.error('请至少输入一个筛选条件');
return;
}
const href = `/Api/erp/allotExportForUnSend?${temp.join('&')}`;
const href = `/Api/erp/allotExportList?${temp.join('&')}`;
window.open(href, '_blank');
}
... ...
... ... @@ -13,8 +13,7 @@ let domainApis = {
allotStockOut: '/erp-shop-web/purchase/stockOut',
allotExpressNumList: '/erp-shop-web/purchase/queryExpressListByExpressNumber',
allotExpressCompList: '/erp-shop-web/express/getExpressList',
allotExportForUnSend: '/erp-shop-web/export/exportForUnSend',
allotExportForSended: '/erp-shop-web/export/exportForSended',
allotExportList: '/erp-shop-web/export/exportForPurchaseForm',
jitProductList: '/erp-shop-web/product/jitProductList',
getJitStorageListBySkn: '/erp-shop-web/product/getJitStorageListBySkn',
importJitStorage: '/erp-shop-web/product/importJitStorage'
... ...