Demo
2024-03-07 e7864a4dcecba72ccbb06dfb6a3d4a77c65f2a3c
HTML/views/ASNSetting/ArrivalNoticeDetail.html
@@ -63,7 +63,7 @@
            </select>
         </div>
         <label class="layui-form-label" style="width: 70px;"><p id="CustomerNamep">客户名称</p></label>
         <label class="layui-form-label" style="width: 70px;"><p id="CustomerNamep">客户</p></label>
         <div class="layui-input-inline">
            <select name="CustomerName" id="CustomerName" lay-verify="" lay-search>
               <option value=""></option>
@@ -116,7 +116,15 @@
               </script>
               <script type="text/html" id="table-content-list">
                     <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"> <i class="layui-icon layui-icon-delete"></i>删除</a>
                  </script>
               </script>
               <script type="text/html" id="table-content-Packlist">
                  {{#
                     function GetPack(d){
                        return d.PackagNo + '-' + d.PackagName;
                     }
                  }}
                  {{ GetPack(d) }}
               </script>
            </div>
         </div>
      </div>
@@ -161,7 +169,7 @@
                  {field: 'UnitName',title: '计量单位',align: 'center',width: 70}, 
                  {field: 'Standard',title: '规格',width: 160,align: 'center'}, 
                  {field: 'LotText',title: '批次描述',align: 'center',edit: 'text',width: 160}, 
                  {field: 'PackagNo',title: '包装名称',width: 160},
                  {field: 'PackagNo',title: '包装名称',width: 160, templet: "#table-content-Packlist"},
                  {field: 'Price',title: '单价',align: 'center',width: 80}, 
                  {field: 'Money',title: '金额',align: 'center',width: 100}, 
                  {field: 'UDF1',title: '自定义列1',align: 'center',edit: 'text',width: 140}, 
@@ -431,6 +439,7 @@
            active = {
               add: function () {
                  var typeValue = $("#Type").val();
                  console.log(typeValue)
                  layer.open({
                     type: 2,
                     title: '添加明细',
@@ -558,6 +567,19 @@
               });
               return;
            }
            var type= $("#Type").val();
            if(type=='6'){
               var customerName=$("#CustomerName").val();
               if(customerName==''){
                  layer.msg("代储单据请选择货主!", {
                     icon: 2,
                     time: 2000 //2秒关闭(如果不配置,默认是3秒)
                  }, function () {
                  });
                  return;
               }
            }
            SetArrivalNotice();
         });
@@ -629,7 +651,7 @@
                     {
                        if (res.data[i].Type == 0)
                        {
                           $("#CustomerNamep").html("客户选择");
                           $("#CustomerNamep").html("客户");
                           $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' +
                           res.data[i].CustomerName + '</option>');
                        }
@@ -638,7 +660,7 @@
                     {
                        if (res.data[i].Type == 1)
                        {
                           $("#CustomerNamep").html("供应商选择");
                           $("#CustomerNamep").html("供应商");
                           $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' +
                           res.data[i].CustomerName + '</option>');
                        }
@@ -647,7 +669,7 @@
                     {
                        if (res.data[i].Type == 2)
                        {
                           $("#CustomerNamep").html("货主选择");
                           $("#CustomerNamep").html("货主");
                           $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' +
                           res.data[i].CustomerName + '</option>');
                        }
@@ -681,12 +703,14 @@
               }
               arr.push(data[i]); //属性
            }
            $.extend(infoOptions, {
               data: arr
            });
            infoOptions.page = {
               curr: 1
            }
            console.log(infoOptions)
            table.render(infoOptions);
         }