123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <title>发货</title>
- <meta name="description" content="">
- <meta name="keywords" content="">
- <link href="/css/base.css" rel="stylesheet">
- <link href="/css/ims/ims.css" rel="stylesheet">
- <link rel="stylesheet" type="text/css" href="/css/ims/bootstrap.min.css" />
- <link rel="stylesheet" type="text/css" href="/css/ims/ace.min.css" />
- <style>
- .ims-box {
- margin: 20px;
- }
- .screen>div {
- margin-right: 30px;
- }
- .screen>span{
- line-height: 30px;
- margin-right:5px;
- }
- .screen button {
- padding: 4px 12px;
- }
- .table-box {
- margin-top: 30px;
- }
- .table-box table,
- .table-box table th {
- text-align: center;
- }
- .table>tbody>tr>td{
- vertical-align: middle;
- }
- .yellow{
- color: #FF9900;
- }
- .table-box a{
- color: blue
- }
- .red {
- color: red;
- }
- .yellow {
- color: #FF9900;
- }
- .ims-box {
- margin: 20px;
- }
- .screen > div {
- margin-right: 5px;
- }
- .screen button {
- padding: 4px 12px;
- }
- .table-box {
- margin-top: 30px;
- }
- .table-box table,
- .table-box table th {
- text-align: center;
- }
- .table-box button {
- margin-right: 5px;
- }
- .stop-layer-box, .resubmit-layer-box, .delete-layer-box {
- line-height: 140px;
- text-align: center;
- }
- .resubmit-layer-box input {
- line-height: 20px;
- }
- .urge-layer-box {
- margin-top: 30px;
- margin-left: 30px;
- }
- .urge-layer-box textarea {
- margin-left: 15px;
- vertical-align: top;
- }
- .dialog-information-inquiry{
- display: none;
- width: 400px;
- margin: 0 auto;
- border: 1px solid #f1f1f1;
- /*box-shadow:4px 4px 10px #7c7c7c;*/
- }
- .dialog-information-inquiry .title{
- padding: 0 16px;
- height: 30px;
- line-height: 30px;
- background-color: #2977ff;
- }
- .dialog-information-inquiry .title .title-text{
- font-size: 18px;
- color: #fff;
- font-weight: 650px;
- }
- .dialog-information-inquiry .title .title-tag{
- display: inline-block;
- margin-right: 20px;
- margin-top: 10px;
- padding: 6px 12px;
- height: 16px;
- line-height: 16px;
- color: #fff;
- border: 1px solid #F8F8FA;
- border-radius: 4px;
- background-color: #2977ff;
- cursor: pointer;
- }
- .dialog-information-inquiry .dialog-btn-close{
- display: inline-block;
- color: #fff;
- cursor: pointer;
- }
- .dialog-information-inquiry .dialog-msg{
- margin: 20px 0;
- text-align: center;
- line-height: 20px;
- font-size: 16px;
- }
- .dialog-information-inquiry .btn-box{
- margin-bottom: 28px;
- text-align: center;
- }
- .dialog-information-inquiry .btn-yes{
- display: inline-block;
- /* padding: 6px 12px; */
- width:90px;
- height: 30px;
- line-height: 30px;
- border-radius: 4px;
- color: #fff;
- cursor: pointer;
- background-color: #2977ff;
- }
- #imgPreview {
- display: inline-block;
- margin-top: 12px;
- }
- #imgPreview > img {
- max-width: 100px;
- max-height: 100px;
- margin-right: 5px;
- }
- </style>
- </head>
- <body>
- <div class="ims-box">
- <div class="table-box ">
- <span>调拨明细</span>
- <table id="record-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" style="font-size:12px">
- <thead>
- <tr>
- <th>品目名称</th>
- <th>规格</th>
- <th>申请数量</th>
- <th>单位</th>
- <th>状态</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if ($allocateDetail):?>
- <?php foreach($allocateDetail as $v):?>
- <tr>
- <td><?php echo $v['itemName'];?></td>
- <td><?php echo $v['itemSpec'];?></td>
- <td class="yellow"><?php echo $v['applyNo'];?></td>
- <td class="yellow"><?php echo $v['unitName']?></td>
- <td><?php echo $v['deliveryStatusName'];?></td>
- <td>
- <?php if($v['deliveryStatusName']=='待处理'):?>
- <a href="#" applyNo="<?php echo $v['applyNo']?>" atType="<?php echo $atType?>" atDetailId="<?php echo $v['atDetailId']?>" itemId="<?php echo $v['itemId']?>" class="confirmBtn">确认发货</a>
- <?php endif;?>
- </td>
- </tr>
- <?php endforeach;?>
- <?php endif;?>
- </tbody>
- </table>
- <span>发货记录</span>
- <table id="record-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" style="font-size:12px">
- <thead>
- <tr>
- <th>品目名称</th>
- <th>规格</th>
- <th>发货数量</th>
- <th>标准单位</th>
- </tr>
- </thead>
- <tbody>
- <?php if ($sendData):?>
- <?php foreach($sendData as $v):?>
- <tr>
- <td><?php echo $v['itemName'];?></td>
- <td><?php echo $v['itemSpec'];?></td>
- <td><?php echo $v['no'];?></td>
- <td><?php echo $v['unitName']?></td>
- </tr>
- <?php endforeach;?>
- <?php endif;?>
- </tbody>
- </table>
- </div>
- </div>
- <!-- 确认发货 -->
- <style>
- *{padding:0px;margin:0px;font-family:微软雅黑}
- ul,li,ol{list-style-type:none;}
- .clearfix:after{clear:both;overflow:hidden;content:"";display:block;}
- input ,button{outline:none;}
- .position-r{position:relative}
- .fl{float:left;}
- .fr{float:right;}
- .mt5{margin-top:5px;}
- .mt10{margin-top:10px;}
- .mt20{margin-top:20px;}
- .ml15{margin-left:15px;}
- .mr15{margin-right:15px;}
- .font_bold{font-weight:bold;}
- .choseImg{cursor:pointer;}
- .ttd{background:url(/images/back-d.png) center repeat;width:100%;height:100%;position:fixed;top:0px;z-index:999}
- .s-state{width:380px;background:#fff;margin:2% auto 0 auto;}
- .hint_size{height:45px;width:90%;color:#333;line-height:45px;margin:0px auto;border-bottom:1px solid #ccc;}
- .mistake_character{text-align:left;color:#606060;font-size:14px;padding:0px 0px 28px 0px;width:90%;margin:0px auto;}
- .roger{width:100px;height:35px;border:1px solid #15ae68;background:#15ae68;color:#fff;font-size:16px;cursor:pointer;}
- .rogergb{background:#ccc;border:1px solid #ccc;}
- .allTeacher{width:164px;height:30px;border:1px solid #ccc;border-radius:6px;margin-top:10px;}
- button.wordBtn{background:#50d2c2;color:#fff;width:120px;height:30px;border:1px solid #50d2c2;cursor:pointer;border-radius:4px;margin-left: 15px;}
- #uploadImgList{
- height:120px;
- overflow: scroll;
- }
- </style>
- <div class="ttd" style="display: none;">
- <div class="s-state clearfix posirela">
- <div class="hint_size clearfix">
- <span class="fl ml15">确认发货</span>
- </div>
- <table id="record-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" style="font-size:12px">
- <tr>
- <td style="width: 100px;padding-right:5px;">已发货数量:</td>
- <td>0</td>
- </tr>
- <tr>
- <td>发货数量:</td>
- <td><input type="text" name="sendNo" readonly value=""></td>
- </tr>
- <tr>
- <td>物流公司:</td>
- <td>
- <select id="logisticsName">
- <option value="">选择物流公司</option>
- <?php
- if($express){
- foreach ($express as $v){
- echo '<option value="'.$v['dictCode'].'">'.$v['name'].'</option>>';
- }
- }
- ?>
- </select>
- </td>
- </tr>
- <tr>
- <td>物流单号:</td>
- <td><input type="text" name="logisticsCode" value="" ></td>
- </tr>
- <tr class="fixedCodes">
- <td>固定资产编号 :</td>
- <td >
- <div id="fixCodesDiv" style="height:80px; overflow: scroll;">
- </div>
- </td>
- </tr>
- <tr>
- <th><em class="red">*</em>快递照片</th>
- <td colspan="3" >
- <label class="add-img">
- <span>+</span>
- <input type="file" id="uploadImg" accept="image/*" style="display: none;"/>
- </label>
- <span>图片上传</span>
- <div id="uploadImgList">
- <div id="oldImg">
- <?php
- if(isset($images)){
- foreach ($images as $v){
- echo '<img src="'.$v.'" width="90">';
- }
- }
- ?>
- </div>
- <div id="imgPreview"></div>
- </div>
- </td>
- </tr>
- </table>
- <div class="mistake_character clearfix">
- <div class="clearfix" style="width:300px;margin:0px auto;">
- <input type="hidden" name="atDetailId" value="">
- <input type="hidden" name="itemId" value="">
- <input type="hidden" name="applyNo" value="">
- <input type="hidden" name="atType" value="">
- <p class="fl"><button class="roger shut" id="btnSubmit">确定</button></p>
- <p class="fr"><button class="roger shut rogergb" id="btnClose">取消</button></p>
- </div>
- </div>
- </div>
- </div>
- <script src="/js/productset/jquery.min.js"></script>
- <script src="/js/ims/xsgl.js"></script>
- <script src="/js/ims/jquery.datetimepicker.js"></script>
- <link rel="stylesheet" type="text/css" href="/css/ims/jquery.datetimepicker.css"/>
- <script>
- $(document).ready(function() {
- $('.confirmBtn').click(function(){
- var itemId=$(this).attr('itemId'),
- atDetailId=$(this).attr('atDetailId'),
- applyNo=$(this).attr('applyNo'),
- atType=$(this).attr('atType');
- //固定资产编号
- if(atType==0){
- $.ajax({
- url:'<?php echo $this->createUrl('imsStore/getFixedAssetsNo')?>',
- type:'POST',
- dataType:'json',
- data:{itemId:itemId},
- success:function (res) {
- if(res.status==1){
- $('input[name=atDetailId]').val(atDetailId);
- $('input[name=itemId]').val(itemId);
- $('input[name=applyNo]').val(applyNo);
- $('input[name=atType]').val(atType);
- $('input[name=sendNo]').val(applyNo);
- $('.fixedCodes').show();
- if(res.data.length>0){
- html='';
- $.each(res.data,function(i,v){
- html+='<input type="checkbox" value="'+v+'" name="fixedCodes">'+v;
- })
- $('#fixCodesDiv').html(html);
- }
- $('.ttd').show()
- }
- }
- });
- }else{
- $('input[name=atDetailId]').val(atDetailId);
- $('input[name=itemId]').val(itemId);
- $('input[name=applyNo]').val(applyNo);
- $('input[name=atType]').val(atType);
- $('input[name=sendNo]').val(applyNo);
- $('.fixedCodes').hide()
- $('.ttd').show()
- }
- });
- //确认发货
- $('#btnSubmit').click(function(){
- var atDetailId= $('input[name=atDetailId]').val();
- var logisticsCode= $('input[name=logisticsCode]').val();
- var logisticsName= $('#logisticsName').val();
- var fixedCodes= [];
- var no= parseInt($('input[name=sendNo]').val());
- var applyNo=$('input[name=applyNo]').val();
- var atType=$('input[name=atType]').val();
- $('input[name=fixedCodes]:checked').each(function() {
- fixedCodes.push($(this).val())
- });
- if(no<1 || isNaN(no)){
- layer.msg('发货数量不正确');
- return false;
- }
- if(logisticsName==""){
- layer.msg('请选择物流公司');
- return false;
- }
- if(logisticsCode==""){
- layer.msg('请填写物流单号');
- return false;
- }
- if(fixedCodes.length!=parseInt(no) && atType==0){
- layer.msg('发货数量和资产编号不一致');
- return false;
- }
- if(no>applyNo){
- layer.msg('发货数量不能大于申请数量');
- return false;
- }
- var imgArr = [];
- $('#imgPreview img').each(function () {
- imgArr.push($(this).attr('src'));
- });
- var oldImg=[];
- $('#oldImg img').each(function () {
- oldImg.push($(this).attr('src'));
- });
- if (imgArr.length <= 0 && oldImg.length <= 0) {
- layer.msg('请上传快递照片');
- return false;
- }
- data={
- atDetailId:atDetailId,
- logisticsCode:logisticsCode,
- logisticsName:logisticsName,
- fixedCodes:fixedCodes,
- no:no,
- imgUrls:imgArr
- }
- $.ajax({
- url:'<?php echo $this->createUrl('imsStore/confirmDeliver')?>',
- type:'POST',
- dataType:'json',
- data:data,
- success:function (res) {
- if(res.status==1){
- layer.msg('发货成功')
- window.location.reload();
- }else{
- if(res.msg!=undefined){
- layer.msg(res.msg)
- }else{
- layer.msg('发货失败')
- }
- }
- }
- });
- });
- $('#btnClose').click(function(){
- $('#imgPreview').html('');
- $('.ttd').hide()
- });
- // 添加图片
- $("#uploadImg").on("change", function () {
- //限制图片数量
- var imgObj = $('#imgPreview img');
- var formData = new FormData();
- formData.append('uploadFile', document.getElementById('uploadImg').files[0]);
- if(document.getElementById('uploadImg').files[0]==undefined){
- return false;
- }
- var basic = "<?php echo $basic;?>";
- $.ajax({
- url: "<?php echo $uploadUrl;?>",
- type: "post",
- data: formData,
- processData: false,
- contentType: false,
- beforeSend: function (req) {
- req.setRequestHeader("Authorization", basic);
- },
- success: function (data) {
- console.log(data);
- if (data.errCode == '00') {
- var html = "<img src='" + data.data.url + "' width='90'>";
- $('#imgPreview').append(html);
- $('#uploadImg').val('');
- } else {
- layer.msg(data.errMsg);
- }
- }
- });
- });
- });
- </script>
- </body>
- </html>
|