Explorar el Código

清单精灵窗口调整

zhongzewei hace 7 años
padre
commit
2b790c0475

+ 1 - 1
web/building_saas/glj/html/project_glj.html

@@ -25,7 +25,7 @@
                 <li class="nav-item"><a class="nav-link" href="javascript:void(0)" id="ZYCL">主要材料</a></li>-->
             </ul>
         </div>
-        <div class="main-content col p-0 " id="project-glj-main">
+        <div class="main-content col p-0 " id="project-glj-main" style="overflow: hidden">
             <div class="top-content" id="projectGljTop">
                 <div class="main-data-top" style="width: 100% " id="project_glj_sheet">
                 </div>

+ 6 - 2
web/building_saas/main/html/main.html

@@ -439,13 +439,17 @@
                                       <div class="container-fluid" id="qdjl" role="tabpanel">
                                           <div class="row p-0" style="background: #efefef">
                                               <div class="col-6 p-0">
+                                                  <div id="qdjlTools" style="width: calc(100% - 5px); border-bottom: solid 1px lightgrey;">
+                                                      <a id="elfInsertRation" href="javascript:void(0);" class="btn btn-sm btn-primary px-1 m-1">应用选项</a>
+                                                      <a id="elfInsertSingle" href="javascript:void(0)" class="btn btn-sm btn-primary px-1">应用单条</a>
+                                                  </div>
                                                   <div class="main-data-bottom ovf-hidden" id="elfItems">
                                                   </div>
                                               </div>
-                                              <div class="col-6 p-1">
+                                              <!--<div class="p-1">
                                                   <p class="mt-3"><a id="elfInsertRation" href="javascript:void(0);" class="btn btn-sm btn-primary">应用选项</a></p>
                                                   <p><a id="elfInsertSingle" href="javascript:void(0)" class="btn btn-sm btn-primary">应用单条</a></p>
-                                              </div>
+                                              </div>-->
                                           </div>
                                       </div>
                                   </div>

+ 1 - 1
web/building_saas/main/js/main.js

@@ -64,7 +64,7 @@ function getMainResizeEles() {
         min: 180,
         max: `$(window).height()-$('.header').height()-$('#headerToolsBar').height()-180-5`,
         notTopSpread: 0,
-        notBottomSpread: $('#bottom_div ul').height(),
+        notBottomSpread: $('#bottom_div ul').height() + $('#qdjlTools').height(),
         totalHeight: `$(window).height()-$('.header').height()-$('#headerToolsBar').height()-5`
     };
     return mainResizeEles;

+ 1 - 2
web/building_saas/main/js/models/ration.js

@@ -815,8 +815,7 @@ var Ration = {
                 if (node.data.type == billType.FX || node.data.type == billType.BX) return true;  // 分项、补项
                 if (calcTools.isLeafBill(node)
                     && (node.data.type != billType.DXFY)
-                    && (node.data.type != billType.FB)
-                    && project.Bills.isMeasure(node)) return true;  // 叶子清单项
+                    && (node.data.type != billType.FB)) return true;  // 叶子清单项
             };
 
             return false;

+ 1 - 1
web/building_saas/main/js/views/project_view.js

@@ -1363,7 +1363,7 @@ var projectObj = {
                     }
                 },
                 "insertGLJ": {
-                    name: "插入人材机",
+                    name: "插入设备",
                     icon: 'fa-sign-in',
                     disabled: function () {
                         if (projectReadOnly) {

+ 31 - 28
web/building_saas/pm/js/pm_newMain.js

@@ -3444,14 +3444,13 @@ $('#share-confirm').click(function(){
         $('#shareToInfo').height(tbodyTotalHeight);
         $('#shareToInfo').append($tr);
         //更新缓存
-       // if (shareSeleted.data.shareInfo.length === 0) {
-            shareSeleted.data.shareInfo = shareSeleted.data.shareInfo.concat(shareData);
-            let sheet = projTreeObj.workBook.getSheet(0);
-            projTreeObj.renderSheetFuc(sheet, function () {
-                sheet.invalidateLayout();
-                sheet.repaint();
-            });
-       // }
+        shareSeleted.data.shareInfo = shareSeleted.data.shareInfo.concat(shareData);
+        let sheet = projTreeObj.workBook.getSheet(0);
+        projTreeObj.renderSheetFuc(sheet, function () {
+            sheet.invalidateLayout();
+            sheet.repaint();
+        });
+        bindCancelShareCheck(shareSeleted);
         $.bootstrapLoading.end();
         $('#shareFindDiv').hide();
         $('#share-confirm').addClass('disabled');
@@ -3460,16 +3459,6 @@ $('#share-confirm').click(function(){
         $('#share-confirm').removeClass('disabled');
     });
 });
-//允许拷贝
-/*$('#allowCopy').change(function () {
-    let checked = $(this).prop('checked');
-    if(checked){
-        $('#allowCopyHint').show();
-    }
-    else{
-        $('#allowCopyHint').hide();
-    }
-});*/
 
 //批量替换文件,切换建设项目
 $('#otherProject').change(function(){
@@ -3550,6 +3539,29 @@ function setShareToModal(selected){
         $('#shareToInfo').height(tbodyTotalHeight);
         let infoHtml = infoArr.join('');
         $('#shareToInfo').html(infoHtml);
+        bindCancelShareCheck(selected);
+    });
+}
+
+//取消分享的勾选操作
+//@param {Object}selected(选中项目节点) @return {void}
+function bindCancelShareCheck(selected) {
+    $('#shareToInfo input[value="cancelShare"]').unbind('click');
+    $('#shareToInfo input[value="cancelShare"]').click(function () {
+        let index = $(this).parent().parent().index() - 1,
+            $coo = $(this).parent().prev().children(),
+            $copy = $(this).parent().prev().prev().children();
+        let isCancel = $(this).prop('checked');
+        if (isCancel) {//取消分享,取消拷贝、协作勾选
+            $coo.prop('checked', false);
+            $copy.prop('checked', false);
+        } else {//取消取消分享,恢复原本的拷贝、协作勾选状态
+            let shareData = selected.data.shareInfo[index];
+            if (shareData) {
+                $coo.prop('checked', shareData.allowCooperate);
+                $copy.prop('checked', shareData.allowCopy);
+            }
+        }
     });
 }
 //更新项目分享信息
@@ -3566,7 +3578,7 @@ function updateShareInfo(selected){
         orgShareInfo = [];
     //数据不同才提交
     for (let shareData of selected.data.shareInfo) {
-        orgShareInfo.push({userID: shareData.userID, allowCopy: shareData.allowCopy, allowCooperate: shareData.allowCooperate})
+        orgShareInfo.push({userID: shareData.userID, allowCopy: shareData.allowCopy, allowCooperate: shareData.allowCooperate});
     }
     for(let i = 0; i < usersTr.length; i++){
         let userTr = usersTr[i];
@@ -3591,15 +3603,6 @@ function updateShareInfo(selected){
             sheet.repaint();
         });
     });
-    /*CommonAjax.post('/pm/api/updateProjects', {user_id: userID, updateData: [{updateType: 'update', updateData: {ID: selected.data.ID, shareInfo: newShareInfo}}]}, function () {
-        //todo 更新
-        selected.data.shareInfo = newShareInfo;
-        let sheet = projTreeObj.workBook.getSheet(0);
-        projTreeObj.renderSheetFuc(sheet, function () {
-            sheet.invalidateLayout();
-            sheet.repaint();
-        });
-    });*/
 }
 
 //刷新建设项目汇总金额信息