| | |
| | | margin-left: -15px; |
| | | margin-right: -15px; |
| | | } |
| | | |
| | | .layui-table-mend{ |
| | | position: relative; |
| | | } |
| | |
| | | </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> |
| | |
| | | <div class="layui-form-item" style="margin-bottom: 0;"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="position-relative" style="width: 100%;right: 0;"><!-- class="position-relative" --><!-- 自定义表头加上 --> |
| | | <table id="LAY-app-content-list" name="LAY-app-content-list" lay-filter="LAY-app-content-list"></table> |
| | | <div class="position-relative" style="width: 100%;right: 0;"> |
| | | <!-- class="position-relative" --><!-- 自定义表头加上 --> |
| | | <table id="LAY-app-content-list" name="LAY-app-content-list" lay-filter="LAY-app-content-list"> |
| | | </table> |
| | | <!-- #region 自定义表头 --> |
| | | <div class="headerSetIcon"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols"> |
| | |
| | | console.log(res) |
| | | $("input[name='ASNNo']").val(res.data[0].ASNNo); |
| | | $("#Type option[value = '" + res.data[0].Type + "']").prop("selected", true); |
| | | $("#CustomerName option[value = '" + res.data[0].CustomerNo + "']").prop("selected", true); |
| | | $("#Type").attr("disabled", "disabled"); |
| | | getCustomerList(res.data[0].CustomerNo); // 根据单据类型加载客户信息 |
| | | |
| | | var paramDetail = { |
| | | ASNNo: id, |
| | |
| | | curr: 1 |
| | | } |
| | | table.render(infoOptions); |
| | | form.render('select'); |
| | | |
| | | |
| | | |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | |
| | | } |
| | | |
| | | // 绑定下拉信息 |
| | | function getCustomerList() { |
| | | function getCustomerList(CustomerNo) { |
| | | /* |
| | | 0:客户 |
| | | 退货入库 |
| | |
| | | if (res.code == 0) { //成功 |
| | | $("#CustomerName").empty(); |
| | | $("#CustomerName").append('<option value =""></option>'); |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | var TypeNum = 0; |
| | | |
| | | switch($("#Type").val()) |
| | | { |
| | | // 根据单据类型确认加载是客户or供应商or货主下拉信息 |
| | | var TypeNum = 0; |
| | | switch ($("#Type").val()) { |
| | | case "3": //退货入库 |
| | | TypeNum = 0; |
| | | console.log(TypeNum) |
| | |
| | | console.log(TypeNum) |
| | | break; |
| | | } |
| | | |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | |
| | | //判断单据类型 |
| | | if (TypeNum == 0) |
| | | { |
| | | if (res.data[i].Type == 0) |
| | | { |
| | | if (TypeNum == 0) { |
| | | if (res.data[i].Type == 0) { |
| | | $("#CustomerNamep").html("客户"); |
| | | $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' + |
| | | res.data[i].CustomerName + '</option>'); |
| | | } |
| | | } |
| | | else if (TypeNum == 1) |
| | | { |
| | | if (res.data[i].Type == 1) |
| | | { |
| | | else if (TypeNum == 1) { |
| | | if (res.data[i].Type == 1) { |
| | | $("#CustomerNamep").html("供应商"); |
| | | $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' + |
| | | res.data[i].CustomerName + '</option>'); |
| | | } |
| | | } |
| | | else if (TypeNum == 2) |
| | | { |
| | | if (res.data[i].Type == 2) |
| | | { |
| | | else if (TypeNum == 2) { |
| | | if (res.data[i].Type == 2) { |
| | | $("#CustomerNamep").html("货主"); |
| | | $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' + |
| | | res.data[i].CustomerName + '</option>'); |
| | | } |
| | | } |
| | | } |
| | | // 根据客户名称加载选中值 |
| | | $("#CustomerName option[value = '" + CustomerNo + "']").prop("selected", true); |
| | | form.render('select'); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | |
| | | //判断是否为对应不需要批次的单据 |
| | | var TypeNum = 0; |
| | | |
| | | switch($("#Type").val()) |
| | | { |
| | | switch ($("#Type").val()) { |
| | | //1:采购入库 2:中间品入库 5:其它入库 6:代储入库 7:寄存入库 |
| | | case "1" : |
| | | case "2" : |
| | |
| | | } |
| | | console.log(TypeNum) |
| | | |
| | | if (TypeNum == 0) |
| | | { |
| | | if (TypeNum == 0) { |
| | | layer.msg("请输入批次!1", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |