Prechádzať zdrojové kódy

统计打印调整,h5放行记录加车牌搜索

lzm 2 rokov pred
rodič
commit
d9b4ba43cb

+ 26 - 5
app/pages/inout-record/inout-record.vue

@@ -4,6 +4,9 @@
 			<view class="top">
 				<text class="title">出入记录</text>
 			</view>
+			<u-search placeholder="输入车牌号查询" shape="square" v-model="carNo" @search="searchFn"
+				:height="80" style="margin: 30rpx;">
+			</u-search>
 		</view>
 		<!-- <u-sticky offset-top="0">
 			<u-tabs :list="tabs" @change="change" :current="current" :is-scroll="false"></u-tabs>
@@ -18,14 +21,14 @@
 					<view class="item car-num-item">
 						<text class="car-num">{{recordItem.carNo}}</text>
 					</view>
-					<view class="item">
+					<!-- <view class="item">
 						<text class="p1">联系人:</text>
 						<text class="p2">{{recordItem.driverName}}</text>
-					</view>
-					<view class="item">
+					</view> -->
+					<!-- <view class="item">
 						<text class="p1">联系电话:</text>
 						<text class="p2">{{recordItem.driverPhone}}</text>
-					</view>
+					</view> -->
 					<view class="item" >
 						<text class="p1">入场时间:</text>
 						<text class="p2">{{recordItem.realInTime}}</text>
@@ -58,6 +61,7 @@
 	export default {
 		data() {
 			return {
+				carNo:'',
 				current:0,
 				pageNo: 1,
 				pageSize: 4,
@@ -137,7 +141,24 @@
 				}else{
 					this.status = 'nomore';
 				}
-			} 
+			} ,
+			searchFn() {
+				console.log(123);
+				this.$api.getInOutRecord({
+					carNo:this.carNo,
+					current: this.current,
+					pageNo: this.pageNo,
+					pageSize: this.pageSize,
+					dataCount: this.dataCount,
+				}).then(resp => {
+					this.status = 'loadmore';
+					let recordList = resp.data;
+					this.dataCount = resp.dataCount;
+					this.pageNo = resp.pageNo;
+					this.recordItemList = recordList;
+					if(this.dataCount < this.pageSize * this.pageNo) this.status = 'nomore';
+				})
+			}
 		},
 		onShow() {
 			this.getRecordList();

+ 38 - 10
sp-admin/sa-view/tb-fee-statistics/month-statistcs-list.html

@@ -51,8 +51,7 @@
 				<!-- ------------- 快捷按钮 ------------- -->
 				<div class="fast-btn">
 					<el-button size="mini" type="info" @click="sa.f5()">刷新</el-button>
-					<el-button type="warning"  >导出(月统计)</el-button>
-					<el-button type="warning"  @click="exportFn()">导出(月报表)</el-button>
+					<el-button type="warning"  @click="exportFn()">导出(月统计)</el-button>
 					<el-button class="c-btn" type="success" icon="el-icon" @click="print()">打印(月报表)</el-button>
 
 				</div>
@@ -150,19 +149,48 @@
 				},
 				methods: {
 					print: function() {
-						this.$confirm('确定打印符合条件的数据?', '提示', {
+						if ( this.selectMonth != null && this.selectMonth.length != 0) {
+							this.selectMonthRange.beginMonth = this.selectMonth[0];
+							this.selectMonthRange.endMonth = this.selectMonth[1];
+						}
+
+						var beginMonth = this.selectMonthRange.beginMonth;
+						var endMonth = this.selectMonthRange.endMonth;
+						var feeType = this.p.feeType;
+						var str = '';
+						if(beginMonth === '' && endMonth === ''){
+							str += '所有月份';
+						}else {
+							str += beginMonth + "至" + endMonth
+						}
+						if(feeType === ''){
+							str += "、所有收费项目";
+						}else{
+							var feeTypeName = '';
+							if(feeType == 1){
+								feeTypeName = "核酸检测";
+							}else if(feeType == 2){
+								feeTypeName = "消杀作业";
+							}else if(feeType == 3){
+								feeTypeName = "装卸作业";
+							}else if(feeType == 4){
+								feeTypeName = "停车费";
+							}else if(feeType == 5){
+								feeTypeName = "过磅费";
+							}else if(feeType == 6){
+								feeTypeName = "入场管理费";
+							}else if(feeType == 7){
+								feeTypeName = "充电打冷作业";
+							}
+							str += "、收费项目为" + feeTypeName;
+						}
+
+						this.$confirm('确定打印'+str+'的数据?', '提示', {
 							confirmButtonText: '确定',
 							cancelButtonText: '取消',
 							type: 'warning'
 						}).then(() => {
-							if ( this.selectMonth != null && this.selectMonth.length != 0) {
-								this.selectMonthRange.beginMonth = this.selectMonth[0];
-								this.selectMonthRange.endMonth = this.selectMonth[1];
-							}
 
-							var beginMonth = this.selectMonthRange.beginMonth;
-							var endMonth = this.selectMonthRange.endMonth;
-							var feeType = this.p.feeType;
 
 
 							sa.showIframe('打印月报表', 'dayStatsPrint.html?beginMonth='+beginMonth+"&endMonth="+endMonth+"&feeType="+feeType+"&isMonth=1" , '1000px', '100%');

+ 75 - 16
sp-admin/sa-view/tb-fee-statistics/tb-fee-details-list.html

@@ -30,6 +30,13 @@
 			background: transparent;
 			padding: 0 !important;
 		}
+		.price-t{
+			font-size: 14px;
+			font-weight: bold;
+			line-height: 2em;
+			margin-bottom: 3px;
+			float: right;
+		}
 	</style>
 	<body>
 		<div class="vue-box" style="display: none;" :style="'display: block;'">
@@ -82,8 +89,8 @@
 				</el-form>
 				<!-- ------------- 快捷按钮 ------------- -->
 				<div class="fast-btn">
-					<el-button type="info"  icon="el-icon-refresh"  @click="sa.f5()">刷新</el-button>
-					<el-button type="warning" icon="el-icon-download" @click="exportFn()">导出</el-button>
+					<el-button type="info"    @click="sa.f5()">刷新</el-button>
+					<el-button type="warning"  @click="exportFn()">导出</el-button>
 					<el-button class="c-btn" type="success" icon="el-icon" @click="print()">打印</el-button>
 					<slot></slot>
 				</div>
@@ -93,13 +100,19 @@
 					<el-button class="c-btn" type="success" icon="el-icon" @click="jiChaConfirm()">稽查确认</el-button>
 					<el-button class="c-btn" type="danger" icon="el-icon" @click="jiChaCancel()">取消确认</el-button>
 					<slot></slot>
+					<div class="price-t">
+						总金额<span style="color: #ff6600">&nbsp&nbsp{{totalPrice}}&nbsp&nbsp</span>元
+					</div>
 				</div>
 				<!-- ------------- 数据列表 ------------- -->
 				<el-table class="data-table" ref="data-table" :data="dataList" >
 					<sa-td type="selection"></sa-td>
-					<sa-td name="作业类型" prop="feeType" type="enum"
+<!--					<sa-td name="作业类型" prop="feeType" type="enum"-->
+<!--						   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车费', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>-->
+					<sa-td name="收费项目" prop="feeType" type="enum"
 						   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车费', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
-					<sa-td name="收费项目" prop="itemTypeName" ></sa-td>
+					<sa-td name="业务类型" prop="itemTypeName" ></sa-td>
+					<sa-td name="车型" prop="itemName" ></sa-td>
 					<sa-td name="车牌号" prop="carNo" width="90px" ></sa-td>
 					<sa-td name="重量(kg)" prop="weight" ></sa-td>
 					<sa-td name="数量" prop="num" ></sa-td>
@@ -135,7 +148,7 @@
 						</template>
 					</el-table-column>
 <!--					<sa-td name="订单编号" prop="transactionId" width="220px" ></sa-td>-->
-					<el-table-column label="订单编号" width="220px">
+					<el-table-column label="微信支付业务单号" width="220px">
 						<template slot-scope="s">
 							<el-tooltip :content="s.row.transactionId"placement="bottom"effect="light">
 								<el-button class="keyButton">{{ s.row.transactionId }}</el-button>
@@ -248,8 +261,19 @@
 							endTime: '', //查询结束时间
 						}
 					},
+					totalPrice: 0,
 				},
 				methods: {
+					getTotalPrice(){
+						if ( this.selectTime != null && this.selectTime.length != 0) {
+							this.selectTimeRange.beginTime = this.selectTime[0];
+							this.selectTimeRange.endTime = this.selectTime[1];
+						}
+						sa.ajax('/TbFeeDetails/getTotalMoney?beginTime='+this.selectTimeRange.beginTime+'&endTime='+this.selectTimeRange.endTime,
+								sa.removeNull(this.p), function(res) {
+									this.totalPrice = res.data;
+								}.bind(this));
+					},
 					kaiDanConfirm(){
 						let selection = this.$refs['data-table'].selection;
 						let ids = sa.getArrayField(selection, 'id');
@@ -319,22 +343,56 @@
 
 						});
 					},
-					print: function(data) {
-						this.$confirm('确定打印符合条件的数据?', '提示', {
+					print: function() {
+						if ( this.selectTime != null && this.selectTime.length != 0) {
+							this.selectTimeRange.beginTime = this.selectTime[0];
+							this.selectTimeRange.endTime = this.selectTime[1];
+						}
+
+						var beginTime = this.selectTimeRange.beginTime;
+						var endTime = this.selectTimeRange.endTime;
+						var feeType = this.p.feeType;
+						var itemTypeName = this.p.itemTypeName;
+
+						var str = '';
+						if(beginTime === '' && endTime === ''){
+							str += '所有时间';
+						}else {
+							str += beginTime + "至" + endTime
+						}
+						if(feeType === ''){
+							str += "、所有收费项目";
+						}else{
+							var feeTypeName = '';
+							if(feeType == 1){
+								feeTypeName = "核酸检测";
+							}else if(feeType == 2){
+								feeTypeName = "消杀作业";
+							}else if(feeType == 3){
+								feeTypeName = "装卸作业";
+							}else if(feeType == 4){
+								feeTypeName = "停车费";
+							}else if(feeType == 5){
+								feeTypeName = "过磅费";
+							}else if(feeType == 6){
+								feeTypeName = "入场管理费";
+							}else if(feeType == 7){
+								feeTypeName = "充电打冷作业";
+							}
+							str += "、收费项目为" + feeTypeName;
+						}
+						if(itemTypeName === ''){
+							str += "、所有业务类型";
+						}else{
+							str += "、业务类型为" + itemTypeName;
+						}
+
+						this.$confirm('确定打印'+str+'的数据?', '提示', {
 							confirmButtonText: '确定',
 							cancelButtonText: '取消',
 							type: 'warning'
 						}).then(() => {
-							if ( this.selectTime != null && this.selectTime.length != 0) {
-								this.selectTimeRange.beginTime = this.selectTime[0];
-								this.selectTimeRange.endTime = this.selectTime[1];
-							}
 
-							var beginTime = this.selectTimeRange.beginTime;
-							var endTime = this.selectTimeRange.endTime;
-							var feeType = this.p.feeType;
-							var itemTypeName = this.p.itemTypeName;
-							console.log("beginTime:"+ beginTime);
 							sa.showIframe('打印申报信息表', 'detailPrint.html?beginTime='+beginTime+"&endTime="+endTime+"&feeType="+feeType+"&itemTypeName="+itemTypeName , '1000px', '100%');
 						}).catch(() => {
 
@@ -382,6 +440,7 @@
 							this.dataCount = res.dataCount; // 数据总数 
 							sa.f5TableHeight();		// 刷新表格高度 
 						}.bind(this));
+						this.getTotalPrice();
 					},
 					// 查看
 					get: function(data) {

+ 38 - 8
sp-admin/sa-view/tb-fee-statistics/tb-fee-statistics-list.html

@@ -141,19 +141,49 @@
 				},
 				methods: {
 					print: function() {
-						this.$confirm('确定打印符合条件的数据?', '提示', {
+						if ( this.selectDay != null && this.selectDay.length != 0) {
+							this.selectDayRange.beginDay = this.selectDay[0];
+							this.selectDayRange.endDay = this.selectDay[1];
+						}
+
+						var beginDay = this.selectDayRange.beginDay;
+						var endDay = this.selectDayRange.endDay;
+						var feeType = this.p.feeType;
+
+						var str = '';
+						if(beginDay === '' && endDay === ''){
+							str += '所有时间';
+						}else {
+							str += beginDay + "至" + endDay
+						}
+						if(feeType === ''){
+							str += "、所有收费项目";
+						}else{
+							var feeTypeName = '';
+							if(feeType == 1){
+								feeTypeName = "核酸检测";
+							}else if(feeType == 2){
+								feeTypeName = "消杀作业";
+							}else if(feeType == 3){
+								feeTypeName = "装卸作业";
+							}else if(feeType == 4){
+								feeTypeName = "停车费";
+							}else if(feeType == 5){
+								feeTypeName = "过磅费";
+							}else if(feeType == 6){
+								feeTypeName = "入场管理费";
+							}else if(feeType == 7){
+								feeTypeName = "充电打冷作业";
+							}
+							str += "、收费项目为" + feeTypeName;
+						}
+
+						this.$confirm('确定打印'+str+'的数据?', '提示', {
 							confirmButtonText: '确定',
 							cancelButtonText: '取消',
 							type: 'warning'
 						}).then(() => {
-							if ( this.selectDay != null && this.selectDay.length != 0) {
-								this.selectDayRange.beginDay = this.selectDay[0];
-								this.selectDayRange.endDay = this.selectDay[1];
-							}
 
-							var beginDay = this.selectDayRange.beginDay;
-							var endDay = this.selectDayRange.endDay;
-							var feeType = this.p.feeType;
 
 
 							sa.showIframe('打印日报表', 'dayStatsPrint.html?beginDay='+beginDay+"&endDay="+endDay+"&feeType="+feeType , '1000px', '100%');

+ 32 - 3
sp-admin/sa-view/tb-fee-statistics/year-statistcs-list.html

@@ -117,13 +117,42 @@
 				},
 				methods: {
 					print: function() {
-						this.$confirm('确定打印符合条件的数据?', '提示', {
+						var year = this.p.year;
+						var feeType = this.p.feeType;
+						var str = '';
+						if(year === ''){
+							str += '所有年份';
+						}else {
+							str += year + '年'
+						}
+						if(feeType === ''){
+							str += "、所有收费项目";
+						}else{
+							var feeTypeName = '';
+							if(feeType == 1){
+								feeTypeName = "核酸检测";
+							}else if(feeType == 2){
+								feeTypeName = "消杀作业";
+							}else if(feeType == 3){
+								feeTypeName = "装卸作业";
+							}else if(feeType == 4){
+								feeTypeName = "停车费";
+							}else if(feeType == 5){
+								feeTypeName = "过磅费";
+							}else if(feeType == 6){
+								feeTypeName = "入场管理费";
+							}else if(feeType == 7){
+								feeTypeName = "充电打冷作业";
+							}
+							str += "、收费项目为" + feeTypeName;
+						}
+
+						this.$confirm('确定打印'+str+'的数据?', '提示', {
 							confirmButtonText: '确定',
 							cancelButtonText: '取消',
 							type: 'warning'
 						}).then(() => {
-							var year = this.p.year;
-							var feeType = this.p.feeType;
+
 
 							sa.showIframe('打印年报表', 'dayStatsPrint.html?year='+year+"&feeType="+feeType+"&isYear=1" , '1000px', '100%');
 						}).catch(() => {

+ 1 - 1
sp-admin/sa-view/tb-partner/tb-business-item-list.html

@@ -50,7 +50,7 @@
 					<sa-td name="越南车" prop="cardNo"></sa-td>
 					<sa-td name="中国车" prop="chinaCarNo"></sa-td>
 					<sa-td name="作业公司" prop="pickCustomerName"></sa-td>
-					<sa-td name="项目" prop="itemName" width="120"></sa-td>
+					<sa-td name="车型" prop="itemName" width="120"></sa-td>
 					<sa-td name="类型" prop="itemTypeName" width="120"></sa-td>
 					<sa-td name="计费标准" prop="unit">
 						<template slot-scope="s">

+ 7 - 0
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsController.java

@@ -121,6 +121,13 @@ public class TbFeeDetailsController {
         List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class);
         tbFeeDetailsService.jiChaCancel(ids);
         return AjaxJson.getSuccess();
+}
+
+    @RequestMapping("getTotalMoney")
+    public AjaxJson getTotalMoney() {
+        SoMap so = SoMap.getRequestSoMap();
+        BigDecimal totalPirce = tbFeeDetailsService.getTotalMoney(so);
+        return AjaxJson.getSuccessData(totalPirce);
     }
 
 

+ 3 - 0
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsMapper.java

@@ -1,5 +1,6 @@
 package com.pj.project.tb_fee_details;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -58,4 +59,6 @@ public interface TbFeeDetailsMapper extends BaseMapper<TbFeeDetails> {
 	List<FeeTypeStatics> getFeeTypeStatics(@Param("startDay") String startDay,@Param("endDay") String endDay);
 
 	List<FeeTypeStatics> itemTypeStatics(@Param("startDay") String startDay,@Param("endDay") String endDay);
+
+    BigDecimal getTotalMoney(SoMap so);
 }

+ 21 - 0
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsMapper.xml

@@ -121,5 +121,26 @@
 		 GROUP BY item_type_name order by price;
 	</select>
 
+    <select id="getTotalMoney" resultType="BigDecimal">
+        SELECT SUM(item_price) as total_price
+        FROM tb_fee_details
+        <where>
+            <if test=' this.has("carNo") '> and car_no like concat('%',#{carNo},'%') </if>
+            <if test=' this.has("feeType") '> and fee_type = #{feeType} </if>
+            <if test=' this.has("itemTypeId") '> and item_type_id = #{itemTypeId} </if>
+            <if test=' this.has("itemTypeName") '> and item_type_name = #{itemTypeName} </if>
+            <if test=' this.has("itemId") '> and item_id = #{itemId} </if>
+            <if test=' this.has("itemName") '> and item_name = #{itemName} </if>
+            <if test=' this.has("payDay") '> and pay_day = #{payDay} </if>
+            <if test=' this.has("payType") '> and pay_type = #{payType} </if>
+            <if test=' this.has("createTime") '> and create_time = #{createTime} </if>
+            <if test=' this.has("beginTime") and this.has("endTime") '>
+                and pay_day >= #{beginTime}
+                and pay_day  &lt;= #{endTime}
+            </if>
+            <if test=' this.has("type")'> and fee_type in (${type}) </if>
+        </where>
+	</select>
+
 
 </mapper>

+ 6 - 0
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsService.java

@@ -458,6 +458,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
         List<TbFeeDetails> detailsList = this.listByIds(ids);
         Set<String> days = new HashSet<>();
         for (TbFeeDetails detail : detailsList) {
+
             detail.setKaiDanPerson(admin.getName());
             String dayStr = DateUtil.format(detail.getCreateTime(), "yyyy-MM-dd");
             days.add(dayStr);
@@ -557,4 +558,9 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
             tbFeeStatisticsService.updateBatchById(statsList);
         }
     }
+
+    public BigDecimal getTotalMoney(SoMap so) {
+
+        return tbFeeDetailsMapper.getTotalMoney(so);
+    }
 }