Browse Source

fix mall write off

organize
刘嘉炜 3 years ago
parent
commit
e4df9d1139
  1. 13
      src/pages/write_off/mall/list/list.vue
  2. 2
      src/pages/write_off/menu/menu.vue

13
src/pages/write_off/mall/list/list.vue

@ -47,6 +47,7 @@ import { API } from '../../../../js/api';
import { servers } from '../../../../js/server'; import { servers } from '../../../../js/server';
import util from '../../../../utils/util'; import util from '../../../../utils/util';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import { WRITE_OFF_STORE_NAME } from '../../../../js/once_name';
export default { export default {
computed: { computed: {
...mapState([ 'brandInfo' ]), ...mapState([ 'brandInfo' ]),
@ -71,7 +72,16 @@ export default {
}) })
}, },
onLoad(){ onLoad(){
this.refreshPage();
// 1
let _startDate = util.formatDate({
date: new Date().getTime() - 30*24*60*60*1000
}).substr(0, 10);
let _endDate = util.formatDate({ }).substr(0, 10);
this.startTime = _startDate;
this.endTime = _endDate;
// 1
this.$nextTick(_=> this.refreshPage());
}, },
methods: { methods: {
refreshPage(){ refreshPage(){
@ -99,6 +109,7 @@ export default {
this.$nextTick(_=>this.refreshPage()); this.$nextTick(_=>this.refreshPage());
}, },
toOperate(){ toOperate(){
util.$_emit(WRITE_OFF_STORE_NAME, null);
util.routeTo(`/pages/write_off/operate/operate?type=mall`, 'nT'); util.routeTo(`/pages/write_off/operate/operate?type=mall`, 'nT');
}, },
getList({ brand_id, page = 1, page_size = 15, stime = '', etime = '' }){ getList({ brand_id, page = 1, page_size = 15, stime = '', etime = '' }){

2
src/pages/write_off/menu/menu.vue

@ -40,7 +40,7 @@
<script> <script>
import util from '../../../utils/util'; import util from '../../../utils/util';
import { WRITE_OFF_STORE_NAME, WRITE_OFF_ORDER_INFO } from '../../../js/once_name';
import { WRITE_OFF_STORE_NAME } from '../../../js/once_name';
import { API } from '../../../js/api'; import { API } from '../../../js/api';
import { servers } from '../../../js/server'; import { servers } from '../../../js/server';
export default { export default {

Loading…
Cancel
Save