| | |
| | | 
 |
| | | }
 |
| | | });
 |
| | | }
 |
| | | 
 |
| | | //删除附件
 |
| | | delFile = function(){
 |
| | | var entity = view.get("#dgFiles").getCurrentItem();
 |
| | | view.get("#ajaxDelFile").set("parameter",{
 |
| | | fileName:entity.get("fileName"),
 |
| | | createTime:entity.get("createTime")
 |
| | | }).execute(function(result){
 |
| | | if(result){
 |
| | | $alert(result);
 |
| | | }else{
 |
| | | entity.remove();
 |
| | | $alert("删除成功!");
 |
| | | }
 |
| | | });
 |
| | | }</ClientEvent> |
| | | <Property name="packages">font-awesome,css-common</Property> |
| | | <Property name="javaScriptFile">./static/plugins/lodop/LodopFuncs.js</Property> |
| | |
| | | </AutoFormElement> |
| | | </AutoForm> |
| | | <DataGrid id="dataGridCheckItem" layoutConstraint="padding:10"> |
| | | <ClientEvent name="onCellValueEdit">var data = view.get("#dsMain.data:#")
 |
| | | if(data){
 |
| | | var plateNum = data.get("plateNum");
 |
| | | self.set("parameter",{
 |
| | | plateNum:plateNum
 |
| | | })
 |
| | | }
 |
| | | </ClientEvent> |
| | | <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="dataSet">dsMain</Property> |
| | | <Property name="dataPath">#.checkItems</Property> |
| | | <Property name="highlightCurrentRow">false</Property> |
| | |
| | | <FieldSet layout="regionPadding:5" layoutConstraint="top padding:10"> |
| | | <Buttons> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">view.PROGRESS = "EMPTY_WEIGHT";
 |
| | | <ClientEvent name="onClick">view.PROGRESS = "WEIGHT_EMPTY";
 |
| | | </ClientEvent> |
| | | <Property name="exClassName">btn-default</Property> |
| | | <Property name="iconClass">fa fa-cloud-upload</Property> |
| | |
| | | <Property name="caption">空车称</Property> |
| | | </Button> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">view.PROGRESS = "FULL_WEIGHT";
 |
| | | <ClientEvent name="onClick">view.PROGRESS = "WEIGHT_FULL";
 |
| | | </ClientEvent> |
| | | <Property name="exClassName">btn-default</Property> |
| | | <Property name="iconClass">fa fa-cloud-upload</Property> |
| | |
| | | <Property name="caption">满车称</Property> |
| | | </Button> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">view.PROGRESS = "HAND";</ClientEvent> |
| | | <ClientEvent name="onClick">view.PROGRESS = "HANDLE";</ClientEvent> |
| | | <Property name="caption">值仓</Property> |
| | | <Property name="exClassName">btn-default</Property> |
| | | <Property name="iconClass">fa fa-cloud-upload</Property> |
| | |
| | | </DataColumn> |
| | | <DataColumn name="fileName"> |
| | | <Property name="property">fileName</Property> |
| | | </DataColumn> |
| | | <DataColumn> |
| | | <ClientEvent name="onRenderCell">arg.dom.innerHTML = "<a href='javascript:;' onClick='delFile()'>删除</a>";
 |
| | | </ClientEvent> |
| | | <Property name="property">fileId</Property> |
| | | <Property name="name">fileId</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="caption">操作</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Property name="width">80</Property> |
| | | </DataColumn> |
| | | </DataGrid> |
| | | </Children> |
| | |
| | | </CustomDropDown> |
| | | <UploadAction id="uploadImg"> |
| | | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 |
| | | 
 |
| | | var plateNum = data.get("plateNum");
 |
| | | var bizTag = "EMPTY";
 |
| | | self.set("parameter",{
 |
| | | plateNum:plateNum,
 |
| | | bizTag:"EMPTY_WEIGHT"
 |
| | | bizTag: bizTag
 |
| | | })</ClientEvent> |
| | | <ClientEvent name="onFileUploaded">//附件上传完成后添加业务数据
 |
| | | var mainData = view.get("#dsMain.data");
 |
| | |
| | | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 |
| | | if(data){
 |
| | | var plateNum = data.get("plateNum");
 |
| | | var bizTag = "EMPTY";
 |
| | | self.set("parameter",{
 |
| | | plateNum:plateNum
 |
| | | bizTag:bizTag
 |
| | | })
 |
| | | }</ClientEvent> |
| | | <Property name="maxFileSize">20MB</Property> |
| | |
| | | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 |
| | | 
 |
| | | var plateNum = data.get("plateNum");
 |
| | | var bizTag = "FULL";
 |
| | | self.set("parameter",{
 |
| | | plateNum:plateNum,
 |
| | | bizTag:"FULL_WEIGHT"
 |
| | | bizTag: bizTag
 |
| | | })</ClientEvent> |
| | | <ClientEvent name="onFileUploaded">//附件上传完成后添加业务数据
 |
| | | var mainData = view.get("#dsMain.data");
 |
| | |
| | | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 |
| | | if(data){
 |
| | | var plateNum = data.get("plateNum");
 |
| | | var bizTag = "FULL";
 |
| | | self.set("parameter",{
 |
| | | plateNum:plateNum
 |
| | | bizTag:bizTag
 |
| | | })
 |
| | | }</ClientEvent> |
| | | <Property name="maxFileSize">20MB</Property> |
| | |
| | | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 |
| | | 
 |
| | | var plateNum = data.get("plateNum");
 |
| | | var bizTag = "HANDLE";
 |
| | | self.set("parameter",{
 |
| | | plateNum:plateNum,
 |
| | | bizTag:"HAND"
 |
| | | bizTag: bizTag
 |
| | | })</ClientEvent> |
| | | <ClientEvent name="onFileUploaded">//附件上传完成后添加业务数据
 |
| | | var mainData = view.get("#dsMain.data");
 |
| | |
| | | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 |
| | | if(data){
 |
| | | var plateNum = data.get("plateNum");
 |
| | | var bizTag = "HANDLE";
 |
| | | self.set("parameter",{
 |
| | | plateNum:plateNum
 |
| | | bizTag:bizTag
 |
| | | })
 |
| | | }</ClientEvent> |
| | | <Property name="maxFileSize">20MB</Property> |
| | |
| | | <Property name="fileResolver">inoutDataPR#uploadImage</Property> |
| | | <Filters/> |
| | | </UploadAction> |
| | | <AjaxAction id="ajaxDelFile"> |
| | | <Property name="service">inoutDataPR#delImage</Property> |
| | | <Property name="async">true</Property> |
| | | <Property name="confirmMessage">确定要删除么?</Property> |
| | | </AjaxAction> |
| | | </View> |
| | | </ViewConfig> |