zhaowc
2025-02-28 157abc191c34e57c1b958ae74fc3de6518ca8a30
HTML/views/SOSetting/ExportNotice.html
@@ -66,6 +66,7 @@
                           <option value="5">中间品出库</option>
                           <option value="6">代储出库</option>
                           <option value="7">其他出库</option>
                           <option value="8">寄存出库</option>
                           <!-- 09 -->
                           <!-- <option value="0">标准销售出库</option>
                           <option value="1">非标销售出库</option>
@@ -90,14 +91,14 @@
                           <option value="3">正在执行</option>
                           <option value="4">执行完毕</option>
                           <option value="5">订单关闭</option>
                           <option value="6">已复核</option>
                           <option value="6">上传完毕</option>
                        </select>
                     </div>
                  </div>
                  <div class="layui-inline">
                     <label class="layui-form-label">批次号</label>
                     <label class="layui-form-label">进厂编号</label>
                     <div class="layui-input-inline">
                        <input type="text" id="LotNo" name="LotNo" placeholder="批次号"
                        <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号"
                           autocomplete="off" class="layui-input">
                     </div>
                  </div>
@@ -142,7 +143,7 @@
                        <div class="layui-input-inline" style="width: 220px;">
                           <select name="UnstackWay" id="UnstackWay" lay-filter="UnstackWay" lay-search>
                              <option value="0" selected>机器人拆垛</option>
                              <option value="1">人工拆垛</option>
                              <option value="1">PDA拆垛</option>
                           </select>
                        </div>
                     </div>
@@ -154,7 +155,6 @@
                              <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                           </select>
                        </div>
                     </div>                     
@@ -163,11 +163,30 @@
                        <div class="layui-input-inline" style="width: 220px;">
                           <select name="PickingArea" id="PickingArea" lay-search>
                              <option value=""></option>
                              <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="033">033</option>
                              <option value="039">039</option>
                              <option value="044">044</option>
                              <option value="051">051</option>
                              <option value="059">059</option>
                              <option value="440">440</option>
                              <option value="443">443</option>
                           </select>
                        </div>
                     </div>
                  </div>
                  <div class="layui-inline" id="divFinish" style="display: none; padding-top: 10px;">
                     <div class="layui-inline">
                        <label class="layui-form-label">账号</label>
                        <div class="layui-input-inline" style="width: 220px;">
                           <input type="text" id="admin" name="admin" placeholder="账号" autocomplete="off"
                           class="layui-input">
                        </div>
                     </div>
                     <div class="layui-inline DivLoadingArea" style="margin-top: 10px;">
                        <label class="layui-form-label">密码</label>
                        <div class="layui-input-inline" style="width: 220px;">
                           <input type="password" id="password" name="password" placeholder="密码" autocomplete="off"
                           class="layui-input">
                        </div>
                     </div>
                  </div>
@@ -212,6 +231,8 @@
                                 return "代储出库";
                              case "7":
                                 return "其他出库";
                              case "8":
                                 return "寄存出库";
                              default:
                                 return "";
                           }
@@ -333,9 +354,11 @@
                        var html = ''; 
                        if(d.IsWave == '0'){
                           if(d.Status == '0' || d.Status == '1' ){
                              html += `<a class="layui-btn layui-btn-normal layui-btn-xs zifenClass" lay-event="auto">
                                       <i class="layui-icon layui-icon-ok"></i>自动分配
                                    </a>`;
                              if(d.Type != "8" && d.Type != "2" && d.Type != "3") {
                                 html += `<a class="layui-btn layui-btn-normal layui-btn-xs zifenClass" lay-event="auto">
                                    <i class="layui-icon layui-icon-ok"></i>自动分配
                                 </a>`;
                              }
                           }
                           if(d.Status == '0' && d.Origin == 'WMS'){
                              html += `<a class="layui-btn layui-btn-normal layui-btn-xs uptClass" lay-event="edit">
@@ -350,7 +373,7 @@
                                       <i class="layui-icon layui-icon-delete"></i>取消分配
                                    </a>`;
                           }
                           if( d.Status == '2' || d.Status == '3'){
                           if( d.Status == '1' ||d.Status == '2' || d.Status == '3'|| (d.Status == '4' && d.Type == "1")){
                              html += `<a class="layui-btn layui-btn-normal layui-btn-xs outClass" lay-event="outKu">
                                       <i class="layui-icon layui-icon-ok"></i>出库
                                    </a>`;
@@ -362,11 +385,13 @@
                                 </a>`;
                        }                        
                        if( d.Status == '5'){
                           html += `<a class="layui-btn layui-btn-normal layui-btn-xs shangClass" lay-event="xml">
                           html += `<a class="layui-btn layui-btn-normal layui-btn-xs checkClass" lay-event="check">
                              <i class="layui-icon layui-icon-ok"></i>复核
                           </a>`;
                        }
                        html += `<a class="layui-btn layui-btn-normal layui-btn-xs shangClass" lay-event="xml">
                           <i class="layui-icon layui-icon-ok"></i>XML
                        </a>`;
                        html += `<a class="layui-btn layui-btn-normal layui-btn-xs editDemoClass" lay-event="editDemo">
                           <i class="layui-icon layui-icon-edit"></i>备注</a>`;
                        return html;
@@ -379,7 +404,11 @@
               <script type="text/html" id="table-content-list2">
                  {{# function GetBtn2(d){
                        var html = '';
                        if((d.StatusZ == "2" || d.StatusZ == "3"|| d.StatusZ == "4") && (d.Type == "1" || d.Type == "2" || d.Type == "3") && d.IsWave == "0"){
                           html += `<a class="layui-btn layui-btn-normal layui-btn-xs shoufenClass" lay-event="wan">
                              <i class="layui-icon layui-icon-ok"></i>手动分配
                           </a>`;
                        }
                        if((d.Status == "0" ||d.Status == "1") && d.Qty > d.AllotQty && d.IsWave == "0"){ 
                           html += `<a class="layui-btn layui-btn-normal layui-btn-xs shoufenClass" lay-event="wan">
                                    <i class="layui-icon layui-icon-ok"></i>手动分配
@@ -468,14 +497,14 @@
            var TotalColsArr = [[  
                     {field: '',title: '序号',type:'numbers',width: 50,align: 'center',fixed: 'left', "disabled": true},
                     {field: 'SONo',title: '出库单号',align: 'center',fixed: 'left',width: 165, "disabled": true},
                     {field: 'Type',title: '单据类型',align: 'center',templet:'#templetType'},
                     {field: 'Type',title: '单据类型',align: 'center',width: 124,templet:'#templetType'},
                     {field: 'Status',title: '执行状态', align: 'center',templet: '#templetStatus'},
                     {field: 'LogisticsName',title: '承运商',align: 'center'},
                     {field: 'CustomerName',title: '客户名称',align: 'center'},
                     {field: 'LotNo',title: '批次号',align: 'center'},
                     {field: 'LotNo',title: '进厂编号',align: 'center'},
                     {field: 'LotNoText',title: '批次描述',align: 'center'},                     
                     {field: 'IsDespatch',title: '是否发运',align: 'center',templet: '#templetIsDespatch'},
                     {field: 'SupplierLot',title: '供货批次',align: 'center'},
                     {field: 'SupplierLot',title: '原厂批号',align: 'center'},
                     {field: 'Origin',title: '来源',align: 'center'},
                     {field: 'Demo',title: '备注',align: 'center',width: 180},
                     {field: 'CreateUserName',title: '创建人',align: 'center'},
@@ -489,208 +518,7 @@
            var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码
            //#endregion
            function refreshTable() {
               //#region 原始非自定义列
               // var param = {
               //    No: $("#No").val(),
               //    Type: $("#Type").val(),
               //    Status: $("#Status").val(),
               //    LotNo: $("#LotNo").val(),
               //    LogisticsId: parseInt($("#LogisticsId").val()),
               //    IsWave: $("#IsWave").val(),
               //    IsDespatch: $("#IsDespatch").val(),
               //    // WaveNo: $("#WaveNo").val(),
               // };
               // table.render({
               //    elem: '#LAY-app-content-list',
               //    url: IP+"/BllSo/GetExportNoticeList",
               //    method: 'POST',
               //     height: h1 ,//'full-'+hei1
               //    id: 'LAY-app-content-list',
               //    where: param,
               //    contentType: 'application/json',
               //    headers:{ToKen:$.cookie('token')},
               //    page: true,
               //    defaultToolbar:  ['filter'], //'print', 'exports'
               //    even: true,
               //    limit: pageCnt,
               //    limits: pageLimits,
               //    cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
               //    even:true,
               //    done: function(res){
               //       initMenu();
               //       var soCode = "res.data[0].SONo";
               //       if (res.data.length != 0) {
               //          soCode = res.data[0].SONo;
               //       }
               //       refreshTablemx(soCode)
               //    },
               //    cols: [
               //    [   {
               //          title: '序号',
               //          type: 'numbers',
               //          width: 65,
               //          fixed: 'left',
               //       },{
               //          field: 'SONo',
               //          title: '出库单号',
               //          align: 'center',
               //          fixed: 'left',
               //          width: 165,
               //       },{
               //          field: 'Type',
               //          title: '单据类型',
               //          align: 'center',
               //          // width: 150,
               //          templet:function(d){
               //             switch (d.Type) {
               //                case "0":
               //                   return "标准销售出库";
               //                case "1":
               //                   return "非标准销售出库";
               //                case "2":
               //                   return "标准调拨出库";
               //                case "3":
               //                   return "非标准调拨出库";
               //                default:
               //                   return "";
               //             }
               //          }
               //       },{
               //          field: 'Status',
               //          title: '执行状态',
               //          align: 'center',
               //          // width: 130,
               //          templet: function(d){
               //             switch (d.Status) {
               //                case "0":
               //                   return `<button class="layui-btn layui-btn-radius layui-btn-xs">等待执行</button>`;
               //                case "1":
               //                   return `<button class="layui-btn layui-btn-radius layui-btn-warm layui-btn-xs">部分分配</button>`;
               //                case "2":
               //                   return `<button class="layui-btn layui-btn-radius layui-btn-warm layui-btn-xs">已分配</button>`;
               //                case "3":
               //                   return `<button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">正在执行</button>`;
               //                case "4":
               //                   return `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">执行完毕</button>`;
               //                case "5":
               //                   return `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">上传完毕</button>`;
               //                default:
               //                   return "";
               //             }
               //          }
               //       },{
               //          field: 'LogisticsName',
               //          title: '承运商',
               //          align: 'center',
               //          // minWidth: 150
               //       },{
               //          field: 'CustomerName',
               //          title: '客户名称',
               //          align: 'center',
               //          // minwidth: 130
               //       },{
               //          field: 'LotNo',
               //          title: '批次号',
               //          align: 'center',
               //          // width: 180,
               //          hide:true
               //       },{
               //          field: 'LotNoText',
               //          title: '批次描述',
               //          align: 'center',
               //          // width: 180,
               //          hide:true
               //       },
               //       // {
               //       //    field: 'IsWave',
               //       //    title: '生成波次',
               //       //    align: 'center',
               //       //    width: 95,
               //       //    templet: function (d) {
               //       //       switch (d.IsWave) {
               //       //          case "0":
               //       //             return "否";
               //       //          case "1":
               //       //             return "是";
               //       //          default:
               //       //             return "";
               //       //       }
               //       //    },
               //       // },
               //       // {
               //       //    field: 'WaveNo',
               //       //    title: '波次单号',
               //       //    align: 'center',
               //       //    width: 170
               //       // },
               //       {
               //          field: 'IsDespatch',
               //          title: '是否发运',
               //          align: 'center',
               //          // width: 95,
               //          templet: function (d) {
               //             switch (d.IsDespatch) {
               //                case "0":
               //                   return "否";
               //                case "1":
               //                   return "是";
               //                default:
               //                   return "";
               //             }
               //          },
               //       },{
               //          field: 'SupplierLot',
               //          title: '供货批次',
               //          align: 'center',
               //          // width: 100,
               //          hide:true
               //       },{
               //          field: 'Origin',
               //          title: '来源',
               //          align: 'center',
               //          // width: 100
               //       },{
               //          field: 'CreateUserName',
               //          title: '创建人',
               //          align: 'center',
               //          // width: 120,
               //       },{
               //          field: 'CreateTime',
               //          title: '创建时间',
               //          align: 'center',
               //          // width: 160,
               //          templet: function(d) {
               //             return formatDate(d.CreateTime);
               //          },
               //       },{
               //          field: 'UpdateUserName',
               //          title: '修改人',
               //          align: 'center',
               //          // width: 120,
               //          hide:true
               //       },{
               //          field: 'UpdateTime',
               //          title: '修改时间',
               //          align: 'center',
               //          // width: 160,
               //          templet: function(d) {
               //             return formatDate(d.UpdateTime);
               //          },
               //          hide:true
               //       },{
               //          title: '操作',
               //          fixed: 'right',
               //          align: 'center',
               //          toolbar: '#table-content-list',
               //          // width: 240
               //       }]
               //    ]
               // });
               //#endregion
               //#region 自定义表头
               var colsJson
               var param1={
@@ -750,201 +578,29 @@
            //渲染出库单明细
            //#region 自定义表头
            var DetailColsArr = [[
                     {field: '',title: '序号',type:'numbers',width: 50,align: 'center',fixed: 'left', "disabled": true},
                     {field: 'SONo',title: '出库单号',align: 'center',fixed: 'left',width:165 },
                     {field: 'SkuNo',title: '物料编码',align: 'center', width: 130},
                     {field: 'SkuName',title: '物料名称',align: 'center', width: 152},
                     {field: 'Standard',title: '物料规格',align: 'center', width: 270},
                     {field: 'LotNo',title: '批次号',align: 'center',width: 150},
                     {field: 'Qty',title: '计划数量',align: 'center',width: 100},
                     {field: 'AllotQty',title: '分配数量',align: 'center',width: 100},
                     {field: 'FactQty',title: '下架数量',align: 'center', width: 100},
                     {field: 'CompleteQty',title: '拣货数量',align: 'center', width: 100},
                     {field: 'IsBale',title: '是否裹包',align: 'center',templet: '#templetIsBale',width: 90},
                     {field: 'IsBelt',title: '是否打带',align: 'center',templet: '#templetIsBelt',width: 90},
                     {field: 'LotText',title: '批次描述',align: 'center', width: 100},
                     {field: 'PackagName',title: '包装名称',align: 'center', width: 120},
                     {field: 'SupplierLot',title: '供货批次',align: 'center', width: 120},
                     {field: 'Price',title: '单价', align: 'center', width: 80},
                     {field: 'Money',title: '总金额', align: 'center', width: 90},
                     {field: 'caozuo',title: '操作',fixed: 'right',width: 100,align: 'left',toolbar: '#table-content-list2', "disabled": true}
                  ]];
               {field: '',title: '序号',type:'numbers',width: 50,align: 'center',fixed: 'left', "disabled": true},
               {field: 'SONo',title: '出库单号',align: 'center',fixed: 'left',width:165 },
               {field: 'SkuNo',title: '物料编码',align: 'center', width: 130},
               {field: 'SkuName',title: '物料名称',align: 'center', width: 152},
               {field: 'Standard',title: '物料规格',align: 'center', width: 270},
               {field: 'LotNo',title: '进厂编号',align: 'center',width: 150},
               {field: 'Qty',title: '计划数量',align: 'center',width: 100},
               {field: 'AllotQty',title: '分配数量',align: 'center',width: 100},
               {field: 'FactQty',title: '下架数量',align: 'center', width: 100},
               {field: 'CompleteQty',title: '拣货数量',align: 'center', width: 100},
               {field: 'IsBale',title: '是否裹包',align: 'center',templet: '#templetIsBale',width: 90},
               {field: 'IsBelt',title: '是否打带',align: 'center',templet: '#templetIsBelt',width: 90},
               {field: 'LotText',title: '批次描述',align: 'center', width: 100},
               {field: 'PackagName',title: '包装名称',align: 'center', width: 120},
               {field: 'SupplierLot',title: '原厂批号',align: 'center', width: 120},
               {field: 'Price',title: '单价', align: 'center', width: 80},
               {field: 'Money',title: '总金额', align: 'center', width: 90},
               {field: 'caozuo',title: '操作',fixed: 'right',width: 100,align: 'left',toolbar: '#table-content-list2', "disabled": true}
            ]];
            var DetailColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//将表头数据进行url编码
            //#endregion
            function refreshTablemx(soNo) {
               //#region 原始非自定义列
               // var param = {
               //    SoNo: soNo,
               // };
               // table.render({
               //    elem: '#LAY-app-content-list2',
               //    url: IP + "/BllSo/GetExportNoticeDetailList",
               //    method: 'POST',
               //    height: h2,
               //    id: 'LAY-app-content-list2',
               //    where: param,
               //    contentType: 'application/json',
               //    headers:{ToKen:$.cookie('token')},
               //    toolbar:'#toolbarDemo',
                    //    defaultToolbar:  ['print'], //'print', 'exports'
               //    page: true,
               //    limit: pageCnt,
               //    limits: pageLimits,
               //    cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
               //    done: function(){
               //       initMenu();
               //    },
               //    cols: [
               //       [{
               //          title: '序号',
               //          type: 'numbers',
               //          width: 65,
               //          fixed: 'left',
               //       }, {
               //          field: 'SONo',
               //          title: '出库单号',
               //          align: 'center',
               //          fixed: 'left',
               //          width:   165
               //       }, {
               //          field: 'SkuNo',
               //          title: '物料编码',
               //          align: 'center',
               //          width: 130
               //       }, {
               //          field: 'SkuName',
               //          title: '物料名称',
               //          align: 'center',
               //          width: 152
               //       }, {
               //          field: 'Standard',
               //          title: '物料规格',
               //          align: 'center',
               //          width: 270
               //       }, {
               //          field: 'LotNo',
               //          title: '批次号',
               //          align: 'center',
               //          width: 150
               //       }, {
               //          field: 'Qty',
               //          title: '计划数量',
               //          align: 'center',
               //          width: 100
               //       }, {
               //          field: 'AllotQty',
               //          title: '分配数量',
               //          align: 'center',
               //          width: 100
               //       }, {
               //          field: 'FactQty',
               //          title: '下架数量',
               //          align: 'center',
               //          width: 100
               //       }, {
               //          field: 'CompleteQty',
               //          title: '拣货数量',
               //          align: 'center',
               //          width: 100
               //       }, {
               //          field: 'IsBale',
               //          title: '是否裹包',
               //          align: 'center',
               //          templet: function (d) {
               //             console.log(d);
               //             switch (d.IsBale) {
               //                case "0":
               //                   return "不裹包";
               //                case "1":
               //                   return "裹包";
               //                default:
               //                   return "";
               //             }
               //          },
               //          width: 90,
               //          hide:true,
               //       }, {
               //          field: 'IsBelt',
               //          title: '是否打带',
               //          align: 'center',
               //          templet: function (d) {
               //             switch (d.IsBelt) {
               //                case "0":
               //                   return "不打带";
               //                case "1":
               //                   return "打带";
               //                default:
               //                   return "";
               //             }
               //          },
               //          width: 90,
               //          hide:true,
               //       }, {
               //          field: 'LotText',
               //          title: '批次描述',
               //          align: 'center',
               //          width: 100
               //       }, {
               //          field: 'PackagName',
               //          title: '包装名称',
               //          align: 'center',
               //          width: 120
               //       }, {
               //          field: 'SupplierLot',
               //          title: '供货批次',
               //          align: 'center',
               //          width: 120
               //       },
               //       // {
               //       //    field: 'IsWave',
               //       //    title: '生成波次',
               //       //    align: 'center',
               //       //    width: 90,
               //       //    templet: function (d) {
               //       //       switch (d.IsWave) {
               //       //          case "0":
               //       //             return "否";
               //       //          case "1":
               //       //             return "是";
               //       //          default:
               //       //             return "";
               //       //       }
               //       //    },
               //       //    hide:true,
               //       // },
               //       // {
               //       //    field: 'WaveNo',
               //       //    title: '波次单号',
               //       //    align: 'center',
               //       //    width: 170,
               //       //    hide:true
               //       // },
               //       {
               //          field: 'Price',
               //          title: '单价',
               //          align: 'center',
               //          width: 80,
               //          hide:true
               //       }, {
               //          field: 'Money',
               //          title: '总金额',
               //          align: 'center',
               //          width: 90,
               //          hide:true
               //       }, {
               //          title: '操作',
               //          fixed: 'right',
               //          width: 180,
               //          align: 'center',
               //          toolbar: '#table-content-list2'
               //       }]
               //    ]
               // });
               //#endregion
               //#region 自定义表头
               var colsJson2
               var param1={
@@ -1108,6 +764,7 @@
               console.log(data);
               Id = data.Id;
               SoNo = data.SONo;
               var orderType=data.Type//单据类型
               if (obj.event === 'delete') {//删除
                  layer.confirm('确定删除此单据吗?', function(index) {
                     var param = {
@@ -1135,7 +792,7 @@
                     var param = {
                        Id: parseInt(Id), 
                     };
                     sendData(IP + "/UpApi/FinishExportNotice", param, 'post', function(res) {
                     sendData(IP + "/UpApi/CloseExportNotice", param, 'post', function(res) {
                        console.log(res);
                        if (res.code == 0) { //成功
                           layer.msg(res.msg, {
@@ -1219,87 +876,52 @@
                     maxmin: true,
                     area: ['1200px', '90%'],
                  });
               }else if(obj.event === 'outKu'){
                  $("#UnstackWay option[value='0']").attr("selected","selected");
                  form.render('select');
               }else if(obj.event === 'outKu'){
                  $("#UnstackWay").val(0)
                  $("#UnstackWay").attr("disabled",false);
                  $("#LoadingArea").val('')
                  $("#PickingArea").val('')
                  $('.DivLoadingArea').show()
                  form.render('select');
                  var param = {
                     soNo: SoNo
                  };
                  sendData(IP + "/BllSo/IsNeedUnpack", param, 'get', function(res) {
                     if (res.code == 0) { //成功
                        if(res.data=="1"){
                           isNeedUnpack='1'
                           $('.DivPickingArea2').show()//.attr("style", "display:block")
                        }else{
                           isNeedUnpack='0'
                           $('.DivPickingArea2').hide()//.attr("style", "display:none")
                        }
                        if($('#UnstackWay').val()=='1'){
                           $('.DivPickingArea2').show()//.attr("style", "display:block")
                        }
                     } else { //不成功
                        layer.msg(res.msg, {
                           icon: 2,
                           time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function() {
                           return;
                        });
                     }
                  });
                  layer.open({
                     type: 1,
                     title: '确认出库口',
                     content: $('#divPickingArea'),
                     maxmin: true,
                     area: ['350px','285px'],
                     btn: ['确定', '取消'],
                     yes: function(index, layero) {
                        var pa = $('#PickingArea').val();
                        console.log(pa)
                        if (isChongFu== true) {
                           isChongFu= false;
                           if(pa == null)
                           {
                              layer.msg("请勿重复点击", {
                                 icon: 2,
                                 time: 2000 //2秒关闭(如果不配置,默认是3秒)
                              });
                           }
                           var param = {
                              soNo: data.SONo,
                              outMode: pa,
                           };
                           console.log(param);
                           sendData(IP + "/DownApi/IssueOutHouse", param, 'get', function(res) {
                              console.log(res);
                              if (res.code == 0) { //成功
                                 layer.msg(res.msg, {
                                    icon: 1,
                                    time: 3000 //1秒关闭(如果不配置,默认是3秒)
                                 }, function() {
                                    refreshTable();
                                    isChongFu= true;
                                 });
                              } else { //不成功
                                 layer.msg(res.msg, {
                                    icon: 2,
                                    time: 3000 //2秒关闭(如果不配置,默认是3秒)
                                 }, function() {
                                    refreshTable();
                                    isChongFu= true;
                                 });
                              }
                              layer.close(index);
                           });
                        }else{
                           layer.msg("请勿重复点击", {
                  if(orderType=="0"){
                     // 判断是否需要拆箱,需要拆箱就需要选择出库口
                     sendData(IP + "/BllSo/IsNeedUnpack", param, 'get', function(res) {
                        if (res.code == 0) { //成功
                           if(res.data=="1"){
                              isNeedUnpack='1'
                              $('.DivPickingArea2').show()
                           }else{
                              isNeedUnpack='0'
                              $('.DivPickingArea2').hide()
                           }
                           if($('#UnstackWay').val()=='1'){
                              $('.DivPickingArea2').show()
                           }
                           outFunction(data.SONo)
                        } else { //不成功
                           layer.msg(res.msg, {
                              icon: 2,
                              time: 2000 //2秒关闭(如果不配置,默认是3秒)
                           }, function() {
                              return;
                           });
                        }
                     }
                  });
                     });
                  }else{
                     $("#UnstackWay").val(1)
                     $("#UnstackWay").attr("disabled",true);
                     form.render('select');
                     $('.DivLoadingArea').hide()
                     outFunction(data.SONo)
                  }
               }else if(obj.event === 'xml'){//编辑
                  layer.confirm('确定要将选中的单据上传吗?', function() {
                     if (isChongFu== true) {
@@ -1371,9 +993,164 @@
                        });
                     }
                  }); 
               }else if(obj.event === 'check'){//复核
                  layer.open({
                     type: 1,
                     title: '复核确认',
                     content: $('#divFinish'),
                     maxmin: true,
                     area: ['350px','215px'],
                     btn: ['确定', '取消'],
                     yes: function(index, layero) {
                        var pa = $('#PickingArea').val();
                        console.log(pa)
                        if (isChongFu== true) {
                           isChongFu= false;
                           if($('#admin').val()==''){
                              layer.msg("请输入账号", {
                                 icon: 2,
                                 time: 2000 //2秒关闭(如果不配置,默认是3秒)
                              });
                              isChongFu= true;
                              return;
                           }
                           if($("#password").val() == '')
                           {
                              layer.msg("请输入密码", {
                                 icon: 2,
                                 time: 2000 //2秒关闭(如果不配置,默认是3秒)
                              });
                              isChongFu= true;
                              return;
                           }
                           var param = {
                              Id:data.Id,
                              UserNo:$('#admin').val(),
                              Password:$('#password').val(),
                           };
                           console.log(param);
                           sendData(IP + "/UpApi/FinishExportNotice", param, 'post', function (res) {
                              if (res.code == 0) { //成功
                                 layer.msg(res.msg, {
                                    icon: 1,
                                    time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                 }, function () {
                                    refreshTable();
                                    $('#admin').val("");
                                    $('#password').val("");
                                    isChongFu = true
                                 });
                              } else { //不成功
                                 layer.msg(res.msg, {
                                    icon: 2,
                                    time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                 }, function () {
                                    isChongFu = true ;
                                    $('#admin').val("");
                                    $('#password').val("")
                                 });
                              }
                              layer.close(index);
                           });
                        }else{
                           layer.msg("请勿重复点击", {
                              icon: 2,
                              time: 2000 //2秒关闭(如果不配置,默认是3秒)
                           });
                        }
                     }
                  });
               }
            });
            
            //选择出库口弹窗方法
            function outFunction(soNo){
               layer.open({
                  type: 1,
                  title: '确认出库口',
                  content: $('#divPickingArea'),
                  maxmin: true,
                  area: ['350px','285px'],
                  btn: ['确定', '取消'],
                  yes: function(index, layero) {
                     var pa = $('#PickingArea').val();
                     console.log(pa)
                     if (isChongFu== true) {
                        isChongFu= false;
                        if(pa == null)
                        {
                           layer.msg("请勿重复点击", {
                              icon: 2,
                              time: 2000 //2秒关闭(如果不配置,默认是3秒)
                           });
                           return;
                        }
                        if($('#UnstackWay').val()=='0'){
                           if($('#LoadingArea').val()==''){
                              layer.msg("请选择装车口", {
                                 icon: 2,
                                 time: 2000 //2秒关闭(如果不配置,默认是3秒)
                              });
                              isChongFu= true;
                              return;
                           }
                        }
                        if(isNeedUnpack == 1){
                        console.log($("#PickingArea").val())
                        if($("#PickingArea").val() == '')
                        {
                           layer.msg("请选择出库口", {
                              icon: 2,
                              time: 2000 //2秒关闭(如果不配置,默认是3秒)
                           });
                           isChongFu= true;
                           return;
                        }}
                        var param = {
                           soNo: soNo,
                           unstackingMode:$('#UnstackWay').val(),
                           outMode: pa,
                           loadingAddre:$('#LoadingArea').val()
                        };
                        console.log(param);
                        sendData(IP + "/DownApi/IssueOutHouse", param, 'get', function(res) {
                           console.log(res);
                           if (res.code == 0) { //成功
                              layer.msg(res.msg, {
                                 icon: 1,
                                 time: 3000 //1秒关闭(如果不配置,默认是3秒)
                              }, function() {
                                 refreshTable();
                                 isChongFu= true;
                              });
                           } else { //不成功
                              layer.msg(res.msg, {
                                 icon: 2,
                                 time: 3000 //2秒关闭(如果不配置,默认是3秒)
                              }, function() {
                                 refreshTable();
                                 isChongFu= true;
                              });
                           }
                           layer.close(index);
                        });
                     }else{
                        layer.msg("请勿重复点击", {
                           icon: 2,
                           time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        });
                     }
                  }
               });
            }
            table.on('tool(LAY-app-content-list2)', function(obj) {
               var data = obj.data;
               var id = data.Id;
@@ -1469,15 +1246,15 @@
            form.on('select(UnstackWay)',function(data){
               var value = data.value;
               if(value==0){
                  $('.DivLoadingArea').show()//.attr("style", "display:block")
                  $('.DivLoadingArea').show()
                  if(isNeedUnpack=='0'){
                     $('.DivPickingArea2').hide()//.attr("style", "display:none")
                     $('.DivPickingArea2').hide()
                  }else{
                     $('.DivPickingArea2').show()//.attr("style", "display:block")
                     $('.DivPickingArea2').show()
                  }                  
               }else{                  
                  $('.DivLoadingArea').hide()//.attr("style", "display:none")
                  $('.DivPickingArea2').show()//.attr("style", "display:block")
                  $('.DivLoadingArea').hide()
                  $('.DivPickingArea2').show()
               }             
            });