Kaynağa Gözat

新增营收统计列表

vonin 4 yıl önce
ebeveyn
işleme
7f23f3f766
2 değiştirilmiş dosya ile 162 ekleme ve 3 silme
  1. 162 3
      pages/class/list.vue
  2. BIN
      static/img/tongji.png

+ 162 - 3
pages/class/list.vue

@@ -4,6 +4,28 @@
 		<u-navbar   title="班次统计" :is-back="true" >
 				<view class="slot-wrap"></view>	
 		</u-navbar>
+		<view class="von-sy">
+			<view class="von-sy-select flex-sp" style="background-color: white;">
+				<navigator>全部车辆<text class="icon iconfont icon-xiajiantou"></text></navigator>
+				<navigator>全部日期<text class="icon iconfont icon-xiajiantou"></text></navigator>
+			</view>
+			<view class="von-sy-content">
+				<view class="von-sy-area">
+					
+					<u-cell-group>
+						<u-cell-item v-for="item,i in profitList.list" :key="i" :title="item.dateDesc" :value="'+'+item.revenue+'元'"  @click="gotoUrl(item.dateDesc)" ></u-cell-item>
+					</u-cell-group>
+					
+					<view  v-if="isLoading&&profitList.list&&profitList.list.length==0" style="text-align:center;margin-top: 40px;" >
+						<img src="static/img/null.png" style="width: 50%;" alt="" >
+						<view>暂无数据</view>
+					 
+					</view>
+					
+				</view>
+				 
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -11,15 +33,152 @@
 	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();
 		}
 	}
 </script>
 
 <style>
-
+page{
+		background-color:#eee;
+	}
 </style>

BIN
static/img/tongji.png