ws183
2025-04-28 b306d1106b915bb13fd7a02217ae9c65de2fd03d
igds-core/src/main/java/com/ld/igds/m/view/QualityManager.view.xml
@@ -46,17 +46,6 @@
        </Property>
        <Property name="label">粮食等级</Property>
      </PropertyDef>
      <PropertyDef name="foodType">
        <Property name="label">粮食性质</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicTriggerPR#dicTrigger&quot;).getResult(&quot;FOOD_TYPE_&quot;)}</Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="foodLocation">
        <Property name="label">粮食产地</Property>
      </PropertyDef>
      <PropertyDef name="type">
        <Property name="label">检验类别</Property>
        <Property name="mapping">
@@ -80,30 +69,35 @@
      </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">
        <Property name="label">检验结论</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="checkArea">
        <Property name="label">扦样区域</Property>
      </PropertyDef>
      <PropertyDef name="checkUser">
        <Property name="label">扦样人</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="ypsl">
        <Property name="label">样品数量</Property>
        <Property name="dataType">Double</Property>
        <Property name="displayFormat">0.## KG</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="checkTime">
        <Property name="label">扦样时间</Property>
        <Property name="dataType">Date</Property>
      </PropertyDef>
      <PropertyDef name="dbsl">
        <Property name="label">样品代表数量</Property>
        <Property name="label">代表数量</Property>
        <Property name="dataType">Double</Property>
        <Property name="displayFormat">0.## KG</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="ypdj">
        <Property name="label">样品等级</Property>
@@ -112,6 +106,7 @@
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="normalYear">
        <Property name="label">正常存储年限</Property>
@@ -142,10 +137,12 @@
      <PropertyDef name="unit">
        <Property></Property>
        <Property name="label">检验单位</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="zblb">
        <Property></Property>
        <Property name="label">指标类别</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="qfrq">
        <Property name="dataType">Date</Property>
@@ -158,6 +155,7 @@
      <PropertyDef name="shrxm">
        <Property></Property>
        <Property name="label">审核人姓名</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="qydbh">
        <Property></Property>
@@ -170,10 +168,55 @@
      <PropertyDef name="ypbh">
        <Property></Property>
        <Property name="label">样品编号</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="updateTime">
        <Property name="dataType">Date</Property>
        <Property name="label">数据更新时间</Property>
      </PropertyDef>
      <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>
@@ -186,6 +229,20 @@
          </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">
@@ -248,7 +305,7 @@
        <Property name="label">检测值</Property>
      </PropertyDef>
      <PropertyDef name="remarks">
        <Property name="label">化验结果</Property>
        <Property name="label">备注</Property>
      </PropertyDef>
      <PropertyDef name="operaSymbolValue">
        <Property></Property>
@@ -452,10 +509,9 @@
   view.get(&quot;#ajaxGetDepot&quot;).set(&quot;parameter&quot;,depotId).execute(function(result){&#xD;
     if(result){&#xD;
     var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
     data.set(&quot;foodLocation&quot;,result.foodLocation);&#xD;
     data.set(&quot;foodLevel&quot;,result.foodLevel);&#xD;
     data.set(&quot;foodVariety&quot;,result.foodVariety);&#xD;
     data.set(&quot;foodType&quot;,result.foodType);&#xD;
    data.set(&quot;storeDate&quot;,result.storeDate);&#xD;
   }&#xD;
});&#xD;
};&#xD;
@@ -467,8 +523,29 @@
 data.set(&quot;checkItems&quot;,result);&#xD;
   }&#xD;
  }); &#xD;
};      </ClientEvent>
};&#xD;
/**&#xD;
 * 预览PDF文件&#xD;
 */&#xD;
showFilePdf = function(){&#xD;
   var cur = view.get(&quot;#dsMain.data:#&quot;);&#xD;
   var fileName = cur.get(&quot;fileId&quot;);&#xD;
   var fileTime = new Date(cur.get(&quot;fileTime&quot;)).formatDate(&quot;y-m-d H:i:s&quot;);&#xD;
   if(!fileName){&#xD;
      $alert(&quot;没有获取到文件名称,无法预览。&quot;);&#xD;
      return;&#xD;
   }&#xD;
   if(!cur.get(&quot;fileTime&quot;)){&#xD;
      $alert(&quot;没有获取到附件上传时间,无法访问。&quot;);&#xD;
      return;&#xD;
   }&#xD;
   &#xD;
   var url = &quot;./basic/file/show-pdf?fileName=&quot;+fileName+&quot;&amp;fileTime=&quot;+fileTime+&quot;&amp;filePathType=common&quot;;&#xD;
   &#xD;
   window.open(url, &quot;_blank&quot;);&#xD;
};</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>
@@ -532,9 +609,9 @@
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
                    if(data){&#xD;
                    view.get(&quot;#dialogMain&quot;).show();&#xD;
                    }
if(data){&#xD;
    view.get(&quot;#dialogMain&quot;).show();&#xD;
}
                </ClientEvent>
        <Property name="caption">修改</Property>
        <Property name="exClassName">btn-warm</Property>
@@ -562,8 +639,25 @@
        <ClientEvent name="onClick">view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
                </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(&quot;#dsMain.data:#&quot;);&#xD;
if (!data) {&#xD;
   $alert(&quot;请先选择数据!&quot;);&#xD;
   return;&#xD;
}&#xD;
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">
@@ -597,8 +691,7 @@
        <Container layout="hbox regionPadding:15">
          <Button layoutConstraint="left">
            <ClientEvent name="onClick">var param = view.get(&quot;#dsParam.data&quot;);&#xD;
                            view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,param.toJSON()).flushAsync();
                        </ClientEvent>
view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,param.toJSON()).flushAsync();                   </ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="exClassName">btn-default</Property>
            <Property name="iconClass">fa fa-refresh</Property>
@@ -694,14 +787,13 @@
      <Buttons>
        <Button>
          <ClientEvent name="onClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
                        if(data.validate() != 'ok'){&#xD;
                        $notify(&quot;数据校验失败!!&quot;);&#xD;
                        return;&#xD;
                        }&#xD;
                        view.get(&quot;#uaAction&quot;).set(&quot;parameter&quot;,data).execute(function(){&#xD;
                        self.get(&quot;parent&quot;).hide();&#xD;
                        });
                    </ClientEvent>
if(data.validate() != 'ok'){&#xD;
 $notify(&quot;数据校验失败!!&quot;);&#xD;
 return;&#xD;
 }&#xD;
 view.get(&quot;#uaAction&quot;).set(&quot;parameter&quot;,data).execute(function(){&#xD;
 self.get(&quot;parent&quot;).hide();&#xD;
});                 </ClientEvent>
          <Property name="caption">保存</Property>
          <Property name="iconClass">fa fa-check</Property>
          <Property name="exClassName">btn-normal</Property>
@@ -725,7 +817,7 @@
              <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>
@@ -804,6 +896,39 @@
                <Property name="property">ypdj</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>
                    <Property name="availableTagsDataPath">.name</Property>
                    <Property name="availableTagsDataSet">dsResult</Property>
                    <Property name="textSeperator">#</Property>
                  </TagEditor>
                </Editor>
              </AutoFormElement>
              <Label layoutConstraint="colSpan:3">
                <Property name="text">说明:多项指标时按照1:质量指标检验(达标,不达标)、2:储存品质检验(宜存,不宜存)、3:食品安全检验(合格,不合格)这个顺序填写检验结论</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
              </Label>
              <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>
                <Property name="name">normalYear</Property>
                <Property name="property">normalYear</Property>
@@ -820,39 +945,58 @@
                  </RadioGroup>
                </Editor>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">qydbh</Property>
                <Property name="property">qydbh</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">ypbh</Property>
                <Property name="property">ypbh</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">spaqzbsfhg</Property>
                <Property name="property">spaqzbsfhg</Property>
                <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>
                  <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>
                <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>
@@ -918,33 +1062,6 @@
                <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>
@@ -990,7 +1107,7 @@
          </TextEditor>
          <Button>
            <ClientEvent name="onClick">var key = view.get(&quot;#key2.value&quot;);&#xD;
                            view.get(&quot;#dsFoodOrigin&quot;).set(&quot;parameter&quot;,{key:key}).flushAsync();
view.get(&quot;#dsFoodOrigin&quot;).set(&quot;parameter&quot;,{key:key}).flushAsync();
                        </ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="iconClass">fa fa-search</Property>
@@ -1047,5 +1164,26 @@
      <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;&#xD;
        if(fileId==(&quot;10&quot;)){&#xD;
        $alert(&quot;上传失败:附件名称为空。&quot;);&#xD;
        return;&#xD;
        }&#xD;
        if(fileId==(&quot;20&quot;)){&#xD;
        $alert(&quot;上传失败:附件不是pdf文件。&quot;);&#xD;
        return;&#xD;
        }&#xD;
var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
data.set(&quot;fileId&quot;,fileId);&#xD;
data.set(&quot;fileName&quot;,arg.file.name);&#xD;
data.set(&quot;fileTime&quot;,new Date);</ClientEvent>
      <Property name="fileResolver">myUploadProcessor#uploadCommonFile</Property>
      <Filters/>
    </UploadAction>
  </View>
</ViewConfig>