瀏覽代碼

1.6.0正式版本

likeku 8 年之前
父節點
當前提交
02ea4c2ad5

二進制
global/images/android-code.png


+ 37 - 0
protected/class/attfile.php

@@ -140,6 +140,43 @@ class attFile
         return $this->__file->update(array('where' => 'pmid=? and numpname=? and times=? and isnew=2', 'param' => array($pmid, $numpname, $times)));
     }
 
+    public function delMyAttFile($pmid, $numpname, $times, $uid)
+    {
+        return $this->__file->delete(array('where' => 'pmid=? and numpname=? and times=? and auditoruid=?', 'param' => array($pmid, $numpname, $times, $uid)));
+    }
+
+    public function getMyAttFile($pmid, $numpname, $times, $uid)
+    {
+        return $this->__file->getOne(array('where' => 'pmid=? and numpname=? and times=? and auditoruid=?', 'param' => array($pmid, $numpname, $times, $uid), 'asArray' => true));
+    }
+
+    public function getCurrTimesRowData($pmid, $numpname, $times)
+    {
+        return $this->__file->find(array('where' => 'pmid=? and numpname=? and times=?', 'param' => array($pmid, $numpname, $times), 'asArray' => true));
+    }
+
+    public function updateIsNew($aid)
+    {
+        $this->__file->isnew = 3;
+        return $this->__file->update(array('where' => 'aid=?', 'param' => array($aid)));
+    }
+
+    public function updateIsNew2($aid)
+    {
+        $this->__file->isnew = 2;
+        return $this->__file->update(array('where' => 'aid=?', 'param' => array($aid)));
+    }
+
+    public function delAllTimesFile($pmid, $numpname, $times)
+    {
+        return $this->__file->delete(array('where' => 'pmid=? and numpname=? and times=?', 'param' => array($pmid, $numpname, $times)));
+    }
+
+    public function delAllTimesFile2($mpid)
+    {
+        return $this->__file->delete(array('where' => 'mpid=?', 'param' => array($mpid)));
+    }
+
 }
 
 ?>

+ 1 - 1
protected/config/ver.conf.php

@@ -1,5 +1,5 @@
 <?php
 
 // Version
-$config['ver'] = 'v1.5.0';
+$config['ver'] = 'v1.6.0';
 

文件差異過大導致無法顯示
+ 57 - 8
protected/module/admin/controller/ProController.php


+ 11 - 0
protected/module/admin/model/measureaudit.php

@@ -65,6 +65,17 @@ class AmeasureAudit extends DooModel
         return $this->delete(array('where' => 'maid=?', 'param' => array($maid)));
     }
 
+    public function getLastAuditMsgByPmid($pmid){
+        return $this->getOne(array('where' => 'pmid=?', 'param' => array($pmid), 'desc' => 'maid', 'asArray' => TRUE));
+    }
+
+    public function getAuditsByPmidNumTimes($pmid,$numpname,$times){
+        return $this->find(array('select' => 'maid, auditoruid, mastatus, auditcontent', 'where' => 'pmid=? and numpname=? and times=?', 'asc' => 'last', 'desc' => 'maid', 'param' => array($pmid,$numpname,$times), 'asArray' => TRUE));
+    }
+
+    public function getNumAuditsByPmidNumTimes($pmid,$numpname,$times){
+        return $this->count(array('where' => 'pmid=? and numpname=? and times=?', 'param' => array($pmid,$numpname,$times), 'asArray' => TRUE));
+    }
 }
 
 ?>

+ 4 - 0
protected/module/admin/model/numofper.php

@@ -61,6 +61,10 @@ class Anumofper extends DooModel {
         return $this->delete(array('where' => 'mpid=?', 'param' => array($mpid)));
     }
 
+    public function getMsgByPmidNumTimes($pmid, $numpname, $times) {
+        return $this->getOne(array('where' => 'pmid=? and numpname=? and times=?', 'param' => array($pmid,$numpname,$times), 'asArray' => TRUE));
+    }
+
 }
 
 ?>

+ 62 - 8
protected/module/admin/view/admin-period.html

@@ -23,14 +23,42 @@
     <div class="adminContent">
         <div class="adminMain">
             <legend><a href="{{rootUrl}}manage/item/{{pid}}/section">返回标段列表</a></legend>
+            <!-- if {{isnopm}} == 1 -->
+            <table class="table table-striped table-hover">
+                <legend><a mpid="{{nopmArray.mpid}}" id="adelete" href="#" class="fR btn btn-link colGray" times="{{nopmArray.times}}" nums = "{{nopmArray.numpname}}" data-toggle="modal">删除本期#{{nopmArray.times}}</a>
+                    第{{nopmArray.numpname}}期 #{{nopmArray.times}} (未上报)
+                </legend>
+                <thead>
+                <tr>
+                    <th>审批流程</th>
+                    <th>审批人</th>
+                    <th>审批状态</th>
+                    <th>审批意见</th>
+                    <th>操作</th>
+                </tr>
+                </thead>
+                <tbody>
+                <!-- loop nopmArray.audits -->
+                <tr>
+                    <td>{{nopmArray.audits' value.numaudit}}审</td>
+                    <td>{{nopmArray.audits' value.name}}{{nopmArray.audits' value.company}}</td>
+                    <td><span class="{{nopmArray.audits' value.colors}}">{{nopmArray.audits' value.status}}</span></td>
+                    <td>{{nopmArray.audits' value.auditcontent}}</td>
+                    <td></td>
+                </tr>
+                <!-- endloop -->
+                </tbody>
+            </table>
+            <!-- endif -->
+
             <!-- loop pmArray -->
             <table class="table table-striped table-hover">
-                <legend><!-- if {{keymax}} == {{pmArray' value.numpname}} --><a mpid="{{pmArray' value.mpid}}"
-                                                                                id="adelete" href="#delperiod"
+                <legend><!-- if {{isnopm}} == 0 --><!-- if {{keymax}} == {{pmArray' value.numpname}} --><a mpid="{{pmArray' value.mpid}}"
+                                                                                id="adelete" href="#"
                                                                                 class="fR btn btn-link colGray"
                                                                                 times="{{pmArray' value.times}}"
                                                                                 nums = "{{pmArray' value.numpname}}"
-                                                                                data-toggle="modal">删除本期#{{pmArray' value.times}}</a>
+                                                                                data-toggle="modal">删除本期#{{pmArray' value.times}}</a><!-- endif -->
                     <!-- endif -->第{{pmArray' value.numpname}}期 #{{pmArray' value.times}}
                 </legend>
                 <thead>
@@ -50,6 +78,7 @@
                     <td><span class="{{pmArray' value' value.colors}}">{{pmArray' value' value.status}}</span></td>
                     <td>{{pmArray' value' value.auditcontent}}</td>
                     <td>
+                        <!-- if {{isnopm}} == 0 -->
                         <!-- if {{keymax}} == {{pmArray' value.numpname}} -->
                         <!-- if {{pmArray' value' value.enable}} == '2' -->
                         <a href="#checking" id="achecking" maid="{{pmArray' value' value.maid}}" data-toggle="modal"
@@ -61,6 +90,7 @@
                         <a href="#pass" id="apass" maid="{{pmArray' value' value.maid}}" data-toggle="modal" class="colGreen">通过</a>
                         <!-- endif -->
                         <!-- endif -->
+                        <!-- endif -->
                     </td>
                 </tr>
                 <!-- endloop -->
@@ -74,6 +104,8 @@
 <div class="modal hide fade" id="unpass">
     <input id="maid" name="maid" value="0" type="hidden"/>
     <input id="mpid" name="mpid" value="0" type="hidden"/>
+    <input id="numpname" name="numpname" value="0" type="hidden"/>
+    <input id="times" name="times" value="0" type="hidden"/>
     <div class="modal-header">
         <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
         <h3>设置审批不通过</h3>
@@ -130,6 +162,19 @@
         <button class="btn" data-dismiss="modal">取消</button>
     </div>
 </div>
+<!--删除本标段第一期第一次时不可删除-->
+<div class="modal hide fade" id="delperiod2">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+        <h3>删除本期#<span class="times"></span>确认</h3>
+    </div>
+    <div class="modal-body">
+        <p>当前标段下为第1期#1审批,不能删除本期,但可返回上一层删除这个标段。</p>
+    </div>
+    <div class="modal-footer">
+        <button class="btn" data-dismiss="modal">关闭</button>
+    </div>
+</div>
 
 <script type="text/javascript">autoFlashHeight();</script>
 <script type="text/javascript">
@@ -151,8 +196,15 @@
             var times = $(this).attr('times');
             var nums = $(this).attr('nums');
             $("#mpid").val(mpid);
+            $("#numpname").val(nums);
+            $("#times").val(times-1);
             $(".times").html(times);
             $("#nums").html(nums);
+            if(nums == 1 && times == 1){
+                $('#delperiod2').modal('show');
+            }else{
+                $('#delperiod').modal('show');
+            }
         });
         $("#btnpass").click(function () {
             var maid = $("#maid").val();
@@ -164,7 +216,7 @@
                 url: "{{rootUrl}}manage/item/{{pmid}}/period",
                 success: function (data) {
                     if (data['status'] == "ok") {
-                        $("#delsection2").modal('hide');
+                        $("#pass").modal('hide');
                         window.location.href = "{{rootUrl}}manage/item/{{pmid}}/period";
                     }
                 }
@@ -180,7 +232,7 @@
                 url: "{{rootUrl}}manage/item/{{pmid}}/period",
                 success: function (data) {
                     if (data['status'] == "ok") {
-                        $("#delsection2").modal('hide');
+                        $("#unpass").modal('hide');
                         window.location.href = "{{rootUrl}}manage/item/{{pmid}}/period";
                     }
                 }
@@ -188,15 +240,17 @@
         });
         $("#btndelete").click(function () {
             var mpid = $("#mpid").val();
+            var nums = $("#numpname").val();
+            var times = $("#times").val();
             $.ajax({
                 type: "POST",
                 dataType: "json",
                 cache: false,
-                data: {"op": 'delete', "mpid": mpid},
+                data: {"op": 'delete', "numpname": nums, "times": times},
                 url: "{{rootUrl}}manage/item/{{pmid}}/period",
                 success: function (data) {
                     if (data['status'] == "ok") {
-                        $("#delsection2").modal('hide');
+                        $("#delperiod").modal('hide');
                         window.location.href = "{{rootUrl}}manage/item/{{pmid}}/period";
                     }
                 }
@@ -212,7 +266,7 @@
                 url: "{{rootUrl}}manage/item/{{pmid}}/period",
                 success: function (data) {
                     if (data['status'] == "ok") {
-                        $("#delsection2").modal('hide');
+                        $("#checking").modal('hide');
                         window.location.href = "{{rootUrl}}manage/item/{{pmid}}/period";
                     }
                 }

+ 1 - 1
protected/module/admin/view/admin-section.html

@@ -42,7 +42,7 @@
                 <!-- loop typeArray' value.datarows -->
                 <!-- if {{typeArray' value' value.stid}} == {{typeArray' value.stid}} -->
                 <tr>
-                    <td>{{typeArray' value' value.stid}}</td>
+                    <td>{{typeArray' value' value.pmid}}</td>
                     <td><a href="/manage/item/{{typeArray' value' value.pmid}}/period">{{typeArray' value' value.pmname}}</a></td>
                     <th>{{typeArray' value' value.name}}{{typeArray' value' value.company}}</th>
                     <td>{{typeArray' value' value.contracttotal}}</td>