| | |
| | | </PropertyDef> |
| | | <PropertyDef name="time"> |
| | | <Property name="label">检验时间</Property> |
| | | <Property name="dataType">Date</Property> |
| | | <Property name="dataType">DateTime</Property> |
| | | <Property name="required">true</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="result"> |
| | |
| | | <PropertyDef name="ypbh"> |
| | | <Property></Property> |
| | | <Property name="label">样品编号</Property> |
| | | <Property name="required">true</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="updateTime"> |
| | | <Property name="dataType">Date</Property> |
| | |
| | | <PropertyDef name="spaqzbsfhg"> |
| | | <Property></Property> |
| | | <Property name="label">食品是否合格</Property> |
| | | <Property name="mapping"> |
| | | <Property name="keyProperty">code</Property> |
| | | <Property name="valueProperty">name</Property> |
| | | <Property name="mapValues"> |
| | | <Collection> |
| | | <Entity> |
| | | <Property name="name">0-不合格</Property> |
| | | <Property name="code">0</Property> |
| | | </Entity> |
| | | <Entity> |
| | | <Property name="name">1-合格</Property> |
| | | <Property name="code">1</Property> |
| | | </Entity> |
| | | </Collection> |
| | | </Property> |
| | | </Property> |
| | | <Property name="required">true</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="reportType"> |
| | | <Property name="label">报告类型</Property> |
| | | <Property name="mapping"> |
| | | <Property name="keyProperty">code</Property> |
| | | <Property name="valueProperty">name</Property> |
| | | <Property name="mapValues"> |
| | | <Collection> |
| | | <Entity> |
| | | <Property name="name">1-单位检验</Property> |
| | | <Property name="code">1</Property> |
| | | </Entity> |
| | | <Entity> |
| | | <Property name="name">2-整体检验(加权平均)</Property> |
| | | <Property name="code">2</Property> |
| | | </Entity> |
| | | <Entity> |
| | | <Property name="name">3-其他</Property> |
| | | <Property name="code">3</Property> |
| | | </Entity> |
| | | </Collection> |
| | | </Property> |
| | | </Property> |
| | | </PropertyDef> |
| | | <Reference name="checkItems"> |
| | | <Property name="dataProvider">checkStandardPR#listCheckItemsByParam</Property> |
| | |
| | | </Entity> |
| | | </Property> |
| | | </Reference> |
| | | <PropertyDef name="fileId"> |
| | | <Property></Property> |
| | | <Property name="label">附件id</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="fileName"> |
| | | <Property></Property> |
| | | <Property name="label">附件名称</Property> |
| | | <Property name="readOnly">true</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="fileTime"> |
| | | <Property name="dataType">DateTime</Property> |
| | | <Property name="label">附件上传时间</Property> |
| | | <Property name="readOnly">true</Property> |
| | | </PropertyDef> |
| | | </DataType> |
| | | <DataType name="dtQualityParam"> |
| | | <PropertyDef name="depotId"> |
| | |
| | | <Property name="label">检测值</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="remarks"> |
| | | <Property name="label">化验结果</Property> |
| | | <Property name="label">备注</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="operaSymbolValue"> |
| | | <Property></Property> |
| | |
| | | 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);
 |
| | | data.set("storeDate",result.storeDate);
 |
| | | }
 |
| | | });
 |
| | | };
 |
| | |
| | | data.set("checkItems",result);
 |
| | | }
 |
| | | }); 
 |
| | | }; </ClientEvent> |
| | | };
 |
| | | /**
 |
| | | * 预览PDF文件
 |
| | | */
 |
| | | showFilePdf = function(){
 |
| | | var cur = view.get("#dsMain.data:#");
 |
| | | var fileName = cur.get("fileId");
 |
| | | var fileTime = new Date(cur.get("fileTime")).formatDate("y-m-d H:i:s");
 |
| | | if(!fileName){
 |
| | | $alert("没有获取到文件名称,无法预览。");
 |
| | | return;
 |
| | | }
 |
| | | if(!cur.get("fileTime")){
 |
| | | $alert("没有获取到附件上传时间,无法访问。");
 |
| | | return;
 |
| | | }
 |
| | | 
 |
| | | var url = "./basic/file/show-pdf?fileName="+fileName+"&fileTime="+fileTime+"&filePathType=common";
 |
| | | 
 |
| | | window.open(url, "_blank");
 |
| | | };</ClientEvent> |
| | | <Property name="packages">font-awesome,css-common</Property> |
| | | <Property name="javaScriptFile">./static/plugins/lodop/LodopFuncs.js</Property> |
| | | <DataSet id="dsMain"> |
| | | <Property name="loadMode">lazy</Property> |
| | | <Property name="dataProvider">qualityManagerPR#listQuality</Property> |
| | |
| | | </Button> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
 |
| | | if(data){
 |
| | | view.get("#dialogMain").show();
 |
| | | } |
| | | if(data){
 |
| | | view.get("#dialogMain").show();
 |
| | | } |
| | | </ClientEvent> |
| | | <Property name="caption">修改</Property> |
| | | <Property name="exClassName">btn-warm</Property> |
| | |
| | | <ClientEvent name="onClick">view.get("#dsMain").flushAsync();
 |
| | | </ClientEvent> |
| | | <Property name="caption">刷新</Property> |
| | | <Property name="exClassName">btn-default</Property> |
| | | <Property name="iconClass">fa fa-refresh</Property> |
| | | <Property name="exClassName">btn-warm</Property> |
| | | <Property name="iconClass">fa fa-print</Property> |
| | | </Button> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">showFilePdf();</ClientEvent> |
| | | <Property name="exClassName">btn-normal</Property> |
| | | <Property name="caption">查看质检附件</Property> |
| | | <Property name="iconClass">fa fa-picture-o</Property> |
| | | </Button> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
 |
| | | if (!data) {
 |
| | | $alert("请先选择数据!");
 |
| | | return;
 |
| | | }
 |
| | | printBill();</ClientEvent> |
| | | <Property name="caption">打印质检报告</Property> |
| | | <Property name="exClassName">btn-warm</Property> |
| | | <Property name="iconClass">fa fa-print</Property> |
| | | </Button> |
| | | </Container> |
| | | <Container layout="regionPadding:10" layoutConstraint="center"> |
| | |
| | | <Container layout="hbox regionPadding:15"> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">var param = view.get("#dsParam.data");
 |
| | | view.get("#dsMain").set("parameter",param.toJSON()).flushAsync(); |
| | | </ClientEvent> |
| | | view.get("#dsMain").set("parameter",param.toJSON()).flushAsync(); </ClientEvent> |
| | | <Property name="caption">查询</Property> |
| | | <Property name="exClassName">btn-default</Property> |
| | | <Property name="iconClass">fa fa-refresh</Property> |
| | |
| | | <Buttons> |
| | | <Button> |
| | | <ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
 |
| | | if(data.validate() != 'ok'){
 |
| | | $notify("数据校验失败!!");
 |
| | | return;
 |
| | | }
 |
| | | view.get("#uaAction").set("parameter",data).execute(function(){
 |
| | | self.get("parent").hide();
 |
| | | }); |
| | | </ClientEvent> |
| | | if(data.validate() != 'ok'){
 |
| | | $notify("数据校验失败!!");
 |
| | | return;
 |
| | | }
 |
| | | view.get("#uaAction").set("parameter",data).execute(function(){
 |
| | | self.get("parent").hide();
 |
| | | }); </ClientEvent> |
| | | <Property name="caption">保存</Property> |
| | | <Property name="iconClass">fa fa-check</Property> |
| | | <Property name="exClassName">btn-normal</Property> |
| | |
| | | <Property name="readOnly">false</Property> |
| | | <Property name="labelSeparator">:</Property> |
| | | <Property name="labelAlign">right</Property> |
| | | <Property name="cols">*,*,*</Property> |
| | | <Property name="cols">*,*,*,*</Property> |
| | | <Property name="labelWidth">120</Property> |
| | | <AutoFormElement> |
| | | <Property name="name">depotId</Property> |
| | |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:1"> |
| | | <Property name="name">storeDate</Property> |
| | | <Property name="property">storeDate</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:1"> |
| | | <Property name="name">result</Property> |
| | | <Property name="property">result</Property> |
| | | <Editor> |
| | |
| | | </TagEditor> |
| | | </Editor> |
| | | </AutoFormElement> |
| | | <Label layoutConstraint="colSpan:2"> |
| | | <Label layoutConstraint="colSpan:3"> |
| | | <Property name="text">说明:多项指标时按照1:质量指标检验(达标,不达标)、2:储存品质检验(宜存,不宜存)、3:食品安全检验(合格,不合格)这个顺序填写检验结论</Property> |
| | | <Property name="style"> |
| | | <Property name="color">blue</Property> |
| | |
| | | <Property name="property">spaqzbsfhg</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:3"> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">remark</Property> |
| | | <Property name="property">remark</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">reportType</Property> |
| | | <Property name="property">reportType</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">fileName</Property> |
| | | <Property name="property">fileName</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">fileTime</Property> |
| | | <Property name="property">fileTime</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <Container> |
| | | <Button layoutConstraint="left"> |
| | | <Property name="action">uploadFile</Property> |
| | | <Property name="caption">附件上传...</Property> |
| | | <Property name="exClassName">btn-default</Property> |
| | | <Property name="iconClass">fa fa-cloud-upload</Property> |
| | | </Button> |
| | | <Label layoutConstraint="left"> |
| | | <Property name="width">10px</Property> |
| | | </Label> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">showFilePdf();</ClientEvent> |
| | | <Property name="exClassName">btn-normal</Property> |
| | | <Property name="caption">预览</Property> |
| | | <Property name="iconClass">fa fa-picture-o</Property> |
| | | </Button> |
| | | </Container> |
| | | </AutoForm> |
| | | </Children> |
| | | </FieldSet> |
| | |
| | | <Property name="align">center</Property> |
| | | <Property name="readOnly">true</Property> |
| | | </DataColumn> |
| | | <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> |
| | |
| | | </TextEditor> |
| | | <Button> |
| | | <ClientEvent name="onClick">var key = view.get("#key2.value");
 |
| | | view.get("#dsFoodOrigin").set("parameter",{key:key}).flushAsync(); |
| | | view.get("#dsFoodOrigin").set("parameter",{key:key}).flushAsync(); |
| | | </ClientEvent> |
| | | <Property name="caption">查询</Property> |
| | | <Property name="iconClass">fa fa-search</Property> |
| | |
| | | <Property name="property">cname</Property> |
| | | <Property name="assignmentMap">user=cname</Property> |
| | | </DataSetDropDown> |
| | | <AjaxAction id="ajaxQualityPrint"> |
| | | <Property name="service">qualityManagerPR#printQualityBill</Property> |
| | | <Property name="executingMessage">正在执行打印……</Property> |
| | | </AjaxAction> |
| | | <UploadAction id="uploadFile"> |
| | | <ClientEvent name="onFileUploaded">var fileId = arg.returnValue;
 |
| | | if(fileId==("10")){
 |
| | | $alert("上传失败:附件名称为空。");
 |
| | | return;
 |
| | | }
 |
| | | if(fileId==("20")){
 |
| | | $alert("上传失败:附件不是pdf文件。");
 |
| | | return;
 |
| | | }
 |
| | | var data = view.get("#dsMain.data:#");
 |
| | | data.set("fileId",fileId);
 |
| | | data.set("fileName",arg.file.name);
 |
| | | data.set("fileTime",new Date);</ClientEvent> |
| | | <Property name="fileResolver">myUploadProcessor#uploadCommonFile</Property> |
| | | <Filters/> |
| | | </UploadAction> |
| | | </View> |
| | | </ViewConfig> |