| 
					
				 | 
			
			
				@@ -16,13 +16,13 @@ const invalidFields = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     posCalc: ['sgfh_qty', 'sgfh_tp', 'sjcl_qty', 'sjcl_tp', 'qtcl_qty', 'qtcl_tp'], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     posXmj: ['code'], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-function getExprInfo (field) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function getExprInfo (field, converse = false) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const exprField = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         {qty: 'sgfh_qty', expr: 'sgfh_expr'}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         {qty: 'sjcl_qty', expr: 'sjcl_expr'}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         {qty: 'qtcl_qty', expr: 'qtcl_expr'}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     ]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    return _.find(exprField, {qty: field}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return converse ?  _.find(exprField, {expr: field}) : _.find(exprField, {qty: field}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 function transExpr(expr) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return $.trim(expr).replace('\t', '').replace('=', '').replace('%', '/100'); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1708,6 +1708,23 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else if (col.field.indexOf('_expr') > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                const exprInfo = getExprInfo(col.field, true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (!exprInfo) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (newText) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        data.postData[exprInfo.qty] = math.evaluate(transExpr(newText)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        data.postData[exprInfo.expr] = newText; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } catch(err) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        toastr.error('输入的表达式非法'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        SpreadJsObj.reLoadRowData(info.sheet, info.row); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    data.postData[exprInfo.qty] = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    data.postData[exprInfo.expr] = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 data.postData[col.field] = newText; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1746,10 +1763,15 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         const style = sheet.getStyle(iRow, iCol); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         if (!style.locked) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             const colSetting = sheet.zh_setting.cols[iCol]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            data[colSetting.field] = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            const exprInfo = getExprInfo(colSetting.field); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            if (exprInfo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            if (colSetting.field.indexOf('_expr') > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                const exprInfo = getExprInfo(colSetting.field, true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                if (!exprInfo) continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 data[exprInfo.expr] = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                data[exprInfo.qty] = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                data[colSetting.field] = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                const exprInfo = getExprInfo(colSetting.field); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                if (exprInfo) data[exprInfo.expr] = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             bDel = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1901,6 +1923,17 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 bPaste = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } else if (colSetting.field.indexOf('_expr') > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            const exprInfo = getExprInfo(colSetting.field, true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            posData[exprInfo.expr] = trimInvalidChar(info.sheet.getText(curRow, curCol)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            posData[exprInfo.qty] = math.evaluate(transExpr(posData[exprInfo.expr])); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            bPaste = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } catch (err) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            toastMessageUniq(hint.expr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        bPaste = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (bPaste) { 
			 |