فهرست منبع

Merge remote-tracking branch 'remotes/origin/developer' into developerA

Aslee 3 سال پیش
والد
کامیت
b4af7e124a
86فایلهای تغییر یافته به همراه4663 افزوده شده و 1407 حذف شده
  1. 1 1
      src/main/java/com/caimei/modules/cmpage/service/CmPageCentreService.java
  2. 3 6
      src/main/java/com/caimei/modules/cmpage/web/CmPageController.java
  3. 5 7
      src/main/java/com/caimei/modules/info/web/InfoController.java
  4. 5 5
      src/main/java/com/caimei/modules/info/web/InfoTypeController.java
  5. 34 15
      src/main/java/com/caimei/modules/logistics/web/LogisticsController.java
  6. 1 4
      src/main/java/com/caimei/modules/miniprogram/utils/UploadPicUtils.java
  7. 1 1
      src/main/java/com/caimei/modules/newhome/service/NewPageCommodityTopicService.java
  8. 13 13
      src/main/java/com/caimei/modules/newhome/service/NewPageFloorService.java
  9. 3 3
      src/main/java/com/caimei/modules/newhome/service/NewPageQualitySupplierService.java
  10. 1 1
      src/main/java/com/caimei/modules/newhome/service/NewPageSmallTopicService.java
  11. 1 1
      src/main/java/com/caimei/modules/newhome/web/NewPageFirstNavigationController.java
  12. 22 9
      src/main/java/com/caimei/modules/opensearch/CoreServiceUitls.java
  13. 9 0
      src/main/java/com/caimei/modules/order/dao/CmPayShopRecordDao.java
  14. 2 1
      src/main/java/com/caimei/modules/order/dao/CmReceiptOrderRelationDao.java
  15. 6 2
      src/main/java/com/caimei/modules/order/dao/CmRefundShopDao.java
  16. 4 0
      src/main/java/com/caimei/modules/order/dao/CmRefundShopRecordDao.java
  17. 4 0
      src/main/java/com/caimei/modules/order/dao/LogisticsRecordDao.java
  18. 59 1
      src/main/java/com/caimei/modules/order/dao/NewOrderDao.java
  19. 5 0
      src/main/java/com/caimei/modules/order/dao/NewShopOrderDao.java
  20. 227 0
      src/main/java/com/caimei/modules/order/entity/ChangePayShopDifference.java
  21. 175 0
      src/main/java/com/caimei/modules/order/entity/ChangePayShopOther.java
  22. 37 0
      src/main/java/com/caimei/modules/order/entity/CmFile.java
  23. 18 0
      src/main/java/com/caimei/modules/order/entity/CmRefundShop.java
  24. 31 2
      src/main/java/com/caimei/modules/order/entity/LogisticsDetailVo.java
  25. 88 0
      src/main/java/com/caimei/modules/order/entity/LogisticsRecord.java
  26. 19 0
      src/main/java/com/caimei/modules/order/entity/NewShopOrder.java
  27. 152 0
      src/main/java/com/caimei/modules/order/service/CmPayShopService.java
  28. 19 19
      src/main/java/com/caimei/modules/order/service/CmRefundShopService.java
  29. 10 10
      src/main/java/com/caimei/modules/order/service/CmReturnedPurchaseService.java
  30. 79 1
      src/main/java/com/caimei/modules/order/service/NewOrderService.java
  31. 52 5
      src/main/java/com/caimei/modules/order/service/NewShopOrderService.java
  32. 55 6
      src/main/java/com/caimei/modules/order/web/CmPayShopController.java
  33. 42 21
      src/main/java/com/caimei/modules/order/web/CmShopOrderController.java
  34. 71 5
      src/main/java/com/caimei/modules/order/web/NewOrderController.java
  35. 39 0
      src/main/java/com/caimei/modules/oss/service/CmOssArchiveService.java
  36. 33 2
      src/main/java/com/caimei/modules/oss/utils/OSSUtils.java
  37. 30 0
      src/main/java/com/caimei/modules/oss/web/CmOssArchiveController.java
  38. 52 7
      src/main/java/com/caimei/modules/product/entity/CmSecondHandDetail.java
  39. 10 1
      src/main/java/com/caimei/modules/product/entity/Product.java
  40. 17 2
      src/main/java/com/caimei/modules/product/web/CmSecondHandDetailController.java
  41. 10 10
      src/main/java/com/caimei/modules/product/web/ProductNewController.java
  42. 3 3
      src/main/java/com/caimei/modules/product/web/ProductsClassifyController.java
  43. 4 4
      src/main/java/com/caimei/modules/user/web/NewCmShopController.java
  44. 135 133
      src/main/java/com/caimei/modules/zplm/service/CmBrandAuthService.java
  45. 3 3
      src/main/resources/config/beta/caimei.properties
  46. 2 2
      src/main/resources/config/beta/dfs_client.conf
  47. 2 2
      src/main/resources/config/beta/log4j.properties
  48. 1 1
      src/main/resources/mappings/modules/order/CmDiscernReceiptMapper.xml
  49. 68 0
      src/main/resources/mappings/modules/order/CmPayShopRecordMapper.xml
  50. 4 2
      src/main/resources/mappings/modules/order/CmReceiptOrderRelationMapper.xml
  51. 14 1
      src/main/resources/mappings/modules/order/CmRefundShopMapper.xml
  52. 10 0
      src/main/resources/mappings/modules/order/CmRefundShopRecordMapper.xml
  53. 21 1
      src/main/resources/mappings/modules/order/LogisticsRecordMapper.xml
  54. 43 0
      src/main/resources/mappings/modules/order/OrderMapper.xml
  55. 16 14
      src/main/resources/mappings/modules/order/ShopOrderMapper.xml
  56. 19 3
      src/main/resources/mappings/modules/product/CmSecondHandDetailMapper.xml
  57. 1 0
      src/main/resources/mappings/modules/product/ProductNewMapper.xml
  58. 28 32
      src/main/webapp/WEB-INF/views/modules/logistics/logisticsForm.jsp
  59. 9 1
      src/main/webapp/WEB-INF/views/modules/order/checkPaymentOrder.jsp
  60. 118 116
      src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptForm.jsp
  61. 5 17
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopChange.jsp
  62. 4 4
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopChange1.jsp
  63. 9 4
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopChangeRecond.jsp
  64. 7 1
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopCheck.jsp
  65. 12 3
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopDetail.jsp
  66. 24 9
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopForm.jsp
  67. 21 13
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopList.jsp
  68. 52 0
      src/main/webapp/WEB-INF/views/modules/order/cmRefundShopDetail.jsp
  69. 9 3
      src/main/webapp/WEB-INF/views/modules/order/cmRefundShopList.jsp
  70. 430 0
      src/main/webapp/WEB-INF/views/modules/order/differencePriceForm.jsp
  71. 170 0
      src/main/webapp/WEB-INF/views/modules/order/differencePriceRemark.jsp
  72. 29 26
      src/main/webapp/WEB-INF/views/modules/order/logisticsDetails.jsp
  73. 7 0
      src/main/webapp/WEB-INF/views/modules/order/newOrderList.jsp
  74. 7 0
      src/main/webapp/WEB-INF/views/modules/order/orderDetail.jsp
  75. 22 16
      src/main/webapp/WEB-INF/views/modules/order/orderForm.jsp
  76. 138 0
      src/main/webapp/WEB-INF/views/modules/order/otherRemark.jsp
  77. 170 0
      src/main/webapp/WEB-INF/views/modules/order/qualification.jsp
  78. 395 0
      src/main/webapp/WEB-INF/views/modules/order/qualificationForm.jsp
  79. 78 0
      src/main/webapp/WEB-INF/views/modules/order/qualificationInfo.jsp
  80. 271 481
      src/main/webapp/WEB-INF/views/modules/order/ship.jsp
  81. 281 308
      src/main/webapp/WEB-INF/views/modules/order/shipLogistic.jsp
  82. 378 0
      src/main/webapp/WEB-INF/views/modules/order/shopOtherFeeForm.jsp
  83. 7 2
      src/main/webapp/WEB-INF/views/modules/product-new/secondHand.jsp
  84. 188 26
      src/main/webapp/WEB-INF/views/modules/product/cmSecondHandDetailForm.jsp
  85. 2 3
      src/main/webapp/WEB-INF/views/modules/user/cmUserBalanceList.jsp
  86. 1 12
      src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyList.jsp

+ 1 - 1
src/main/java/com/caimei/modules/cmpage/service/CmPageCentreService.java

@@ -76,7 +76,7 @@ public class CmPageCentreService extends CrudService<CmPageCentreDao, CmPageCent
                 List<String> imageIds = new ArrayList<>();
                 for (NewPageFloorImage floorImage : floorImages) {
                     if (!floorImage.getImage().contains("http")) {
-                        floorImage.setImage(UploadPicUtils.saveImageToServer(floorImage.getImage(), null));
+                        floorImage.setImage(UploadPicUtils.saveImageToServer(floorImage.getImage()));
                     }
                     CmImage image = new CmImage();
                     BeanUtils.copyProperties(floorImage, image);

+ 3 - 6
src/main/java/com/caimei/modules/cmpage/web/CmPageController.java

@@ -1,14 +1,11 @@
 package com.caimei.modules.cmpage.web;
 
-import com.caimei.constants.common.RedisKeyUtil;
 import com.caimei.modules.cmpage.entity.CmPage;
 import com.caimei.modules.cmpage.entity.CmPageFreedom;
 import com.caimei.modules.cmpage.entity.CmPageHotSearch;
 import com.caimei.modules.cmpage.entity.PageNameContent;
-import com.caimei.modules.cmpage.service.CmPageDocSynService;
-import com.caimei.modules.cmpage.service.CmPageFreedomService;
 import com.caimei.modules.cmpage.service.CmPageService;
-import com.caimei.modules.opensearch.SearchUitls;
+import com.caimei.modules.opensearch.CoreServiceUitls;
 import com.caimei.redis.RedisService;
 import com.caimei.utils.StringUtil;
 import com.caimei.utils.StringUtils;
@@ -47,7 +44,7 @@ public class CmPageController extends BaseController {
     private CmPageService cmPageService;
 
     @Autowired
-    private SearchUitls searchUitls;
+    private CoreServiceUitls coreServiceUitls;
 
     @Autowired
     private RedisService redisService;
@@ -156,7 +153,7 @@ public class CmPageController extends BaseController {
         addMessage(redirectAttributes, "保存成功");
         if ("2".equals(cmPage.getType())) {
             // 更新索引
-            searchUitls.updateEquipmentIndex(Integer.parseInt(cmPage.getId()));
+            coreServiceUitls.updateEquipmentIndex(Integer.parseInt(cmPage.getId()));
         } else if ("6".equals(cmPage.getType())) {
             //清除活动专题缓存
             redisService.removePattern("activityData*");

+ 5 - 7
src/main/java/com/caimei/modules/info/web/InfoController.java

@@ -6,11 +6,9 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import com.caimei.modules.info.entity.CmInfoDocSyn;
 import com.caimei.modules.info.service.CmInfoDocSynService;
-import com.caimei.modules.live.entity.NewPageLive;
 import com.caimei.modules.opensearch.GenerateUtils;
-import com.caimei.modules.opensearch.SearchUitls;
+import com.caimei.modules.opensearch.CoreServiceUitls;
 import com.caimei.redis.RedisService;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -51,7 +49,7 @@ public class InfoController extends BaseController {
 	@Autowired
 	CmInfoDocSynService cmInfoDocSynService;
     @Autowired
-    private SearchUitls searchUitls;
+    private CoreServiceUitls coreServiceUitls;
     @Autowired
 	private RedisService redisService;
     @Resource
@@ -153,7 +151,7 @@ public class InfoController extends BaseController {
 		infoService.save(info,request);
 		addMessage(redirectAttributes, "保存信息成功");
 		// 更新索引
-		searchUitls.updateArticleIndex(Integer.valueOf(info.getId()));
+		coreServiceUitls.updateArticleIndex(Integer.valueOf(info.getId()));
 		if(StringUtils.equals("1", ltype))
 			return "redirect:"+Global.getAdminPath()+"/info/infoLabel/list";
 		return "redirect:"+Global.getAdminPath()+"/info/info/list?repage";
@@ -171,7 +169,7 @@ public class InfoController extends BaseController {
 		}
 		addMessage(redirectAttributes, "删除信息成功");
 		// 删除索引
-		searchUitls.deleteArticleIndex(Integer.valueOf(info.getId()));
+		coreServiceUitls.deleteArticleIndex(Integer.valueOf(info.getId()));
 		return "redirect:"+Global.getAdminPath()+"/info/info/?repage";
 	}
 
@@ -197,7 +195,7 @@ public class InfoController extends BaseController {
 			map.put("msg", "修改成功");
 			for (String id : ids){
 				// 更新索引
-				searchUitls.updateArticleIndex(Integer.valueOf(id));
+				coreServiceUitls.updateArticleIndex(Integer.valueOf(id));
 				Info info = infoService.get(id);
 				Boolean topFlag = (info.getTopPosition() != null && !StringUtils.equals("", info.getTopPosition())) ? true : false;
             	if (topFlag) {

+ 5 - 5
src/main/java/com/caimei/modules/info/web/InfoTypeController.java

@@ -6,7 +6,7 @@ import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import com.caimei.modules.opensearch.SearchUitls;
+import com.caimei.modules.opensearch.CoreServiceUitls;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -44,7 +44,7 @@ public class InfoTypeController extends BaseController {
 	private InfoService infoService;
 
     @Autowired
-    private SearchUitls searchUitls;
+    private CoreServiceUitls coreServiceUitls;
 
 	@ModelAttribute
 	public InfoType get(@RequestParam(required=false) String id) {
@@ -82,7 +82,7 @@ public class InfoTypeController extends BaseController {
 		infoTypeService.save(infoType);
 		addMessage(redirectAttributes, "保存信息分类成功");
 		// 更新全部文章索引
-		searchUitls.updateAllArticleIndex();
+		coreServiceUitls.updateAllArticleIndex();
 		return "redirect:"+Global.getAdminPath()+"/info/infoType/?repage";
 	}
 
@@ -99,7 +99,7 @@ public class InfoTypeController extends BaseController {
 			infoTypeService.delete(infoType);
 			addMessage(redirectAttributes, "删除信息分类成功");
 			// 更新全部文章索引
-			searchUitls.updateAllArticleIndex();
+			coreServiceUitls.updateAllArticleIndex();
 		}
 		return "redirect:"+Global.getAdminPath()+"/info/infoType/?repage";
 	}
@@ -123,7 +123,7 @@ public class InfoTypeController extends BaseController {
 			map.put("msg", "修改成功");
 			for (String id : ids){
 				// 更新索引
-				searchUitls.updateArticleIndex(Integer.valueOf(id));
+				coreServiceUitls.updateArticleIndex(Integer.valueOf(id));
 			}
 		} catch (Exception e) {
 			logger.debug(e.toString(),e);

+ 34 - 15
src/main/java/com/caimei/modules/logistics/web/LogisticsController.java

@@ -7,6 +7,7 @@ import com.caimei.modules.bulkpurchase.entity.OrderProduct;
 import com.caimei.modules.logistics.entity.LogisticsInfo;
 import com.caimei.modules.logistics.entity.Router;
 import com.caimei.modules.logistics.service.LogisticsService;
+import com.caimei.modules.opensearch.CoreServiceUitls;
 import com.caimei.utils.Encodes;
 import com.caimei.utils.RandomStringUtil;
 import com.google.common.collect.Lists;
@@ -49,7 +50,8 @@ public class LogisticsController extends BaseController{
 
     @Autowired
     private OrderProductDao orderProductDao;
-
+    @Autowired
+    private CoreServiceUitls coreServiceUitls;
     @ModelAttribute
     public LogisticsInfo get(@RequestParam(required=false) String id) {
         LogisticsInfo entity = null;
@@ -138,22 +140,39 @@ public class LogisticsController extends BaseController{
     public Map<String, Object> save(LogisticsInfo logisticsInfo, Model model, RedirectAttributes redirectAttributes) {
         Map<String, Object> map = Maps.newLinkedHashMap();
         try {
-            String url = "https://sp0.baidu.com/9_Q4sjW91Qh3otqbppnN2DJv/pae/channel/data/asyncqury?appid=4001&com=" + logisticsInfo.getLogisticsCompanyCode() +
-                    "&nu=" + logisticsInfo.getNu();
-            logger.info(">>>请求链接:"+url);
-            String result = getLogistics(url);
-            logger.info(">>>请求结果:"+result);
-            Map<String, Object> maps = JSONObject.parseObject(result, Map.class);
-            String error_code = MapUtils.getString(maps, "error_code");
-            if (StringUtils.equals(error_code, "0")) {
-                Map<String, Object> data = MapUtils.getMap(maps, "data");
-                Map<String, Object> info = MapUtils.getMap(data, "info");
-                logisticsInfo.setState(Integer.parseInt(MapUtils.getString(info, "state")));
-                logisticsInfo.setInfo(MapUtils.getString(info, "context"));
-                logger.info("物流跟踪 add 》》》》info 信息:" + logisticsInfo.getInfo());
+            String result = coreServiceUitls.queryLogisticsGet(logisticsInfo.getNu(), logisticsInfo.getLogisticsCompanyCode(), "");
+            Map<String, Object> resultMap = JSONObject.parseObject(result, Map.class);
+            String code = MapUtils.getString(resultMap, "code");
+            if (StringUtils.equals(code, "0")) {
+                Map<String, Object> data = MapUtils.getMap(resultMap, "data");
+                String status = MapUtils.getString(data, "status");
+                if (StringUtils.equals(status, "200")) {
+                    logisticsInfo.setLogisticsCompanyCode(MapUtils.getString(data, "com"));
+                    logisticsInfo.setState(Integer.parseInt(MapUtils.getString(data, "state")));
+                    logisticsInfo.setInfo(MapUtils.getString(data, "data"));
+                    logger.info("物流100跟踪 add 》》》》info 信息:" + logisticsInfo.getInfo());
+                } else {
+                    logger.warn("物流100跟踪 add >>>>>>>>>>>"+MapUtils.getString(data, "message"));
+                }
             }else{
-                logger.warn("物流跟踪 add >>>>>>>>>>>"+MapUtils.getString(map, "msg"));
+                logger.warn("物流100跟踪 add >>>>>>>>>>>"+MapUtils.getString(resultMap, "msg"));
             }
+//            String url = "https://sp0.baidu.com/9_Q4sjW91Qh3otqbppnN2DJv/pae/channel/data/asyncqury?appid=4001&com=" + logisticsInfo.getLogisticsCompanyCode() +
+//                    "&nu=" + logisticsInfo.getNu();
+//            logger.info(">>>请求链接:"+url);
+//            String result = getLogistics(url);
+//            logger.info(">>>请求结果:"+result);
+//            Map<String, Object> maps = JSONObject.parseObject(result, Map.class);
+//            String error_code = MapUtils.getString(maps, "error_code");
+//            if (StringUtils.equals(error_code, "0")) {
+//                Map<String, Object> data = MapUtils.getMap(maps, "data");
+//                Map<String, Object> info = MapUtils.getMap(data, "info");
+//                logisticsInfo.setState(Integer.parseInt(MapUtils.getString(info, "state")));
+//                logisticsInfo.setInfo(MapUtils.getString(info, "context"));
+//                logger.info("物流跟踪 add 》》》》info 信息:" + logisticsInfo.getInfo());
+//            }else{
+//                logger.warn("物流跟踪 add >>>>>>>>>>>"+MapUtils.getString(map, "msg"));
+//            }
             logisticsInfo.setUpdateDate(new Date());
             logisticsService.save(logisticsInfo);
             map.put("success",true);

+ 1 - 4
src/main/java/com/caimei/modules/miniprogram/utils/UploadPicUtils.java

@@ -13,7 +13,6 @@ import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.utils.Encodes;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 
-import javax.servlet.http.HttpServletRequest;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -23,15 +22,13 @@ import java.util.Properties;
 
 public class UploadPicUtils {
 
-    public static String saveImageToServer(String imgUrl, HttpServletRequest request) {
+    public static String saveImageToServer(String imgUrl) {
         String photoServer = Global.getConfig("photoServer");//获取文件服务器地址
         ImageUploadInfo saveImageSerivce = new ImageUploadInfo();
         String newImage = imgUrl;
         if (StringUtils.isNotBlank(newImage) && !newImage.startsWith("http:") && !newImage.startsWith("https:")) {
             newImage = Encodes.urlDecode(newImage);
-//            String realPath = request.getSession().getServletContext().getRealPath(newImage);
             String realPath = UploadImageUtils.getAbsolutePath(newImage);
-            //			realPath=Encodes.urlDecode(realPath);
             int pointerIndex = realPath.lastIndexOf(".");
             try {
                 saveImageSerivce = UploadUtils.saveImageSerivce(realPath, pointerIndex, realPath);

+ 1 - 1
src/main/java/com/caimei/modules/newhome/service/NewPageCommodityTopicService.java

@@ -38,7 +38,7 @@ public class NewPageCommodityTopicService extends CrudService<NewPageCommodityTo
 	@Transactional(readOnly = false)
 	public void save(NewPageCommodityTopic newPageCommodityTopic, HttpServletRequest request) {
 		if(null != newPageCommodityTopic.getImage() && !"".equals(newPageCommodityTopic.getImage())){
-			String img = UploadPicUtils.saveImageToServer(newPageCommodityTopic.getImage(),request);
+			String img = UploadPicUtils.saveImageToServer(newPageCommodityTopic.getImage());
 			newPageCommodityTopic.setImage(img);
 		}
 		super.save(newPageCommodityTopic);

+ 13 - 13
src/main/java/com/caimei/modules/newhome/service/NewPageFloorService.java

@@ -72,16 +72,16 @@ public class NewPageFloorService extends CrudService<NewPageFloorDao, NewPageFlo
 
     @Transactional(readOnly = false)
     public void saveFloorContent(NewPageFloorContent floorContent) {
-        floorContent.setPcAdsImage1(UploadPicUtils.saveImageToServer(floorContent.getPcAdsImage1(), null));
-        floorContent.setPcAdsImage2(UploadPicUtils.saveImageToServer(floorContent.getPcAdsImage2(), null));
-        floorContent.setPcAdsImage3(UploadPicUtils.saveImageToServer(floorContent.getPcAdsImage3(), null));
-        floorContent.setPcAdsImage4(UploadPicUtils.saveImageToServer(floorContent.getPcAdsImage4(), null));
-        floorContent.setPcAdsImage5(UploadPicUtils.saveImageToServer(floorContent.getPcAdsImage5(), null));
-        floorContent.setAppletsAdsImage1(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage1(), null));
-        floorContent.setAppletsAdsImage2(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage2(), null));
-        floorContent.setAppletsAdsImage3(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage3(), null));
-        floorContent.setAppletsAdsImage4(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage4(), null));
-        floorContent.setAppletsAdsImage5(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage5(), null));
+        floorContent.setPcAdsImage1(UploadPicUtils.saveImageToServer(floorContent.getPcAdsImage1()));
+        floorContent.setPcAdsImage2(UploadPicUtils.saveImageToServer(floorContent.getPcAdsImage2()));
+        floorContent.setPcAdsImage3(UploadPicUtils.saveImageToServer(floorContent.getPcAdsImage3()));
+        floorContent.setPcAdsImage4(UploadPicUtils.saveImageToServer(floorContent.getPcAdsImage4()));
+        floorContent.setPcAdsImage5(UploadPicUtils.saveImageToServer(floorContent.getPcAdsImage5()));
+        floorContent.setAppletsAdsImage1(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage1()));
+        floorContent.setAppletsAdsImage2(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage2()));
+        floorContent.setAppletsAdsImage3(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage3()));
+        floorContent.setAppletsAdsImage4(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage4()));
+        floorContent.setAppletsAdsImage5(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage5()));
         if (StringUtils.isNotBlank(floorContent.getTemplateType()) && Integer.parseInt(floorContent.getTemplateType()) > 50) {
             floorContent.setTemplateType((Integer.parseInt(floorContent.getTemplateType())-50)+"");
         }
@@ -100,14 +100,14 @@ public class NewPageFloorService extends CrudService<NewPageFloorDao, NewPageFlo
             List<NewPageFloorImage> floorImageList = JSON.parseArray(floorContent.getImages(), NewPageFloorImage.class);
             for (NewPageFloorImage floorImage : floorImageList) {
                 //图片处理
-                floorImage.setImage(UploadPicUtils.saveImageToServer(floorImage.getImage(), null));
-                floorImage.setAppletsImage(UploadPicUtils.saveImageToServer(floorImage.getAppletsImage(), null));
+                floorImage.setImage(UploadPicUtils.saveImageToServer(floorImage.getImage()));
+                floorImage.setAppletsImage(UploadPicUtils.saveImageToServer(floorImage.getAppletsImage()));
                 //换行符处理
                 if (StringUtils.isNotBlank(floorImage.getContent())) {
                     floorImage.setContent(floorImage.getContent().replace("\n", ""));
                 }
                 if (StringUtils.isNotBlank(floorImage.getAdsImage())) {
-                    floorImage.setAdsImage(UploadPicUtils.saveImageToServer(floorImage.getAdsImage(), null));
+                    floorImage.setAdsImage(UploadPicUtils.saveImageToServer(floorImage.getAdsImage()));
                 }
                 if (floorContent.getFloorId() != null) {
                     floorImage.setFloorId(floorContent.getFloorId());

+ 3 - 3
src/main/java/com/caimei/modules/newhome/service/NewPageQualitySupplierService.java

@@ -49,7 +49,7 @@ public class NewPageQualitySupplierService extends CrudService<NewPageQualitySup
 	@Transactional(readOnly = false)
 	public void save(NewPageQualitySupplier newPageQualitySupplier, HttpServletRequest request) {
 		if(null != newPageQualitySupplier.getImage() && !"".equals(newPageQualitySupplier.getImage())){
-			String img = UploadPicUtils.saveImageToServer(newPageQualitySupplier.getImage(),request);
+			String img = UploadPicUtils.saveImageToServer(newPageQualitySupplier.getImage());
 			newPageQualitySupplier.setImage(img);
 		}
 		super.save(newPageQualitySupplier);
@@ -64,11 +64,11 @@ public class NewPageQualitySupplierService extends CrudService<NewPageQualitySup
 	@Transactional(readOnly = false)
 	public void saveImage(NewPageQualitySupplierImage newPageQualitySupplierImage, HttpServletRequest request) {
 		if(null != newPageQualitySupplierImage.getCrmImage() && !"".equals(newPageQualitySupplierImage.getCrmImage())){
-			String img = UploadPicUtils.saveImageToServer(newPageQualitySupplierImage.getCrmImage(),request);
+			String img = UploadPicUtils.saveImageToServer(newPageQualitySupplierImage.getCrmImage());
 			newPageQualitySupplierImage.setCrmImage(img);
 		}
 		if(null != newPageQualitySupplierImage.getWwwImage() && !"".equals(newPageQualitySupplierImage.getWwwImage())){
-			String img = UploadPicUtils.saveImageToServer(newPageQualitySupplierImage.getWwwImage(),request);
+			String img = UploadPicUtils.saveImageToServer(newPageQualitySupplierImage.getWwwImage());
 			newPageQualitySupplierImage.setWwwImage(img);
 		}
 		String id = newPageQualitySupplierImage.getId();

+ 1 - 1
src/main/java/com/caimei/modules/newhome/service/NewPageSmallTopicService.java

@@ -38,7 +38,7 @@ public class NewPageSmallTopicService extends CrudService<NewPageSmallTopicDao,
 	@Transactional(readOnly = false)
 	public void save(NewPageSmallTopic newPageSmallTopic, HttpServletRequest request) {
 		if(null != newPageSmallTopic.getImage() && !"".equals(newPageSmallTopic.getImage())){
-			String img = UploadPicUtils.saveImageToServer(newPageSmallTopic.getImage(),request);
+			String img = UploadPicUtils.saveImageToServer(newPageSmallTopic.getImage());
 					newPageSmallTopic.setImage(img);
 		}
 		super.save(newPageSmallTopic);

+ 1 - 1
src/main/java/com/caimei/modules/newhome/web/NewPageFirstNavigationController.java

@@ -92,7 +92,7 @@ public class NewPageFirstNavigationController extends BaseController {
         }
         //上传图片
         String image = newPageFirstNavigation.getIcon();
-        image = UploadPicUtils.saveImageToServer(image, null);
+        image = UploadPicUtils.saveImageToServer(image);
         newPageFirstNavigation.setIcon(image);
         if (StringUtils.isEmpty(newPageFirstNavigation.getId())) {
             newPageFirstNavigation.setCreateDate(new Date());

+ 22 - 9
src/main/java/com/caimei/modules/opensearch/SearchUitls.java → src/main/java/com/caimei/modules/opensearch/CoreServiceUitls.java

@@ -15,37 +15,37 @@ import org.springframework.web.client.RestTemplate;
  * @date : 2020/6/4
  */
 @Component
-public class SearchUitls {
+public class CoreServiceUitls {
 	Logger logger = LoggerFactory.getLogger(getClass());
     public void updateProductIndex(Integer productId){
-        updatePost("/update/product?productId=" + productId);
+        updateIndexPost("/update/product?productId=" + productId);
     }
 
     public void deleteProductIndex(Integer productId){
-        updatePost("/delete/product?productId=" + productId);
+        updateIndexPost("/delete/product?productId=" + productId);
     }
 
     public void updateArticleIndex(Integer articleId){
-        updatePost("/update/article?articleId=" + articleId);
+        updateIndexPost("/update/article?articleId=" + articleId);
     }
 
     public void deleteArticleIndex(Integer articleId){
-        updatePost("/delete/article?articleId=" + articleId);
+        updateIndexPost("/delete/article?articleId=" + articleId);
     }
 
     public void updateAllArticleIndex(){
-        updatePost("/article/all");
+        updateIndexPost("/article/all");
     }
 
     public void updateShopIndex(Integer shopId){
-        updatePost("/update/shop?shopId=" + shopId);
+        updateIndexPost("/update/shop?shopId=" + shopId);
     }
 
     public void updateEquipmentIndex(Integer equipmentId){
-        updatePost("/update/equipment?equipmentId=" + equipmentId);
+        updateIndexPost("/update/equipment?equipmentId=" + equipmentId);
     }
 
-    private void updatePost(String path){
+    private void updateIndexPost(String path){
         // 获取core服务器地址
         String coreServer = Global.getConfig("caimei.core");
         RestTemplate restTemplate = new RestTemplate();
@@ -58,5 +58,18 @@ public class SearchUitls {
         logger.info("更新索引result:" + result);
     }
 
+    public String queryLogisticsGet(String number, String companyCode, String mobile){
+        // 获取core服务器地址
+        String coreServer = Global.getConfig("caimei.core");
+        RestTemplate restTemplate = new RestTemplate();
+        String uri = coreServer + "/tools/query/logistics?number" + number + "&companyCode=" + companyCode + "&mobile=" + mobile;
+        // 打印参数
+        logger.info("查询物流uri:" + uri);
+        // 发起Get请求
+        String result = restTemplate.getForObject(uri, String.class);
+        logger.info("查询物流result:" + result);
+        return result;
+    }
+
 
 }

+ 9 - 0
src/main/java/com/caimei/modules/order/dao/CmPayShopRecordDao.java

@@ -1,5 +1,7 @@
 package com.caimei.modules.order.dao;
 
+import com.caimei.modules.order.entity.ChangePayShopDifference;
+import com.caimei.modules.order.entity.ChangePayShopOther;
 import com.caimei.modules.order.entity.CmPayShop;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
@@ -47,4 +49,11 @@ public interface CmPayShopRecordDao extends CrudDao<CmPayShopRecord> {
 
     Integer findMaxPayShopRecordId(Integer payShopID);
 
+    List<ChangePayShopOther> findShopOtherFee(Integer shopOrderId);
+
+    void insertShopOtherFee(ChangePayShopOther payShopOther);
+
+    void insertDifference(ChangePayShopDifference payShopDifference);
+
+    List<ChangePayShopDifference> findShopDifference(Integer shopOrderId);
 }

+ 2 - 1
src/main/java/com/caimei/modules/order/dao/CmReceiptOrderRelationDao.java

@@ -5,6 +5,7 @@ import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.caimei.modules.order.entity.CmReceiptOrderRelation;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -29,5 +30,5 @@ public interface CmReceiptOrderRelationDao extends CrudDao<CmReceiptOrderRelatio
 
     CmReceiptOrderRelation findOrderRelation(Integer orderID);
 
-    Integer findOnlinePayment(Integer orderID);
+    Date findOnlinePayment(Integer orderID);
 }

+ 6 - 2
src/main/java/com/caimei/modules/order/dao/CmRefundShopDao.java

@@ -1,15 +1,19 @@
 package com.caimei.modules.order.dao;
 
+import com.caimei.modules.order.entity.CmRefundShop;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
-import com.caimei.modules.order.entity.CmRefundShop;
 
 /**
  * 退款表--供应商退款给采美DAO接口
+ *
  * @author lwt
  * @version 2019-07-01
  */
 @MyBatisDao
 public interface CmRefundShopDao extends CrudDao<CmRefundShop> {
-	
+
+    void updateByDelFlag(Integer refundShopId);
+
+    CmRefundShop findByRefundShopId(Integer refundShopId);
 }

+ 4 - 0
src/main/java/com/caimei/modules/order/dao/CmRefundShopRecordDao.java

@@ -23,4 +23,8 @@ public interface CmRefundShopRecordDao extends CrudDao<CmRefundShopRecord> {
     List<CmRefundShopRecord> getByRefundShopID(@Param("refundShopID") String id);
 
     CmPayShopRecord getPayedRecordByShopOrderId(Integer shopOrderID);
+
+    Integer findByRefundType(Integer shopOrderId);
+
+    void updateByDelFlag(Integer refundShopId);
 }

+ 4 - 0
src/main/java/com/caimei/modules/order/dao/LogisticsRecordDao.java

@@ -12,4 +12,8 @@ import java.util.List;
 public interface LogisticsRecordDao extends CrudDao<LogisticsRecord> {
 
     public List<LogisticsRecord> findByLogisticsBatchID(@Param("logisticsBatchID") Integer logisticsBatchID);
+
+    LogisticsRecord findByRecordId(Integer recordId);
+
+    void updateLogisticsRecord(LogisticsRecord logisticsRecord);
 }

+ 59 - 1
src/main/java/com/caimei/modules/order/dao/NewOrderDao.java

@@ -1,5 +1,6 @@
 package com.caimei.modules.order.dao;
 
+import com.caimei.modules.order.entity.CmFile;
 import com.caimei.modules.order.entity.NewOrder;
 import com.caimei.modules.product.entity.CmPromotion;
 import com.caimei.modules.user.entity.NewCmSp;
@@ -27,7 +28,7 @@ public interface NewOrderDao extends CrudDao<NewOrder> {
 
     List<NewOrder> findOrderList(NewOrder newOrder);
 
-    Double findPaidOrderID(@Param("orderID")Integer orderID);
+    Double findPaidOrderID(@Param("orderID") Integer orderID);
 
     List<CmPromotion> findPromotionsByIds(@Param("promotionsIds") Set promotionsIds);
 
@@ -39,19 +40,76 @@ public interface NewOrderDao extends CrudDao<NewOrder> {
 
     /**
      * 删除此订单下订单促销
+     *
      * @param orderId
      */
     void deleterPomotionsOrder(Integer orderId);
 
     /**
      * 更新订单付款状态和0成本标识
+     *
      * @param newOrder
      */
     void updateOrderStatus(NewOrder newOrder);
 
     /**
      * 获取上线协销人员,排除采美默认协销经理
+     *
      * @return ServiceProvider
      */
     List<NewCmSp> findServiceProviderList();
+
+    /**
+     * 修改订单返佣标识
+     *
+     * @param orderId
+     */
+    void updateByRebateFlag(Integer orderId);
+
+    /**
+     * 查询商品资质文件
+     *
+     * @param recordId
+     * @return
+     */
+    List<CmFile> findQualificationFile(String recordId);
+
+    /**
+     * 查询资质图片
+     *
+     * @param recordId
+     * @return
+     */
+    List<String> findQualificationImage(Integer recordId);
+
+    /**
+     * 删除所有的资质图片
+     *
+     * @param recordId
+     */
+    void deleteQualificationImage(Integer recordId);
+
+    /**
+     * 保存资质图片
+     *
+     * @param recordId
+     * @param image
+     */
+    void insertQualificationImage(@Param("recordId") Integer recordId, @Param("image") String image);
+
+    /**
+     * 删除商品资质文件
+     *
+     * @param recordId
+     */
+    void deleteQualificationFile(Integer recordId);
+
+    /**
+     * 保存商品资质文件
+     *
+     * @param recordId
+     * @param fileName
+     * @param ossName
+     */
+    void insertQualificationFile(@Param("recordId") Integer recordId, @Param("fileName") String fileName, @Param("ossName") String ossName);
 }

+ 5 - 0
src/main/java/com/caimei/modules/order/dao/NewShopOrderDao.java

@@ -5,6 +5,7 @@ import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import org.apache.ibatis.annotations.Param;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 /**
@@ -64,4 +65,8 @@ public interface NewShopOrderDao extends CrudDao<NewShopOrder> {
     NewShopOrder findSiblingPostFeeOrder(@Param("orderID") Integer orderID);
 
     void updatePayStatus(@Param("shopOrderID") Integer shopOrderID,@Param("payStatus") String payStatus);
+
+    void updateByShopOtherFee(@Param("shopOtherFee") BigDecimal shopOtherFee, @Param("shopOrderId") Integer shopOrderId);
+
+    void updateByDifferencePrice(@Param("type") Integer type,@Param("differencePrice") BigDecimal differencePrice, @Param("shopOrderId") Integer shopOrderId);
 }

+ 227 - 0
src/main/java/com/caimei/modules/order/entity/ChangePayShopDifference.java

@@ -0,0 +1,227 @@
+package com.caimei.modules.order.entity;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * Description
+ *
+ * @author : plf
+ * @date : 2021/5/26
+ */
+public class ChangePayShopDifference implements Serializable {
+    private Integer id;
+    /**
+     * 子订单Id
+     */
+    private Integer shopOrderId;
+
+    /**
+     * 修改差价金额的用户Id
+     */
+    private Integer refundShopId;
+
+    /**
+     * 差价金额
+     */
+    private BigDecimal differencePrice;
+
+    /**
+     * 差价类型:1 少付;2 多付
+     */
+    private Integer type;
+
+    /**
+     * 修改第三方金额的用户ID
+     */
+    private Integer modifyUserId;
+
+    /**
+     * 备注内容
+     */
+    private String remark;
+
+    /**
+     * 备注图片(多个使用,分割)
+     */
+    private String remarkImage;
+
+    /**
+     * 修改时间
+     */
+    private Date updateTime;
+
+    private String[] remarkImages;
+
+    /**
+     * 待付款金额
+     */
+    private BigDecimal waitPayShop;
+
+    /**
+     * 11 线下转账,22 欠款账簿
+     */
+    private String refundWay;
+
+    /**
+     * 线下转账银行
+     */
+    private Integer refundType;
+
+    /**
+     * 线下转账金额
+     */
+    private BigDecimal refundAmount;
+
+    /**
+     * 欠款账簿金额
+     */
+    private BigDecimal refundBalanceAmount;
+
+    /**
+     * 系统用户名称
+     */
+    private String systemName;
+
+    /**
+     * 退款数据
+     */
+    private CmRefundShop refundShop;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getShopOrderId() {
+        return shopOrderId;
+    }
+
+    public void setShopOrderId(Integer shopOrderId) {
+        this.shopOrderId = shopOrderId;
+    }
+
+    public Integer getRefundShopId() {
+        return refundShopId;
+    }
+
+    public void setRefundShopId(Integer refundShopId) {
+        this.refundShopId = refundShopId;
+    }
+
+    public BigDecimal getDifferencePrice() {
+        return differencePrice;
+    }
+
+    public void setDifferencePrice(BigDecimal differencePrice) {
+        this.differencePrice = differencePrice;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public Integer getModifyUserId() {
+        return modifyUserId;
+    }
+
+    public void setModifyUserId(Integer modifyUserId) {
+        this.modifyUserId = modifyUserId;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getRemarkImage() {
+        return remarkImage;
+    }
+
+    public void setRemarkImage(String remarkImage) {
+        this.remarkImage = remarkImage;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String[] getRemarkImages() {
+        return remarkImages;
+    }
+
+    public void setRemarkImages(String[] remarkImages) {
+        this.remarkImages = remarkImages;
+    }
+
+    public BigDecimal getWaitPayShop() {
+        return waitPayShop;
+    }
+
+    public void setWaitPayShop(BigDecimal waitPayShop) {
+        this.waitPayShop = waitPayShop;
+    }
+
+    public String getRefundWay() {
+        return refundWay;
+    }
+
+    public void setRefundWay(String refundWay) {
+        this.refundWay = refundWay;
+    }
+
+    public BigDecimal getRefundAmount() {
+        return refundAmount;
+    }
+
+    public void setRefundAmount(BigDecimal refundAmount) {
+        this.refundAmount = refundAmount;
+    }
+
+    public BigDecimal getRefundBalanceAmount() {
+        return refundBalanceAmount;
+    }
+
+    public void setRefundBalanceAmount(BigDecimal refundBalanceAmount) {
+        this.refundBalanceAmount = refundBalanceAmount;
+    }
+
+    public Integer getRefundType() {
+        return refundType;
+    }
+
+    public void setRefundType(Integer refundType) {
+        this.refundType = refundType;
+    }
+
+    public String getSystemName() {
+        return systemName;
+    }
+
+    public void setSystemName(String systemName) {
+        this.systemName = systemName;
+    }
+
+    public CmRefundShop getRefundShop() {
+        return refundShop;
+    }
+
+    public void setRefundShop(CmRefundShop refundShop) {
+        this.refundShop = refundShop;
+    }
+}

+ 175 - 0
src/main/java/com/caimei/modules/order/entity/ChangePayShopOther.java

@@ -0,0 +1,175 @@
+package com.caimei.modules.order.entity;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 付第三方记录表
+ *
+ * @author : plf
+ * @date : 2021/5/26
+ */
+public class ChangePayShopOther implements Serializable {
+    private Integer id;
+    /**
+     * 子订单Id
+     */
+    private Integer shopOrderId;
+
+    /**
+     * 付第三方金额
+     */
+    private BigDecimal shopOtherFee;
+
+    /**
+     * 修改第三方金额的用户ID
+     */
+    private Integer modifyUserId;
+
+    /**
+     * 开户名
+     */
+    private String bankAccountName;
+
+    /**
+     * 账号
+     */
+    private String bankAccount;
+
+    /**
+     * 开户行
+     */
+    private String bankName;
+
+    /**
+     * 账号的类型 0公账, 1私账
+     */
+    private Integer type;
+
+    /**
+     * 备注内容
+     */
+    private String remark;
+
+    /**
+     * 备注图片(多个使用,分割)
+     */
+    private String remarkImage;
+
+    /**
+     * 修改时间
+     */
+    private Date updateTime;
+
+    private String[] remarkImages;
+
+    /**
+     * 系统用户名称
+     */
+    private String systemName;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getShopOrderId() {
+        return shopOrderId;
+    }
+
+    public void setShopOrderId(Integer shopOrderId) {
+        this.shopOrderId = shopOrderId;
+    }
+
+    public BigDecimal getShopOtherFee() {
+        return shopOtherFee;
+    }
+
+    public void setShopOtherFee(BigDecimal shopOtherFee) {
+        this.shopOtherFee = shopOtherFee;
+    }
+
+    public Integer getModifyUserId() {
+        return modifyUserId;
+    }
+
+    public void setModifyUserId(Integer modifyUserId) {
+        this.modifyUserId = modifyUserId;
+    }
+
+    public String getBankAccountName() {
+        return bankAccountName;
+    }
+
+    public void setBankAccountName(String bankAccountName) {
+        this.bankAccountName = bankAccountName;
+    }
+
+    public String getBankAccount() {
+        return bankAccount;
+    }
+
+    public void setBankAccount(String bankAccount) {
+        this.bankAccount = bankAccount;
+    }
+
+    public String getBankName() {
+        return bankName;
+    }
+
+    public void setBankName(String bankName) {
+        this.bankName = bankName;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getRemarkImage() {
+        return remarkImage;
+    }
+
+    public void setRemarkImage(String remarkImage) {
+        this.remarkImage = remarkImage;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String[] getRemarkImages() {
+        return remarkImages;
+    }
+
+    public void setRemarkImages(String[] remarkImages) {
+        this.remarkImages = remarkImages;
+    }
+
+    public String getSystemName() {
+        return systemName;
+    }
+
+    public void setSystemName(String systemName) {
+        this.systemName = systemName;
+    }
+}

+ 37 - 0
src/main/java/com/caimei/modules/order/entity/CmFile.java

@@ -0,0 +1,37 @@
+package com.caimei.modules.order.entity;
+
+import java.io.Serializable;
+
+/**
+ * Description
+ *
+ * @author : plf
+ * @date : 2021/5/24
+ */
+public class CmFile implements Serializable {
+    /**
+     * 资质文件名称
+     */
+    private String fileName;
+
+    /**
+     * oss服务器文件名称
+     */
+    private String ossName;
+
+    public String getFileName() {
+        return fileName;
+    }
+
+    public void setFileName(String fileName) {
+        this.fileName = fileName;
+    }
+
+    public String getOssName() {
+        return ossName;
+    }
+
+    public void setOssName(String ossName) {
+        this.ossName = ossName;
+    }
+}

+ 18 - 0
src/main/java/com/caimei/modules/order/entity/CmRefundShop.java

@@ -34,6 +34,8 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 	private String orderID;      //主订单ID
 	private String orderNo;      //订单编号
 	private Integer organizeID;  //组织id
+	private Integer recordRefundType;   //退款方式: 5 补差价退款(其他正常退款)
+	private ChangePayShopDifference shopDifference; //补差价备注
 
 	public Integer getOrganizeID() {
 		return organizeID;
@@ -192,4 +194,20 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 	public void setRefundBalanceAmount(Double refundBalanceAmount) {
 		this.refundBalanceAmount = refundBalanceAmount;
 	}
+
+	public Integer getRecordRefundType() {
+		return recordRefundType;
+	}
+
+	public void setRecordRefundType(Integer recordRefundType) {
+		this.recordRefundType = recordRefundType;
+	}
+
+	public ChangePayShopDifference getShopDifference() {
+		return shopDifference;
+	}
+
+	public void setShopDifference(ChangePayShopDifference shopDifference) {
+		this.shopDifference = shopDifference;
+	}
 }

+ 31 - 2
src/main/java/com/caimei/modules/order/entity/LogisticsDetailVo.java

@@ -1,7 +1,11 @@
 package com.caimei.modules.order.entity;
 
+import org.apache.commons.lang3.StringUtils;
+
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
  * 单条物流信息展示
@@ -10,10 +14,19 @@ public class LogisticsDetailVo {
 
     private String time;
     private String desc;
+    private String context;
 
 
     public String getTime() {
-        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(Long.valueOf(time + "000")));
+         Pattern pattern = Pattern.compile("[0-9]{1,}");
+         Matcher matcher = pattern.matcher((CharSequence) time);
+         boolean result=matcher.matches();
+         if (result == true) {
+                return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(Long.valueOf(time + "000")));
+         }else{
+                return time;
+
+         }
     }
 
     public void setTime(String time) {
@@ -21,10 +34,26 @@ public class LogisticsDetailVo {
     }
 
     public String getDesc() {
-        return desc;
+        if(StringUtils.isEmpty(desc)){
+            return context;
+        } else {
+           return desc;
+        }
     }
 
     public void setDesc(String desc) {
         this.desc = desc;
     }
+
+    public String getContext() {
+        if(StringUtils.isEmpty(context)){
+            return desc;
+        } else {
+           return context;
+        }
+    }
+
+    public void setContext(String context) {
+        this.context = context;
+    }
 }

+ 88 - 0
src/main/java/com/caimei/modules/order/entity/LogisticsRecord.java

@@ -1,8 +1,12 @@
 package com.caimei.modules.order.entity;
 
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.thinkgem.jeesite.common.persistence.DataEntity;
 
+import java.util.Date;
+import java.util.List;
+
 /**
  * @author lwt
  * @date 2018-07-24
@@ -20,6 +24,16 @@ public class LogisticsRecord extends DataEntity<LogisticsRecord> {
     private Integer productID; //商品ID
     private String productName; //商品名称
     private String image; //商品图片
+    private String sn;     //SN码
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date uploadTime;    //上传商品资质时间
+    private String shopName; //供应商名称
+    private Boolean isFile = false; //是否上传资质文件
+    private List<CmFile> fileList;  //资质文件
+    private List<String> imageList;  //资质图片
+    private String[] images;
+    private String[] files;
+    private Integer recordId; //发货记录id
 
 
     public Integer getLogisticsBatchID() {
@@ -61,6 +75,7 @@ public class LogisticsRecord extends DataEntity<LogisticsRecord> {
     public void setBuyNum(Integer buyNum) {
         this.buyNum = buyNum;
     }
+
     public Integer getPresentNum() {
         return presentNum;
     }
@@ -68,6 +83,7 @@ public class LogisticsRecord extends DataEntity<LogisticsRecord> {
     public void setPresentNum(Integer presentNum) {
         this.presentNum = presentNum;
     }
+
     public Integer getNum() {
         return num;
     }
@@ -99,4 +115,76 @@ public class LogisticsRecord extends DataEntity<LogisticsRecord> {
     public void setImage(String image) {
         this.image = image;
     }
+
+    public String getShopName() {
+        return shopName;
+    }
+
+    public void setShopName(String shopName) {
+        this.shopName = shopName;
+    }
+
+    public String getSn() {
+        return sn;
+    }
+
+    public void setSn(String sn) {
+        this.sn = sn;
+    }
+
+    public Boolean getIsFile() {
+        return isFile;
+    }
+
+    public void setIsFile(Boolean isFile) {
+        this.isFile = isFile;
+    }
+
+    public List<CmFile> getFileList() {
+        return fileList;
+    }
+
+    public void setFileList(List<CmFile> fileList) {
+        this.fileList = fileList;
+    }
+
+    public List<String> getImageList() {
+        return imageList;
+    }
+
+    public void setImageList(List<String> imageList) {
+        this.imageList = imageList;
+    }
+
+    public String[] getImages() {
+        return images;
+    }
+
+    public void setImages(String[] images) {
+        this.images = images;
+    }
+
+    public String[] getFiles() {
+        return files;
+    }
+
+    public void setFiles(String[] files) {
+        this.files = files;
+    }
+
+    public Date getUploadTime() {
+        return uploadTime;
+    }
+
+    public void setUploadTime(Date uploadTime) {
+        this.uploadTime = uploadTime;
+    }
+
+    public Integer getRecordId() {
+        return recordId;
+    }
+
+    public void setRecordId(Integer recordId) {
+        this.recordId = recordId;
+    }
 }

+ 19 - 0
src/main/java/com/caimei/modules/order/entity/NewShopOrder.java

@@ -4,6 +4,7 @@ import com.caimei.modules.product.entity.CmPromotion;
 import com.thinkgem.jeesite.common.persistence.DataEntity;
 
 import java.beans.Transient;
+import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.util.List;
 
@@ -82,6 +83,8 @@ public class NewShopOrder extends DataEntity<NewShopOrder> {
     private String sendOutStatus; //发货状态:1待发货、2部分发货、3已发货
     private String[] ps;    //付款状态集合
     private Integer zeroCostFlag;   //子订单0成本标识
+    private Integer differenceType; //差价类型:1 少付;2 多付
+    private BigDecimal differencePrice;  //补差价金额
     //-------------        虚拟字段   ----------------------------
     private String shopName;            //供应商
     private String commercialCode;      //分账方,子商户商编
@@ -1064,4 +1067,20 @@ public class NewShopOrder extends DataEntity<NewShopOrder> {
     public void setCommercialCode(String commercialCode) {
         this.commercialCode = commercialCode;
     }
+
+    public Integer getDifferenceType() {
+        return differenceType;
+    }
+
+    public void setDifferenceType(Integer differenceType) {
+        this.differenceType = differenceType;
+    }
+
+    public BigDecimal getDifferencePrice() {
+        return differencePrice;
+    }
+
+    public void setDifferencePrice(BigDecimal differencePrice) {
+        this.differencePrice = differencePrice;
+    }
 }

+ 152 - 0
src/main/java/com/caimei/modules/order/service/CmPayShopService.java

@@ -3,6 +3,7 @@ package com.caimei.modules.order.service;
 import com.caimei.dfs.image.beens.ImageUploadInfo;
 import com.caimei.modules.common.utils.UploadUtils;
 import com.caimei.modules.hehe.dao.HeHeNewOrderDao;
+import com.caimei.modules.miniprogram.utils.UploadPicUtils;
 import com.caimei.modules.order.dao.*;
 import com.caimei.modules.order.entity.*;
 import com.caimei.modules.sys.utils.UploadImageUtils;
@@ -26,6 +27,7 @@ import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.stream.Collectors;
 
 /**
@@ -59,6 +61,8 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
     private CmRefundShopRecordDao cmRefundShopRecordDao;
     @Resource
     private HeHeNewOrderDao heHeNewOrderDao;
+    @Resource
+    private CmRefundShopDao cmRefundShopDao;
 
     public CmPayShop get(String id) {
         CmPayShop payShop = super.get(id);
@@ -151,6 +155,11 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
             for (NewShopOrder so : payOrderList) {
                 totalAmount += ((so.getShouldPayShopAmount() == null ? 0D : so.getShouldPayShopAmount()) -
                         (so.getPayedShopAmount() == null ? 0D : so.getPayedShopAmount()));
+                if (so.getDifferenceType() != null && so.getDifferenceType() == 1) {
+                    totalAmount = MathUtil.add(totalAmount, so.getDifferencePrice()).doubleValue();
+                } else if (so.getDifferenceType() != null && so.getDifferenceType() == 2) {
+                    totalAmount = MathUtil.sub(totalAmount, so.getDifferencePrice()).doubleValue();
+                }
                 List<NewOrderProduct> orderProductList = newOrderProductDao.findByShopOrderID(so.getShopOrderID());
                 /*
                  1. 若发生退货,数量要减去已退货和已取消的数量
@@ -163,6 +172,13 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                 }
                 so.setNewOrderProducts(orderProductList);
                 so.setWaitPayShop((so.getShouldPayShopAmount() == null ? 0D : so.getShouldPayShopAmount()) - (so.getPayedShopAmount() == null ? 0D : so.getPayedShopAmount()));
+                if (so.getDifferenceType() != null && so.getDifferenceType() == 1) {
+                    BigDecimal waitPayShop = MathUtil.add(so.getWaitPayShop(), so.getDifferencePrice());
+                    so.setWaitPayShop(waitPayShop.doubleValue());
+                } else if (so.getDifferenceType() != null && so.getDifferenceType() == 2) {
+                    BigDecimal waitPayShop = MathUtil.sub(so.getWaitPayShop(), so.getDifferencePrice());
+                    so.setWaitPayShop(waitPayShop.doubleValue());
+                }
 
                 //统计该子订单的主的收款金额和收款状态
                 NewOrder newOrder = newOrderDao.get(so.getOrderID().toString());
@@ -481,6 +497,12 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
             BigDecimal payedFee = MathUtil.add(MathUtil.add(record.getPayAmount(), wipePayment), shopOrder.getPayedShopAmount());
             // 总共要付的金额
             BigDecimal shouldPayFee = BigDecimal.valueOf(shopOrder.getShouldPayShopAmount());
+            //判断是否有差价金额
+            if (shopOrder.getDifferenceType() != null && shopOrder.getDifferenceType() == 1) {
+                shouldPayFee = MathUtil.add(shouldPayFee, shopOrder.getDifferencePrice());
+            } else if (shopOrder.getDifferenceType() != null && shopOrder.getDifferenceType() == 2) {
+                shouldPayFee = MathUtil.sub(shouldPayFee, shopOrder.getDifferencePrice());
+            }
             if (MathUtil.compare(payedFee, shouldPayFee) == -1) {
                 // (本次付款金额 + 抹平金额 + 原来已经付过的金额)  < 总共要付的金额
                 shopOrder.setPayStatus("2");
@@ -692,4 +714,134 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
         cpsr.setDelFlag("1");
         cmPayShopRecordDao.insert(cpsr);
     }
+
+    public ChangePayShopOther shopOtherFeeForm(Integer shopOrderId) {
+        ChangePayShopOther payShopOther = new ChangePayShopOther();
+        List<ChangePayShopOther> shopOtherList = cmPayShopRecordDao.findShopOtherFee(shopOrderId);
+        if (shopOtherList != null && shopOtherList.size() > 0) {
+            payShopOther = shopOtherList.get(0);
+        }
+        return payShopOther;
+    }
+
+    @Transactional(readOnly = false)
+    public void saveShopOtherFee(ChangePayShopOther payShopOther) {
+        String[] remarkImages = payShopOther.getRemarkImages();
+        if (remarkImages != null && remarkImages.length > 0) {
+            StringBuilder remarkImage = new StringBuilder();
+            for (String image : remarkImages) {
+                if (StringUtils.isNotBlank(image)) {
+                    String url = UploadPicUtils.saveImageToServer(image);
+                    remarkImage.append(url).append(",");
+                }
+            }
+            payShopOther.setRemarkImage(String.valueOf(remarkImage));
+        }
+        payShopOther.setModifyUserId(Integer.parseInt(UserUtils.getUser().getId()));
+        cmPayShopRecordDao.insertShopOtherFee(payShopOther);
+        newShopOrderDao.updateByShopOtherFee(payShopOther.getShopOtherFee(), payShopOther.getShopOrderId());
+    }
+
+    public ChangePayShopDifference differencePriceForm(Integer shopOrderId) {
+        ChangePayShopDifference payShopDifference = new ChangePayShopDifference();
+        payShopDifference.setShopOrderId(shopOrderId);
+        NewShopOrder shopOrder = newShopOrderDao.findByShopOrderID(shopOrderId);
+        BigDecimal waitPayShop = BigDecimal.ZERO;
+        if (shopOrder != null) {
+            waitPayShop = MathUtil.sub(shopOrder.getShouldPayShopAmount(), shopOrder.getPayedShopAmount());
+        }
+        payShopDifference.setWaitPayShop(waitPayShop);
+        return payShopDifference;
+    }
+
+    @Transactional(readOnly = false)
+    public void saveDifferencePrice(ChangePayShopDifference payShopDifference) throws Exception {
+        String[] remarkImages = payShopDifference.getRemarkImages();
+        if (remarkImages != null && remarkImages.length > 0) {
+            StringBuilder remarkImage = new StringBuilder();
+            for (String image : remarkImages) {
+                if (StringUtils.isNotBlank(image)) {
+                    String url = UploadPicUtils.saveImageToServer(image);
+                    remarkImage.append(url).append(",");
+                }
+            }
+            payShopDifference.setRemarkImage(String.valueOf(remarkImage));
+        }
+        Integer shopOrderId = payShopDifference.getShopOrderId();
+        NewShopOrder shopOrder = newShopOrderDao.findByShopOrderID(shopOrderId);
+        //查询之前是否有差价退款过
+        Integer refundShopId = cmRefundShopRecordDao.findByRefundType(shopOrderId);
+        if (refundShopId != null && refundShopId > 0) {
+            //逻辑删除
+            cmRefundShopDao.updateByDelFlag(refundShopId);
+            cmRefundShopRecordDao.updateByDelFlag(refundShopId);
+        }
+
+        //待付供应商金额
+        BigDecimal waitPayShop = MathUtil.sub(shopOrder.getShouldPayShopAmount(), shopOrder.getPayedShopAmount());
+        //补差价金额
+        BigDecimal differencePrice = payShopDifference.getDifferencePrice();
+        if (payShopDifference.getType() == 2 && MathUtil.compare(differencePrice, waitPayShop) > 0) {
+            //多付且差价大于待付金额,会发生供应商退款操作
+            BigDecimal waitRefund = MathUtil.sub(differencePrice, waitPayShop);
+            String refundWay = payShopDifference.getRefundWay();
+            BigDecimal refundAmount = payShopDifference.getRefundAmount();
+            BigDecimal refundBalanceAmount = payShopDifference.getRefundBalanceAmount();
+            if (refundWay.equals("1")) {
+                //线下退
+                refundBalanceAmount = BigDecimal.ZERO;
+            } else if (refundWay.contains("2")) {
+                //欠款账簿
+                refundAmount = BigDecimal.ZERO;
+            } else {
+                //两种方式都有
+                refundWay = "3";
+            }
+            if (MathUtil.compare(waitRefund, MathUtil.add(refundAmount, refundBalanceAmount)) == 0) {
+                CmRefundShop refundShop = new CmRefundShop();
+                String time = DateUtils.formatDateTime(new Date());
+                User currentUser = UserUtils.getUser();
+                refundShop.setShopID(shopOrder.getShopID().toString());
+                refundShop.setOperator(currentUser.getId());
+                refundShop.setOperatTime(time);
+                refundShop.setRefundWay(refundWay);
+                refundShop.setRefundAmount(refundAmount.doubleValue());
+                refundShop.setRefundBalanceAmount(refundBalanceAmount.doubleValue());
+                refundShop.setRefundType(payShopDifference.getRefundType().toString());
+                refundShop.setRemark(payShopDifference.getRemark());
+                refundShop.setDelFlag("0");
+                cmRefundShopDao.insert(refundShop);
+
+                CmRefundShopRecord record = new CmRefundShopRecord();
+                record.setShopID(String.valueOf(shopOrder.getShopID()));
+                record.setShopOrderID(shopOrder.getShopOrderID().toString());
+                record.setShopOrderNo(shopOrder.getShopOrderNo());
+                record.setRefundType("5");
+                record.setRefundAmount(waitRefund.doubleValue());
+                record.setRefundTime(time);
+                record.setRefundShopID(refundShop.getId());
+                record.setDelFlag("0");
+                cmRefundShopRecordDao.insert(record);
+                payShopDifference.setRefundShopId(Integer.valueOf(refundShop.getId()));
+
+                //修改付供应商状态
+                newShopOrderDao.updatePayStatus(shopOrder.getShopOrderID(), "3");
+                List<NewShopOrder> shopOrders = newShopOrderDao.findListByOrderID(shopOrder.getOrderID());
+                AtomicBoolean isPayStatus = new AtomicBoolean(true);
+                shopOrders.forEach(s -> {
+                    if (!"3".equals(s.getPayStatus())) {
+                        isPayStatus.set(false);
+                    }
+                });
+                if (isPayStatus.get()) {
+                    newOrderDao.updatePayStatus("3", shopOrder.getOrderID());
+                }
+            } else {
+                throw new Exception("退款金额异常");
+            }
+        }
+        payShopDifference.setModifyUserId(Integer.parseInt(UserUtils.getUser().getId()));
+        cmPayShopRecordDao.insertDifference(payShopDifference);
+        newShopOrderDao.updateByDifferencePrice(payShopDifference.getType(), differencePrice, shopOrderId);
+    }
 }

+ 19 - 19
src/main/java/com/caimei/modules/order/service/CmRefundShopService.java

@@ -9,7 +9,6 @@ import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.utils.DateUtils;
-import com.thinkgem.jeesite.common.utils.MacUtils;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.modules.sys.entity.User;
 import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
@@ -49,6 +48,8 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
     private NewOrderDao newOrderDao;
     @Resource
     private CmReceiptOrderRelationDao cmReceiptOrderRelationDao;
+    @Resource
+    private CmPayShopRecordDao cmPayShopRecordDao;
 
     public CmRefundShop get(String id) {
         return super.get(id);
@@ -130,7 +131,7 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
                 } else {
                     so.setRefundsAmount(0d);
                 }
-                refundAmount += (so.getPayedShopAmount()-so.getRefundsAmount()-so.getShouldPayShopAmount());
+                refundAmount += (so.getPayedShopAmount() - so.getRefundsAmount() - so.getShouldPayShopAmount());
                 List<NewOrderProduct> orderProductList = newOrderProductDao.findByShopOrderID(so.getShopOrderID());
                 /*
                  1. 若发生退货,数量要减去已退货和已取消的数量
@@ -140,15 +141,6 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
                     Integer returnNum = newOrderProductDao.CountReturnedPurchaseProduct(so.getShopOrderID(), p.getOrderProductID());
                     returnNum = returnNum == null ? 0 : returnNum;
                     p.setReturnedNum(returnNum);
-                    /*if ( returnNum!=null && returnNum>0 ){
-                        if (p.getPresentNum()>0) {
-                            p.setNum(0);
-                            p.setPresentNum(0);
-                        } else {
-                            p.setNum(p.getNum()-returnNum);
-                        }
-                    }
-                    p.setReturnedNum((returnNum !=null && returnNum>0)?returnNum:0);*/
                 }
                 so.setNewOrderProducts(orderProductList);
                 //主订单退款(退货)总金额
@@ -167,6 +159,22 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
         } else {
             List<NewShopOrder> payOrderList = newShopOrderDao.findByRefundID(cmRefundShop.getId());
             List<CmRefundShopRecord> refundRecord = cmRefundShopRecordDao.getByRefundShopID(cmRefundShop.getId());
+            //差价退款备注
+            for (CmRefundShopRecord shopRecord : refundRecord) {
+                if (shopRecord.getRefundType() != null && "5".equals(shopRecord.getRefundType())) {
+                    cmRefundShop.setRecordRefundType(5);
+                    List<ChangePayShopDifference> shopDifferenceList = cmPayShopRecordDao.findShopDifference(Integer.valueOf(shopRecord.getShopOrderID()));
+                    if (shopDifferenceList != null && shopDifferenceList.size() > 0) {
+                        ChangePayShopDifference difference = shopDifferenceList.get(0);
+                        User user = UserUtils.get(difference.getModifyUserId().toString());
+                        if (user != null) {
+                            difference.setSystemName(user.getName());
+                        }
+                        cmRefundShop.setShopDifference(difference);
+                    }
+                    break;
+                }
+            }
             for (NewShopOrder so : payOrderList) {
                 //统计该子订单的主的收款金额和收款状态
                 NewOrder newOrder = newOrderDao.get(so.getOrderID().toString());
@@ -191,14 +199,6 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
                     Integer returnNum = newOrderProductDao.CountReturnedPurchaseProduct(so.getShopOrderID(), p.getOrderProductID());
                     returnNum = returnNum == null ? 0 : returnNum;
                     p.setReturnedNum(returnNum);
-                    /*if ( returnNum!=null && returnNum>0 ){
-                        if (p.getPresentNum()>0) {
-                            p.setNum(0);
-                            p.setPresentNum(0);
-                        } else {
-                            p.setNum(p.getNum()-returnNum);
-                        }
-                    }*/
                 }
                 so.setNewOrderProducts(orderProductList);
                 so.setRefundAmount(record.getRefundAmount());

+ 10 - 10
src/main/java/com/caimei/modules/order/service/CmReturnedPurchaseService.java

@@ -113,23 +113,23 @@ public class CmReturnedPurchaseService extends CrudService<CmReturnedPurchaseDao
         cmReturnedPurchase.setStatus("1");
 
         if (null != cmReturnedPurchase.getImage1() && !"".equals(cmReturnedPurchase.getImage1())) {
-            String img = saveImageToServer(cmReturnedPurchase.getImage1(), request);
+            String img = saveImageToServer(cmReturnedPurchase.getImage1());
             cmReturnedPurchase.setImage1(img);
         }
         if (null != cmReturnedPurchase.getImage2() && !"".equals(cmReturnedPurchase.getImage2())) {
-            String img = saveImageToServer(cmReturnedPurchase.getImage2(), request);
+            String img = saveImageToServer(cmReturnedPurchase.getImage2());
             cmReturnedPurchase.setImage2(img);
         }
         if (null != cmReturnedPurchase.getImage3() && !"".equals(cmReturnedPurchase.getImage3())) {
-            String img = saveImageToServer(cmReturnedPurchase.getImage3(), request);
+            String img = saveImageToServer(cmReturnedPurchase.getImage3());
             cmReturnedPurchase.setImage3(img);
         }
         if (null != cmReturnedPurchase.getImage4() && !"".equals(cmReturnedPurchase.getImage4())) {
-            String img = saveImageToServer(cmReturnedPurchase.getImage4(), request);
+            String img = saveImageToServer(cmReturnedPurchase.getImage4());
             cmReturnedPurchase.setImage4(img);
         }
         if (null != cmReturnedPurchase.getImage5() && !"".equals(cmReturnedPurchase.getImage5())) {
-            String img = saveImageToServer(cmReturnedPurchase.getImage5(), request);
+            String img = saveImageToServer(cmReturnedPurchase.getImage5());
             cmReturnedPurchase.setImage5(img);
         }
         int num = 0;
@@ -447,23 +447,23 @@ public class CmReturnedPurchaseService extends CrudService<CmReturnedPurchaseDao
         cmReturnedPurchase.setConfirmReturnTime(confirmReturnTime);
 
         if (null != cmReturnedPurchase.getReviewImage1() && !"".equals(cmReturnedPurchase.getReviewImage1())) {
-            String img = saveImageToServer(cmReturnedPurchase.getReviewImage1(), request);
+            String img = saveImageToServer(cmReturnedPurchase.getReviewImage1());
             cmReturnedPurchase.setReviewImage1(img);
         }
         if (null != cmReturnedPurchase.getReviewImage2() && !"".equals(cmReturnedPurchase.getReviewImage2())) {
-            String img = saveImageToServer(cmReturnedPurchase.getReviewImage2(), request);
+            String img = saveImageToServer(cmReturnedPurchase.getReviewImage2());
             cmReturnedPurchase.setReviewImage2(img);
         }
         if (null != cmReturnedPurchase.getReviewImage3() && !"".equals(cmReturnedPurchase.getReviewImage3())) {
-            String img = saveImageToServer(cmReturnedPurchase.getReviewImage3(), request);
+            String img = saveImageToServer(cmReturnedPurchase.getReviewImage3());
             cmReturnedPurchase.setReviewImage3(img);
         }
         if (null != cmReturnedPurchase.getReviewImage4() && !"".equals(cmReturnedPurchase.getReviewImage4())) {
-            String img = saveImageToServer(cmReturnedPurchase.getReviewImage4(), request);
+            String img = saveImageToServer(cmReturnedPurchase.getReviewImage4());
             cmReturnedPurchase.setReviewImage4(img);
         }
         if (null != cmReturnedPurchase.getReviewImage5() && !"".equals(cmReturnedPurchase.getReviewImage5())) {
-            String img = saveImageToServer(cmReturnedPurchase.getReviewImage5(), request);
+            String img = saveImageToServer(cmReturnedPurchase.getReviewImage5());
             cmReturnedPurchase.setReviewImage5(img);
         }
 

+ 79 - 1
src/main/java/com/caimei/modules/order/service/NewOrderService.java

@@ -7,6 +7,7 @@ import com.caimei.exception.BusinessException;
 import com.caimei.modules.bulkpurchase.dao.OrderInvoiceDao;
 import com.caimei.modules.bulkpurchase.entity.OrderInvoice;
 import com.caimei.modules.bulkpurchase.service.OrderInvoiceService;
+import com.caimei.modules.miniprogram.utils.UploadPicUtils;
 import com.caimei.modules.order.dao.*;
 import com.caimei.modules.order.entity.*;
 import com.caimei.modules.order.utils.HttpClientUtils;
@@ -1194,7 +1195,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
      * @param remarks         备注
      */
     @Transactional(readOnly = false)
-    public void delivery
+    public String delivery
     (Map<Integer, List<NewOrderProduct>> deliveryData, List<NewOrderProduct> orderProducts, Map<Integer, Integer> orderProductMap, Map<String, List<String>> logisticsInfo, String
             remarks, String remarkImage) throws Exception {
         //更新这一次发货的子订单信息
@@ -1307,6 +1308,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
                 logisticsInformationDao.insert(l);
             }
         }
+        return lb.getId();
     }
 
     /**
@@ -1948,5 +1950,81 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
     public List<NewCmSp> findServiceProviderList() {
         return newOrderDao.findServiceProviderList();
     }
+
+    @Transactional(readOnly = false)
+    public void modifyRebate(Integer orderId) {
+        newOrderDao.updateByRebateFlag(orderId);
+    }
+
+    public List<LogisticsRecord> qualificationList(Integer logisticsBatchId) {
+        List<LogisticsRecord> logisticsRecords = logisticsRecordDao.findByLogisticsBatchID(logisticsBatchId);
+        String wwwServer = Global.getConfig("wwwServer");
+        logisticsRecords.forEach(item -> {
+            item.setImage(AppUtils.getImageURL("product", item.getImage(), 0, wwwServer));
+            List<CmFile> fileList = newOrderDao.findQualificationFile(item.getId());
+            if (fileList != null && fileList.size() > 0) {
+                item.setIsFile(true);
+            }
+        });
+        return logisticsRecords;
+    }
+
+    public LogisticsRecord qualificationForm(Integer recordId) {
+        LogisticsRecord logisticsRecord = logisticsRecordDao.findByRecordId(recordId);
+        List<CmFile> fileList = newOrderDao.findQualificationFile(String.valueOf(recordId));
+        logisticsRecord.setFileList(fileList);
+        List<String> images = newOrderDao.findQualificationImage(recordId);
+        logisticsRecord.setImageList(images);
+        return logisticsRecord;
+    }
+
+    @Transactional(readOnly = false)
+    public void saveQualification(LogisticsRecord logisticsRecord) {
+        logisticsRecordDao.updateLogisticsRecord(logisticsRecord);
+        //商品资质图片
+        String[] images = logisticsRecord.getImages();
+        newOrderDao.deleteQualificationImage(logisticsRecord.getRecordId());
+        if (images != null && images.length > 0) {
+            for (String image : images) {
+                if (StringUtils.isNotBlank(image)) {
+                    image = UploadPicUtils.saveImageToServer(image);
+                    newOrderDao.insertQualificationImage(logisticsRecord.getRecordId(), image);
+                }
+            }
+        }
+        //商品资质文件
+        String[] files = logisticsRecord.getFiles();
+        newOrderDao.deleteQualificationFile(logisticsRecord.getRecordId());
+        if (files != null && files.length > 0) {
+            for (String file : files) {
+                if (StringUtils.isNotBlank(file)) {
+                    String[] split = file.split("---");
+                    String fileName = split[0];
+                    String ossName = split[1];
+                    newOrderDao.insertQualificationFile(logisticsRecord.getRecordId(), fileName, ossName);
+                }
+            }
+        }
+    }
+
+    public List<LogisticsRecord> qualificationInfo(Integer logisticsBatchId) {
+        List<LogisticsRecord> logisticsRecords = logisticsRecordDao.findByLogisticsBatchID(logisticsBatchId);
+        String wwwServer = Global.getConfig("wwwServer");
+        Iterator<LogisticsRecord> iterator = logisticsRecords.iterator();
+        while (iterator.hasNext()) {
+            LogisticsRecord item = iterator.next();
+            item.setImage(AppUtils.getImageURL("product", item.getImage(), 0, wwwServer));
+            List<CmFile> fileList = newOrderDao.findQualificationFile(item.getId());
+            item.setFileList(fileList);
+            List<String> images = newOrderDao.findQualificationImage(item.getRecordId());
+            item.setImageList(images);
+            boolean isFile = (fileList == null || fileList.size() == 0);
+            boolean isImage = (images == null || images.size() == 0);
+            if (StringUtils.isBlank(item.getSn()) && isFile && isImage) {
+                iterator.remove();
+            }
+        }
+        return logisticsRecords;
+    }
 }
 

+ 52 - 5
src/main/java/com/caimei/modules/order/service/NewShopOrderService.java

@@ -12,6 +12,9 @@ import com.caimei.modules.product.dao.ProductDao;
 import com.caimei.modules.product.entity.CmPromotion;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.thinkgem.jeesite.modules.sys.entity.User;
+import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -281,12 +284,18 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
             Double receiptTotalFee = cmReceiptOrderRelationDao.findPayFeeByOrderID(so.getOrderID().toString());
             so.setReceiptTotalFee(receiptTotalFee);
 
-            Integer id = cmReceiptOrderRelationDao.findOnlinePayment(so.getOrderID());
-            if (id != null && id > 0) {
-                //发生线上支付,不能修改应付
-                so.setModifyPayable(true);
+            //第一次收款收款时间
+            Date receiptDate = cmReceiptOrderRelationDao.findOnlinePayment(so.getOrderID());
+            if (receiptDate != null) {
+                Calendar cal = Calendar.getInstance();
+                cal.setTime(receiptDate);
+                //第一次支付,23小时之类可以修改成本
+                cal.add(Calendar.HOUR, 23);
+                if (cal.getTime().compareTo(new Date()) < 0) {
+                    //发生线上支付,不能修改应付
+                    so.setModifyPayable(true);
+                }
             }
-
             List<NewOrderProduct> orderProductList = newOrderProductDao.findByShopOrderID(so.getShopOrderID());
             for (NewOrderProduct p : orderProductList) {
                 Integer returnNum = newOrderProductDao.CountReturnedPurchaseProduct(so.getShopOrderID(), p.getOrderProductID());
@@ -551,4 +560,42 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
     public void updatePayStatus(NewShopOrder item) {
         newShopOrderDao.updatePayStatus(item.getShopOrderID(), item.getPayStatus());
     }
+
+    public List<ChangePayShopOther> shopOtherRemark(Integer shopOrderId) {
+        List<ChangePayShopOther> shopOtherList = cmPayShopRecordDao.findShopOtherFee(shopOrderId);
+        if (shopOtherList != null && shopOtherList.size() > 0) {
+            shopOtherList.forEach(other -> {
+                User user = UserUtils.get(other.getModifyUserId().toString());
+                if (user != null) {
+                    other.setSystemName(user.getName());
+                }
+                if (StringUtils.isNotBlank(other.getRemarkImage())) {
+                    String[] remarkImages = other.getRemarkImage().split(",");
+                    other.setRemarkImages(remarkImages);
+                }
+            });
+        }
+        return shopOtherList;
+    }
+
+    public List<ChangePayShopDifference> differencePriceRemark(Integer shopOrderId) {
+        List<ChangePayShopDifference> differenceList = cmPayShopRecordDao.findShopDifference(shopOrderId);
+        if (differenceList != null && differenceList.size() > 0) {
+            differenceList.forEach(difference -> {
+                if (difference.getType() == 2 && difference.getRefundShopId() > 0) {
+                    CmRefundShop refundShop = cmRefundShopDao.findByRefundShopId(difference.getRefundShopId());
+                    difference.setRefundShop(refundShop);
+                }
+                User user = UserUtils.get(difference.getModifyUserId().toString());
+                if (user != null) {
+                    difference.setSystemName(user.getName());
+                }
+                if (StringUtils.isNotBlank(difference.getRemarkImage())) {
+                    String[] remarkImages = difference.getRemarkImage().split(",");
+                    difference.setRemarkImages(remarkImages);
+                }
+            });
+        }
+        return differenceList;
+    }
 }

+ 55 - 6
src/main/java/com/caimei/modules/order/web/CmPayShopController.java

@@ -9,7 +9,6 @@ import com.caimei.modules.user.entity.CmUserOrganize;
 import com.caimei.modules.user.service.CmUserOrganizeService;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.persistence.Page;
-import com.thinkgem.jeesite.common.utils.DateUtils;
 import com.thinkgem.jeesite.common.utils.Encodes;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.common.web.BaseController;
@@ -320,16 +319,16 @@ public class CmPayShopController extends BaseController {
             AtomicReference<Boolean> zeroCostFlag = new AtomicReference<>(true);
             AtomicReference<Boolean> freightFlag = new AtomicReference<>(false);
 
-            newOrder.getNewShopOrders().forEach(item->{
+            newOrder.getNewShopOrders().forEach(item -> {
                 if (item.getShopID().equals(998)) {
                     freightFlag.set(true);
-                }else if (!item.getShopOrderID().equals(shopOrder.getShopOrderID()) &&  0 == item.getZeroCostFlag()){
+                } else if (!item.getShopOrderID().equals(shopOrder.getShopOrderID()) && 0 == item.getZeroCostFlag()) {
                     zeroCostFlag.set(false);
                 }
             });
             //如果含有运费子订单且其他子订单都为0成本,将运费子订单置为已付款
-            if (freightFlag.get() && zeroCostFlag.get()){
-                newOrder.getNewShopOrders().forEach(item->{
+            if (freightFlag.get() && zeroCostFlag.get()) {
+                newOrder.getNewShopOrders().forEach(item -> {
                     if (item.getShopID().equals(998)) {
                         item.setPayStatus("3");
                         //更新运费子订单
@@ -342,7 +341,7 @@ public class CmPayShopController extends BaseController {
             if (zeroCostFlag.get()) {
                 newOrder.setPayStatus("3");
                 newOrder.setZeroCostFlag(1);
-            }else {
+            } else {
                 newOrder.setPayStatus("2");
                 newOrder.setZeroCostFlag(0);
             }
@@ -751,4 +750,54 @@ public class CmPayShopController extends BaseController {
         }
         return "redirect:" + Global.getAdminPath() + "/order/cmPayShop/?repage";
     }
+
+    /**
+     * 付第三方数据回显
+     */
+    @RequestMapping("shopOtherFeeForm")
+    public String shopOtherFeeForm(Integer shopOrderId, Model model) {
+        ChangePayShopOther payShopOther = cmPayShopService.shopOtherFeeForm(shopOrderId);
+        payShopOther.setShopOrderId(shopOrderId);
+        NewShopOrder shopOrder = newShopOrderService.findByShopOrderID(shopOrderId);
+        Double brokerage = shopOrder.getBrokerage();
+        brokerage = brokerage == null ? 0d : brokerage;
+        model.addAttribute("brokerage", brokerage);
+        model.addAttribute("payShopOther", payShopOther);
+        return "modules/order/shopOtherFeeForm";
+    }
+
+    /**
+     * 保存修改第三方金额
+     */
+    @RequestMapping("saveShopOtherFee")
+    public String saveShopOtherFee(ChangePayShopOther payShopOther, RedirectAttributes redirectAttributes) {
+        cmPayShopService.saveShopOtherFee(payShopOther);
+        addMessage(redirectAttributes, "保存成功");
+        return "redirect:" + Global.getAdminPath() + "/shopOrder/payOrderList?operatingMode=1";
+    }
+
+    /**
+     * 供应商差价数据回显
+     */
+    @RequestMapping("differencePriceForm")
+    public String differencePriceForm(Integer shopOrderId, Model model) {
+        ChangePayShopDifference payShopDifference = cmPayShopService.differencePriceForm(shopOrderId);
+        model.addAttribute("payShopDifference", payShopDifference);
+        return "modules/order/differencePriceForm";
+    }
+
+    /**
+     * 保存供应商差价
+     */
+    @RequestMapping("saveDifferencePrice")
+    public String saveDifferencePrice(ChangePayShopDifference payShopDifference, RedirectAttributes redirectAttributes) {
+        addMessage(redirectAttributes, "修改差价成功");
+        try {
+            cmPayShopService.saveDifferencePrice(payShopDifference);
+        } catch (Exception e) {
+            e.printStackTrace();
+            addMessage(redirectAttributes, e.getMessage());
+        }
+        return "redirect:" + Global.getAdminPath() + "/shopOrder/payOrderList?operatingMode=1";
+    }
 }

+ 42 - 21
src/main/java/com/caimei/modules/order/web/CmShopOrderController.java

@@ -7,7 +7,6 @@ import com.caimei.modules.order.service.NewShopOrderService;
 import com.caimei.modules.user.entity.CmUserOrganize;
 import com.caimei.modules.user.service.CmUserOrganizeService;
 import com.thinkgem.jeesite.common.persistence.Page;
-import com.thinkgem.jeesite.common.supcan.treelist.cols.Col;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.common.web.BaseController;
 import org.apache.commons.collections.CollectionUtils;
@@ -41,9 +40,9 @@ public class CmShopOrderController extends BaseController {
     @Autowired
     private CmUserOrganizeService cmUserOrganizeService;
     @Autowired
-	private CmChangePayShopRecondService cmChangePayShopRecondService;
-	@Autowired
-	private CmChangePayShopProductService cmChangePayShopProductService;
+    private CmChangePayShopRecondService cmChangePayShopRecondService;
+    @Autowired
+    private CmChangePayShopProductService cmChangePayShopProductService;
 
     @ModelAttribute
     public NewShopOrder get(@RequestParam(required = false) String id) {
@@ -95,17 +94,17 @@ public class CmShopOrderController extends BaseController {
 
 
     @RequestMapping("payShopRemark")
-    public String payShopRemark (CmChangePayShopRecond cmChangePayShopRecond, HttpServletRequest request, HttpServletResponse response, Model model){
+    public String payShopRemark(CmChangePayShopRecond cmChangePayShopRecond, HttpServletRequest request, HttpServletResponse response, Model model) {
         Integer shopOrderId = cmChangePayShopRecond.getShopOrderId();
         List<CmChangePayShopRecond> payShopRecondList = cmChangePayShopRecondService.getByShopOrderId(shopOrderId);
-        if(CollectionUtils.isNotEmpty(payShopRecondList)){
-            for(CmChangePayShopRecond shopOrder : payShopRecondList){
-                if(StringUtils.equals(shopOrder.getChangeType(),"1")){
+        if (CollectionUtils.isNotEmpty(payShopRecondList)) {
+            for (CmChangePayShopRecond shopOrder : payShopRecondList) {
+                if (StringUtils.equals(shopOrder.getChangeType(), "1")) {
                     List<CmChangePayShopProduct> shopProductList = cmChangePayShopProductService.getByPayShopId(Integer.parseInt(shopOrder.getId()));
                     shopOrder.setCmChangePayShopProductList(shopProductList);
                 }
                 String remarkImage = shopOrder.getRemarkImage();
-                if(StringUtils.isNotEmpty(remarkImage)){
+                if (StringUtils.isNotEmpty(remarkImage)) {
                     String[] split = remarkImage.split(",");
                     List<String> strings = Arrays.asList(split);
                     shopOrder.setCmImageList(strings);
@@ -118,35 +117,35 @@ public class CmShopOrderController extends BaseController {
     }
 
     @RequestMapping("toChangePayShopAmount")
-    public String toChangePayShopAmount(NewShopOrder newShopOrder, HttpServletRequest request, HttpServletResponse response, Model model){
+    public String toChangePayShopAmount(NewShopOrder newShopOrder, HttpServletRequest request, HttpServletResponse response, Model model) {
         // 该记录只存在一条
         String costType = newShopOrder.getCostType();
         String dbCostType = "";
         Page<NewShopOrder> page = newShopOrderService.findPayOrderList(new Page<>(request, response), newShopOrder);
         List<NewShopOrder> list = page.getList();
-        if(CollectionUtils.isNotEmpty(list) && list.size() == 1){
+        if (CollectionUtils.isNotEmpty(list) && list.size() == 1) {
             dbCostType = list.get(0).getCostType();
         }
         model.addAttribute("dbCostType", dbCostType);
-        if(StringUtils.isEmpty(dbCostType))dbCostType = costType;
+        if (StringUtils.isEmpty(dbCostType)) dbCostType = costType;
         model.addAttribute("page", page);
         model.addAttribute("shopOrderId", newShopOrder.getShopOrderID());
-        if(StringUtils.equals("1",dbCostType) || StringUtils.isEmpty(dbCostType) ){
+        if (StringUtils.equals("1", dbCostType) || StringUtils.isEmpty(dbCostType)) {
             return "modules/order/cmPayShopChange";
-        }else{
+        } else {
             return "modules/order/cmPayShopChange1";
         }
 
     }
 
-	@RequiresPermissions("order:cmPayShop:view")
-	@RequestMapping("toApplyPayWipe")
-	public String applyWipeEdit(NewShopOrder newShopOrder, HttpServletRequest request, HttpServletResponse response, Model model){
-		Page<NewShopOrder> page = newShopOrderService.findPayOrderList(new Page<>(request, response), newShopOrder);
-		model.addAttribute("page", page);
+    @RequiresPermissions("order:cmPayShop:view")
+    @RequestMapping("toApplyPayWipe")
+    public String applyWipeEdit(NewShopOrder newShopOrder, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<NewShopOrder> page = newShopOrderService.findPayOrderList(new Page<>(request, response), newShopOrder);
+        model.addAttribute("page", page);
         model.addAttribute("shopOrderId", newShopOrder.getShopOrderID());
-		return "modules/order/cmPayShopWipe";
-	}
+        return "modules/order/cmPayShopWipe";
+    }
 
     @RequiresPermissions("order:cmPayShop:view")
     @RequestMapping("payedAndRefundRecordList")
@@ -199,5 +198,27 @@ public class CmShopOrderController extends BaseController {
         model.addAttribute("order", order);
         return "modules/order/refundRecord";
     }
+
+    /**
+     * 付第三方备注
+     */
+    @RequestMapping("shopOtherRemark")
+    public String shopOtherRemark(Integer shopOrderId, Model model) {
+        List<ChangePayShopOther> shopOtherList = newShopOrderService.shopOtherRemark(shopOrderId);
+        model.addAttribute("shopOtherList", shopOtherList);
+        model.addAttribute("shopOrderId", shopOrderId);
+        return "modules/order/otherRemark";
+    }
+
+    /**
+     * 供应商差价备注
+     */
+    @RequestMapping("differencePriceRemark")
+    public String differencePriceRemark(Integer shopOrderId, Model model) {
+        List<ChangePayShopDifference> differenceList = newShopOrderService.differencePriceRemark(shopOrderId);
+        model.addAttribute("differenceList", differenceList);
+        model.addAttribute("shopOrderId", shopOrderId);
+        return "modules/order/differencePriceRemark";
+    }
 }
 

+ 71 - 5
src/main/java/com/caimei/modules/order/web/NewOrderController.java

@@ -10,10 +10,7 @@ import com.caimei.modules.bulkpurchase.service.CmFinanceChargeService;
 import com.caimei.modules.bulkpurchase.service.PurchaseProductService;
 import com.caimei.modules.common.utils.ExcelUtil;
 import com.caimei.modules.common.utils.UploadUtils;
-import com.caimei.modules.order.dao.CmDiscernReceiptDao;
-import com.caimei.modules.order.dao.CmReceiptOrderRelationDao;
-import com.caimei.modules.order.dao.CmReturnedPurchaseDao;
-import com.caimei.modules.order.dao.NewOrderProductDao;
+import com.caimei.modules.order.dao.*;
 import com.caimei.modules.order.entity.*;
 import com.caimei.modules.order.service.*;
 import com.caimei.modules.order.utils.OrderUtil;
@@ -134,6 +131,8 @@ public class NewOrderController extends BaseController {
     private CmPromotionDao cmPromotionDao;
     @Autowired
     private PurchaseProductService purchaseProductService;
+    @Autowired
+    private LogisticsRecordDao logisticsRecordDao;
 
     @ModelAttribute
     public NewOrder get(@RequestParam(required = false) String id) {
@@ -847,8 +846,10 @@ public class NewOrderController extends BaseController {
                 ops.add(o);
             }
         }
+        //物流批次id
+        String logisticsBatchId;
         try {
-            newOrderService.delivery(deliveryData, orderProducts, orderProductMap, logisticsInfo, remarks, remarkImage);
+            logisticsBatchId = newOrderService.delivery(deliveryData, orderProducts, orderProductMap, logisticsInfo, remarks, remarkImage);
         } catch (Exception e) {
             logger.info(e.toString(), e);
             result.put("success", false);
@@ -856,6 +857,7 @@ public class NewOrderController extends BaseController {
             return result;
         }
         result.put("success", true);
+        result.put("logisticsBatchId", logisticsBatchId);
         return result;
     }
 
@@ -1339,6 +1341,7 @@ public class NewOrderController extends BaseController {
     public String logisticsDetails(Integer orderID, String logisticsBatchID, Model model) {
         List<LogisticsInfoVo> logisticsInfoVos = new ArrayList<>();
         logisticsInfoVos = newShopOrderService.logisticsDetails(orderID, logisticsBatchID);
+        model.addAttribute("orderID", orderID);
         model.addAttribute("logisticsInfoVos", logisticsInfoVos);
         return "modules/order/logisticsDetails";
     }
@@ -2045,4 +2048,67 @@ public class NewOrderController extends BaseController {
         addMessage(redirectAttributes, "余额抵扣成功");
         return "redirect:" + Global.getAdminPath() + "/order/orderList";
     }
+
+    /**
+     * 转为返佣订单
+     */
+    @RequestMapping("modifyRebate")
+    public String modifyRebate(Integer orderId) {
+        newOrderService.modifyRebate(orderId);
+        return "redirect:" + Global.getAdminPath() + "/order/orderList";
+    }
+
+    /**
+     * 商品资质列表
+     */
+    @RequestMapping("qualificationList")
+    public String qualificationList(Integer logisticsBatchId, Model model) {
+        List<LogisticsRecord> logisticsRecords = newOrderService.qualificationList(logisticsBatchId);
+        model.addAttribute("logisticsRecords", logisticsRecords);
+        Integer orderId = 0;
+        if (logisticsRecords != null && logisticsRecords.size() > 0) {
+            orderId = logisticsRecords.get(0).getOrderID();
+        }
+        model.addAttribute("orderId", orderId);
+        return "modules/order/qualification";
+    }
+
+    /**
+     * 商品资质编辑页面
+     */
+    @RequestMapping("qualificationForm")
+    public String qualificationForm(Integer recordId, Model model) {
+        LogisticsRecord logisticsRecord = newOrderService.qualificationForm(recordId);
+        model.addAttribute("logisticsRecord", logisticsRecord);
+        model.addAttribute("recordId", recordId);
+        return "modules/order/qualificationForm";
+    }
+
+    /**
+     * 商品资质保存
+     */
+    @RequestMapping("saveQualification")
+    public String saveQualification(LogisticsRecord logisticsRecord, RedirectAttributes redirectAttributes) {
+        newOrderService.saveQualification(logisticsRecord);
+        addMessage(redirectAttributes, "上传商品资质成功");
+        return "redirect:" + Global.getAdminPath() + "/order/qualificationList?logisticsBatchId=" + logisticsRecord.getLogisticsBatchID();
+    }
+
+    /**
+     * 查看商品资质
+     */
+    @RequestMapping("qualificationInfo")
+    public String qualificationInfo(Integer logisticsBatchId, Integer orderId, Model model) {
+        List<LogisticsRecord> recordList = newOrderService.qualificationInfo(logisticsBatchId);
+        model.addAttribute("recordList", recordList);
+        if (recordList != null && recordList.size() > 0) {
+            model.addAttribute("shopName", recordList.get(0).getShopName());
+            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            String uploadTime = format.format(recordList.get(0).getUploadTime());
+            model.addAttribute("uploadTime", uploadTime);
+        }
+        model.addAttribute("logisticsBatchId", logisticsBatchId);
+        model.addAttribute("orderId", orderId);
+        return "modules/order/qualificationInfo";
+    }
 }

+ 39 - 0
src/main/java/com/caimei/modules/oss/service/CmOssArchiveService.java

@@ -223,4 +223,43 @@ public class CmOssArchiveService extends CrudService<CmOssArchiveDao, CmOssArchi
             }
         }
     }
+
+    public Map<String, Object> fileUpload(MultipartFile multipartFile) {
+        Map<String, Object> map = new HashMap<>();
+        String fileAllName = multipartFile.getOriginalFilename();
+        String fileType = fileAllName.substring(fileAllName.lastIndexOf(".") + 1);
+        String uuid = UUID.randomUUID().toString().replaceAll("-", "");
+        String filePath = uuid + "." + fileType;
+        String contentType = OSSUtils.getContentType(fileAllName);
+        try {
+            //保存本地
+            File file = OSSUtils.ossUpload(multipartFile);
+            logger.info("默认路径>>>" + file.getAbsolutePath());
+            //上传oss
+            String url = OSSUtils.ossUpload(filePath, file, contentType);
+            //删除本地文件
+            OSSUtils.deleteFile(file);
+            map.put("success", true);
+            map.put("msg", "操作成功");
+            map.put("url", url);
+            map.put("fileName", fileAllName);
+            map.put("ossName", filePath);
+        } catch (Exception e) {
+            e.printStackTrace();
+            map.put("success", false);
+            map.put("msg", "操作失败");
+            logger.info("上传异常!!!");
+        }
+        return map;
+    }
+
+    public void fileDownload(String ossName, String fileName, HttpServletRequest request, HttpServletResponse response) throws IOException {
+        OSSUtils.downFile(ossName, fileName);
+        download(request, response, fileName);
+    }
+
+    public void deleteOssFile(String ossName) {
+        //删除oss服务器上的文件
+        OSSUtils.deleteSingleFile(ossName);
+    }
 }

+ 33 - 2
src/main/java/com/caimei/modules/oss/utils/OSSUtils.java

@@ -18,10 +18,16 @@ public class OSSUtils {
     private static String accessKeyId = Global.getConfig("aliyun.accessKeyId");
     private static String accessKeySecret = Global.getConfig("aliyun.accessKeySecret");
     private static String privateBucket = Global.getConfig("aliyun.bucketName");
+    private static String config = Global.getConfig("cm.config");
 
     public static String ossUpload(String fileName, File file, String contentType) {
         String url = null;
         try {
+            if ("product".equals(config)) {
+                fileName = "prod/" + fileName;
+            } else {
+                fileName = config + "/" + fileName;
+            }
             OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
             ObjectMetadata meta = new ObjectMetadata();
             meta.setContentType(contentType);
@@ -133,6 +139,11 @@ public class OSSUtils {
         OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
         // 设置URL过期时间为1个小时
         Date expiration = new Date(new Date().getTime() + 3600L * 1000);
+        if ("product".equals(config)) {
+            fileName = "prod/" + fileName;
+        } else {
+            fileName = config + "/" + fileName;
+        }
         String url = ossClient.generatePresignedUrl(privateBucket, fileName, expiration).toString();
         // 关闭OSSClient。
         ossClient.shutdown();
@@ -149,7 +160,17 @@ public class OSSUtils {
         OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
         // 删除文件。如需删除文件夹,请将ObjectName设置为对应的文件夹名称。
         // 如果文件夹非空,则需要将文件夹下的所有object删除后才能删除该文件夹。
-        ossClient.deleteObject(privateBucket, fileName);
+        try {
+            //之前的文件没有放进文件夹
+            ossClient.deleteObject(privateBucket, fileName);
+        } catch (Exception e) {
+            if ("product".equals(config)) {
+                fileName = "prod/" + fileName;
+            } else {
+                fileName = config + "/" + fileName;
+            }
+            ossClient.deleteObject(privateBucket, fileName);
+        }
         // 关闭OSSClient。
         ossClient.shutdown();
     }
@@ -161,7 +182,17 @@ public class OSSUtils {
         // 创建OSSClient实例。
         OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
         // 下载OSS文件到本地文件。如果指定的本地文件存在会覆盖,不存在则新建。
-        ossClient.getObject(new GetObjectRequest(privateBucket, ossName), new File("./" + fileName));
+        try {
+            //之前的文件没有放进文件夹
+            ossClient.getObject(new GetObjectRequest(privateBucket, ossName), new File("./" + fileName));
+        } catch (Exception e) {
+            if ("product".equals(config)) {
+                ossName = "prod/" + ossName;
+            } else {
+                ossName = config + "/" + ossName;
+            }
+            ossClient.getObject(new GetObjectRequest(privateBucket, ossName), new File("./" + fileName));
+        }
         // 关闭OSSClient。
         ossClient.shutdown();
     }

+ 30 - 0
src/main/java/com/caimei/modules/oss/web/CmOssArchiveController.java

@@ -145,4 +145,34 @@ public class CmOssArchiveController extends BaseController {
             e.printStackTrace();
         }
     }
+
+    /**
+     * 文件上传
+     */
+    @ResponseBody
+    @RequestMapping(value = "fileUpload")
+    public Map<String, Object> fileUpload(@RequestParam("file") MultipartFile file) {
+        return cmOssArchiveService.fileUpload(file);
+    }
+
+
+    /**
+     * 下载文件
+     */
+    @RequestMapping("/fileDownload")
+    public void fileDownload(String ossName, String fileName, HttpServletRequest request, HttpServletResponse response) {
+        try {
+            cmOssArchiveService.fileDownload(ossName, fileName, request, response);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * oss文件删除
+     */
+    @RequestMapping(value = "deleteOssFile")
+    public void deleteOssFile(String ossName) {
+        cmOssArchiveService.deleteOssFile(ossName);
+    }
 }

+ 52 - 7
src/main/java/com/caimei/modules/product/entity/CmSecondHandDetail.java

@@ -44,6 +44,11 @@ public class CmSecondHandDetail extends DataEntity<CmSecondHandDetail> {
     private Integer viewingNum;// 商品浏览量
     private String productDetails;//商品详情
     private String publisher;//后台二手商品发布人员名称
+    private String authenticationImage;//身份验证照片
+    private String fileName;//出让承诺函文件名称
+    private String ossName;//对应oss存储名
+    private String commitmentImage;//出让承诺函图片
+    private String url; //文件预览url
 
     private String validFlag;//商品状态,见表c_productstatus或枚举ProductStatus,0逻辑删除 1待审核 2已上架 3已下架 8审核未通过 9已冻结
     private String productCategory;// 商品的类别:1正常商品(默认),2二手商品
@@ -418,15 +423,15 @@ public class CmSecondHandDetail extends DataEntity<CmSecondHandDetail> {
         this.bigTypeList = bigTypeList;
     }
 
-	public String getCostCheckFlag() {
-		return costCheckFlag;
-	}
+    public String getCostCheckFlag() {
+        return costCheckFlag;
+    }
 
-	public void setCostCheckFlag(String costCheckFlag) {
-		this.costCheckFlag = costCheckFlag;
-	}
+    public void setCostCheckFlag(String costCheckFlag) {
+        this.costCheckFlag = costCheckFlag;
+    }
 
-	public Double getCostPrice() {
+    public Double getCostPrice() {
         return costPrice;
     }
 
@@ -617,4 +622,44 @@ public class CmSecondHandDetail extends DataEntity<CmSecondHandDetail> {
     public void setPublisher(String publisher) {
         this.publisher = publisher;
     }
+
+    public String getAuthenticationImage() {
+        return authenticationImage;
+    }
+
+    public void setAuthenticationImage(String authenticationImage) {
+        this.authenticationImage = authenticationImage;
+    }
+
+    public String getFileName() {
+        return fileName;
+    }
+
+    public void setFileName(String fileName) {
+        this.fileName = fileName;
+    }
+
+    public String getOssName() {
+        return ossName;
+    }
+
+    public void setOssName(String ossName) {
+        this.ossName = ossName;
+    }
+
+    public String getCommitmentImage() {
+        return commitmentImage;
+    }
+
+    public void setCommitmentImage(String commitmentImage) {
+        this.commitmentImage = commitmentImage;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
 }

+ 10 - 1
src/main/java/com/caimei/modules/product/entity/Product.java

@@ -198,7 +198,8 @@ public class Product extends DataEntity<Product> {
     private String secondHandType;//二手商品分类,1二手仪器,2临期产品,3其他
     private String instrumentType;//二手仪器分类的类型,1轻光电、2重光电、3耗材配件(仅适用于二手仪器分类多个用英文逗号分分隔)
     private String editFlag;//编辑标记,1是编辑,其他都不是
-    private String source;  //信息来源 1网站 2小程序 3后台
+    private String source;  //信息来源 1网站 2小程序 3后台 4小程序-协销
+    private String dockingPeopleName; //对接人名称
 
 
     public String getProductIds() {
@@ -1836,4 +1837,12 @@ public class Product extends DataEntity<Product> {
     public void setProductIdStr(String productIdStr) {
         this.productIdStr = productIdStr;
     }
+
+    public String getDockingPeopleName() {
+        return dockingPeopleName;
+    }
+
+    public void setDockingPeopleName(String dockingPeopleName) {
+        this.dockingPeopleName = dockingPeopleName;
+    }
 }

+ 17 - 2
src/main/java/com/caimei/modules/product/web/CmSecondHandDetailController.java

@@ -6,6 +6,7 @@ import com.caimei.modules.brand.entity.CmBrand;
 import com.caimei.modules.brand.service.CmBrandService;
 import com.caimei.modules.common.utils.UploadUtils;
 import com.caimei.modules.opensearch.GenerateUtils;
+import com.caimei.modules.oss.utils.OSSUtils;
 import com.caimei.modules.product.dao.ProductNewDao;
 import com.caimei.modules.product.entity.BigType;
 import com.caimei.modules.product.entity.CmSecondHandDetail;
@@ -21,8 +22,6 @@ import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.utils.Encodes;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.common.web.BaseController;
-import com.thinkgem.jeesite.modules.sys.entity.User;
-import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -67,6 +66,7 @@ public class CmSecondHandDetailController extends BaseController {
     private RedisService redisService;
     @Resource
     private GenerateUtils generateUtils;
+
     @ModelAttribute
     public CmSecondHandDetail get(@RequestParam(required = false) String id) {
         CmSecondHandDetail entity = null;
@@ -183,6 +183,11 @@ public class CmSecondHandDetailController extends BaseController {
         }
         cmSecondHandDetail.setImageList(imaglist);
 
+        if (StringUtils.isNotBlank(cmSecondHandDetail.getOssName()) && StringUtils.isNotBlank(cmSecondHandDetail.getFileName())) {
+            String ossUrl = OSSUtils.getOssUrl(cmSecondHandDetail.getOssName());
+            cmSecondHandDetail.setUrl(ossUrl);
+        }
+
 
         model.addAttribute("cmSecondHandDetail", cmSecondHandDetail);
         return "modules/product/cmSecondHandDetailForm";
@@ -313,6 +318,16 @@ public class CmSecondHandDetailController extends BaseController {
         //发布人员名称
         /*User user = UserUtils.getUser();
         cmSecondHandDetail.setPublisher(user.getName());*/
+        String authenticationImage = cmSecondHandDetail.getAuthenticationImage();
+        if (StringUtils.isNotEmpty(authenticationImage)) {
+            String imageUrl = getImageUrl(authenticationImage);
+            cmSecondHandDetail.setAuthenticationImage(imageUrl);
+        }
+        String commitmentImage = cmSecondHandDetail.getCommitmentImage();
+        if (StringUtils.isNotEmpty(commitmentImage)) {
+            String imageUrl = getImageUrl(commitmentImage);
+            cmSecondHandDetail.setCommitmentImage(imageUrl);
+        }
 
         // 保存二手详细信息
         cmSecondHandDetailService.save(cmSecondHandDetail);

+ 10 - 10
src/main/java/com/caimei/modules/product/web/ProductNewController.java

@@ -5,7 +5,7 @@ import com.caimei.modules.brand.service.CmBrandService;
 import com.caimei.modules.common.entity.Province;
 import com.caimei.modules.common.service.AreaService;
 import com.caimei.modules.opensearch.GenerateUtils;
-import com.caimei.modules.opensearch.SearchUitls;
+import com.caimei.modules.opensearch.CoreServiceUitls;
 import com.caimei.modules.product.entity.*;
 import com.caimei.modules.product.service.*;
 import com.caimei.modules.user.entity.CmPageModules;
@@ -66,7 +66,7 @@ public class ProductNewController extends BaseController {
     @Resource
     private CmProductCombinationService cmProductCombinationService;
     @Autowired
-    private SearchUitls searchUitls;
+    private CoreServiceUitls coreServiceUitls;
     @Autowired
     private CmBrandService cmBrandService;
     @Resource
@@ -347,7 +347,7 @@ public class ProductNewController extends BaseController {
         // 有数据变动时需要清除缓存
         cleanRedisCache();
         // 更新索引
-        searchUitls.updateProductIndex(product.getProductID());
+        coreServiceUitls.updateProductIndex(product.getProductID());
         return "redirect:" + Global.getAdminPath() + "/product/new/list/";
     }
 
@@ -363,7 +363,7 @@ public class ProductNewController extends BaseController {
             map.put("success", true);
             map.put("msg", "操作成功");
             // 更新索引
-            searchUitls.updateProductIndex(productId);
+            coreServiceUitls.updateProductIndex(productId);
             cleanRedisCache();
         } catch (Exception e) {
             logger.debug(e.toString(), e);
@@ -468,7 +468,7 @@ public class ProductNewController extends BaseController {
         productNewService.fastSave(product);
         addMessage(redirectAttributes, "保存商品成功");
         // 更新索引
-        searchUitls.updateProductIndex(product.getProductID());
+        coreServiceUitls.updateProductIndex(product.getProductID());
 
         redirectAttributes.addAttribute("searchName", product.getSearchName());
         redirectAttributes.addAttribute("searchShopName", product.getSearchShopName());
@@ -606,7 +606,7 @@ public class ProductNewController extends BaseController {
             map.put("success", true);
             map.put("msg", "操作成功");
             // 更新索引
-            searchUitls.updateProductIndex(productID);
+            coreServiceUitls.updateProductIndex(productID);
             // 有数据变动时需要清除缓存
             cleanRedisCache();
         } catch (Exception e) {
@@ -629,7 +629,7 @@ public class ProductNewController extends BaseController {
             map.put("success", true);
             map.put("msg", "操作成功");
             // 更新索引
-            searchUitls.updateProductIndex(productID);
+            coreServiceUitls.updateProductIndex(productID);
             cleanRedisCache();
         } catch (Exception e) {
             logger.debug(e.toString(), e);
@@ -651,7 +651,7 @@ public class ProductNewController extends BaseController {
             map.put("success", true);
             map.put("msg", "操作成功");
             // 更新索引
-            searchUitls.updateProductIndex(productID);
+            coreServiceUitls.updateProductIndex(productID);
             cleanRedisCache();
         } catch (Exception e) {
             logger.debug(e.toString(), e);
@@ -686,10 +686,10 @@ public class ProductNewController extends BaseController {
             int valid = new Integer(validFlag);
             if (valid == 2 || valid == 3 || valid == 9) {
                 // 更新索引
-                searchUitls.updateProductIndex(productID);
+                coreServiceUitls.updateProductIndex(productID);
             } else {
                 // 删除索引
-                searchUitls.deleteProductIndex(productID);
+                coreServiceUitls.deleteProductIndex(productID);
             }
             cleanRedisCache();
         } catch (Exception e) {

+ 3 - 3
src/main/java/com/caimei/modules/product/web/ProductsClassifyController.java

@@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.caimei.dfs.image.beens.ImageUploadInfo;
 import com.caimei.modules.common.utils.UploadUtils;
-import com.caimei.modules.opensearch.SearchUitls;
+import com.caimei.modules.opensearch.CoreServiceUitls;
 import com.caimei.modules.product.entity.CmMallProductsClassify;
 import com.caimei.modules.product.entity.Product;
 import com.caimei.modules.product.service.ProductsClassifyService;
@@ -48,7 +48,7 @@ public class ProductsClassifyController extends BaseController {
     @Autowired
     private ProductsClassifyService productsClassifyService;
     @Autowired
-    private SearchUitls searchUitls;
+    private CoreServiceUitls coreServiceUitls;
 
     @ModelAttribute
     public CmMallProductsClassify get(@RequestParam(required = false) String id) {
@@ -140,7 +140,7 @@ public class ProductsClassifyController extends BaseController {
         List<Product> productList = productsClassifyService.productList(product);
         for (Product p : productList) {
             // 更新索引
-            searchUitls.updateProductIndex(p.getProductID());
+            coreServiceUitls.updateProductIndex(p.getProductID());
         }
         addMessage(redirectAttributes, "保存成功");
         return "redirect:" + Global.getAdminPath() + "/product/classify/list";

+ 4 - 4
src/main/java/com/caimei/modules/user/web/NewCmShopController.java

@@ -1,7 +1,7 @@
 package com.caimei.modules.user.web;
 
 import com.caimei.constants.ShopStatus;
-import com.caimei.modules.opensearch.SearchUitls;
+import com.caimei.modules.opensearch.CoreServiceUitls;
 import com.caimei.modules.sys.utils.CmMsgUtils;
 import com.caimei.modules.sys.utils.SMSUtils;
 import com.caimei.modules.user.dao.CmUserDao;
@@ -56,7 +56,7 @@ public class NewCmShopController extends BaseController {
     @Autowired
     CmMessageService cmMessageService;
     @Autowired
-    private SearchUitls searchUitls;
+    private CoreServiceUitls coreServiceUitls;
     @Autowired
     private CmOperationUserService cmOperationUserService;
     @Autowired
@@ -398,7 +398,7 @@ public class NewCmShopController extends BaseController {
         cmUserDao.updateUserInfo(newCmShop.getLinkMan(), newCmShop.getName(), newCmShop.getSname(), newCmShop.getContractMobile(), newCmShop.getEmail(), newCmShop.getUserID());
         addMessage(redirectAttributes, "保存供应商信息成功");
         // 更新索引
-        searchUitls.updateShopIndex(newCmShop.getShopID());
+        coreServiceUitls.updateShopIndex(newCmShop.getShopID());
         return "redirect:" + Global.getAdminPath() + "/user/newCmShop/";
     }
 
@@ -454,7 +454,7 @@ public class NewCmShopController extends BaseController {
         dbShop.setMainpro(cmShop.getMainpro());
         newCmShopService.update(dbShop);
         // 更新索引
-        searchUitls.updateShopIndex(dbShop.getShopID());
+        coreServiceUitls.updateShopIndex(dbShop.getShopID());
         return jsonModel.success(Global.getAdminPath() + "/user/newCmShop/?repage");
     }
 

+ 135 - 133
src/main/java/com/caimei/modules/zplm/service/CmBrandAuthService.java

@@ -29,151 +29,153 @@ import javax.annotation.Resource;
 
 /**
  * 品牌授权Service
+ *
  * @author Aslee
  * @version 2021-03-24
  */
 @Service
 @Transactional(readOnly = true)
 public class CmBrandAuthService extends CrudService<CmBrandAuthDao, CmBrandAuth> {
-	@Resource
-	CmBrandAuthDao cmBrandAuthDao;
+    @Resource
+    CmBrandAuthDao cmBrandAuthDao;
 
-	public CmBrandAuth get(String id) {
-		return super.get(id);
-	}
-	
-	public List<CmBrandAuth> findList(CmBrandAuth cmBrandAuth) {
-		return super.findList(cmBrandAuth);
-	}
-	
-	public Page<CmBrandAuth> findPage(Page<CmBrandAuth> page, CmBrandAuth cmBrandAuth) {
-		return super.findPage(page, cmBrandAuth);
-	}
-	
-	@Transactional(readOnly = false)
-	public void save(CmBrandAuth cmBrandAuth) {
-		//新增授权时,若授权有代理商且选择了文件代理声明,需要更新文件的授权Id
-		Boolean updateFileFlag = false;
-		if (StringUtils.isBlank(cmBrandAuth.getId())) {
-			updateFileFlag = true;
-		}
-		//保存图片
-		String logo = cmBrandAuth.getAuthLogo();
-		String statementImage = cmBrandAuth.getStatementImage();
-		if(StringUtils.isNotBlank(logo) && !logo.startsWith("http")){
-			cmBrandAuth.setAuthLogo(UploadPicUtils.saveImageToServer(logo, null));
-		}
-		if(StringUtils.isNotBlank(statementImage) && !statementImage.startsWith("http")){
-			cmBrandAuth.setStatementImage(UploadPicUtils.saveImageToServer(statementImage, null));
-		}
-		if (cmBrandAuth.getIsNewRecord()) {
-			cmBrandAuth.setCreateBy(UserUtils.getUser());
-			cmBrandAuth.setCreateTime(new Date());
-		}
-		//更新品牌授权logo
+    public CmBrandAuth get(String id) {
+        return super.get(id);
+    }
+
+    public List<CmBrandAuth> findList(CmBrandAuth cmBrandAuth) {
+        return super.findList(cmBrandAuth);
+    }
+
+    public Page<CmBrandAuth> findPage(Page<CmBrandAuth> page, CmBrandAuth cmBrandAuth) {
+        return super.findPage(page, cmBrandAuth);
+    }
+
+    @Transactional(readOnly = false)
+    public void save(CmBrandAuth cmBrandAuth) {
+        //新增授权时,若授权有代理商且选择了文件代理声明,需要更新文件的授权Id
+        Boolean updateFileFlag = false;
+        if (StringUtils.isBlank(cmBrandAuth.getId())) {
+            updateFileFlag = true;
+        }
+        //保存图片
+        String logo = cmBrandAuth.getAuthLogo();
+        String statementImage = cmBrandAuth.getStatementImage();
+        if (StringUtils.isNotBlank(logo) && !logo.startsWith("http")) {
+            cmBrandAuth.setAuthLogo(UploadPicUtils.saveImageToServer(logo));
+        }
+        if (StringUtils.isNotBlank(statementImage) && !statementImage.startsWith("http")) {
+            cmBrandAuth.setStatementImage(UploadPicUtils.saveImageToServer(statementImage));
+        }
+        if (cmBrandAuth.getIsNewRecord()) {
+            cmBrandAuth.setCreateBy(UserUtils.getUser());
+            cmBrandAuth.setCreateTime(new Date());
+        }
+        //更新品牌授权logo
         cmBrandAuthDao.updateBrandAuthLogo(cmBrandAuth.getBrandId(), cmBrandAuth.getAuthLogo());
-		//保存品牌授权
-		super.save(cmBrandAuth);
-		//有代理商且选择了文件代理声明的情况下
-		if (cmBrandAuth.getAgentFlag() == 1 && cmBrandAuth.getStatementType() == 4) {
-			//新增授权时,更新代理声明文件
-			if (updateFileFlag) {
-				Integer statementFileId = cmBrandAuth.getStatementFileId();
-				if (statementFileId != null) {
-					CmBrandAuthFile cmBrandAuthFile = new CmBrandAuthFile();
-					cmBrandAuthFile.setId(statementFileId);
-					cmBrandAuthFile.setBrandAuthId(Integer.parseInt(cmBrandAuth.getId()));
-					cmBrandAuthDao.updateStatementFile(cmBrandAuthFile);
-				}
-			}
-			//修改授权情况下,不需要更新
-		} else {
-			// 没有选择文件代理声明的情况下,若存在原来的文件,删除代理声明文件
-			deleteFileByAuthId(cmBrandAuth.getId());
-		}
-	}
-	
-	@Transactional(readOnly = false)
-	public void delete(CmBrandAuth cmBrandAuth) {
-		//删除授权商品参数
-		cmBrandAuthDao.deleteParamsByAuthId(cmBrandAuth.getId());
-		//删除授权商品
-		cmBrandAuthDao.deleteProductsByAuthId(cmBrandAuth.getId());
-		//删除代理声明文件
-		if (cmBrandAuth.getAgentFlag() == 1 && cmBrandAuth.getStatementType() == 4) {
-			deleteFileByAuthId(cmBrandAuth.getId());
-		}
-		super.delete(cmBrandAuth);
-	}
+        //保存品牌授权
+        super.save(cmBrandAuth);
+        //有代理商且选择了文件代理声明的情况下
+        if (cmBrandAuth.getAgentFlag() == 1 && cmBrandAuth.getStatementType() == 4) {
+            //新增授权时,更新代理声明文件
+            if (updateFileFlag) {
+                Integer statementFileId = cmBrandAuth.getStatementFileId();
+                if (statementFileId != null) {
+                    CmBrandAuthFile cmBrandAuthFile = new CmBrandAuthFile();
+                    cmBrandAuthFile.setId(statementFileId);
+                    cmBrandAuthFile.setBrandAuthId(Integer.parseInt(cmBrandAuth.getId()));
+                    cmBrandAuthDao.updateStatementFile(cmBrandAuthFile);
+                }
+            }
+            //修改授权情况下,不需要更新
+        } else {
+            // 没有选择文件代理声明的情况下,若存在原来的文件,删除代理声明文件
+            deleteFileByAuthId(cmBrandAuth.getId());
+        }
+    }
 
-	/**
-	 * 代理声明文件上传
-	 * @param fileName
-	 * @return
-	 */
+    @Transactional(readOnly = false)
+    public void delete(CmBrandAuth cmBrandAuth) {
+        //删除授权商品参数
+        cmBrandAuthDao.deleteParamsByAuthId(cmBrandAuth.getId());
+        //删除授权商品
+        cmBrandAuthDao.deleteProductsByAuthId(cmBrandAuth.getId());
+        //删除代理声明文件
+        if (cmBrandAuth.getAgentFlag() == 1 && cmBrandAuth.getStatementType() == 4) {
+            deleteFileByAuthId(cmBrandAuth.getId());
+        }
+        super.delete(cmBrandAuth);
+    }
 
-	@Transactional(readOnly = false)
+    /**
+     * 代理声明文件上传
+     *
+     * @param fileName
+     * @return
+     */
+
+    @Transactional(readOnly = false)
     public Map<String, Object> uploadFile(String brandAuthId, MultipartFile multipartFile, String fileName) {
-		Map<String, Object> map = new HashMap<>();
-		String fileAllName = multipartFile.getOriginalFilename();
-		String fileType = fileAllName.substring(fileAllName.lastIndexOf(".") + 1);
-		String uuid = UUID.randomUUID().toString().replaceAll("-", "");
-		String filePath = uuid + "." + fileType;
-		String contentType = OSSUtils.getContentType(fileAllName);
-		try {
-			//保存本地
-			File file = OSSUtils.ossUpload(multipartFile);
-			//判断文件的唯一性,转换成16进制md5值
-			String md5Hex = DigestUtils.md5Hex(new FileInputStream(file));
-			CmBrandAuthFile searchFile = new CmBrandAuthFile();
-			searchFile.setBrandAuthId(StringUtils.isBlank(brandAuthId) ? null : Integer.parseInt(brandAuthId));
-			searchFile.setMd5Hex(md5Hex);
-			// 查找该授权下是否已存在相同文件
-			CmBrandAuthFile cmBrandAuthFile = cmBrandAuthDao.findStatementFile(searchFile);
-			String url = "";
-			if (cmBrandAuthFile == null) {
-				logger.info("默认路径>>>" + file.getAbsolutePath());
-				// 修改情况下,如果原来已经选择了文件代理声明,并且旧文件与新文件不同,需要将旧文件删除
-				deleteFileByAuthId(brandAuthId);
-				//将新文件上传oss
-				url = OSSUtils.ossUpload(filePath, file, contentType);
-				//删除本地文件
-				OSSUtils.deleteFile(file);
-				//保存关联关系
-				cmBrandAuthFile = new CmBrandAuthFile();
-				cmBrandAuthFile.setBrandAuthId(searchFile.getBrandAuthId());
-				cmBrandAuthFile.setName(fileName);
-				cmBrandAuthFile.setOssName(filePath);
-				cmBrandAuthFile.setMd5Hex(md5Hex);
-				cmBrandAuthFile.setUploadTime(new Date());
-				cmBrandAuthDao.insertStatementFile(cmBrandAuthFile);
-			} else {
-				//删除本地文件
-				OSSUtils.deleteFile(file);
-			}
+        Map<String, Object> map = new HashMap<>();
+        String fileAllName = multipartFile.getOriginalFilename();
+        String fileType = fileAllName.substring(fileAllName.lastIndexOf(".") + 1);
+        String uuid = UUID.randomUUID().toString().replaceAll("-", "");
+        String filePath = uuid + "." + fileType;
+        String contentType = OSSUtils.getContentType(fileAllName);
+        try {
+            //保存本地
+            File file = OSSUtils.ossUpload(multipartFile);
+            //判断文件的唯一性,转换成16进制md5值
+            String md5Hex = DigestUtils.md5Hex(new FileInputStream(file));
+            CmBrandAuthFile searchFile = new CmBrandAuthFile();
+            searchFile.setBrandAuthId(StringUtils.isBlank(brandAuthId) ? null : Integer.parseInt(brandAuthId));
+            searchFile.setMd5Hex(md5Hex);
+            // 查找该授权下是否已存在相同文件
+            CmBrandAuthFile cmBrandAuthFile = cmBrandAuthDao.findStatementFile(searchFile);
+            String url = "";
+            if (cmBrandAuthFile == null) {
+                logger.info("默认路径>>>" + file.getAbsolutePath());
+                // 修改情况下,如果原来已经选择了文件代理声明,并且旧文件与新文件不同,需要将旧文件删除
+                deleteFileByAuthId(brandAuthId);
+                //将新文件上传oss
+                url = OSSUtils.ossUpload(filePath, file, contentType);
+                //删除本地文件
+                OSSUtils.deleteFile(file);
+                //保存关联关系
+                cmBrandAuthFile = new CmBrandAuthFile();
+                cmBrandAuthFile.setBrandAuthId(searchFile.getBrandAuthId());
+                cmBrandAuthFile.setName(fileName);
+                cmBrandAuthFile.setOssName(filePath);
+                cmBrandAuthFile.setMd5Hex(md5Hex);
+                cmBrandAuthFile.setUploadTime(new Date());
+                cmBrandAuthDao.insertStatementFile(cmBrandAuthFile);
+            } else {
+                //删除本地文件
+                OSSUtils.deleteFile(file);
+            }
 
-			map.put("success", true);
-			map.put("msg", "操作成功");
-			map.put("url", url);
-			map.put("statementFile", cmBrandAuthFile);
-		} catch (Exception e) {
-			e.printStackTrace();
-			map.put("success", false);
-			map.put("msg", "操作失败");
-			logger.info("上传异常!!!");
-		}
-		return map;
+            map.put("success", true);
+            map.put("msg", "操作成功");
+            map.put("url", url);
+            map.put("statementFile", cmBrandAuthFile);
+        } catch (Exception e) {
+            e.printStackTrace();
+            map.put("success", false);
+            map.put("msg", "操作失败");
+            logger.info("上传异常!!!");
+        }
+        return map;
     }
 
-	private void deleteFileByAuthId(String brandAuthId) {
-		CmBrandAuthFile oldFile = cmBrandAuthDao.findStatementFileByAuthId(brandAuthId);
-		if (oldFile != null) {
-			Integer num = cmBrandAuthDao.findStatementFileByMd5Hex(oldFile.getMd5Hex());
-			if (num == 1) {
-				//删除oss服务器上的文件
-				OSSUtils.deleteSingleFile(oldFile.getOssName());
-			}
-			cmBrandAuthDao.deleteStatementFile(oldFile.getId());
-		}
-	}
+    private void deleteFileByAuthId(String brandAuthId) {
+        CmBrandAuthFile oldFile = cmBrandAuthDao.findStatementFileByAuthId(brandAuthId);
+        if (oldFile != null) {
+            Integer num = cmBrandAuthDao.findStatementFileByMd5Hex(oldFile.getMd5Hex());
+            if (num == 1) {
+                //删除oss服务器上的文件
+                OSSUtils.deleteSingleFile(oldFile.getOssName());
+            }
+            cmBrandAuthDao.deleteStatementFile(oldFile.getId());
+        }
+    }
 }

+ 3 - 3
src/main/resources/config/beta/caimei.properties

@@ -12,9 +12,9 @@
 #mysql database setting
 jdbc.type=mysql
 jdbc.driver=com.mysql.cj.jdbc.Driver
-jdbc.url=jdbc:mysql://10.104.59.165:3306/caimei?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
+jdbc.url=jdbc:mysql://172.31.165.28:3306/caimei?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
 jdbc.username=developer
-jdbc.password=05bZ/OxTB:X+yd%1
+jdbc.password=J5p3tgOVazNl4ydf
 
 #mssql database settings
 #jdbc.type=mssql
@@ -126,7 +126,7 @@ activiti.diagram.labelFontName=\u5B8B\u4F53
 activiti.form.server.url=
 
 #测试服务器本地存储地址
-userfiles.basedir=/mnt/newdatadrive/data/custom/tempimage
+userfiles.basedir=/mnt/newdatadrive/nfs_client/
 
 #\u5DE5\u7A0B\u8DEF\u5F84\uFF0C\u5728\u4EE3\u7801\u751F\u6210\u65F6\u83B7\u53D6\u4E0D\u5230\u5DE5\u7A0B\u8DEF\u5F84\u65F6\uFF0C\u53EF\u518D\u6B64\u6307\u5B9A\u7EDD\u5BF9\u8DEF\u5F84\u3002
 #projectPath=D\:\\workspace\\jeesite

+ 2 - 2
src/main/resources/config/beta/dfs_client.conf

@@ -7,12 +7,12 @@ connect_timeout=30
 network_timeout=60
 
 # the base path to store log files
-base_path=/home/yuqing/fastdfs
+base_path=/mnt/newdatadrive/fdfs
 
 # tracker_server can ocur more than once, and tracker_server format is
 #  "host:port", host can be hostname or ip address
 #tracker_server=10.205.44.47:22122
-tracker_server=10.104.50.235:22122
+tracker_server=172.31.165.28:22122
 
 #standard log level as syslog, case insensitive, value list:
 ### emerg for emergency

+ 2 - 2
src/main/resources/config/beta/log4j.properties

@@ -1,4 +1,4 @@
-# Output pattern : date [thread] priority category - message   FATAL 0  ERROR 3  WARN 4  INFO 6  DEBUG 7 
+# Output pattern : date [thread] priority category - message   FATAL 0  ERROR 3  WARN 4  INFO 6  DEBUG 7
 log4j.rootLogger=WARN, Console, DailyRolling
 
 #Console
@@ -9,7 +9,7 @@ log4j.appender.Console.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %l
 
 #DailyRolling
 log4j.appender.DailyRolling=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.DailyRolling.File=/custom/logs/manager/manager.log
+log4j.appender.DailyRolling.File=${catalina.base}/logs/caimei-manager.log
 log4j.appender.DailyRolling.DatePattern='.'yyyy-MM-dd
 log4j.appender.DailyRolling.layout=org.apache.log4j.PatternLayout
 log4j.appender.DailyRolling.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%-5p] %l >> %m%n

+ 1 - 1
src/main/resources/mappings/modules/order/CmDiscernReceiptMapper.xml

@@ -194,7 +194,7 @@
     <select id="exportRebate" resultType="com.caimei.modules.order.entity.CmMainReceiptExport">
         SELECT
         so.orderID,
-        u.userName,
+        IF(u.userIdentity = 2,u.name,u.userName) AS userName,
         d.receiptDate,
         d.payType,
         IFNULL(d.receiptAmount,0) as associateAmount,

+ 68 - 0
src/main/resources/mappings/modules/order/CmPayShopRecordMapper.xml

@@ -221,4 +221,72 @@
 	<update id="applyCompileSave" parameterType="com.caimei.modules.order.entity.CmPayShop">
 		UPDATE cm_pay_shop SET payType = #{payType},payTime = #{payTime} WHERE id = #{id}
 	</update>
+
+	<select id="findShopOtherFee" resultType="com.caimei.modules.order.entity.ChangePayShopOther">
+		SELECT
+		  `id`,
+		  `shopOrderId`,
+		  `shopOtherFee`,
+		  modifyUserId,
+		  `bankAccountName`,
+		  `bankAccount`,
+		  `bankName`,
+		  `type`,
+		  `remark`,
+		  `remarkImage`,
+		  `updateTime`
+		FROM
+		  `cm_change_pay_shop_other`
+		WHERE
+		  shopOrderId = #{shopOrderId}
+		ORDER BY
+		  updateTime DESC
+	</select>
+
+	<insert id="insertShopOtherFee">
+		INSERT INTO `cm_change_pay_shop_other` (
+		  `shopOrderId`, `shopOtherFee`, `bankAccountName`,
+		  `bankAccount`, `bankName`, `type`, modifyUserId,
+		  `remark`, `remarkImage`, `updateTime`
+		)
+		VALUES
+		  (
+			#{shopOrderId}, #{shopOtherFee}, #{bankAccountName},
+			#{bankAccount}, #{bankName}, #{type}, #{modifyUserId},
+			#{remark}, #{remarkImage}, NOW()
+		  )
+	</insert>
+
+	<insert id="insertDifference">
+		INSERT INTO `cm_change_pay_shop_difference` (
+		  `shopOrderId`, `modifyUserId`, `refundShopId`,
+		  `differencePrice`, `type`, `remark`,
+		  `remarkImage`, `updateTime`
+		)
+		VALUES
+		  (
+			#{shopOrderId}, #{modifyUserId}, #{refundShopId},
+			#{differencePrice}, #{type}, #{remark},
+			#{remarkImage}, NOW()
+		  )
+	</insert>
+
+	<select id="findShopDifference" resultType="com.caimei.modules.order.entity.ChangePayShopDifference">
+		SELECT
+		  `id`,
+		  `shopOrderId`,
+		  `modifyUserId`,
+		  `refundShopId`,
+		  `differencePrice`,
+		  `type`,
+		  `remark`,
+		  `remarkImage`,
+		  `updateTime`
+		FROM
+		  `cm_change_pay_shop_difference`
+		WHERE
+		  shopOrderId = #{shopOrderId}
+		ORDER BY
+		  updateTime
+	</select>
 </mapper>

+ 4 - 2
src/main/resources/mappings/modules/order/CmReceiptOrderRelationMapper.xml

@@ -186,9 +186,9 @@
 		GROUP BY orderID
 	</select>
 
-	<select id="findOnlinePayment" resultType="integer">
+	<select id="findOnlinePayment" resultType="date">
 		SELECT
-		  cror.id
+		  cdr.receiptDate
 		FROM
 		  cm_receipt_order_relation cror
 		  LEFT JOIN cm_discern_receipt cdr ON cror.receiptID = cdr.id
@@ -197,6 +197,8 @@
 		  AND cror.delFlag = 0
 		  AND cdr.payWay = 1
 		  AND cror.orderID = #{orderID}
+		ORDER BY
+		  cdr.receiptDate
 		LIMIT
 		  1
 	</select>

+ 14 - 1
src/main/resources/mappings/modules/order/CmRefundShopMapper.xml

@@ -30,11 +30,13 @@
 	</select>
 	
 	<select id="findList" resultType="CmRefundShop">
-		SELECT 
+		SELECT DISTINCT
 			<include refid="cmRefundShopColumns"/>,
+			crsr.refundType AS recordRefundType,
 			u.name AS operatorName,
 			s.name AS shopName
 		FROM cm_refund_shop a
+		LEFT JOIN cm_refund_shop_record crsr ON crsr.refundShopID = a.id
 		left join shop s on s.shopID = a.shopID
 		left join sys_user u on u.id = a.operator
 		<where>
@@ -163,4 +165,15 @@
 		WHERE id = #{id}
 	</delete>
 
+	<update id="updateByDelFlag">
+		UPDATE cm_refund_shop SET delFlag = 1 WHERE id = #{refundShopId}
+	</update>
+
+	<select id="findByRefundShopId" resultType="com.caimei.modules.order.entity.CmRefundShop">
+		SELECT
+		<include refid="cmRefundShopColumns"/>
+		FROM cm_refund_shop a
+		<include refid="cmRefundShopJoins"/>
+		WHERE a.id = #{refundShopId}
+	</select>
 </mapper>

+ 10 - 0
src/main/resources/mappings/modules/order/CmRefundShopRecordMapper.xml

@@ -66,6 +66,7 @@
 			shopOrderID,
 			shopOrderNo,
 			refundAmount,
+			refundType,
 			refundTime,
 			refundShopID,
 			delFlag
@@ -75,6 +76,7 @@
 			#{shopOrderID},
 			#{shopOrderNo},
 			#{refundAmount},
+			#{refundType},
 			#{refundTime},
 			#{refundShopID},
 			#{delFlag}
@@ -138,4 +140,12 @@
 		WHERE a.shopOrderID = #{shopOrderID} and a.delFlag = '0' and a.status = '1'
 		GROUP BY shopOrderID
 	</select>
+
+	<select id="findByRefundType" resultType="integer">
+		SELECT refundShopID FROM cm_refund_shop_record WHERE shopOrderID = #{shopOrderId} AND refundType = 5
+	</select>
+
+	<update id="updateByDelFlag">
+		UPDATE cm_refund_shop_record SET delFlag = 1 WHERE refundShopID = #{refundShopId}
+	</update>
 </mapper>

+ 21 - 1
src/main/resources/mappings/modules/order/LogisticsRecordMapper.xml

@@ -42,18 +42,38 @@
 	<select id="findByLogisticsBatchID" resultType="LogisticsRecord">
 		select
 			a.id AS id,
+			a.id AS recordId,
 			a.logisticsBatchID AS logisticsBatchID,
 			a.shopOrderID AS shopOrderID,
 			a.orderID AS orderID,
 			a.orderProductID AS orderProductID,
 			a.num AS num,
+			a.sn AS sn,
+			a.uploadTime AS uploadTime,
 			p.productID AS productID,
 			p.name AS productName,
 			p.productImage AS image,
 			p.num AS buyNum,
-			p.presentNum AS presentNum
+			p.presentNum AS presentNum,
+			s.name AS shopName
 		from cm_logistics_record a
 		left join cm_order_product p on a.orderProductID = p.orderProductID
+		LEFT JOIN shop s ON s.shopID = p.shopID
 		where a.logisticsBatchID = #{logisticsBatchID}
 	</select>
+
+	<select id="findByRecordId" resultType="com.caimei.modules.order.entity.LogisticsRecord">
+		SELECT
+		  id,
+		  sn,
+		  logisticsBatchID
+		FROM
+		  cm_logistics_record
+		WHERE
+		  id = #{recordId}
+	</select>
+	
+	<update id="updateLogisticsRecord">
+		UPDATE cm_logistics_record SET sn = #{sn}, uploadTime = NOW() WHERE id = #{recordId}
+	</update>
 </mapper>

+ 43 - 0
src/main/resources/mappings/modules/order/OrderMapper.xml

@@ -794,4 +794,47 @@
 	<delete id="deleterPomotionsOrder">
 		DELETE FROM cm_promotions_order WHERE orderId = #{orderId}
 	</delete>
+
+	<update id="updateByRebateFlag">
+		UPDATE cm_order SET rebateFlag = 1 WHERE orderID = #{orderId}
+	</update>
+
+	<select id="findQualificationFile" resultType="com.caimei.modules.order.entity.CmFile">
+		SELECT
+		  fileName,
+		  ossName
+		FROM
+		  cm_qualification_file
+		WHERE
+		  recordId = #{recordId}
+	</select>
+
+	<select id="findQualificationImage" resultType="string">
+		SELECT image FROM cm_qualification_image WHERE recordId = #{recordId}  ORDER BY id
+	</select>
+
+	<delete id="deleteQualificationImage">
+        DELETE FROM cm_qualification_image WHERE recordId = #{recordId}
+    </delete>
+
+	<insert id="insertQualificationImage">
+        INSERT INTO `cm_qualification_image` (
+            `recordId`, `image`)
+        VALUES
+          (#{recordId}, #{image});
+    </insert>
+
+	<delete id="deleteQualificationFile">
+        DELETE FROM cm_qualification_file WHERE recordId = #{recordId}
+    </delete>
+
+	<insert id="insertQualificationFile">
+        INSERT INTO `cm_qualification_file` (
+          `recordId`, `fileName`, `ossName`
+        )
+        VALUES
+          (
+            #{recordId}, #{fileName}, #{ossName}
+          )
+    </insert>
 </mapper>

+ 16 - 14
src/main/resources/mappings/modules/order/ShopOrderMapper.xml

@@ -67,6 +67,8 @@
     		a.costType AS costType,
     		a.modifyShouldPayNote AS modifyShouldPayNote,
     		a.orderPromotionsId AS orderPromotionsId,
+    		a.differenceType AS differenceType,
+    		a.differencePrice AS differencePrice,
     		proportional AS proportional,
     		a.promotionFullReduction As promotionFullReduction,
     		a.zeroCostFlag AS zeroCostFlag
@@ -801,20 +803,12 @@
                 AND a.shopOrderNo like concat('%', #{shopOrderNo} ,'%')
             </if>
             and (co.confirmFlag = '1' or co.confirmFlag = '2')
-            <!--<if test="operatingMode == 1">
-                and co.status != 7
-            </if>-->
-            <choose>
-                <when test="operatingMode != null and operatingMode == '1'.toString()">
-                    and a.payStatus != 3
-                </when>
-                <when test="operatingMode != null and operatingMode == '2'.toString()">
-                    and a.payStatus != 1
-                </when>
-            </choose>
-            <if test="operatingMode != null and operatingMode == '1'.toString()">
-                and co.status != 7
-            </if>
+			<if test="operatingMode != null and operatingMode == '1'.toString()">
+				and a.payStatus != 3 and co.status NOT IN (6,7)
+			</if>
+			<if test="operatingMode != null and operatingMode == '2'.toString()">
+				and a.payStatus != 1 and co.status != 6
+			</if>
 			and co.delFlag = 0
 			and a.delFlag = 0
 			and a.shopOrderID not in (
@@ -967,4 +961,12 @@
 		from cm_shop_order a
 		where  a.orderID = #{orderID} and a.shopID = 998
 	</select>
+
+	<update id="updateByShopOtherFee">
+		 UPDATE cm_shop_order SET shopOtherFee = #{shopOtherFee} WHERE shopOrderID = #{shopOrderId}
+	</update>
+
+	<update id="updateByDifferencePrice">
+		UPDATE cm_shop_order SET differenceType = #{type}, differencePrice = #{differencePrice} WHERE shopOrderID = #{shopOrderId}
+	</update>
 </mapper>

+ 19 - 3
src/main/resources/mappings/modules/product/CmSecondHandDetailMapper.xml

@@ -36,6 +36,10 @@
 		a.source AS "source",
 		a.showContactFlag AS "showContactFlag",
 		a.publisher AS "publisher",
+		a.authenticationImage AS "authenticationImage",
+		a.fileName AS "fileName",
+		a.ossName AS "ossName",
+		a.commitmentImage AS "commitmentImage",
 		p.validFlag AS "validFlag",
 		p.productCategory AS "productCategory",
 		p.name AS "name",
@@ -130,7 +134,11 @@
 			onLineDate,
 			source,
 			showContactFlag,
-			publisher
+			publisher,
+			authenticationImage,
+			fileName,
+			ossName,
+			commitmentImage
 		) VALUES (
 			#{productID},
 			#{sold},
@@ -163,7 +171,11 @@
 			#{onLineDate},
 			#{source},
 			#{showContactFlag},
-			#{publisher}
+			#{publisher},
+			#{authenticationImage},
+			#{fileName},
+			#{ossName},
+			#{commitmentImage}
 		)
 	</insert>
 
@@ -200,7 +212,11 @@
 			onLineDate = #{onLineDate},
 			source = #{source},
 			showContactFlag = #{showContactFlag},
-			publisher = #{publisher}
+			publisher = #{publisher},
+			authenticationImage = #{authenticationImage},
+			fileName = #{fileName},
+			ossName = #{ossName},
+			commitmentImage = #{commitmentImage}
 		WHERE productID = #{productID}
 	</update>
 

+ 1 - 0
src/main/resources/mappings/modules/product/ProductNewMapper.xml

@@ -155,6 +155,7 @@
 		cshd.brandName AS "otherBrandName",
 		cshd.publisher AS "publisher",
 		cshd.source AS "source",
+		cshd.dockingPeopleName AS "dockingPeopleName",
         cb.name as "brandName"
     </sql>
 

+ 28 - 32
src/main/webapp/WEB-INF/views/modules/logistics/logisticsForm.jsp

@@ -16,39 +16,35 @@
 </head>
 <body>
 <input type="hidden" id="ctx" value="${ctx}">
-	<ul class="nav nav-tabs">
-		<li class="active"><a href="${ctx}/logistics/logisticsForm?orderId=${logisticsInfo.orderId}&shopId=${logisticsInfo.shopId}">物流信息填写</a></li>
-	</ul><br/>
-	<form:form id="inputForm" modelAttribute="logisticsInfo" action="${ctx}/logistics/save" method="post" class="form-horizontal">
-		<form:hidden path="orderId"/>
-		<form:hidden path="shopId"/>
-		<input type="hidden" id="logisticsCompanyName" name="logisticsCompanyName" value="">
-		<sys:message content="${message}"/>
-		<div class="control-group">
-			<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>快递公司:</label>
-			<div class="controls">
-				<form:select path="logisticsCompanyCode" class="input-xlarge required" onclick="changgLogisticsCompany($(this));">
-					<form:option value="">请选择一个快递公司</form:option>
-					<form:options items="${fns:getDictList('kd_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-				</form:select>
-			</div>
+<ul class="nav nav-tabs">
+	<li class="active"><a href="${ctx}/logistics/logisticsForm?orderId=${logisticsInfo.orderId}&shopId=${logisticsInfo.shopId}">物流信息填写</a></li>
+</ul><br/>
+<form:form id="inputForm" modelAttribute="logisticsInfo" action="${ctx}/logistics/save" method="post" class="form-horizontal">
+	<form:hidden path="orderId"/>
+	<form:hidden path="shopId"/>
+	<input type="hidden" id="logisticsCompanyName" name="logisticsCompanyName" value="">
+	<sys:message content="${message}"/>
+	<div class="control-group">
+		<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>快递公司:</label>
+		<div class="controls">
+			<form:select path="logisticsCompanyCode" class="input-xlarge required" onclick="changgLogisticsCompany($(this));">
+				<form:option value="">请选择一个快递公司</form:option>
+				<form:options items="${fns:getDictList('kd_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+			</form:select>
 		</div>
-		<div class="control-group">
-			<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>物流单号:</label>
-			<div class="controls">
-				<form:input path="nu" htmlEscape="false" maxlength="30" class="input-xlarge required"/>
-			</div>
+	</div>
+	<div class="control-group">
+		<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>物流单号:</label>
+		<div class="controls">
+			<form:input path="nu" htmlEscape="false" maxlength="30" class="input-xlarge required"/>
 		</div>
-		<div class="control-group">
-			<label class="control-label">备注:</label>
-			<div class="controls">
-				<form:textarea path="remarks" maxlength="255" class="input-xlarge"/>
-			</div>
+	</div>
+	<div class="control-group">
+		<label class="control-label">备注:</label>
+		<div class="controls">
+			<form:textarea path="remarks" maxlength="255" class="input-xlarge"/>
 		</div>
-		 <%--<div class="form-actions">--%>
-			<%--<input id="btnSubmit" class="btn btn-primary" type="button" value="保 存" onclick="submit()"/>&nbsp;--%>
-			<%--<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>--%>
-		<%--</div>--%>
-	</form:form>
+	</div>
+</form:form>
 </body>
-</html>
+</html>

+ 9 - 1
src/main/webapp/WEB-INF/views/modules/order/checkPaymentOrder.jsp

@@ -309,7 +309,15 @@
                                 <fmt:formatNumber value="${so.refundAmount}" type="number" pattern="#,##0.00"/>
                             </c:if>
                         </td>
-                        <td colspan="2"><fmt:formatNumber value="${so.shouldPayShopAmount}" type="number" pattern="#,##0.00"/></td>
+                        <td colspan="2">
+                            <fmt:formatNumber value="${so.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
+                            <c:if test="${so.differenceType eq 1}">
+                                <font color="red">(需补差价¥${so.differencePrice})</font>
+                            </c:if>
+                            <c:if test="${so.differenceType eq 2}">
+                                <font color="red">(需退差价¥${so.differencePrice})</font>
+                            </c:if>
+                        </td>
                         <td colspan="3"><fmt:formatNumber value="${so.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
                         <td class="product-freight"><fmt:formatNumber value="${so.shopPostFee}" type="number" pattern="#,##0.00"/></td>
                         <td><fmt:formatNumber value="${so.shopOtherFee}" type="number" pattern="#,##0.00"/></td>

+ 118 - 116
src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptForm.jsp

@@ -210,137 +210,139 @@
     <h5>关联订单</h5>
     <div class="receipt-order-form">
         <c:forEach items="${vo.orderInfos}" var="orderInfo">
-            <c:if test="${vo.receiptType == 3}">
-                <div class="receipt-suborder-title">
-                    <span class="font-blue"><label>子订单编号:</label><a
-                            href="${ctx}/order/detail?id=${orderInfo.orderID}">${orderInfo.shopOrderNo}(${orderInfo.shopOrderID})</a></span>
+            <div class="receipt-order-form">
+                <c:if test="${vo.receiptType == 3}">
+                    <div class="receipt-suborder-title">
+                        <span class="font-blue"><label>子订单编号:</label><a
+                                href="${ctx}/order/detail?id=${orderInfo.orderID}">${orderInfo.shopOrderNo}(${orderInfo.shopOrderID})</a></span>
+                        <span><label>订单金额:</label>¥<fmt:formatNumber
+                                value="${orderInfo.shopOrderAmount}"
+                                pattern="#0.00"/></span>
+                        <span><label>供应商:</label>${orderInfo.shopName}</span>
+                    </div>
+                </c:if>
+                <div class="receipt-order-row2">
+                    <span class="font-blue"><label>订单编号:</label><a
+                            href="${ctx}/order/detail?id=${orderInfo.orderID}">${orderInfo.orderNo}(${orderInfo.orderID})</a></span>
                     <span><label>订单金额:</label>¥<fmt:formatNumber
-                            value="${orderInfo.shopOrderAmount}"
+                            value="${orderInfo.orderAmount}"
                             pattern="#0.00"/></span>
-                    <span><label>供应商:</label>${orderInfo.shopName}</span>
-                </div>
-            </c:if>
-            <div class="receipt-order-row2">
-                <span class="font-blue"><label>订单编号:</label><a
-                        href="${ctx}/order/detail?id=${orderInfo.orderID}">${orderInfo.orderNo}(${orderInfo.orderID})</a></span>
-                <span><label>订单金额:</label>¥<fmt:formatNumber
-                        value="${orderInfo.orderAmount}"
-                        pattern="#0.00"/></span>
-                <span>
-                    <label>已收金额:</label>¥<fmt:formatNumber
-                        value="${empty orderInfo.receiptAmount ? 0 : orderInfo.receiptAmount}"
-                        pattern="#0.00"/>
                     <span>
-								<c:forEach items="${orderInfo.receiptRecordVo}" var="receiptRecord" varStatus="index">
-                                    <c:if test="${receiptRecord.confirmType eq 1 || receiptRecord.confirmType eq  2 || receiptRecord.confirmType eq 3}">
-                                        <label>抹平明细:</label>
-                                        <c:if test="${receiptRecord.confirmType eq 1}">
-                                            <c:if test="${vo.receiptOrderFlag}">
-                                                <font color="red">(一款多单:少收抹平金额未知)</font>
+                        <label>已收金额:</label>¥<fmt:formatNumber
+                            value="${empty orderInfo.receiptAmount ? 0 : orderInfo.receiptAmount}"
+                            pattern="#0.00"/>
+                        <span>
+                                    <c:forEach items="${orderInfo.receiptRecordVo}" var="receiptRecord" varStatus="index">
+                                        <c:if test="${receiptRecord.confirmType eq 1 || receiptRecord.confirmType eq  2 || receiptRecord.confirmType eq 3}">
+                                            <label>抹平明细:</label>
+                                            <c:if test="${receiptRecord.confirmType eq 1}">
+                                                <c:if test="${vo.receiptOrderFlag}">
+                                                    <font color="red">(一款多单:少收抹平金额未知)</font>
+                                                </c:if>
+                                                <c:if test="${!vo.receiptOrderFlag}">
+                                                    <font color="red">(少收抹平:
+                                                    ¥<fmt:formatNumber value="${orderInfo.payableAmount - (empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount)}" pattern="#0.00"/>元)
+                                                    </font>
+                                                </c:if>
                                             </c:if>
-                                            <c:if test="${!vo.receiptOrderFlag}">
-                                                <font color="red">(少收抹平:
-                                                ¥<fmt:formatNumber value="${orderInfo.payableAmount - (empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount)}" pattern="#0.00"/>元)
-                                                </font>
+                                            <c:if test="${receiptRecord.confirmType eq 2}">
+                                                <c:if test="${vo.receiptOrderFlag}">
+                                                    <font color="red">(一款多单:多收抹平金额未知)</font>
+                                                </c:if>
+                                                <c:if test="${!vo.receiptOrderFlag}">
+                                                    <font color="red">(多收抹平:
+                                                    ¥<fmt:formatNumber value="${(empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount) - orderInfo.payableAmount}" pattern="#0.00"/>元)
+                                                    </font>
+                                                </c:if>
+                                            </c:if>
+                                            <c:if test="${receiptRecord.confirmType eq 3}">
+                                                <c:if test="${vo.receiptOrderFlag}">
+                                                    <font color="red">(一款多单:多收退余额)</font>
+                                                </c:if>
+                                                <c:if test="${!vo.receiptOrderFlag}">
+                                                    <font color="red">(多收退余额${receiptRecord.associationType eq 2 ? "(自动)" : ""}:
+                                                    ¥<fmt:formatNumber value="${(empty receiptRecord.returnBalanceAmount ? 0 : receiptRecord.returnBalanceAmount)}" pattern="#0.00"/>元)
+                                                    </font>
+                                                </c:if>
                                             </c:if>
                                         </c:if>
-                                        <c:if test="${receiptRecord.confirmType eq 2}">
-                                            <c:if test="${vo.receiptOrderFlag}">
-                                                <font color="red">(一款多单:多收抹平金额未知)</font>
+                                    </c:forEach>
+                                </span>
+                            </span>
+                    <span><label>机构名称:</label>
+                                    <c:if test="${orderInfo.organizeID == 1}">
+                                        <span class="org-note">星范</span>
+                                    </c:if>
+                                        ${orderInfo.customerName}
+                        <c:if test="${orderInfo.organizeID == 3}">
+                            <em class="weishaIcon">维沙</em>
+                        </c:if>
+                                </span>
+                    <span><label>订单状态:</label>
+                                    <c:if test="${orderInfo.receiptStatus == 1}">待收款</c:if>
+                                    <c:if test="${orderInfo.receiptStatus == 2}">部分收款</c:if>
+                                    <c:if test="${orderInfo.receiptStatus == 3}">已收款</c:if>
+                                </span>
+                            </div>
+                            <div class="receipt-order-row3">
+                                <span><label>订单类型:</label><c:if test="${orderInfo.orderType == 0}">协销订单</c:if>
+                                        <c:if test="${orderInfo.orderType == 1}">自主订单</c:if></span>
+                    <span><label>下单日期:</label>${orderInfo.orderTime}</span>
+                </div>
+                <div class="receipt-order-row4">
+                    <div><h5><label>订单收款记录:</label></h5></div>
+                    <c:forEach items="${orderInfo.receiptRecordVo}" var="receiptRecord" varStatus="index">
+                        <div class="row4-wrapper">
+                            <span class="row4-order-no">${index.index + 1}、</span>
+                            <span class="row4-time">${receiptRecord.receiptTime}</span>
+                            <c:if test="${receiptRecord.payWay == 1}">
+                                <%--线上收款--%>
+                                <span>线上&nbsp;${fns:getPayTypeStr(receiptRecord.payType)}</span>
+                                <span>${receiptRecord.receiptAmount}</span>
+                                <span><label>交易号:</label>${receiptRecord.mbOrderId}</span>
+                            </c:if>
+                            <c:if test="${receiptRecord.payWay == 2}">
+                                <span>线下&nbsp;${fns:getPayTypeStr(receiptRecord.payType)}</span>
+                                <span>${receiptRecord.receiptAmount}</span>
+                                <c:if test="${not empty receiptRecord.confirmUserPermissionID}">
+                                    <span>${receiptRecord.confirmUserName}确认(${receiptRecord.confirmDate})</span>
+                                </c:if>
+                                <c:if test="${not empty receiptRecord.reviewUserPermissionID}">
+                                    <span>${receiptRecord.reviewUserName}审核通过(${receiptRecord.reviewDate})</span>
+                                </c:if>
+                            </c:if>
+                            <c:if test="${receiptRecord.payWay == 3}">
+                                <%--余额抵扣--%>
+                                <span><a href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}" style="text-decoration: underline">${fns:getPayTypeStr(receiptRecord.payType)}</a></span>
+                                <span><a href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}" style="text-decoration: underline">${receiptRecord.receiptAmount}</a></span>
+                            </c:if>
+                            <span>
+    <%--                        一款多单的时候直接显示再订单上即可,无需收款记录显示--%>
+                                <c:if test="${!vo.receiptOrderFlag}">
+                                        <c:if test="${receiptRecord.confirmType eq 1 || receiptRecord.confirmType eq  2 || receiptRecord.confirmType eq 3}">
+                                            <label>抹平明细:</label>
+                                            <c:if test="${receiptRecord.confirmType eq 1}">
+                                                <font color="red">(少收抹平:
+                                                    ¥<fmt:formatNumber value="${orderInfo.payableAmount - (empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount)}" pattern="#0.00"/>元)
+                                                </font>
                                             </c:if>
-                                            <c:if test="${!vo.receiptOrderFlag}">
+                                            <c:if test="${receiptRecord.confirmType eq 2}">
                                                 <font color="red">(多收抹平:
-                                                ¥<fmt:formatNumber value="${(empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount) - orderInfo.payableAmount}" pattern="#0.00"/>元)
+                                                    ¥<fmt:formatNumber value="${(empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount) - orderInfo.payableAmount}" pattern="#0.00"/>元)
                                                 </font>
                                             </c:if>
-                                        </c:if>
-                                        <c:if test="${receiptRecord.confirmType eq 3}">
-                                            <c:if test="${vo.receiptOrderFlag}">
-                                                <font color="red">(一款多单:多收退余额)</font>
-                                            </c:if>
-                                            <c:if test="${!vo.receiptOrderFlag}">
+                                            <c:if test="${receiptRecord.confirmType eq 3}">
                                                 <font color="red">(多收退余额${receiptRecord.associationType eq 2 ? "(自动)" : ""}:
-                                                ¥<fmt:formatNumber value="${(empty receiptRecord.returnBalanceAmount ? 0 : receiptRecord.returnBalanceAmount)}" pattern="#0.00"/>元)
+                                                    ¥<fmt:formatNumber value="${(empty receiptRecord.returnBalanceAmount ? 0 : receiptRecord.returnBalanceAmount)}" pattern="#0.00"/>元)
                                                 </font>
                                             </c:if>
                                         </c:if>
-                                    </c:if>
-                                </c:forEach>
-							</span>
-                        </span>
-                <span><label>机构名称:</label>
-								<c:if test="${orderInfo.organizeID == 1}">
-                                    <span class="org-note">星范</span>
                                 </c:if>
-									${orderInfo.customerName}
-                    <c:if test="${orderInfo.organizeID == 3}">
-                        <em class="weishaIcon">维沙</em>
-                    </c:if>
-							</span>
-                <span><label>订单状态:</label>
-								<c:if test="${orderInfo.receiptStatus == 1}">待收款</c:if>
-								<c:if test="${orderInfo.receiptStatus == 2}">部分收款</c:if>
-								<c:if test="${orderInfo.receiptStatus == 3}">已收款</c:if>
-							</span>
-						</div>
-						<div class="receipt-order-row3">
-							<span><label>订单类型:</label><c:if test="${orderInfo.orderType == 0}">协销订单</c:if>
-									<c:if test="${orderInfo.orderType == 1}">自主订单</c:if></span>
-                <span><label>下单日期:</label>${orderInfo.orderTime}</span>
-            </div>
-            <div class="receipt-order-row4">
-                <div><h5><label>订单收款记录:</label></h5></div>
-                <c:forEach items="${orderInfo.receiptRecordVo}" var="receiptRecord" varStatus="index">
-                    <div class="row4-wrapper">
-                        <span class="row4-order-no">${index.index + 1}、</span>
-                        <span class="row4-time">${receiptRecord.receiptTime}</span>
-                        <c:if test="${receiptRecord.payWay == 1}">
-                            <%--线上收款--%>
-                            <span>线上&nbsp;${fns:getPayTypeStr(receiptRecord.payType)}</span>
-                            <span>${receiptRecord.receiptAmount}</span>
-                            <span><label>交易号:</label>${receiptRecord.mbOrderId}</span>
-                        </c:if>
-                        <c:if test="${receiptRecord.payWay == 2}">
-                            <span>线下&nbsp;${fns:getPayTypeStr(receiptRecord.payType)}</span>
-                            <span>${receiptRecord.receiptAmount}</span>
-                            <c:if test="${not empty receiptRecord.confirmUserPermissionID}">
-                                <span>${receiptRecord.confirmUserName}确认(${receiptRecord.confirmDate})</span>
-                            </c:if>
-                            <c:if test="${not empty receiptRecord.reviewUserPermissionID}">
-                                <span>${receiptRecord.reviewUserName}审核通过(${receiptRecord.reviewDate})</span>
-                            </c:if>
-                        </c:if>
-                        <c:if test="${receiptRecord.payWay == 3}">
-                            <%--余额抵扣--%>
-                            <span><a href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}" style="text-decoration: underline">${fns:getPayTypeStr(receiptRecord.payType)}</a></span>
-                            <span><a href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}" style="text-decoration: underline">${receiptRecord.receiptAmount}</a></span>
-                        </c:if>
-                        <span>
-<%--                        一款多单的时候直接显示再订单上即可,无需收款记录显示--%>
-                            <c:if test="${!vo.receiptOrderFlag}">
-                                    <c:if test="${receiptRecord.confirmType eq 1 || receiptRecord.confirmType eq  2 || receiptRecord.confirmType eq 3}">
-                                        <label>抹平明细:</label>
-                                        <c:if test="${receiptRecord.confirmType eq 1}">
-                                            <font color="red">(少收抹平:
-                                                ¥<fmt:formatNumber value="${orderInfo.payableAmount - (empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount)}" pattern="#0.00"/>元)
-                                            </font>
-                                        </c:if>
-                                        <c:if test="${receiptRecord.confirmType eq 2}">
-                                            <font color="red">(多收抹平:
-                                                ¥<fmt:formatNumber value="${(empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount) - orderInfo.payableAmount}" pattern="#0.00"/>元)
-                                            </font>
-                                        </c:if>
-                                        <c:if test="${receiptRecord.confirmType eq 3}">
-                                            <font color="red">(多收退余额${receiptRecord.associationType eq 2 ? "(自动)" : ""}:
-                                                ¥<fmt:formatNumber value="${(empty receiptRecord.returnBalanceAmount ? 0 : receiptRecord.returnBalanceAmount)}" pattern="#0.00"/>元)
-                                            </font>
-                                        </c:if>
-                                    </c:if>
-                            </c:if>
-                            </span>
-                    </div>
-                </c:forEach>
-            </div>
+                                </span>
+                        </div>
+                    </c:forEach>
+                </div>
+            </div><br>
         </c:forEach>
         </c:if>
     </div>

+ 5 - 17
src/main/webapp/WEB-INF/views/modules/order/cmPayShopChange.jsp

@@ -30,15 +30,6 @@
             margin-left: 0;
         }
 
-        #increase, #decrease, .lineNum {
-            width: 30px;
-            height: 30px;
-        }
-
-        .lineNum {
-            text-align: center;
-        }
-
         .dateInput input {
             width: 150px;
         }
@@ -115,9 +106,6 @@
         .hide-pic {
             display: none !important;
         }
-        .upload-tips {
-            margin: 10px 0;
-        }
 	</style>
 	<script type="text/javascript">
         $(document).ready(function() {
@@ -177,7 +165,7 @@
 <ul class="nav nav-tabs">
 		<li><a href="${ctx}/order/cmPayShop">付款列表</a></li>
 		<li><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
-		<li class="active"><a href="${ctx}/shopOrder/toChangePayShopAmount?costType=1&shopOrderID=${shopOrderId}">修改应付</a></li>
+		<li class="active"><a href="${ctx}/shopOrder/toChangePayShopAmount?costType=1&shopOrderID=${shopOrderId}">修改成本</a></li>
 </ul>
 <input type="hidden" id="confirmProductNames">
 <form:form id="inputForm" modelAttribute="newShopOrder" action="${ctx}/order/cmPayShop/saveChangePayShopAmount?id=${shopOrderId}&costType=1" method="post"
@@ -251,17 +239,17 @@
 					<td>
 						<b>供应商运费:</b><input type="number" id="shopPostFee" name="shopPostFee"  onchange="changeShouldPay(this)"  value="${newShopOrder.shopPostFee}" style="margin-left: 20px"/>
 					</td>
-					<td>
+					<%--<td>
 						<b>付第三方:</b><input type="number" id="shopOtherFee" name="shopOtherFee"  onchange="inputnum(this)"  value="${newShopOrder.shopOtherFee}" style="margin-left: 5px;"/>
-					</td>
+					</td>--%>
 				</tr>
 				<tr>
 					<td style="padding-top: 10px;">
 						<b>付供应商:</b><font color="red"><span id="div-supplier-fee">${newShopOrder.shouldPayShopAmount}</span></font>
 					</td>
-					<td style="padding-top: 10px;">
+					<%--<td style="padding-top: 10px;">
 						<b>已付供应商:</b><font color="red"><span id="div-payedShopAmount">${newShopOrder.payedShopAmount}</span></font>
-					</td>
+					</td>--%>
 				</tr>
 			</table>
 			<div style="margin-top: 10px">

+ 4 - 4
src/main/webapp/WEB-INF/views/modules/order/cmPayShopChange1.jsp

@@ -206,14 +206,14 @@
                             <input type="number" id="shopPostFee" name="shopPostFee"  onchange="changeShouldPay(this)"  value="${newShopOrder.shopPostFee}" style="margin-left: 20px"/>
                         </td>
                     </tr>
-                    <tr>
+                    <%--<tr>
                         <td>
                            <b>付第三方:</b>
                         </td>
                         <td>
                             <input type="number" id="shopOtherFee" name="shopOtherFee"  onchange="inputnum(this)"  value="${newShopOrder.shopOtherFee}" style="margin-left: 20px;"/>
                         </td>
-                    </tr>
+                    </tr>--%>
 
                 </table>
 			</div>
@@ -223,9 +223,9 @@
 					<td style="padding-top: 10px;">
 						<b>付供应商:</b><font color="red"><span id="div-supplier-fee">${newShopOrder.shouldPayShopAmount}</span></font>
 					</td>
-					<td style="padding-top: 10px;padding-left: 87px">
+					<%--<td style="padding-top: 10px;padding-left: 87px">
 						<b>已付供应商:</b><font color="red"><span id="div-payedShopAmount">${newShopOrder.payedShopAmount}</span></font>
-					</td>
+					</td>--%>
 				</tr>
 			</table>
 			<div style="margin-top: 10px">

+ 9 - 4
src/main/webapp/WEB-INF/views/modules/order/cmPayShopChangeRecond.jsp

@@ -102,6 +102,11 @@
 
 <form:form id="inputForm" modelAttribute="newShopOrder" action="${ctx}/shopOrder/payShopRemark?shopOrderId=${shopOrderId}" method="post"
            class="form-horizontal">
+        <ul class="nav nav-tabs" id="myTab">
+                <li class="active"><a href="${ctx}/shopOrder/payShopRemark?shopOrderId=${shopOrderId}">修改成本备注</a></li>
+                <li><a href="${ctx}/shopOrder/shopOtherRemark?shopOrderId=${shopOrderId}">修改付第三方备注</a></li>
+                <li><a href="${ctx}/shopOrder/differencePriceRemark?shopOrderId=${shopOrderId}">修改供应商差价备注</a></li>
+        </ul>
         <c:if test="${not empty payShopRecondList}">
             <c:forEach items="${payShopRecondList}" var="payShopRecond">
                 <c:if test="${payShopRecond.recondType eq 2}">
@@ -134,7 +139,7 @@
                                 <tr>
                                 <lable>供应商运费:<fmt:formatNumber type="number" pattern="0.00" value="${payShopRecond.shopPostFee}"/></lable>
                                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                <lable>付第三方:<fmt:formatNumber type="number" pattern="0.00" value="${empty payShopRecond.shopOtherFee  ? 0 : payShopRecond.shopOtherFee}"/></lable>
+                                <%--<lable>付第三方:<fmt:formatNumber type="number" pattern="0.00" value="${empty payShopRecond.shopOtherFee  ? 0 : payShopRecond.shopOtherFee}"/></lable>--%>
                                 </tr>
                             </table>
                             <br>
@@ -150,9 +155,9 @@
                                 <tr>
                                     <td>供应商运费:<fmt:formatNumber type="number" pattern="0.00" value="${payShopRecond.shopPostFee}"/></td>
                                 </tr>
-                                <tr>
+                                <%--<tr>
                                     <td>付第三方:<fmt:formatNumber type="number" pattern="0.00" value="${empty payShopRecond.shopOtherFee  ? 0 : payShopRecond.shopOtherFee}"/></td>
-                                </tr>
+                                </tr>--%>
                             </table>
                             <br>
                         </c:if>
@@ -207,7 +212,7 @@
                         <tr>
                         <lable>供应商运费:<fmt:formatNumber type="number" pattern="0.00" value="${payShopRecond.shopPostFee}"/></lable>
                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                        <lable>付第三方:<fmt:formatNumber type="number" pattern="0.00" value="${empty payShopRecond.shopOtherFee  ? 0 : payShopRecond.shopOtherFee}"/></lable>
+                        <%--<lable>付第三方:<fmt:formatNumber type="number" pattern="0.00" value="${empty payShopRecond.shopOtherFee  ? 0 : payShopRecond.shopOtherFee}"/></lable>--%>
                         </tr>
                     </table>
                 </c:if>

+ 7 - 1
src/main/webapp/WEB-INF/views/modules/order/cmPayShopCheck.jsp

@@ -169,7 +169,13 @@
 						<td colspan="2" class="payCm-t"></td>
 						<td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
 						<td colspan="2" class="supplier-fee">
-							<div>应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>,
+							<div>应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
+								<c:if test="${s.differenceType eq 1}">
+									<font color="red">(需补差价¥${s.differencePrice})</font>
+								</c:if>
+								<c:if test="${s.differenceType eq 2}">
+									<font color="red">(需退差价¥${s.differencePrice})</font>
+								</c:if>,
 								 已付:<fmt:formatNumber value="${s.payedShopAmount}" type="number" pattern="#,##0.00"/>
 							</div>
 							<div>

+ 12 - 3
src/main/webapp/WEB-INF/views/modules/order/cmPayShopDetail.jsp

@@ -20,8 +20,8 @@
 		.pay-table th{background:#f9f9f9}
 		.pay-table tr:first-child th{background:#eee !important}
 		.pay-table td{background:#fff !important}
-		/*.supplier-fee{text-align:left !important;padding-top:20px !important;padding-left:20px !important}*/
-		.need-to-pay{width:50px}
+		.check-btn{width:96%;margin-left:2%;text-align:center;height:60px;line-height:60px;margin-top:30px}
+		.check-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px solid #ddd}
 		.payment-form-bottom label{width:140px}
 		.used-amount{width:80px;margin-top:6px}
 		.process-details span{width:140px;margin-left:50px;font-weight:600}
@@ -180,7 +180,13 @@
 					<td colspan="2" class="payCm-t"></td>
 					<td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
 					<td colspan="2" class="supplier-fee">
-						<div>应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>,
+						<div>应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/>
+							<c:if test="${s.differenceType eq 1}">
+								<font color="red">(需补差价¥${s.differencePrice})</font>
+							</c:if>
+							<c:if test="${s.differenceType eq 2}">
+								<font color="red">(需退差价¥${s.differencePrice})</font>
+							</c:if>,
 							 已付:<fmt:formatNumber value="${s.payedShopAmount}" type="number" pattern="#,##0.00"/>
 						</div>
 						<div>
@@ -362,6 +368,9 @@
 				</c:if>
 			</div>
 		</div>
+		<div class="check-btn">
+			<button class="apply-btn btn btn-primary" type="button" onclick="window.location.href='${ctx}/order/cmPayShop/printDetail?id=${cmPayShop.id}'">去打印</button>
+		</div>
 	</div>
 	<script>
 		(function(){

+ 24 - 9
src/main/webapp/WEB-INF/views/modules/order/cmPayShopForm.jsp

@@ -22,7 +22,6 @@
 	.pay-table th{background:#f9f9f9}
 	.pay-table tr:first-child th{background:#eee !important}
 	.pay-table td{background:#fff !important}
-	/*.supplier-fee{text-align:left !important;padding-top:20px !important;padding-left:20px !important}*/
 	.need-to-pay{width:90px}
 	.payment-form-bottom label{width:140px}
 	.used-amount{width:80px;margin-top:6px}
@@ -194,9 +193,15 @@
 					<td colspan="2" class="payCm-t"></td>
 					<td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number" pattern="#,##0.00"/></td>
 					<td colspan="2" class="supplier-fee">
-						<div><span class="nowrap">应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" pattern="#,##0.00"/>,</span>
+						<div><span class="nowrap">应付:<fmt:formatNumber value="${s.shouldPayShopAmount}" pattern="#,##0.00"/>
+							<c:if test="${s.differenceType eq 1}">
+								<font color="red">(需补差价¥${s.differencePrice})</font>
+							</c:if>
+							<c:if test="${s.differenceType eq 2}">
+								<font color="red">(需退差价¥${s.differencePrice})</font>
+							</c:if>,</span>
 							 <span class="nowrap">已付:${s.payedShopAmount},</span></div>
-						<div><span class="nowrap">待付:<input type="number" value="<fmt:formatNumber value="${s.waitPayShop}" pattern="0.00"/>" class="need-to-pay" data-pay="${s.shouldPayShopAmount}" data-payed="${s.payedShopAmount}"></span></div>
+						<div><span class="nowrap">待付:<input type="number" value="<fmt:formatNumber value="${s.waitPayShop}" pattern="0.00"/>" class="need-to-pay" data-type="${s.differenceType}" data-difference="${s.differencePrice}" data-pay="${s.shouldPayShopAmount}" data-payed="${s.payedShopAmount}"></span></div>
 						<input type="hidden" name="payInfo" class="payInfo" data-shoporderid="${s.shopOrderID}" value="${s.shopOrderID}_${s.waitPayShop}_0">
 						<label class="wipeBtn"><input class="wipeFee" type="checkbox" value="0"><span>付款抹平:<em class="red wipeText">¥0.00</em></span></label>
 					</td>
@@ -391,14 +396,19 @@
 			var thisEle = $(this),
 				wrapper = thisEle.parents(".supplier-fee"),
 				shouldPay = thisEle.attr('data-pay')*1,
+				differencePrice = thisEle.attr('data-difference')*1,
+				differenceType = thisEle.attr('data-type'),
 				alreadyPaid = thisEle.attr('data-payed')*1;
 			if(thisEle.val().length>8){
 				thisEle.val(thisEle.val().slice(0,8));
 			}
-			if((thisEle.val() > shouldPay - alreadyPaid) || thisEle.val() < 0) {
-				thisEle.val((shouldPay - alreadyPaid).toFixed(2));
+			if (differenceType == 2){
+				differencePrice = -differencePrice;
+			}
+			if((thisEle.val() > shouldPay - alreadyPaid + differencePrice) || thisEle.val() < 0) {
+				thisEle.val((shouldPay - alreadyPaid + differencePrice).toFixed(2));
 			}
-			var wipe = parseFloat((shouldPay - alreadyPaid - thisEle.val()).toFixed(12));
+			var wipe = parseFloat((shouldPay - alreadyPaid - thisEle.val() + differencePrice).toFixed(12));
 			if (wipe>0) {
 				wrapper.find('.wipeBtn').show();
 			}else{
@@ -440,14 +450,19 @@
 		var thisEle = $(this),
 			wrapper = thisEle.parents(".supplier-fee"),
 			shouldPay = thisEle.attr('data-pay')*1,
+			differencePrice = thisEle.attr('data-difference')*1,
+			differenceType = thisEle.attr('data-type'),
 			alreadyPaid = thisEle.attr('data-payed')*1;
 		if(thisEle.val().length>8){
 			thisEle.val(thisEle.val().slice(0,8));
 		}
-		if((thisEle.val() > shouldPay - alreadyPaid) || thisEle.val() < 0) {
-			thisEle.val((shouldPay - alreadyPaid).toFixed(2));
+		if (differenceType == 2){
+			differencePrice = -differencePrice;
+		}
+		if((thisEle.val() > shouldPay - alreadyPaid + differencePrice) || thisEle.val() < 0) {
+			thisEle.val((shouldPay - alreadyPaid + differencePrice).toFixed(2));
 		}
-		var wipe = parseFloat((shouldPay - alreadyPaid - thisEle.val()).toFixed(12));
+		var wipe = parseFloat((shouldPay - alreadyPaid - thisEle.val() + differencePrice).toFixed(12));
 		if (wipe>0) {
 			wrapper.find('.wipeBtn').show();
 		}else{

+ 21 - 13
src/main/webapp/WEB-INF/views/modules/order/cmPayShopList.jsp

@@ -485,9 +485,15 @@
                         <c:if test="${s.payStatus == 3}"><font color="green">已付款</font></c:if></td>
                     <td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number"
                                                                     pattern="#,##0.00"/></td>
-                    <td class="supplier-fee"><font color="#E15616"><fmt:formatNumber value="${s.shouldPayShopAmount}"
-                                                                                     type="number"
-                                                                                     pattern="#,##0.00"/></font></td>
+                    <td class="supplier-fee">
+                        <font color="#E15616"><fmt:formatNumber value="${s.shouldPayShopAmount}" type="number" pattern="#,##0.00"/></font>
+                        <c:if test="${s.differenceType eq 1}">
+                            <font color="red">(需补差价¥${s.differencePrice})</font>
+                        </c:if>
+                        <c:if test="${s.differenceType eq 2}">
+                            <font color="red">(需退差价¥${s.differencePrice})</font>
+                        </c:if>
+                    </td>
                     <input type="hidden" class="payedShopAmount" value="${s.payedShopAmount}">
                     <input type="hidden" class="productAmount" value="${s.productAmount}">
                     <input type="hidden" class="costType" value="${s.costType}">
@@ -569,19 +575,21 @@
                 </c:forEach>
             </table>
             <div class="pay-more-func">
-                <c:if test="${operatingMode == '1'}">
-                    <c:if test="${s.paying ne '1' and s.payStatus ne '3' and !s.modifyPayable}">
+                <c:if test="${s.paying ne '1' and s.payStatus eq '1' and !s.modifyPayable}">
+                    <shiro:hasPermission name="order:cmPayShop:modifyPay">
+                        <a href="${ctx}/shopOrder/toChangePayShopAmount?shopOrderID=${s.shopOrderID}">修改成本</a>
+                    </shiro:hasPermission>
+                </c:if>
+                <c:if test="${s.modifyPayable and s.paying ne '1'}">
+                    <a href="${ctx}/order/cmPayShop/differencePriceForm?shopOrderId=${s.shopOrderID}">供应商差价</a>
+                </c:if>
+                <a href="${ctx}/order/cmPayShop/shopOtherFeeForm?shopOrderId=${s.shopOrderID}">付第三方</a>
+                <c:if test="${s.paying ne '1' and s.payStatus eq '2'}">
+                    <c:if test="${!s.modifyPayable || s.receiptStatus eq '3'}">
                         <shiro:hasPermission name="order:cmPayShop:modifyPay">
-                            <a href="${ctx}/shopOrder/toChangePayShopAmount?shopOrderID=${s.shopOrderID}">修改应付</a>
+                            <a href="${ctx}/shopOrder/toApplyPayWipe?shopOrderID=${s.shopOrderID}">付款抹平</a>
                         </shiro:hasPermission>
                     </c:if>
-                    <c:if test="${s.paying ne '1' and s.payStatus eq '2'}">
-                        <c:if test="${!s.modifyPayable || s.receiptStatus eq '3'}">
-                            <shiro:hasPermission name="order:cmPayShop:modifyPay">
-                                <a href="${ctx}/shopOrder/toApplyPayWipe?shopOrderID=${s.shopOrderID}">付款抹平</a>
-                            </shiro:hasPermission>
-                        </c:if>
-                    </c:if>
                 </c:if>
                 <a href="${ctx}/shopOrder/payShopRemark?shopOrderId=${s.shopOrderID}">应付备注</a>
                 <a href="${ctx}/shopOrder/payedAndRefundRecordList?shopOrderID=${s.shopOrderID}&operatingMode=${operatingMode}">退/付款记录</a>

+ 52 - 0
src/main/webapp/WEB-INF/views/modules/order/cmRefundShopDetail.jsp

@@ -236,6 +236,7 @@
 					</table>
 				</c:forEach>
 			</div>
+		<c:if test="${cmRefundShop.recordRefundType ne 5}">
 			<div class="refund-form-bottom">
 				<div style="text-align: center">
 					<label style="text-align: right">退款总金额:</label><span id="totalRefundAmount">${cmRefundShop.refundAmount+cmRefundShop.refundBalanceAmount}</span>
@@ -282,7 +283,58 @@
 					${cmRefundShop.remark}</span>
 				</div>
 			</div>
+		</c:if>
 	</div>
+<c:if test="${cmRefundShop.recordRefundType eq 5}">
+	<div style="margin-left: 35px">
+		<div style="font-weight: bold;width: 100%;float: left;"><span style="float: left;">${cmRefundShop.shopDifference.systemName}</span><span style="float: left;margin-left:10px;"><fmt:formatDate value="${cmRefundShop.shopDifference.updateTime}" pattern="yyyy-MM-dd HH:mm"/></span></div>
+		<br><br>
+		<div>
+			<ul><b>差价类型:</b>${cmRefundShop.shopDifference.type eq 1 ? "少付":"多付"}</ul>
+			<ul><b>差价金额:</b>${cmRefundShop.shopDifference.differencePrice}</ul>
+			<c:if test="${not empty cmRefundShop}">
+				<ul><b>接收退款方式:</b></ul>
+				<div style="margin-left: 100px">
+					<div class="refund-wrapper">
+						<c:if test="${cmRefundShop.refundWay == '1'||cmRefundShop.refundWay == '3'}">
+							线下转账:
+							<c:if test="${cmRefundShop.refundType == '1'}">
+								建设银行7297
+							</c:if>
+							<c:if test="${cmRefundShop.refundType == '2'}">
+								中信银行0897
+							</c:if>
+							<c:if test="${cmRefundShop.refundType == '3'}">
+								中信银行7172
+							</c:if>
+							<c:if test="${cmRefundShop.refundType == '4'}">
+								广发银行0115
+							</c:if>
+							<c:if test="${cmRefundShop.refundType == '5'}">
+								广发银行5461
+							</c:if>
+							<c:if test="${cmRefundShop.refundType == '6'}">
+								虚拟银行0000
+							</c:if>
+							,¥${cmRefundShop.refundAmount}
+						</c:if>
+					</div>
+					<div class="refund-wrapper">
+						<c:if test="${cmRefundShop.refundWay == '2'||cmRefundShop.refundWay == '3'}">
+							<b>余额账户:</b>¥${cmRefundShop.refundBalanceAmount}
+						</c:if>
+					</div>
+				</div><br>
+			</c:if>
+			<ul><b>备注内容:</b>${cmRefundShop.shopDifference.remark}</ul>
+			<ul><b>图片:</b>
+				<c:forEach items="${cmRefundShop.shopDifference.remarkImages}" var="image">
+					<img src="${image}" style="height: 100px;width: 100px">
+				</c:forEach>
+			</ul>
+		</div>
+	</div>
+</c:if>
 	<div class="refund-btn">
 			<input id="btnCancel" class="return-btn btn" type="button" value="返 回" onclick="history.go(-1)"/>
 	</div>

+ 9 - 3
src/main/webapp/WEB-INF/views/modules/order/cmRefundShopList.jsp

@@ -106,15 +106,21 @@
 			<tr>
 				<td>${cmRefundShop.id}</td>
 				<td>${cmRefundShop.shopName}</td>
-				<td><fmt:formatNumber value="${cmRefundShop.refundAmount+cmRefundShop.refundBalanceAmount}"
-									  type="currency"/></td>
+				<td>
+					<fmt:formatNumber value="${cmRefundShop.refundAmount+cmRefundShop.refundBalanceAmount}" type="currency"/>
+					<c:if test="${cmRefundShop.recordRefundType eq 5}">
+						<font color="red">(退差价)</font>
+					</c:if>
+				</td>
 				<td>${cmRefundShop.shopOrderIDs}</td>
 				<td>${cmRefundShop.orderNo}</td>
 				<td>${cmRefundShop.operatorName}</td>
 				<td>${cmRefundShop.operatTime}</td>
 				<shiro:hasPermission name="order:cmRefundShop:view"><td>
     				<a href="${ctx}/order/cmRefundShop/toRefund?id=${cmRefundShop.id}">查看详情</a>&nbsp&nbsp
-					<a href="${ctx}/order/cmRefundShop/revocation?id=${cmRefundShop.id}" onclick="return confirmx('确定撤销此次退款吗?', this.href)">撤销退款</a>
+					<c:if test="${cmRefundShop.recordRefundType ne 5}">
+						<a href="${ctx}/order/cmRefundShop/revocation?id=${cmRefundShop.id}" onclick="return confirmx('确定撤销此次退款吗?', this.href)">撤销退款</a>
+					</c:if>
 				</td></shiro:hasPermission>
 			</tr>
 		</c:forEach>

+ 430 - 0
src/main/webapp/WEB-INF/views/modules/order/differencePriceForm.jsp

@@ -0,0 +1,430 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>申请付款</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table th {
+            text-align: center
+        }
+
+        .table td {
+            text-align: center
+        }
+
+        .pay-table th {
+            background: #f9f9f9
+        }
+
+        .pay-table tr:first-child th {
+            background: #eee !important
+        }
+
+        .pay-table td {
+            background: #fff !important
+        }
+
+        input[type="checkbox"]::before {
+            content: '\a0';
+            display: inline-block;
+            vertical-align: .2em;
+            width: .8em;
+            height: .8em;
+            margin-right: .2em;
+            border-radius: .2em;
+            text-indent: .15em;
+            line-height: .65
+        }
+
+        .pay-more-func span:first-child {
+            margin-right: 6px
+        }
+
+        .pay-more-func span:hover {
+            color: #7aa9c3
+        }
+
+        .tips-popup-content p {
+            text-align: center;
+            padding: 80px;
+            font-size: 20px
+        }
+
+        .revise-popup-content h4, .tips-popup-content h4 {
+            padding-left: 10px;
+            height: 40px;
+            line-height: 40px;
+            border-bottom: 1px solid #eee;
+            margin-bottom: 20px
+        }
+
+        .revise-popup-content div {
+            margin-top: 7px;
+            text-align: center
+        }
+
+        .revise-popup-content label {
+            width: 70px;
+            text-align: right;
+            vertical-align: text-bottom
+        }
+
+        .revise-popup-content button {
+            width: 80px;
+            height: 30px;
+            -webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px
+        }
+
+        .revise-popup-content > div:nth-of-type(4) > span:first-child {
+            margin-left: -104px
+        }
+
+        .revise-popup-content > div:nth-of-type(4) > span:last-child {
+            margin-left: 30px
+        }
+
+        .revise-popup-content > div:nth-of-type(4) > span span {
+            margin-left: 10px
+        }
+
+        .revise-popup-content > div:last-child {
+            text-align: center;
+            margin-top: 20px
+        }
+
+        .revise-popup-content input {
+            width: 100px;
+            margin-bottom: 0px
+        }
+
+        .form-search label {
+            width: 80px;
+            text-align: left;
+            margin-top: 12px
+        }
+
+        .remark-title span {
+            color: red
+        }
+
+        .ul-form label {
+            width: 90px;
+            text-align: left;
+            margin-top: 15px
+        }
+
+        .pay-status label {
+            margin-left: 0
+        }
+
+        .pay-status label:first-child {
+            margin-left: 10px
+        }
+        .controls{
+            font-size: 0;
+        }
+        .controls .conList{
+            display: inline-block;
+            margin-right: 15px;
+        }
+        .conList .btn:nth-of-type(1){
+            margin-left: 25px;
+        }
+        .upload-content {
+            margin-top: -70px;
+            display: inline-block;
+        }
+        .upload-content .conList .btn:nth-of-type(1) {
+            width: 90px;
+            height: 100px;
+            border: 2px solid #eee;
+            background: #fff;
+            position: relative;
+        }
+        .upload-content .conList .btn:nth-of-type(1)>div {
+            position: absolute;
+            top: 50%;
+            left: 50%;
+            transform: translate(-50%, -50%);
+            color: #666;
+        }
+        .upload-content .conList .btn:nth-of-type(1) span {
+            font-size: 35px;
+        }
+        .upload-content .conList .btn:nth-of-type(1) h5 {
+            color: #666;
+        }
+        .cancel-upload {
+            background: transparent;
+            border: none;
+            box-shadow: none;
+            position: relative;
+            top: -38px;
+            left: -25px;
+            cursor: pointer;
+            z-index: 100;
+        }
+        .upload-content .conList ol li {
+            width: 114px;
+            min-height: 80px;
+            text-align: center;
+            background: #fff;
+            position: relative;
+            top: 120px;
+            margin-left: 2px;
+        }
+        .hide-pic {
+            display: none !important;
+        }
+        .refund-methods{height:auto !important}
+        .refund-methods>div{display:inline-block}
+        .refund-methods label{vertical-align:top;line-height:50px}
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function() {
+            $("#inputForm").validate({
+                ignore:"",
+                submitHandler: function (form) {
+                    var type = $("input[name='type']:checked").val();
+                    var differencePrice = $("#differencePrice").val();
+                    var waitPayShop = ${payShopDifference.waitPayShop};
+                    if (type == 2 && differencePrice > waitPayShop) {
+                        var refundCheckbox = $('.refund-checkbox:checked');
+                        var inputTotalAmount = 0;
+                        refundCheckbox.each(function () {
+                            var wrapper = $(this).closest('.refund-wrapper'),
+                                thisAmount = wrapper.find('.refund-amount');
+                            inputTotalAmount += Number(thisAmount.val());
+                            console.log('===', inputTotalAmount);
+                        });
+                        if (Number(inputTotalAmount - differencePrice + waitPayShop) > 0.1) {
+                            alertx("退款金额应等于差价与代付金额的差值");
+                            return false;
+                        }
+                    }
+                    /*var shopPostFee = $("#shopPostFee").val();
+                    var brokerage = ${brokerage};
+                    if (brokerage < shopPostFee) {
+                        top.$.jBox.confirm("付第三方的值不合理,导致佣金为负,确认继续吗?", '提示', function (v, h, f) {
+                            if (v == true) {
+                                loading('正在提交,请稍等...');
+                                form.submit();
+                            }
+                            return;
+                        }, {buttons: {'取消': false, '确定': true}});
+                    } else {*/
+                        loading('正在提交,请稍等...');
+                        form.submit();
+                    /*}*/
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+        });
+    </script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/order/cmPayShop">付款列表</a></li>
+    <li><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
+    <li class="active"><a href="${ctx}/order/cmPayShop/differencePriceForm?shopOrderId=${payShopDifference.shopOrderId}">供应商差价</a></li>
+</ul>
+<form:form id="inputForm" modelAttribute="payShopDifference" action="${ctx}/order/cmPayShop/saveDifferencePrice" method="post" class="form-horizontal">
+    <form:hidden path="shopOrderId"/>
+    <br>
+    <div class="control-group">
+        <label class="control-label">差价类型:</label>&nbsp;&nbsp;&nbsp;
+            <input type="radio" name="type" value="1" checked="true" onclick="showInfo()">少付&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            <input type="radio" name="type" value="2" onclick="showInfo()">多付&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            <img src="/static/images/info.jpg" style="height: 20px;width: 20px" onclick="alertx('“少付”指成本变高了,按旧成本付款的话相当于会少付供应商,但是线上支付的订单不能修改成本,所以通过补差价的方式来弥补;“多付”指成本变低了,按旧成本付款的话相当于会多付供应商,但是线上支付的订单不能修改成本,所以通过退差价的方式来弥补。')">
+    </div>
+    <div class="control-group">
+        <label class="control-label"><font color='red'>*</font>差价金额:</label>
+        <div class="controls">
+            <input type="number" id="differencePrice" required name="differencePrice" onchange="showInfo()"/>
+            <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(目前子订单待付金额为¥${payShopDifference.waitPayShop})</label>
+        </div>
+    </div>
+    <div class="control-group" id="refundShow" hidden>
+        <div class="refund-methods">
+            <label class="control-label">接收退款方式:</label>
+            <div>
+                <div class="refund-wrapper">
+                    <input type="checkbox" class="refund-checkbox" name="refundWay" value="1" checked>线下转账&nbsp
+                    <select name="refundType" id="refundType">
+                        <option value="1">建设银行7297</option>
+                        <option value="2">中信银行0897</option>
+                        <option value="3">中信银行7172</option>
+                        <option value="4">广发银行0115</option>
+                        <option value="5">广发银行5461</option>
+                        <option value="6">虚拟银行0000</option>
+                    </select>
+                    <input type="number" name="refundAmount" class="refund-amount" value="0.00">
+                </div><br>
+                <div class="refund-wrapper">
+                    <input type="checkbox" class="refund-checkbox" name="refundWay" value="2">欠款账簿
+                    <input type="number" name="refundBalanceAmount" class="refund-amount" value="0.00">
+                </div><br>
+                <font color="red">注意:两种退款方式金额之和应该等于差价金额与待付金额的差值</font>
+            </div>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label"><font color='red'>*</font>备注内容:</label>
+        <div class="controls">
+            <textarea type="text" name="remark" placeholder="请详细说明造成付供应商差价的原因" style="position: relative;height: 100px; width: 450px;" maxlength="500" required ></textarea>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">图片:</label>
+        <div class="controls upload-content" style="margin: -91px 0px 0px 16px;" id="remarkImageBox">
+            <div class="conList">
+                <form:hidden id="remarkImage1" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage1" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage2" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage2" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage3" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage3" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage4" path="" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage4" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage5" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage5" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage6" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage6" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage7" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage7" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage8" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage8" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList  hide-pic">
+                <form:hidden id="remarkImage9" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage9" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList  hide-pic">
+                <form:hidden id="remarkImage10" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage10" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+        </div>
+    </div>
+    <div class="form-actions">
+        <input id="btnSubmit" style="margin-left: 150px" class="btn btn-primary" type="submit" value="确认"/>&nbsp;&nbsp;&nbsp;&nbsp;
+        <input id="btnCancel" class="btn" type="button" value="返回" onclick="history.go(-1)"/>
+    </div>
+</form:form>
+<sys:message content="${message}"/>
+<script>
+
+    //图片初始化
+    $(function () {
+        $('.upload-content .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
+        $('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();
+        $('.upload-content .conList').find('.cancel-upload').hide();
+        var observeEle = document.getElementsByClassName('upload-content')[0];
+        var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
+        var MutationObserverConfig={
+            childList: true,
+            subtree: true,
+            characterData: true
+        };
+        var observer = new MutationObserver(function(mutations){
+            $.each(mutations, function(index,item) {
+                if (item.type === 'childList') {
+                    // 在创建新的 element 时调用
+                    var target = $(item.target),
+                        thisWrapper = target.closest('.conList'),
+                        nextEle = thisWrapper.next();
+                    thisWrapper.find('li').css('z-index',99);
+                    thisWrapper.find('.cancel-upload').show();
+                    if(nextEle.hasClass('hide-pic')) {
+                        nextEle.removeClass('hide-pic');
+                    }
+                }
+            })
+        });
+        observer.observe(observeEle,MutationObserverConfig);
+
+        $('body').on('click','.upload-content li',function() {
+            var index = $(this).closest('.conList').index() + 1,
+                str = 'remarkImage'+index+'FinderOpen';
+            eval(str+'()');
+        });
+        $('body').on('click', '.cancel-upload',function() {
+            var wrapper = $(this).closest('.conList');
+            wrapper.find('li').css('z-index','-1');
+            wrapper.find('input').val('');
+            $(this).hide();
+            if ($('.cancel-upload:visible').length < 9) {
+                wrapper.addClass("hide-pic");
+            }else{
+                wrapper.removeClass("hide-pic");
+            }
+            wrapper.parent().append(wrapper.clone());
+            wrapper.remove();
+            $(".conList").each(function(i,ele){
+                if($(ele).find("input.input-xlarge").val()){
+                    $(ele).next().removeClass("hide-pic")
+                }
+            })
+        });
+        $(window).on("load", function(){
+            setTimeout(function(){
+                $("#remarkImageBox").find("input.input-xlarge").each(function(i,ele){
+                    if($(ele).val()){
+                        $(ele).next().find("li").css("z-index","99");
+                        $(ele).parents(".conList").find(".cancel-upload").show();
+                        $(ele).parents(".conList").next().removeClass("hide-pic")
+                    }
+                })
+            },500);
+        });
+    });
+
+    /**
+     * @param obj
+     * jquery控制input只能输入数字
+     */
+    function onlynum(obj) {
+        obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+    }
+
+    function showInfo() {
+        var type = $("input[name='type']:checked").val();
+        if (type == 1){
+            $("#refundShow").hide();
+        } else {
+            var differencePrice = $("#differencePrice").val();
+            var waitPayShop = ${payShopDifference.waitPayShop};
+            if (differencePrice > waitPayShop) {
+                $("#refundShow").show();
+            }else {
+                $("#refundShow").hide();
+            }
+        }
+    }
+</script>
+</body>
+</html>

+ 170 - 0
src/main/webapp/WEB-INF/views/modules/order/differencePriceRemark.jsp

@@ -0,0 +1,170 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+    <title>付款修改记录</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table th {text-align: center}
+        .table td {text-align: center}
+        .pay-table th {
+            background: #f9f9f9;
+        }
+        .pay-table tr:first-child th {
+            background: #eee !important;
+        }
+        .pay-table td {
+            background: #fff !important;
+        }
+
+        .form-horizontal .controls {
+            margin-left: 0;
+        }
+
+        .dateInput input {
+            width: 150px;
+        }
+
+        .clause span {
+            margin-left: 30px;
+        }
+
+        #productTable th {
+            text-align: center;
+            white-space: nowrap;
+        }
+
+        #productTable td {
+            text-align: center;
+            white-space: nowrap;
+        }
+        .conList .btn:nth-of-type(1){
+            margin-left: 25px;
+        }
+        .upload-content .conList .btn:nth-of-type(1) {
+            width: 90px;
+            height: 100px;
+            border: 2px solid #eee;
+            background: #fff;
+            position: relative;
+        }
+        .upload-content .conList .btn:nth-of-type(1)>div {
+            position: absolute;
+            top: 50%;
+            left: 50%;
+            transform: translate(-50%, -50%);
+            color: #666;
+        }
+        .upload-content .conList .btn:nth-of-type(1) span {
+            font-size: 35px;
+        }
+        .upload-content .conList .btn:nth-of-type(1) h5 {
+            color: #666;
+        }
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function() {
+            $("#inputForm").validate({
+                ignore:"",
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+
+        });
+        function page(n,s){
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
+        }
+
+        //初始化默认清除本地本地Item数据
+
+    </script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/order/cmPayShop">付款列表</a></li>
+    <li><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
+    <li class="active"><a href="${ctx}/shopOrder/payShopRemark?shopOrderId=${shopOrderId}">付款备注</a></li>
+</ul>
+
+<ul class="nav nav-tabs" id="myTab">
+    <li><a href="${ctx}/shopOrder/payShopRemark?shopOrderId=${shopOrderId}">修改成本备注</a></li>
+    <li><a href="${ctx}/shopOrder/shopOtherRemark?shopOrderId=${shopOrderId}">修改付第三方备注</a></li>
+    <li class="active"><a href="${ctx}/shopOrder/differencePriceRemark?shopOrderId=${shopOrderId}">修改供应商差价备注</a></li>
+</ul>
+<c:if test="${not empty differenceList}">
+    <c:forEach items="${differenceList}" var="difference">
+        <div style="margin-left: 35px">
+            <div style="font-weight: bold;width: 100%;float: left;"><span style="float: left;">${difference.systemName}</span><span style="float: left;margin-left:10px;"><fmt:formatDate value="${difference.updateTime}" pattern="yyyy-MM-dd HH:mm"/></span></div>
+            <br><br>
+            <div>
+                <ul>差价类型:${difference.type eq 1 ? "少付":"多付"}</ul>
+                <ul>差价金额:${difference.differencePrice}</ul>
+                <c:if test="${not empty difference.refundShop}">
+                    <ul>接收退款方式:</ul>
+                    <div style="margin-left: 100px">
+                        <div class="refund-wrapper">
+                            <c:if test="${difference.refundShop.refundWay == '1'||difference.refundShop.refundWay == '3'}">
+                                线下转账:
+                                <c:if test="${difference.refundShop.refundType == '1'}">
+                                    建设银行7297
+                                </c:if>
+                                <c:if test="${difference.refundShop.refundType == '2'}">
+                                    中信银行0897
+                                </c:if>
+                                <c:if test="${difference.refundShop.refundType == '3'}">
+                                    中信银行7172
+                                </c:if>
+                                <c:if test="${difference.refundShop.refundType == '4'}">
+                                    广发银行0115
+                                </c:if>
+                                <c:if test="${difference.refundShop.refundType == '5'}">
+                                    广发银行5461
+                                </c:if>
+                                <c:if test="${difference.refundShop.refundType == '6'}">
+                                    虚拟银行0000
+                                </c:if>
+                                ,¥${difference.refundShop.refundAmount}
+                            </c:if>
+                        </div>
+                        <div class="refund-wrapper">
+                            <c:if test="${difference.refundShop.refundWay == '2'||difference.refundShop.refundWay == '3'}">
+                                余额账户:¥${difference.refundShop.refundBalanceAmount}
+                            </c:if>
+                        </div>
+                    </div><br>
+                </c:if>
+                <ul>备注内容:${difference.remark}</ul>
+                <ul>图片:
+                    <c:forEach items="${difference.remarkImages}" var="image">
+                        <img src="${image}" style="height: 100px;width: 100px">
+                    </c:forEach>
+                </ul>
+            </div>
+        </div>
+        <hr>
+    </c:forEach>
+</c:if>
+<c:if test="${empty differenceList}">
+    <p style="text-align: center;"><font  color="#1e90ff">暂无备注数据……</font></p>
+</c:if>
+<div>
+    <input id="btnCancel" class="btn" type="button" value="返回" onclick="history.go(-1)"/>
+</div>
+<script>
+</script>
+</body>
+</html>

+ 29 - 26
src/main/webapp/WEB-INF/views/modules/order/logisticsDetails.jsp

@@ -30,36 +30,14 @@
         .detail-p p{margin-bottom: 10px;font-size: 14px;}
         .expand{position: absolute;right: 0;bottom: 0;font-size: 14px;padding: 15px;cursor: pointer}
     </style>
-    <script type="text/javascript">
-        window.onload = function () {
-            var expand_ = document.getElementsByClassName('expand');
-            var flag = true;
-            for(var i=0;i<expand_.length;i++){
-                expand_[i].onclick = function () {
-                    var deta_ = this.parentNode.getElementsByClassName('detail-p');
-                    if(flag){
-                        deta_[0].style.cssText = 'height:auto';
-                        this.innerHTML='收起';
-                        flag = false;
-                    }else {
-                        console.log(1111)
-                        deta_[0].style.cssText = 'height:90px';
-                        this.innerHTML='展开';
-                        flag = true
-                    }
-
-                    console.log(flag)
-                }
-            }
-
-        }
-
-    </script>
 </head>
 <body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/order/orderList">订单列表</a></li>
+    <li class="active"><a href="${ctx}/order/logisticsDetails?orderID=${orderID}">发货记录</a></li>
+</ul>
 <div class="bj" style="display: none"></div>
 <div class="body-margin">
-    <h3><span class="left-span"></span>发货记录</h3>
     <c:if test="${empty logisticsInfoVos}">
         此订单没有发货商品,请先进行发货操作
     </c:if>
@@ -74,6 +52,9 @@
                     </tr>
                 </table>
             </c:forEach>
+            <div class="select-ship" style="float:right">
+                <input class="btn btn-primary" type="button" value="查看商品资质" onclick="window.location.href='${ctx}/order/qualificationInfo?logisticsBatchId=${liv.logisticsBatch.id}&orderId=${liv.logisticsBatch.orderID}'" style="margin-right: 100px"/>
+            </div>
             <c:forEach items="${liv.logisticsInformationList}" var="lis">
                 <div class="more-order">
                     <div class="lg-company">
@@ -98,5 +79,27 @@
         </div>
     </c:forEach>
 </div>
+<script type="text/javascript">
+    window.onload = function () {
+        var expand_ = document.getElementsByClassName('expand');
+        var flag = true;
+        for(var i=0;i<expand_.length;i++){
+            expand_[i].onclick = function () {
+                var deta_ = this.parentNode.getElementsByClassName('detail-p');
+                if(flag){
+                    deta_[0].style.cssText = 'height:auto';
+                    this.innerHTML='收起';
+                    flag = false;
+                }else {
+                    console.log(1111)
+                    deta_[0].style.cssText = 'height:90px';
+                    this.innerHTML='展开';
+                    flag = true
+                }
+                console.log(flag)
+            }
+        }
+    }
+</script>
 </body>
 </html>

+ 7 - 0
src/main/webapp/WEB-INF/views/modules/order/newOrderList.jsp

@@ -643,6 +643,10 @@
                         title: "确认提示", width: 500, height: 400, buttons: {"确定": '1', "取消": '-1'},
                         submit: function (v, h, f) {
                             if ('1' == v) {
+                                if ((Number(data.payTotalFee) - Number(data.associateAmount)) > 10) {
+                                    alertx("订单剩余应收金额大于¥10.00,不能抹平!");
+                                    return false;
+                                }
                                 var content = document.getElementsByName("auditNote")[0].value;
                                 if (content == '' || content == null) {
                                     document.getElementById('noteError').style.display = 'block';
@@ -1071,6 +1075,9 @@
                             <a href="javascript:void(0);"
                                onclick="modelShow('${order.orderID}')">编辑经理折扣</a>
                         </c:if>
+                        <c:if test="${order.rebateFlag eq 0 && order.receiptStatus eq 1 && order.payStatus eq 1}">
+                            <a href="${ctx}/order/modifyRebate?orderId=${order.orderID}" onclick="return confirmx('确定将订单转为返佣订单吗?', this.href)">转为返佣订单</a>
+                        </c:if>
                     </shiro:hasPermission>
 
                     <shiro:hasPermission name="order:order:applyrefound">

+ 7 - 0
src/main/webapp/WEB-INF/views/modules/order/orderDetail.jsp

@@ -315,6 +315,9 @@
                         <a href="javascript:void(0);"
                            onclick="modelShow('${order.orderID}')">编辑经理折扣</a>
                     </c:if>
+                    <c:if test="${order.rebateFlag eq 0 && order.receiptStatus eq 1 && order.payStatus eq 1}">
+                        <a href="${ctx}/order/modifyRebate?orderId=${order.orderID}" onclick="return confirmx('确定将订单转为返佣订单吗?', this.href)">转为返佣订单</a>
+                    </c:if>
                 </shiro:hasPermission>
                 <shiro:hasPermission name="order:order:applyrefound">
                     <c:if test="${order.status == 12 || order.status == 13 || order.status == 21 || order.status == 22 || order.status == 23 || order.status == 31 || order.status == 32 || order.status == 33 || order.status == 4 || order.status == 5}">
@@ -917,6 +920,10 @@
                     title: "确认提示", width: 500, height: 400, buttons: {"确定": '1', "取消": '-1'},
                     submit: function (v, h, f) {
                         if ('1' == v) {
+                            if ((Number(data.payTotalFee) - Number(data.associateAmount)) > 10) {
+                                alertx("订单剩余应收金额大于¥10.00,不能抹平!");
+                                return false;
+                            }
                             var content = document.getElementsByName("auditNote")[0].value;
                             if (content == '' || content == null) {
                                 document.getElementById('noteError').style.display = 'block';

+ 22 - 16
src/main/webapp/WEB-INF/views/modules/order/orderForm.jsp

@@ -610,25 +610,31 @@
                     if (onSubmitBefor() == false) {
                         return;
                     }
-                    // 因为订单总额和应收订单金额都为0元,如果保存订单则状态直接为已付款!
-                    var payableAmount = $(".payableAmount").html();
-                    var payTotalFee = $(".payTotalFee").html();
-                    if(0 == payableAmount && 0 == payTotalFee ){
-                        top.$.jBox.confirm("该订单无须支付,保存后订单收款状态直接为“已收款”,且无需再确认订单",'保存订单提示',function(v,h,f){
-                                if(v=='ok'){
-                                    // 提交订单
-                                    loading('正在提交,请稍等...');
-                                    form.submit();
-                                }
-                            },{buttonsFocus:1, closed:function(){
-                                if (typeof closed == 'function') {
-                                    closed();
-                                }
-                            }});
-                    }else{
+                  top.$.jBox.confirm("请仔细确认订单是否为返佣订单后再提交订单", '提示', function (v, h, f) {
+                    if (v == true) {
+                      // 因为订单总额和应收订单金额都为0元,如果保存订单则状态直接为已付款!
+                      var payableAmount = $(".payableAmount").html();
+                      var payTotalFee = $(".payTotalFee").html();
+                      if (0 == payableAmount && 0 == payTotalFee) {
+                        top.$.jBox.confirm("该订单无须支付,保存后订单收款状态直接为“已收款”,且无需再确认订单", '保存订单提示', function (v, h, f) {
+                          if (v == 'ok') {
+                            // 提交订单
+                            loading('正在提交,请稍等...');
+                            form.submit();
+                          }
+                        }, {
+                          buttonsFocus: 1, closed: function () {
+                            if (typeof closed == 'function') {
+                              closed();
+                            }
+                          }
+                        });
+                      } else {
                         loading('正在提交,请稍等...');
                         form.submit();
+                      }
                     }
+                  }, {buttonsFocus: 1, persistent: true, buttons: {'继续提交': true, '再想一想': false}});
                 },
                 errorContainer: "#messageBox",
                 errorPlacement: function (error, element) {

+ 138 - 0
src/main/webapp/WEB-INF/views/modules/order/otherRemark.jsp

@@ -0,0 +1,138 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+    <title>付款修改记录</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table th {text-align: center}
+        .table td {text-align: center}
+        .pay-table th {
+            background: #f9f9f9;
+        }
+        .pay-table tr:first-child th {
+            background: #eee !important;
+        }
+        .pay-table td {
+            background: #fff !important;
+        }
+
+        .form-horizontal .controls {
+            margin-left: 0;
+        }
+
+        .dateInput input {
+            width: 150px;
+        }
+
+        .clause span {
+            margin-left: 30px;
+        }
+
+        #productTable th {
+            text-align: center;
+            white-space: nowrap;
+        }
+
+        #productTable td {
+            text-align: center;
+            white-space: nowrap;
+        }
+        .conList .btn:nth-of-type(1){
+            margin-left: 25px;
+        }
+        .upload-content .conList .btn:nth-of-type(1) {
+            width: 90px;
+            height: 100px;
+            border: 2px solid #eee;
+            background: #fff;
+            position: relative;
+        }
+        .upload-content .conList .btn:nth-of-type(1)>div {
+            position: absolute;
+            top: 50%;
+            left: 50%;
+            transform: translate(-50%, -50%);
+            color: #666;
+        }
+        .upload-content .conList .btn:nth-of-type(1) span {
+            font-size: 35px;
+        }
+        .upload-content .conList .btn:nth-of-type(1) h5 {
+            color: #666;
+        }
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function() {
+            $("#inputForm").validate({
+                ignore:"",
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+
+        });
+        function page(n,s){
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
+        }
+
+        //初始化默认清除本地本地Item数据
+
+    </script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/order/cmPayShop">付款列表</a></li>
+    <li><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
+    <li class="active"><a href="${ctx}/shopOrder/payShopRemark?shopOrderId=${shopOrderId}">付款备注</a></li>
+</ul>
+
+    <ul class="nav nav-tabs" id="myTab">
+        <li><a href="${ctx}/shopOrder/payShopRemark?shopOrderId=${shopOrderId}">修改成本备注</a></li>
+        <li class="active"><a href="${ctx}/shopOrder/shopOtherRemark?shopOrderId=${shopOrderId}">修改付第三方备注</a></li>
+        <li><a href="${ctx}/shopOrder/differencePriceRemark?shopOrderId=${shopOrderId}">修改供应商差价备注</a></li>
+    </ul>
+    <c:if test="${not empty shopOtherList}">
+        <c:forEach items="${shopOtherList}" var="shopOther">
+            <div style="margin-left: 35px">
+                <div style="font-weight: bold;width: 100%;float: left;"><span style="float: left;">${shopOther.systemName}</span><span style="float: left;margin-left:10px;"><fmt:formatDate value="${shopOther.updateTime}" pattern="yyyy-MM-dd HH:mm"/></span></div>
+                <br><br>
+                <div>
+                    <ul>付第三方:${shopOther.shopOtherFee}</ul>
+                    <ul>开户名:${shopOther.bankAccountName}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;账号:${shopOther.bankAccount}</ul>
+                    <ul>开户行:${shopOther.bankName}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;账户类型:${shopOther.type eq 0 ? "公账":"私账"}</ul>
+                    <ul>备注内容:${shopOther.remark}</ul>
+                    <ul>图片:
+                        <c:forEach items="${shopOther.remarkImages}" var="image">
+                            <img src="${image}" style="height: 100px;width: 100px">
+                        </c:forEach>
+                    </ul>
+                </div>
+            </div>
+            <hr>
+        </c:forEach>
+    </c:if>
+    <c:if test="${empty shopOtherList}">
+        <p style="text-align: center;"><font  color="#1e90ff">暂无备注数据……</font></p>
+    </c:if>
+    <div>
+        <input id="btnCancel" class="btn" type="button" value="返回" onclick="history.go(-1)"/>
+    </div>
+<script>
+</script>
+</body>
+</html>
+

+ 170 - 0
src/main/webapp/WEB-INF/views/modules/order/qualification.jsp

@@ -0,0 +1,170 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>订单列表</title>
+    <meta name="decorator" content="default"/>
+    <%--<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>--%>
+    <style type="text/css">
+        * {
+            margin: 0;
+            padding: 0
+        }
+
+        a {
+            list-style: none;
+            text-decoration: none
+        }
+
+        i {
+            font-style: normal
+        }
+
+        body {
+            background-color: rgb(228, 228, 228);
+        }
+
+        h3 {
+            line-height: 20px;
+            padding: 20px 0 20px 15px;
+            border-bottom: 1px solid #CCCCCC;
+            font-weight: normal
+        }
+
+        .body-margin {
+            margin: 0 26px;
+        }
+
+        .left-span {
+            width: 3px;
+            height: 20px;
+            margin-right: 10px;
+            background-color: #00A6C7;
+            display: inline-block;
+            vertical-align: bottom
+        }
+
+        .list-div label {
+            display: inline-block;
+            width: 70px;
+        }
+
+        .ship-shop {
+            background-color: #fff;
+            margin-top: 20px;
+            min-height: 500px;
+        }
+
+        .table {
+            width: 100%;
+            border-collapse: collapse;
+        }
+
+        .table th {
+            color: #000;
+            font-weight: normal
+        }
+
+        .table th, .table td {
+            height: 35px;
+            border: 1px solid #CCCCCC;
+            text-align: center;
+            padding: 5px 0;
+        }
+
+        .select-all td {
+            border: 0
+        }
+
+        .select-all label {
+            display: inline-block;
+            padding-left: 5px;
+            vertical-align: 1px;
+        }
+
+        .select-ship span {
+            cursor: pointer;
+            display: inline-block;
+            width: 100px;
+            line-height: 35px;
+            text-align: center;
+            border-radius: 5px;
+            background-color: #00A6C7;
+            color: #fff;
+        }
+
+        .select-ship span:last-child {
+            margin-left: 20px;
+        }
+
+        .status-span span {
+            display: inline-block;
+            background-color: #00A6C7;
+            padding: 7px 20px;
+            color: #fff;
+            cursor: pointer
+        }
+
+        .status-span span:nth-child(1) {
+            margin-right: 10px;
+        }
+
+        .status-span span:nth-child(2) {
+            margin-left: 10px;
+        }
+        .select-ship {
+            text-align: center;
+        }
+
+        .select-ship span {
+            cursor: pointer;
+            display: inline-block;
+            width: 100px;
+            line-height: 35px;
+            text-align: center;
+            border-radius: 5px;
+            background-color: #00A6C7;
+            color: #fff;
+        }
+
+        .select-ship span:last-child {
+            margin-left: 20px;
+        }
+    </style>
+</head>
+<body>
+<div class="body-margin">
+    <h3><span class="left-span"></span>订单列表--商品资质</h3>
+    <div class="ship-shop">
+        <form id="shipForm" method="post">
+            <sys:message content="${message}"/>
+            <table class="table">
+                <tr>
+                    <th>供应商</th>
+                    <th>商品图片</th>
+                    <th>商品名称</th>
+                    <th>本次发货</th>
+                    <th>SN码</th>
+                    <th>资质文件</th>
+                    <th>操作</th>
+                </tr>
+                <c:forEach items="${logisticsRecords}" var="logistics" varStatus="index">
+                    <tr>
+                        <td>${logistics.shopName}</td>
+                        <td><img src="${logistics.image}" alt="" width="80px;height:auto;"></td>
+                        <td>${logistics.shopName}</td>
+                        <td>${logistics.num}</td>
+                        <td>${empty logistics.sn ? "无":logistics.sn}</td>
+                        <td>${logistics.isFile ? "已上传":"未上传"}</td>
+                        <td><a href="${ctx}/order/qualificationForm?recordId=${logistics.id}">上传资质</a></td>
+                    </tr>
+                </c:forEach>
+            </table><br><br><br><br>
+            <div class="select-ship">
+                <input class="btn btn-primary" type="button" value="确认" onclick="window.location.href='${ctx}/order/logisticsDetails?orderID=${orderId}'" style="margin-left: 15px"/>
+            </div>
+        </form>
+    </div>
+</div>
+</body>
+</html>

+ 395 - 0
src/main/webapp/WEB-INF/views/modules/order/qualificationForm.jsp

@@ -0,0 +1,395 @@
+<%@ taglib prefix="from" uri="/struts-tags" %>
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>订单列表</title>
+    <meta name="decorator" content="default"/>
+    <%--<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>--%>
+    <script type="text/javascript">
+        $(document).ready(function () {
+            $("#inputForm").validate({
+                submitHandler: function (form) {
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function (error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+        });
+    </script>
+    <style type="text/css">
+        * {
+            margin: 0;
+            padding: 0
+        }
+
+        a {
+            list-style: none;
+            text-decoration: none
+        }
+
+        i {
+            font-style: normal
+        }
+
+        body {
+            background-color: rgb(228, 228, 228);
+        }
+
+        h3 {
+            line-height: 20px;
+            padding: 20px 0 20px 15px;
+            border-bottom: 1px solid #CCCCCC;
+            font-weight: normal
+        }
+
+        .body-margin {
+            margin: 0 26px;
+        }
+
+        .left-span {
+            width: 3px;
+            height: 20px;
+            margin-right: 10px;
+            background-color: #00A6C7;
+            display: inline-block;
+            vertical-align: bottom
+        }
+
+        .list-div label {
+            display: inline-block;
+            width: 70px;
+        }
+
+        .ship-shop {
+            background-color: #fff;
+            margin-top: 20px;
+            min-height: 500px;
+        }
+
+        .table th {
+            color: #000;
+            font-weight: normal
+        }
+
+        .table th, .table td {
+            height: 35px;
+            border: 1px solid #CCCCCC;
+            text-align: center;
+            padding: 5px 0;
+        }
+
+        .select-all td {
+            border: 0
+        }
+
+        .select-all label {
+            display: inline-block;
+            padding-left: 5px;
+            vertical-align: 1px;
+        }
+
+        .select-ship span {
+            cursor: pointer;
+            display: inline-block;
+            width: 100px;
+            line-height: 35px;
+            text-align: center;
+            border-radius: 5px;
+            background-color: #00A6C7;
+            color: #fff;
+        }
+
+        .select-ship span:last-child {
+            margin-left: 20px;
+        }
+
+        .status-span span {
+            display: inline-block;
+            background-color: #00A6C7;
+            padding: 7px 20px;
+            color: #fff;
+            cursor: pointer
+        }
+
+        .status-span span:nth-child(1) {
+            margin-right: 10px;
+        }
+
+        .status-span span:nth-child(2) {
+            margin-left: 10px;
+        }
+
+        .select-ship span {
+            cursor: pointer;
+            display: inline-block;
+            width: 100px;
+            line-height: 35px;
+            text-align: center;
+            border-radius: 5px;
+            background-color: #00A6C7;
+            color: #fff;
+        }
+
+        .select-ship span:last-child {
+            margin-left: 20px;
+        }
+
+        .upload-content .conList ol li {
+            width: 114px;
+            min-height: 80px;
+            text-align: center;
+            background: #fff;
+            position: relative;
+            top: 120px;
+            margin-left: 2px;
+        }
+
+        .upload-content {
+            margin-top: -70px;
+            display: inline-block;
+        }
+        .upload-content .conList .btn:nth-of-type(1) {
+            width: 90px;
+            height: 100px;
+            border: 2px solid #eee;
+            background: #fff;
+            position: relative;
+        }
+        .upload-content .conList .btn:nth-of-type(1)>div {
+            position: absolute;
+            top: 50%;
+            left: 50%;
+            transform: translate(-50%, -50%);
+            color: #666;
+        }
+        .upload-content .conList .btn:nth-of-type(1) span {
+            font-size: 35px;
+        }
+        .upload-content .conList .btn:nth-of-type(1) h5 {
+            color: #666;
+        }
+        .cancel-upload {
+            background: transparent;
+            border: none;
+            box-shadow: none;
+            position: relative;
+            top: -38px;
+            left: -25px;
+            cursor: pointer;
+            z-index: 100;
+        }
+        .hide-pic {
+            display: none !important;
+        }
+        .controls .conList{
+            display: inline-block;
+            margin-right: 15px;
+        }
+        .conList .btn:nth-of-type(1){
+            margin-left: 25px;
+        }
+    </style>
+</head>
+<body>
+<div class="body-margin">
+    <h3><span class="left-span"></span>订单列表--上传资质</h3>
+    <div class="ship-shop">
+        <br><br>
+        <form:form id="inputForm" modelAttribute="logisticsRecord" action="${ctx}/order/saveQualification" method="post" class="form-horizontal">
+            <sys:message content="${message}"/>
+            <form:hidden path="logisticsBatchID"/>
+            <input type="hidden" name="recordId" value="${recordId}">
+            <div class="control-group">
+                <label class="control-label">SN码:</label>
+                <div class="controls">
+                    <form:textarea path="sn" style="width: 350px;height: 90px;" placeholder="若有多个,可用逗号隔开" htmlEscape="false" maxlength="250" class="input-xlarge "/>
+                </div>
+            </div>
+            <div class="control-group">
+                <label class="control-label">资质文件:</label>
+                <div class="controls">
+                    <div id='file-list-display'>
+                        <c:if test="${not empty logisticsRecord.fileList}">
+                            <c:forEach items="${logisticsRecord.fileList}" var="file" varStatus="statusIndex">
+                                <p>
+                                        ${file.fileName}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" class="delBtn" data-id="${file.ossName}">删除</a>
+                                            <input type="hidden" name="files" value="${file.fileName}---${file.ossName}"/>
+                                </p>
+
+                            </c:forEach>
+                        </c:if>
+                    </div>
+                    <div class="upload" style="box-sizing: border-box;padding-left: 120px;" >
+                        <input type="file" id="controlsFiles" style="position: relative;padding-left: 0;"/>
+                    </div>
+                </div>
+            </div>
+            <div class="control-group">
+                <label class="control-label">图片:</label><font color="#a9a9a9">(若不方便上传文件,可用图片代替)</font><br>
+                <div class="controls upload-content" id="secondHandImage" style="margin-left: 0;">
+                    <div class="conList">
+                        <form:hidden value="${logisticsRecord.imageList.size()>0?logisticsRecord.imageList.get(0):''}" id="image1" path="images" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                        <sys:ckfinder input="image1" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <form:hidden value="${logisticsRecord.imageList.size()>1?logisticsRecord.imageList.get(1):''}" id="image2" path="images" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                        <sys:ckfinder input="image2" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <form:hidden value="${logisticsRecord.imageList.size()>2?logisticsRecord.imageList.get(2):''}" id="image3" path="images" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                        <sys:ckfinder input="image3" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <form:hidden value="${logisticsRecord.imageList.size()>3?logisticsRecord.imageList.get(3):''}" id="image4" path="images" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                        <sys:ckfinder input="image4" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <form:hidden value="${logisticsRecord.imageList.size()>4?logisticsRecord.imageList.get(4):''}" id="image5" path="images" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                        <sys:ckfinder input="image5" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <form:hidden value="${logisticsRecord.imageList.size()>5?logisticsRecord.imageList.get(5):''}" id="image6" path="images" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                        <sys:ckfinder input="image6" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <form:hidden value="${logisticsRecord.imageList.size()>6?logisticsRecord.imageList.get(6):''}" id="image7" path="images" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                        <sys:ckfinder input="image7" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <form:hidden value="${logisticsRecord.imageList.size()>7?logisticsRecord.imageList.get(7):''}" id="image8" path="images" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                        <sys:ckfinder input="image8" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <form:hidden value="${logisticsRecord.imageList.size()>8?logisticsRecord.imageList.get(8):''}" id="image9" path="images" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                        <sys:ckfinder input="image9" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <form:hidden value="${logisticsRecord.imageList.size()>9?logisticsRecord.imageList.get(9):''}" id="image10" path="images" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                        <sys:ckfinder input="image10" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                </div>
+            </div>
+            <div class="form-actions">
+                <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
+                <input id="btnCancel" class="btn" type="button" value="取 消" onclick="history.go(-1)"/>
+            </div>
+        </form:form>
+    </div>
+</div>
+        <script>
+            //图片初始化
+            $(function () {
+                $('.upload-content .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
+                $('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();
+                $('.upload-content .conList').find('.cancel-upload').hide();
+                var observeEle = document.getElementsByClassName('upload-content')[0];
+                var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
+                var MutationObserverConfig={
+                    childList: true,
+                    subtree: true,
+                    characterData: true
+                };
+                var observer = new MutationObserver(function(mutations){
+                    $.each(mutations, function(index,item) {
+                        if (item.type === 'childList') {
+                            // 在创建新的 element 时调用
+                            var target = $(item.target),
+                                thisWrapper = target.closest('.conList'),
+                                nextEle = thisWrapper.next();
+                            thisWrapper.find('li').css('z-index',99);
+                            thisWrapper.find('.cancel-upload').show();
+                            if(nextEle.hasClass('hide-pic')) {
+                                nextEle.removeClass('hide-pic');
+                            }
+                        }
+                    })
+                });
+                observer.observe(observeEle,MutationObserverConfig);
+
+                $('body').on('click','.upload-content li',function() {
+                    var index = $(this).closest('.conList').index() + 1,
+                        str = 'image'+index+'FinderOpen';
+                    eval(str+'()');
+                });
+                $('body').on('click', '.cancel-upload',function() {
+                    var wrapper = $(this).closest('.conList');
+                    wrapper.find('li').css('z-index','-1');
+                    wrapper.find('input').val('');
+                    $(this).hide();
+                    if ($('.cancel-upload:visible').length < 9) {
+                        wrapper.addClass("hide-pic");
+                    }else{
+                        wrapper.removeClass("hide-pic");
+                    }
+                    wrapper.parent().append(wrapper.clone());
+                    wrapper.remove();
+                    $(".conList").each(function(i,ele){
+                        if($(ele).find("input.input-xlarge").val()){
+                            $(ele).next().removeClass("hide-pic")
+                        }
+                    })
+                });
+                $(window).on("load", function(){
+                    setTimeout(function(){
+                        $("#secondHandImage").find("input.input-xlarge").each(function(i,ele){
+                            if($(ele).val()){
+                                $(ele).next().find("li").css("z-index","99");
+                                $(ele).parents(".conList").find(".cancel-upload").show();
+                                $(ele).parents(".conList").next().removeClass("hide-pic")
+                            }
+                        })
+                    },500);
+                });
+
+                var controlsFiles = document.getElementById("controlsFiles");
+                controlsFiles.addEventListener("change", function () {
+                    $('#uploadFileName').val(name.substring(0, name.indexOf('.')));
+                    var files = $('#controlsFiles').prop('files');
+                    var data = new FormData();
+                    var url = "${ctx}/oss/cmOssArchive/fileUpload";
+                    data.append('file', files[0]);
+                    $.ajax({
+                        url: url,
+                        data: data,
+                        type: "POST",
+                        processData: false,
+                        contentType: false,
+                        dataType: "json",
+                        success: function (res) {
+                            var html="<p>"+res.fileName+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a class='delBtn' href='javascript:void(0);' data-id='"+res.ossName+"'>删除</a>" +
+                                "<input type='hidden' name='files' value='"+res.fileName+"---"+res.ossName+"'/></p>";
+                            $("#file-list-display").append(html);
+                            $("#controlsFiles").val("");
+                        },
+                        error: function (error) {
+                            alertx(error);
+                        }
+                    });
+                });
+
+                //删除文件
+                $("body").on("click", ".delBtn", function(){
+                    var ossName = $(this).attr("data-id");
+                    console.log(ossName);
+                    $(this).parent().remove();
+                    $.ajax({
+                        url: "${ctx}/oss/cmOssArchive/deleteOssFile",
+                        data: {"ossName": ossName},
+                        async: false,
+                        type: "POST"
+                    });
+
+                })
+            });
+        </script>
+</body>
+</html>

+ 78 - 0
src/main/webapp/WEB-INF/views/modules/order/qualificationInfo.jsp

@@ -0,0 +1,78 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+    <title>商品资质管理</title>
+    <meta name="decorator" content="default"/>
+    <style>
+        .form-horizontal .controls {
+            margin-left: 0;
+        }
+        .form-horizontal .control-label {
+            float: left;
+            width: 181px;
+            padding-top: 5px;
+            text-align: right;
+        }
+
+        .dateInput input {
+            width: 150px;
+        }
+
+        .clause span {
+            margin-left: 30px;
+        }
+
+        #productTable th {
+            text-align: center;
+            white-space: nowrap;
+        }
+
+        #productTable td {
+            text-align: center;
+            white-space: nowrap;
+        }
+    </style>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/order/logisticsDetails?orderID=${orderId}">发货记录</a></li>
+    <li class="active"><a href="${ctx}/order/qualificationInfo?logisticsBatchId=${logisticsBatchId}&orderId=${orderId}">商品资质</a></li>
+</ul><br/>
+<c:if test="${not empty recordList}">
+    <div style="margin-left: 75px">
+        <font style="font-size: 20px;font-weight: bold">${shopName}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${uploadTime}</font>
+        <br><br>
+        <c:forEach items="${recordList}" var="record" varStatus="status">
+            <label><font style="font-weight: bold">商品${status.index+1}:</font>${record.productName}</label><br><br>
+            <label><font style="font-weight: bold">SN码:</font>${record.sn}</label><br><br>
+            <label>
+                <font style="font-weight: bold">资质文件:</font>
+            <c:forEach items="${record.fileList}" var="file">
+                <p style="margin-left: 55px">${file.fileName}&nbsp;&nbsp;&nbsp;&nbsp;<a href="${ctx}/oss/cmOssArchive/fileDownload?ossName=${file.ossName}&fileName=${file.fileName}">下载</a></p>
+            </c:forEach>
+            </label><br><br>
+            <label><font style="font-weight: bold">图片:</font>
+            <c:forEach items="${record.imageList}" var="image">
+                    <img src="${image}" width="100" height="100">&nbsp;&nbsp;
+            </c:forEach>
+            </label><br>
+           <hr style="border:1px dashed #000">
+        </c:forEach>
+        <br><br>
+        <div style="text-align: center">
+            <input class="btn btn-primary" type="button" value="编辑" onclick="window.location.href='${ctx}/order/qualificationList?logisticsBatchId=${logisticsBatchId}'"/>
+        </div>
+    </div>
+</c:if>
+<c:if test="${empty recordList}">
+    <div style="text-align: center">
+        <font color="#00bfff">尚未添加资质信息</font><br><br>
+        <input class="btn btn-primary" type="button" value="去补充" onclick="window.location.href='${ctx}/order/qualificationList?logisticsBatchId=${logisticsBatchId}'"/>
+    </div>
+</c:if>
+</body>
+</html>
+

+ 271 - 481
src/main/webapp/WEB-INF/views/modules/order/ship.jsp

@@ -2,487 +2,49 @@
 <%@ include file="/WEB-INF/views/include/taglib.jsp" %>
 <html>
 <head>
-    <title>订单列表</title>
-    <meta name="decorator" content="default"/>
-    <%--<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>--%>
+	<title>订单列表-发货</title>
+	<meta name="decorator" content="default"/>
     <style type="text/css">
-        * {
-            margin: 0;
-            padding: 0
-        }
-
-        a {
-            list-style: none;
-            text-decoration: none
-        }
-
-        i {
-            font-style: normal
-        }
-
-        body {
-            background-color: rgb(228, 228, 228);
-        }
-
-        h3 {
-            line-height: 20px;
-            padding: 20px 0 20px 15px;
-            border-bottom: 1px solid #CCCCCC;
-            font-weight: normal
-        }
-
-        .body-margin {
-            margin: 0 26px;
-        }
-
-        .left-span {
-            width: 3px;
-            height: 20px;
-            margin-right: 10px;
-            background-color: #00A6C7;
-            display: inline-block;
-            vertical-align: bottom
-        }
-
-        .info-list {
-            background-color: #fff;
-            padding: 15px 30px;
-        }
-
-        .list-div {
-            font-size: 14px;
-            margin-bottom: 15px;
-        }
-
-        .list-div label {
-            display: inline-block;
-            width: 70px;
-        }
-
-        .ship-shop {
-            background-color: #fff;
-            margin-top: 20px;
-            min-height: 500px;
-        }
-
-        .table {
-            width: 100%;
-            border-collapse: collapse;
-        }
-
-        .table th {
-            color: #000;
-            font-weight: normal
-        }
-
-        .table th, .table td {
-            width: 20%;
-            height: 35px;
-            border: 1px solid #CCCCCC;
-            text-align: center;
-            padding: 5px 0;
-        }
-
-        .select-all {
-        }
-
-        .select-all td {
-            border: 0
-        }
-
-        .select-all label {
-            display: inline-block;
-            padding-left: 5px;
-            vertical-align: 1px;
-        }
-
-        .mask {
-            font-size: 14px;
-            color: red;
-            padding: 20px;
-        }
-
-        .select-ship {
-            text-align: center;
-        }
-
-        .select-ship span {
-            cursor: pointer;
-            display: inline-block;
-            width: 100px;
-            line-height: 35px;
-            text-align: center;
-            border-radius: 5px;
-            background-color: #00A6C7;
-            color: #fff;
-        }
-
-        .select-ship span:last-child {
-            margin-left: 20px;
-        }
-
-        .change-info {
-            position: fixed;
-            top: 20%;
-            left: 50%;
-            transform: translateX(-50%);
-            z-index: 999;
-            padding: 50px;
-            background-color: #fff;
-            box-shadow: 0px 0px 15px #ccc;
-        }
-
-        .close {
-            position: absolute;
-            right: -12px;
-            top: -12px;
-            cursor: pointer;
-            display: block;
-            background-color: #fff;
-            text-align: center;
-            font-size: 18px;
-            border: 1px solid #ccc;
-            width: 25px;
-            height: 25px;
-            border-radius: 50%;
-        }
-
-        .bj {
-            position: fixed;
-            width: 100%;
-            height: 100%;
-            bottom: 0;
-            top: 0;
-            left: 0;
-            z-index: 99;
-        }
-
-        .spilt {
-            text-align: center;
-            padding: 40px 130px 40px;
-        }
-
-        .orderspilt {
-            padding: 0;
-            text-align: center;
-            border: 0;
-        }
-
-        .spilt-p {
-            font-size: 14px;
-            padding: 30px 0 20px;
-        }
-
-        .cancel-div {
-            display: inline-block;
-            padding: 7px 15px;
-            border-radius: 5px;
-            background-color: #00A6C7;
-            color: #fff;
-            text-align: center
-        }
-        .no-div{
-            display: inline-block;
-            padding: 7px 15px;
-            border-radius: 5px;
-            background-color: #00A6C7;
-            color: #fff;
-            text-align: center;
-            margin-right:20px
-        }
-        .whether-ship {
-            position: fixed;
-            top: 20%;
-            left: 50%;
-            transform: translateX(-50%);
-            z-index: 999;
-            padding: 20px;
-            background-color: #fff;
-            box-shadow: 0px 0px 15px #ccc;
-        }
-
-        .ship-title {
-            font-size: 16px;
-            border: 0;
-            padding: 20px 0 15px 0;
-        }
-
-        .waring-p {
-            font-size: 14px;
-        }
-
-        .sign-logo {
-            display: inline-block;
-            width: 20px;
-            height: 20px;
-            border: 1px solid #000000;
-            border-radius: 50%;
-            text-align: center;
-            margin-right: 3px;
-        }
-
-        .status-span {
-            text-align: center;
-            margin: 15px 0;
-            float: none;
-        }
-
-        .status-span span {
-            display: inline-block;
-            background-color: #00A6C7;
-            padding: 7px 20px;
-            color: #fff;
-            cursor: pointer
-        }
-
-        .status-span span:nth-child(1) {
-            margin-right: 10px;
-        }
-
-        .status-span span:nth-child(2) {
-            margin-left: 10px;
-        }
-
-        .input {
-            height: 100%;
-            border: 0
-        }
+        *{margin:0;padding:0}
+        a{list-style:none;text-decoration:none}
+        body{background-color:rgb(255,255,255)}
+        h3{line-height:20px;padding:20px 0 20px 15px;border-bottom:1px solid #CCCCCC}
+        .table th{background-color:#CCCCCC}
+        .table th,.table td{font-weight:normal;border:1px solid #CCCCCC;height:35px;text-align:center}
+        .body-margin{margin:26px}
+        .left-span{width:3px;height:20px;margin-right:10px;background-color:#00A6C7;display:inline-block;vertical-align:bottom}
+        .info-list{padding: 15px;background-color: #f5f5f5;}
+        .list-div{font-size:14px;margin-bottom:15px}
+        .list-div label{display:inline-block;width:70px}
+        .ship-shop{background-color:#fff;margin-top:20px;min-height:500px}
+        .mask{font-size:14px;color:red;padding:20px}
+        .select-ship{text-align:center}
+        .select-ship span{cursor:pointer;display:inline-block;width:100px;line-height:35px;text-align:center;border-radius:5px;background-color:#00A6C7;color:#fff}
+        .select-ship span:last-child{margin-left:20px}
+        .change-info{position:fixed;top:20%;left:50%;transform:translateX(-50%);z-index:999;padding:50px;background-color:#fff;box-shadow:0px 0px 15px #ccc}
+        .close{position:absolute;right:-12px;top:-12px;cursor:pointer;display:block;background-color:#fff;text-align:center;font-size:18px;border:1px solid #ccc;width:25px;height:25px;border-radius:50%}
+        .bj{position:fixed;width:100%;height:100%;bottom:0;top:0;left:0;z-index:99}
+        .spilt{text-align:center;padding:40px 130px 40px}
+        .orderspilt{padding:0;text-align:center;border:0}
+        .spilt-p{font-size:14px;padding:30px 0 20px}
+        .cancel-div{display:inline-block;padding:7px 15px;border-radius:5px;background-color:#00A6C7;color:#fff;text-align:center}
+        .no-div{display:inline-block;padding:7px 15px;border-radius:5px;background-color:#00A6C7;color:#fff;text-align:center;margin-right:20px}
+        .whether-ship{position:fixed;top:20%;left:50%;transform:translateX(-50%);z-index:999;padding:20px;background-color:#fff;box-shadow:0px 0px 15px #ccc}
+        .ship-title{font-size:16px;border:0;padding:20px 0 15px 0}
+        .waring-p{font-size:14px}
+        .sign-logo{display:inline-block;width:20px;height:20px;border:1px solid #000000;border-radius:50%;text-align:center;margin-right:3px}
+        .status-span{text-align:center;margin:15px 0;float:none}
+        .status-span span{display:inline-block;background-color:#00A6C7;padding:7px 20px;color:#fff;cursor:pointer}
+        .status-span span:nth-child(1){margin-right:10px}
+        .status-span span:nth-child(2){margin-left:10px}
+        .input{height:100%;border:0}
     </style>
-    <script type="text/javascript">
-        var clickTime = 1;//防止多次发货请求
-        window.onload = function () {
-            var params = {};
-            var all_ = document.getElementById('all');//全选
-            var checked_ = document.getElementsByName('checked');//复选框
-            var shipbtn_ = document.getElementsByClassName('ship_btn');//发货按钮
-            var close_ = document.getElementsByClassName('close');//关闭按钮
-            var splitbtn_ = document.getElementsByClassName('split-btn')//拆分订单
-            var statusout_ = document.getElementsByClassName('status-out')//关闭
-            var input_ = document.getElementsByClassName('input')//数量输入框
-            var nodiv_ = document.getElementsByClassName('no-div');//取消按钮 拆分
-
-            nodiv_[0].onclick = function () {
-                closeThe(this)
-            };
-            for (var i = 0; i < input_.length; i++) {
-                input_[i].onchange = function () {
-                    var intval = this.value;
-                    var buynum = this.parentNode.parentNode.getElementsByClassName('buy-num');//购买数量
-                    if (parseInt(intval) > parseInt(buynum[1].innerHTML)) {
-                        document.getElementsByClassName('bj')[0].style.cssText = 'display:block';
-                        document.getElementsByClassName('two-info')[0].style.cssText = 'display:block';
-                        // document.getElementsByClassName('two-info')[0].innerTEXT = '请输入小于等于购买数量';
-                        setTimeout(function () {
-                            document.getElementsByClassName('bj')[0].style.cssText = 'display:none';
-                            document.getElementsByClassName('two-info')[0].style.cssText = 'display:none';
-                        }, 1000);
-                        this.value = 0
-                    }
-                    return false;
-                }
-            };
-            $('.ship_btn').on('click', function () {
-                var statusShip = '';
-                var shopOrderID = $("input[name='shopOrderID']").val();//id
-                var _checked = $('.table').find('input[name=checked]');//复选框
-                var ck = flagcheckd();//判断商品是否选中
-                var weinum = this.parentNode.parentNode.getElementsByClassName('wei-num');//未发数量
-
-                var checked_ = document.getElementsByName('checked');//复选框
-                var flag = false;//标记判断是否选中一个
-                for (var i = 0; i < checked_.length; i++) {
-                    var intval = checked_[i].parentNode.parentNode.getElementsByClassName('fahuo')[0].value;//发货数量
-                    var buynum = checked_[i].parentNode.parentNode.getElementsByClassName('buy-num');//购买数量
-                    if (checked_[i].checked) {
-                        flag = true;
-                        if (parseInt(intval) > parseInt(buynum[1].innerHTML) && parseInt(intval) != 0) {
-                            document.getElementsByClassName('bj')[0].style.cssText = 'display:block';
-                            document.getElementsByClassName('two-info')[0].style.cssText = 'display:block';
-                            setTimeout(function () {
-                                document.getElementsByClassName('bj')[0].style.cssText = 'display:none';
-                                document.getElementsByClassName('two-info')[0].style.cssText = 'display:none';
-                            }, 1000);
-                        }else if(parseInt(intval) < parseInt(buynum[1].innerHTML) && parseInt(intval) != 0){
-                            document.getElementsByClassName('bj')[0].style.cssText = 'display:block';
-                            document.getElementsByClassName('whether-ship')[0].style.cssText = 'display:block';
-                            var parent_ = checked_[i].parentNode.parentNode.getElementsByClassName('input')[0];
-                            var key_ = parent_.getAttribute('data-key');
-                            var val_ = parent_.value;
-                            params[key_] = val_;
-                            statusShip = 1;
-                            // return false
-                        }else if(parseInt(intval) == parseInt(buynum[1].innerHTML) && parseInt(intval) != 0){
-                            console.log(checked_[i].parentNode.parentNode.getElementsByClassName('input')[0])
-                            var parent_ = checked_[i].parentNode.parentNode.getElementsByClassName('input')[0];
-                            var key_ = parent_.getAttribute('data-key');
-                            var val_ = parent_.value;
-                            params[key_] = val_;
-                        }else if(parseInt(intval) != 0){
-                            document.getElementsByClassName('bj')[0].style.cssText = 'display:block';
-                            document.getElementsByClassName('whether-ship')[0].style.cssText = 'display:block';
-                        }else {
-                            alertx("发货数量不能为0");
-                            return false
-                        }
-                    }
-                }
-
-
-                if (!flag) {
-                    return false;
-                }else {
-                    if(statusShip == 1){
-
-                    }else {
-                        //循环复选框
-                        goship(params);
-                    }
-                }
-                return false
-            });
-            document.getElementById('ship-go').onclick = function () {
-                goship(params);
-            }
-            //全选
-            all_.onclick = function () {
-                if (this.classList.contains('active')) {
-                    for (var i = 0; i < checked_.length; i++) {
-                        checked_[i].checked = false;
-                        all_.classList.remove("active");
-                    }
-                } else {
-                    for (var i = 0; i < checked_.length; i++) {
-                        checked_[i].checked = true;
-                        all_.classList.add("active");
-                    }
-                }
-
-            };
-
-            //关闭按钮
-            for (var i = 0; i < close_.length; i++) {
-                close_[i].onclick = function () {
-                    closeThe(this);
-                }
-            }
-            //关闭
-            statusout_[0].onclick = function () {
-
-                document.getElementsByClassName('bj')[0].style.cssText = 'display:none';
-                document.getElementsByClassName('whether-ship')[0].style.cssText = 'display:none';
-            }
-
-            //订单拆分
-            $('.cancel-div').on('click', function () {
-                $.ajax({
-                    //几个参数需要注意一下
-                    type: "POST",//方法类型
-                    dataType: "json",//预期服务器返回的数据类型
-                    url: "${ctx}/order/splitOrder" ,//url
-                    data: JSON.stringify(shoplist),
-                    contentType : 'application/json;charset=UTF-8', //contentType很重要
-                    success: function (result) {
-                        console.log(result);//打印服务端返回的数据(调试用)
-                        if (result.success) {
-                            window.location.href="${ctx}/order/detailPage?shopOrderID=" + result.shopOrderID;
-                        } else {
-                            alert(result.msg);
-                        }
-                    },
-                    error : function() {
-                        alert("服务异常!");
-                    }
-                });
-            });
-
-            var shoplist = {};
-            if(splitbtn_[0]){
-                splitbtn_[0].onclick = function () {
-                    var checked_ = document.getElementsByName('checked');//复选框
-                    var flag = false;//标记判断是否选中一个
-                    for (var i = 0; i < checked_.length; i++) {
-                        if (checked_[i].checked) {
-                            flag = true;
-                            for (var j = 0; j < input_.length; j++) {
-                                if(input_[i].value == 0){
-                                    alertx('数量不能为0');
-                                    return false
-                                }
-                                shoplist['orderProductID_'+input_[i].getAttribute('data-key')] = input_[i].value;
-                            }
-                            var shopOrderID = document.getElementsByName('shopOrderID')[0].value;
-                            shoplist['shopOrderID'] = shopOrderID;
-                            document.getElementsByClassName('bj')[0].style.cssText = 'display:block';
-                            document.getElementsByClassName('spilt')[0].style.cssText = 'display:block';
-                        }
-                    }
-                    if (!flag) {
-                        document.getElementsByClassName('bj')[0].style.cssText = 'display:block';
-                        document.getElementsByClassName('change-info')[0].style.cssText = 'display:block';
-                        return false;
-                    } else {
-                        // return true
-                    }
-
-                    // if (ck) {
-                    //
-                    //
-                    // }
-                    console.log(shoplist)
-
-                };
-            }
-
-        };
-        //关闭
-        function closeThe(that) {
-            document.getElementsByClassName('bj')[0].style.cssText = 'display:none';
-            that.parentNode.style.cssText = 'display:none';
-        }
-        //判断商品是否选中
-        function flagcheckd() {
-            var checked_ = document.getElementsByName('checked');//复选框
-            var flag = false;//标记判断是否选中一个
-            for (var i = 0; i < checked_.length; i++) {
-                if (checked_[i].checked) {
-                    flag = true;
-                    break;
-                }
-            }
-            if (!flag) {
-                document.getElementsByClassName('bj')[0].style.cssText = 'display:block';
-                document.getElementsByClassName('change-info')[0].style.cssText = 'display:block';
-                return false;
-            } else {
-                return true
-            }
-
-        }
-        //发货接口
-        function goship(params) {
-            console.log("fahuole");
-            if (clickTime == 1) {
-                clickTime = 2;
-            } else {
-                alertx('请勿重复点击');
-            }
-            $.ajax({
-                url: "${ctx}/order/addLogisticsInfo",
-                type: "POST",
-                dataType: "json",
-                contentType: "application/json",
-                data: JSON.stringify(params),
-                success: function (res) {
-                    localStorage.setItem('jsonstring',JSON.stringify(res.data));
-                    window.location.href = '${ctx}/order/toShipLogistic?orderID=${order.orderID}'
-                }
-            });
-        }
-
-
-    </script>
 </head>
 <body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/order/orderList">订单列表</a></li>
+    <li class="active"><a href="${ctx}/order/toDeliveryPage?id=${order.orderID}">发货</a></li>
+</ul>
 <div class="bj" style="display: none"></div>
 <%--未选择商品--%>
 <div class="change-info" style="display: none">请至少选择一个商品<span class="close">x</span></div>
@@ -506,7 +68,6 @@
     <span class="close">x</span>
 </div>
 <div class="body-margin">
-    <h3><span class="left-span"></span>订单列表--发货</h3>
     <div class="info-list">
         <div class="list-div">
             <label>收货人:</label>
@@ -527,10 +88,8 @@
     </div>
     <div class="ship-shop">
         <form id="shipForm" method="post">
+        <div class="select-all"><input id="all" type="checkbox"><label for="all">全选</label></div>
         <table class="table">
-            <tr class="select-all">
-                <td><input id="all" type="checkbox"><label for="all">全选</label></td>
-            </tr>
             <tr>
                 <th>选择发货商品</th>
                 <th>商品ID</th>
@@ -580,5 +139,236 @@
         </form>
     </div>
 </div>
+<script type="text/javascript">
+    var clickTime = 1;//防止多次发货请求
+    window.onload = function () {
+        var params = {};
+        var all_ = document.getElementById('all');//全选
+        var checked_ = document.getElementsByName('checked');//复选框
+        var shipbtn_ = document.getElementsByClassName('ship_btn');//发货按钮
+        var close_ = document.getElementsByClassName('close');//关闭按钮
+        var splitbtn_ = document.getElementsByClassName('split-btn')//拆分订单
+        var statusout_ = document.getElementsByClassName('status-out')//关闭
+        var input_ = document.getElementsByClassName('input')//数量输入框
+        var nodiv_ = document.getElementsByClassName('no-div');//取消按钮 拆分
+
+        nodiv_[0].onclick = function () {
+            closeThe(this)
+        };
+        for (var i = 0; i < input_.length; i++) {
+            input_[i].onchange = function () {
+                var intval = this.value;
+                var buynum = this.parentNode.parentNode.getElementsByClassName('buy-num');//购买数量
+                if (parseInt(intval) > parseInt(buynum[1].innerHTML)) {
+                    document.getElementsByClassName('bj')[0].style.cssText = 'display:block';
+                    document.getElementsByClassName('two-info')[0].style.cssText = 'display:block';
+                    // document.getElementsByClassName('two-info')[0].innerTEXT = '请输入小于等于购买数量';
+                    setTimeout(function () {
+                        document.getElementsByClassName('bj')[0].style.cssText = 'display:none';
+                        document.getElementsByClassName('two-info')[0].style.cssText = 'display:none';
+                    }, 1000);
+                    this.value = 0
+                }
+                return false;
+            }
+        };
+        $('.ship_btn').on('click', function () {
+            var statusShip = '';
+            var shopOrderID = $("input[name='shopOrderID']").val();//id
+            var _checked = $('.table').find('input[name=checked]');//复选框
+            var ck = flagcheckd();//判断商品是否选中
+            var weinum = this.parentNode.parentNode.getElementsByClassName('wei-num');//未发数量
+
+            var checked_ = document.getElementsByName('checked');//复选框
+            var flag = false;//标记判断是否选中一个
+            for (var i = 0; i < checked_.length; i++) {
+                var intval = checked_[i].parentNode.parentNode.getElementsByClassName('fahuo')[0].value;//发货数量
+                var buynum = checked_[i].parentNode.parentNode.getElementsByClassName('buy-num');//购买数量
+                if (checked_[i].checked) {
+                    flag = true;
+                    if (parseInt(intval) > parseInt(buynum[1].innerHTML) && parseInt(intval) != 0) {
+                        document.getElementsByClassName('bj')[0].style.cssText = 'display:block';
+                        document.getElementsByClassName('two-info')[0].style.cssText = 'display:block';
+                        setTimeout(function () {
+                            document.getElementsByClassName('bj')[0].style.cssText = 'display:none';
+                            document.getElementsByClassName('two-info')[0].style.cssText = 'display:none';
+                        }, 1000);
+                    }else if(parseInt(intval) < parseInt(buynum[1].innerHTML) && parseInt(intval) != 0){
+                        document.getElementsByClassName('bj')[0].style.cssText = 'display:block';
+                        document.getElementsByClassName('whether-ship')[0].style.cssText = 'display:block';
+                        var parent_ = checked_[i].parentNode.parentNode.getElementsByClassName('input')[0];
+                        var key_ = parent_.getAttribute('data-key');
+                        var val_ = parent_.value;
+                        params[key_] = val_;
+                        statusShip = 1;
+                        // return false
+                    }else if(parseInt(intval) == parseInt(buynum[1].innerHTML) && parseInt(intval) != 0){
+                        console.log(checked_[i].parentNode.parentNode.getElementsByClassName('input')[0])
+                        var parent_ = checked_[i].parentNode.parentNode.getElementsByClassName('input')[0];
+                        var key_ = parent_.getAttribute('data-key');
+                        var val_ = parent_.value;
+                        params[key_] = val_;
+                    }else if(parseInt(intval) != 0){
+                        document.getElementsByClassName('bj')[0].style.cssText = 'display:block';
+                        document.getElementsByClassName('whether-ship')[0].style.cssText = 'display:block';
+                    }else {
+                        alertx("发货数量不能为0");
+                        return false
+                    }
+                }
+            }
+
+
+            if (!flag) {
+                return false;
+            }else {
+                if(statusShip == 1){
+
+                }else {
+                    //循环复选框
+                    goship(params);
+                }
+            }
+            return false
+        });
+        document.getElementById('ship-go').onclick = function () {
+            goship(params);
+        }
+        //全选
+        all_.onclick = function () {
+            if (this.classList.contains('active')) {
+                for (var i = 0; i < checked_.length; i++) {
+                    checked_[i].checked = false;
+                    all_.classList.remove("active");
+                }
+            } else {
+                for (var i = 0; i < checked_.length; i++) {
+                    checked_[i].checked = true;
+                    all_.classList.add("active");
+                }
+            }
+
+        };
+
+        //关闭按钮
+        for (var i = 0; i < close_.length; i++) {
+            close_[i].onclick = function () {
+                closeThe(this);
+            }
+        }
+        //关闭
+        statusout_[0].onclick = function () {
+
+            document.getElementsByClassName('bj')[0].style.cssText = 'display:none';
+            document.getElementsByClassName('whether-ship')[0].style.cssText = 'display:none';
+        }
+
+        //订单拆分
+        $('.cancel-div').on('click', function () {
+            $.ajax({
+                //几个参数需要注意一下
+                type: "POST",//方法类型
+                dataType: "json",//预期服务器返回的数据类型
+                url: "${ctx}/order/splitOrder" ,//url
+                data: JSON.stringify(shoplist),
+                contentType : 'application/json;charset=UTF-8', //contentType很重要
+                success: function (result) {
+                    console.log(result);//打印服务端返回的数据(调试用)
+                    if (result.success) {
+                        window.location.href="${ctx}/order/detailPage?shopOrderID=" + result.shopOrderID;
+                    } else {
+                        alert(result.msg);
+                    }
+                },
+                error : function() {
+                    alert("服务异常!");
+                }
+            });
+        });
+
+        var shoplist = {};
+        if(splitbtn_[0]){
+            splitbtn_[0].onclick = function () {
+                var checked_ = document.getElementsByName('checked');//复选框
+                var flag = false;//标记判断是否选中一个
+                for (var i = 0; i < checked_.length; i++) {
+                    if (checked_[i].checked) {
+                        flag = true;
+                        for (var j = 0; j < input_.length; j++) {
+                            if(input_[i].value == 0){
+                                alertx('数量不能为0');
+                                return false
+                            }
+                            shoplist['orderProductID_'+input_[i].getAttribute('data-key')] = input_[i].value;
+                        }
+                        var shopOrderID = document.getElementsByName('shopOrderID')[0].value;
+                        shoplist['shopOrderID'] = shopOrderID;
+                        document.getElementsByClassName('bj')[0].style.cssText = 'display:block';
+                        document.getElementsByClassName('spilt')[0].style.cssText = 'display:block';
+                    }
+                }
+                if (!flag) {
+                    document.getElementsByClassName('bj')[0].style.cssText = 'display:block';
+                    document.getElementsByClassName('change-info')[0].style.cssText = 'display:block';
+                    return false;
+                } else {
+                    // return true
+                }
+
+                // if (ck) {
+                //
+                //
+                // }
+                console.log(shoplist)
+
+            };
+        }
+
+    };
+    //关闭
+    function closeThe(that) {
+        document.getElementsByClassName('bj')[0].style.cssText = 'display:none';
+        that.parentNode.style.cssText = 'display:none';
+    }
+    //判断商品是否选中
+    function flagcheckd() {
+        var checked_ = document.getElementsByName('checked');//复选框
+        var flag = false;//标记判断是否选中一个
+        for (var i = 0; i < checked_.length; i++) {
+            if (checked_[i].checked) {
+                flag = true;
+                break;
+            }
+        }
+        if (!flag) {
+            document.getElementsByClassName('bj')[0].style.cssText = 'display:block';
+            document.getElementsByClassName('change-info')[0].style.cssText = 'display:block';
+            return false;
+        } else {
+            return true
+        }
+
+    }
+    //发货接口
+    function goship(params) {
+        console.log("fahuole");
+        if (clickTime == 1) {
+            clickTime = 2;
+        } else {
+            alertx('请勿重复点击');
+        }
+        $.ajax({
+            url: "${ctx}/order/addLogisticsInfo",
+            type: "POST",
+            dataType: "json",
+            contentType: "application/json",
+            data: JSON.stringify(params),
+            success: function (res) {
+                localStorage.setItem('jsonstring',JSON.stringify(res.data));
+                window.location.href = '${ctx}/order/toShipLogistic?orderID=${order.orderID}'
+            }
+        });
+    }
+</script>
 </body>
 </html>

+ 281 - 308
src/main/webapp/WEB-INF/views/modules/order/shipLogistic.jsp

@@ -2,30 +2,28 @@
 <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
 <html>
 <head>
-    <title>订单列表</title>
+    <title>订单列表-添加物流</title>
     <meta name="decorator" content="default"/>
-    <%--<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>--%>
     <style type="text/css">
         *{margin: 0;padding: 0}
         a{list-style: none;text-decoration: none}
         i{font-style: normal}
         body{background-color: rgb(255,255,255);}
         h3{line-height: 20px;padding:20px 0 20px 15px; border-bottom: 1px solid #CCCCCC;font-weight: normal}
-        .body-margin{margin:0 26px;}
+        .body-margin{margin:26px}
         .left-span{width: 3px;height: 20px;margin-right:10px;background-color: #00A6C7;display: inline-block;vertical-align: bottom}
         .bj{position: fixed;width: 100%;height: 100%;bottom: 0;top:0;left: 0;z-index: 99;}
-        .shop-info{}
+        .delivery-info{padding: 15px;background-color: #f5f5f5;}
         .shop-title{ color: #000;border-bottom: 1px solid #ccc;padding: 20px;margin-bottom: 20px;}
         .table{width: 100%;border-collapse: collapse;}
         .table th{color: #000;font-weight: normal}
         .table th,.table td{width: 25%;height: 35px;border: 1px solid #CCCCCC;text-align: center;padding: 5px 0;}
         .table td img{width: 60px;height: 60px;vertical-align: middle}
         .express-delivery{font-size: 14px;}
-        .express-div{padding: 20px;}
+        .express-div{padding:10px 0;}
         .express-div label{width: 100px;line-height: 35px;display: inline-block;vertical-align: middle}
         .select-btn{display: inline-block;}
         .select-btn input{width: 210px;height: 35px; vertical-align: top;box-sizing: border-box !important;}
-        /*.select-btn .span_jia{display: inline-block;float: none;margin-left: 0; width: 35px;height: 35px;line-height: 33px; box-sizing: border-box; vertical-align: top; border: 1px solid #ccc;cursor: pointer; text-align: center;font-size: 24px;border-radius: 4px;}*/
         .the-span{display: inline-block;float: none;margin-left: 0; width: 35px;height: 35px;line-height: 33px; box-sizing: border-box; vertical-align: top; border: 1px solid #ccc;cursor: pointer; text-align: center;font-size: 24px;border-radius: 4px;}
         input::-webkit-input-placeholder {text-align: center}
         .mask{padding:20px 20px 20px 120px;font-size: 14px;position:relative;}
@@ -45,7 +43,6 @@
         .change-info{position: fixed;top: 20%;left: 50%;transform:translateX(-50%);z-index: 999;padding: 50px;background-color: #fff;box-shadow: 0px 0px 15px #ccc;}
         .mar-css{margin-left: 5px !important;}
         .controls{font-size:0}
-        .select2-choice{width:100px}
         .upload-content{position:relative;}
         .upload-content *{margin:0;padding:0;}
         .upload-content .conList{display:inline-block;margin-right:5px;width:90px;height:90px;background:#e6e6e6;border-radius:5px;position:relative;overflow:hidden}
@@ -58,216 +55,18 @@
         .hide-pic{display:none !important}
         .upload-tips{margin:10px 0}
     </style>
-    <script type="text/javascript">
-        var op_html = "";
-        window.onload = function () {
-            var spanjia_ = document.getElementsByClassName('span_jia');
-            var express_ = document.getElementsByClassName('express-delivery');
-            var danjia_ = document.getElementsByClassName('dan_jia');
-            var shipnum_ = document.getElementsByClassName('ship-num');
-            var input_ = document.getElementsByClassName('input')//数量输入框
-            var confirm_ = document.getElementsByClassName('confirm');//确定按钮
-            var expressDelivery_ = document.getElementsByClassName('express-delivery');//循环物流
-            var masktext_ = document.getElementsByClassName('mask-text');//备注
-            var singlenum_= document.getElementsByClassName('single-num');//新建输入框判断
-            var obj = {};
-            // var valuearr = {};
-            var expressval = document.getElementsByTagName('select');//物流快递
-            var index = expressval[0].selectedIndex ;//索引值
-            var value = expressval[0].options[index].value;
-            var arr = [];
-            for(var i=0;i<expressval[0].options.length;i++){
-                var valuearr = {};
-                valuearr['name'] = expressval[0].options[i].text;
-                valuearr['value'] = expressval[0].options[i].value;
-                arr.push(valuearr);
-            }
-            //新建输入框判断
-
-            for(var i=0;i<singlenum_.length;i++){
-
-            }
-            //输入框判断
-            for(var i=0;i<input_.length;i++){
-                input_[i].onchange = function () {
-                    var intval = this.value;
-                    var buynum = this.parentNode.parentNode.getElementsByClassName('buy-num');//购买数量
-                    var sent_ = this.parentNode.parentNode.getElementsByClassName('sent');//已发数量
-                    if(parseInt(intval)+parseInt(sent_[0].innerHTML) >=parseInt(buynum[0].innerHTML)){
-                        document.getElementsByClassName('bj')[0].style.cssText = 'display:block';
-                        document.getElementsByClassName('change-info')[0].style.cssText = 'display:block';
-                        setTimeout(function () {
-                            document.getElementsByClassName('bj')[0].style.cssText = 'display:none';
-                            document.getElementsByClassName('change-info')[0].style.cssText = 'display:none';
-                        },1000);
-                        this.value = 0
-                    }
-                }
-            }
-            //物流加减
-            for(var i=0;i<spanjia_.length;i++){
-                spanjia_[i].onclick =function () {
-
-                    var html=''
-                    html+='<div class="express-delivery border-express">';
-                    html+='<div class="express-div">';
-                    html+='<label><i>*</i>快递公司</label>';
-                    html+='<div class="select-btn">';
-                    html+='<select class="express-input required input-xlarge">';
-                    for(var i=0;i<arr.length;i++){
-                        html+='<option value="'+arr[i].value+'">'+arr[i].name;
-                        html+='</option>';
-                    }
-                    html+='</select>';
-                    html+='<span onclick="jian(this)" class="span_jian mar-css the-span">-</span>';
-                    html+='</div>';
-                    html+='</div>';
-                    html+='<div class="express-div">';
-                    html+='<label><i>*</i>物流编号</label>';
-                    html+='<div class="select-btn">';
-                    html+='<input class="single-num" type="text" placeholder="请输入单号">';
-                    html+='<span onclick="danjia(this)" class="dan_jia mar-css the-span">+</span>';
-                    html+='</div>';
-                    html+='</div>';
-                    html+='</div>';
-
-                    express_[0].insertAdjacentHTML('afterend', html);
-                }
-            }
-
-            //物流单号
-            for(var i=0;i<spanjia_.length;i++){
-                danjia_[i].onclick =function () {
-                    danjia(this)
-                }
-            }
-            //列表信息展示
-            var resdata = JSON.parse(localStorage.getItem('jsonstring'));
-            console.log(resdata)
-            var html = '';
-            for(var i=0;i<resdata.length;i++){
-                html+='<tr>';
-                html+='<td>'+resdata[i].shopName+'</td>'
-                html+='<td>';
-                html+='<img src="'+resdata[i].image+'">';
-                html+='</td>';
-                html+='<td>';
-                html+=resdata[i].name;
-                html+='</td>';
-                html+='<td class="buy-num">';
-                html+=resdata[i].num;
-                html+='</td>';
-                html+='<td>';
-                html+=resdata[i].presentNum;
-                html+='</td>';
-                html+='<td class="sent">';
-                html+=resdata[i].num + resdata[i].presentNum - resdata[i].notOutStore;
-                html+='</td>';
-                html+='<td>';
-                html+='<span data-id='+resdata[i].orderProductID+' data-type='+resdata[i].shopOrderID+' class="input">';
-                html+=''+resdata[i].deliveryNum+'';
-                html+='</span>';
-                html+='</td>';
-                html+='</tr>';
-
-                obj['orderProductID_'+resdata[i].orderProductID+''] = resdata[i].deliveryNum;
-                obj['shopOrderID'] = resdata[i].shopOrderID;
-
-            }
-            $('.table').append(html);
-            //确认点击获取物流以及物流单号
-            confirm_[0].onclick = function () {
-                var _masktext = masktext_[0].value;
-                obj['remarks'] = _masktext;
-                for(var i=0;i<expressDelivery_.length;i++){
-                    var expressval = expressDelivery_[i].getElementsByTagName('select');//物流快递
-                    if(!expressval[0].value){
-                        $.jBox.info('请选择物流快递!');
-                        return false;
-                    }
-                    var index = expressval[0].selectedIndex ;//索引值
-                    var singlenum_ = expressDelivery_[i].getElementsByClassName('single-num');//物流单号
-                    console.log(expressval[0].value + singlenum_[0].value);
-                    var list_ = '';
-                    for(var j=0;j<singlenum_.length;j++){
-                        if(!singlenum_[j].value){
-                            $.jBox.info('请填写物流单号!');
-                            return false;
-                        }
-                         list_+= singlenum_[j].value+'_';
-                         obj['logisticsInfo_'+expressval[0].options[index].value+''] = list_.substring(0,list_.length - 1);
-                    }
-                }
-                var imgArr = [];
-                if($('#image1').val()){ imgArr.push($('#image1').val()); }
-                if($('#image2').val()){ imgArr.push($('#image2').val()); }
-                if($('#image3').val()){ imgArr.push($('#image3').val()); }
-                if($('#image4').val()){ imgArr.push($('#image4').val()); }
-                if($('#image5').val()){ imgArr.push($('#image5').val()); }
-                if($('#image6').val()){ imgArr.push($('#image6').val()); }
-                if($('#image7').val()){ imgArr.push($('#image7').val()); }
-                if($('#image8').val()){ imgArr.push($('#image8').val()); }
-                if($('#image9').val()){ imgArr.push($('#image9').val()); }
-                if($('#image10').val()){ imgArr.push($('#image10').val()); }
-                obj['remarkImages'] = imgArr.join("##");
-                console.log(obj);
-                $.ajax({
-                    url : "${ctx}/order/delivery",
-                    contentType:'application/json',
-                    data : JSON.stringify(obj),
-                    type : 'post',
-                    success : function(data){
-                        if (data.success) {
-                            window.location.href = "${ctx}/order/logisticsDetails?orderID=${orderID}";
-                        } else {
-                            alert(data.msg);
-                        }
-                    },
-                    error : function(){
-                        alert("服务器内部错误");
-                    }
-                })
-            }
-
-        };
-        //物流单号
-        function danjia(that) {
-            if(that.parentNode.getElementsByClassName('single-num')[0].value ==''){return}
-            var html=''
-            html+='<div class="express-div">';
-            html+='<label><i>*</i>物流编号</label>';
-            html+='<div class="select-btn">';
-            html+='<input class="single-num" type="text" placeholder="请输入单号">';
-            html+='<span onclick="shipjian(this)" class="span_jian mar-css the-span">-</span>';
-            html+='</div>';
-            html+='</div>';
-            that.parentNode.parentNode.insertAdjacentHTML('afterend', html);
-        }
-        //减物流
-        function jian(that) {
-            var that_ = that.parentNode.parentNode.parentNode;
-            that.parentNode.parentNode.parentNode.parentNode.removeChild(that_);
-
-        }
-        //减单号
-        function shipjian(that) {
-            var that_ = that.parentNode.parentNode;
-            that.parentNode.parentNode.parentNode.removeChild(that_);
-        }
-        //判断输入框不能为空
-        function input(that) {
-            if(that.parentNode.getElementsByClassName('single-num')[0].value == ''){return}
-        }
-
-    </script>
 </head>
 <body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/order/orderList">订单列表</a></li>
+    <li><a href="${ctx}/order/toDeliveryPage?id=${orderID}">发货</a></li>
+    <li class="active"><a href="${ctx}/order/toShipLogistic?orderID=${orderID}">添加物流</a></li>
+</ul>
+
 <div class="change-info" style="display: none">发货数量大于总数量</div>
 <div class="bj" style="display: none"></div>
 <div class="body-margin">
-    <h3><span class="left-span"></span>订单列表--添加物流</h3>
     <div class="shop-info">
-        <div class="shop-title">商品信息</div>
         <table class="table">
             <tr class="first-tr">
                 <th>供应商</th>
@@ -278,114 +77,288 @@
                 <th>已发数量</th>
                 <th>本次发货</th>
             </tr>
-            <%--<c:forEach items="${orderProductList}" var="orderProduct">--%>
-                <%--<tr class="first-tr">--%>
-                    <%--<td><img src="${orderProduct.image}"> </td>--%>
-                    <%--<td>${orderProduct.name} </td>--%>
-                    <%--<td class="buy-num">${orderProduct.num + orderProduct.presentNum}</td>--%>
-                    <%--<td class="sent">${orderProduct.num + orderProduct.presentNum - orderProduct.notOutStore}</td>--%>
-                    <%--<td><input oninput="this.value=this.value.replace(/\D/g,'').replace(/^0+(?=\d)/,1)" class="input" value="${orderProduct.deliveryNum}" type="text"/></td>--%>
-                <%--</tr>--%>
-            <%--</c:forEach>--%>
         </table>
     </div>
-    <%--已有物流信息--%>
-    <%--<div class="logistic-already">--%>
-        <%--<h3>已有物流信息</h3>--%>
-        <%--<div class="have-logistic">--%>
-            <%--<div class="logistic-item">--%>
-                <%--<div><label>快递公司:</label><span>顺丰快递</span></div>--%>
-                <%--<div><label>快递单号:</label><span>1213212555</span></div>--%>
-            <%--</div>--%>
-            <%--<div class="logistic-item">--%>
-                <%--<div><label>快递公司:</label><span>顺丰快递</span></div>--%>
-                <%--<div><label>快递单号:</label><span>1213212555</span></div>--%>
-            <%--</div>--%>
-        <%--</div>--%>
-    <%--</div>--%>
-    <div class="express-delivery">
-        <div class="express-div">
-            <label><i>*</i>快递公司</label>
-            <div class="select-btn" id="qqq">
-                <select class="express-input required input-xlarge" style="width:300px;">
-                    <c:forEach items="${fns:getDictList('kd_type')}" var="kd">
-                        <option value="${kd.label}">${kd.label}</option>
-                        <%--<script>--%>
-                            <%--op_html += "<option value='${kd.id}'>${kd.label}</option>";--%>
-                        <%--</script>--%>
-                    </c:forEach>
-                </select>
-                <%--<input class="express-input" type="text" placeholder="请选择">--%>
-                <span onclick="input(this)" class="span_jia the-span">+</span>
+    <div class="delivery-info">
+        <div class="express-delivery">
+            <div class="express-div">
+                <label><i>*</i>快递公司</label>
+                <div class="select-btn" id="qqq">
+                    <select class="express-input required input-xlarge" style="width:300px;">
+                        <c:forEach items="${fns:getDictList('kd_type')}" var="kd">
+                            <option value="${kd.label}">${kd.label}</option>
+                        </c:forEach>
+                    </select>
+                    <span onclick="input(this)" class="span_jia the-span">+</span>
+                </div>
             </div>
-        </div>
-        <div class="express-div ship-num">
-            <label><i>*</i>物流编号</label>
-            <div class="select-btn">
-                <input class="single-num" type="text" placeholder="请输入单号" style="width:300px;">
-                <span onclick="input(this)" class="dan_jia the-span">+</span>
+            <div class="express-div ship-num">
+                <label><i>*</i>物流编号</label>
+                <div class="select-btn">
+                    <input class="single-num" type="text" placeholder="请输入单号" style="width:300px;">
+                    <span onclick="input(this)" class="dan_jia the-span">+</span>
+                </div>
             </div>
         </div>
-    </div>
-    <div class="mask">
-        <label>图片备注:</label>
-        <div class="imgbox">
-            <div class="controls upload-content" id="remarkImageBox">
-                <div class="conList">
-                    <input type="hidden" id="image1" maxlength="150" class="imagesInput">
-                    <sys:ckfinder input="image1" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
-                </div>
-                <div class="conList hide-pic">
-                    <input type="hidden" id="image2" maxlength="150" class="imagesInput">
-                    <sys:ckfinder input="image2" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
-                </div>
-                <div class="conList hide-pic">
-                    <input type="hidden" id="image3" maxlength="150" class="imagesInput">
-                    <sys:ckfinder input="image3" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
-                </div>
-                <div class="conList hide-pic">
-                    <input type="hidden" id="image4" maxlength="150" class="imagesInput">
-                    <sys:ckfinder input="image4" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
-                </div>
-                <div class="conList hide-pic">
-                    <input type="hidden" id="image5" maxlength="150" class="imagesInput">
-                    <sys:ckfinder input="image5" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
-                </div>
-                <div class="conList hide-pic">
-                    <input type="hidden" id="image6" maxlength="150" class="imagesInput">
-                    <sys:ckfinder input="image6" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
-                </div>
-                <div class="conList hide-pic">
-                    <input type="hidden" id="image7" maxlength="150" class="imagesInput">
-                    <sys:ckfinder input="image7" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
-                </div>
-                <div class="conList hide-pic">
-                    <input type="hidden" id="image8" maxlength="150" class="imagesInput">
-                    <sys:ckfinder input="image8" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
-                </div>
-                <div class="conList hide-pic">
-                    <input type="hidden" id="image9" maxlength="150" class="imagesInput">
-                    <sys:ckfinder input="image9" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
-                </div>
-                <div class="conList hide-pic">
-                    <input type="hidden" id="image10" maxlength="150" class="imagesInput">
-                    <sys:ckfinder input="image10" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+        <div class="mask">
+            <label>图片备注:</label>
+            <div class="imgbox">
+                <div class="controls upload-content" id="remarkImageBox">
+                    <div class="conList">
+                        <input type="hidden" id="image1" maxlength="150" class="imagesInput">
+                        <sys:ckfinder input="image1" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <input type="hidden" id="image2" maxlength="150" class="imagesInput">
+                        <sys:ckfinder input="image2" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <input type="hidden" id="image3" maxlength="150" class="imagesInput">
+                        <sys:ckfinder input="image3" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <input type="hidden" id="image4" maxlength="150" class="imagesInput">
+                        <sys:ckfinder input="image4" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <input type="hidden" id="image5" maxlength="150" class="imagesInput">
+                        <sys:ckfinder input="image5" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <input type="hidden" id="image6" maxlength="150" class="imagesInput">
+                        <sys:ckfinder input="image6" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <input type="hidden" id="image7" maxlength="150" class="imagesInput">
+                        <sys:ckfinder input="image7" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <input type="hidden" id="image8" maxlength="150" class="imagesInput">
+                        <sys:ckfinder input="image8" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <input type="hidden" id="image9" maxlength="150" class="imagesInput">
+                        <sys:ckfinder input="image9" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
+                    <div class="conList hide-pic">
+                        <input type="hidden" id="image10" maxlength="150" class="imagesInput">
+                        <sys:ckfinder input="image10" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+                    </div>
                 </div>
+                <div class="conList upload-tips"><span style="color:red;">注意:请上传jpg / png格式的图片,最大不超过5M,最多可上传10张</span></div>
             </div>
-            <div class="conList upload-tips"><span style="color:red;">注意:请上传jpg / png格式的图片,最大不超过5M,最多可上传10张</span></div>
         </div>
-    </div>
-    <div class="mask">
-        <label>备注:</label>
-        <textarea class="mask-text" placeholder="请输入备注文字,200字以内..." maxlength="200" style="width:300px;"></textarea>
-        <p style="width:300px;text-align:right;"><span id="remarkLen" style="color:red;">0</span>/200</p>
-    </div>
-    <div class="cencal-btn">
-        <span><a href="javascript:history.go(-1)">取消</a></span>
-        <span class="confirm">确认</span>
+        <div class="mask">
+            <label>备注:</label>
+            <textarea class="mask-text" placeholder="请输入备注文字,200字以内..." maxlength="200" style="width:300px;"></textarea>
+            <p style="width:300px;text-align:right;"><span id="remarkLen" style="color:red;">0</span>/200</p>
+        </div>
+        <div class="cencal-btn">
+            <span><a href="javascript:history.go(-1)">取消</a></span>
+            <span class="confirm">确认</span>
+        </div>
     </div>
 </div>
 <script>
+var op_html = "";
+window.onload = function () {
+    var spanjia_ = document.getElementsByClassName('span_jia');
+    var express_ = document.getElementsByClassName('express-delivery');
+    var danjia_ = document.getElementsByClassName('dan_jia');
+    var shipnum_ = document.getElementsByClassName('ship-num');
+    var input_ = document.getElementsByClassName('input')//数量输入框
+    var confirm_ = document.getElementsByClassName('confirm');//确定按钮
+    var expressDelivery_ = document.getElementsByClassName('express-delivery');//循环物流
+    var masktext_ = document.getElementsByClassName('mask-text');//备注
+    var singlenum_= document.getElementsByClassName('single-num');//新建输入框判断
+    var obj = {};
+    // var valuearr = {};
+    var expressval = document.getElementsByTagName('select');//物流快递
+    var index = expressval[0].selectedIndex ;//索引值
+    var value = expressval[0].options[index].value;
+    var arr = [];
+    for(var i=0;i<expressval[0].options.length;i++){
+        var valuearr = {};
+        valuearr['name'] = expressval[0].options[i].text;
+        valuearr['value'] = expressval[0].options[i].value;
+        arr.push(valuearr);
+    }
+    //新建输入框判断
+
+    for(var i=0;i<singlenum_.length;i++){
+
+    }
+    //输入框判断
+    for(var i=0;i<input_.length;i++){
+        input_[i].onchange = function () {
+            var intval = this.value;
+            var buynum = this.parentNode.parentNode.getElementsByClassName('buy-num');//购买数量
+            var sent_ = this.parentNode.parentNode.getElementsByClassName('sent');//已发数量
+            if(parseInt(intval)+parseInt(sent_[0].innerHTML) >=parseInt(buynum[0].innerHTML)){
+                document.getElementsByClassName('bj')[0].style.cssText = 'display:block';
+                document.getElementsByClassName('change-info')[0].style.cssText = 'display:block';
+                setTimeout(function () {
+                    document.getElementsByClassName('bj')[0].style.cssText = 'display:none';
+                    document.getElementsByClassName('change-info')[0].style.cssText = 'display:none';
+                },1000);
+                this.value = 0
+            }
+        }
+    }
+    //物流加减
+    for(var i=0;i<spanjia_.length;i++){
+        spanjia_[i].onclick =function () {
+
+            var html=''
+            html+='<div class="express-delivery border-express">';
+            html+='<div class="express-div">';
+            html+='<label><i>*</i>快递公司</label>';
+            html+='<div class="select-btn">';
+            html+='<select class="express-input required input-xlarge">';
+            for(var i=0;i<arr.length;i++){
+                html+='<option value="'+arr[i].value+'">'+arr[i].name;
+                html+='</option>';
+            }
+            html+='</select>';
+            html+='<span onclick="jian(this)" class="span_jian mar-css the-span">-</span>';
+            html+='</div>';
+            html+='</div>';
+            html+='<div class="express-div">';
+            html+='<label><i>*</i>物流编号</label>';
+            html+='<div class="select-btn">';
+            html+='<input class="single-num" type="text" placeholder="请输入单号">';
+            html+='<span onclick="danjia(this)" class="dan_jia mar-css the-span">+</span>';
+            html+='</div>';
+            html+='</div>';
+            html+='</div>';
+
+            express_[0].insertAdjacentHTML('afterend', html);
+        }
+    }
+
+    //物流单号
+    for(var i=0;i<spanjia_.length;i++){
+        danjia_[i].onclick =function () {
+            danjia(this)
+        }
+    }
+    //列表信息展示
+    var resdata = JSON.parse(localStorage.getItem('jsonstring'));
+    console.log(resdata)
+    var html = '';
+    for(var i=0;i<resdata.length;i++){
+        html+='<tr>';
+        html+='<td>'+resdata[i].shopName+'</td>'
+        html+='<td>';
+        html+='<img src="'+resdata[i].image+'">';
+        html+='</td>';
+        html+='<td>';
+        html+=resdata[i].name;
+        html+='</td>';
+        html+='<td class="buy-num">';
+        html+=resdata[i].num;
+        html+='</td>';
+        html+='<td>';
+        html+=resdata[i].presentNum;
+        html+='</td>';
+        html+='<td class="sent">';
+        html+=resdata[i].num + resdata[i].presentNum - resdata[i].notOutStore;
+        html+='</td>';
+        html+='<td>';
+        html+='<span data-id='+resdata[i].orderProductID+' data-type='+resdata[i].shopOrderID+' class="input">';
+        html+=''+resdata[i].deliveryNum+'';
+        html+='</span>';
+        html+='</td>';
+        html+='</tr>';
+
+        obj['orderProductID_'+resdata[i].orderProductID+''] = resdata[i].deliveryNum;
+        obj['shopOrderID'] = resdata[i].shopOrderID;
+
+    }
+    $('.table').append(html);
+    //确认点击获取物流以及物流单号
+    confirm_[0].onclick = function () {
+        var _masktext = masktext_[0].value;
+        obj['remarks'] = _masktext;
+        for(var i=0;i<expressDelivery_.length;i++){
+            var expressval = expressDelivery_[i].getElementsByTagName('select');//物流快递
+            if(!expressval[0].value){
+                $.jBox.info('请选择物流快递!');
+                return false;
+            }
+            var index = expressval[0].selectedIndex ;//索引值
+            var singlenum_ = expressDelivery_[i].getElementsByClassName('single-num');//物流单号
+            console.log(expressval[0].value + singlenum_[0].value);
+            var list_ = '';
+            for(var j=0;j<singlenum_.length;j++){
+                if(!singlenum_[j].value){
+                    $.jBox.info('请填写物流单号!');
+                    return false;
+                }
+                 list_+= singlenum_[j].value+'_';
+                 obj['logisticsInfo_'+expressval[0].options[index].value+''] = list_.substring(0,list_.length - 1);
+            }
+        }
+        var imgArr = [];
+        if($('#image1').val()){ imgArr.push($('#image1').val()); }
+        if($('#image2').val()){ imgArr.push($('#image2').val()); }
+        if($('#image3').val()){ imgArr.push($('#image3').val()); }
+        if($('#image4').val()){ imgArr.push($('#image4').val()); }
+        if($('#image5').val()){ imgArr.push($('#image5').val()); }
+        if($('#image6').val()){ imgArr.push($('#image6').val()); }
+        if($('#image7').val()){ imgArr.push($('#image7').val()); }
+        if($('#image8').val()){ imgArr.push($('#image8').val()); }
+        if($('#image9').val()){ imgArr.push($('#image9').val()); }
+        if($('#image10').val()){ imgArr.push($('#image10').val()); }
+        obj['remarkImages'] = imgArr.join("##");
+        console.log(obj);
+        $.ajax({
+            url : "${ctx}/order/delivery",
+            contentType:'application/json',
+            data : JSON.stringify(obj),
+            type : 'post',
+            success : function(data){
+                if (data.success) {
+                    window.location.href = "${ctx}/order/qualificationList?logisticsBatchId="+data.logisticsBatchId;
+                } else {
+                    alert(data.msg);
+                }
+            },
+            error : function(){
+                alert("服务器内部错误");
+            }
+        })
+    }
+
+};
+//物流单号
+function danjia(that) {
+    if(that.parentNode.getElementsByClassName('single-num')[0].value ==''){return}
+    var html=''
+    html+='<div class="express-div">';
+    html+='<label><i>*</i>物流编号</label>';
+    html+='<div class="select-btn">';
+    html+='<input class="single-num" type="text" placeholder="请输入单号">';
+    html+='<span onclick="shipjian(this)" class="span_jian mar-css the-span">-</span>';
+    html+='</div>';
+    html+='</div>';
+    that.parentNode.parentNode.insertAdjacentHTML('afterend', html);
+}
+//减物流
+function jian(that) {
+    var that_ = that.parentNode.parentNode.parentNode;
+    that.parentNode.parentNode.parentNode.parentNode.removeChild(that_);
+
+}
+//减单号
+function shipjian(that) {
+    var that_ = that.parentNode.parentNode;
+    that.parentNode.parentNode.parentNode.removeChild(that_);
+}
+//判断输入框不能为空
+function input(that) {
+    if(that.parentNode.getElementsByClassName('single-num')[0].value == ''){return}
+}
 $(function () {
     $('.upload-content .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
     $('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();

+ 378 - 0
src/main/webapp/WEB-INF/views/modules/order/shopOtherFeeForm.jsp

@@ -0,0 +1,378 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>申请付款</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table th {
+            text-align: center
+        }
+
+        .table td {
+            text-align: center
+        }
+
+        .pay-table th {
+            background: #f9f9f9
+        }
+
+        .pay-table tr:first-child th {
+            background: #eee !important
+        }
+
+        .pay-table td {
+            background: #fff !important
+        }
+
+        input[type="checkbox"]::before {
+            content: '\a0';
+            display: inline-block;
+            vertical-align: .2em;
+            width: .8em;
+            height: .8em;
+            margin-right: .2em;
+            border-radius: .2em;
+            text-indent: .15em;
+            line-height: .65
+        }
+
+        .pay-more-func span:first-child {
+            margin-right: 6px
+        }
+
+        .pay-more-func span:hover {
+            color: #7aa9c3
+        }
+
+        .tips-popup-content p {
+            text-align: center;
+            padding: 80px;
+            font-size: 20px
+        }
+
+        .revise-popup-content h4, .tips-popup-content h4 {
+            padding-left: 10px;
+            height: 40px;
+            line-height: 40px;
+            border-bottom: 1px solid #eee;
+            margin-bottom: 20px
+        }
+
+        .revise-popup-content div {
+            margin-top: 7px;
+            text-align: center
+        }
+
+        .revise-popup-content label {
+            width: 70px;
+            text-align: right;
+            vertical-align: text-bottom
+        }
+
+        .revise-popup-content button {
+            width: 80px;
+            height: 30px;
+            -webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px
+        }
+
+        .revise-popup-content > div:nth-of-type(4) > span:first-child {
+            margin-left: -104px
+        }
+
+        .revise-popup-content > div:nth-of-type(4) > span:last-child {
+            margin-left: 30px
+        }
+
+        .revise-popup-content > div:nth-of-type(4) > span span {
+            margin-left: 10px
+        }
+
+        .revise-popup-content > div:last-child {
+            text-align: center;
+            margin-top: 20px
+        }
+
+        .revise-popup-content input {
+            width: 100px;
+            margin-bottom: 0px
+        }
+
+        .form-search label {
+            width: 80px;
+            text-align: left;
+            margin-top: 12px
+        }
+
+        .remark-title span {
+            color: red
+        }
+
+        .ul-form label {
+            width: 90px;
+            text-align: left;
+            margin-top: 15px
+        }
+
+        .pay-status label {
+            margin-left: 0
+        }
+
+        .pay-status label:first-child {
+            margin-left: 10px
+        }
+        .controls{
+            font-size: 0;
+        }
+        .controls .conList{
+            display: inline-block;
+            margin-right: 15px;
+        }
+        .conList .btn:nth-of-type(1){
+            margin-left: 25px;
+        }
+        .upload-content {
+            margin-top: -70px;
+            display: inline-block;
+        }
+        .upload-content .conList .btn:nth-of-type(1) {
+            width: 90px;
+            height: 100px;
+            border: 2px solid #eee;
+            background: #fff;
+            position: relative;
+        }
+        .upload-content .conList .btn:nth-of-type(1)>div {
+            position: absolute;
+            top: 50%;
+            left: 50%;
+            transform: translate(-50%, -50%);
+            color: #666;
+        }
+        .upload-content .conList .btn:nth-of-type(1) span {
+            font-size: 35px;
+        }
+        .upload-content .conList .btn:nth-of-type(1) h5 {
+            color: #666;
+        }
+        .cancel-upload {
+            background: transparent;
+            border: none;
+            box-shadow: none;
+            position: relative;
+            top: -38px;
+            left: -25px;
+            cursor: pointer;
+            z-index: 100;
+        }
+        .upload-content .conList ol li {
+            width: 114px;
+            min-height: 80px;
+            text-align: center;
+            background: #fff;
+            position: relative;
+            top: 120px;
+            margin-left: 2px;
+        }
+        .hide-pic {
+            display: none !important;
+        }
+    </style>
+    <script type="text/javascript">
+            $(document).ready(function() {
+                $("#inputForm").validate({
+                    ignore:"",
+                    submitHandler: function (form) {
+                        var shopPostFee = $("#shopPostFee").val();
+                        var brokerage = ${brokerage};
+                        if (brokerage < shopPostFee) {
+                            top.$.jBox.confirm("付第三方的值不合理,导致佣金为负,确认继续吗?", '提示', function (v, h, f) {
+                                if (v == true) {
+                                    loading('正在提交,请稍等...');
+                                    form.submit();
+                                }
+                                return;
+                            }, {buttons: {'取消': false, '确定': true}});
+                        } else {
+                            loading('正在提交,请稍等...');
+                            form.submit();
+                        }
+                    },
+                    errorContainer: "#messageBox",
+                    errorPlacement: function(error, element) {
+                        $("#messageBox").text("输入有误,请先更正。");
+                        if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                            error.appendTo(element.parent().parent());
+                        } else {
+                            error.insertAfter(element);
+                        }
+                    }
+                });
+            });
+    </script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/order/cmPayShop">付款列表</a></li>
+    <li><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
+    <li class="active"><a href="${ctx}/order/cmPayShop/shopOtherFeeForm?shopOrderId=${payShopOther.shopOrderId}">付第三方</a></li>
+</ul>
+<form:form id="inputForm" modelAttribute="payShopOther" action="${ctx}/order/cmPayShop/saveShopOtherFee" method="post" class="form-horizontal">
+    <form:hidden path="shopOrderId"/>
+    <div class="control-group">
+        <label class="control-label"><font color='red'>*</font>付第三方金额:</label>
+        <div class="controls">
+            <input type="number" id="shopOtherFee" required name="shopOtherFee" onchange="changeShouldPay(this)"/>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label"><font color='red'>*</font>开户名:</label>&nbsp;&nbsp;&nbsp;&nbsp;
+        <form:input path="bankAccountName" htmlEscape="false" maxlength="100" class="input-xlarge required"/>&nbsp;&nbsp;&nbsp;&nbsp;
+        <label><font color='red'>*</font>账号:</label>
+        <form:input path="bankAccount" htmlEscape="false" maxlength="100" class="input-xlarge required"/>
+    </div>
+    <div class="control-group">
+        <label class="control-label"><font color='red'>*</font>开户行:</label>&nbsp;&nbsp;&nbsp;&nbsp;
+        <form:input path="bankName" htmlEscape="false" maxlength="100" class="input-xlarge required"/>&nbsp;&nbsp;&nbsp;&nbsp;
+        <label><font color='red'>*</font>账户类型:</label>
+        <form:select path="type" class="select-ele input-xlarge required">
+            <form:option value="0" label="公账"/>
+            <form:option value="1" label="私账"/>
+        </form:select>
+    </div>
+    <div class="control-group">
+        <label class="control-label"><font color='red'>*</font>备注内容:</label>
+        <div class="controls">
+            <textarea type="text" name="remark" placeholder="请详细说明修改的原因,不超过500字" style="position: relative;height: 100px; width: 450px;" maxlength="500" required ></textarea>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">图片:</label>
+        <div class="controls upload-content" style="margin: -91px 0px 0px 16px;" id="remarkImageBox">
+            <div class="conList">
+                <form:hidden id="remarkImage1" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage1" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage2" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage2" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage3" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage3" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage4" path="" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage4" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage5" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage5" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage6" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage6" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage7" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage7" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList hide-pic">
+                <form:hidden id="remarkImage8" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage8" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList  hide-pic">
+                <form:hidden id="remarkImage9" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage9" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+            <div class="conList  hide-pic">
+                <form:hidden id="remarkImage10" path="remarkImages" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+                <sys:ckfinder input="remarkImage10" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+            </div>
+        </div>
+    </div>
+    <div class="form-actions">
+        <input id="btnSubmit" style="margin-left: 150px" class="btn btn-primary" type="submit" value="确认"/>&nbsp;&nbsp;&nbsp;&nbsp;
+        <input id="btnCancel" class="btn" type="button" value="返回" onclick="history.go(-1)"/>
+    </div>
+</form:form>
+<sys:message content="${message}"/>
+<script>
+
+    //图片初始化
+    $(function () {
+        $('.upload-content .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
+        $('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();
+        $('.upload-content .conList').find('.cancel-upload').hide();
+        var observeEle = document.getElementsByClassName('upload-content')[0];
+        var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
+        var MutationObserverConfig={
+            childList: true,
+            subtree: true,
+            characterData: true
+        };
+        var observer = new MutationObserver(function(mutations){
+            $.each(mutations, function(index,item) {
+                if (item.type === 'childList') {
+                    // 在创建新的 element 时调用
+                    var target = $(item.target),
+                        thisWrapper = target.closest('.conList'),
+                        nextEle = thisWrapper.next();
+                    thisWrapper.find('li').css('z-index',99);
+                    thisWrapper.find('.cancel-upload').show();
+                    if(nextEle.hasClass('hide-pic')) {
+                        nextEle.removeClass('hide-pic');
+                    }
+                }
+            })
+        });
+        observer.observe(observeEle,MutationObserverConfig);
+
+        $('body').on('click','.upload-content li',function() {
+            var index = $(this).closest('.conList').index() + 1,
+                str = 'remarkImage'+index+'FinderOpen';
+            eval(str+'()');
+        });
+        $('body').on('click', '.cancel-upload',function() {
+            var wrapper = $(this).closest('.conList');
+            wrapper.find('li').css('z-index','-1');
+            wrapper.find('input').val('');
+            $(this).hide();
+            if ($('.cancel-upload:visible').length < 9) {
+                wrapper.addClass("hide-pic");
+            }else{
+                wrapper.removeClass("hide-pic");
+            }
+            wrapper.parent().append(wrapper.clone());
+            wrapper.remove();
+            $(".conList").each(function(i,ele){
+                if($(ele).find("input.input-xlarge").val()){
+                    $(ele).next().removeClass("hide-pic")
+                }
+            })
+        });
+        $(window).on("load", function(){
+            setTimeout(function(){
+                $("#remarkImageBox").find("input.input-xlarge").each(function(i,ele){
+                    if($(ele).val()){
+                        $(ele).next().find("li").css("z-index","99");
+                        $(ele).parents(".conList").find(".cancel-upload").show();
+                        $(ele).parents(".conList").next().removeClass("hide-pic")
+                    }
+                })
+            },500);
+        });
+    });
+
+    /**
+     * @param obj
+     * jquery控制input只能输入数字
+     */
+    function onlynum(obj) {
+        obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+    }
+</script>
+</body>
+</html>

+ 7 - 2
src/main/webapp/WEB-INF/views/modules/product-new/secondHand.jsp

@@ -114,7 +114,8 @@
         <th>商品图片</th>
         <th>商品品牌</th>
         <th>商品名称</th>
-        <th>发布者</th>
+        <th>卖家</th>
+        <th>采美对接人</th>
         <th>来源</th>
         <th>市场价</th>
         <th>交易价</th>
@@ -163,8 +164,9 @@
 
             </td>
             <td>
-                    ${empty product.publisher?product.contactName:product.publisher}
+                    ${product.contactName}
             </td>
+            <td>${product.dockingPeopleName}</td>
             <td>
                 <c:if test="${product.source eq 1}">
                     网站
@@ -175,6 +177,9 @@
                 <c:if test="${product.source eq 3}">
                     后台
                 </c:if>
+                <c:if test="${product.source eq 4}">
+                    小程序-协销
+                </c:if>
             </td>
             <td>
                     <%--市场价为空不显示--%>

+ 188 - 26
src/main/webapp/WEB-INF/views/modules/product/cmSecondHandDetailForm.jsp

@@ -149,9 +149,9 @@
             text-align: center;
             white-space: nowrap;
         }
-        /*.controls{*/
-        /*    font-size: 0;*/
-        /*}*/
+		.iconBox {
+			font-size: 0;
+		}
         .controls .conList{
             display: inline-block;
             margin-right: 15px;
@@ -205,9 +205,58 @@
             top: 120px;
             margin-left: 2px;
         }
+		.upload-content-image {
+			margin-top: -70px;
+		}
+
+		.upload-content-image .conList .btn:nth-of-type(1) {
+			width: 90px;
+			height: 100px;
+			border: 2px solid #eee;
+			background: #fff;
+			position: relative;
+		}
+
+		.upload-content-image .conList .btn:nth-of-type(1) > div {
+			position: absolute;
+			top: 50%;
+			left: 50%;
+			transform: translate(-50%, -50%);
+			color: #666;
+		}
+
+		.upload-content-image .conList .btn:nth-of-type(1) span {
+			font-size: 35px;
+		}
+
+		.upload-content-image .conList .btn:nth-of-type(1) h5 {
+			color: #666;
+		}
+		.upload-content-image .conList ol li {
+			width: 114px;
+			min-height: 80px;
+			text-align: center;
+			background: #fff;
+			position: relative;
+			top: 120px;
+			margin-left: 2px;
+		}
+		.cancel-upload-image {
+			background: transparent;
+			border: none;
+			box-shadow: none;
+			position: relative;
+			top: -38px;
+			left: -25px;
+			cursor: pointer;
+			z-index: 100;
+		}
         .hide-pic {
             display: none !important;
         }
+		.hide-pic-image {
+			display: none !important;
+		}
         .upload-tips {
             margin: 10px 0;
         }
@@ -403,8 +452,19 @@
 	<div class="control-group">
 		<label class="control-label"><font color="red">*</font>是否显示联系人和联系方式:</label>
 		<div class="controls" style="margin-top: 5px">
-			<form:radiobutton path="showContactFlag" value="1" checked="true"  label="不显示"/>
-			<form:radiobutton path="showContactFlag" value="2" label="显示"/>
+			<form:radiobutton  cssStyle="position: relative" path="showContactFlag" value="1" checked="true"  label="不显示"/>
+			<form:radiobutton  cssStyle="position: relative" path="showContactFlag" value="2" label="显示"/>
+		</div>
+	</div>
+	<div class="control-group">
+		<label class="control-label">身份验证照片:</label>
+		<div class="controls upload-content-image iconBox">
+			<div class="conList">
+				<form:hidden id="authenticationImage" path="authenticationImage" value="${cmSecondHandDetail.authenticationImage}" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+				<sys:ckfinder input="authenticationImage" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
+							  maxHeight="100"/>
+				<br>
+			</div>
 		</div>
 	</div>
 	<div class="control-group">
@@ -447,8 +507,6 @@
 			<form:input path="address" htmlEscape="false" maxlength="100" class="input-xlarge required"/>
 		</div>
 	</div>
-
-	<%--<c:if test="${empty cmSecondHandDetail.id}">--%>
 	<div class="control-group">
 			<label class="control-label" style="margin-top: 17px">图片:</label>
 			<div class="controls upload-content" id="secondHandImage">
@@ -477,31 +535,42 @@
                     <font color="red">最多上传5张二手商品图片,请尽量全部上传,单张图片不能超过5M</font>
                 </div>
 		</div>
-<%--		</c:if>
-
-		<c:if test="${not empty cmSecondHandDetail.id}">
-			<div class="control-group">
-				<label class="control-label" style="margin-top: 17px">图片:</label>
-				<div class="controls upload-content">
-					<img src="${cmSecondHandDetail.image1}" width="150" height="150" style="margin-left: 20px;margin-top: 100px">
-					<img src="${cmSecondHandDetail.image2}" width="150" height="150" style="margin-left: 20px;margin-top: 100px">
-					<img src="${cmSecondHandDetail.image3}" width="150" height="150" style="margin-left: 20px;margin-top: 100px">
-					<img src="${cmSecondHandDetail.image4}" width="150" height="150" style="margin-left: 20px;margin-top: 100px">
-					<img src="${cmSecondHandDetail.image5}" width="150" height="150" style="margin-left: 20px;margin-top: 100px">
-				</div>
-
-                <div class="conList upload-tips" style="margin-left: 205px">
-                    <font color="red">最多上传5张二手商品图片,请尽量全部上传,单张图片不能超过5M</font>
-                </div>
-			</div>
-		</c:if>--%>
-
 	<div class="control-group">
 		<label class="control-label">商品详细信息:</label>
 		<div class="controls">
 			<form:textarea path="productDetails" style="width: 500px;height: 180px;" placeholder="请填写商品详细信息,对商品进行更详细的描述,不超过200字" htmlEscape="false" maxlength="250" class="input-xlarge "/>
 		</div>
 	</div>
+	<div class="control-group">
+		<label class="control-label">二手出让承诺函文件:</label>
+		<form:hidden path="ossName" id="ossName"/>
+		<form:hidden path="fileName" id="fileName"/>
+		<div id='file-list-display' style="box-sizing: border-box;padding-left: 140px;">
+			<c:if test="${not empty cmSecondHandDetail.fileName}">
+				<span>${cmSecondHandDetail.fileName}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+				<a href="${cmSecondHandDetail.url}" target="_blank" style="position: relative">预览</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+				<a href="${ctx}/oss/cmOssArchive/fileDownload?ossName=${cmSecondHandDetail.ossName}&fileName=${cmSecondHandDetail.fileName}" style="position: relative">下载</a></span>
+			</c:if>
+		</div>
+		<div class="upload" style="box-sizing: border-box;padding-left: 120px;" >
+			<input type="file" name="file" id="controlsFiles" style="position: relative" accept=".pdf">
+			<font color="red">只支持pdf格式文件,不超过20M</font>
+		</div>
+	</div>
+	<div class="control-group">
+		<label class="control-label">二手出让承诺函图片:</label>
+		<div class="controls upload-content-image iconBox">
+			<div class="conList">
+				<form:hidden id="commitmentImage" path="commitmentImage" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+				<sys:ckfinder input="commitmentImage" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
+							  maxHeight="100"/>
+				<br>
+			</div>
+		</div>
+		<div style="margin-left: 205px">
+			<font color="red">若不方便上传承诺函文件,可对承诺函进行拍照或者截图,再上传图片;图片大小不超过5M</font>
+		</div>
+	</div>
 
 	<c:if test="${not empty cmSecondHandDetail.productID}">
 		<div class="control-group">
@@ -600,6 +669,99 @@
 				})
 			},500);
 		});
+
+
+	  $('.upload-content-image .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
+	  $('.upload-content-image .conList .btn:nth-of-type(2)').after('<img class="cancel-upload-image" src="/static/images/close-btn1.png">').remove();
+	  $('.upload-content-image .conList').find('.cancel-upload-image').hide();
+	  var observeEleImage = document.getElementsByClassName('upload-content-image')[0];
+	  var observeEleImage1 = document.getElementsByClassName('upload-content-image')[1];
+	  var MutationObserverImage = window.MutationObserver || window.WebKitMutationObserver;
+	  var MutationObserverConfigImage = {
+		  childList: true,
+		  subtree: true,
+		  characterData: true
+	  };
+	  var observerImage = new MutationObserverImage(function (mutations) {
+		  $.each(mutations, function (index, item) {
+			  if (item.type === 'childList') {
+				  // 在创建新的 element 时调用
+				  var target = $(item.target),
+						  thisWrapper = target.closest('.conList'),
+						  nextEle = thisWrapper.next();
+				  thisWrapper.find('li').css('z-index', 99);
+				  thisWrapper.find('.cancel-upload-image').show();
+				  if (nextEle.hasClass('hide-pic-image')) {
+					  nextEle.removeClass('hide-pic-image');
+				  }
+			  }
+		  })
+	  });
+	  observerImage.observe(observeEleImage, MutationObserverConfigImage);
+	  observerImage.observe(observeEleImage1, MutationObserverConfigImage);
+
+	  $('body').on('click', '.upload-content-image li', function () {
+		  var index = $(this).closest('.conList').index() + 1,
+				  str = 'remarkImage' + index + 'FinderOpen';
+		  eval(str + '()');
+	  });
+	  $('body').on('click', '.cancel-upload-image', function () {
+		  var wrapper = $(this).closest('.conList');
+		  wrapper.find('li').css('z-index', '-1');
+		  wrapper.find('input').val('');
+		  $(this).hide();
+		  wrapper.removeClass("hide-pic-image");
+		  wrapper.parent().append(wrapper.clone());
+		  wrapper.remove();
+		  $(".conList").each(function (i, ele) {
+			  if ($(ele).find("input.input-xlarge").val()) {
+				  $(ele).next().removeClass("hide-pic-image")
+			  }
+		  })
+	  });
+	  $(window).on("load", function () {
+		  setTimeout(function () {
+			  var input = $("#authenticationImage");
+			  if (input.val()) {
+				  input.next().find("li").css("z-index", "99");
+				  input.parents(".conList").find(".cancel-upload-image").show();
+				  input.parents(".conList").next().removeClass("hide-pic-image")
+			  }
+			  input = $("#commitmentImage");
+			  if (input.val()) {
+				  input.next().find("li").css("z-index", "99");
+				  input.parents(".conList").find(".cancel-upload-image").show();
+				  input.parents(".conList").next().removeClass("hide-pic-image")
+			  }
+		  }, 500);
+	  });
+
+	  var controlsFiles = document.getElementById("controlsFiles");
+	  controlsFiles.addEventListener("change", function () {
+		  $('#uploadFileName').val(name.substring(0, name.indexOf('.')));
+		  var files = $('#controlsFiles').prop('files');
+		  var data = new FormData();
+		  var url = "${ctx}/oss/cmOssArchive/fileUpload";
+		  data.append('file', files[0]);
+		  $.ajax({
+			  url: url,
+			  data: data,
+			  type: "POST",
+			  processData: false,
+			  contentType: false,
+			  dataType: "json",
+			  success: function (res) {
+				  var html="<span>"+res.fileName+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="+res.url+" style='position: relative' target='_blank'>预览</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href='${ctx}/oss/cmOssArchive/fileDownload?ossName="+res.ossName+"&fileName="+res.fileName+"' style='position: relative'>下载</a></span>";
+				  $("#file-list-display").html(html);
+				  $("#controlsFiles").val("");
+				  $("#ossName").val(res.ossName);
+				  $("#fileName").val(res.fileName);
+			  },
+			  error: function (error) {
+				  alertx(error);
+			  }
+		  });
+	  })
     });
 
 

+ 2 - 3
src/main/webapp/WEB-INF/views/modules/user/cmUserBalanceList.jsp

@@ -117,14 +117,13 @@
 					<td>
 						<a href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${cmUser.userID}" >查看详情</a>
 						<shiro:hasPermission name="user:cmUserBalanceRecord:edit">
-							<%--<a href="javascript:void(0);" onclick="recharge('${cmUser.userID}')">充值</a>--%>
-							<font title="请使用充值订单的方式进行充值!">充值</font>
+							<a href="javascript:void(0);" onclick="recharge('${cmUser.userID}')">充值</a>
+							<%--<font title="请使用充值订单的方式进行充值!">充值</font>--%>
 							<c:if test="${cmUser.ableUserMoney > 0}">
 								<a href="${ctx}/user/cmUserBalanceRecord/userWithdrawals?userID=${cmUser.userID}" >提现</a>
 							</c:if>
 						</shiro:hasPermission>
 					</td>
-
 			</tr>
 		</c:forEach>
 		</tbody>

+ 1 - 12
src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyList.jsp

@@ -430,22 +430,10 @@
                         <a href="${ctx}/new/user/agency/operation?userOrganizeID=${newCmClubList.userOrganizeID}&clubID=${newCmClubList.clubID}&userID=${newCmClubList.userID}&name=${newCmClubList.name}">查看运营人员</a>
                     </c:if>
                     <c:if test="${newCmClubList.status eq 1 || newCmClubList.status eq 92}">
-<%--                        <a href="${ctx}/new/user/agency/form?id=${newCmClubList.clubID}&source=2&searchName=${newCmClub.searchName}&searchUserName=${newCmClub.searchUserName}&searchBindMobile=${newCmClub.searchBindMobile}&searchEmail=${newCmClub.searchEmail}&searchUserOrganizeID=${newCmClub.searchUserOrganizeID}&searchStatus=${newCmClub.searchStatus}&searchUserIdentity=${newCmClub.searchUserIdentity}&searchStartTime=${newCmClub.searchStartTime}&searchEndTime=${newCmClub.searchEndTime}">审核</a>--%>
                         <a href="javascript:void(0);" onclick="toAudit(${newCmClubList.clubID},'${newCmClubList.userName}','${newCmClubList.bindMobile}')">审核</a>
                     </c:if>
-                        <%--<c:if test="${empty newCmClub.firstClubType}">
-                            &lt;%&ndash;不存在组织的用户为采美用户,只有采美用户才以下功能&ndash;%&gt;
-                            <c:if test="${newCmClub.userOrganizeID eq null or newCmClub.userOrganizeID eq 0}">
-                                <a href="javascript:void(0);" class="clubType" data-flag="0"
-                                   data-clubID="${newCmClubList.clubID}">设置分类</a>
-                            </c:if>
-                        </c:if>--%>
                     <a href="javascript:void(0);"
                        onclick="showClubAlert(${newCmClubList.clubID},${newCmClubList.userIdentity})">设置机构类别</a>
-                        <%--<c:if test="${not empty newCmClub.firstClubType}">
-                            <a href="javascript:void(0);" class="clubType" data-value='${fns:toJson(newCmClub)}'
-                               data-flag="1" data-clubID="${newCmClub.clubID}">修改分类</a>
-                        </c:if>--%>
                 </td>
             </shiro:hasPermission>
         </tr>
@@ -946,6 +934,7 @@
                 + "               <label><input name='auditCheckBox' type='checkbox' value='营业执照错误'><span>营业执照错误</span></label>"
                 + "               <label><input name='auditCheckBox' type='checkbox' value='详细信息不全'><span>详细信息不全</span></label>"
                 + "               <label><input name='auditCheckBox' type='checkbox' value='机构名称敏感'><span>机构名称敏感</span></label>"
+                + "               <label><input name='auditCheckBox' type='checkbox' value='不符合平台要求'><span>不符合平台要求</span></label>"
                 + "           </div>"
                 + "       </div>"
                 + "       <div class='bd-row'>"