| 
					
				 | 
			
			
				@@ -68,14 +68,14 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const billsCol = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         readOnly: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             isChangeAdd: function (data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return !readOnly && !data.ccid; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return !readOnly && !data.formc; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const posCol = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         readOnly: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             isChangeAdd: function (data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return !readOnly && !data.ccid; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return !readOnly && !data.formc; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -90,7 +90,7 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 indent: 16, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 getColor: function (index, data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (!data) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if(!data.ccid && !data.cid) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if(!data.formc && !data.cid) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     return '#dc3545'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -114,7 +114,7 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 indent: 16, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 getColor: function (index, data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (!data) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if(!data.ccid) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if(!data.formc) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     return '#dc3545'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -237,16 +237,16 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (col.field.indexOf('dgn') >= 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        $('#bills-expr').attr('readOnly', readOnly || cell.locked() || (_.isString(data.b_code) && data.b_code !== '') || !data.ccid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        $('#bills-expr').attr('readOnly', readOnly || cell.locked() || (_.isString(data.b_code) && data.b_code !== '') || !data.formc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } else if (col.field === 'unit_price') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        $('#bills-expr').attr('readOnly', readOnly || cell.locked() || (data.children && data.children.length > 0) || (_.isBoolean(data.used) && data.used === true) || !data.ccid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        $('#bills-expr').attr('readOnly', readOnly || cell.locked() || (data.children && data.children.length > 0) || (_.isBoolean(data.used) && data.used === true) || !data.formc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         const nodePos = pos.getLedgerPos(data.id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         if (nodePos && nodePos.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             $('#bills-expr').val('').attr('readOnly', true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             $('#bills-expr').removeAttr('data-row'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            $('#bills-expr').attr('readOnly', readOnly || cell.locked() || (data.children && data.children.length > 0) || !data.ccid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            $('#bills-expr').attr('readOnly', readOnly || cell.locked() || (data.children && data.children.length > 0) || !data.formc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     $('#bills-expr').attr('data-row', sel.row); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -320,7 +320,7 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         sameParent = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (!rNode.ccid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (!rNode.formc) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         sameParent = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -337,7 +337,7 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const siblings = tree.getChildren(tree.getParent(first)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             let upPower = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (let order = last.order; order < siblings.length - 1; order ++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (!siblings[order].ccid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (!siblings[order].formc) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     upPower = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -345,15 +345,15 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const valid = !sheet.zh_setting.readOnly; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             setObjEnable($('a[name=base-opr][type=add]'), valid && first && first.level > 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            setObjEnable($('a[name=base-opr][type=delete]'), valid && first && sameParent && first.level > 1 && !nodeUsed && first.ccid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            setObjEnable($('a[name=base-opr][type=up-move]'), valid && first && sameParent && first.level > 1 && preNode && first.ccid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            setObjEnable($('a[name=base-opr][type=down-move]'), valid && first && sameParent && first.level > 1 && !tree.isLastSibling(last) && first.ccid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            setObjEnable($('a[name=base-opr][type=delete]'), valid && first && sameParent && first.level > 1 && !nodeUsed && first.formc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            setObjEnable($('a[name=base-opr][type=up-move]'), valid && first && sameParent && first.level > 1 && preNode && first.formc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            setObjEnable($('a[name=base-opr][type=down-move]'), valid && first && sameParent && first.level > 1 && !tree.isLastSibling(last) && first.formc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const posRange = last ? pos.getLedgerPos(last.id) : []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             setObjEnable($('a[name=base-opr][type=up-level]'), valid && first && sameParent && tree.getParent(first) && !nodeUsed 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                && first.level > 2 && ((!posRange || posRange.length === 0) || tree.isLastSibling(last)) && upPower && first.ccid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                && first.level > 2 && ((!posRange || posRange.length === 0) || tree.isLastSibling(last)) && upPower && first.formc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const preNodePosRange = preNode ? pos.getLedgerPos(preNode.id) : []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             setObjEnable($('a[name=base-opr][type=down-level]'), valid && first && sameParent 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                && first.level > 1 && preNode && (preNode.children.length > 0 || (preNode.children.length === 0 && preNode.ccid && (!preNodePosRange || preNodePosRange.length === 0))) && !preNode.used && first.ccid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                && first.level > 1 && preNode && (preNode.children.length > 0 || (preNode.children.length === 0 && preNode.formc && (!preNodePosRange || preNodePosRange.length === 0))) && !preNode.used && first.formc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             setObjEnable($('#cut'), valid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             setObjEnable($('#paste'), valid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1159,7 +1159,7 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             sameParent = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        if (!rNode.ccid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (!rNode.formc) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         nodeUsed = nodeUsed || rNode.used; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1172,7 +1172,7 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const valid = !sheet.zh_setting.readOnly; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return !(valid && first && sameParent && !(first.level === 1 && first.node_type) && !nodeUsed && first.ccid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return !(valid && first && sameParent && !(first.level === 1 && first.node_type) && !nodeUsed && first.formc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         billsContextMenuOptions.items.sprBase = '----'; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1396,8 +1396,8 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const preNode = sheet.zh_data[row - 1]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const valid = !sheet.zh_setting.readOnly; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            setObjEnable($('a[name=pos-opr][type=up-move]'), valid && first && preNode && first.ccid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            setObjEnable($('a[name=pos-opr][type=down-move]'), valid && first && (sheet.zh_data.indexOf(last) < sheet.zh_data.length - 1) && first.ccid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            setObjEnable($('a[name=pos-opr][type=up-move]'), valid && first && preNode && first.formc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            setObjEnable($('a[name=pos-opr][type=down-move]'), valid && first && (sheet.zh_data.indexOf(last) < sheet.zh_data.length - 1) && first.formc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         loadExprToInput: function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const sel = posSheet.getSelections()[0]; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1413,7 +1413,7 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         ? (data[exprInfo.expr] ? data[exprInfo.expr] : data[col.field]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         : data[col.field]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     $('#pos-expr').val(value).attr('field', col.field).attr('org', data[col.field]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        .attr('readOnly', readOnly || (!data.ccid && cell.locked())).attr('data-row', sel.row); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        .attr('readOnly', readOnly || (!data.formc && cell.locked())).attr('data-row', sel.row); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     $('#pos-expr').val('').attr('readOnly', true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     $('#pos-expr').removeAttr('data-row'); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1442,7 +1442,7 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (posSheet.zh_setting) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     posSheet.zh_setting.cols.forEach(function (col, i) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         for (let iRow = 0; iRow < posSheet.getRowCount(); iRow++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            posSheet.getCell(iRow, i).locked((posSheet.zh_data[iRow] && !posSheet.zh_data[iRow].ccid) || posSheet.zh_setting.readOnly || false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            posSheet.getCell(iRow, i).locked((posSheet.zh_data[iRow] && !posSheet.zh_data[iRow].formc) || posSheet.zh_setting.readOnly || false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1881,7 +1881,7 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     disabled: function (key, opt) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         if (posSheet.zh_data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             const selection = posSheet.getSelections(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            return (posSheet.zh_data.length < selection[0].row + selection[0].rowCount) || (posSheet.zh_data[selection[0].row] && !posSheet.zh_data[selection[0].row].ccid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            return (posSheet.zh_data.length < selection[0].row + selection[0].rowCount) || (posSheet.zh_data[selection[0].row] && !posSheet.zh_data[selection[0].row].formc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2504,7 +2504,7 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 key: 'revise', title: '新增部位', valid: true, parent: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 check: function (node) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    if (node.ccid || node.cid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    if (node.formc || node.cid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         return false; 
			 |