Browse Source

后台项目管理功能

NoNZero 8 years ago
parent
commit
8838820d90

+ 6 - 2
protected/controller/ClientController.php

@@ -1166,8 +1166,12 @@ class ClientController extends DooController
             if (isset($fileArray['filepath'])) {
                 $pidArray = $this->actmeasure->getRowByPmid($this->params['tenderid']);
                 $memoStr = iconv('GBK', 'UTF-8', $_POST['Memo']);
-                $fname = basename($fileArray['filename'], '.' . $fileArray['fileext']);
-                $filenameStr = iconv('GBK', 'UTF-8', $fname);
+                $pathinfo_dirname = pathinfo($fileArray['filepath'], PATHINFO_DIRNAME);
+                $filenameStr2 = iconv('GBK', 'UTF-8', $fileArray['filename']);
+                $url = $pathinfo_dirname . '/' . $filenameStr2;
+                setlocale(LC_ALL, 'zh_CN.UTF-8');
+                $fname = pathinfo($url);
+                $filenameStr = $fname['filename'];
                 $postArray = array('ownerid' => $this->params['uid'], 'pid' => $pidArray['pid'], 'pmid' => $this->params['tenderid'], 'filename' => $filenameStr, 'filesize' => $fileArray['filesize'], 'fileext' => $fileArray['fileext'], 'filepath' => $fileArray['filepath']);
                 $iaid = $this->itemfile->insertItemFileRecord($postArray);
                 if ($iaid > 1) {

+ 1 - 1
protected/controller/ProjectController.php

@@ -483,7 +483,7 @@ class ProjectController extends DooController
         $this->data['pid'] = $this->params['pid'];
         $this->data['pmid'] = $this->params['pmid'];
         $this->data['mpid'] = $this->params['mpid'];
-        $this->data['user'] = $this->params['userid'];
+        $this->data['userid'] = $this->params['userid'];
         $this->data['num'] = $this->params['numpname'];
         $this->data['pager'] = $pager->output;
         $this->render('w-project-section-files', $this->data, TRUE);

+ 1 - 1
protected/controller/RProjectController.php

@@ -366,7 +366,7 @@ class RProjectController extends DooController
         $this->data['pid'] = $this->params['pid'];
         $this->data['pmid'] = $this->params['pmid'];
         $this->data['mpid'] = $numStatusArray['mpid'];
-        $this->data['user'] = $this->params['userid'];
+        $this->data['userid'] = $this->params['userid'];
         $this->data['num'] = $this->params['numpname'];
         $this->data['pager'] = $pager->output;
         $this->render('r-project-section-files', $this->data, TRUE);

+ 1 - 1
protected/controller/SProjectController.php

@@ -432,7 +432,7 @@ class SProjectController extends DooController
         $this->data['pid'] = $this->params['pid'];
         $this->data['pmid'] = $this->params['pmid'];
         $this->data['mpid'] = $this->params['mpid'];
-        $this->data['user'] = $this->params['userid'];
+        $this->data['userid'] = $this->params['userid'];
         $this->data['num'] = $this->params['numpname'];
         $this->data['pager'] = $pager->output;
         $this->render('s-project-section-files', $this->data, TRUE);

+ 6 - 8
protected/view/r-project-section-files-recover.html

@@ -34,8 +34,7 @@
                         </a>
                         <ul class="dropdown-menu">
                             <!-- loop allconArray -->
-                            <li><a href="{{rootUrl}}project/{{currproArray.pid}}/section">{{allconArray'
-                                value.stname}}</a></li>
+                            <li><a href="{{rootUrl}}project/{{currproArray.pid}}/section">{{allconArray' value.stname}}</a></li>
                             <!-- endloop -->
                         </ul>
                     </li>
@@ -47,8 +46,7 @@
                         <ul class="dropdown-menu">
                             <!-- loop allactmeasureArray -->
                             <li>
-                                <a href="{{rootUrl}}project/{{currproArray.pid}}/section/{{allactmeasureArray' value.pmid}}/detail">{{allactmeasureArray'
-                                    value.pmname}}</a></li>
+                                <a href="{{rootUrl}}project/{{currproArray.pid}}/section/{{allactmeasureArray' value.pmid}}/detail">{{allactmeasureArray' value.pmname}}</a></li>
                             <!-- endloop -->
                             <!--				    <li class="divider"></li>
                                                 <li><a href="#">共18标段,查看更多</a></li>-->
@@ -81,7 +79,7 @@
                         <tr>
                             <th width="">文件名</th>
                             <th width="">期</th>
-                            <th width="">节点</th>
+                            <!--<th width="">节点</th>-->
                             <th width="">上传者</th>
                             <th width="">上传时间</th>
                             <th width="">删除</th>
@@ -105,7 +103,7 @@
                                     id="fname_{{itemMeasureArray' value.imnid}}"
                                     href="#">{{itemMeasureArray' value.filename}}</a></td>
                             <td>第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期</td>
-                            <td>{{itemMeasureArray' value.pmname}}</td>
+                            <!--<td>{{itemMeasureArray' value.pmname}}</td>-->
                             <td width="">{{itemMeasureArray' value.realname}}</td>
                             <td width="">{{formatDate(itemMeasureArray' value.intime,'Y-m-d')}}</td>
                             <td class="text-error">{{itemMeasureArray' value.delname}}</td>
@@ -159,7 +157,7 @@
                             <th width="60">格式</th>
                             <td id="fileico"><span class="fileico ico-jpg"></span>.jpg</td>
                             <th width="60">所在期</th>
-                            <td id="numpname">第二期</td>
+                            <td id="numpname2">第二期</td>
                         </tr>
                         <tr>
                             <th width="60">上传者</th>
@@ -253,7 +251,7 @@
             $("#realname").html(realname);
             $("#intime").html(intime);
             $("#tips").html(tips);
-            $("#numpname").html(numpname);
+            $("#numpname2").html(numpname);
             $("#imnid").val(imnid);
             $(".filesDetail").show();
         });

+ 6 - 6
protected/view/r-project-section-files.html

@@ -81,7 +81,7 @@
                     <select id="uploaduser" class="span2">
                         <option value="0">上传者</option>
                         <!-- loop owneridArray -->
-                        <option <!-- if {{user}} == {{owneridArray' value.ownerid}} --> selected <!-- endif -->
+                        <option <!-- if {{userid}} == {{owneridArray' value.ownerid}} --> selected <!-- endif -->
                         value="{{owneridArray' value.ownerid}}">{{owneridArray' value.name}}</option>
                         <!-- endloop -->
                     </select>
@@ -97,7 +97,7 @@
                         <tr>
                             <th width="">文件名</th>
                             <th width="">期</th>
-                            <th width="">节点</th>
+                            <!--<th width="">节点</th>-->
                             <th width="">上传者</th>
                             <th width="">上传时间</th>
                             <th width="40">操作</th>
@@ -118,7 +118,7 @@
                                     numpname="第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期"
                                     id="fname_{{itemMeasureArray' value.imnid}}">{{itemMeasureArray' value.filename}}</a></td>
                             <td>第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期</td>
-                            <td>{{itemMeasureArray' value.pmname}}</td>
+                            <!--<td>{{itemMeasureArray' value.pmname}}</td>-->
                             <td width="">{{itemMeasureArray' value.realname}}</td>
                             <td width="">{{formatDate(itemMeasureArray' value.intime,'Y-m-d')}}</td>
                             <td>
@@ -161,7 +161,7 @@
                             <th width="60">格式</th>
                             <td id="fileico"><span class="fileico ico-jpg"></span>.jpg</td>
                             <th width="60">所在期</th>
-                            <td id="numpname">第二期</td>
+                            <td id="numpname2">第二期</td>
                         </tr>
                         <tr>
                             <th width="60">上传者</th>
@@ -306,7 +306,7 @@
             $("#realname").html(realname);
             $("#intime").html(intime);
             $("#tips").html(tips);
-            $("#numpname").html(numpname);
+            $("#numpname2").html(numpname);
             $(".filesDetail").show();
             $("#fid").val(imnid);
             $("#iaid").val(iaid);
@@ -318,7 +318,7 @@
         });
 
         $("#del").click(function () {
-            var imnid = $(this).attr('imnid');
+            var imnid = $("#fid").val();
             $.ajax({
                 type: "POST",
                 dataType: "json",

+ 4 - 4
protected/view/s-project-section-files-recover.html

@@ -74,7 +74,7 @@
                         <tr>
                             <th width="">文件名</th>
                             <th width="">期</th>
-                            <th width="">节点</th>
+                            <!--<th width="">节点</th>-->
                             <th width="">上传者</th>
                             <th width="">上传时间</th>
                             <th width="">删除</th>
@@ -98,7 +98,7 @@
                                     id="fname_{{itemMeasureArray' value.imnid}}"
                                     href="#">{{itemMeasureArray' value.filename}}</a></td>
                             <td>第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期</td>
-                            <td>{{itemMeasureArray' value.pmname}}</td>
+                            <!--<td>{{itemMeasureArray' value.pmname}}</td>-->
                             <td width="">{{itemMeasureArray' value.realname}}</td>
                             <td width="">{{formatDate(itemMeasureArray' value.intime,'Y-m-d')}}</td>
                             <td class="text-error">{{itemMeasureArray' value.delname}}</td>
@@ -152,7 +152,7 @@
                             <th width="60">格式</th>
                             <td id="fileico"><span class="fileico ico-jpg"></span>.jpg</td>
                             <th width="60">所在期</th>
-                            <td id="numpname">第二期</td>
+                            <td id="numpname2">第二期</td>
                         </tr>
                         <tr>
                             <th width="60">上传者</th>
@@ -246,7 +246,7 @@
             $("#realname").html(realname);
             $("#intime").html(intime);
             $("#tips").html(tips);
-            $("#numpname").html(numpname);
+            $("#numpname2").html(numpname);
             $("#imnid").val(imnid);
             $(".filesDetail").show();
         });

+ 5 - 5
protected/view/s-project-section-files.html

@@ -76,7 +76,7 @@
                     <select id="uploaduser" class="span2">
                         <option value="0">上传者</option>
                         <!-- loop owneridArray -->
-                        <option <!-- if {{user}} == {{owneridArray' value.ownerid}} --> selected <!-- endif -->
+                        <option <!-- if {{userid}} == {{owneridArray' value.ownerid}} --> selected <!-- endif -->
                         value="{{owneridArray' value.ownerid}}">{{owneridArray' value.name}}</option>
                         <!-- endloop -->
                     </select>
@@ -92,7 +92,7 @@
                         <tr>
                             <th width="">文件名</th>
                             <th width="">期</th>
-                            <th width="">节点</th>
+                            <!--<th width="">节点</th>-->
                             <th width="">上传者</th>
                             <th width="">上传时间</th>
                             <th width="40">操作</th>
@@ -113,7 +113,7 @@
                                     numpname="第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期"
                                     id="fname_{{itemMeasureArray' value.imnid}}">{{itemMeasureArray' value.filename}}</a></td>
                             <td>第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期</td>
-                            <td>{{itemMeasureArray' value.pmname}}</td>
+                            <!--<td>{{itemMeasureArray' value.pmname}}</td>-->
                             <td width="">{{itemMeasureArray' value.realname}}</td>
                             <td width="">{{formatDate(itemMeasureArray' value.intime,'Y-m-d')}}</td>
                             <td>
@@ -156,7 +156,7 @@
                             <th width="60">格式</th>
                             <td id="fileico"><span class="fileico ico-jpg"></span>.jpg</td>
                             <th width="60">所在期</th>
-                            <td id="numpname">第二期</td>
+                            <td id="numpname2">第二期</td>
                         </tr>
                         <tr>
                             <th width="60">上传者</th>
@@ -301,7 +301,7 @@
             $("#realname").html(realname);
             $("#intime").html(intime);
             $("#tips").html(tips);
-            $("#numpname").html(numpname);
+            $("#numpname2").html(numpname);
             $(".filesDetail").show();
             $("#fid").val(imnid);
             $("#iaid").val(iaid);

+ 6 - 8
protected/view/w-project-section-files-recover.html

@@ -34,8 +34,7 @@
                         </a>
                         <ul class="dropdown-menu">
                             <!-- loop allconArray -->
-                            <li><a href="{{rootUrl}}project/{{currproArray.pid}}/section">{{allconArray'
-                                value.stname}}</a></li>
+                            <li><a href="{{rootUrl}}project/{{currproArray.pid}}/section">{{allconArray' value.stname}}</a></li>
                             <!-- endloop -->
                         </ul>
                     </li>
@@ -47,8 +46,7 @@
                         <ul class="dropdown-menu">
                             <!-- loop allactmeasureArray -->
                             <li>
-                                <a href="{{rootUrl}}project/{{currproArray.pid}}/section/{{allactmeasureArray' value.pmid}}/detail">{{allactmeasureArray'
-                                    value.pmname}}</a></li>
+                                <a href="{{rootUrl}}project/{{currproArray.pid}}/section/{{allactmeasureArray' value.pmid}}/detail">{{allactmeasureArray' value.pmname}}</a></li>
                             <!-- endloop -->
                             <!--				    <li class="divider"></li>
                                                 <li><a href="#">共18标段,查看更多</a></li>-->
@@ -77,7 +75,7 @@
                         <tr>
                             <th width="">文件名</th>
                             <th width="">期</th>
-                            <th width="">节点</th>
+                            <!--<th width="">节点</th>-->
                             <th width="">上传者</th>
                             <th width="">上传时间</th>
                             <th width="">删除</th>
@@ -101,7 +99,7 @@
                                     id="fname_{{itemMeasureArray' value.imnid}}"
                                     href="#">{{itemMeasureArray' value.filename}}</a></td>
                             <td>第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期</td>
-                            <td>{{itemMeasureArray' value.pmname}}</td>
+                            <!--<td>{{itemMeasureArray' value.pmname}}</td>-->
                             <td width="">{{itemMeasureArray' value.realname}}</td>
                             <td width="">{{formatDate(itemMeasureArray' value.intime,'Y-m-d')}}</td>
                             <td class="text-error">{{itemMeasureArray' value.delname}}</td>
@@ -155,7 +153,7 @@
                             <th width="60">格式</th>
                             <td id="fileico"><span class="fileico ico-jpg"></span>.jpg</td>
                             <th width="60">所在期</th>
-                            <td id="numpname">第二期</td>
+                            <td id="numpname2">第二期</td>
                         </tr>
                         <tr>
                             <th width="60">上传者</th>
@@ -249,7 +247,7 @@
             $("#realname").html(realname);
             $("#intime").html(intime);
             $("#tips").html(tips);
-            $("#numpname").html(numpname);
+            $("#numpname2").html(numpname);
             $("#imnid").val(imnid);
             $(".filesDetail").show();
         });

+ 5 - 5
protected/view/w-project-section-files.html

@@ -77,7 +77,7 @@
                     <select id="uploaduser" class="span2">
                         <option value="0">上传者</option>
                         <!-- loop owneridArray -->
-                        <option <!-- if {{user}} == {{owneridArray' value.ownerid}} --> selected <!-- endif -->
+                        <option <!-- if {{userid}} == {{owneridArray' value.ownerid}} --> selected <!-- endif -->
                         value="{{owneridArray' value.ownerid}}">{{owneridArray' value.name}}</option>
                         <!-- endloop -->
                     </select>
@@ -93,7 +93,7 @@
                         <tr>
                             <th width="">文件名</th>
                             <th width="">期</th>
-                            <th width="">节点</th>
+                            <!--<th width="">节点</th>-->
                             <th width="">上传者</th>
                             <th width="">上传时间</th>
                             <th width="40">操作</th>
@@ -114,7 +114,7 @@
                                     numpname="第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期"
                                     id="fname_{{itemMeasureArray' value.imnid}}">{{itemMeasureArray' value.filename}}</a></td>
                             <td>第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期</td>
-                            <td>{{itemMeasureArray' value.pmname}}</td>
+                            <!--<td>{{itemMeasureArray' value.pmname}}</td>-->
                             <td width="">{{itemMeasureArray' value.realname}}</td>
                             <td width="">{{formatDate(itemMeasureArray' value.intime,'Y-m-d')}}</td>
                             <td>
@@ -157,7 +157,7 @@
                             <th width="60">格式</th>
                             <td id="fileico"><span class="fileico ico-jpg"></span>.jpg</td>
                             <th width="60">所在期</th>
-                            <td id="numpname">第二期</td>
+                            <td id="numpname2">第二期</td>
                         </tr>
                         <tr>
                             <th width="60">上传者</th>
@@ -302,7 +302,7 @@
             $("#realname").html(realname);
             $("#intime").html(intime);
             $("#tips").html(tips);
-            $("#numpname").html(numpname);
+            $("#numpname2").html(numpname);
             $(".filesDetail").show();
             $("#fid").val(imnid);
             $("#iaid").val(iaid);