ccjgmwz 2 yıl önce
ebeveyn
işleme
2851f8d9cc

+ 206 - 203
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/wuye/impl/WuyeAmountInfoServiceImpl.java

@@ -15,220 +15,223 @@ import com.iotechn.unimall.data.mapper.wuye.WuyeAmountInfoMapper;
 import com.iotechn.unimall.data.domain.wuye.WuyeAmountInfo;
 import com.iotechn.unimall.admin.api.wuye.IWuyeAmountInfoService;
 import com.iotechn.unimall.data.model.Page;
+
 import java.util.Date;
+
 import org.springframework.transaction.annotation.Transactional;
 
 /**
  * infoService业务层处理
- * 
+ *
  * @author jlb
  * @date 2022-10-12
  */
 @Service
-public class WuyeAmountInfoServiceImpl implements IWuyeAmountInfoService{
-	@Autowired
-	private WuyeAmountInfoMapper wuyeAmountInfoMapper;
-	
-	@Override
-	public Boolean add(WuyeAmountInfo wuyeAmountInfo,Long adminId) throws ServiceException {
-		Date now = new Date();
-		wuyeAmountInfo.setGmtCreate(now);
-		wuyeAmountInfo.setGmtUpdate(now);
-		wuyeAmountInfo.setAdminId(adminId);
-		return wuyeAmountInfoMapper.insert(wuyeAmountInfo)>0;
-	}
+public class WuyeAmountInfoServiceImpl implements IWuyeAmountInfoService {
+    @Autowired
+    private WuyeAmountInfoMapper wuyeAmountInfoMapper;
+
+    @Override
+    public Boolean add(WuyeAmountInfo wuyeAmountInfo, Long adminId) throws ServiceException {
+        Date now = new Date();
+        wuyeAmountInfo.setGmtCreate(now);
+        wuyeAmountInfo.setGmtUpdate(now);
+        wuyeAmountInfo.setAdminId(adminId);
+        return wuyeAmountInfoMapper.insert(wuyeAmountInfo) > 0;
+    }
+
+    @Override
+    public Page<WuyeAmountInfo> list(String buildingNo, String unitNo, String floor, String sourceNumber, String householder, Double predictedArea, Double actualMoney, Double propertyFee, Double elevatorFee, Double parkingSpace, String cheweiNo, Double garage, String garageNo, Double warehouse, String warehouseNo, Double garbageClearing, Date paymentDate, String paymentMethod, Double totalActualPayment, String paymentRange, Long deleteFlag, Date gmtCreate, Date gmtUpdate, Long userId, Long adminId, Integer page, Integer limit) throws ServiceException {
+        Wrapper<WuyeAmountInfo> wrapper = new EntityWrapper<WuyeAmountInfo>();
+        if (!StringUtils.isEmpty(buildingNo)) {
+            wrapper.eq("building_no", buildingNo);
+        }
+        if (!StringUtils.isEmpty(unitNo)) {
+            wrapper.eq("unit_no", unitNo);
+        }
+        if (!StringUtils.isEmpty(floor)) {
+            wrapper.eq("floor", floor);
+        }
+        if (!StringUtils.isEmpty(sourceNumber)) {
+            wrapper.eq("source_number", sourceNumber);
+        }
+        if (!StringUtils.isEmpty(householder)) {
+            wrapper.eq("householder", householder);
+        }
+        if (!StringUtils.isEmpty(predictedArea)) {
+            wrapper.eq("predicted_area", predictedArea);
+        }
+        if (!StringUtils.isEmpty(actualMoney)) {
+            wrapper.eq("actual_money", actualMoney);
+        }
+        if (!StringUtils.isEmpty(propertyFee)) {
+            wrapper.eq("property_fee", propertyFee);
+        }
+        if (!StringUtils.isEmpty(elevatorFee)) {
+            wrapper.eq("elevator_fee", elevatorFee);
+        }
+        if (!StringUtils.isEmpty(parkingSpace)) {
+            wrapper.eq("parking_space", parkingSpace);
+        }
+        if (!StringUtils.isEmpty(cheweiNo)) {
+            wrapper.eq("chewei_no", cheweiNo);
+        }
+        if (!StringUtils.isEmpty(garage)) {
+            wrapper.eq("garage", garage);
+        }
+        if (!StringUtils.isEmpty(garageNo)) {
+            wrapper.eq("garage_no", garageNo);
+        }
+        if (!StringUtils.isEmpty(warehouse)) {
+            wrapper.eq("warehouse", warehouse);
+        }
+        if (!StringUtils.isEmpty(warehouseNo)) {
+            wrapper.eq("warehouse_no", warehouseNo);
+        }
+        if (!StringUtils.isEmpty(garbageClearing)) {
+            wrapper.eq("garbage_clearing", garbageClearing);
+        }
+        if (!StringUtils.isEmpty(paymentDate)) {
+            wrapper.eq("payment_date", paymentDate);
+        }
+        if (!StringUtils.isEmpty(paymentMethod)) {
+            wrapper.eq("payment_method", paymentMethod);
+        }
+        if (!StringUtils.isEmpty(totalActualPayment)) {
+            wrapper.eq("total_actual_payment", totalActualPayment);
+        }
+        if (!StringUtils.isEmpty(paymentRange)) {
+            wrapper.eq("payment_range", paymentRange);
+        }
+        if (!StringUtils.isEmpty(deleteFlag)) {
+            wrapper.eq("delete_flag", deleteFlag);
+        }
+        if (!StringUtils.isEmpty(gmtCreate)) {
+            wrapper.eq("gmt_create", gmtCreate);
+        }
+        if (!StringUtils.isEmpty(gmtUpdate)) {
+            wrapper.eq("gmt_update", gmtUpdate);
+        }
+        if (!StringUtils.isEmpty(userId)) {
+            wrapper.eq("user_id", userId);
+        }
+        if (!StringUtils.isEmpty(adminId)) {
+            wrapper.eq("admin_id", adminId);
+        }
+        wrapper.eq("delete_flag", 0);
+		wrapper.orderBy("source_number");
+        List<WuyeAmountInfo> list = wuyeAmountInfoMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
+        Integer count = wuyeAmountInfoMapper.selectCount(wrapper);
+        return new Page<WuyeAmountInfo>(list, page, limit, count);
+    }
 
-	@Override
-	public Page<WuyeAmountInfo> list(String buildingNo,String unitNo,String floor,String sourceNumber,String householder,Double predictedArea,Double actualMoney,Double propertyFee,Double elevatorFee,Double parkingSpace,String cheweiNo,Double garage,String garageNo,Double warehouse,String warehouseNo,Double garbageClearing,Date paymentDate,String paymentMethod,Double totalActualPayment,String paymentRange,Long deleteFlag,Date gmtCreate,Date gmtUpdate,Long userId,Long adminId, Integer page, Integer limit)throws ServiceException {
-		Wrapper<WuyeAmountInfo> wrapper = new EntityWrapper<WuyeAmountInfo>();
-														if (!StringUtils.isEmpty(buildingNo)) {
-					wrapper.eq("building_no", buildingNo);
-				}
-												if (!StringUtils.isEmpty(unitNo)) {
-					wrapper.eq("unit_no", unitNo);
-				}
-												if (!StringUtils.isEmpty(floor)) {
-					wrapper.eq("floor", floor);
-				}
-												if (!StringUtils.isEmpty(sourceNumber)) {
-					wrapper.eq("source_number", sourceNumber);
-				}
-												if (!StringUtils.isEmpty(householder)) {
-					wrapper.eq("householder", householder);
-				}
-												if (!StringUtils.isEmpty(predictedArea)) {
-					wrapper.eq("predicted_area", predictedArea);
-				}
-												if (!StringUtils.isEmpty(actualMoney)) {
-					wrapper.eq("actual_money", actualMoney);
-				}
-												if (!StringUtils.isEmpty(propertyFee)) {
-					wrapper.eq("property_fee", propertyFee);
-				}
-												if (!StringUtils.isEmpty(elevatorFee)) {
-					wrapper.eq("elevator_fee", elevatorFee);
-				}
-												if (!StringUtils.isEmpty(parkingSpace)) {
-					wrapper.eq("parking_space", parkingSpace);
-				}
-												if (!StringUtils.isEmpty(cheweiNo)) {
-					wrapper.eq("chewei_no", cheweiNo);
-				}
-												if (!StringUtils.isEmpty(garage)) {
-					wrapper.eq("garage", garage);
-				}
-												if (!StringUtils.isEmpty(garageNo)) {
-					wrapper.eq("garage_no", garageNo);
-				}
-												if (!StringUtils.isEmpty(warehouse)) {
-					wrapper.eq("warehouse", warehouse);
-				}
-												if (!StringUtils.isEmpty(warehouseNo)) {
-					wrapper.eq("warehouse_no", warehouseNo);
-				}
-												if (!StringUtils.isEmpty(garbageClearing)) {
-					wrapper.eq("garbage_clearing", garbageClearing);
-				}
-												if (!StringUtils.isEmpty(paymentDate)) {
-					wrapper.eq("payment_date", paymentDate);
-				}
-												if (!StringUtils.isEmpty(paymentMethod)) {
-					wrapper.eq("payment_method", paymentMethod);
-				}
-												if (!StringUtils.isEmpty(totalActualPayment)) {
-					wrapper.eq("total_actual_payment", totalActualPayment);
-				}
-												if (!StringUtils.isEmpty(paymentRange)) {
-					wrapper.eq("payment_range", paymentRange);
-				}
-																	if (!StringUtils.isEmpty(deleteFlag)) {
-					wrapper.eq("delete_flag", deleteFlag);
-				}
-												if (!StringUtils.isEmpty(gmtCreate)) {
-					wrapper.eq("gmt_create", gmtCreate);
-				}
-												if (!StringUtils.isEmpty(gmtUpdate)) {
-					wrapper.eq("gmt_update", gmtUpdate);
-				}
-												if (!StringUtils.isEmpty(userId)) {
-					wrapper.eq("user_id", userId);
-				}
-												if (!StringUtils.isEmpty(adminId)) {
-					wrapper.eq("admin_id", adminId);
-				}
-							wrapper.eq("delete_flag", 0);
-		List<WuyeAmountInfo> list = wuyeAmountInfoMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
-		Integer count = wuyeAmountInfoMapper.selectCount(wrapper);
-		return new Page<WuyeAmountInfo>(list, page, limit, count);
-	}
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean delete(Long id) {
+        String[] ids = String.valueOf(id).split(",");
+        for (String tt : ids) {
+            WuyeAmountInfo tmp = wuyeAmountInfoMapper.selectById(Long.parseLong(tt));
+            if (tmp != null) {
+                tmp.setDeleteFlag(1L);
+                wuyeAmountInfoMapper.updateById(tmp);
+            }
+        }
+        return true;
+    }
 
-	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public Boolean delete(Long id) {
-		String[] ids = String.valueOf(id).split(",");
-		for (String tt:ids) {
-			WuyeAmountInfo tmp =  wuyeAmountInfoMapper.selectById(Long.parseLong(tt));
-			if(tmp != null){
-				tmp.setDeleteFlag(1L);
-				wuyeAmountInfoMapper.updateById(tmp);
-			}
-		}
-		return true;
-	}
+    @Override
+    public Boolean update(WuyeAmountInfo wuyeAmountInfo, Long adminId) throws ServiceException {
+        Date now = new Date();
+        wuyeAmountInfo.setGmtUpdate(now);
+        wuyeAmountInfo.setAdminId(adminId);
+        return wuyeAmountInfoMapper.updateById(wuyeAmountInfo) > 0;
+    }
 
-	@Override
-	public Boolean update(WuyeAmountInfo wuyeAmountInfo,Long adminId) throws ServiceException {
-		Date now = new Date();
-		wuyeAmountInfo.setGmtUpdate(now);
-		wuyeAmountInfo.setAdminId(adminId);
-		return wuyeAmountInfoMapper.updateById(wuyeAmountInfo)>0;
-	}
+    @Override
+    public WuyeAmountInfo get(Long id) throws ServiceException {
+        return wuyeAmountInfoMapper.selectById(id);
+    }
 
-	@Override
-	public WuyeAmountInfo get(Long id) throws ServiceException {
-		return wuyeAmountInfoMapper.selectById(id);
-	}
-	
-	@Override
-	public String export(String buildingNo,String unitNo,String floor,String sourceNumber,String householder,Double predictedArea,Double actualMoney,Double propertyFee,Double elevatorFee,Double parkingSpace,String cheweiNo,Double garage,String garageNo,Double warehouse,String warehouseNo,Double garbageClearing,Date paymentDate,String paymentMethod,Double totalActualPayment,String paymentRange,Long deleteFlag,Date gmtCreate,Date gmtUpdate,Long userId,Long adminId, Integer page, Integer limit)throws ServiceException {
-		Wrapper<WuyeAmountInfo> wrapper = new EntityWrapper<WuyeAmountInfo>();
-														if (!StringUtils.isEmpty(buildingNo)) {
-					wrapper.eq("building_no", buildingNo);
-				}
-												if (!StringUtils.isEmpty(unitNo)) {
-					wrapper.eq("unit_no", unitNo);
-				}
-												if (!StringUtils.isEmpty(floor)) {
-					wrapper.eq("floor", floor);
-				}
-												if (!StringUtils.isEmpty(sourceNumber)) {
-					wrapper.eq("source_number", sourceNumber);
-				}
-												if (!StringUtils.isEmpty(householder)) {
-					wrapper.eq("householder", householder);
-				}
-												if (!StringUtils.isEmpty(predictedArea)) {
-					wrapper.eq("predicted_area", predictedArea);
-				}
-												if (!StringUtils.isEmpty(actualMoney)) {
-					wrapper.eq("actual_money", actualMoney);
-				}
-												if (!StringUtils.isEmpty(propertyFee)) {
-					wrapper.eq("property_fee", propertyFee);
-				}
-												if (!StringUtils.isEmpty(elevatorFee)) {
-					wrapper.eq("elevator_fee", elevatorFee);
-				}
-												if (!StringUtils.isEmpty(parkingSpace)) {
-					wrapper.eq("parking_space", parkingSpace);
-				}
-												if (!StringUtils.isEmpty(cheweiNo)) {
-					wrapper.eq("chewei_no", cheweiNo);
-				}
-												if (!StringUtils.isEmpty(garage)) {
-					wrapper.eq("garage", garage);
-				}
-												if (!StringUtils.isEmpty(garageNo)) {
-					wrapper.eq("garage_no", garageNo);
-				}
-												if (!StringUtils.isEmpty(warehouse)) {
-					wrapper.eq("warehouse", warehouse);
-				}
-												if (!StringUtils.isEmpty(warehouseNo)) {
-					wrapper.eq("warehouse_no", warehouseNo);
-				}
-												if (!StringUtils.isEmpty(garbageClearing)) {
-					wrapper.eq("garbage_clearing", garbageClearing);
-				}
-												if (!StringUtils.isEmpty(paymentDate)) {
-					wrapper.eq("payment_date", paymentDate);
-				}
-												if (!StringUtils.isEmpty(paymentMethod)) {
-					wrapper.eq("payment_method", paymentMethod);
-				}
-												if (!StringUtils.isEmpty(totalActualPayment)) {
-					wrapper.eq("total_actual_payment", totalActualPayment);
-				}
-												if (!StringUtils.isEmpty(paymentRange)) {
-					wrapper.eq("payment_range", paymentRange);
-				}
-																	if (!StringUtils.isEmpty(deleteFlag)) {
-					wrapper.eq("delete_flag", deleteFlag);
-				}
-												if (!StringUtils.isEmpty(gmtCreate)) {
-					wrapper.eq("gmt_create", gmtCreate);
-				}
-												if (!StringUtils.isEmpty(gmtUpdate)) {
-					wrapper.eq("gmt_update", gmtUpdate);
-				}
-												if (!StringUtils.isEmpty(userId)) {
-					wrapper.eq("user_id", userId);
-				}
-												if (!StringUtils.isEmpty(adminId)) {
-					wrapper.eq("admin_id", adminId);
-				}
-							List<WuyeAmountInfo> list = wuyeAmountInfoMapper.selectList(wrapper);
-		ExcelUtil<WuyeAmountInfo> util = new ExcelUtil<WuyeAmountInfo>(WuyeAmountInfo.class);
-		return util.exportExcel(list, "操作日志");
-	}
+    @Override
+    public String export(String buildingNo, String unitNo, String floor, String sourceNumber, String householder, Double predictedArea, Double actualMoney, Double propertyFee, Double elevatorFee, Double parkingSpace, String cheweiNo, Double garage, String garageNo, Double warehouse, String warehouseNo, Double garbageClearing, Date paymentDate, String paymentMethod, Double totalActualPayment, String paymentRange, Long deleteFlag, Date gmtCreate, Date gmtUpdate, Long userId, Long adminId, Integer page, Integer limit) throws ServiceException {
+        Wrapper<WuyeAmountInfo> wrapper = new EntityWrapper<WuyeAmountInfo>();
+        if (!StringUtils.isEmpty(buildingNo)) {
+            wrapper.eq("building_no", buildingNo);
+        }
+        if (!StringUtils.isEmpty(unitNo)) {
+            wrapper.eq("unit_no", unitNo);
+        }
+        if (!StringUtils.isEmpty(floor)) {
+            wrapper.eq("floor", floor);
+        }
+        if (!StringUtils.isEmpty(sourceNumber)) {
+            wrapper.eq("source_number", sourceNumber);
+        }
+        if (!StringUtils.isEmpty(householder)) {
+            wrapper.eq("householder", householder);
+        }
+        if (!StringUtils.isEmpty(predictedArea)) {
+            wrapper.eq("predicted_area", predictedArea);
+        }
+        if (!StringUtils.isEmpty(actualMoney)) {
+            wrapper.eq("actual_money", actualMoney);
+        }
+        if (!StringUtils.isEmpty(propertyFee)) {
+            wrapper.eq("property_fee", propertyFee);
+        }
+        if (!StringUtils.isEmpty(elevatorFee)) {
+            wrapper.eq("elevator_fee", elevatorFee);
+        }
+        if (!StringUtils.isEmpty(parkingSpace)) {
+            wrapper.eq("parking_space", parkingSpace);
+        }
+        if (!StringUtils.isEmpty(cheweiNo)) {
+            wrapper.eq("chewei_no", cheweiNo);
+        }
+        if (!StringUtils.isEmpty(garage)) {
+            wrapper.eq("garage", garage);
+        }
+        if (!StringUtils.isEmpty(garageNo)) {
+            wrapper.eq("garage_no", garageNo);
+        }
+        if (!StringUtils.isEmpty(warehouse)) {
+            wrapper.eq("warehouse", warehouse);
+        }
+        if (!StringUtils.isEmpty(warehouseNo)) {
+            wrapper.eq("warehouse_no", warehouseNo);
+        }
+        if (!StringUtils.isEmpty(garbageClearing)) {
+            wrapper.eq("garbage_clearing", garbageClearing);
+        }
+        if (!StringUtils.isEmpty(paymentDate)) {
+            wrapper.eq("payment_date", paymentDate);
+        }
+        if (!StringUtils.isEmpty(paymentMethod)) {
+            wrapper.eq("payment_method", paymentMethod);
+        }
+        if (!StringUtils.isEmpty(totalActualPayment)) {
+            wrapper.eq("total_actual_payment", totalActualPayment);
+        }
+        if (!StringUtils.isEmpty(paymentRange)) {
+            wrapper.eq("payment_range", paymentRange);
+        }
+        if (!StringUtils.isEmpty(deleteFlag)) {
+            wrapper.eq("delete_flag", deleteFlag);
+        }
+        if (!StringUtils.isEmpty(gmtCreate)) {
+            wrapper.eq("gmt_create", gmtCreate);
+        }
+        if (!StringUtils.isEmpty(gmtUpdate)) {
+            wrapper.eq("gmt_update", gmtUpdate);
+        }
+        if (!StringUtils.isEmpty(userId)) {
+            wrapper.eq("user_id", userId);
+        }
+        if (!StringUtils.isEmpty(adminId)) {
+            wrapper.eq("admin_id", adminId);
+        }
+        List<WuyeAmountInfo> list = wuyeAmountInfoMapper.selectList(wrapper);
+        ExcelUtil<WuyeAmountInfo> util = new ExcelUtil<WuyeAmountInfo>(WuyeAmountInfo.class);
+        return util.exportExcel(list, "操作日志");
+    }
 }

+ 1 - 1
unimall-admin/index.html

@@ -5,7 +5,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="renderer" content="webkit">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
-    <title>电商后台管理</title>
+    <title>东方御后台管理</title>
   </head>
   <body>
     <script src=<%= BASE_URL %>/tinymce4.7.5/tinymce.min.js></script>

+ 1 - 1
unimall-admin/src/views/login/index.vue

@@ -11,7 +11,7 @@
           class="img"
           src="@/assets/avatar.png"
           alt="">
-        <p class="title">电商后台登录</p>
+        <p class="title">东方御后台管理</p>
       </div>
       <div class="login-border">
         <div class="login-main">

+ 84 - 24
unimall-admin/src/views/wuye/info/index.vue

@@ -131,8 +131,8 @@
       </el-col>
     </el-row>
 
-    <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" fixed width="55" align="center" />
+    <el-table v-loading="loading" :data="infoList" :summary-method="getSummaries" show-summary @selection-change="handleSelectionChange">
+      <el-table-column type="selection" fixed width="85px" align="center" />
       <!-- <el-table-column label="楼号" align="center" prop="buildingNo" /> -->
       <!-- <el-table-column label="单元号" align="center" prop="unitNo" /> -->
       <!-- <el-table-column label="楼层" align="center" prop="floor" /> -->
@@ -156,7 +156,7 @@
       </el-table-column>
       <el-table-column label="缴费方式" align="center" prop="paymentMethod" />
       <el-table-column label="实缴合计" align="center" prop="totalActualPayment" />
-      <el-table-column label="缴费区间" width="150px" align="center" prop="paymentRange" />
+      <el-table-column label="缴费区间" width="250px" align="center" prop="paymentRange" />
       <el-table-column label="备注" align="center" prop="remark" />
       <el-table-column label="操作" width="150px" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -167,22 +167,31 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
           >修改</el-button>
-          <el-button
+          <!-- <el-button
             v-permission="['wuye:info:remove']"
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-          >删除</el-button>
+          >删除</el-button> -->
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-position"
+            @click="handlePrint(scope.row)"
+          >打印</el-button>
         </template>
       </el-table-column>
     </el-table>
 
-    <pagination
+    <el-pagination
       v-show="total>0"
       :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
+      :current-page="queryParams.pageNum"
+      :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]"
+      layout="total, sizes, prev, pager, next, jumper"
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
       @pagination="getList"
     />
 
@@ -190,21 +199,21 @@
     <el-dialog :title="title" :visible.sync="open" width="500px">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="楼号" prop="buildingNo">
-          <el-input v-model="form.buildingNo" placeholder="请输入楼号" />
+          <el-input v-model="form.buildingNo" placeholder="请输入楼号" disabled/>
         </el-form-item>
         <el-form-item label="单元号" prop="unitNo">
-          <el-input v-model="form.unitNo" placeholder="请输入单元号" />
+          <el-input v-model="form.unitNo" placeholder="请输入单元号" disabled/>
         </el-form-item>
         <el-form-item label="楼层" prop="floor">
-          <el-input v-model="form.floor" placeholder="请输入楼层" />
+          <el-input v-model="form.floor" placeholder="请输入楼层" disabled/>
         </el-form-item>
         <el-form-item label="房源号" prop="sourceNumber">
-          <el-input v-model="form.sourceNumber" placeholder="请输入房源号" />
+          <el-input v-model="form.sourceNumber" placeholder="请输入房源号" disabled/>
         </el-form-item>
         <el-form-item label="户主" prop="householder">
           <el-input v-model="form.householder" placeholder="请输入户主" />
         </el-form-item>
-        <el-form-item label="预测面积" prop="predictedArea">
+        <!-- <el-form-item label="预测面积" prop="predictedArea">
           <el-input v-model="form.predictedArea" placeholder="请输入预测面积" />
         </el-form-item>
         <el-form-item label="实际面积" prop="actualMoney">
@@ -218,23 +227,23 @@
         </el-form-item>
         <el-form-item label="一年车位管理费" prop="parkingSpace">
           <el-input v-model="form.parkingSpace" placeholder="请输入一年车位管理费" />
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="车位号" prop="cheweiNo">
           <el-input v-model="form.cheweiNo" placeholder="请输入车位号" />
         </el-form-item>
-        <el-form-item label="一年车库管理费" prop="garage">
+        <!-- <el-form-item label="一年车库管理费" prop="garage">
           <el-input v-model="form.garage" placeholder="请输入一年车库管理费" />
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="车库号" prop="garageNo">
           <el-input v-model="form.garageNo" placeholder="请输入车库号" />
         </el-form-item>
-        <el-form-item label="一年仓库管理费" prop="warehouse">
+        <!-- <el-form-item label="一年仓库管理费" prop="warehouse">
           <el-input v-model="form.warehouse" placeholder="请输入一年仓库管理费" />
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="仓库号" prop="warehouseNo">
           <el-input v-model="form.warehouseNo" type="textarea" placeholder="请输入内容" />
         </el-form-item>
-        <el-form-item label="垃圾清运费" prop="garbageClearing">
+        <!-- <el-form-item label="垃圾清运费" prop="garbageClearing">
           <el-input v-model="form.garbageClearing" placeholder="请输入垃圾清运费" />
         </el-form-item>
         <el-form-item label="缴费日期" prop="paymentDate">
@@ -255,11 +264,11 @@
         </el-form-item>
         <el-form-item label="缴费区间" prop="paymentRange">
           <el-input v-model="form.paymentRange" placeholder="请输入缴费区间" />
-        </el-form-item>
+        </el-form-item>-->
         <el-form-item label="备注" prop="remark">
           <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
         </el-form-item>
-        <el-form-item label="删除标识" prop="deleteFlag">
+        <!-- <el-form-item label="删除标识" prop="deleteFlag">
           <el-input v-model="form.deleteFlag" placeholder="请输入删除标识" />
         </el-form-item>
         <el-form-item label="" prop="gmtCreate">
@@ -287,7 +296,7 @@
         </el-form-item>
         <el-form-item label="" prop="adminId">
           <el-input v-model="form.adminId" placeholder="请输入" />
-        </el-form-item>
+        </el-form-item> -->
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -360,6 +369,51 @@ export default {
     this.getList()
   },
   methods: {
+    getSummaries(param) {
+      const {
+        columns,
+        data
+      } = param
+      const sums = []
+      var _number = [5, 6, 7, 9, 11, 13, 16]
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '合计'
+        } else if (index === _number[0] || index === _number[1] || index === _number[2] || index === _number[
+          3] || index === _number[4]|| index === _number[5]|| index === _number[6]) {
+          const values = data.map((item) => Number(item[column.property]))
+          if (!values.every((value) => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr)
+              if (!isNaN(value)) {
+                return prev + curr
+              } else {
+                return prev
+              }
+            }, 0)
+            sums[index] = sums[index].toFixed(0)
+          } else {
+            // sums[index] = '元'
+          }
+        } else {
+          sums[index] = '--'
+        }
+      })
+
+      // sums[6]=sums[6].toFixed(2)
+      // sums[sums.length-2]=sums[sums.length-2].toFixed(2)
+      return sums
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.queryParams.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.queryParams.pageNum = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
     /** 查询info列表 */
     getList() {
       this.loading = true
@@ -436,7 +490,7 @@ export default {
       getInfo(id).then(response => {
         this.form = response.data.data
         this.open = true
-        this.title = '修改info'
+        this.title = '修改信息'
       })
     },
     /** 提交按钮 */
@@ -481,10 +535,16 @@ export default {
         this.msgSuccess('删除成功')
       }).catch(function() {})
     },
+    /** 打印 */
+    handlePrint(row) {
+      getInfo(row.id).then(response => {
+        window.open('../../../../../static/print.html?data='+ JSON.stringify(response.data.data).replace(/%/g, 'baifenhao'))
+      })
+    },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams
-      this.$confirm('是否确认导出所有info数据项?', '警告', {
+      this.$confirm('是否确认导出所有数据项?', '警告', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'

+ 307 - 0
unimall-admin/static/print.html

@@ -0,0 +1,307 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <link rel="stylesheet" href="../cdn/element-ui/2.13.2/theme-chalk/index.css">
+    <title></title>
+    <style>
+        table,
+        table tr th,
+        table tr td {
+            border: 2px solid #333333;
+            padding: 5px 0;
+            height: 37px;
+        }
+        
+        body {
+            margin: 0;
+        }
+        
+        #app {
+            /* height: 98vh;
+        position: relative; */
+        }
+        
+        .content {
+            width: 1000px;
+            padding: 30px 20px 20px 20px;
+            font-size: 18px;
+            height: 630px;
+            /* height: 570px; */
+            position: relative;
+        }
+        
+        .a5-content {
+            height: 130vh;
+        }
+        
+        table {
+            width: 100%;
+            text-align: center;
+            border-collapse: collapse;
+            border: 3px solid #333333;
+        }
+        
+        .col-bgc {
+            background: #f6f7fb;
+        }
+        
+        .bottom-row1 {
+            display: flex;
+            /* justify-content: space-between; */
+            margin-top: 5px 0;
+        }
+        
+        .bottom-row2 {
+            display: flex;
+        }
+        
+        img,
+        .left {
+            width: 120px;
+            height: 120px;
+            position: absolute;
+            left: 12px;
+            top: 10px;
+        }
+        
+        .config {
+            margin-top: 10px;
+            margin-right: 240px;
+        }
+        
+        .autograph {
+            margin-top: 10px;
+            margin-right: 170px;
+        }
+        
+        .bottom-row3 {
+            margin: 10px 0;
+        }
+        
+        .title {
+            text-align: center;
+            font-size: 36px;
+            font-weight: 500;
+            position: relative;
+            /* margin-top: 47px; */
+        }
+        
+        .number {
+            text-align: right;
+            margin-bottom: 10px;
+            margin-top: 30px;
+        }
+        
+        .small-row {
+            display: flex;
+        }
+        
+        .small-content {
+            width: 300px;
+            /* margin: 0 auto;
+        border: 1px solid #ccc;
+        padding: 20px 20px 160px 20px;
+        position: absolute;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
+        margin: auto; */
+        }
+        
+        .small-title {
+            text-align: center;
+            font-size: 18px;
+            /* display: flex; */
+            justify-content: space-between;
+            align-items: center;
+        }
+        
+        .numberNo {
+            font-size: 36px;
+            margin: auto;
+        }
+        
+        .small-row {
+            display: flex;
+            justify-content: space-between;
+            margin: 10px;
+        }
+        
+        .small-img {
+            margin-right: 0;
+        }
+        
+        .sign {
+            margin-right: 100px;
+        }
+        
+        .small-code {
+            position: relative;
+            left: calc(50% - 55px)
+        }
+    </style>
+</head>
+
+<body>
+    <div id="app">
+        <div class="content"">
+            <!-- <div class="title">{{tableData.compName}}</div> -->
+            <div class="title">入库检斤单</div>
+            <div class="left">
+                <img src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/hengxinlogo.png" alt="">
+                <img src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/dongfangyulogo.png" alt="">
+            </div>
+            <div class="number">{{tableData.number}}</div>
+            <table class="table">
+                <tr class="row">
+                    <td class="col col-bgc" >客户姓名</td>
+                    <td class="col" colspan="2" >{{tableData.customer}}</td>
+                    <td class="col col-bgc" >发货单位</td>
+                    <td class="col" colspan="2" >{{tableData.customer}}</td>
+                    <td class="col col-bgc" >客户电话</td>
+                    <td class="col" >{{tableData.customerPhone}}</td>
+                    <td class="col col-bgc" >联系电话</td>
+                    <td class="col" >{{tableData.contractManagement ? tableData.contractManagement.sellerPhone : ""}}</td>
+                    <td class="col col-bgc">车牌号</td>
+                    <td class="col" colspan="2">{{tableData.carNumber}}</td>
+                </tr>
+                <tr class="row">
+                    <td class="col col-bgc">收货单位</td>
+                    <td class="col" colspan="2">{{tableData.compName}}</td>
+                    <td class="col col-bgc">联系人</td>
+                    <td class="col">{{tableData.person}}</td>
+                    <td class="col col-bgc">联系电话</td>
+                    <td class="col" colspan="2">{{tableData.personPhone}}</td>
+                </tr>
+                <tr class="row">
+                    <td class="col col-bgc">货名</td>
+                    <td class="col">{{tableData.goodsName}}</td>
+                    <td class="col col-bgc">类型</td>
+                    <td class="col">{{tableData.type}}</td>
+                    <td class="col col-bgc">容量(克/升)</td>
+                    <td class="col">
+                        {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.bulkDensity:''}}</td>
+                    <td class="col col-bgc">不完善粒(%)</td>
+                    <td class="col">
+                        {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.imperfectGrain:''}}</td>
+                </tr>
+                <tr class="row">
+                    <td class="col col-bgc">等级</td>
+                    <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.grade:''}}
+                    </td>
+                    <td class="col col-bgc">水分(%)</td>
+                    <td class="col">
+                        {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.waterContent:''}}</td>
+                    <td class="col col-bgc">热损伤(%)</td>
+                    <td class="col">
+                        {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.jiaorenli:''}}</td>
+                    <td class="col col-bgc">质检时间</td>
+                    <td class="col">
+                        {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.qualityDate:''}}</td>
+                </tr>
+                <tr class="row">
+                    <td class="col col-bgc">杂质(%)</td>
+                    <td class="col">
+                        {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.impurity:''}}</td>
+                    <td class="col col-bgc">霉变粒(%)</td>
+                    <td class="col">
+                        {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.mildewGrain:''}}</td>
+                    <td class="col col-bgc">扣杂</td>
+                    <td class="col">
+                        {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.buckleMiscellaneous:''}}
+                    </td>
+                    <td class="col " colspan="2"></td>
+                </tr>
+                <tr class="row">
+                    <td class="col col-bgc">毛重(公斤)</td>
+                    <td class="col">{{tableData.grossWeight}}</td>
+                    <td class="col col-bgc">皮重(公斤)</td>
+                    <td class="col">{{tableData.tare}}</td>
+                    <td class="col col-bgc">扣重(公斤)</td>
+                    <td class="col">{{tableData.buckleMiscellaneous}}</td>
+                    <td class="col col-bgc">净重(公斤)</td>
+                    <td class="col">{{tableData.netWeight}}</td>
+                    <td class="col " colspan="2"></td>
+                </tr>
+                <tr class="row">
+                    <td class="col col-bgc" colspan="2">毛重检斤时间</td>
+                    <td class="col" colspan="2">{{tableData.grossDate}}</td>
+                    <td class="col col-bgc" colspan="2"> 皮重检斤时间</td>
+                    <td class="col" colspan="2">{{tableData.tareDate}}</td>
+                </tr>
+            </table>
+            <div class="bottom">
+                <div class="bottom-row1">
+                    <div>毛检:{{tableData.secretaryWeigher}}</div>
+                    <div style="margin-left:60px">皮检:{{tableData.skinInspector}}</div>
+                    <!-- <div>{{tableData.qualityDate}}</div> -->
+                </div>
+                <div class="bottom-row2">
+                    <!-- <div class="left">
+            <img :src="tableData.codeUrl" alt="">
+            </div> -->
+
+                    <div class="config" v-if="tableData.warehouseName!='白城补数据'">收货单位签名或盖章:</div>
+                    <div class="config" v-if="tableData.warehouseName=='白城补数据'">收货单位签名或盖章:黑龙江中天昊元贸易有限公司</div>
+                    <div class="autograph">客户签名:</div>
+                    <div class="autograph" v-if="tableData.warehouseName!='白城补数据'">司机签名:</div>
+                </div>
+                <!-- <div class="bottom-row3">扫一扫</div> -->
+            </div>
+        </div>
+    </div>
+</body>
+<script src="../cdn/vue/2.6.10/vue.min.js"></script>
+<script src="../cdn/element-ui/2.13.2/index.js"></script>
+<script type="text/javascript">
+    new Vue({
+        el: '#app',
+        data: {
+            tableData: {
+                // qualityInspectionManagement:{}
+            }
+        },
+        computed: {},
+        methods: {
+            tableRowClassName({
+                row,
+                rowIndex
+            }) {
+                if (rowIndex === 1) {
+                    return 'warning-row';
+                } else if (rowIndex === 3) {
+                    return 'success-row';
+                }
+                return '';
+            },
+            getQueryVariable(variable) {
+                var query = window.location.search.substring(1);
+                var vars = query.split("&");
+                for (var i = 0; i < vars.length; i++) {
+                    var pair = vars[i].split("=");
+                    if (pair[0] == variable) {
+                        return pair[1];
+                    }
+                }
+                return (false);
+            },
+            printSmall() {},
+            printBig() {},
+        },
+        mounted() {
+            this.tableData = decodeURIComponent(this.getQueryVariable("data"))
+           
+            document.title = "收款收据"
+            window.print()
+            window.onafterprint = function(event) {
+                window.history.back(-1)
+            };
+        },
+        watch: {}
+    })
+</script>
+
+</html>