123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- import * as API from '@/apis/merchant.js'
- export default {
- data() {
- return {
- isLoading:false,
- thisyear: 0,
- params: {
- year: true,
- month: true,
- day: false,
- hour: false,
- minute: false,
- second: false,
- // 选择时间的时间戳
- timestamp: true,
- },
- show1: false,
- show2: false,
- show3: false,
- selectForm: {
- select1Index:0,
- select2Index: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: '纸质车票'
- },
- ],
- profitList: [],
- mymap: {},
- }
- },
- methods: {
- gotoUrl(data){
- uni.navigateTo({
- url:"/pages/order/list?time="+data
- })
- },
- 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.getProfitList();
- }).catch(error => {
- this.$refs.common.showLoading(false, error);
- })
- },
- getProfitList() {
- this.$refs.common.showLoading();
- var obj={
- vehicleId:this.selectForm.select1,
- payName:this.selectForm.select2,
- dateStr:this.selectForm.select3,
- }
- API.profitList(obj).then(response => {
- this.isLoading=true;
- // selectList1
- this.profitList = response.data;
- 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.getProfitList();
- },
- 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.getProfitList();
- },
- show3confirm(op) {
- console.log(op)
- var select = op.year + "-" + op.month;
- var selectName = op.year + "年" + op.month + "月";
- this.selectForm.select3 = select;
- this.selectForm.select3Name = selectName;
- this.getProfitList();
- },
- },
- onLoad(temp) {
- var myDate = new Date();
- var tYear = myDate.getFullYear();
- this.thisyear = tYear
-
- //this.selectForm.select3
- },
- onReady() {
- this.getMerchantVehicleList();
- }
- }
|