فهرست منبع

bugs - 子目换算替换人材机修改

zhangweicheng 6 سال پیش
والد
کامیت
7d65843de3

+ 1 - 1
gulpfile.js

@@ -276,7 +276,7 @@ gulp.task('main_css',function () {
     return css(mainOptions);
 })
 
-gulp.task('main_inject',['main_minify'],function () {//,'main_css'
+gulp.task('main_inject',['main_minify'],function () {//, ['main_minify','main_css'  ] main css 打包到一起会出现样式冲突问题, 现改成不打包
     return inject(mainOptions);
 })
 

+ 1 - 0
modules/all_models/ration_coe.js

@@ -22,6 +22,7 @@ var coeListSchema = mongoose.Schema({
     content: String,                    // 说明
     original_code:String,               //原人材机编码
     option_codes:String,                //可选人材机编码
+    option_list:[Schema.Types.Mixed],//下拉列表选项
     select_code:String,
     rationID:String,
     projectID:Number,

+ 1 - 0
modules/all_models/stdRation_coe.js

@@ -25,6 +25,7 @@ const coeListSchema = new Schema({
     content: String,                    // 说明
     original_code:String,               //原人材机编码
     option_codes:String,                //可选人材机编码
+    option_list:[Schema.Types.Mixed],//下拉列表选项
     coes: [coeSchema]
 }, {versionKey: false});
 

+ 1 - 0
modules/main/facade/ration_facade.js

@@ -312,6 +312,7 @@ async function addRationCoe(std,newRation,compilation) {
                 newCoe.content = libCoe.content;
                 newCoe.original_code = libCoe.original_code;
                 newCoe.option_codes = libCoe.option_codes;
+                newCoe.option_list = libCoe.option_list;
                 newCoe.isAdjust=0;
                 newCoe.coes = libCoe.coes;
                 newCoe.rationID = newRation.ID;

+ 1 - 1
public/web/sheet/sheet_common.js

@@ -300,7 +300,7 @@ var sheetCommonObj = {
         //let combo = new GC.Spread.Sheets.CellTypes.ComboBox();
         let dynamicCombo = sheetCommonObj.getDynamicCombo(true);
         if(options){
-            dynamicCombo.itemHeight(options.length).items(options);
+            dynamicCombo.items(options);
             if(editorValueType==true){
                 dynamicCombo.editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.value);
             }

+ 7 - 1
web/building_saas/css/custom.css

@@ -283,7 +283,8 @@ input.text-right{
 }
 
 .cus-width{
-    width: 100%;
+    width: 100px;
+    margin-left: 10px;
 }
 .more{
     padding-left:.25rem!important
@@ -299,4 +300,9 @@ input.text-right{
 
 .zmhs-link{
     padding:0.4em 0.4em !important;
+}
+
+/*修改tooltip默认最大宽度 */
+.tooltip-inner{
+    max-width: 400px !important;
 }

+ 1 - 1
web/building_saas/fee_rates/fee_rate.html

@@ -3,7 +3,7 @@
 <div >
 <div class="toolsbar_feeRate px-1 ">
     <div class="form-inline py-1">
-        <label  class="mx-2" >使用费率文件:<span id="feeRateFileName">费率1</span>(<label class="a_color" id="pop-lv"><span id="projectCount">3</span> 个单位工程使用</label>)
+        <label  class="mx-2" >使用费率文件:<span id="feeRateFileName">费率1</span>(<label class="a_color" id="pop-lv">与<span id="projectCount">3</span> 个单位工程同步</label>)
             <a class="btn btn-sm ml-1" href="#" data-toggle="modal" data-target="#change-lv" id="changFeeRateFile"><i class="fa fa-exchange"></i> 选择其他</a>
             <a class="btn btn-sm ml-1" href="#" data-toggle="modal" id="saveAs" data-target="#copy-lv"><i class="fa fa-files-o"></i> 另存单独用</a></label>
     </div>

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

@@ -5,7 +5,7 @@
 </style>
 <div class="toolsbar px-1" id="projectGljToolsBar">
     <div class="form-inline py-1">
-        <label class="mx-2">使用单价文件:<span id="current-name"></span>(<label class="a_color" id="pop-used-list" data-original-title="" title=""><span id="used-project-count">0</span>个单位工程使用</label>)
+        <label class="mx-2">使用单价文件:<span id="current-name"></span>(<label class="a_color" id="pop-used-list" data-original-title="" title=""><span id="used-project-count">0</span>个单位工程同步</label>)
             <a class="btn btn-sm ml-1" href="#" data-toggle="modal" data-target="#change-unitFile"><i class="fa fa-exchange"></i> 选择其他</a>
             <a class="btn btn-sm ml-1" href="#" data-toggle="modal" data-target="#unitFile-save-as"><i class="fa fa-files-o"></i> 另存单独用</a></label>
     </div>

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

@@ -298,12 +298,11 @@
                                                               <option value="3">模板子目分别放在对应混凝土子目下</option>
                                                           </select>
                                                       </div>
-                                                      <div class="col-1">
+                                                      <div class="">
                                                           <button class=" btn btn-primary btn-sm cus-width" type="button" id="apply_mbzm">应用</button>
-                                                      </div>
-                                                      <div class="col-1">
                                                           <button class=" btn btn-primary btn-sm cus-width" type="button" id="next_mbzm">下一条</button>
                                                       </div>
+
                                                   </div>
                                               </div>
                                               <div class=" ovf-hidden" style="" id="mbzmSpread"></div>

+ 1 - 2
web/building_saas/main/js/views/fee_rate_view.js

@@ -955,7 +955,7 @@ function getPopoverContent() {
     var usageProjects = feeRateFile.usageProjects;
     let names = _.map(usageProjects,'name');
     let popover_content = names.join('<br>');
-    return popover_content;
+    return "费率的变化,将自动影响以下单位工程造价:<br>"+ popover_content;
 }
 
 $(function(){
@@ -1146,4 +1146,3 @@ function changeFRadioClick() {
         $("#fromOther").show();
     }
 }
-

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

@@ -130,7 +130,7 @@ projectGljObject={
         $("#used-project-count").text(usedCount);
     },
     getUsedTenderInfo:function() {
-        return projectGljObject.usedTenderList.join("<br>");
+        return "人材机单价的变化,将自动影响以下单位工程造价:<br>"+projectGljObject.usedTenderList.join("<br>");
     },
     filterLibGLJForMixRatio:function () {
         let me = this;

+ 9 - 4
web/building_saas/main/js/views/zmhs_view.js

@@ -20,7 +20,8 @@ let zmhs_obj = {
         getText:{
             forContent:function (item) {
                if(gljUtil.isDef(item.select_code)&&item.select_code!=""){
-                   return item.select_code;
+                   let option = _.find(item.option_list,{"value":item.select_code})
+                   return option?option.text:item.select_code;
                }else {
                    return item.content;
                }
@@ -28,7 +29,7 @@ let zmhs_obj = {
             }
         },
         autoFit:true,
-        fitRow:['name']
+        fitRow:['name','content']
     },
     cusSpread:null,
     cusSheet:null,
@@ -151,9 +152,12 @@ let zmhs_obj = {
 
     getComboBoxForCodes:function (coe,i) {
         this.coeSheet.getCell(i, 2, GC.Spread.Sheets.SheetArea.viewport).locked(false);
-        let options = coe.option_codes.split("|");
+        let options = coe.option_list; //coe.option_codes.split("|");
         let combo = sheetCommonObj.getDynamicCombo(true);
-        combo.items(options);//itemHeight(options.length).
+        let buttonRow =  this.coeSheet.getViewportBottomRow(1);
+        console.log(buttonRow);
+        combo.editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.value);
+        combo.items(options).maxDropDownItems(buttonRow - i -1 < 3 ?3:buttonRow - i -1 );//itemHeight(options.length).
         this.coeSheet.setCellType(i, 2, combo, GC.Spread.Sheets.SheetArea.viewport);
         this.coeSheet.setValue(i, 2, coe.select_code);
 
@@ -230,6 +234,7 @@ let zmhs_obj = {
 
     refresh:function () {
         $('#coeSpread').is(':visible')&&this.coeSpread?this.coeSpread.refresh():'';
+        $('#coeSpread').is(':visible')&&this.coeSpread?this.showDatas():'';//这里combobox下拉框要重新加载一下
         $('#cusSpread').is(':visible')&&this.cusSpread?this.cusSpread.refresh():'';
         $('#assSpread').is(':visible')&&this.assSpread?this.assSpread.refresh():'';
     },