|
|
@@ -1188,6 +1188,7 @@ var projectObj = {
|
|
|
const newNodes = await ProjectController.addBillsByData(postData, true);
|
|
|
projectObj.mainController.setTreeSelected(newNodes[0]);
|
|
|
projectObj.selectColAndFocus(project.mainTree.selected);
|
|
|
+ projectObj.refreshBaseActn(project.mainTree);
|
|
|
} catch (err) {
|
|
|
console.log(err);
|
|
|
if (!$('hintBox_form').is(':visible')) {
|
|
|
@@ -1214,7 +1215,7 @@ var projectObj = {
|
|
|
newData.push({ itemQuery: null, rationType: rationType.ration });
|
|
|
}
|
|
|
await project.Ration.addMultiRation(newData);
|
|
|
- projectObj.setActiveCell('quantity', true);
|
|
|
+ projectObj.setActiveCell('code', true);
|
|
|
} catch (err) {
|
|
|
console.log(err);
|
|
|
if (!$('hintBox_form').is(':visible')) {
|
|
|
@@ -1383,6 +1384,25 @@ var projectObj = {
|
|
|
return false
|
|
|
}
|
|
|
},
|
|
|
+ "insertMaterial": {
|
|
|
+ name: "按清单名称插入材料",//插入量价不需要自动定位到编号列
|
|
|
+ icon: 'fa-sign-in',
|
|
|
+ disabled: function () {
|
|
|
+ if (projectReadOnly) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return !project.Ration.canAdd(project.mainTree.selected);
|
|
|
+ },
|
|
|
+ callback: function (key, opt) {
|
|
|
+ //名称取清单名称,单位取清单单位
|
|
|
+ let selected = project.mainTree.selected;
|
|
|
+ let billNode = selected;
|
|
|
+ if(selected.sourceType==project.Ration.getSourceType()) billNode = selected.parent;
|
|
|
+ let ext = {name:billNode.data.name,unit:billNode.data.unit};
|
|
|
+ project.Ration.insertVolumePrice(gljType.GENERAL_MATERIAL,ext);
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
"insertLJ": {
|
|
|
name: "插入量价",//插入量价不需要自动定位到编号列
|
|
|
icon: 'fa-sign-in',
|
|
|
@@ -3214,10 +3234,13 @@ $(function () {
|
|
|
let ration_glj_Map = _.groupBy(projectObj.project.ration_glj.datas, 'rationID');
|
|
|
vBlock_WC.datas.push(BlockController.getNodeDatas(node, ration_glj_Map));
|
|
|
vBlock_WC = JSON.parse(JSON.stringify(vBlock_WC));
|
|
|
- let fileName = node.data.code + ' ' + node.data.name + ' ' + node.data.unit;
|
|
|
+ // 块文件名称:编号要根据实际情况对父清单的编号进行拼装。
|
|
|
+ let newCode = divideObj.getExeBillCode(vBlock_WC.datas[0].ID);
|
|
|
+ let unit = node.data.unit ? node.data.unit : '';
|
|
|
+ let fileName = newCode + ' ' + node.data.name + ' ' + unit;
|
|
|
fileName = fileName.replace(/^\s+|\s+$/g, ""); // 只去两头空格
|
|
|
|
|
|
- let extN = blockLibObj.getSameNameNode(fileName);
|
|
|
+ let extN = blockLibObj.getSameNameNode(fileName, categoryID);
|
|
|
if (extN){
|
|
|
if (cover) blockLibObj.assignData(extN, vBlock_WC);
|
|
|
}
|