123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- import * as API from '@/apis/merchant.js'
- export default {
- data() {
- return {
- thisyear: 0,
- clientHeight:0,
- show1: false,
- show2: false,
- show3: false,
- selectForm: {
- select1Index:0,
- select2Index:0,
- select3Index:0,
- select1: '',
- select1Name: '全部车辆',
- select2: '',
- select2Name: '全部车票',
- select3: '',
- select3Name: '全天',
- },
- selectList1: [{
- id: '',
- licensePlateNumber: '全部车辆'
- },
- ],
- selectList2: [{
- id: '',
- name: '全部车票'
- },
- {
- id: 'wechat',
- name: '微信支付'
- },
- {
- id: 'alipay',
- name: '支付宝'
- },
- {
- id: 'cash',
- name: '现金购票'
- },
- {
- id: 'ticket',
- name: '纸质车票'
- },
- ],
- selectList3: [
- {
- id: '0',
- name: '全天'
- },
- {
- id: '1',
- name: '上午'
- },
- {
- id: '2',
- name: '下午'
- },
- ],
- listForm: {
- totalPage: 1,
- pageIndex: 1,
- pageSize: 20
- },
- recordList:[],
- sellList: {},
- mymap: {},
- }
- },
- methods: {
- gotoUrl(item){
- uni.navigateTo({
- url:"/pages/order/info?id="+item.id
- })
- },
- lower() {
- console.log("--------")
- if (this.listForm.pageIndex <= this.listForm.totalPage ) {
- this.getSellList(true);
- } else {
- return;
- }
- },
- getMerchantVehicleList() {
- this.$refs.common.showLoading()
- API.merchantVehicleList().then(response => {
- var selectList1 = [{
- id: '',
- licensePlateNumber: '全部车辆'
- },
- ...response.data
- ]
- // selectList1
- this.selectList1 = selectList1;
- this.$refs.common.showLoading(false);
- this.getSellList();
- }).catch(error => {
- this.$refs.common.showLoading(false, error);
- })
- },
- getSellList(bl) {
- if(!bl){
- this.listForm.pageIndex=1;
- }
- this.$refs.common.showLoading();
- var obj={
- vehicleId:this.selectForm.select1,
- payName:this.selectForm.select2,
- dateType:this.selectForm.select3,
- dateStr:this.thisyear,
- ...this.listForm
- }
- API.sellList(obj).then(response => {
-
- if (response) {
- if (this.listForm.pageIndex == 1) {
- this.recordList = response.data.data;
- this.listForm.pageIndex = response.data.pageNumber;
- this.listForm.totalPage = response.data.totalPage;
- } else {
- this.recordList = [
- ...this.recordList,
- ...response.data.data
- ];
- }
- }
- this.listForm.pageIndex++;
-
- this.$refs.common.showLoading(false);
-
- }).catch(error => {
- this.$refs.common.showLoading(false, error);
- })
- },
- show3cancel(op) {
- },
- show1confirm(op) {
- var i = op[0];
- this.selectForm.select1Index=i;
- var obj = this.selectList1[i]
- this.selectForm.select1 = obj.id;
- this.selectForm.select1Name = obj.licensePlateNumber;
- this.getSellList();
- },
- show2confirm(op) {
-
- var i = op[0];
- this.selectForm.select2Index=i;
- var obj = this.selectList2[i]
- this.selectForm.select2 = obj.id;
- this.selectForm.select2Name = obj.name;
- this.getSellList();
- },
- show3confirm(op) {
- var i = op[0];
- this.selectForm.select2Index=i;
- var obj = this.selectList2[i]
-
- this.selectForm.select3 = obj.id;
- this.selectForm.select3Name = obj.name;
- this.getSellList();
- },
- },
- onLoad(temp) {
- this.clientHeight = document.body.clientHeight;
- this.thisyear = temp.time
- //this.selectForm.select3
- },
- onReady() {
- this.getMerchantVehicleList();
- }
- }
|