|
@@ -216,7 +216,6 @@ const projTreeObj = {
|
|
|
this.bindEvent(newWorkBook);
|
|
this.bindEvent(newWorkBook);
|
|
|
this.loadContextMenu();
|
|
this.loadContextMenu();
|
|
|
this.loadStartMenu();
|
|
this.loadStartMenu();
|
|
|
- this.loadBtn();
|
|
|
|
|
}
|
|
}
|
|
|
return newWorkBook;
|
|
return newWorkBook;
|
|
|
},
|
|
},
|
|
@@ -356,8 +355,11 @@ const projTreeObj = {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
importInterface: {
|
|
importInterface: {
|
|
|
- name: '导入标准接口',
|
|
|
|
|
|
|
+ name: '导入招投标接口文件',
|
|
|
icon: 'fa-cloud-upload',
|
|
icon: 'fa-cloud-upload',
|
|
|
|
|
+ visible: function () {
|
|
|
|
|
+ return compilationData && compilationData.name === '重庆定额(2018)';
|
|
|
|
|
+ },
|
|
|
callback: function () {
|
|
callback: function () {
|
|
|
$('#importInterface').modal('show');
|
|
$('#importInterface').modal('show');
|
|
|
}
|
|
}
|
|
@@ -1238,7 +1240,6 @@ const projTreeObj = {
|
|
|
$("#mr_title").text(title);
|
|
$("#mr_title").text(title);
|
|
|
this.initHtmlByFromRadio();
|
|
this.initHtmlByFromRadio();
|
|
|
let result = from == "unitPriceFile"?await this.setUnitFileChangeFileData():await this.setFeeRateChangeFileData();
|
|
let result = from == "unitPriceFile"?await this.setUnitFileChangeFileData():await this.setFeeRateChangeFileData();
|
|
|
- console.log(result);
|
|
|
|
|
this.changeInfo = result;
|
|
this.changeInfo = result;
|
|
|
this.loadFileOptions(this.changeInfo,from);
|
|
this.loadFileOptions(this.changeInfo,from);
|
|
|
|
|
|
|
@@ -1445,8 +1446,6 @@ const projTreeObj = {
|
|
|
//发送文件改变消息
|
|
//发送文件改变消息
|
|
|
data.oldFileIDs = _.uniq(oldFileIDs);
|
|
data.oldFileIDs = _.uniq(oldFileIDs);
|
|
|
socket.emit('multiFileChangeNotify', data);
|
|
socket.emit('multiFileChangeNotify', data);
|
|
|
-
|
|
|
|
|
- console.log(result);
|
|
|
|
|
},
|
|
},
|
|
|
checkFileName:async function (fileID,name,type) {
|
|
checkFileName:async function (fileID,name,type) {
|
|
|
let node = this.tree.selected;
|
|
let node = this.tree.selected;
|
|
@@ -1579,6 +1578,8 @@ const projTreeObj = {
|
|
|
|
|
|
|
|
};
|
|
};
|
|
|
$(document).ready(function() {
|
|
$(document).ready(function() {
|
|
|
|
|
+ //绑定项目管理的升降级、上下移按钮事件
|
|
|
|
|
+ projTreeObj.loadBtn();
|
|
|
$('#sideTab').find('li').click(function () {
|
|
$('#sideTab').find('li').click(function () {
|
|
|
//消除tooltip
|
|
//消除tooltip
|
|
|
$('[data-toggle="tooltip"]').tooltip('hide');
|
|
$('[data-toggle="tooltip"]').tooltip('hide');
|
|
@@ -1685,7 +1686,6 @@ $(document).ready(function() {
|
|
|
infoData = await ajaxPost('/pm/api/getBasicInfo', {user_id: userID});
|
|
infoData = await ajaxPost('/pm/api/getBasicInfo', {user_id: userID});
|
|
|
//第一次默认是投标
|
|
//第一次默认是投标
|
|
|
needfulInfoData = getNeedfulBasicInfo(infoData, fileKind);
|
|
needfulInfoData = getNeedfulBasicInfo(infoData, fileKind);
|
|
|
- console.log(infoData);
|
|
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
$('#add-project-dialog').modal('hide');
|
|
$('#add-project-dialog').modal('hide');
|
|
|
}
|
|
}
|
|
@@ -1811,7 +1811,6 @@ $(document).ready(function() {
|
|
|
curValuation = $(this).val();
|
|
curValuation = $(this).val();
|
|
|
curValuationName = $(this).text();
|
|
curValuationName = $(this).text();
|
|
|
let engineeringList = getEngineeringList();
|
|
let engineeringList = getEngineeringList();
|
|
|
- console.log(engineeringList);
|
|
|
|
|
let engineeringHtml = getEngineeringHtml(engineeringList);
|
|
let engineeringHtml = getEngineeringHtml(engineeringList);
|
|
|
$("#tender-engineering").html(engineeringHtml);
|
|
$("#tender-engineering").html(engineeringHtml);
|
|
|
$('#valuation-info').hide();
|
|
$('#valuation-info').hide();
|
|
@@ -2158,6 +2157,7 @@ $(document).ready(function() {
|
|
|
}
|
|
}
|
|
|
//根据基本信息、工程特征数据获取对应节点
|
|
//根据基本信息、工程特征数据获取对应节点
|
|
|
function getFormRow(data) {
|
|
function getFormRow(data) {
|
|
|
|
|
+ let dateReg = /([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8])))/;
|
|
|
let cellType = data.cellType ? data.cellType : 'text';
|
|
let cellType = data.cellType ? data.cellType : 'text';
|
|
|
let $label = $(`<label for="staticEmail" class="col-3 col-form-label col-form-label-sm">${data.dispName}</label>`),
|
|
let $label = $(`<label for="staticEmail" class="col-3 col-form-label col-form-label-sm">${data.dispName}</label>`),
|
|
|
$cell;
|
|
$cell;
|
|
@@ -2167,6 +2167,15 @@ $(document).ready(function() {
|
|
|
for (let opt of opts) {
|
|
for (let opt of opts) {
|
|
|
$cell.append($(`<option ${data.value === opt ? 'selected' : ''} value="${opt}">${opt}</option>`));
|
|
$cell.append($(`<option ${data.value === opt ? 'selected' : ''} value="${opt}">${opt}</option>`));
|
|
|
}
|
|
}
|
|
|
|
|
+ } else if (cellType === 'date') { //不用原生的日期控件
|
|
|
|
|
+ $cell = $(`<input type="pm-${cellType}" name="${data.key}"
|
|
|
|
|
+ value="${data.value}" class="form-control form-control-sm" placeholder="请输入">`);
|
|
|
|
|
+ $cell.datepicker({dateFormat: 'yy-mm-dd'});
|
|
|
|
|
+ $cell.change(function () {
|
|
|
|
|
+ if (!dateReg.test($($cell).val())) {
|
|
|
|
|
+ $($cell).val('');
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
} else {
|
|
} else {
|
|
|
$cell = $(`<input type="${cellType}" ${cellType === 'number' ? 'min="0"' : ''} name="${data.key}"
|
|
$cell = $(`<input type="${cellType}" ${cellType === 'number' ? 'min="0"' : ''} name="${data.key}"
|
|
|
value="${data.value}" class="form-control form-control-sm" placeholder="请输入">`);
|
|
value="${data.value}" class="form-control form-control-sm" placeholder="请输入">`);
|
|
@@ -2179,12 +2188,15 @@ $(document).ready(function() {
|
|
|
return $row;
|
|
return $row;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //验证必填信息
|
|
|
|
|
|
|
+ //验证必填信息.
|
|
|
function validRequiredData($form) {
|
|
function validRequiredData($form) {
|
|
|
let eles = $form.find('input, select');
|
|
let eles = $form.find('input, select');
|
|
|
for (let ele of eles) {
|
|
for (let ele of eles) {
|
|
|
|
|
+ $(ele).removeClass('shake-input');
|
|
|
let v = $(ele).val().trim();
|
|
let v = $(ele).val().trim();
|
|
|
if (!v || v === '请选择') {
|
|
if (!v || v === '请选择') {
|
|
|
|
|
+ $(ele).focus();
|
|
|
|
|
+ $(ele).addClass('shake-input');
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -2448,7 +2460,6 @@ $(document).ready(function() {
|
|
|
$("#copy-to-dialog").modal('hide');
|
|
$("#copy-to-dialog").modal('hide');
|
|
|
$.bootstrapLoading.start();
|
|
$.bootstrapLoading.start();
|
|
|
CommonAjax.post('/pm/api/copyProjects',{projectMap:projectMap,user_id: userID},function (result) {
|
|
CommonAjax.post('/pm/api/copyProjects',{projectMap:projectMap,user_id: userID},function (result) {
|
|
|
- console.log(result);
|
|
|
|
|
let newNode = projTreeObj.insert(result['copy'].document,parent,next);
|
|
let newNode = projTreeObj.insert(result['copy'].document,parent,next);
|
|
|
let refreshNodes = projTreeObj.calEngineeringCost(newNode);
|
|
let refreshNodes = projTreeObj.calEngineeringCost(newNode);
|
|
|
projTreeObj.refreshNodeData(refreshNodes);
|
|
projTreeObj.refreshNodeData(refreshNodes);
|
|
@@ -2472,7 +2483,6 @@ $(document).ready(function() {
|
|
|
$('#tender-feeStandard').change(function () {
|
|
$('#tender-feeStandard').change(function () {
|
|
|
changeFeeStandard();
|
|
changeFeeStandard();
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
//导入相关
|
|
//导入相关
|
|
|
importView.eventListen();
|
|
importView.eventListen();
|
|
|
});
|
|
});
|
|
@@ -4464,7 +4474,6 @@ function setShareToModal(selected){
|
|
|
userIDs.push(user.userID);
|
|
userIDs.push(user.userID);
|
|
|
}
|
|
}
|
|
|
CommonAjax.post('/user/getUsers', {userIDs: userIDs}, function (rstData) {
|
|
CommonAjax.post('/user/getUsers', {userIDs: userIDs}, function (rstData) {
|
|
|
- console.log(rstData);
|
|
|
|
|
for(let userInfo of rstData){
|
|
for(let userInfo of rstData){
|
|
|
for(let user of selected.data.shareInfo){
|
|
for(let user of selected.data.shareInfo){
|
|
|
if(user.userID === userInfo._id){
|
|
if(user.userID === userInfo._id){
|
|
@@ -4612,4 +4621,4 @@ function refreshProjSummary(project, summaryInfo) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
projTreeObj.refreshNodeData(refreshNodes);
|
|
projTreeObj.refreshNodeData(refreshNodes);
|
|
|
-}
|
|
|
|
|
|
|
+}
|