| | |
| | | <Property name="label">运算符号</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="operaSymbolValue"> |
| | | <Property/> |
| | | <Property></Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="addNum"> |
| | | <Property name="dataType">Double</Property> |
| | |
| | | <Property name="label">扣价</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="result"> |
| | | <Property/> |
| | | <Property></Property> |
| | | <Property name="label">检验结果</Property> |
| | | <Property name="mapping"> |
| | | <Property name="keyProperty">code</Property> |
| | |
| | | </AutoFormElement> |
| | | </AutoForm> |
| | | <DataGrid id="dataGridCheckItem" layoutConstraint="padding:10"> |
| | | <ClientEvent name="onCellValueEdit">var data = arg.entity._data;
 |
| | | <ClientEvent name="onCellValueEdit">var data = arg.entity;
 |
| | | //根据填写化验数据,给出提醒是否合格
 |
| | | if(data){
 |
| | | console.log(data,"inoutHand");
 |
| | | //填写的数据值
 |
| | | var newValue = data.value;
 |
| | | var newValue = data.get("value");
 |
| | | 
 |
| | | //标准值
 |
| | | var limit = data.upperLimit;
 |
| | | var limit = data.get("upperLimit");
 |
| | | 
 |
| | | //运算符
 |
| | | var symbol = data.operaSymbol;
 |
| | | var symbol = data.get("operaSymbol");
 |
| | | 
 |
| | | if (symbol && limit) {
 |
| | | if (">=" == symbol) {
 |
| | | if (newValue < limit) {
 |
| | | data.result = "0";
 |
| | | data.set("result", "0");
 |
| | | 
 |
| | | } else {
 |
| | | data.result = "1";
 |
| | | data.set("result", "1");
 |
| | | }
 |
| | | }
 |
| | | if ("<=" == symbol) {
 |
| | | if (newValue > limit) {
 |
| | | data.result = "0";
 |
| | | data.set("result", "0");
 |
| | | } else {
 |
| | | data.result = "1";
 |
| | | data.set("result", "1");
 |
| | | }
 |
| | | }
 |
| | | if ("==" == symbol) {
 |
| | | if (newValue != limit) {
 |
| | | data.result = "0";
 |
| | | data.set("result", "0");
 |
| | | } else {
 |
| | | data.result = "1";
 |
| | | data.set("result", "1");
 |
| | | }
 |
| | | }
 |
| | | }
 |
| | | console.log(data.result,"result")
 |
| | | }</ClientEvent> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="dataPath">#.checkItems</Property> |