|  |  |  | 
|---|
|  |  |  | </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> | 
|---|
|  |  |  | 
|---|
|  |  |  | </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> | 
|---|
|  |  |  | 
|---|
|  |  |  | {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}, | 
|---|
|  |  |  | 
|---|
|  |  |  | active = { | 
|---|
|  |  |  | add: function () { | 
|---|
|  |  |  | var typeValue = $("#Type").val(); | 
|---|
|  |  |  | console.log(typeValue) | 
|---|
|  |  |  | layer.open({ | 
|---|
|  |  |  | type: 2, | 
|---|
|  |  |  | title: '添加明细', | 
|---|
|  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | 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(); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if (res.data[i].Type == 0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | $("#CustomerNamep").html("客户选择"); | 
|---|
|  |  |  | $("#CustomerNamep").html("客户"); | 
|---|
|  |  |  | $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' + | 
|---|
|  |  |  | res.data[i].CustomerName + '</option>'); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if (res.data[i].Type == 1) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | $("#CustomerNamep").html("供应商选择"); | 
|---|
|  |  |  | $("#CustomerNamep").html("供应商"); | 
|---|
|  |  |  | $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' + | 
|---|
|  |  |  | res.data[i].CustomerName + '</option>'); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if (res.data[i].Type == 2) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | $("#CustomerNamep").html("货主选择"); | 
|---|
|  |  |  | $("#CustomerNamep").html("货主"); | 
|---|
|  |  |  | $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' + | 
|---|
|  |  |  | res.data[i].CustomerName + '</option>'); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | arr.push(data[i]); //属性 | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $.extend(infoOptions, { | 
|---|
|  |  |  | data: arr | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | infoOptions.page = { | 
|---|
|  |  |  | curr: 1 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | console.log(infoOptions) | 
|---|
|  |  |  | table.render(infoOptions); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|