123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383 |
- <!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 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;
- }
- .alert-msg {
- text-align: center;
- vertical-align: top;
- }
- </style>
- </head>
- <body>
- <div class="ims-box">
- <form action="<?php echo Yii::app()->createUrl('imsStore/allocation') ;?>" method="get">
- <div class="screen">
- <span class="fl">品目名称:</span>
- <div class="diy_select">
- <input type="hidden" id="itemId" name="itemId" class="diy_select_input" value="0">
- <div class="diy_select_txt pm_name_txt">请选择</div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list pm_name" style="display: none;">
- <li val="">请选择</li>
- <?php foreach($itemList as $key => $value):?>
- <li val="<?php echo $value['itemId'];?>"><?php echo $value['itemName'];?></li>
- <?php endforeach;?>
- </ul>
- </div>
- <span class="fl">状态:</span>
- <div class="diy_select">
- <input type="hidden" id="deliveryStatus" name="deliveryStatus" class="diy_select_input" value="-1">
- <div class="diy_select_txt pm_status_txt">请选择</div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list pm_status" style="display: none;">
- <li val="0">请选择</li>
- <li val="1">待处理</li>
- <li val="2">待收货</li>
- <li val="3">已收货</li>
- <li val="4">待打印面单</li>
- <li val="5">待拣货</li>
- <li val="6">待托运</li>
- <li val="7">待发货</li>
- <li val="8">已取消</li>
- <li val="9">凭据待审核</li>
- <li val="10">凭据不通过</li>
- <li val="12">凭据已取消</li>
- </ul>
- </div>
- <span class="fl">开始时间:</span>
- <input type="text" readonly name="startDate" class="some_class" value="" id="some_class_1"/>
- <span >结束时间:</span>
- <input type="text" readonly name="endDate" class="some_class" value="" id="some_class_2"/>
- <button type="submit" class="label-primary-s bth-s">搜索</button>
- <button type="button" class="label-primary-s bth-s create-allocation">+耗材申请</button>
- </div>
- </form>
- <div class="table-box ">
- <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>
- <th>物流状态</th>
- <th>审批状态</th>
- <th>发货数量</th>
- <th>到货数量</th>
- <th>合格数量</th>
- <th>记账数量</th>
- <th>不合格数量</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php
- if($list){
- foreach ($list as $value){
- $pmCount= count($value['details']);
- if(!$pmCount){
- ?>
- <tr>
- <td ><?php echo $value['atCode'];?></td>
- <td ><?php echo $value['atTitle'];?></td>
- <td></td>
- <td></td>
- <td ><?php echo $value['userName'];?></td>
- <td ><?php echo date('Y/m/d',strtotime($value['arriveDate']));?></td>
- <!-- 状态-->
- <td class="yellow"></td>
- <td class="yellow"><?php echo $value['statusName']?></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td >
- <a href="<?php echo $this->createUrl('imsStore/allocationViewDetail', array('atId' => $value['atId'])); ?>" class="" atId="<?php echo $value['atId'] ?>">查看</a>
- <?php
- if(isset($value['processInfo']))
- $processInfo = $value['processInfo'];
- ?>
- <?php if(isset($processInfo['showUrge']) && $processInfo['showUrge']):?>
- <a href="javascript:;" class="btn-urge" businessKey="<?php echo $processInfo['businessKey'] ?>">催办</a>
- <?php endif;?>
- <?php if(isset($processInfo['showReset']) && $processInfo['showReset']):?>
- <a href="<?php echo $this->createUrl('imsStore/applyallocation', array('atId' => $value['atId'])); ?>" class="" atId="<?php echo $value['atId'] ?>">编辑</a>
- <?php endif;?>
- <?php if(isset($processInfo['showDelete']) && $processInfo['showDelete']):?>
- <a href="javascript:;" class="del-stop-btn" doType="del" businessKey="<?php echo $processInfo['businessKey'] ?>">删除</a>
- <?php endif;?>
- <?php if(isset($processInfo['showStop']) && $processInfo['showStop']):?>
- <a href="javascript:;" class="del-stop-btn" doType="stop" businessKey="<?php echo $processInfo['businessKey'] ?>">中止</a>
- <?php endif;?>
- <?php if($value['status']==1 && $value['details'][0]['deliveryStatus']==0):?>
- <a href="javascript:;" class="cancel-allocation-btn" atId="<?php echo $value['atId'] ?>">取消调拨</a>
- <?php endif;?>
- </td>
- </tr>
- <?php
- }else{
- $isFirst = false;
- foreach($value['details'] as $v){
- ?>
- <tr>
- <?php if(!$isFirst):?>
- <td rowspan="<?php echo $pmCount;?>"><?php echo $value['atCode'];?></td>
- <td rowspan="<?php echo $pmCount;?>"><?php echo $value['atTitle'];?></td>
- <?php endif;?>
- <td><?php echo $v['itemName'];?></td>
- <td><?php echo $v['applyNo'];?></td>
- <?php if(!$isFirst):?>
- <td rowspan="<?php echo $pmCount;?>"><?php echo $value['userName'];?></td>
- <td rowspan="<?php echo $pmCount;?>"><?php echo date('Y/m/d',strtotime($value['arriveDate']));?></td>
- <?php endif;?>
- <!-- 状态-->
- <td class="yellow"><?php echo $v['deliveryStatusName']?></td>
- <td class="yellow"><?php echo $value['statusName']?></td>
- <td><?php echo $v['no'];?></td>
- <td><?php echo $v['arriveNo'];?></td>
- <td><?php echo $v['qualifiedNo'];?></td>
- <td><?php echo $v['tallyNo'];?></td>
- <td><?php echo $v['scrapNo'];?></td>
- <?php if(!$isFirst):?>
- <td rowspan="<?php echo $pmCount?>">
- <a href="<?php echo $this->createUrl('imsStore/allocationViewDetail', array('atId' => $value['atId'])); ?>" class="" atId="<?php echo $value['atId'] ?>">查看</a>
- <?php if($value['showDelivery']==1 && $schoolName==$value['deliverName'] ):?>
- <a href="<?php echo $this->createUrl('imsStore/deliverGoods',array('atId'=>$value['atId']));?>">发货</a>
- <?php else:?>
- <?php if(!$isFirst && in_array($v['deliveryStatus'],array(1,2,8,9,11))):?>
- <?php if($value['showReceive']):?>
- <a href="<?php echo $this->createUrl('imsStore/allocationView',array('atId'=>$value['atId'],'showReceive'=>$value['showReceive']));?>">查看物流</a>
- <?php else:?>
- <a href="<?php echo $this->createUrl('imsStore/allocationView',array('atId'=>$value['atId']));?>">查看物流</a>
- <?php endif;?>
- <?php endif;?>
- <?php endif;?>
- <?php
- if(isset($value['processInfo']))
- $processInfo = $value['processInfo'];
- ?>
- <?php if(isset($processInfo['showUrge']) && $processInfo['showUrge']):?>
- <a href="javascript:;" class="btn-urge" businessKey="<?php echo $processInfo['businessKey'] ?>">催办</a>
- <?php endif;?>
- <?php if(isset($processInfo['showReset']) && $processInfo['showReset']):?>
- <a href="<?php echo $this->createUrl('imsStore/applyallocation', array('atId' => $value['atId'])); ?>" class="" atId="<?php echo $value['atId'] ?>">编辑</a>
- <?php endif;?>
- <?php if(isset($processInfo['showDelete']) && $processInfo['showDelete']):?>
- <a href="javascript:;" class="del-stop-btn" doType="del" businessKey="<?php echo $processInfo['businessKey'] ?>">删除</a>
- <?php endif;?>
- <?php if(isset($processInfo['showStop']) && $processInfo['showStop']):?>
- <a href="javascript:;" class="del-stop-btn" doType="stop" businessKey="<?php echo $processInfo['businessKey'] ?>">中止</a>
- <?php endif;?>
- <?php if($value['status']==1 && $value['details'][0]['deliveryStatus']==0):?>
- <a href="javascript:;" class="cancel-allocation-btn" atId="<?php echo $value['atId'] ?>">取消调拨</a>
- <?php endif;?>
- </td>
- <?php endif;?>
- </tr>
- <?php
- $isFirst = true;
- }
- }
- }
- }
- ?>
- </tbody>
- </table>
- <?php if ($page): ?>
- <div class="col-sm-12">
- <ul class="pagination">
- <?php
- $params = array();
- if (isset($_GET['deliveryStatus'])) {
- $params['deliveryStatus'] = $_GET['deliveryStatus'];
- }
- if (isset($_GET['itemId'])) {
- $params['itemId'] = $_GET['itemId'];
- }
- if (isset($_GET['page'])) {
- $params['page'] = $_GET['page'];
- }else{
- $params['page'] = 1;
- }
- echo formatPage($page, 'imsStore/allocation', $params);
- ?>
- </ul>
- </div>
- <?php endif; ?>
- </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"/>
- <?php include_once '_useOutJs.php'?>
- <script>
- $(document).ready(function() {
- //初始化状态
- var currStatus = "<?php echo isset($_GET['deliveryStatus'])?$_GET['deliveryStatus']:0;?>";
- if(currStatus){
- var statusText = $(".pm_status>li[val='"+currStatus+"']").text();
- $('#deliveryStatus').val(currStatus);
- $(".pm_status_txt").text(statusText);
- }
- //初始化品目
- var currPmId = "<?php echo isset($_GET['itemId'])?$_GET['itemId']:'';?>";
- if(currPmId > 0){
- var pmNameText = $(".pm_name>li[val='"+currPmId+"']").text();
- $('#itemId').val(currPmId);
- $(".pm_name_txt").text(pmNameText);
- }
- <?php if (isset($_GET['startDate'])):?>
- $("#some_class_1").attr("value", "<?php echo $_GET['startDate']?>");
- $("#some_class_2").attr("value", "<?php echo $_GET['endDate']?>");
- <?php endif;?>
- $('.some_class').datetimepicker({
- format: "Y-m-d", //格式化日期
- timepicker: false //关闭时间选项
- });
- $('.create-allocation').click(function(){
- window.location.href='<?php echo $this->createUrl('imsStore/applyallocation')?>';
- });
- //取消调拨
- $('.cancel-allocation-btn').click(function(){
- var obj = $(this);
- var atId = $(this).attr('atId');
- layer.confirm('确认取消调拨吗?', {
- btn: ['确定', '取消'] //按钮
- }, function () {
- $.ajax({
- url: "<?php echo $this->createUrl('imsStore/cancelAllocation')?>",
- type: "post",
- dataType:'json',
- data: {atId:atId},
- success: function (res) {
- layer.closeAll();
- if (res.status == 1) {
- obj.remove();
- layer.msg('操作成功');
- window.location.reload()
- } else {
- if(res.msg!=undefined){
- layer.msg(res.msg);
- }else{
- layer.msg('操作失败');
- }
- }
- }
- });
- });
- });
- });
- </script>
- </body>
- </html>
|