| | |
| | | var id = obj.config.id; |
| | | var checkStatus = table.checkStatus(id); |
| | | if(event === 'confirmOrder'){ |
| | | let uniqueCodeValue = $searchForm.find("select[name='uniqueCode']").val(); |
| | | if(uniqueCodeValue == '' || uniqueCodeValue == null){ |
| | | febs.alert.warn('请选择团长'); |
| | | return; |
| | | } |
| | | var data = checkStatus.data; |
| | | let ids = ""; |
| | | for(let i = 0;i < data.length;i++){ |
| | | ids = ids + data[i].id+"," |
| | | if(data[i].status != 3){ |
| | | febs.alert.warn('请选择待收货的订单'); |
| | | return; |
| | | }else if(data[i].deliveryState != 2){ |
| | | febs.alert.warn('请选择配送中的订单'); |
| | | return; |
| | | }else{ |
| | | ids = ids + data[i].id+","; |
| | | } |
| | | } |
| | | // layer.alert(layui.util.escape(JSON.stringify(data))); |
| | | console.log(ids); |
| | | if(ids == null || ids == ""){ |
| | | febs.alert.warn('请选择确认到货的订单'); |
| | | return; |
| | | } |
| | | let uniqueCodeValue = $searchForm.find("select[name='uniqueCode']").val(); |
| | | if(uniqueCodeValue == '' || uniqueCodeValue == null){ |
| | | febs.alert.warn('请选择团长'); |
| | | return; |
| | | } |
| | | febs.get(ctx + 'admin/order/confirmOrder?takeUniqueCode='+uniqueCodeValue+'&orderIds='+ids, null, function () { |
| | |
| | | febs.alert.warn('请选择团长'); |
| | | return; |
| | | } |
| | | window.location.href = ctx + "admin/order/exportOrderListOne?orderType=1&status=2&deliveryType=1&takeUniqueCode="+uniqueCodeValue; |
| | | $query.click(); |
| | | var data = checkStatus.data; |
| | | let ids = ""; |
| | | for(let i = 0;i < data.length;i++){ |
| | | if(data[i].status != 2){ |
| | | febs.alert.warn('请选择待发货的订单'); |
| | | return; |
| | | }else if(data[i].deliveryState != 1){ |
| | | febs.alert.warn('请选择待配送的订单'); |
| | | return; |
| | | }else{ |
| | | ids = ids + data[i].id+","; |
| | | } |
| | | } |
| | | // layer.alert(layui.util.escape(JSON.stringify(data))); |
| | | console.log(ids); |
| | | if(ids == null || ids == ""){ |
| | | febs.alert.warn('请选择待发货的订单'); |
| | | return; |
| | | } |
| | | window.location.href = ctx + "admin/order/exportOrderListOne?orderType=1&status=2&deliveryType=1&takeUniqueCode="+uniqueCodeValue+'&orderIds='+ids; |
| | | febs.get(ctx + 'admin/order/deliverOrder?takeUniqueCode='+uniqueCodeValue+'&orderIds='+ids, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | |
| | | }); |
| | | } |
| | | |
| | | if (event == 'exportDeliverTwo') { |