Authored by lzhy

一件代发

@@ -10,24 +10,25 @@ import moment from 'moment'; @@ -10,24 +10,25 @@ import moment from 'moment';
10 * timeFormat({time: 1495787643}) 10 * timeFormat({time: 1495787643})
11 * timeFormat({time: 1495787643, format: moment支持的format格式'}) 11 * timeFormat({time: 1495787643, format: moment支持的format格式'})
12 */ 12 */
13 -export default (value) => { 13 +export default value => {
  14 + if (+value <= 0) {
  15 + return '';
  16 + }
  17 + let format;
  18 + let unixStamp;
  19 + const isNum = _.isFinite(value);
  20 + const isObj = _.isPlainObject(value);
  21 + const defaultFmt = 'YYYY-MM-DD HH:mm:ss';
14 22
15 - let format;  
16 - let unixStamp;  
17 - const isNum = _.isFinite(value);  
18 - const isObj = _.isPlainObject(value);  
19 - const defaultFmt = 'YYYY-MM-DD HH:mm:ss'; 23 + if (isNum) {
  24 + unixStamp = value;
  25 + format = defaultFmt;
  26 + } else if (isObj) {
  27 + unixStamp = value.time;
  28 + format = value.format || defaultFmt;
  29 + } else {
  30 + unixStamp = 'Invalid value.';
  31 + }
20 32
21 - if (isNum) {  
22 - unixStamp = value;  
23 - format = defaultFmt;  
24 - } else if (isObj) {  
25 - unixStamp = value.time;  
26 - format = value.format || defaultFmt;  
27 - } else {  
28 - unixStamp = 'Invalid value.';  
29 - }  
30 -  
31 - return moment.unix(unixStamp).format(format); 33 + return moment.unix(unixStamp).format(format);
32 }; 34 };
33 -  
@@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
17 <script> 17 <script>
18 import { orderGoodsInfo } from '../../components'; 18 import { orderGoodsInfo } from '../../components';
19 import OrderService from 'services/order/order-service'; 19 import OrderService from 'services/order/order-service';
  20 +import { OrderConfig } from '../../configs';
20 import _ from 'lodash'; 21 import _ from 'lodash';
21 export default { 22 export default {
22 components: { orderGoodsInfo }, 23 components: { orderGoodsInfo },
@@ -27,6 +28,7 @@ export default { @@ -27,6 +28,7 @@ export default {
27 tableData: [], 28 tableData: [],
28 goodsPromos: [], 29 goodsPromos: [],
29 orderPromos: [], 30 orderPromos: [],
  31 + feeSharingType: OrderConfig.feeSharingType,
30 }; 32 };
31 }, 33 },
32 created() { 34 created() {
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 > 35 >
36 确认发货 36 确认发货
37 </Button> 37 </Button>
38 - <Button type="default" @click="cancel">取消</Button> 38 + <Button type="default" @click="cancel">返回</Button>
39 </filter-item> 39 </filter-item>
40 </layout-filter> 40 </layout-filter>
41 </Tab-pane> 41 </Tab-pane>
@@ -63,6 +63,7 @@ export default { @@ -63,6 +63,7 @@ export default {
63 this.OrderService = new OrderService(); 63 this.OrderService = new OrderService();
64 this.$emit('nextStep', 2); 64 this.$emit('nextStep', 2);
65 this.getLogisticsList(); 65 this.getLogisticsList();
  66 + this.orderInfo.expressNumber = this.orderInfo.expressNumber || '';
66 }, 67 },
67 68
68 methods: { 69 methods: {
@@ -26,7 +26,6 @@ @@ -26,7 +26,6 @@
26 <filter-item> 26 <filter-item>
27 <Button type="primary" @click="search">筛选</Button> 27 <Button type="primary" @click="search">筛选</Button>
28 <Button @click="reset">全部</Button> 28 <Button @click="reset">全部</Button>
29 - <Button type="success" @click="exportData">导出</Button>  
30 </filter-item> 29 </filter-item>
31 </layout-filter> 30 </layout-filter>
32 <layout-list> 31 <layout-list>
@@ -44,7 +43,6 @@ import { ListTabs, DataTable } from './components'; @@ -44,7 +43,6 @@ import { ListTabs, DataTable } from './components';
44 import { OrderService } from 'services/order'; 43 import { OrderService } from 'services/order';
45 import _ from 'lodash'; 44 import _ from 'lodash';
46 import { OrderConfig } from '../configs'; 45 import { OrderConfig } from '../configs';
47 -import qs from 'querystringify';  
48 export default { 46 export default {
49 components: { ListTabs, DataTable }, 47 components: { ListTabs, DataTable },
50 data() { 48 data() {
@@ -103,11 +101,6 @@ export default { @@ -103,11 +101,6 @@ export default {
103 this.query.pageNo = 1; 101 this.query.pageNo = 1;
104 this.search(); 102 this.search();
105 }, 103 },
106 - exportData() {  
107 - const querystring = qs.stringify(this.query, true);  
108 - const href = `${OrderService.exportOrdersByStatus}${querystring}`;  
109 - window.open(href, '_blank');  
110 - },  
111 }, 104 },
112 }; 105 };
113 </script> 106 </script>
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <td colspan="12" style="text-align: left"> 13 <td colspan="12" style="text-align: left">
14 <span>订单号:{{ item.orderCode }}</span> 14 <span>订单号:{{ item.orderCode }}</span>
15 <span>父订单号:{{ item.parentOrderCode }}</span> 15 <span>父订单号:{{ item.parentOrderCode }}</span>
16 - <span>创建时间:{{ item.createTime }}</span> 16 + <span>创建时间:{{ item.createTime | timeFormat }}</span>
17 </td> 17 </td>
18 </tr> 18 </tr>
19 <template v-for="(goods, key) in item.returnedGoodsListBoArray"> 19 <template v-for="(goods, key) in item.returnedGoodsListBoArray">
@@ -27,7 +27,6 @@ @@ -27,7 +27,6 @@
27 <filter-item> 27 <filter-item>
28 <Button type="primary" @click="search">筛选</Button> 28 <Button type="primary" @click="search">筛选</Button>
29 <Button @click="reset">清空条件</Button> 29 <Button @click="reset">清空条件</Button>
30 - <Button type="success" @click="exportData">导出</Button>  
31 </filter-item> 30 </filter-item>
32 </layout-filter> 31 </layout-filter>
33 <layout-list> 32 <layout-list>
@@ -43,7 +42,6 @@ import { ReturnedListTable } from '../components'; @@ -43,7 +42,6 @@ import { ReturnedListTable } from '../components';
43 import { ReturnedService } from 'services/order'; 42 import { ReturnedService } from 'services/order';
44 import { OrderConfig } from 'pages/order/configs'; 43 import { OrderConfig } from 'pages/order/configs';
45 import _ from 'lodash'; 44 import _ from 'lodash';
46 -import qs from 'querystringify';  
47 45
48 export default { 46 export default {
49 components: { ReturnedListTable }, 47 components: { ReturnedListTable },
@@ -101,11 +99,6 @@ export default { @@ -101,11 +99,6 @@ export default {
101 this.query.orderStatusStr = ''; 99 this.query.orderStatusStr = '';
102 this.search(); 100 this.search();
103 }, 101 },
104 - exportData() {  
105 - const querystring = qs.stringify(this.query, true);  
106 - const href = `${ReturnedService.exportReturnedGoods}${querystring}`;  
107 - window.open(href, '_blank');  
108 - },  
109 }, 102 },
110 }; 103 };
111 </script> 104 </script>
@@ -143,12 +143,12 @@ export default { @@ -143,12 +143,12 @@ export default {
143 title: '同意退货申请', 143 title: '同意退货申请',
144 content: `你确定同意退货申请吗?`, 144 content: `你确定同意退货申请吗?`,
145 onOk() { 145 onOk() {
146 - _this.returnedService.returnedGoodsAudit({ id: this.id }).then(ret => { 146 + _this.returnedService.returnedGoodsAudit({ id: _this.id }).then(ret => {
147 if (ret.code === 200) { 147 if (ret.code === 200) {
148 - this.$Message.info(ret.message);  
149 - this.$router.go(0); 148 + _this.$Message.info(ret.message);
  149 + _this.$router.go(0);
150 } else { 150 } else {
151 - this.$Message.error(ret.message); 151 + _this.$Message.error(ret.message);
152 } 152 }
153 }); 153 });
154 }, 154 },
@@ -175,10 +175,10 @@ export default { @@ -175,10 +175,10 @@ export default {
175 onOk() { 175 onOk() {
176 _this.logisticsService.proxyReturnedGoodsInstorage({ requestId: +_this.id }).then(ret => { 176 _this.logisticsService.proxyReturnedGoodsInstorage({ requestId: +_this.id }).then(ret => {
177 if (ret.code === 200) { 177 if (ret.code === 200) {
178 - this.$Message.info(ret.message);  
179 - this.$router.go(0); 178 + _this.$Message.info(ret.message);
  179 + _this.$router.go(0);
180 } else { 180 } else {
181 - this.$Message.error(ret.message); 181 + _this.$Message.error(ret.message);
182 } 182 }
183 }); 183 });
184 }, 184 },