| | |
| | | <Context/> |
| | | <Model> |
| | | <DataType name="dtMain" parent="dtInoutRecord"> |
| | | <ClientEvent name="onDataChange">if(arg.property =="depotId"){
 |
| | | autoByDepot(arg.newValue);
 |
| | | }
 |
| | | 
 |
| | | if(arg.property =="foodVariety"){
 |
| | | <ClientEvent name="onDataChange">if(arg.property =="foodVariety"){
 |
| | | var entity = arg.entity;
 |
| | | entity.reset("checkItems");
 |
| | | }</ClientEvent> |
| | |
| | | <Entity> |
| | | <Property name="checkId">$${this.checkId}</Property> |
| | | <Property name="foodVariety">$${this.foodVariety}</Property> |
| | | <Property name="deptId">$${this.deptId}</Property> |
| | | <Property name="type">$${this.type}</Property> |
| | | </Entity> |
| | | </Property> |
| | | <Property name="dataProvider">checkStandardPR#listCheckItemsByCheckId</Property> |
| | | <Property name="dataProvider">checkStandardPR#listCheckItemsByParam</Property> |
| | | <Property name="dataType">[dtCheckItems]</Property> |
| | | </Reference> |
| | | <Reference name="files"> |
| | | <Property name="dataProvider">sys.fileManager#listFile</Property> |
| | | <Property name="dataType">[dtFileData]</Property> |
| | | <Property name="parameter">$${this.id}</Property> |
| | | </Reference> |
| | | </DataType> |
| | | <DataType name="dtCheckItems"> |
| | |
| | | <Property></Property> |
| | | <Property name="label">运算符号</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="operaSymbolValue"> |
| | | <Property></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="keyProperty">code</Property> |
| | | <Property name="valueProperty">name</Property> |
| | | <Property name="mapValues">${dorado.getDataProvider("inoutDataPR#triggerResult").getResult()}</Property> |
| | | </Property> |
| | | </PropertyDef> |
| | | </DataType> |
| | | </Model> |
| | | <View layout="padding:5;regionPadding:5"> |
| | | <ClientEvent name="onReady">var TYPE = "${request.getParameter('type')}";
 |
| | | 
 |
| | | //类型切换
 |
| | | if("OUT" == TYPE){
 |
| | | view.get("#columnDeSum").set("visible",false);
 |
| | | //view.get("#label1").set("text","注:出库水分增重记入结算重量");
 |
| | | 
 |
| | | view.get("#dataGridCheckItem").set("visible",false);
 |
| | | 
 |
| | | view.get("#deWet").set("label","水分增重");
 |
| | | }else{
 |
| | | view.get("#deWet").set("label","水分扣重");
 |
| | | view.get("#dataGridCheckItem").set("visible",true);
 |
| | | }
 |
| | | var PROGRESS = "WEIGHT_TAG";
 |
| | | 
 |
| | | /**
 |
| | | * 刷新页面
 |
| | |
| | | view.get("#btnSave").set("disabled",false);
 |
| | | view.get("#btnPrintWeigh").set("disabled",true);
 |
| | | view.get("#btnPrintCheck").set("disabled",true);
 |
| | | 
 |
| | | view.get("#dsMain").set("parameter",TYPE).flushAsync();
 |
| | | };
 |
| | | 
 |
| | | 
 |
| | | flush();
 |
| | | 
 |
| | | /**
 |
| | |
| | | $alert("数据验证失败,【基础信息】-结算重量必须大于0!");
 |
| | | return;
 |
| | | }
 |
| | | 
 |
| | | view.get("#uaSave").execute(function(result){
 |
| | | if(result){
 |
| | | $alert("保存失败:"+result);
 |
| | |
| | | view.get("#btnPrintWeigh").set("disabled",false);
 |
| | | view.get("#btnPrintCheck").set("disabled",false);
 |
| | | $alert("保存成功,可以进行打印和重新提新表单!");
 |
| | | flush();
 |
| | | 
 |
| | | }
 |
| | | });
 |
| | | }
 |
| | | 
 |
| | | /**
 |
| | | * 打印出库过磅单
 |
| | | */
 |
| | | printBill = function(htmlStr) {
 |
| | | var LODOP = CLODOP;
 |
| | | LODOP.PRINT_INIT("称重单");
 |
| | | LODOP.SET_PRINT_PAGESIZE(1,2100,1400, "A4");
 |
| | | //LODOP.SET_PRINT_PAGESIZE(1, 0, '90mm', "A4");
 |
| | | LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", htmlStr);
 |
| | | LODOP.PREVIEW();
 |
| | | };
 |
| | | 
 |
| | | print5016Bill = function(htmlStr) {
 |
| | | var LODOP = CLODOP;
 |
| | | LODOP.PRINT_INIT("称重单");
 |
| | | LODOP.SET_PRINT_PAGESIZE(1, 1050, 1400, "");
 |
| | | LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", htmlStr);
 |
| | | LODOP.PREVIEW();
 |
| | | };
 |
| | | 
 |
| | | //打印扦样单
 |
| | | printCheck = function(){
 |
| | | $alert("打印模版未定义……");
 |
| | | };
 |
| | | 
 |
| | | //打印称重单
 |
| | | printWeight = function(){
 |
| | | var data = view.get("#dsMain.data");
 |
| | | if(!data) return;
 |
| | | var companyId = data.get("companyId");
 |
| | | console.log(companyId);
 |
| | | view.get("#ajaxPrint").set("parameter",data).execute(function(result){
 |
| | | if(companyId && companyId == "5016"){
 |
| | | print5016Bill(result);
 |
| | | }else {
 |
| | | printBill(result);
 |
| | | }
 |
| | | });
 |
| | | };
 |
| | | 
 |
| | | //根据仓库自动回填粮食品种,登记,产地新
 |
| | | autoByDepot = function(depotId){
 |
| | | view.get("#ajaxGetDepot").set("parameter",depotId).execute(function(result){
 |
| | | if(result){
 |
| | | //console.log(result);
 |
| | | var data = view.get("#dsMain.data:#");
 |
| | | data.set("foodLocation",result.foodLocation);
 |
| | | data.set("foodLevel",result.foodLevel);
 |
| | | data.set("foodVariety",result.foodVariety);
 |
| | | data.set("foodYear",result.foodYear);
 |
| | | }
 |
| | | });
 |
| | | };</ClientEvent> |
| | | <ClientEvent name="onCreate">
 |
| | | /**
 |
| | | * 自动计算,当前页面不自动关联扦样记录,全部由手动为准
 |
| | | * 
 |
| | | * 1.净重 = 毛重 - 皮重
 |
| | | * 2.总扣重 = 现场扣重 + 其他扣重 + 扣水杂质
 |
| | | * 3.结算重量 = 净重 - 总扣重 (含水杂增重)
 |
| | | * 4.出/入库重量 = 净重 - 总扣重 (不含水杂增重)
 |
| | | * 
 |
| | | * 5.入库时:扣水杂 正数 = 扣重,负数 = 增重
 |
| | | * 6.出库时:水分增重,正数=增重,负数=扣重
 |
| | | */
 |
| | | deAutoByWeight = function(name){
 |
| | | 
 |
| | | if(null == name) name = "1";
 |
| | | 
 |
| | | var curData = view.get("#dsMain.data:#");
 |
| | | var fullWeight = curData.get("fullWeight");
 |
| | | var emptyWeight = curData.get("emptyWeight");
 |
| | | 
 |
| | | if(fullWeight == 0 || emptyWeight == 0){
 |
| | | return;
 |
| | | }
 |
| | | // 净重
 |
| | | var netWeight = Number(fullWeight) - Number(emptyWeight);
 |
| | | 
 |
| | | if (netWeight <= 0){
 |
| | | $notify("净重小于0,当前称重存在逻辑问题");
 |
| | | return;
 |
| | | }
 |
| | | 
 |
| | | //汇总结果
 |
| | | var deSum = 0, addSum = 0, settleWeight = 0, recordWeight = 0;
 |
| | | //扣水杂
 |
| | | var deWet = curData.get("deWet"), deImpurity = curData.get("deImpurity");
 |
| | | 
 |
| | | var impurity = curData.get("impurity"), wet = curData.get("wet");
 |
| | | 
 |
| | | 
 |
| | | var deBase = 0, multiple = 0;
 |
| | | var checkItems = curData.get("checkItems");
 |
| | | //水分杂质,更改比例并且水分扣重还没计算情况下
 |
| | | if ("wet" == name) {
 |
| | | var checkItem = this.getCheckItem(checkItems,"C01", "C020101");
 |
| | | if (checkItem) {
 |
| | | deBase = Number(wet) - Number(checkItem.get("upperLimit"));
 |
| | | if (deBase == 0) return;
 |
| | | multiple = parseInt(deBase / checkItem.get("ruleNum"));//倍数
 |
| | | deWet = (netWeight * multiple * checkItem.get("ruleReduce") / 100.00).toFixed(0);
 |
| | | }
 |
| | | }
 |
| | | 
 |
| | | //杂质
 |
| | | if ("impurity" == name) {
 |
| | | checkItem = this.getCheckItem(recordData.checkItems, "C02","C01010301");
 |
| | | if (checkItem) {
 |
| | | deBase = Number(impurity) - Number(checkItem.get("upperLimit"));
 |
| | | if (deBase == 0) return;
 |
| | | multiple = parseInt(deBase / checkItem.get("ruleNum"));
 |
| | | deImpurity = (netWeight * multiple * checkItem.get("ruleReduce") / 100.00).toFixed(0);
 |
| | | }
 |
| | | }
 |
| | | 
 |
| | | /** 总扣重,不含增重*/
 |
| | | deSum = Number(curData.get("deOther")) + Number(curData.get("deHandle"));
 |
| | | 
 |
| | | //出库
 |
| | | if ("OUT" == curData.get("type")) {
 |
| | | if (Number(deWet) > 0) {//增重
 |
| | | addSum = addSum + Number(deWet);
 |
| | | } else {
 |
| | | deSum = deSum + Number(deWet);
 |
| | | }
 |
| | | 
 |
| | | if (Number(deImpurity) > 0) {//扣重
 |
| | | deSum = deSum + Number(deImpurity);
 |
| | | } else {
 |
| | | addSum = addSum + Number(deImpurity);
 |
| | | }
 |
| | | }else{
 |
| | | if (Number(deWet) > 0) {//扣重
 |
| | | deSum = deSum + Number(deWet);
 |
| | | } else {
 |
| | | addSum = addSum + Number(deWet);
 |
| | | }
 |
| | | if (Number(deImpurity) > 0) {//扣重
 |
| | | deSum = deSum + Number(deImpurity);
 |
| | | } else {
 |
| | | addSum = addSum + Number(deImpurity);
 |
| | | }
 |
| | | }
 |
| | | 
 |
| | | deSum = deSum.toFixed(0);
 |
| | | /** 增重转正数,便于计算 */
 |
| | | addSum = Math.abs(addSum).toFixed(0);
 |
| | | 
 |
| | | /** 入库重量 = 净重 - 总扣重 */
 |
| | | recordWeight = Number(netWeight) - Number(deSum);
 |
| | | 
 |
| | | /** 结算重量 = 净重 - 总扣重 + 增重 */
 |
| | | settleWeight = Number(netWeight) - Number(deSum) + Number(addSum);
 |
| | | 
 |
| | | curData.set("impurity",impurity);
 |
| | | curData.set("wet",wet);
 |
| | | curData.set("deImpurity",deImpurity);
 |
| | | curData.set("deWet",deWet);
 |
| | | curData.set("deSum",deSum);
 |
| | | curData.set("netWeight",netWeight);
 |
| | | curData.set("settleWeight",settleWeight);
 |
| | | curData.set("recordWeight",recordWeight);
 |
| | | };
 |
| | | 
 |
| | | 
 |
| | | /**
 |
| | | * 根据化验项和传递过来的参数获取当前参数的配置信息
 |
| | | * @param checkItems
 |
| | | * @param code1 系统参数ID
 |
| | | * @param code2 国标参数ID
 |
| | | * @returns {undefined}
 |
| | | */
 |
| | | function getCheckItem(checkItems, code1, code2) {
 |
| | | if (!checkItems) return null;
 |
| | | $.each(checkItems, function (index, checkItem) {
 |
| | | if (checkItem.get("standardId") == code1 || checkItem.get("standardId") == code2) {
 |
| | | if (checkItem.get("ruleNum") && checkItem.get("upperLimit") > 0.0) {
 |
| | | return checkItem;
 |
| | | }
 |
| | | }
 |
| | | });
 |
| | | return null;
 |
| | | }</ClientEvent> |
| | | <Property name="packages">font-awesome,css-common</Property> |
| | | <Property name="javaScriptFile">./static/plugins/lodop/LodopFuncs.js</Property> |
| | |
| | | <Button id="btnSave" layoutConstraint="left"> |
| | | <ClientEvent name="onClick">save();</ClientEvent> |
| | | <Property name="caption">数据提交</Property> |
| | | <Property name="exClassName">btn-default</Property> |
| | | <Property name="exClassName">btn-normal</Property> |
| | | <Property name="iconClass">fa fa-plus</Property> |
| | | </Button> |
| | | <Button id="btnPrintCheck" layoutConstraint="left"> |
| | | <ClientEvent name="onClick">printCheck();</ClientEvent> |
| | | <Property name="caption">打印抽样单</Property> |
| | | <Property name="caption">打印质检单</Property> |
| | | <Property name="exClassName">btn-default</Property> |
| | | <Property name="iconClass">fa fa-print</Property> |
| | | <Property name="tip">保存数据后可用</Property> |
| | |
| | | <Property name="iconClass">fa fa-minus</Property> |
| | | </Button> |
| | | </Container> |
| | | <TabControl id="tabControlMain"> |
| | | <TabControl id="tabControlMain" layoutConstraint="left "> |
| | | <Property name="width">1300</Property> |
| | | <ControlTab> |
| | | <Property name="caption">基础信息</Property> |
| | |
| | | <Property name="width">150</Property> |
| | | <Property name="name">tabCommon</Property> |
| | | <Container> |
| | | <FieldSet layout="regionPadding:10" layoutConstraint="padding:10"> |
| | | <FieldSet layout="regionPadding:5" layoutConstraint="padding:10"> |
| | | <Property name="caption">基本信息</Property> |
| | | <Buttons/> |
| | | <Children> |
| | |
| | | <Property name="name">userContact</Property> |
| | | <Property name="property">userContact</Property> |
| | | <Property name="label">联系电话</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="label">客户名称</Property> |
| | | <Property name="property">customerName</Property> |
| | | <Property name="editable">false</Property> |
| | | <Property name="trigger">ddNotice</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">foodLocation</Property> |
| | | <Property name="property">foodLocation</Property> |
| | | <Property name="trigger">ddFoodOrigin</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">foodLevel</Property> |
| | | <Property name="property">foodLevel</Property> |
| | | <Editor/> |
| | |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">noticeName</Property> |
| | | <Property name="property">noticeName</Property> |
| | | <Property name="trigger">ddNotice</Property> |
| | | <Property name="editable">false</Property> |
| | | <Property name="label">入库通知单</Property> |
| | | <Property name="name">registerTime</Property> |
| | | <Property name="property">registerTime</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">registerTime</Property> |
| | | <Property name="property">registerTime</Property> |
| | | <Property name="name">foodLocation</Property> |
| | | <Property name="property">foodLocation</Property> |
| | | <Property name="trigger">ddDicArea</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | </AutoForm> |
| | | </Children> |
| | | </FieldSet> |
| | | <FieldSet layout="regionPadding:10" layoutConstraint="padding:10"> |
| | | <FieldSet layout="regionPadding:5" layoutConstraint="padding:10"> |
| | | <Property name="caption">称重信息(单位:KG)</Property> |
| | | <Buttons/> |
| | | <Children> |
| | | <AutoForm> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="cols">*,*,*,*,*,*</Property> |
| | | <Property name="cols">*,50,*,50,*,50</Property> |
| | | <Property name="labelAlign">right</Property> |
| | | <Property name="labelWidth">100</Property> |
| | | <Property name="labelSeparator">:</Property> |
| | |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">emptyWeightTime</Property> |
| | | <Property name="property">emptyWeightTime</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">fullWeightUser</Property> |
| | | <Property name="property">fullWeightUser</Property> |
| | | <Property name="label">称重人</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <ClientEvent name="onBlur">//id 规则 d_prop
 |
| | | var id = self.getDom().id;
 |
| | | var prop = id.substring(2,id.length);
 |
| | |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">netWeight</Property> |
| | | <Property name="property">netWeight</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Property name="name">fullWeightTime</Property> |
| | | <Property name="property">fullWeightTime</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <ClientEvent name="onBlur">//id 规则 d_prop
 |
| | | var id = self.getDom().id;
 |
| | | var prop = id.substring(2,id.length);
 |
| | | deAutoByWeight(prop);</ClientEvent> |
| | | <Property name="name">deImpurity</Property> |
| | | <Property name="property">deImpurity</Property> |
| | | <Property name="showHint">false</Property> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">completeTime</Property> |
| | | <Property name="property">completeTime</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">impurity</Property> |
| | | <Property name="property">impurity</Property> |
| | | <Property name="showLabel">false</Property> |
| | | <Editor> |
| | | <TextEditor> |
| | | <Property name="blankText"> -- % --</Property> |
| | | </TextEditor> |
| | | </Editor> |
| | | </AutoFormElement> |
| | | <AutoFormElement id="deWet"> |
| | | <ClientEvent name="onBlur">//id 规则 d_prop
 |
| | | var id = self.getDom().id;
 |
| | | var prop = id.substring(2,id.length);
 |
| | | deAutoByWeight(prop);</ClientEvent> |
| | | <Property name="name">deWet</Property> |
| | | <Property name="property">deWet</Property> |
| | | <Property name="showHint">false</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">wet</Property> |
| | | <Property name="property">wet</Property> |
| | | <Property name="showLabel">false</Property> |
| | | <Editor> |
| | | <TextEditor> |
| | | <Property name="blankText"> -- % --</Property> |
| | | </TextEditor> |
| | | </Editor> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <ClientEvent name="onBlur">//id 规则 d_prop
 |
| | |
| | | deAutoByWeight(prop);</ClientEvent> |
| | | <Property name="name">deHandle</Property> |
| | | <Property name="property">deHandle</Property> |
| | | <Property name="label">现场扣重</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">deSum</Property> |
| | | <Property name="property">deSum</Property> |
| | | <Property name="name">deOtherInfo</Property> |
| | | <Property name="property">deOtherInfo</Property> |
| | | <Property name="label">其他原因</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <ClientEvent name="onBlur">//id 规则 d_prop
 |
| | | var id = self.getDom().id;
 |
| | | var prop = id.substring(2,id.length);
 |
| | | deAutoByWeight(prop);</ClientEvent> |
| | | <Property name="name">deCheck</Property> |
| | | <Property name="property">deCheck</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <ClientEvent name="onBlur">//id 规则 d_prop
 |
| | | var id = self.getDom().id;
 |
| | | var prop = id.substring(2,id.length);
 |
| | | deAutoByWeight(prop);</ClientEvent> |
| | | <Property name="name">addCheck</Property> |
| | | <Property name="property">addCheck</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <Label layoutConstraint="colSpan:2"> |
| | | <Property name="style"> |
| | | <Property name="color">blue</Property> |
| | | <Property name="padding-left">80px</Property> |
| | | </Property> |
| | | <Property name="text">说明:质检增扣重请查看质检信息栏位详细</Property> |
| | | </Label> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">netWeight</Property> |
| | | <Property name="property">netWeight</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">completeTime</Property> |
| | | <Property name="property">completeTime</Property> |
| | | <Property name="name">recordWeight</Property> |
| | | <Property name="property">recordWeight</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">fullWeightTime</Property> |
| | | <Property name="property">fullWeightTime</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">emptyWeightTime</Property> |
| | | <Property name="property">emptyWeightTime</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <Label layoutConstraint="colSpan:6"> |
| | | <Property name="style"> |
| | | <Property name="color">blue</Property> |
| | | <Property name="padding-left">80px</Property> |
| | | </Property> |
| | | <Property name="text">说明:结算重量 = 净重 - 扣重 + 增重;扣水杂:正数=扣重,负数=增重</Property> |
| | | </Label> |
| | | </AutoForm> |
| | | </Children> |
| | | </FieldSet> |
| | | <FieldSet layout="regionPadding:10" layoutConstraint="padding:10"> |
| | | <Property name="caption">备注说明</Property> |
| | | <FieldSet layout="regionPadding:5" layoutConstraint="padding:10"> |
| | | <Property name="caption">其他需要补充信息</Property> |
| | | <Buttons/> |
| | | <Children> |
| | | <AutoForm> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="cols">*,*</Property> |
| | | <Property name="cols">*,*,*</Property> |
| | | <Property name="labelAlign">right</Property> |
| | | <Property name="labelSeparator">:</Property> |
| | | <Property name="labelWidth">100</Property> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <AutoFormElement> |
| | | <Property name="name">jjlx</Property> |
| | | <Property name="property">jjlx</Property> |
| | | <Editor> |
| | | <RadioGroup> |
| | | <RadioButton> |
| | | <Property name="text">称重入库</Property> |
| | | <Property name="value">0</Property> |
| | | </RadioButton> |
| | | <RadioButton> |
| | | <Property name="value">1</Property> |
| | | <Property name="text">标准包入库</Property> |
| | | </RadioButton> |
| | | </RadioGroup> |
| | | </Editor> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">bzw</Property> |
| | | <Property name="property">bzw</Property> |
| | | <Editor> |
| | | <RadioGroup> |
| | | <RadioButton> |
| | | <Property name="text">麻袋</Property> |
| | | <Property name="value">1</Property> |
| | | </RadioButton> |
| | | <RadioButton> |
| | | <Property name="text">编织袋</Property> |
| | | <Property name="value">2</Property> |
| | | </RadioButton> |
| | | <RadioButton> |
| | | <Property name="text">散装</Property> |
| | | <Property name="value">3</Property> |
| | | </RadioButton> |
| | | <RadioButton> |
| | | <Property name="value">9</Property> |
| | | <Property name="text">其他</Property> |
| | | </RadioButton> |
| | | </RadioGroup> |
| | | </Editor> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">dbz</Property> |
| | | <Property name="property">dbz</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">bzbjs</Property> |
| | | <Property name="property">bzbjs</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">dePackage</Property> |
| | | <Property name="property">dePackage</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">price</Property> |
| | | <Property name="property">price</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:3"> |
| | | <Property name="name">remarks</Property> |
| | | <Property name="property">remarks</Property> |
| | | <Property name="editorType">TextArea</Property> |
| | | <Property name="showLabel">false</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | </AutoForm> |
| | |
| | | </Container> |
| | | </ControlTab> |
| | | <ControlTab id="tabCheck"> |
| | | <Property name="caption">扦样化验</Property> |
| | | <Property name="caption">质检信息</Property> |
| | | <Property name="iconClass">fa fa-gavel</Property> |
| | | <Property name="width">150</Property> |
| | | <Property name="name">tabCheck</Property> |
| | | <Container layout="padding:10"> |
| | | <AutoForm> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="cols">*,*,*,*</Property> |
| | | <Property name="cols">*,*,*</Property> |
| | | <Property name="labelAlign">right</Property> |
| | | <Property name="labelWidth">100</Property> |
| | | <Property name="labelSeparator">:</Property> |
| | |
| | | <Property name="label">化验结果</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">checkTime</Property> |
| | | <Property name="property">checkTime</Property> |
| | | <Property name="label">质检时间</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">sampleUser</Property> |
| | | <Property name="property">sampleUser</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">sampleTime</Property> |
| | | <Property name="property">sampleTime</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">sampleType</Property> |
| | | <Property name="property">sampleType</Property> |
| | | <Property name="editorType">RadioGroup</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | </AutoForm> |
| | | <DataGrid id="dataGridCheckItem" layoutConstraint="padding:10"> |
| | | <ClientEvent name="onCellValueEdit">//实现化验项目调整,更新主表中值
 |
| | | var entity = arg.entity;
 |
| | | var inoutData = view.get("#dsMain.data:#");
 |
| | | 
 |
| | | if(entity.get("standardId") =="C01"){//水分
 |
| | | inoutData.set("wet",entity.get("value"));
 |
| | | <ClientEvent name="onCellValueEdit">var data = view.get("#dsMain.data:#")
 |
| | | if(data){
 |
| | | var plateNum = data.get("plateNum");
 |
| | | self.set("parameter",{
 |
| | | plateNum:plateNum
 |
| | | })
 |
| | | }
 |
| | | 
 |
| | | if(entity.get("standardId") =="C02"){//雜志
 |
| | | inoutData.set("impurity",entity.get("value"));
 |
| | | }</ClientEvent> |
| | | </ClientEvent> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="dataPath">#.checkItems</Property> |
| | | <Property name="highlightCurrentRow">false</Property> |
| | |
| | | <Property name="property">unit</Property> |
| | | <Property name="width">80</Property> |
| | | <Property name="readOnly">true</Property> |
| | | </DataColumn> |
| | | <DataColumn name="standardValue"> |
| | | <Property name="property">standardValue</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Property name="align">center</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> |
| | | </DataColumn> |
| | | </DataGrid> |
| | | </Container> |
| | | </ControlTab> |
| | | </TabControl> |
| | | <CustomDropDown id="ddFoodOrigin"> |
| | | <TabControl id="tabControlImage" layoutConstraint="left"> |
| | | <Property name="width">370</Property> |
| | | <ControlTab id="tabImage"> |
| | | <Property name="name">tabImage</Property> |
| | | <Property name="caption">出入库过程记录</Property> |
| | | <FieldSet layout="regionPadding:5" layoutConstraint="top padding:10"> |
| | | <Buttons> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">view.PROGRESS = "EMPTY_WEIGHT";
 |
| | | </ClientEvent> |
| | | <Property name="exClassName">btn-default</Property> |
| | | <Property name="iconClass">fa fa-cloud-upload</Property> |
| | | <Property name="action">uploadImg</Property> |
| | | <Property name="caption">空车称</Property> |
| | | </Button> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">view.PROGRESS = "FULL_WEIGHT";
 |
| | | </ClientEvent> |
| | | <Property name="exClassName">btn-default</Property> |
| | | <Property name="iconClass">fa fa-cloud-upload</Property> |
| | | <Property name="action">uploadImg1</Property> |
| | | <Property name="caption">满车称</Property> |
| | | </Button> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">view.PROGRESS = "HAND";</ClientEvent> |
| | | <Property name="caption">值仓</Property> |
| | | <Property name="exClassName">btn-default</Property> |
| | | <Property name="iconClass">fa fa-cloud-upload</Property> |
| | | <Property name="action">uploadImg2</Property> |
| | | </Button> |
| | | </Buttons> |
| | | <Children> |
| | | <DataGrid id="dgFiles"> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Property name="selectionMode">singleRow</Property> |
| | | <Property name="dataPath">#.files</Property> |
| | | <RowNumColumn/> |
| | | <DataColumn name="bizTag"> |
| | | <Property name="property">bizTag</Property> |
| | | <Property name="visible">false</Property> |
| | | </DataColumn> |
| | | <DataColumn name="fileName"> |
| | | <Property name="property">fileName</Property> |
| | | </DataColumn> |
| | | </DataGrid> |
| | | </Children> |
| | | </FieldSet> |
| | | </ControlTab> |
| | | </TabControl> |
| | | <YearDropDown id="yearDropDown"/> |
| | | <UpdateAction id="uaSave"> |
| | | <Property name="dataResolver">inoutDataPR#saveInoutData</Property> |
| | | <Property name="confirmMessage">确定要提交么?</Property> |
| | | <UpdateItem> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="dataPath">[#current]</Property> |
| | | <Property name="validateData">false</Property> |
| | | </UpdateItem> |
| | | </UpdateAction> |
| | | <AjaxAction id="ajaxPrint"> |
| | | <Property name="service">inoutDataPR#printWeightBill</Property> |
| | | <Property name="executingMessage">正在执行打印……</Property> |
| | | <Property name="async">false</Property> |
| | | </AjaxAction> |
| | | <AjaxAction id="ajaxPrintCheckBill"> |
| | | <Property name="async">false</Property> |
| | | <Property name="executingMessage">正在执行打印……</Property> |
| | | <Property name="service">inoutDataPR#printShipBill</Property> |
| | | </AjaxAction> |
| | | <CustomDropDown id="ddDicArea"> |
| | | <Property name="minHeight">500</Property> |
| | | <Property name="assignmentMap">foodLocation=name</Property> |
| | | <Property name="minWidth">500</Property> |
| | | <Property name="assignmentMap">foodLocation=name,foodLocationId=code</Property> |
| | | <Container layout="regionPadding:5"> |
| | | <DataSet id="dsFoodOrigin"> |
| | | <Property name="dataProvider">dicTriggerPR#pagFoodLocationData</Property> |
| | | <Property name="dataType">[dtFoodOrigin]</Property> |
| | | <DataSet id="dsDicArea"> |
| | | <Property name="dataProvider">dicAreaPR#pageList</Property> |
| | | <Property name="parameter"></Property> |
| | | <Property name="pageSize">30</Property> |
| | | <Property name="dataType">[dtArea]</Property> |
| | | <Property name="pageSize">1000</Property> |
| | | </DataSet> |
| | | <Container layout="hbox regionPadding:5"> |
| | | <TextEditor id="key2"> |
| | | <Property name="blankText"> -- 编码或者名称 --</Property> |
| | | <Property name="blankText"> -名称或简拼,北京市 bjs -</Property> |
| | | <Property name="width">200</Property> |
| | | </TextEditor> |
| | | <Button> |
| | | <ClientEvent name="onClick">var key = view.get("#key2.value");
 |
| | | view.get("#dsFoodOrigin").set("parameter",{key:key}).flushAsync();</ClientEvent> |
| | | view.get("#dsDicArea").set("parameter",{key:key}).flushAsync();</ClientEvent> |
| | | <Property name="caption">查询</Property> |
| | | <Property name="iconClass">fa fa-search</Property> |
| | | </Button> |
| | | <Button> |
| | | <ClientEvent name="onClick">var data = view.get("#dsFoodOrigin.data:#");
 |
| | | <ClientEvent name="onClick">var data = view.get("#dsDicArea.data:#");
 |
| | | if(data){
 |
| | | view.get("#ddFoodOrigin").close(data.toJSON());
 |
| | | view.get("#ddDicArea").close(data.toJSON());
 |
| | | }</ClientEvent> |
| | | <Property name="iconClass">fa fa-check</Property> |
| | | <Property name="caption">确定</Property> |
| | | </Button> |
| | | </Container> |
| | | <DataGrid> |
| | | <ClientEvent name="onDataRowDoubleClick">var data = view.get("#dsFoodOrigin.data:#");
 |
| | | <ClientEvent name="onDataRowDoubleClick">var data = view.get("#dsDicArea.data:#");
 |
| | | if(data){
 |
| | | view.get("#ddFoodOrigin").close(data.toJSON());
 |
| | | view.get("#ddDicArea").close(data.toJSON());
 |
| | | }</ClientEvent> |
| | | <Property name="dataSet">dsFoodOrigin</Property> |
| | | <Property name="dataSet">dsDicArea</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <DataColumn name="code"> |
| | | <Property name="property">code</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn name="name"> |
| | | <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = "bold";
 |
| | | arg.processDefault = true;</ClientEvent> |
| | | <Property name="property">name</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn name="code"> |
| | | <Property name="property">code</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | |
| | | </DataColumn> |
| | | </DataGrid> |
| | | <DataPilot layoutConstraint="bottom"> |
| | | <Property name="dataSet">dsFoodOrigin</Property> |
| | | <Property name="dataSet">dsDicArea</Property> |
| | | </DataPilot> |
| | | </Container> |
| | | </CustomDropDown> |
| | | <CustomDropDown id="ddNotice"> |
| | | <Property name="minHeight">400</Property> |
| | | <Property name="assignmentMap">noticeId=id,noticeName=name,customerId=customerId,customerName=customerName</Property> |
| | | <Property name="assignmentMap">noticeId=id,customerName=customerName</Property> |
| | | <Property name="minWidth">500</Property> |
| | | <Property name="autoOpen">true</Property> |
| | | <Container layout="regionPadding:5"> |
| | |
| | | <Button> |
| | | <ClientEvent name="onClick">var key = view.get("#key3.value");
 |
| | | var type = "${request.getParameter('type')}";
 |
| | | //var customerId = view.get("#dataGridMain.currentEntity").get("customerId");
 |
| | | //var depotId = view.get("#dataGridMain.currentEntity").get("depotId");
 |
| | | //var foodVariety = view.get("#dataGridMain.currentEntity").get("foodVariety");
 |
| | | //view.get("#dsNotice").set("parameter",{key:key,type:type,customerId:customerId,depotId:depotId,foodVariety:foodVariety}).flushAsync();
 |
| | | view.get("#dsNotice").set("parameter",{key: key,type: type}).flushAsync();</ClientEvent> |
| | | <Property name="caption">查询</Property> |
| | | <Property name="iconClass">fa fa-search</Property> |
| | | </Button> |
| | | <Button> |
| | | <ClientEvent name="onClick">var data = view.get("#dsCustomer.data:#");
 |
| | | <ClientEvent name="onClick">var data = view.get("#dsNotice.data:#");
 |
| | | if(data){
 |
| | | view.get("#ddCustomer").close(data.toJSON());
 |
| | | view.get("#ddNotice").close(data.toJSON());
 |
| | | }</ClientEvent> |
| | | <Property name="iconClass">fa fa-check</Property> |
| | | <Property name="caption">确定</Property> |
| | |
| | | }</ClientEvent> |
| | | <Property name="dataSet">dsNotice</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <DataColumn name="name"> |
| | | <Property name="property">name</Property> |
| | | </DataColumn> |
| | | <DataColumn> |
| | | <Property name="property">customerName</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="name">customerName</Property> |
| | | </DataColumn> |
| | | <DataColumn name="id"> |
| | | <Property name="property">id</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="visible">false</Property> |
| | | <DataColumn name="name"> |
| | | <Property name="property">name</Property> |
| | | </DataColumn> |
| | | </DataGrid> |
| | | </Container> |
| | | </CustomDropDown> |
| | | <YearDropDown id="yearDropDown"/> |
| | | <UpdateAction id="uaSave"> |
| | | <Property name="dataResolver">inoutDataPR#saveInoutData</Property> |
| | | <Property name="confirmMessage">确定要提交么?</Property> |
| | | <UpdateItem> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="dataPath">[#current]</Property> |
| | | <Property name="validateData">false</Property> |
| | | </UpdateItem> |
| | | </UpdateAction> |
| | | <AjaxAction id="ajaxGetDepot"> |
| | | <Property name="service">depotPR#getDepot</Property> |
| | | </AjaxAction> |
| | | <AjaxAction id="ajaxPrint"> |
| | | <Property name="service">inoutDataPR#printWeightBill</Property> |
| | | <Property name="executingMessage">正在执行打印……</Property> |
| | | <Property name="async">false</Property> |
| | | </AjaxAction> |
| | | <UploadAction id="uploadImg"> |
| | | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 |
| | | 
 |
| | | var plateNum = data.get("plateNum");
 |
| | | self.set("parameter",{
 |
| | | plateNum:plateNum,
 |
| | | bizTag:"EMPTY_WEIGHT"
 |
| | | })</ClientEvent> |
| | | <ClientEvent name="onFileUploaded">//附件上传完成后添加业务数据
 |
| | | var mainData = view.get("#dsMain.data");
 |
| | | var fileName = arg.returnValue;
 |
| | | var files = mainData.get("files");
 |
| | | files.insert({bizTag:view.PROGRESS,fileName:fileName,createTime:new Date()});</ClientEvent> |
| | | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 |
| | | if(data){
 |
| | | var plateNum = data.get("plateNum");
 |
| | | self.set("parameter",{
 |
| | | plateNum:plateNum
 |
| | | })
 |
| | | }</ClientEvent> |
| | | <Property name="maxFileSize">20MB</Property> |
| | | <Property name="successMessage">上传成功</Property> |
| | | <Property name="parameter"></Property> |
| | | <Property name="fileResolver">inoutDataPR#uploadImage</Property> |
| | | <Filters/> |
| | | </UploadAction> |
| | | <UploadAction id="uploadImg1"> |
| | | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 |
| | | 
 |
| | | var plateNum = data.get("plateNum");
 |
| | | self.set("parameter",{
 |
| | | plateNum:plateNum,
 |
| | | bizTag:"FULL_WEIGHT"
 |
| | | })</ClientEvent> |
| | | <ClientEvent name="onFileUploaded">//附件上传完成后添加业务数据
 |
| | | var mainData = view.get("#dsMain.data");
 |
| | | var fileName = arg.returnValue;
 |
| | | var files = mainData.get("files");
 |
| | | files.insert({bizTag:view.PROGRESS,fileName:fileName});</ClientEvent> |
| | | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 |
| | | if(data){
 |
| | | var plateNum = data.get("plateNum");
 |
| | | self.set("parameter",{
 |
| | | plateNum:plateNum
 |
| | | })
 |
| | | }</ClientEvent> |
| | | <Property name="maxFileSize">20MB</Property> |
| | | <Property name="successMessage">上传成功</Property> |
| | | <Property name="parameter"></Property> |
| | | <Property name="fileResolver">inoutDataPR#uploadImage</Property> |
| | | <Filters/> |
| | | </UploadAction> |
| | | <UploadAction id="uploadImg2"> |
| | | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 |
| | | 
 |
| | | var plateNum = data.get("plateNum");
 |
| | | self.set("parameter",{
 |
| | | plateNum:plateNum,
 |
| | | bizTag:"HAND"
 |
| | | })</ClientEvent> |
| | | <ClientEvent name="onFileUploaded">//附件上传完成后添加业务数据
 |
| | | var mainData = view.get("#dsMain.data");
 |
| | | var fileName = arg.returnValue;
 |
| | | var files = mainData.get("files");
 |
| | | files.insert({bizTag:view.PROGRESS,fileName:fileName});</ClientEvent> |
| | | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 |
| | | if(data){
 |
| | | var plateNum = data.get("plateNum");
 |
| | | self.set("parameter",{
 |
| | | plateNum:plateNum
 |
| | | })
 |
| | | }</ClientEvent> |
| | | <Property name="maxFileSize">20MB</Property> |
| | | <Property name="successMessage">上传成功</Property> |
| | | <Property name="parameter"></Property> |
| | | <Property name="fileResolver">inoutDataPR#uploadImage</Property> |
| | | <Filters/> |
| | | </UploadAction> |
| | | </View> |
| | | </ViewConfig> |