123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>新增回款反馈</title>
- <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"/>
- <link rel="stylesheet" type="text/css" href="/css/ims/jquery.datetimepicker.css"/>
- <link type="text/css" rel="stylesheet" href="/js/select/select2.min.css" />
- <style>
- p {
- margin: 0;
- padding: 0;
- }
- .ims-box {
- margin: 20px;
- }
- .screen {
- padding-left: 20px;
- height: 44px;
- line-height: 44px;
- background-color: #eff4fa;
- }
- .screen li {
- float: left;
- margin-right: 65px;
- }
- .bg-d9bf6e {
- margin-left: 5px;
- padding: 0 20px;
- color: #fff;
- background-color: #d9bf6e;
- }
- .list {
- padding: 0 40px;
- /*margin-top: 40px;*/
- overflow: hidden;
- }
- .list h2 {
- line-height: 30px;
- font-size: 14px;
- }
- .list .student-list_box {
- width: 300px;
- }
- .list .student-list_box > ul {
- height: 260px;
- overflow: auto;
- padding: 20px;
- background-color: #eef3ff;
- }
- .list .student-list_box li {
- line-height: 30px;
- cursor: pointer;
- }
- .list .student-selected_box {
- margin-left: 60px;
- }
- .list .student-list {
- display: none;
- margin-left: 20px;
- }
- .list .student-list li.active .btn-select_all {
- display: inline-block;
- }
- .list .student-list span {
- cursor: pointer;
- }
- .list .btn-select_all {
- margin-left: 84px;
- color: #008000;
- }
- .student-name_box li {
- position: relative;
- margin-left: 28px;
- line-height: 30px;
- }
- .student-name_box input {
- position: absolute;
- left: 155px;
- top: 8px;
- }
- .btn-select_all,
- .student-name_box {
- display: none;
- }
- .student-selected {
- width: 320px;
- height: 220px;
- overflow: auto;
- }
- .student-selected li {
- float: left;
- margin-right: 24px;
- margin-bottom: 12px;
- height: 26px;
- line-height: 26px;
- text-indent: 20px;
- background-color: #f2f2f2;
- }
- .student-selected .btn-delete {
- float: right;
- margin-right: 20px;
- color: red;
- cursor: pointer;
- }
- .btn-confirm_purchase {
- display: block;
- margin: 0 auto;
- margin-top: 100px;
- margin-bottom: 50px;
- width: 430px;
- line-height: 54px;
- color: #fff;
- font-family: PingFangSC-Regular, "PingFang SC";
- font-weight: 400;
- font-style: normal;
- font-size: 20px;
- text-align: center;
- background-color: rgba(0, 153, 102, 1);
- cursor: pointer;
- }
- #imgPreview {
- display: inline-block;
- margin-top: 12px;
- }
- #imgPreview > img {
- max-width: 100px;
- max-height: 100px;
- margin-right: 5px;
- }
- .layui-layer-btn .layui-layer-btn0 {
- border-color: #15ae68 !important;
- background-color: #15ae68 !important;
- color: #fff;
- }
- .stop-layer-box, .resubmit-layer-box, .delete-layer-box {
- line-height: 140px;
- text-align: center;
- }
- .table-center th,.table-center td{text-align:center;}
- .table-center .diy_select{float:none;display:inline-block;}
- .out-count-div{display:inline-block;}
- .out-count-div a{display:inline-block;width:20px;height:20px;text-align:center;line-height:20px; background:#999;color:#fff;cursor:pointer}
- .out-count-div a:hover{background:#666;}
- .out-count-div span{margin-left:10px;}
- .activePage{display: inline-block;width: 30px;height: 30px;background: #0e8e54;text-align: center;line-height: 30px;color:#fff;margin-right: 10px;}
- .page{display: inline-block;width: 30px;height: 30px;border:1px solid #0e8e54;text-align: center;line-height: 30px;color:#000;margin-right: 10px;}
- </style>
- </head>
- <body>
- <h3 class="sale-title">新建</h3>
- <form action="" method="post" id="formSubmit">
- <div class="sale-table">
- <div style="margin-bottom:15px;color: red">
- <p>1,使用人数和打印人数每次填写总人数</p>
- <p>2,如果是退款,收费人数和收费金额填写负数</p>
- <p>3,请谨慎填写所有信息</p>
- </div>
- <table width="100%">
- <tr>
- <th>销售订单号</th>
- <td colspan="3">
- <select name="orderId" id="orderId" class="projSelect" style="width: 300px;">
- <option value="0">销售订单号</option>
- <?php
- if(isset($orderList) && $orderList){
- foreach ($orderList as $val){
- echo '<option value="'.$val['orderId'].'" >'.$val['orderNo'].'</option>';
- }
- }
- ?>
- </select>
- </td>
- </tr>
- <tr>
- <th><em class="red">*</em>学年</th>
- <td>
- <select name="schoolYearId" id="schoolYearId" style="width: 100px;">
- <option value="0">选择学年</option>
- <?php if(isset($schoolYear) && $schoolYear):?>
- <?php foreach ($schoolYear as $key => $value): ?>
- <option data-id="<?php echo (strtotime($value['firstSemesterBegin']) < time()) && (time() < strtotime($value['secondSemesterEnd'])) ? 1 : 0; ?>" value="<?php echo $value['schoolYearId']; ?>"><?php echo $value['schoolYearName']; ?></option>
- <?php endforeach; ?>
- <?php endif;?>
- </select>
- </td>
- <th><em class="red">*</em>收费学期</th>
- <td>
- <select name="semester" id="semester" style="width: 100px;">
- <option value="0">选择学期</option>
- <option value="1" <?php if(isset($grade) && $grade==1) echo 'selected';?>>上学期</option>
- <option value="2" <?php if(isset($grade) && $grade==2) echo 'selected';?>>下学期</option>
- <option value="3" <?php if(isset($grade) && $grade==3) echo 'selected';?>>跨学期</option>
- </select>
- </td>
- </tr>
- <tr>
- <th><em class="red">*</em>年级</th>
- <td>
- <select name="grade" id="grade" style="width: 100px;">
- <option value="0">选择年级</option>
- <option value="1">高一</option>
- <option value="2">高二</option>
- <option value="3">高三</option>
- </select>
- </td>
- <th><em class="red">*</em>商品</th>
- <td>
- <select name="goodsId" id="goodsId" style="width: 100px;">
- <option value="0">选择商品</option>
- <?php if ($goodList): ?>
- <?php foreach ($goodList as $good): ?>
- <option value="<?php echo $good['goodsId'] ?>"><?php echo $good['goodsName'] ?></option>
- <?php endforeach; ?>
- <?php endif; ?>
- </select>
- </td>
- </tr>
- <tr>
- <th><em class="red">*</em>使用人数</th>
- <td colspan="3"> <input type="text" placeholder="使用人数" class="int_number_check" name="use_person" value="">人</td>
- </tr>
- <tr>
- <th><em class="red">*</em>打印人数</th>
- <td colspan="3"> <input type="text" placeholder="打印人数" class="int_number_check" name="down_person" value="">人</td>
- </tr>
- <tr>
- <th><em class="red">*</em>收费单价</th>
- <td colspan="3"> <input type="text" placeholder="收费单价" class="float_number_check" name="price" value="">元</td>
- </tr>
- <tr>
- <th><em class="red">*</em>上学期收费人数</th>
- <td > <input type="text" placeholder="收费人数" class="negative_number_check" name="feeNumUp" value="">人 <span class="red">如果是退款,请填写负数</span></td>
- <th><em class="red">*</em>下学期收费人数</th>
- <td > <input type="text" placeholder="收费人数" class="negative_number_check" name="feeNumDown" value="">人 <span class="red">如果是退款,请填写负数</span></td>
- </tr>
- <tr>
- <th><em class="red">*</em>上学期收费金额</th>
- <td > <input type="text" placeholder="收费金额" class="float_number_check" name="priceSumUp" value="">元 <span class="red">如果是退款,请填写负数</span></td>
- <th><em class="red">*</em>下学期收费金额</th>
- <td > <input type="text" placeholder="收费金额" class="float_number_check" name="priceSumDown" value="">元 <span class="red">如果是退款,请填写负数</span></td>
- </tr>
- <tr>
- <th><em class="red">*</em>收费时间</th>
- <td colspan="3"> <input readonly type="text" class="some_class" placeholder="收费时间" name="charge_time" value=""></td>
- </tr>
- <tr>
- <th>汇款时间</th>
- <td colspan="3"> <input readonly type="text" class="some_class" placeholder="汇款时间" name="pay_time" value=""></td>
- </tr>
- <tr>
- <th>备注</th>
- <td colspan="3">
- <textarea rows="5" cols="50" class="use-explain" name="mark"></textarea>
- </td>
- </tr>
- </table>
- <div class="sale-submit">
- <button type="button" class="label-primary-cancle">取消</button>
- <button type="button" class="label-primary-s bth-s" >保存</button>
- </div>
- </div>
- </form>
- <script src="/js/productset/jquery.min.js"></script>
- <script src="/js/ims/jquery.datetimepicker.js"></script>
- <script src="/js/ims/layer/layer.js"></script>
- <script src="/js/ims/xsgl.js"></script>
- <script src="/js/select/select2.min.js"></script>
- <script>
- $(document).ready(function(){
- $('.projSelect').select2();
- var submitFlag=true;
- var orderArr=[];
- <?php
- if(isset($orderList) && $orderList) {
- foreach ($orderList as $val) {
- echo 'var temp={};';
- echo 'temp.grade='.$val['grade'].';';
- echo 'temp.goodsId="'.$val['goodsId'].'";';
- echo 'temp.schoolYearId="'.$val['schoolYearId'].'";';
- echo 'temp.semesterName="'.$val['semesterName'].'";';
- echo 'temp.orderId="'.$val['orderId'].'";';
- echo "orderArr.push(temp);";
- }
- }
- ?>
- $('.label-primary-cancle').click(function(){
- window.location.href="<?php echo $this->createUrl('imsSale/payment')?>";
- });
- $('.some_class').datetimepicker({
- format: "Y-m-d", //格式化日期
- timepicker: false //关闭时间选项
- });
- // $('.float_number_check').change(function(){
- // $(this).val($(this).val().replace(/[^\d.+]/g,""));
- // });
- $('.negative_number_check').change(function(){
- $(this).val($(this).val().replace(/[^\d-+]/g,""));
- });
- $('.int_number_check').change(function(){
- $(this).val($(this).val().replace(/[^\d+]/g,""));
- });
- $('.bth-s').click(function(){
- if(!submitFlag){
- return false;
- }
- if($('#schoolYearId').val()==0){
- layer.msg('请选择学年');
- return false;
- }
- if($('#semester').val()==0){
- layer.msg('请选择学期');
- return false;
- }
- if($('#grade').val()==0){
- layer.msg('请选择年级');
- return false;
- }
- if($('#goodsId').val()==0){
- layer.msg('请选择商品');
- return false;
- }
- if($('input[name=use_person]').val()=="" || $('input[name=use_person]').val()==0){
- layer.msg('请输入使用人数');
- return false;
- }
- if(!$.isNumeric($('input[name=use_person]').val())){
- layer.msg('使用人数不正确');
- return false;
- }
- if($('input[name=down_person]').val()=="" || $('input[name=down_person]').val()==0){
- layer.msg('请输入打印人数');
- return false;
- }
- if(!$.isNumeric($('input[name=down_person]').val())){
- layer.msg('打印人数不正确');
- return false;
- }
- if($('input[name=price]').val()=="" || $('input[name=price]').val()==0){
- layer.msg('请输入收费单价');
- return false;
- }
- if(isNaN($('input[name=price]').val()) || parseFloat($('input[name=price]').val())<=0){
- layer.msg('收费单价格式不正确');
- return false;
- }
- if($('#semester').val()==1){
- feeNum=$('input[name=feeNumUp]').val();
- priceSum=$('input[name=priceSumUp]').val();
- if(feeNum=="" || feeNum==0){
- layer.msg('请输入收费人数');
- return false;
- }
- if(!$.isNumeric(feeNum)){
- layer.msg('收费人数不正确');
- return false;
- }
- if(priceSum=="" || priceSum==0){
- layer.msg('请输入收费金额');
- return false;
- }
- if(isNaN(priceSum)){
- layer.msg('收费金额格式不正确');
- return false;
- }
- }else if($('#semester').val()==2){
- feeNum=$('input[name=feeNumDown]').val();
- priceSum=$('input[name=priceSumDown]').val();
- if(feeNum=="" || feeNum==0){
- layer.msg('请输入收费人数');
- return false;
- }
- if(!$.isNumeric(feeNum)){
- layer.msg('收费人数不正确');
- return false;
- }
- if(priceSum=="" || priceSum==0){
- layer.msg('请输入收费金额');
- return false;
- }
- if(isNaN(priceSum)){
- console.log(priceSum);
- layer.msg('收费金额格式不正确');
- return false;
- }
- }else{
- feeNumUp=$('input[name=feeNumUp]').val();
- priceUp=$('input[name=priceSumUp').val();
- feeNumDown=$('input[name=feeNumDown]').val();
- priceDown=$('input[name=priceSumDown]').val();
- if((feeNumUp=="" || feeNumUp==0 || !$.isNumeric(feeNumUp)) && (feeNumDown=="" || feeNumDown==0 || !$.isNumeric(feeNumDown))){
- console.log(feeNumUp);
- console.log(feeNumDown);
- layer.msg('收费人数不正确');
- return false;
- }
- if((priceUp=="" || priceUp==0 || isNaN(priceUp)) && (priceDown=="" || priceDown==0 || isNaN(priceDown)) ){
- layer.msg('收费金额格式不正确');
- return false;
- }
- }
- if($('input[name=charge_time]').val()==''){
- layer.msg('请输入收费时间');
- return false;
- }
- if($('#schoolYearId').find("option:selected").attr('data-id') == 0){
- layer.confirm('当前时间不属于所选学年,确定保存嘛?', {
- btn: ['确定','取消'] //按钮
- },function(){
- submitFlag=false;
- $('#formSubmit').submit();
- });
- }else{
- submitFlag=false;
- $('#formSubmit').submit();
- }
- });
- $('#orderId').change(function(){
- orderId=$(this).val();
- $.each(orderArr,function (i,val) {
- if(val.orderId==orderId){
- $('#grade').val(val.grade);
- $('#schoolYearId').val(val.schoolYearId);
- $('#goodsId').val(val.goodsId);
- if(val.semesterName=='上学期'){
- $('#semester').val(1);
- changeSemester(1)
- }else if(val.semesterName=='下学期'){
- $('#semester').val(2);
- changeSemester(2)
- }else if(val.semesterName=='跨学期'){
- $('#semester').val(3);
- changeSemester(3)
- }
- }
- })
- });
- })
- $('#semester').change(function(){
- val=$(this).val();
- changeSemester(val)
- });
- function changeSemester(val){
- if(val==1){
- $('input[name=feeNumUp]').attr('readonly',false);
- $('input[name=priceSumUp]').attr('readonly',false);
- $('input[name=feeNumDown]').attr('readonly',true);
- $('input[name=priceSumDown]').attr('readonly',true);
- $('input[name=feeNumDown]').val(0);
- $('input[name=priceSumDown]').val(0);
- }else if(val==2){
- $('input[name=feeNumUp]').attr('readonly',true);
- $('input[name=priceSumUp]').attr('readonly',true);
- $('input[name=feeNumDown]').attr('readonly',false);
- $('input[name=priceSumDown]').attr('readonly',false);
- $('input[name=feeNumUp]').val(0);
- $('input[name=priceSumUp]').val(0);
- }else if(val==3){
- $('input[name=feeNumUp]').attr('readonly',false);
- $('input[name=priceSumUp]').attr('readonly',false);
- $('input[name=feeNumDown]').attr('readonly',false);
- $('input[name=priceSumDown]').attr('readonly',false);
- }
- }
- </script>
- </body>
- </html>
|