Browse Source

6月小版本

Duan_xu 3 years ago
parent
commit
6bee0fd490

+ 12 - 6
src/main/java/com/caimei/modules/newhome/web/NewPageFloorController.java

@@ -436,14 +436,18 @@ public class NewPageFloorController extends BaseController {
     }
 
     @RequestMapping(value = "updatshowFlag")
-    public String updatshowFlag(Product product) {
+    public String updatshowFlag(Product product,String floorTitle,Integer floorType, Model model) {
+        model.addAttribute("floorTitle",floorTitle);
+        model.addAttribute("floorType",floorType);
 
         newPageFloorService.updatshowFlag(product);
-        return "redirect:" + Global.getAdminPath() + "/newhome/newPageFloor/ContentPage";
+
+       return "redirect:" + Global.getAdminPath() + "/newhome/newPageFloor/ContentPage";
     }
 
     @RequestMapping(value = "updateshowTime")
-    public String updateshowTime(Product product) {
+    public String updateshowTime(Product product,String floorTitle,Integer floorType, Model model) {
+
         /**
          * 判断时间更改展示状态
          */
@@ -464,13 +468,15 @@ public class NewPageFloorController extends BaseController {
             }
         }
         newPageFloorService.updatshowFlag(product);
-
+        model.addAttribute("floorTitle",floorTitle);
+        model.addAttribute("floorType",floorType);
     return "redirect:" + Global.getAdminPath() + "/newhome/newPageFloor/ContentPage";
     }
 
     @RequestMapping("/addrecommend")
-    public String addrecommend(Product product, Model model) {
-
+    public String addrecommend(Product product,String floorTitle,Integer floorType, Model model) {
+        model.addAttribute("floorTitle",floorTitle);
+        model.addAttribute("floorType",floorType);
             newPageFloorService.updatrecommend(product);
 
         return "redirect:" + Global.getAdminPath() + "/newhome/newPageFloor/ContentPage";

+ 0 - 2
src/main/java/com/caimei/modules/order/dao/CmDiscernReceiptDao.java

@@ -100,8 +100,6 @@ public interface CmDiscernReceiptDao extends CrudDao<CmDiscernReceipt> {
 
     List<NewShopOrder> getShopOrderInfos(@Param("shopOrderId") String shopOrderId,@Param("orderId") String orderId);
 
-    String discern(String id);
-
     CmDiscernReceipt orderlist(CmDiscernReceipt cmDiscernReceipt);
 
 

+ 2 - 0
src/main/java/com/caimei/modules/order/entity/CmDiscernReceipt.java

@@ -78,6 +78,8 @@ public class CmDiscernReceipt extends DataEntity<CmDiscernReceipt> {
     private String  shopOrderNos;
     private String jgName;//机构名称
 
+
+
     public String getJgName() {
         return jgName;
     }

+ 0 - 1
src/main/java/com/caimei/modules/order/service/CmDiscernReceiptService.java

@@ -66,7 +66,6 @@ public class CmDiscernReceiptService extends CrudService<CmDiscernReceiptDao, Cm
     public List<CmDiscernReceipt> findList(CmDiscernReceipt cmDiscernReceipt) {
         return super.findList(cmDiscernReceipt);
     }
-    public String discern(String id){return cmDiscernReceiptDao.discern(id);}
 
     public Page<CmDiscernReceipt> findPage(Page<CmDiscernReceipt> page, CmDiscernReceipt cmDiscernReceipt) {
         Page<CmDiscernReceipt> result = super.findPage(page, cmDiscernReceipt);

+ 7 - 1
src/main/java/com/caimei/modules/product/service/ProductService.java

@@ -408,7 +408,13 @@ public class ProductService extends CrudService<ProductDao, Product> {
             if(StringUtils.isNotBlank(product.getCostProportional())){
                 product.setSqlCostProportional(Double.valueOf(product.getCostProportional()));
             }
-            product.setShowFlag(3);
+            if(product.getNewProductType()==1){
+                product.setShowFlag(1);
+            }else if(product.getNewProductType()==2){
+                product.setShowFlag(3);
+            }
+
+
             //保存商品信息
             productDao.insert(product);
             productDetailInfo.setProductID(product.getProductID());

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

@@ -62,10 +62,25 @@
 
     <select id="discern" resultType="String">
         SELECT
-            *
-        FROM cm_shop_order  a
-       LEFT JOIN cm_discern_receipt cso ON cso.shopOrderID = a.shopOrderID
-        WHERE cso.id=#{id}
+            u.userID,
+            csp.id AS receiptID,
+            cms.orderID,
+            cms.shopOrderID,
+            cms.shopOrderNo,
+            cms.orderType as orderType,
+            s.name AS shopName,
+            cms.productAmount,
+            cmo.orderNo,
+            u.userName,
+            u.name AS jgName,
+            cmo.confirmTime,
+            cms.receiptAmount,
+            cms.needPayAmount
+        FROM cm_shop_order cms
+                 LEFT JOIN shop s ON s.shopID = cms.shopID
+                 LEFT JOIN cm_order cmo ON cmo.orderID = cms.orderID
+                 LEFT JOIN `user` u ON u.userID = cms.userID
+                 LEFT JOIN cm_discern_receipt csp ON csp.shopOrderID = cms.shopOrderID
     </select>
 
     <select id="orderlist" resultType="CmDiscernReceipt">
@@ -97,9 +112,9 @@
         -- 	relationType值为1是为子订单ID,为2时为主订单ID)
         SELECT
         <include refid="cmDiscernReceiptColumns"/>,
-        cso.orderID as orderID,
+        cso_s.orderID AS orderID,
         cso_s.shopOrderNo as shopOrderNos,
-        cso.shopOrderNo,
+        cso.shopOrderId as shopOrderId,
           s.checkMan,
         s.name AS shopName,
         (case when crr.relationType = '1' then u_cr.userName else u.userName

+ 2 - 0
src/main/resources/mappings/modules/product/CmSecondHandDetailMapper.xml

@@ -249,6 +249,8 @@
 			fileName = #{fileName},
 			ossName = #{ossName},
 			commitmentImage = #{commitmentImage}
+
+
 		WHERE productID = #{productID}
 	</update>
 

+ 57 - 159
src/main/resources/mappings/modules/product/ProductMapper.xml

@@ -88,6 +88,7 @@
 		a.splitCode,
         a.announType,
         a.newvalidFlag,
+        a.newProductType,
         a.showFlag,
         a.showTime,
         a.newshowTime,
@@ -329,161 +330,6 @@
 		</choose>
 	</select>
 
-	<insert id="insert" parameterType="Product"  keyProperty="productID"  keyColumn="productID" useGeneratedKeys="true">
-		INSERT INTO product(
-			brandID,
-			bigTypeID,
-			smallTypeID,
-			tinyTypeID,
-			selfTypeID,
-			shopID,
-			aliasName,
-			name,
-			searchKey,
-			normalPrice,
-			price,
-			priceFlag,
-			beautyActFlag,
-			ladderPriceFlag,
-		    <if test="stock !=''">
-			stock,
-			</if>
-			hasSkuFlag,
-			mainImage,
-			propertiesInfo,
-			addTime,
-			updateTime,
-			weekSellNumber,
-			beforeValidFlag,
-			validFlag,
-			favoriteTimes,
-			commentScore,
-			commentTimes,
-			selfRecommendFlag,
-			sysRecommendFlag,
-			sortIndex,
-			featuredFlag,
-			featuredSortIndex,
-			productCode,
-			unit,
-			synToERPFlag,
-			allAreaFlag,
-			provinceIDs,
-			serviceNumber,
-			maxBuyNumber,
-			minBuyNumber,
-			packageCount,
-			byFlag,
-			normalProductFlag,
-			wholeSaleProductFlag,
-			promotionProductFlag,
-			groupBuyProductFlag,
-			step,
-			actFlag,
-			actType,
-			actSort,
-			onlineTime,
-			downlineTime,
-			freePostFlag,
-			costPrice,
-			costProportional,
-			costCheckFlag,
-			precisehKey,
-			visibility,
-			productType,
-			qualificationImg,
-			invoiceType,
-			taxPoint,
-			supplierTaxPoint,
-			tags,
-			recommendType,
-			machineType,
-			includedTax,
-			commodityType,
-			trainingMethod,
-			trainingType,
-			trainingFee,
-			productDescribe,
-			splitCode,
-			productDetail
-		) VALUES (
-					 #{brandID},
-					 #{bigTypeID},
-					 #{smallTypeID},
-					 #{tinyTypeID},
-					 #{selfTypeID},
-					 #{shopID},
-		          	 #{aliasName},
-					 #{name},
-					 #{searchKey},
-					 #{normalPrice},
-					 #{price},
-					 #{priceFlag},
-					 #{beautyActFlag},
-					 #{ladderPriceFlag},
-					 <if test="stock !=''">
-					 #{stock},
-					 </if>
-					 #{hasSkuFlag},
-					 #{mainImage},
-					 #{propertiesInfo},
-					 #{addTime},
-					 #{updateTime},
-					 #{weekSellNumber},
-					 #{beforeValidFlag},
-					 #{validFlag},
-					 #{favoriteTimes},
-					 #{commentScore},
-					 #{commentTimes},
-					 #{selfRecommendFlag},
-					 #{sysRecommendFlag},
-					 #{sortIndex},
-					 #{featuredFlag},
-					 #{featuredSortIndex},
-					 #{productCode},
-					 #{unit},
-					 #{synToERPFlag},
-					 #{allAreaFlag},
-					 #{provinceIDs},
-					 #{serviceNumber},
-					 #{maxBuyNumber},
-					 #{minBuyNumber},
-					 #{packageCount},
-					 #{byFlag},
-					 #{normalProductFlag},
-					 #{wholeSaleProductFlag},
-					 #{promotionProductFlag},
-					 #{groupBuyProductFlag},
-					 #{step},
-					 #{actFlag},
-					 #{actType},
-		          	 #{actSort},
-					 #{onlineTime},
-					 #{downlineTime},
-					 #{freePostFlag},
-					 #{SqlCostPrice},
-					 #{sqlCostProportional},
-					 #{costCheckFlag},
-					 #{precisehKey},
-		         	 #{visibility},
-		         	 #{productType},
-					 #{qualificationImg},
-					 #{invoiceType},
-					 #{sqlTaxPoint},
-					 #{sqlSupplierTaxPoint},
-					 #{tags},
-					 #{recommendType},
-					 #{machineType},
-					 #{includedTax},
-					 #{commodityType},
-					 #{trainingMethod},
-					 #{trainingType},
-					 #{trainingFee},
-		          	 #{productDescribe},
-					 #{splitCode},
-					 #{productDetail}
-						 )
-	</insert>
     <insert id="insert" parameterType="Product" keyProperty="productID" keyColumn="productID" useGeneratedKeys="true">
         INSERT INTO product(brandID,
                             bigTypeID,
@@ -499,7 +345,9 @@
                             priceFlag,
                             beautyActFlag,
                             ladderPriceFlag,
-                            stock,
+                             <if test="stock !=''">
+	                        	stock,
+                            </if>
                             hasSkuFlag,
                             mainImage,
                             propertiesInfo,
@@ -695,10 +543,57 @@
 						   costProportional = #{costProportional},
 						   costCheckFlag = #{costCheckFlag},
 						   precisehKey = #{precisehKey},
-						   actSort = #{actSort}
+						   actSort = #{actSort},
+						   newProductType=#{newProductType}
+
 		WHERE productID = #{id}
 	</update>
+	<select id="productList" resultType="com.caimei.modules.product.entity.Product">
+		SELECT
+		*
+		FROM product a
+		<where>
+			a.newvalidFlag=1
+			<if test="productID !=null and productID !=''">
+				and a.productID=#{productID}
+			</if>
+		</where>
+	</select>
+	<select id="newfindProductImage" resultType="com.caimei.modules.product.entity.Product">
+		SELECT
+		<include refid="productColumns"/>
+		FROM product a
+		<include refid="productJoins"/>
+		<where>
+			<if test="productID !=null">
+				AND a.productID=#{productID}
+			</if>
+			<if test="name != null and name != ''">
+				AND a.name LIKE concat('%',#{name},'%')
+			</if>
+			<if test="shopName != null and shopName != ''">
+				AND s.name LIKE concat('%',#{shopName},'%')
+			</if>
+			<if test="showFlag !=null and showFlag !=''">
+				AND a.showFlag=#{showFlag}
+			</if>
+			<if test="ids != null and ids.size() > 0">
+				AND a.productID NOT IN
+				<foreach collection="ids" close=")" separator="," open="(" item="id">
+					#{id}
+				</foreach>
+			</if>
+			and a.newvalidFlag = 1
+			and a.newProductType = 1
 
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+		</choose>
+		order by a.sortIndex desc
+	</select>
 	<update id="updateActive">
 		UPDATE product
 		<set>
@@ -1091,7 +986,8 @@
 		`invoiceType`,
 		`recommendType`,
 		`combinationID`,
-		`combinationSort`
+		`combinationSort`,
+		announType
 		)
 		VALUES
 		(
@@ -1167,7 +1063,8 @@
 		#{invoiceType},
 		#{recommendType},
 		#{combinationID},
-		#{combinationSort}
+		#{combinationSort},
+		#{announType}
 		)
 	</insert>
 
@@ -1813,6 +1710,7 @@
 			<if test="trainingFee != null">
 				trainingFee = #{trainingFee},
 			</if>
+			announType=#{announType},
 				splitCode = #{splitCode}
 		</set>
 		where productID = #{productID}

+ 29 - 37
src/main/webapp/WEB-INF/views/modules/newhome/newFloorcontentForm.jsp

@@ -20,12 +20,12 @@
             }
             // alert($("#span").text());
 		});
-		function page(n,s){
+		function page(n, s) {
 			$("#pageNo").val(n);
 			$("#pageSize").val(s);
 			$("#searchForm").submit();
-        	return false;
-        }
+			return false;
+		}
         //PC端状态修改
         function updateEnabledStatus(status,ids){
             var msg='确定启用该楼层吗?';
@@ -99,7 +99,7 @@
 			obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
 		}
 
-		function offoce(productID,date,newshowTime,ShowTime,addTime){
+		function offoce(productID,date,ShowTime,addTime,floorTitle,floorType){
 			var html = "<div id='auditBox'>"
 					+ "<div class='bd-row'>"
 					+ "<span style='margin-left: 5px;size: 30px'>更改时间后,将从此刻的时间开始重新计算</span>"
@@ -111,13 +111,14 @@
 					+ "<span  id='err' hidden=hidden style='color: red'>请输入天数</span>"
 					+ "</div>";
 			var submit = function (v, h, f) {
-
+					if(v==true){
 				if (f.yat == '' || f.yat == null) {
 					$("#err").show()
 					return false;
 				}else {
 					$("#err").hide()
 				}
+
 debugger
 				var time = new Date();
 				var y = time.getFullYear();
@@ -137,26 +138,12 @@ debugger
 				data.getTime()+1000*60*60*24;
 				var dtime = new Date(data);
 				commTime = dateFormat("YYYY-mm-dd HH:MM:SS",dtime);
-
-
-
-
-				// d=time.setDate(Number(d) + Number(f.yat)).toLocaleString().replace(/\//g, "-");
-
-				// d=time.setTime(time.getTime() + 1000 * 60 * 60 * (f.yat*24))
-
-				//对天数进行加
-				window.location.href="${ctx}/newhome/newPageFloor/updateshowTime?newshowTime="+commTime+"&productID="+productID+"&showTime="+commonTime+"&addTime"+addTime;
-				<%--$.post("${ctx}/newhome/newPageFloor/updateshowTime", {//y+'-'+m+'-'+d+'  '+h+':'+minute+':'+s--%>
-				<%--	'newshowTime':commTime,--%>
-				<%--	'productID':productID,--%>
-				<%--	'showTime':commonTime,--%>
-				<%--	'newshowTime':newshowTime,--%>
-				<%--	'addTime':addTime--%>
-
-				<%--}, "JSON");--%>
+						console.log(window.location.href="${ctx}/newhome/newPageFloor/updateshowTime?newshowTime="+commTime+"&productID="+productID+"&showTime="+commonTime+"&addTime="+addTime+"&floorTitle="+floorTitle+"&floorType="+floorType)
+				window.location.href="${ctx}/newhome/newPageFloor/updateshowTime?newshowTime="+commTime+"&productID="+productID+"&showTime="+commonTime+"&addTime="+addTime+"&floorTitle="+floorTitle+"&floorType="+floorType;
+					}
 			};
-			$.jBox(html, {title: "提示",submit:submit});
+			// $.jBox.confirm(html, {title: "提示",submit:submit});
+			$.jBox.confirm(html, "提示", submit, {buttons: {'确认': true, '取消': false}});
 		}
 
 
@@ -183,33 +170,33 @@ debugger
 			$("#preferredProductSort"+id).val(id+"-"+value);
 		}
 
-		function offocea(productID,newshowTime,ShowTime,addTime) {
+		function offocea(productID,newshowTime,ShowTime,addTime,floorTitle,floorType) {
 			$.jBox.confirm("确定上线该商品吗?","提示",function(v,h,f){
 
 				if(v === 1){
-					window.location.href="${ctx}/newhome/newPageFloor/updatshowFlag?showFlag=1&productID="+productID+"&newshowTime="+newshowTime+"&ShowTime="+ShowTime+"&addTime"+addTime;
+					window.location.href="${ctx}/newhome/newPageFloor/updatshowFlag?showFlag=1&productID="+productID+"&newshowTime="+newshowTime+"&ShowTime="+ShowTime+"&addTime"+addTime+"&floorTitle="+floorTitle+"&floorType="+floorType;
 				}
 			} ,{ buttons: {  '确定': 1,'取消':2}});
 		}
-		function offoceb(productID,newshowTime,ShowTime,addTime) {
+		function offoceb(productID,newshowTime,ShowTime,addTime,floorTitle,floorType) {
 			console.log(newshowTime)
 			$.jBox.confirm("确定下线该商品吗?下线后该商品将不展示在商城新品区域","提示",function(v,h,f){
 				if(v === 1){
-					window.location.href="${ctx}/newhome/newPageFloor/updatshowFlag?showFlag=5&productID="+productID+"&newshowTime="+newshowTime+"&ShowTime="+ShowTime+"&addTime"+addTime;
+					window.location.href="${ctx}/newhome/newPageFloor/updatshowFlag?showFlag=5&productID="+productID+"&newshowTime="+newshowTime+"&ShowTime="+ShowTime+"&addTime"+addTime+"&floorTitle="+floorTitle+"&floorType="+floorType;
 				}
 			} ,{ buttons: {  '确定': 1,'取消':2}});
 		}
-		function offocec(productID) {
+		function offocec(productID,floorTitle,floorType) {
 			$.jBox.confirm("确定取消重点推荐吗?","提示",function(v,h,f){
 				if(v === 1){
-					window.location.href="${ctx}/newhome/newPageFloor/addrecommend?recommend=0&productID="+productID;
+					window.location.href="${ctx}/newhome/newPageFloor/addrecommend?recommend=0&productID="+productID+"&floorTitle="+floorTitle+"&floorType="+floorType;
 				}
 			} ,{ buttons: {  '确定': 1,'取消':2}});
 		}
-		function offoced(productID) {
+		function offoced(productID,floorTitle,floorType) {
 			$.jBox.confirm("确定将该商品设为重点推荐吗?推荐后商品将在商城新品区域重点展示","提示",function(v,h,f){
 				if(v === 1){
-					window.location.href="${ctx}/newhome/newPageFloor/addrecommend?recommend=1&productID="+productID;
+					window.location.href="${ctx}/newhome/newPageFloor/addrecommend?recommend=1&productID="+productID+"&floorTitle="+floorTitle+"&floorType="+floorType;
 				}
 			} ,{ buttons: {  '确定': 1,'取消':2}});
 		}
@@ -224,7 +211,12 @@ debugger
 	<form:form id="searchForm" modelAttribute="Product" action="${ctx}/newhome/newPageFloor/ContentPage?floorId=${newPageFloor.id}&floorTitle=${newPageFloor.floorTitle}&floorType=${newPageFloor.floorType}">
 		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
 		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<c:if test="${not empty floorTitle}">
+			楼层名称:&nbsp;<span style="color: #0bbbee">${floorTitle}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span >楼层类型:</span>&nbsp;<span style="color: #0bbbee"><c:if test="${floorType eq 1}">新品橱窗</c:if></span>
+		</c:if>
+		<c:if test="${not empty newPageFloor.floorTitle}">
 		楼层名称:&nbsp;<span style="color: #0bbbee">${newPageFloor.floorTitle}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span >楼层类型:</span>&nbsp;<span style="color: #0bbbee"><c:if test="${newPageFloor.floorType eq 1}">新品橱窗</c:if></span>
+		</c:if>
 		<div class="ul-form">
 
 			<label>商品ID:</label>
@@ -308,11 +300,11 @@ debugger
 					<c:if test="${list.recommend eq 1}"><img src="/static/images/yes.gif" width="15px" border="none"/></c:if>
 				</td>
 				<td>
-					<c:if test="${list.showFlag eq 5}"><a class="red" href="javascript:void(0);" onclick="offocea(${list.productID},'${list.newshowTime}','${list.showTime}','${list.addTime}')">上线商品</a></c:if>
-					<c:if test="${list.showFlag eq 1 }"><a class="red" href="javascript:void(0);" onclick="offoceb(${list.productID},'${list.newshowTime}','${list.showTime}','${list.addTime}')">下线商品</a>	</c:if>
-					<c:if test="${list.recommend eq 1}"><a class="red" href="javascript:void(0);" onclick="offocec(${list.productID})">取消重点推荐</a> </c:if>
-					<c:if test="${list.recommend != 1 && count<5 && list.showFlag != 5}"><a class="red" href="javascript:void(0);" onclick="offoced(${list.productID})">设为重点推荐</a></c:if>
-		          <a class="red" href="javascript:void(0);" onclick="offoce(${list.productID},new Date,'${list.newshowTime}','${list.addTime}')">更改展示时间</a>
+					<c:if test="${list.showFlag eq 5}"><a class="red" href="javascript:void(0);" onclick="offocea(${list.productID},'${list.newshowTime}','${list.showTime}','${list.addTime}','${newPageFloor.floorTitle}','${newPageFloor.floorType}')">上线商品</a></c:if>
+					<c:if test="${list.showFlag eq 1 }"><a class="red" href="javascript:void(0);" onclick="offoceb(${list.productID},'${list.newshowTime}','${list.showTime}','${list.addTime}','${newPageFloor.floorTitle}','${newPageFloor.floorType}')">下线商品</a>	</c:if>
+					<c:if test="${list.recommend eq 1}"><a class="red" href="javascript:void(0);" onclick="offocec(${list.productID},'${newPageFloor.floorTitle}','${newPageFloor.floorType}')">取消重点推荐</a> </c:if>
+					<c:if test="${list.recommend != 1 && count<5 && list.showFlag != 5}"><a class="red" href="javascript:void(0);" onclick="offoced('${list.productID}','${newPageFloor.floorTitle}','${newPageFloor.floorType}')">设为重点推荐</a></c:if>
+		         <c:if test="${list.showFlag !=5}"> <a class="red" href="javascript:void(0);" onclick="offoce('${list.productID}',new Date,'${list.newshowTime}','${list.addTime}','${newPageFloor.floorTitle}','${newPageFloor.floorType}')">更改展示时间</a></c:if>
                </td>
 </c:forEach>
 			</tr>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/newhome/newPageFloorLists.jsp

@@ -80,7 +80,7 @@
 			$.post("${ctx}/newhome/newPageFloor/batchSaveSort?sortList="+items, function(data) {
 				if(true==data.success){
 					$.jBox.tip(data.msg, 'info');
-					window.location.href = "${ctx}/newhome/newPageFloor";
+					window.location.href = "${ctx}/newhome/newPageFloor/lists";
 				} else {
 					$.jBox.tip(data.msg,'error');
 				}

+ 16 - 11
src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptForm.jsp

@@ -37,7 +37,7 @@
 
         .receipt-order-title {
             line-height: 30px;
-            margin: 10px 0;
+            margin: 0px 0;
             white-space: nowrap;
         }
 
@@ -101,7 +101,7 @@
 
         .not-order-reason {
             margin-top: 15px;
-            display: inline-block;
+            /*display: inline-block;*/
             margin-left: 0 !important;
         }
 
@@ -227,12 +227,11 @@
             <div class="not-order-type">
                 <span><label>确认人:</label> ${vo.confirmer}</span>
                 <span><label>确认时间: </label>${vo.confirmTime}</span>
-                <br>
-                <c:if test="${ vo.shopName != null && cmDiscernReceipt.newReceiptType != 2 }"> <span class="not-order-reason"><label>关联供应商:</label>${vo.shopName}</span></c:if>
-                <c:if test="${vo.shopName == null && cmDiscernReceipt.newReceiptType != 2}"> <span class="not-order-reason"><label>关联供应商:</label>无</span></c:if>
+                <c:if test="${ vo.shopName != null && cmDiscernReceipt.newReceiptType != 2 }"> <br> <span class="not-order-reason"><label>关联供应商:</label>${vo.shopName}</span></c:if>
+                <c:if test="${vo.shopName == null && cmDiscernReceipt.newReceiptType != 2}"> <br> <span class="not-order-reason"><label>关联供应商:</label>无</span> <br></c:if>
                 <br>
                 <c:if test="${not empty vo.noOrderReason}">
-                    <span class="not-order-reason"><label>备注信息:</label>${vo.noOrderReason}</span>
+                   <label>备注信息:</label>${vo.noOrderReason}
                 </c:if>
 
             </div>
@@ -250,7 +249,9 @@
                     <span>
                          <span><label>供应商:</label>${op.shopName}</span>
                     <span>
+                        <hr style="margin: 10px;"/>
                 </div>
+
                 <div class="receipt-order-row3">
 
                          <span class="font-blue"><label>订单编号:</label><a
@@ -268,14 +269,16 @@
                                     pattern="#0.00"/>
                             </span>
                     <span><label>机构名称:</label>${op.jgName}</span>
-                    <br>
-                    <span><label>订单类型:</label><c:if test="${op.orderType eq 0}">普通订单</c:if>
+                </div>
+
+               <label>订单类型:</label><c:if test="${op.orderType eq 0}">普通订单</c:if>
                     <c:if test="${op.orderType eq 1}">协销订单</c:if>
-                    </span>
-                    <span><label>下单日期:</label>${cmDiscernReceipt.confirmDate}</span>
 
-                </div>
+                <span><label>下单日期:</label>${cmDiscernReceipt.confirmDate}</span>
+
             </div>
+        <c:if test="${not empty orderInfo.receiptRecordVo}">
+        <div class="receipt-order-form">
         <div class="receipt-order-row4">
             <div><h5><label>订单收款记录:</label></h5></div>
             <c:forEach items="${orderInfo.receiptRecordVo}" var="receiptRecord" varStatus="index">
@@ -349,6 +352,8 @@
                 </div>
             </c:forEach>
         </div>
+        </div>
+        </c:if>
     </c:if>
 
 

+ 1 - 2
src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptList.jsp

@@ -133,7 +133,6 @@
                 <form:options items="${fns:getDictList('receiptType')}" itemLabel="label" itemValue="value"
                               htmlEscape="false"/>
             </form:select>
-            <label class="secondType" style="display: none">二级分类:</label>
             <form:select path="newReceiptType" class="select-ele input-medium secondType" style="display: none">
                 <form:option value="" label="全部"/>
                 <form:option value="1" label="上架费"/>
@@ -301,7 +300,7 @@
                 <c:if test="${cmDiscernReceipt.receiptType == 8}">-----</c:if>
             </td>
            <td>   <%--  <a href="${ctx}/order/detail?id=${cmDiscernReceipt.orderID}">${cmDiscernReceipt.shopOrderNo}(${cmDiscernReceipt.orderID})</a>--%>
-                <c:if test="${cmDiscernReceipt.newReceiptType eq 2}"><a href="${ctx}/order/detail?id=${cmDiscernReceipt.orderID}">${cmDiscernReceipt.shopOrderNos}(${cmDiscernReceipt.shopOrderId})</a></c:if>
+                <c:if test="${cmDiscernReceipt.newReceiptType eq 2}"><a href="${ctx}/order/detail?id=${cmDiscernReceipt.orderID}">${cmDiscernReceipt.shopOrderNos}(${cmDiscernReceipt.orderID})</a></c:if>
                 <c:if test="${cmDiscernReceipt.receiptType != 6 && cmDiscernReceipt.newReceiptType != 2}">${cmDiscernReceipt.orders}</c:if>
                 <c:if test="${cmDiscernReceipt.receiptType == 6}">-----</c:if>
                 <c:if test="${cmDiscernReceipt.receiptType == 7}">-----</c:if>

+ 27 - 2
src/main/webapp/WEB-INF/views/modules/product-new/productList.jsp

@@ -474,6 +474,27 @@
 		})
 	});
 
+	function dateFormat(fmt, date) {
+		let ret;
+		const opt = {
+			"Y+": date.getFullYear().toString(),        // 年
+			"m+": (date.getMonth() + 1).toString(),     // 月
+			"d+": date.getDate().toString(),            // 日
+			"H+": date.getHours().toString(),           // 时
+			"M+": date.getMinutes().toString(),         // 分
+			"S+": date.getSeconds().toString()          // 秒
+			// 有其他格式化字符需求可以继续添加,必须转化成字符串
+		};
+		for (let k in opt) {
+			ret = new RegExp("(" + k + ")").exec(fmt);
+			if (ret) {
+				fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
+			};
+		};
+		return fmt;
+	}
+
+
 	function showTips(title, text) {
 		$('.tips-popup h4').text(title);
 		$('.tips-popup p').text(text);
@@ -580,6 +601,10 @@
     	}
 
 
+
+
+
+
         // 0:待审核,1:审核通过,2:审核失败
         if(status == 0 && name != "" ){
             alertx("该商品的品牌:"+name+",尚未审核。请先审核通过该品牌再审核商品");
@@ -618,10 +643,10 @@
 				$("#err").hide()
 			}
 			debugger
-			var data=new Date(addtime);
+			var data=new Date();
 			data.setDate(data.getDate()+90);
 			var dtime = new Date(data);
-			commTime = dtime.toLocaleString()
+			commTime = dateFormat("YYYY-mm-dd HH:MM:SS",dtime);
 			if(validFlag == 2 && newProductType == 1){
 				f.validFlag=validFlag;
 

+ 10 - 8
src/main/webapp/WEB-INF/views/modules/product-new/secondHand.jsp

@@ -263,11 +263,11 @@
                     <c:if test="${product.validFlag ne 0}">
                         <td class="todo">
                         <c:if test="${product.announType eq 1}">
-                            <a href="${ctx}/product/cmSecondHandDetail/form?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}&editFlag=${editFlag}">商品编辑</a>
+                            <a href="${ctx}/product/cmSecondHandDetail/form?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}&editFlag=${editFlag}&fileTypes=999">商品编辑</a>
                         </c:if>
                             <c:if test="${product.announType eq 2}">
-                                <a href="${ctx}/product/cmSecondHandDetail/cmSecondDetailForm?id=${product.id}&searchProductCategory=2&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&fileTypes=999">商品编辑</a>
-                                <a href="${ctx}/product/cmSecondHandDetail/form?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}&editFlag=${editFlag}">转为预成交商品</a>
+                                <a href="${ctx}/product/cmSecondHandDetail/cmSecondDetailForm?id=${product.id}&searchProductCategory=2&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&fileTypes=999&searchProductCategory=${searchProductCategory}&editFlag=${editFlag}">商品编辑</a>
+                                <a href="${ctx}/product/cmSecondHandDetail/form?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}&editFlag=${editFlag}&fileTypes=999">转为预成交商品</a>
 <%--                                <a href="${ctx}/product/cmSecondHandDetail/form?searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&fileTypes=999">转为预成交商品</a>--%>
                             </c:if>
                             <a href="${ctx}/product/cmSecondHandTransaction/toRecommend?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}">相关推荐</a><br>
@@ -437,11 +437,13 @@
             + "</div>"
             + "</div>";
         var submit = function (v, h, f) {
-            console.log(costPrice+"sa"+price+"s"+costProportional)
-            if(((costPrice ==0.00 || costPrice ==undefined) && (price == undefined || price == '')) || ((costProportional == '' || costProportional == undefined) &&  (price == undefined || price == ''))){
-                $.jBox(htmls, {title: "提示"});
-                // $.jBox.tip("审核通过前请先填写交易价和成本", 'error', {focusId: "validFlag"});
-                return false;
+            console.log(f.validFlag)
+            if(f.validFlag ==2) {
+                if (((costPrice == 0.00 || costPrice == undefined) && (price == undefined || price == '')) || ((costProportional == '' || costProportional == undefined) && (price == undefined || price == ''))) {
+                    $.jBox(htmls, {title: "提示"});
+                    // $.jBox.tip("审核通过前请先填写交易价和成本", 'error', {focusId: "validFlag"});
+                    return false;
+                }
             }
 
             if (f.auditStatus == '') {

+ 1 - 0
src/main/webapp/WEB-INF/views/modules/product/cmSecondHandDetailForm.jsp

@@ -723,6 +723,7 @@
     </div>
 </form:form>
 <script>
+    debugger
     $(function () {
             // 加载地址
             loadProvince();