123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- <!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/ims/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/jquery.datetimepicker.css"/>
- <link rel="stylesheet" type="text/css" href="/css/ims/ace.min.css"/>
- <style>
- .green {
- color: green;
- }
- .red {
- color: red;
- }
- .ims-box {
- margin: 20px;
- }
- .screen > div {
- float: left;
- margin-right: 8px;
- }
- .screen .date > input {
- height: 30px;
- border-radius: 4px;
- border: 1px solid #ccc;
- box-shadow: none;
- text-indent: 10px;
- }
- .screen .purposeOrderNo > input {
- height: 30px;
- border-radius: 4px;
- border: 1px solid #ccc;
- box-shadow: none;
- text-indent: 10px;
- }
- .screen button {
- padding: 4px 12px;
- }
- .table-box {
- margin-top: 30px;
- }
- .btn-formal-order {
- cursor: pointer;
- }
- .application-number-box {
- margin-top: 50px;
- text-align: center;
- }
- .application-number-box span {
- margin-right: 20px;
- }
- .layui-layer-btn .layui-layer-btn0 {
- border-color: #15ae68 !important;
- background-color: #15ae68 !important;
- color: #fff;
- }
- .btn-date_show{
- display: inline-block;width: 170px;overflow: hidden; text-overflow:ellipsis; white-space: nowrap;
- }
- </style>
- </head>
- <body>
- <div class="ims-box">
- <form action="<?php echo Yii::app()->createUrl('imsSale/goodsChange'); ?>" method="get">
- <div class="screen">
- <select name="seasonId" id="seasonId" style="width: 100px;">
- <option value="0">赛季</option>
- <?php
- if($seasonList){
- foreach ($seasonList as $value){
- if(isset($seasonId) && $seasonId==$value['seasonId']){
- echo '<option value="'.$value['seasonId'].'" selected>'.$value['seasonName'].'</option>';
- }else{
- echo '<option value="'.$value['seasonId'].'">'.$value['seasonName'].'</option>';
- }
- }
- }
- ?>
- </select>
- <span>创建时间:</span>
- <input type="text" name="begin" class="some_class" value="<?php if(isset($begin)) echo $begin;?>" id="some_class_1"/> --
- <input type="text" name="end" class="some_class" value="<?php if(isset($end)) echo $end;?>" id="some_class_2"/>
- <select name="status" id="status" style="width: 100px;">
- <option value="0">审批状态</option>
- <option value="1" <?php if(isset($status) && $status==1) echo 'selected'?>>审批中</option>
- <option value="2" <?php if(isset($status) && $status==2) echo 'selected'?>>已通过</option>
- <option value="3" <?php if(isset($status) && $status==3) echo 'selected'?>>已驳回</option>
- <option value="4" <?php if(isset($status) && $status==4) echo 'selected'?>>已取消</option>
- </select>
- <button type="submit" class="label-primary-s bth-s">查询</button>
- <a href="<?php echo $this->createUrl('imsSale/newGoodsChange')?>" class="label-primary-s bth-s">新建</a>
- <a href="<?php echo $this->createUrl('imsSale/searchGoodsChange')?>" class="label-primary-s bth-s">查询用于商品变更的订单</a>
- </div>
- </form>
- <div class="table-box">
- <table id="intention-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>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if ($list): ?>
- <?php foreach ($list as $item): ?>
- <tr>
- <td><?php echo $item['schoolYearName'];?></td>
- <td><?php echo $item['gradeStr'];?></td>
- <td><?php echo $item['typeStr'];?></td>
- <td><?php echo $item['changeTypeName'];?></td>
- <td><?php echo $item['oldPurposeOrderNo'];?></td>
- <td><?php echo $item['oldOrderNo'];?></td>
- <td><?php echo $item['oldGoodsName'];?></td>
- <td><?php echo $item['oldSellingPrice'];?></td>
- <td><?php echo $item['purposeOrderNo'];?></td>
- <td><?php echo $item['goodsName'];?></td>
- <td><?php echo $item['sellingPrice'];?></td>
- <td><?php echo $item['quantity'];?></td>
- <td><?php echo $item['createTime'];?></td>
- <td><?php echo $item['statusStr'];?></td>
- <td>
- <a href="<?php echo $this->createUrl('imsSale/viewGoodsChange',array('id'=>$item['ogcId']))?>">【查看】</a>
- <?php if($item['status']==0):?>
- <a href="javascript:;" class="btn-urge" businessKey="<?php echo $item['processInfo']['businessKey'] ?>">【催办】</a>
- <a href="javascript:;" class="del-stop-btn" doType="stop" businessKey="<?php echo $item['processInfo']['businessKey'] ?>">【中止】</a>
- <?php endif;?>
- <?php if($item['status']==2 || $item['status']==3):?>
- <!-- <a href="<?php echo $this->createUrl('imsSale/editGoodsChange',array('id'=>$item['ogcId']))?>">【重新提交】</a>-->
- <a href="javascript:;" class="del-stop-btn" doType="del" businessKey="<?php echo $item['processInfo']['businessKey'] ?>">【删除】</a>
- <?php endif;?>
- </td>
- </tr>
- <?php endforeach; ?>
- <?php endif; ?>
- </tbody>
- </table>
- <?php if ($page): ?>
- <div class="col-sm-12">
- <ul class="pagination">
- <?php
- $params = array();
- if (isset($_GET['seasonId']) && $_GET['seasonId']) {
- $params['seasonId'] = $_GET['seasonId'];
- }
- if (isset($_GET['begin']) && $_GET['begin']) {
- $params['begin'] = $_GET['begin'];
- }
- if (isset($_GET['end']) && $_GET['end']) {
- $params['end'] = $_GET['end'];
- }
- if (isset($_GET['status']) && $_GET['status']) {
- $params['status'] = $_GET['status'];
- }
- if (isset($_GET['page'])) {
- $params['page'] = $_GET['page'];
- }else{
- $params['page'] = 1;
- }
- echo formatPage($page, 'imsSale/goodsChange', $params);
- ?>
- </ul>
- </div>
- <?php endif; ?>
- </div>
- </div>
- <script src="/js/productset/jquery.min.js"></script>
- <script src="/js/ims/jquery.datetimepicker.js"></script>
- <script src="/js/ims/xsgl.js"></script>
- <script src="/js/layer/layer.js"></script>
- <script>
- $(document).ready(function () {
- $('.some_class').datetimepicker({
- format: "Y-m-d", //格式化日期
- timepicker: false //关闭时间选项
- });
- //催办
- $("body").on("click", ".btn-urge", function () {
- var flag = true;
- var businessKey = $(this).attr('businessKey');
- layer.open({
- type: 1,
- title: '催办',
- btn: ['确定', '取消'],
- area: ['600px', '400px'], //宽高
- btnAlign: 'c',
- content: '<p style="color: red;display: none;" class="alert-msg"></p><div class="urge-layer-box"><span>内容:</span><textarea rows="10" cols="60" id="urgeText" /></div>',
- yes: function (index, layero) {
- //提交
- var text = $('#urgeText').val();
- var data = {
- 'smeDesc': text,
- 'businessKey': businessKey
- };
- if ($.trim(text)) {
- if (flag) {
- flag = false;
- $.ajax({
- type: 'post',
- url: "<?php echo Yii::app()->createUrl('imsSale/urge');?>",
- data: data,
- dataType: 'json',
- success: function (data) {
- if (data.status) {
- layer.closeAll();
- location.reload();
- } else {
- flag = true;
- $('.alert-msg').html(data.msg).fadeIn();
- }
- },
- error: function () {
- flag = true;
- $('.alert-msg').html("异常错误").fadeIn();
- }
- });
- }
- } else {
- $('.alert-msg').html("请填写内容").fadeIn();
- }
- },
- btn2: function (index, layero) {
- //取消按钮
- console.log(111)
- //return false 开启该代码可禁止点击该按钮关闭
- }
- });
- });
- //出库和退库,删除和中止
- $(".del-stop-btn").click(function () {
- var businessKey = $(this).attr('businessKey');
- var doType = $(this).attr('doType');
- $.ajax({
- type: 'get',
- url: "<?php echo Yii::app()->createUrl('imsStore/ajaxOutDelStop');?>",
- data: {'businessKey': businessKey,doType:doType},
- dataType: 'json',
- success: function (data) {
- if (data.status) {
- layer.alert("提交成功", {icon: 1,closeBtn:0},function (index) {
- location.reload();
- layer.closeAll();
- });
- } else {
- layer.alert(data.msg, {icon: 7});
- return false;
- }
- },
- error: function () {
- layer.msg("网络异常");
- return false;
- }
- })
- });
- });
- </script>
- </body>
- </html>
|