Browse Source

feat: 插入清单指引,输出特征就默认打勾

vian 3 years ago
parent
commit
c476d8eaa4
1 changed files with 10 additions and 2 deletions
  1. 10 2
      web/maintain/billsGuidance_lib/js/billsGuidance.js

+ 10 - 2
web/maintain/billsGuidance_lib/js/billsGuidance.js

@@ -413,9 +413,13 @@ const billsGuidance = (function () {
                 if (node.depth() % 2 === 0 && _isDef(node.data.type) && node.data.type === itemType.job) {
                     sheet.setCellType(row, 1, checkBoxType);
                     sheet.setCellType(row, 2, checkBoxType);
+                    sheet.setValue(row, 1, node.data.outputItemCharacter || false);
+                    sheet.setValue(row, 2, node.data.required || false);
                 } else {
                     sheet.setCellType(row, 1, baseType);
                     sheet.setCellType(row, 2, baseType);
+                    sheet.setValue(row, 1, null);
+                    sheet.setValue(row, 2, null);
                 }
             })
         });
@@ -1036,7 +1040,11 @@ const billsGuidance = (function () {
                     let newNode = controller.insertByIDS(updateData.updateData.ID, updateData.updateData.ParentID, updateData.updateData.NextSiblingID);
                     //同步data
                     Object.assign(newNode.data, updateData.updateData);
-                    sheet.setValue(newNode.serialNo(), 0, newNode.data.name);
+                    const row = newNode.serialNo();
+                    sheet.setValue(row, 0, newNode.data.name);
+                    if (newNode.data.outputItemCharacter !== undefined) {
+                        sheet.setValue(row, 1, newNode.data.outputItemCharacter);
+                    }
                     showCheckBox(sheet, [newNode]);
                     refreshBtn(newNode);
                 }
@@ -1575,7 +1583,7 @@ const billsGuidance = (function () {
     //@return {void}
     function initBtn(){
         $('#insert').click(function () {
-            insert([{type: itemType.job, name: ''}], false);
+            insert([{type: itemType.job, name: '', outputItemCharacter: true }], false);
         });
         $('#delConfirm').click(function () {
             del();