ccjgmwz 4 years ago
parent
commit
9af5380f2d
27 changed files with 137 additions and 91 deletions
  1. 12 2
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/position/PositionReportServiceImpl.java
  2. 5 12
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/report/ReportServiceImpl.java
  3. 5 2
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/report/dockServiceImpl.java
  4. 4 4
      unimall-admin/src/router/route.json
  5. 5 4
      unimall-admin/src/views/cash/cashReport.vue
  6. 1 0
      unimall-admin/src/views/dock/dockReport.vue
  7. 2 2
      unimall-app/config/index.js
  8. 1 0
      unimall-app/pageA/pages/deliver_goods.vue
  9. 1 1
      unimall-app/pageA/pages/task.vue
  10. 1 1
      unimall-app/pageA/pages/task_detail.vue
  11. 1 1
      unimall-app/pageA/pages/task_detail_ck.vue
  12. 1 1
      unimall-app/pageA/pages/task_detail_ys.vue
  13. 32 34
      unimall-app/pageB/contract/look.vue
  14. 1 1
      unimall-app/pages/tran/tran.vue
  15. 30 11
      unimall-app/pages/user/task.vue
  16. 1 1
      unimall-app/pages/user/task_arrive.vue
  17. 1 1
      unimall-app/pages/user/task_detail_buy.vue
  18. 1 1
      unimall-app/pages/user/task_detail_hy.vue
  19. 1 1
      unimall-app/pages/user/task_detail_hyrk.vue
  20. 1 1
      unimall-app/pages/user/task_detail_kn.vue
  21. 1 1
      unimall-app/pages/user/task_detail_wai.vue
  22. 1 1
      unimall-app/pages/user/task_detail_zx.vue
  23. 6 0
      unimall-data/src/main/java/com/iotechn/unimall/data/domain/DockReportDO.java
  24. 5 2
      unimall-data/src/main/java/com/iotechn/unimall/data/domain/PositionReportDO.java
  25. 3 0
      unimall-data/src/main/java/com/iotechn/unimall/data/dto/TaskDTO.java
  26. 2 2
      unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/ReportMapper.xml
  27. 12 4
      unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/TaskMapper.xml

+ 12 - 2
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/position/PositionReportServiceImpl.java

@@ -4,6 +4,7 @@ package com.iotechn.unimall.admin.api.position;
 import com.iotechn.unimall.core.exception.AdminServiceException;
 import com.iotechn.unimall.core.exception.AdminServiceException;
 import com.iotechn.unimall.core.exception.ExceptionDefinition;
 import com.iotechn.unimall.core.exception.ExceptionDefinition;
 import com.iotechn.unimall.core.exception.ServiceException;
 import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.core.util.CalculationUtil;
 import com.iotechn.unimall.data.domain.*;
 import com.iotechn.unimall.data.domain.*;
 import com.iotechn.unimall.data.enums.TradeStatusType;
 import com.iotechn.unimall.data.enums.TradeStatusType;
 import com.iotechn.unimall.data.mapper.*;
 import com.iotechn.unimall.data.mapper.*;
@@ -74,6 +75,7 @@ public class PositionReportServiceImpl implements PositionReportService {
                 Float sum1 = 0f;
                 Float sum1 = 0f;
                 Float sum2 = 0f;
                 Float sum2 = 0f;
                 Float sumCount = 0f;
                 Float sumCount = 0f;
+                Float sumCountBuy = 0f;
                 // 采购
                 // 采购
                 List<BuyDO> buyDOList = buyMapper.selectList(new EntityWrapper<BuyDO>().eq("store_id", storeDO.getId()));
                 List<BuyDO> buyDOList = buyMapper.selectList(new EntityWrapper<BuyDO>().eq("store_id", storeDO.getId()));
                 for (BuyDO buyDO : buyDOList) {
                 for (BuyDO buyDO : buyDOList) {
@@ -81,6 +83,13 @@ public class PositionReportServiceImpl implements PositionReportService {
                     for (TradeDO tradeDO : list) {
                     for (TradeDO tradeDO : list) {
                         sum = sum + (tradeDO.getFlatTotal() != null ? tradeDO.getFlatTotal() : 0);
                         sum = sum + (tradeDO.getFlatTotal() != null ? tradeDO.getFlatTotal() : 0);
                         sum2 = sum2 +tradeDO.getCount();
                         sum2 = sum2 +tradeDO.getCount();
+                        List<TaskDO> taskDOLists = taskMapper.selectList(new EntityWrapper<TaskDO>().eq("task_type", "入库任务").eq("task_status", 2).eq("order_no", tradeDO.getOrderNo()));
+                        if (!CollectionUtils.isEmpty(taskDOLists)) {
+                            for (TaskDO taskDO : taskDOLists) {
+                                sumCountBuy = sumCountBuy + taskDO.getNetWeight();
+
+                            }
+                        }
                     }
                     }
 
 
                 }
                 }
@@ -89,7 +98,7 @@ public class PositionReportServiceImpl implements PositionReportService {
                 for (SaleDO saleDO : saleDOList) {
                 for (SaleDO saleDO : saleDOList) {
                     List<TradeDO> list = tradeMapper.selectList(new EntityWrapper<TradeDO>().eq("salebuy_id", saleDO.getId()).lt("status", TradeStatusType.FINISH.getCode()).ge("status", TradeStatusType.VERIFY.getCode()));
                     List<TradeDO> list = tradeMapper.selectList(new EntityWrapper<TradeDO>().eq("salebuy_id", saleDO.getId()).lt("status", TradeStatusType.FINISH.getCode()).ge("status", TradeStatusType.VERIFY.getCode()));
                     for (TradeDO tradeDO : list) {
                     for (TradeDO tradeDO : list) {
-                        sum1 = sum1 + tradeDO.getCount();
+                        sum1 = sum1 + tradeDO.getCount() - tradeDO.getFlatTotal();
 
 
                         List<TaskDO> taskDOLists = taskMapper.selectList(new EntityWrapper<TaskDO>().eq("task_type", "出库任务").eq("task_status", 2).eq("order_no", tradeDO.getOrderNo()));
                         List<TaskDO> taskDOLists = taskMapper.selectList(new EntityWrapper<TaskDO>().eq("task_type", "出库任务").eq("task_status", 2).eq("order_no", tradeDO.getOrderNo()));
                         if (!CollectionUtils.isEmpty(taskDOLists)) {
                         if (!CollectionUtils.isEmpty(taskDOLists)) {
@@ -103,7 +112,8 @@ public class PositionReportServiceImpl implements PositionReportService {
                 }
                 }
                 positionReportDO.setClosingQuantity(sum);
                 positionReportDO.setClosingQuantity(sum);
                 positionReportDO.setWarehouseInventory(sum2);
                 positionReportDO.setWarehouseInventory(sum2);
-                positionReportDO.setSaleQuantity(sum1-sumCount);
+                positionReportDO.setNotSaleCount(CalculationUtil.subToFloat(sum1,sumCount));
+                positionReportDO.setNotBuyCount(CalculationUtil.subToFloat(sum2,sumCountBuy) );
                 if (positionReportDO.getPhysicalInventory() != null && positionReportDO.getPhysicalInventory() > 0) {
                 if (positionReportDO.getPhysicalInventory() != null && positionReportDO.getPhysicalInventory() > 0) {
                     positionReportDOS.add(positionReportDO);
                     positionReportDOS.add(positionReportDO);
                 }
                 }

+ 5 - 12
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/report/ReportServiceImpl.java

@@ -392,6 +392,7 @@ public class ReportServiceImpl implements ReportService {
                     taskDO.setGmtUpdate(now);
                     taskDO.setGmtUpdate(now);
                     taskDO.setSendTime(now);
                     taskDO.setSendTime(now);
                     taskDO.setCompanyId(companyId);
                     taskDO.setCompanyId(companyId);
+                    taskDO.setPoundImg(buyReportDO.getPoundImg());
                     if (taskMapper.insert(taskDO) <= 0) {
                     if (taskMapper.insert(taskDO) <= 0) {
                         throw new AdminServiceException(ExceptionDefinition.APP_UNKNOWN_EXCEPTION);
                         throw new AdminServiceException(ExceptionDefinition.APP_UNKNOWN_EXCEPTION);
                     }
                     }
@@ -694,18 +695,10 @@ public class ReportServiceImpl implements ReportService {
             TradeDO tradeDO = list.get(0);
             TradeDO tradeDO = list.get(0);
             buyReportDO.setSeller(tradeDO.getSeller());
             buyReportDO.setSeller(tradeDO.getSeller());
             buyReportDO.setUnitPrice(tradeDO.getUnitPrice());
             buyReportDO.setUnitPrice(tradeDO.getUnitPrice());
-            List<TaskDO> taskDOS = taskMapper.selectList(new EntityWrapper<TaskDO>().eq("report_id", buyReportDO.getId()));
-            if (CollectionUtils.isNotEmpty(taskDOS)) {
-                TaskDO taskDO = taskDOS.get(0);
-                List<CarDO> carDOList = carMapper.selectList(new EntityWrapper<CarDO>().eq("send_car_no", taskDO.getSendCarNo()));
-                if (CollectionUtils.isNotEmpty(carDOList)) {
-                    CarDO carDO = carDOList.get(0);
-                    Float price = CalculationUtil.subToFloat(CalculationUtil.sub(CalculationUtil.sub(CalculationUtil.add(tradeDO.getUnitPrice(), tradeDO.getBasis()), buyReportDO.getDeduction()), carDO.getInFee()), (tradeDO.getInvoiceType().equals("不开发票") ? 20 : 0));
-                    buyReportDO.setUnitPrice1(price);
-                    buyReportDO.setMoney(CalculationUtil.mulToFloat(price, buyReportDO.getNetWeight()));
-                    buyReportDO.setNotMoney(CalculationUtil.mulToFloat(price, buyReportDO.getNetWeight()));
-                }
-            }
+            Float price = CalculationUtil.subToFloat(CalculationUtil.sub(CalculationUtil.sub(CalculationUtil.add(tradeDO.getUnitPrice(), tradeDO.getBasis()), buyReportDO.getDeduction()), buyReportDO.getUnloadingFee()), (tradeDO.getInvoiceType().equals("不开发票") ? 20 : 0));
+            buyReportDO.setUnitPrice1(price);
+            buyReportDO.setMoney(CalculationUtil.mulToFloat(price, buyReportDO.getNetWeight()));
+            buyReportDO.setNotMoney(CalculationUtil.mulToFloat(price, buyReportDO.getNetWeight()));
         }
         }
 
 
         buyReportDO.setGmtUpdate(now);
         buyReportDO.setGmtUpdate(now);

+ 5 - 2
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/report/dockServiceImpl.java

@@ -4,6 +4,7 @@ package com.iotechn.unimall.admin.api.report;
 import com.iotechn.unimall.core.exception.AdminServiceException;
 import com.iotechn.unimall.core.exception.AdminServiceException;
 import com.iotechn.unimall.core.exception.ExceptionDefinition;
 import com.iotechn.unimall.core.exception.ExceptionDefinition;
 import com.iotechn.unimall.core.exception.ServiceException;
 import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.core.util.CalculationUtil;
 import com.iotechn.unimall.data.domain.*;
 import com.iotechn.unimall.data.domain.*;
 import com.iotechn.unimall.data.mapper.*;
 import com.iotechn.unimall.data.mapper.*;
 import com.iotechn.unimall.data.model.Page;
 import com.iotechn.unimall.data.model.Page;
@@ -72,7 +73,7 @@ public class dockServiceImpl implements dockService {
      */
      */
     @Override
     @Override
     public Page<DockReportDO> dockReportDOPage(DockReportDTO selectDTO,Integer page, Integer limit, Long companyId) {
     public Page<DockReportDO> dockReportDOPage(DockReportDTO selectDTO,Integer page, Integer limit, Long companyId) {
-        Wrapper<TradeDO> wrapper = new EntityWrapper<TradeDO>();
+        Wrapper wrapper = new EntityWrapper<>();
         if (selectDTO.getCompanyName() != null) {
         if (selectDTO.getCompanyName() != null) {
             wrapper.like("seller", selectDTO.getCompanyName());
             wrapper.like("seller", selectDTO.getCompanyName());
         }
         }
@@ -96,6 +97,7 @@ public class dockServiceImpl implements dockService {
                 dockReportDO.setStoreName(buyDO.getTitle());
                 dockReportDO.setStoreName(buyDO.getTitle());
                 StoreDO storeDO = storeMapper.selectById(buyDO.getStoreId());
                 StoreDO storeDO = storeMapper.selectById(buyDO.getStoreId());
                 dockReportDO.setStoreName(storeDO != null ? storeDO.getName() : "");
                 dockReportDO.setStoreName(storeDO != null ? storeDO.getName() : "");
+                dockReportDO.setStockNum(storeDO.getInventory());
             }
             }
             List<TaskDO> taskDOLists = taskMapper.selectList(new EntityWrapper<TaskDO>().eq("task_type", "入库任务").eq("task_status", 2).eq("order_no", tradeDO.getOrderNo()));
             List<TaskDO> taskDOLists = taskMapper.selectList(new EntityWrapper<TaskDO>().eq("task_type", "入库任务").eq("task_status", 2).eq("order_no", tradeDO.getOrderNo()));
             Float sumCount = 0f;
             Float sumCount = 0f;
@@ -105,9 +107,10 @@ public class dockServiceImpl implements dockService {
 
 
                 }
                 }
             }
             }
+            sumCount += tradeDO.getFlatTotal();
             dockReportDO.setOpenNum(tradeDO.getCount());
             dockReportDO.setOpenNum(tradeDO.getCount());
             dockReportDO.setCloseNum(tradeDO.getFlatTotal() != null ? tradeDO.getFlatTotal() : 0);
             dockReportDO.setCloseNum(tradeDO.getFlatTotal() != null ? tradeDO.getFlatTotal() : 0);
-            dockReportDO.setStockNum(sumCount);
+            dockReportDO.setNotBuyCount(CalculationUtil.subToFloat(tradeDO.getCount(),sumCount));
             dockReportDOList.add(dockReportDO);
             dockReportDOList.add(dockReportDO);
         }
         }
         return new Page<DockReportDO>(dockReportDOList, page, limit, count);
         return new Page<DockReportDO>(dockReportDOList, page, limit, count);

+ 4 - 4
unimall-admin/src/router/route.json

@@ -495,10 +495,10 @@
 				"meta":{
 				"meta":{
 					"noCache":true,
 					"noCache":true,
 					"perms":[
 					"perms":[
-						"payDetail:payDetail:delete",
-						"payDetail:payDetail:list",
-						"payDetail:payDetail:create",
-						"payDetail:payDetail:edit"
+						"payDetail:paydetail:delete",
+						"payDetail:paydetail:list",
+						"payDetail:paydetail:create",
+						"payDetail:paydetail:edit"
 					],
 					],
 					"title":"付款详情"
 					"title":"付款详情"
 				},
 				},

+ 5 - 4
unimall-admin/src/views/cash/cashReport.vue

@@ -44,11 +44,12 @@
       <el-table-column
       <el-table-column
         type="index"
         type="index"
         width="50" />
         width="50" />
-      <el-table-column align="center" label="仓单库存" prop="warehouseInventory" />
-      <el-table-column align="center" label="实际库存" prop="physicalInventory" />
       <el-table-column align="center" label="库点名" prop="libraryRollCall" />
       <el-table-column align="center" label="库点名" prop="libraryRollCall" />
-      <el-table-column align="center" label="平仓数量" prop="closingQuantity" />
-      <el-table-column align="center" label="销售数量" prop="saleQuantity" />
+      <el-table-column align="center" label="仓单库存" prop="warehouseInventory" sortable/>
+      <el-table-column align="center" label="平仓数量" prop="closingQuantity" sortable/>
+      <el-table-column align="center" label="采购待执行数量" prop="notBuyCount" sortable />
+      <el-table-column align="center" label="销售待执行数量" prop="notSaleCount" />
+      <el-table-column align="center" label="实际库存" prop="physicalInventory" />
       <!-- <el-table-column align="center" label="更新时间" prop="gmtUpdate">
       <!-- <el-table-column align="center" label="更新时间" prop="gmtUpdate">
         <template slot-scope="scope">{{
         <template slot-scope="scope">{{
           scope.row.gmtUpdate | formatTime
           scope.row.gmtUpdate | formatTime

+ 1 - 0
unimall-admin/src/views/dock/dockReport.vue

@@ -68,6 +68,7 @@
       <el-table-column align="center" label="库点" prop="storeName" />
       <el-table-column align="center" label="库点" prop="storeName" />
       <el-table-column align="center" label="开仓数量" prop="openNum" sortable />
       <el-table-column align="center" label="开仓数量" prop="openNum" sortable />
       <el-table-column align="center" label="平仓数量" prop="closeNum" sortable />
       <el-table-column align="center" label="平仓数量" prop="closeNum" sortable />
+      <el-table-column align="center" label="采购待执行数量" prop="notBuyCount" sortable />
       <el-table-column align="center" label="实际库存" prop="stockNum" sortable />
       <el-table-column align="center" label="实际库存" prop="stockNum" sortable />
       <!-- <el-table-column align="center" label="更新时间" prop="gmtUpdate">
       <!-- <el-table-column align="center" label="更新时间" prop="gmtUpdate">
         <template slot-scope="scope">{{
         <template slot-scope="scope">{{

+ 2 - 2
unimall-app/config/index.js

@@ -1,12 +1,12 @@
 const dev = {
 const dev = {
-	// baseUrl: 'http://127.0.0.1:8080',
+	baseUrl: 'http://127.0.0.1:8080',
 	// baseUrl: 'http://192.168.1.109:8080',
 	// baseUrl: 'http://192.168.1.109:8080',
 	// baseUrl: 'http://192.168.1.115:8080',
 	// baseUrl: 'http://192.168.1.115:8080',
 	// baseUrl: 'http://192.168.1.124:8080',
 	// baseUrl: 'http://192.168.1.124:8080',
 	// baseUrl: 'http://192.168.1.113:8080',
 	// baseUrl: 'http://192.168.1.113:8080',
 	// baseUrl: 'http://192.168.8.188:8081',
 	// baseUrl: 'http://192.168.8.188:8081',
 	// baseUrl: 'https://www.zhuqt.icu',
 	// baseUrl: 'https://www.zhuqt.icu',
-	baseUrl: 'https://www.zthymaoyi.com',
+	// baseUrl: 'https://www.zthymaoyi.com',
 	h5Appid: 'wxb66b599f7f61b46f',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 	debug: false
 }
 }

+ 1 - 0
unimall-app/pageA/pages/deliver_goods.vue

@@ -138,6 +138,7 @@
 		},
 		},
 
 
 		methods: {
 		methods: {
+			
 			ViewImage(e) {
 			ViewImage(e) {
 				var img = [];
 				var img = [];
 				img = e.currentTarget.dataset.url.split(' ')
 				img = e.currentTarget.dataset.url.split(' ')

+ 1 - 1
unimall-app/pageA/pages/task.vue

@@ -61,7 +61,7 @@
 				<view class="c-row b-b">
 				<view class="c-row b-b">
 					<text class="tit">净重(自动计算)</text>
 					<text class="tit">净重(自动计算)</text>
 					<view class="con-list">
 					<view class="con-list">
-						<text>{{netWeight}}</text>
+						<text>{{numFilter(netWeight)}}</text>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="cu-bar bg-white">
 				<view class="cu-bar bg-white">

+ 1 - 1
unimall-app/pageA/pages/task_detail.vue

@@ -82,7 +82,7 @@
 				<view class="c-row b-b">
 				<view class="c-row b-b">
 					<text class="tit">净重(自动计算)</text>
 					<text class="tit">净重(自动计算)</text>
 					<view class="con-list">
 					<view class="con-list">
-						<text>{{netWeight}}</text>
+						<text>{{numFilter(netWeight)}}</text>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view v-if='carInfo.companyId==2' class="c-row b-b">
 				<view v-if='carInfo.companyId==2' class="c-row b-b">

+ 1 - 1
unimall-app/pageA/pages/task_detail_ck.vue

@@ -49,7 +49,7 @@
 				<view class="c-row b-b">
 				<view class="c-row b-b">
 					<text class="tit">净重(自动计算)</text>
 					<text class="tit">净重(自动计算)</text>
 					<view class="con-list">
 					<view class="con-list">
-						<text>{{netWeight}}</text>
+						<text>{{numFilter(netWeight)}}</text>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="c-row b-b" style='justify-content: space-between;'>
 				<view class="c-row b-b" style='justify-content: space-between;'>

+ 1 - 1
unimall-app/pageA/pages/task_detail_ys.vue

@@ -44,7 +44,7 @@
 				<view class="c-row b-b">
 				<view class="c-row b-b">
 					<text class="tit">净重(自动计算)</text>
 					<text class="tit">净重(自动计算)</text>
 					<view class="con-list">
 					<view class="con-list">
-						<text>{{netWeight}}</text>
+						<text>{{numFilter(netWeight)}}</text>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="cu-bar bg-white ">
 				<view class="cu-bar bg-white ">

+ 32 - 34
unimall-app/pageB/contract/look.vue

@@ -2,24 +2,12 @@
 	<view class="container">
 	<view class="container">
 		<view style='background:#E6F3F9;border-bottom:1px solid #ccc;' class='flex justify-between padding-xl' @click='unfold1()'>
 		<view style='background:#E6F3F9;border-bottom:1px solid #ccc;' class='flex justify-between padding-xl' @click='unfold1()'>
 			<view style='width:92%;margin-top: -4px;text-align:center;' class='flex justify-between'>
 			<view style='width:92%;margin-top: -4px;text-align:center;' class='flex justify-between'>
-				<view style='text-align:center;'>
-					结算总价
-					<view>({{contractInfo.sumTotal}}元)</view>
-				</view>
-				<view style='text-align:center;'>
-					结算吨数<view>({{contractInfo.sumNet}}吨)</view>
-				</view>
-				<view style='text-align:center;'>
-					已收<view>({{contractInfo.payMoney}}元)</view>
-				</view>
-				<view style='text-align:center;'>
-					未收<view>({{contractInfo.notPayMoney}}元)</view>
-				</view>
+				结算明细
 			</view>
 			</view>
 			<view :class="isOpen1 ? 'cuIcon-unfold' : 'cuIcon-right'" ></view>
 			<view :class="isOpen1 ? 'cuIcon-unfold' : 'cuIcon-right'" ></view>
 		</view>
 		</view>
 		<view :class="isOpen1 ? 'content-open' : 'content-close'" class='content1'>
 		<view :class="isOpen1 ? 'content-open' : 'content-close'" class='content1'>
-			<view class="table">
+			<view class="table  u-font-xs">
 				<view class="tr bg-w">
 				<view class="tr bg-w">
 					<view class="th">车牌号</view>
 					<view class="th">车牌号</view>
 					<view class="th">净重(吨)</view>
 					<view class="th">净重(吨)</view>
@@ -32,11 +20,18 @@
 						<view class="tr" >
 						<view class="tr" >
 							<view class="td">{{item.carNo}}</view>
 							<view class="td">{{item.carNo}}</view>
 							<view class="td">{{item.netWeight}}</view>
 							<view class="td">{{item.netWeight}}</view>
-							<view class="td">{{item.sumPrice}}</view>
-							<view class="td">{{item.sumPrice - item.notPay}}</view>
-							<view class="td">{{item.notPay}}</view>
+							<view class="td">{{numFilter(item.sumPrice)}}</view>
+							<view class="td">{{numFilter(item.sumPrice - item.notPay)}}</view>
+							<view class="td">{{numFilter(item.notPay)}}</view>
 						</view>
 						</view>
 					</block>
 					</block>
+					<view class="tr" >
+						<view class="td">合计:</view>
+						<view class="td">{{contractInfo.sumNet}}</view>
+						<view class="td">{{numFilter(contractInfo.sumTotal)}}</view>
+						<view class="td">{{numFilter(contractInfo.payMoney)}}</view>
+						<view class="td">{{numFilter(contractInfo.notPayMoney)}}</view>
+					</view>
 				</view>
 				</view>
 			</view>
 			</view>
 			<!-- <view class='flex justify-between padding-xs' v-for='item in contractInfo.taskDTOList'>
 			<!-- <view class='flex justify-between padding-xs' v-for='item in contractInfo.taskDTOList'>
@@ -49,25 +44,15 @@
 		</view>
 		</view>
 		<view style='background:#E6F3F9;border-bottom:1px solid #ccc;' class='flex justify-between padding-xl' @click='unfold2()'>
 		<view style='background:#E6F3F9;border-bottom:1px solid #ccc;' class='flex justify-between padding-xl' @click='unfold2()'>
 			<view style='width:92%;margin-top: -4px;' class='flex justify-between'>
 			<view style='width:92%;margin-top: -4px;' class='flex justify-between'>
-				<view style='text-align:center;'>
-					平仓<view>({{contractInfo.sumNetClose}}吨)</view>
-				</view style='text-align:center;'>
-				<view style='text-align:center;'>
-					结算总价<view>({{contractInfo.sumTotalClose}}元)</view>
-				</view>
-				<view style='text-align:center;'>
-					已收<view>({{contractInfo.payMoneyClose}}元)</view>
-				</view>
-				<view style='text-align:center;'>
-					未收<view>({{contractInfo.notPayMoneyClose}}元)</view>
-				</view>
+				平仓明细
 			</view>
 			</view>
 			<view :class="isOpen2 ? 'cuIcon-unfold' : 'cuIcon-right'" ></view>
 			<view :class="isOpen2 ? 'cuIcon-unfold' : 'cuIcon-right'" ></view>
 		</view>
 		</view>
 		<view :class="isOpen2 ? 'content-open' : 'content-close'" class='content2'>
 		<view :class="isOpen2 ? 'content-open' : 'content-close'" class='content2'>
-			<view class="table">
+			<view class="table u-font-xs">
 				<view class="tr bg-w">
 				<view class="tr bg-w">
-					<view class="th">平仓吨数(吨)</view>
+					<view class="th">序号</view>
+					<view class="th">平仓数(吨)</view>
 					<view class="th">应收(元)</view>
 					<view class="th">应收(元)</view>
 					<view class="th ">已收(元)</view>
 					<view class="th ">已收(元)</view>
 					<view class="th ">未收(元)</view>
 					<view class="th ">未收(元)</view>
@@ -75,12 +60,20 @@
 				<view class='tbody'>
 				<view class='tbody'>
 					<block v-for='(item,index) in contractInfo.taskDTOList1' >
 					<block v-for='(item,index) in contractInfo.taskDTOList1' >
 						<view class="tr" >
 						<view class="tr" >
+							<view class="td">{{index+1}}</view>
 							<view class="td">{{item.closeTon}}</view>
 							<view class="td">{{item.closeTon}}</view>
-							<view class="td">{{item.sumPriceClose}}</view>
-							<view class="td">{{item.sumPriceClose - item.notPayClose}}</view>
-							<view class="td">{{item.notPayClose}}</view>
+							<view class="td">{{numFilter(item.sumPriceClose)}}</view>
+							<view class="td">{{numFilter(item.sumPriceClose - item.notPayClose)}}</view>
+							<view class="td">{{numFilter(item.notPayClose)}}</view>
 						</view>
 						</view>
 					</block>
 					</block>
+					<view class="tr" >
+						<view class="td">合计</view>
+						<view class="td">{{contractInfo.sumNetClose}}</view>
+						<view class="td">{{numFilter(contractInfo.sumTotalClose)}}</view>
+						<view class="td">{{numFilter(contractInfo.payMoneyClose)}}</view>
+						<view class="td">{{numFilter(contractInfo.notPayMoneyClose)}}</view>
+					</view>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -138,6 +131,11 @@
 			},
 			},
 			
 			
 			methods: {
 			methods: {
+				numFilter (value) {
+					// 截取当前数据到小数点后两位
+					let realVal = parseFloat(value).toFixed(2)
+					return realVal
+				},
 				unfold1(){
 				unfold1(){
 					this.isOpen1=!this.isOpen1
 					this.isOpen1=!this.isOpen1
 				},
 				},

+ 1 - 1
unimall-app/pages/tran/tran.vue

@@ -71,7 +71,7 @@
 							>
 							>
 							<view style='margin:5px 0;diaplay:inline-block;font-weight:900;' class="flex justify-between">
 							<view style='margin:5px 0;diaplay:inline-block;font-weight:900;' class="flex justify-between">
 								<text>{{item.startPlace }}</text>
 								<text>{{item.startPlace }}</text>
-								<image class='carIcon' src='../../static/car.png'></image>
+								<image class='carIcon' src='https://taohaoliang.oss-cn-beijing.aliyuncs.com/tmp/car.png'></image>
 								<text>{{item.endPlace }}</text>
 								<text>{{item.endPlace }}</text>
 							</view>
 							</view>
 							<view style='margin:5px 0;diaplay:inline-block;' class="flex justify-between">
 							<view style='margin:5px 0;diaplay:inline-block;' class="flex justify-between">

+ 30 - 11
unimall-app/pages/user/task.vue

@@ -202,30 +202,46 @@
 					<view  class="title">合同编号</view>
 					<view  class="title">合同编号</view>
 					{{paymentaudit.contractNo}}
 					{{paymentaudit.contractNo}}
 				</view>
 				</view>
-				<view v-if="paymentaudit.netWeights" class="cu-form-group">
-					<view  class="title">净重</view>
-					{{paymentaudit.netWeights}}
+				<view v-if="paymentaudit.poundImg" class="cu-form-group">
+					<view  class="title">磅单照片</view>
+					<view @click="previewImg(paymentaudit.poundImg)" class="text-blue">查看</view>
 				</view>
 				</view>
-				<view v-if="paymentaudit.carNos && paymentaudit.buy ==0" class="cu-form-group">
+				<view v-if="paymentaudit.carNos" class="cu-form-group">
 					<view  class="title">车牌号</view>
 					<view  class="title">车牌号</view>
 					{{paymentaudit.carNos}}
 					{{paymentaudit.carNos}}
 				</view>
 				</view>
-				<view v-if="paymentaudit.buy >0" class="cu-form-group">
+				<view v-if="paymentaudit.buy == 0" class="cu-form-group">
 					<view  class="title">成交价</view>
 					<view  class="title">成交价</view>
-					{{paymentaudit.unitPrice - paymentaudit.unitPrice1}}
+					{{paymentaudit.unitPrice}}
 				</view>
 				</view>
-				<view v-if="paymentaudit.buy >0" class="cu-form-group">
+				<view v-if="paymentaudit.buy > 0" class="cu-form-group">
 					<view  class="title">平仓价</view>
 					<view  class="title">平仓价</view>
-					{{paymentaudit.unitPrice-paymentaudit.basis}}
+					{{paymentaudit.unitPrice}}
+				</view>
+				<view v-if="paymentaudit.deduction" class="cu-form-group">
+					<view  class="title">扣款</view>
+					{{paymentaudit.deduction}}
+				</view>
+				<view v-if="paymentaudit.unloadingFee" class="cu-form-group">
+					<view  class="title">卸车费</view>
+					{{paymentaudit.unloadingFee}}
+				</view>
+				<view v-if="paymentaudit.invoiceMoney" class="cu-form-group">
+					<view  class="title">发票费</view>
+					{{paymentaudit.invoiceMoney}}
 				</view>
 				</view>
 				<view v-if="paymentaudit.basis" class="cu-form-group">
 				<view v-if="paymentaudit.basis" class="cu-form-group">
-					<view  class="title">平仓基差</view>
+					<view  class="title">基差</view>
 					{{paymentaudit.basis}}
 					{{paymentaudit.basis}}
 				</view>
 				</view>
 				<view v-if="paymentaudit.unitPrice1" class="cu-form-group">
 				<view v-if="paymentaudit.unitPrice1" class="cu-form-group">
 					<view  class="title">付款单价</view>
 					<view  class="title">付款单价</view>
 					{{paymentaudit.unitPrice1}}
 					{{paymentaudit.unitPrice1}}
 				</view>
 				</view>
+				<view v-if="paymentaudit.netWeights" class="cu-form-group">
+					<view  class="title">净重</view>
+					{{paymentaudit.netWeights}}
+				</view>
 				<view v-if="paymentaudit.money" class="cu-form-group">
 				<view v-if="paymentaudit.money" class="cu-form-group">
 					<view  class="title">付款金额</view>
 					<view  class="title">付款金额</view>
 					{{paymentaudit.money}}
 					{{paymentaudit.money}}
@@ -354,7 +370,7 @@
 				{{paymentaudit.gmtCreate}}
 				{{paymentaudit.gmtCreate}}
 			</view>
 			</view>
 		</u-modal>
 		</u-modal>
-		<drag-button
+		<!-- <drag-button
 		 v-if="companyId != 2"
 		 v-if="companyId != 2"
 		:isDock="true"
 		:isDock="true"
 		:existTabBar="true"
 		:existTabBar="true"
@@ -363,7 +379,7 @@
 		location="40"
 		location="40"
 		icon='cuIcon-deliver'
 		icon='cuIcon-deliver'
 		@btnClick="fanghuo"
 		@btnClick="fanghuo"
-		/>
+		/> -->
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -435,6 +451,9 @@
 		  }
 		  }
 		},
 		},
 		methods: {
 		methods: {
+			previewImg(urls){
+				uni.previewImage({urls:[urls]})
+			},
 			hided(item,e){
 			hided(item,e){
 				const that = this
 				const that = this
 				that.$api.request('task', 'hided', {
 				that.$api.request('task', 'hided', {

+ 1 - 1
unimall-app/pages/user/task_arrive.vue

@@ -80,7 +80,7 @@
 				<view class="c-row b-b">
 				<view class="c-row b-b">
 					<text class="tit">净重</text>
 					<text class="tit">净重</text>
 					<view class="con-list">
 					<view class="con-list">
-						<text>{{suttleWeight}}</text>
+						<text>{{numFilter(suttleWeight)}}</text>
 					</view>
 					</view>
 				</view>
 				</view>
 			</view> 
 			</view> 

+ 1 - 1
unimall-app/pages/user/task_detail_buy.vue

@@ -140,7 +140,7 @@
 				<view class="c-row b-b">
 				<view class="c-row b-b">
 					<text class="tit">净重(自动计算)</text>
 					<text class="tit">净重(自动计算)</text>
 					<view class="con-list">
 					<view class="con-list">
-						<text>{{netWeight}}</text>
+						<text>{{numFilter(netWeight)}}</text>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="cu-bar bg-white ">
 				<view class="cu-bar bg-white ">

+ 1 - 1
unimall-app/pages/user/task_detail_hy.vue

@@ -98,7 +98,7 @@
 				<view class="c-row b-b">
 				<view class="c-row b-b">
 					<text class="tit">净重</text>
 					<text class="tit">净重</text>
 					<view class="con-list">
 					<view class="con-list">
-						<text>{{suttleWeight}}</text>
+						<text>{{numFilter(suttleWeight)}}</text>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="cu-bar bg-white ">
 				<view class="cu-bar bg-white ">

+ 1 - 1
unimall-app/pages/user/task_detail_hyrk.vue

@@ -55,7 +55,7 @@
 				<view class="c-row b-b">
 				<view class="c-row b-b">
 					<text class="tit">净重(自动计算)</text>
 					<text class="tit">净重(自动计算)</text>
 					<view class="con-list">
 					<view class="con-list">
-						<text>{{netWeight}}</text>
+						<text>{{numFilter(netWeight)}}</text>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="cu-bar bg-white ">
 				<view class="cu-bar bg-white ">

+ 1 - 1
unimall-app/pages/user/task_detail_kn.vue

@@ -39,7 +39,7 @@
 				<view class="c-row b-b">
 				<view class="c-row b-b">
 					<text class="tit">净重(自动计算)</text>
 					<text class="tit">净重(自动计算)</text>
 					<view class="con-list">
 					<view class="con-list">
-						<text>{{netWeight}}</text>
+						<text>{{numFilter(netWeight)}}</text>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="cu-bar bg-white">
 				<view class="cu-bar bg-white">

+ 1 - 1
unimall-app/pages/user/task_detail_wai.vue

@@ -79,7 +79,7 @@
 				<view class="c-row b-b">
 				<view class="c-row b-b">
 					<text class="tit">净重(自动计算)</text>
 					<text class="tit">净重(自动计算)</text>
 					<view class="con-list">
 					<view class="con-list">
-						<text>{{netWeight}}</text>
+						<text>{{numFilter(netWeight)}}</text>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="cu-bar bg-white ">
 				<view class="cu-bar bg-white ">

+ 1 - 1
unimall-app/pages/user/task_detail_zx.vue

@@ -51,7 +51,7 @@
 				<view class="c-row b-b">
 				<view class="c-row b-b">
 					<text class="tit">净重(自动计算)</text>
 					<text class="tit">净重(自动计算)</text>
 					<view class="con-list">
 					<view class="con-list">
-						<text>{{netWeight}}</text>
+						<text>{{numFilter(netWeight)}}</text>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="cu-bar bg-white">
 				<view class="cu-bar bg-white">

+ 6 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/DockReportDO.java

@@ -45,5 +45,11 @@ public class DockReportDO extends SuperDO {
      /* gmtCreate */
      /* gmtCreate */
     @TableField("gmt_create")
     @TableField("gmt_create")
     private Date gmtCreate;
     private Date gmtCreate;
+    /* 销售待执行数量 */
+    @TableField("not_sale_count")
+    private Float notSaleCount;
+    /* 采购待执行数量 */
+    @TableField("not_buy_count")
+    private Float notBuyCount;
 
 
 }
 }

+ 5 - 2
unimall-data/src/main/java/com/iotechn/unimall/data/domain/PositionReportDO.java

@@ -39,8 +39,11 @@ public class PositionReportDO extends SuperDO {
      /* 管理员ID */
      /* 管理员ID */
     @TableField("admin_id")
     @TableField("admin_id")
     private Long adminId;
     private Long adminId;
-    /* 销售数量 */
+    /* 销售待执行数量 */
     @TableField(exist = false)
     @TableField(exist = false)
-    private Float saleQuantity;
+    private Float notSaleCount;
+    /* 采购待执行数量 */
+    @TableField(exist = false)
+    private Float notBuyCount;
 
 
 }
 }

+ 3 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/dto/TaskDTO.java

@@ -113,4 +113,7 @@ public class TaskDTO {
     private Double notPay;
     private Double notPay;
     // 平仓未付款金额
     // 平仓未付款金额
     private Double notPayClose;
     private Double notPayClose;
+
+    private Float deduction;
+    private Float invoiceMoney;
 }
 }

+ 2 - 2
unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/ReportMapper.xml

@@ -126,7 +126,7 @@
         uco.company_name AS seller,
         uco.company_name AS seller,
         uco1.company_name AS buyer,
         uco1.company_name AS buyer,
         ut.trade_contract_no AS contractNo,
         ut.trade_contract_no AS contractNo,
-        ut.count - sum(uta1.net_weight) AS count,
+        ut.count - sum(uta1.net_weight) - ut.flat_total AS count,
         uta.gmt_update AS inDate,
         uta.gmt_update AS inDate,
         uta.warehouse,
         uta.warehouse,
         uta.car_no AS carNo,
         uta.car_no AS carNo,
@@ -168,7 +168,7 @@
         uco.company_name as buyer,
         uco.company_name as buyer,
         uco1.company_name as seller,
         uco1.company_name as seller,
         ut.trade_contract_no as contractNo,
         ut.trade_contract_no as contractNo,
-        ut.count - sum(uta1.net_weight) as count,
+        ut.count - sum(uta1.net_weight) - ut.flat_total as count,
         uta.gmt_update as inDate,
         uta.gmt_update as inDate,
         uta.warehouse,
         uta.warehouse,
         uta.car_no as carNo,
         uta.car_no as carNo,

+ 12 - 4
unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/TaskMapper.xml

@@ -60,8 +60,10 @@
                 IFNULL(ucom.company_name,ucom.person_name) as customer,
                 IFNULL(ucom.company_name,ucom.person_name) as customer,
                 case tr.type when 0 then '销售' else '采购' end as type,
                 case tr.type when 0 then '销售' else '采购' end as type,
                 case tr.type when 0 then trs.title else trb.title end as title,
                 case tr.type when 0 then trs.title else trb.title end as title,
-                tr.count as tradeCount
-
+                tr.count as tradeCount,
+                s.pound_img as poundImg,
+                b.deduction,
+                b.invoice_money as invoiceMoney
             FROM
             FROM
                 unimall_task AS s
                 unimall_task AS s
             LEFT JOIN unimall_store a on a.id = s.store_id
             LEFT JOIN unimall_store a on a.id = s.store_id
@@ -146,7 +148,10 @@
                 '' as customer,
                 '' as customer,
                 '' as type,
                 '' as type,
                 '' as title,
                 '' as title,
-                '' as tradeCount
+                '' as tradeCount,
+                '' as poundImg,
+                '' as deduction,
+                '' as invoiceMoney
             FROM
             FROM
                 unimall_task AS s
                 unimall_task AS s
             LEFT JOIN unimall_store a on a.id = s.store_id
             LEFT JOIN unimall_store a on a.id = s.store_id
@@ -224,7 +229,10 @@
                 '' as customer,
                 '' as customer,
                 '' as type,
                 '' as type,
                 '' as title,
                 '' as title,
-                '' as tradeCount
+                '' as tradeCount,
+                '' as poundImg,
+                '' as deduction,
+                '' as invoiceMoney
             FROM
             FROM
                 unimall_task AS s
                 unimall_task AS s
             LEFT JOIN unimall_store a on a.id = s.store_id
             LEFT JOIN unimall_store a on a.id = s.store_id