|
@@ -5,7 +5,6 @@
|
|
|
* @date 2017/8/22
|
|
|
* @version
|
|
|
*/
|
|
|
-//todo: 全部、分享、回收站树统一
|
|
|
let Tree = null;//
|
|
|
let movetoZTree = null;
|
|
|
let copytoZTree = null;
|
|
@@ -30,6 +29,12 @@ let taxTypeMap = {
|
|
|
2:"简易计税"
|
|
|
};
|
|
|
|
|
|
+/*
|
|
|
+* 地区,同一费用定额下不同地区有不同单价,则新建单位工程时需要选择地区项
|
|
|
+* 地区项为空的时候,前端不显示该下拉项,地区的赋值覆盖在over_write相关文件中
|
|
|
+* */
|
|
|
+let regions = [];
|
|
|
+
|
|
|
function isDef(v) {
|
|
|
return typeof v !== 'undefined' && v !== null;
|
|
|
}
|
|
@@ -1308,6 +1313,15 @@ $(document).ready(function() {
|
|
|
return rst;
|
|
|
}
|
|
|
|
|
|
+ //设置地区选项
|
|
|
+ function setRegionOpts (regions) {
|
|
|
+ $('#regionDiv').find('select').empty();
|
|
|
+ for(let region of regions){
|
|
|
+ let $opt = $(`<option value = "${region}">${region}</option>`);
|
|
|
+ $('#regionDiv').find('select').append($opt);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 新增单位工程弹层改变
|
|
|
$('#add-tender-dialog').on('show.bs.modal', function() {
|
|
|
//clear info
|
|
@@ -1324,6 +1338,11 @@ $(document).ready(function() {
|
|
|
let projs = getProjs(selected);
|
|
|
setProjOptions(projs, selected);
|
|
|
$($("input[name='valuation_type']")[0]).click();
|
|
|
+ //设置地区选项
|
|
|
+ if(regions.length > 0){
|
|
|
+ setRegionOpts(regions);
|
|
|
+ $('#regionDiv').show();
|
|
|
+ }
|
|
|
setTimeout(function () {
|
|
|
$('#tender-name')[0].focus();
|
|
|
}, 300);
|
|
@@ -2431,6 +2450,8 @@ function AddTender() {
|
|
|
|
|
|
};
|
|
|
let selectedItem = projTreeObj.tree.selected;
|
|
|
+ //地区
|
|
|
+ let region = $('#regionDiv').find('select').val() || '';
|
|
|
let tenderInfo = {
|
|
|
valuation: valuation,
|
|
|
valuationType: valuationType,
|
|
@@ -2440,13 +2461,15 @@ function AddTender() {
|
|
|
projectEngineering:libs.projectEngineering,//单位工程默认取费专业(造价书中插入量价、工料机时用)
|
|
|
engineering_id: libs._id,
|
|
|
engineeringName: engineeringName,
|
|
|
+ feeStandardName: feeName,
|
|
|
unitPriceFile: {name: unitPriceFileObj.name, id: unitPriceFileObj.id},
|
|
|
feeFile: {name: feeFileObj.name, id: feeFileObj.id},
|
|
|
calcProgram: {name: calcProgramName, id: calcProgram},
|
|
|
taxType:taxType,
|
|
|
templateLibID:templateLibID,
|
|
|
colLibID:colLibID,
|
|
|
- featureLibID:featureLibID
|
|
|
+ featureLibID:featureLibID,
|
|
|
+ region: region
|
|
|
};
|
|
|
AddTenderItems(selectedItem, projName, engName, tenderName, tenderInfo, callback);
|
|
|
|