From 71e821ab5e6b3014fac9b691d6957bcc09704b70 Mon Sep 17 00:00:00 2001
From: 移动系统liao <liaoxujun@qq.com>
Date: 星期三, 29 五月 2024 11:45:04 +0800
Subject: [PATCH] 修改定制封面逻辑

---
 CoreCms.Net.Web.Admin/wwwroot/views/good/goods/create.html |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/good/goods/create.html b/CoreCms.Net.Web.Admin/wwwroot/views/good/goods/create.html
index 0505773..ded9a9f 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/good/goods/create.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/good/goods/create.html
@@ -467,6 +467,7 @@
                 
                 <th style="width: 60px;">鎺ㄥ箍缁忛攢鍟嗛噰璐繑鐜�</th>
                 <th>鎺ㄥ箍鐢ㄦ埛璐拱杩旂幇</th>
+                <th style="width: 80px;">鏄惁鏀寔瀹氬埗</th>
                 <!-- <th>浜岀骇杩旂幇</th>
                 <!-- <th>涓夌骇杩旂幇</th> --> -->
                 <th>鎿嶄綔</th>
@@ -536,6 +537,10 @@
                 </td>
                 <td>
                     <input type="text" name="product[cutMoney][]" value="{{item.cutMoney||'0'}}" placeholder="鏅�氱敤鎴疯喘涔拌繑鐜�" class="layui-input layui-inline-1">
+                </td> 
+                 <td>
+                    <!-- <input type="checkbox" name="product[isCustomizable][]" value="{{item.isCustomizable||'false'}}" placeholder="鏅�氱敤鎴疯喘涔拌繑鐜�" class="layui-input layui-inline-1"> -->
+                    <input type="checkbox" name="product[isCustomizable][]" title="鏀寔|涓嶆敮鎸�" lay-skin="switch"  value="{{item.distributionCutMoney||'false'}}" lay-filter="isCustomizable" class="isCustomizable">
                 </td>
                 <!-- <td>
                     <input type="text" name="product[levelTwo][]" value="{{item.levelTwo}}" placeholder="浜岀骇杩旂幇" class="layui-input layui-inline-1">
@@ -1463,7 +1468,13 @@
                     }
                     form.render();
                 });
-
+              
+  // 鐩戝惉寮�鍏冲垏鎹簨浠�
+  form.on('switch(isCustomizable)', function(data){
+    var elem = data.elem; // 褰撳墠寮�鍏冲厓绱�  
+    elem.value=true;
+  
+  });
                 function openSpecBox(is_open) {
                     if (is_open == '0') {
                         $("input[name=openSpec]").val("1");
@@ -1861,7 +1872,7 @@
                         //澶氬弬鏁颁骇鍝佸簱鐢熸垚鍒楄〃闆嗗悎
                         var products = [];
                         var productsCount = parseInt(field['productsCount']);
-                        debugger
+                        
                         for (var i = 0; i < productsCount; i++) {
                             var productModel = {};
                             productModel.costprice = field['product[costprice][' + i + ']'];
@@ -1882,7 +1893,10 @@
                             productModel.levelThree = field['product[levelThree][' + i + ']'];
                             productModel.pointsDeduction = field['product[pointsDeduction][' + i + ']'];
                             productModel.points = field['product[points][' + i + ']'];
+                            debugger
                             //鐧惧垎鍏垫硶娣诲姞
+                            productModel.isCustomizable = field['product[isCustomizable][' + i + ']'];
+                            productModel.points = field['product[points][' + i + ']'];
                             productModel.distributionPrice = field['product[distributionPrice][' + i + ']'];
                             productModel.distributionCutMoney = field['product[distributionCutMoney][' + i + ']'];
                             productModel.cutMoney = field['product[cutMoney][' + i + ']'];

--
Gitblit v1.9.1