|
@@ -13,6 +13,19 @@ let projectGljObject={
|
|
|
materialTreeSheet:null,
|
|
|
projectGljSheetData:[],
|
|
|
mixRatioSetting:{},
|
|
|
+ infoPriceSetting:{
|
|
|
+ header:[
|
|
|
+ {headerName: "编号", headerWidth: 100, dataCode: "code", dataType: "String"},
|
|
|
+ {headerName: "材料名称", headerWidth: 180, dataCode: "name", dataType: "String"},
|
|
|
+ {headerName: "规格型号", headerWidth: 160, dataCode: "specs", hAlign: "left", dataType: "String"},
|
|
|
+ {headerName: "单位", headerWidth: 50, dataCode: "unit", dataType: "String",hAlign: "center"},
|
|
|
+ {headerName: "含税市场价", headerWidth: 160, dataCode: "taxPrice", hAlign: "right", dataType: "Number",validator:"number"}//,decimalField:"glj.unitPrice"
|
|
|
+ ],
|
|
|
+ view: {
|
|
|
+ lockColumns: [0,1,2,3,4]//,
|
|
|
+ //colHeaderHeight:30
|
|
|
+ }
|
|
|
+ },
|
|
|
relatedRationSetting:{
|
|
|
header:[
|
|
|
{headerName: "编码", headerWidth: 100, dataCode: "code", dataType: "String"},
|
|
@@ -64,6 +77,17 @@ let projectGljObject={
|
|
|
{ID:'MAIN_MATERIAL',text:'主材'},
|
|
|
{ID:'EQUIPMENT',text:'设备'}
|
|
|
],
|
|
|
+ initInfoPriceSpread:function(){
|
|
|
+ if(this.infoPriceSpread) return this.infoPriceSpread.refresh();
|
|
|
+ this.infoPriceSpread = SheetDataHelper.createNewSpread($("#info_price_sheet")[0]);
|
|
|
+ sheetCommonObj.spreadDefaultStyle(this.infoPriceSpread);
|
|
|
+ this.infoPriceSheet = this.infoPriceSpread .getSheet(0);
|
|
|
+ this.initSheet(this.infoPriceSheet,this.infoPriceSetting);
|
|
|
+ this.infoPriceSheet.name('infoPriceSheet');
|
|
|
+
|
|
|
+
|
|
|
+ this.getInfoPriceOptions();
|
|
|
+ },
|
|
|
initSpreads:function(){
|
|
|
if(this.projectGljSpread==null) this.initProjectGljSpread();
|
|
|
//if(materialAdjustObj.spread == null) materialAdjustObj.initSpread();
|
|
@@ -1261,6 +1285,21 @@ let projectGljObject={
|
|
|
}
|
|
|
htmlString += '</ul>';
|
|
|
$('#ALL').after(htmlString);
|
|
|
+ },
|
|
|
+ getInfoPriceOptions:async function(){
|
|
|
+ let options =await ajaxPost("/infoPrice/getOptions",{});
|
|
|
+ this.infoPriceOptions=options;
|
|
|
+ this.createSelectOptions($("#info_area"),options.areas);
|
|
|
+ let years = _.keysIn(options.periodMap);
|
|
|
+ this.createSelectOptions($("#info_year"),_.sortBy(years));
|
|
|
+ },
|
|
|
+ createSelectOptions(ele,opts){
|
|
|
+ ele.empty();
|
|
|
+ let str = `<option value=""></option>`;
|
|
|
+ for(let o of opts){
|
|
|
+ str +=`<option value="${o}">${o}</option>`
|
|
|
+ }
|
|
|
+ ele.html(str);
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -1317,6 +1356,11 @@ function loadProjectGljSize() {
|
|
|
SlideResize.loadVerticalHeight(pojGljResizeEles.eleObj.module, pojGljResizeEles.eleObj, pojGljResizeEles.limit, function () {
|
|
|
me.projectGljSpread?me.projectGljSpread.refresh():'';
|
|
|
me.mixRatioSpread?me.mixRatioSpread.refresh():'';
|
|
|
+ //信息价相关
|
|
|
+ $('#info_price_sheet').height($("#mix_ratio_sheet").height() - $("#infoToolDiv").height());
|
|
|
+ if($('#info_price_sheet').is(':visible')) me.initInfoPriceSpread();
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -1609,6 +1653,30 @@ $(function () {
|
|
|
projectGljObject.mixRatioSpread.refresh();
|
|
|
projectGljObject.showRelatedRationDatas();
|
|
|
});
|
|
|
+ $("#info-nav").on('shown.bs.tab', function () {
|
|
|
+ $('#info_price_sheet').height($("#mix_ratio_sheet").height() - $("#infoToolDiv").height());
|
|
|
+ projectGljObject.initInfoPriceSpread();
|
|
|
+ /*
|
|
|
+ projectGljObject.showRelatedRationDatas(); */
|
|
|
+ });
|
|
|
+ $('#info_year').change(function () {
|
|
|
+ let periodMap = projectGljObject.infoPriceOptions.periodMap;
|
|
|
+ let year = $(this).val();
|
|
|
+ let month = $("#info_month").val();
|
|
|
+ let options = periodMap[year];
|
|
|
+ projectGljObject.createSelectOptions($("#info_month"),periodMap[year]);
|
|
|
+ if(month !=""){
|
|
|
+ if(_.includes(options,month)){
|
|
|
+ $("#info_month").val(month);
|
|
|
+ // to do
|
|
|
+ //获取信息价内容
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('#info_month').change(function () {
|
|
|
+ let month = $(this).val();
|
|
|
+ console.log(month);
|
|
|
+ // to do
|
|
|
+ //获取信息价内容
|
|
|
+ });
|
|
|
});
|
|
|
-
|
|
|
-
|