| | |
| | | <Model> |
| | | <DataType name="dtMain"> |
| | | <ClientEvent name="onDataChange">if(arg.property =="depotId"){
 |
| | | autoByDepot(arg.newValue);
 |
| | | }
 |
| | | if(arg.property =="foodVariety"){
 |
| | | checkByFood(arg.newValue);
 |
| | | } |
| | | </ClientEvent> |
| | | autoByDepot(arg.newValue);
 |
| | | }
 |
| | | if(arg.property =="foodVariety"){
 |
| | | checkByFood(arg.newValue);
 |
| | | } </ClientEvent> |
| | | <Property name="creationType">com.ld.igds.models.MQuality</Property> |
| | | <PropertyDef name="id"> |
| | | <Property name="label">ID</Property> |
| | |
| | | <PropertyDef name="checkUser"> |
| | | <Property name="label">扦样人</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="checkNum"> |
| | | <PropertyDef name="ypsl"> |
| | | <Property name="label">样品数量</Property> |
| | | <Property name="displayFormat">0.0%</Property> |
| | | <Property name="dataType">Double</Property> |
| | | <Property name="displayFormat">0.## KG</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="checkTime"> |
| | | <Property name="label">扦样时间</Property> |
| | | <Property name="dataType">Date</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="checkRepresent"> |
| | | <Property name="label">样品代表</Property> |
| | | <PropertyDef name="dbsl"> |
| | | <Property name="label">样品代表数量</Property> |
| | | <Property name="dataType">Double</Property> |
| | | <Property name="displayFormat">0.## KG</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="checkLevel"> |
| | | <PropertyDef name="ypdj"> |
| | | <Property name="label">样品等级</Property> |
| | | <Property name="mapping"> |
| | | <Property name="mapValues">${dorado.getDataProvider("dicTriggerPR#dicTrigger").getResult("FOOD_LEVEL_")}</Property> |
| | | <Property name="keyProperty">code</Property> |
| | | <Property name="valueProperty">name</Property> |
| | | </Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="normalYear"> |
| | | <Property name="label">正常存储年限</Property> |
| | |
| | | </PropertyDef> |
| | | <PropertyDef name="remark"> |
| | | <Property name="label">备注信息</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="storeDate"> |
| | | <Property name="dataType">Date</Property> |
| | | <Property name="label">入库日期</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="unit"> |
| | | <Property></Property> |
| | | <Property name="label">检验单位</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="zblb"> |
| | | <Property></Property> |
| | | <Property name="label">指标类别</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="qfrq"> |
| | | <Property name="dataType">Date</Property> |
| | | <Property name="label">签发日期</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="bgcjsj"> |
| | | <Property name="dataType">Date</Property> |
| | | <Property name="label">报告出具时间</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="shrxm"> |
| | | <Property></Property> |
| | | <Property name="label">审核人姓名</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="qydbh"> |
| | | <Property></Property> |
| | | <Property name="label">扦样单编号</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="jdrxm"> |
| | | <Property></Property> |
| | | <Property name="label">监督人姓名</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="ypbh"> |
| | | <Property></Property> |
| | | <Property name="label">样品编号</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="updateTime"> |
| | | <Property name="dataType">Date</Property> |
| | | <Property name="label">数据更新时间</Property> |
| | | </PropertyDef> |
| | | <Reference name="checkItems"> |
| | | <Property name="dataProvider">checkStandardPR#listCheckItemsByParam</Property> |
| | |
| | | </PropertyDef> |
| | | <PropertyDef name="remarks"> |
| | | <Property name="label">化验结果</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="operaSymbolValue"> |
| | | <Property></Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="operaSymbol"> |
| | | <Property></Property> |
| | | <Property name="label">运算符号</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="ruleNum"> |
| | | <Property name="dataType">Double</Property> |
| | | <Property name="label">扣重系数</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="ruleAdd"> |
| | | <Property name="dataType">Double</Property> |
| | | <Property name="label">增重%</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="ruleAddEnd"> |
| | | <Property name="dataType">Double</Property> |
| | | <Property name="label">增重上限%</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="ruleReduce"> |
| | | <Property name="dataType">Double</Property> |
| | | <Property name="label">扣重值%</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="rulePrice"> |
| | | <Property name="dataType">Double</Property> |
| | | <Property name="label">扣费系数</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="ruleReducePrice"> |
| | | <Property name="dataType">Double</Property> |
| | | <Property name="label">扣费</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="addNum"> |
| | | <Property name="dataType">Double</Property> |
| | | <Property name="label">增重</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="deNum"> |
| | | <Property name="dataType">Double</Property> |
| | | <Property name="label">扣重</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="addPrice"> |
| | | <Property name="dataType">Double</Property> |
| | | <Property name="label">增价</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="dePrice"> |
| | | <Property name="dataType">Double</Property> |
| | | <Property name="label">扣价</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="result"> |
| | | <Property></Property> |
| | | <Property name="label">检验结果</Property> |
| | | <Property name="mapping"> |
| | | <Property name="mapValues">${dorado.getDataProvider("inoutDataPR#triggerResult").getResult()}</Property> |
| | | <Property name="keyProperty">code</Property> |
| | | <Property name="valueProperty">name</Property> |
| | | </Property> |
| | | </PropertyDef> |
| | | </DataType> |
| | | <DataType name="dataTypeUser"> |
| | |
| | | <Property name="dataType">String</Property> |
| | | </PropertyDef> |
| | | </DataType> |
| | | <DataType name="dtMetrics"> |
| | | <PropertyDef name="code"/> |
| | | <PropertyDef name="name"/> |
| | | </DataType> |
| | | <DataType name="dtResult"> |
| | | <PropertyDef name="name"/> |
| | | </DataType> |
| | | </Model> |
| | | <View layout="padding:5;regionPadding:5"> |
| | | <ClientEvent name="onReady">var deptId = window.parent.DEPT_ID;//父页面中的分库编码
 |
| | | 
 |
| | | //根据仓库自动回填粮食品种,登记,产地新
 |
| | | autoByDepot = function(depotId){
 |
| | | view.get("#ajaxGetDepot").set("parameter",depotId).execute(function(result){
 |
| | | if(result){
 |
| | | var data = view.get("#dsMain.data:#");
 |
| | | data.set("foodLocation",result.foodLocation);
 |
| | | data.set("foodLevel",result.foodLevel);
 |
| | | data.set("foodVariety",result.foodVariety);
 |
| | | data.set("foodType",result.foodType);
 |
| | | }
 |
| | | });
 |
| | | };
 |
| | | 
 |
| | | //根据粮食品种查询化验项并回显
 |
| | | checkByFood = function(foodVariety){
 |
| | | view.get("#ajaxGetCheck").set("parameter",{foodVariety:foodVariety,deptId:deptId}).execute(function(result){
 |
| | | if(result){
 |
| | | var data = view.get("#dsMain.data:#");
 |
| | | data.set("checkItems",result);
 |
| | | }
 |
| | | }); 
 |
| | | }; |
| | | </ClientEvent> |
| | | 
 |
| | | //根据仓库自动回填粮食品种,登记,产地新
 |
| | | autoByDepot = function(depotId){
 |
| | | view.get("#ajaxGetDepot").set("parameter",depotId).execute(function(result){
 |
| | | if(result){
 |
| | | var data = view.get("#dsMain.data:#");
 |
| | | data.set("foodLocation",result.foodLocation);
 |
| | | data.set("foodLevel",result.foodLevel);
 |
| | | data.set("foodVariety",result.foodVariety);
 |
| | | data.set("foodType",result.foodType);
 |
| | | }
 |
| | | });
 |
| | | };
 |
| | | //根据粮食品种查询化验项并回显
 |
| | | checkByFood = function(foodVariety){
 |
| | | view.get("#ajaxGetCheck").set("parameter",{foodVariety:foodVariety,deptId:deptId}).execute(function(result){
 |
| | | if(result){
 |
| | | var data = view.get("#dsMain.data:#");
 |
| | | data.set("checkItems",result);
 |
| | | }
 |
| | | }); 
 |
| | | }; </ClientEvent> |
| | | <Property name="packages">font-awesome,css-common</Property> |
| | | <DataSet id="dsMain"> |
| | | <Property name="loadMode">lazy</Property> |
| | |
| | | <Property name="pageSize">100</Property> |
| | | <Property name="dataProvider">bdf2.userMaintain#loadUsers</Property> |
| | | </DataSet> |
| | | <DataSet id="dsMetrics"> |
| | | <ClientEvent name="onCreate">var data = [ {
 |
| | | name : "1:质量指标检验"
 |
| | | }, {
 |
| | | name : "2:储存品质检验"
 |
| | | }, {
 |
| | | name : "3:食品安全检验"
 |
| | | }]
 |
| | | self.setData(data);
 |
| | | </ClientEvent> |
| | | <Property name="dataType">[dtMetrics]</Property> |
| | | </DataSet> |
| | | <DataSet id="dsResult"> |
| | | <ClientEvent name="onCreate">var data = [ {
 |
| | | name : "达标"
 |
| | | }, {
 |
| | | name : "不达标"
 |
| | | }, {
 |
| | | name : "宜存"
 |
| | | },{
 |
| | | name : "轻度不宜存"
 |
| | | },{
 |
| | | name : "重度不宜存"
 |
| | | }, {
 |
| | | name : "合格"
 |
| | | }, {
 |
| | | name : "不合格"
 |
| | | }]
 |
| | | self.setData(data);
 |
| | | </ClientEvent> |
| | | <Property name="dataType">[dtResult]</Property> |
| | | </DataSet> |
| | | <Container layout="regionPadding:10" layoutConstraint="top"> |
| | | <Property name="exClassName">bg-color</Property> |
| | | <Property name="contentOverflow">hidden</Property> |
| | |
| | | </Label> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">view.get("#dsMain").insert();
 |
| | | view.get("#dialogMain").show(); |
| | | </ClientEvent> |
| | | view.get("#dialogMain").show(); </ClientEvent> |
| | | <Property name="caption">新增</Property> |
| | | <Property name="exClassName">btn-default</Property> |
| | | <Property name="iconClass">fa fa-plus</Property> |
| | |
| | | </AutoForm> |
| | | <DataGrid layoutConstraint="center padding:5px"> |
| | | <ClientEvent name="onDataRowDoubleClick">var data = view.get("#dsMain.data:#");
 |
| | | if(data){
 |
| | | view.get("#dialogMain").show();
 |
| | | } |
| | | </ClientEvent> |
| | | if(data){
 |
| | | view.get("#dialogMain").show();
 |
| | | } </ClientEvent> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <RowNumColumn/> |
| | |
| | | <Property name="property">foodVariety</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="name">foodVariety</Property> |
| | | </DataColumn> |
| | | <DataColumn> |
| | | <Property name="property">foodType</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="name">foodType</Property> |
| | | </DataColumn> |
| | | <DataColumn> |
| | | <Property name="property">foodLevel</Property> |
| | |
| | | </DataPilot> |
| | | </Container> |
| | | <Dialog id="dialogMain"> |
| | | <ClientEvent name="beforeShow">var data = view.get("#dsMain.data:#")
 |
| | | var metricsBefore = data.get("zblb")
 |
| | | if(metricsBefore){
 |
| | | var list = metricsBefore.split("#");
 |
| | | var metrics ="" ;
 |
| | | list.forEach(item=>{
 |
| | | if(item == 1)metrics+="1:质量指标检验#";
 |
| | | if(item == 2)metrics+="2:储存品质检验#";
 |
| | | if(item == 3)metrics+="3:食品安全检验#"; 
 |
| | | });
 |
| | | data.set("zblb", metrics.substring(0,metrics.length-1));
 |
| | | }</ClientEvent> |
| | | <Property name="visible">false</Property> |
| | | <Property name="caption">质量巡检信息</Property> |
| | | <Property name="width">80%</Property> |
| | |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">foodType</Property> |
| | | <Property name="property">foodType</Property> |
| | | <Property name="name">foodLevel</Property> |
| | | <Property name="property">foodLevel</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">checkNum</Property> |
| | | <Property name="property">checkNum</Property> |
| | | <Property name="name">ypsl</Property> |
| | | <Property name="property">ypsl</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">foodLevel</Property> |
| | | <Property name="property">foodLevel</Property> |
| | | <Property name="name">unit</Property> |
| | | <Property name="property">unit</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">foodLocation</Property> |
| | | <Property name="property">foodLocation</Property> |
| | | <Property name="trigger">ddFoodOrigin</Property> |
| | | <Property name="name">shrxm</Property> |
| | | <Property name="property">shrxm</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">checkRepresent</Property> |
| | | <Property name="property">checkRepresent</Property> |
| | | <Property name="name">dbsl</Property> |
| | | <Property name="property">dbsl</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">checkLevel</Property> |
| | | <Property name="property">checkLevel</Property> |
| | | <Property name="name">ypdj</Property> |
| | | <Property name="property">ypdj</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | |
| | | </Editor> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">zblb</Property> |
| | | <Property name="property">zblb</Property> |
| | | <Editor> |
| | | <TagEditor> |
| | | <Property name="textSeperator">#</Property> |
| | | <Property name="availableTagsDataSet">dsMetrics</Property> |
| | | <Property name="availableTagsDataPath">.name</Property> |
| | | </TagEditor> |
| | | </Editor> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:1"> |
| | | <Property name="name">result</Property> |
| | | <Property name="property">result</Property> |
| | | <Editor/> |
| | | <Editor> |
| | | <TagEditor> |
| | | <Property name="availableTagsDataPath">.name</Property> |
| | | <Property name="availableTagsDataSet">dsResult</Property> |
| | | <Property name="textSeperator">#</Property> |
| | | </TagEditor> |
| | | </Editor> |
| | | </AutoFormElement> |
| | | <Label layoutConstraint="colSpan:2"> |
| | | <Property name="text">说明:多项指标时按照1:质量指标检验(达标,不达标)、2:储存品质检验(宜存,不宜存)、3:食品安全检验(合格,不合格)这个顺序填写检验结论</Property> |
| | | <Property name="style"> |
| | | <Property name="color">blue</Property> |
| | | </Property> |
| | | </Label> |
| | | <AutoFormElement layoutConstraint="colSpan:3"> |
| | | <Property name="name">remark</Property> |
| | | <Property name="property">remark</Property> |
| | |
| | | <Buttons/> |
| | | <Children> |
| | | <DataGrid id="dataGridCheckItem"> |
| | | <ClientEvent name="onCellValueEdit">var data = arg.entity
 |
| | | if (data) {
 |
| | | //填写的数据值;
 |
| | | var newValue = data.get("value");
 |
| | | //标准值;
 |
| | | var limit = data.get("upperLimit");
 |
| | | //运算符;
 |
| | | var symbol = data.get("operaSymbol");
 |
| | | if (symbol && limit && newValue) {
 |
| | | if (">=" == symbol) {
 |
| | | if (newValue < limit) {
 |
| | | data.set("result", "0");
 |
| | | }
 |
| | | else {
 |
| | | data.set("result", "1");
 |
| | | }
 |
| | | }
 |
| | | if ("<=" == symbol) {
 |
| | | if (newValue > limit) {
 |
| | | data.set("result", "0");
 |
| | | }
 |
| | | else {
 |
| | | data.set("result", "1");
 |
| | | }
 |
| | | }
 |
| | | if ("==" == symbol) {
 |
| | | if (newValue != limit) {
 |
| | | data.set("result", "0");
 |
| | | }
 |
| | | else {
 |
| | | data.set("result", "1");
 |
| | | }
 |
| | | }
 |
| | | }
 |
| | | }</ClientEvent> |
| | | <Property name="dataPath">#.checkItems</Property> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="hideMode">display</Property> |
| | | <Property name="highlightCurrentRow">false</Property> |
| | | <Property name="visible">true</Property> |
| | | <RowNumColumn/> |
| | | <DataColumn> |
| | | <Property name="name">standardName</Property> |
| | | <DataColumn name="standardName"> |
| | | <Property name="property">standardName</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Editor/> |
| | | </DataColumn> |
| | | <DataColumn> |
| | | <Property name="name">value</Property> |
| | | <DataColumn name="value"> |
| | | <Property name="property">value</Property> |
| | | <Property name="align">center</Property> |
| | | <Editor/> |
| | | </DataColumn> |
| | | <DataColumn> |
| | | <Property name="name">upperLimit</Property> |
| | | <Property name="property">upperLimit</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Editor/> |
| | | </DataColumn> |
| | | <DataColumn> |
| | | <Property name="name">lowerLimit</Property> |
| | | <Property name="property">lowerLimit</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Editor/> |
| | | </DataColumn> |
| | | <DataColumn> |
| | | <Property name="name">unit</Property> |
| | | <DataColumn name="unit"> |
| | | <Property name="property">unit</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Editor/> |
| | | </DataColumn> |
| | | <DataColumn> |
| | | <Property name="name">remarks</Property> |
| | | <DataColumn name="operaSymbolValue"> |
| | | <Property name="property">operaSymbolValue</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="caption">标准值</Property> |
| | | <Property name="readOnly">true</Property> |
| | | </DataColumn> |
| | | <DataColumn name="deNum"> |
| | | <Property name="property">deNum</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn name="addNum"> |
| | | <Property name="property">addNum</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn name="dePrice"> |
| | | <Property name="property">dePrice</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn name="addPrice"> |
| | | <Property name="property">addPrice</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn name="result"> |
| | | <Property name="property">result</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="readOnly">true</Property> |
| | | </DataColumn> |
| | | <DataColumn name="remarks"> |
| | | <Property name="property">remarks</Property> |
| | | <Property name="align">center</Property> |
| | | <Editor/> |
| | | </DataColumn> |
| | | </DataGrid> |
| | | </Children> |