|
@@ -81,7 +81,7 @@ class MaintenanceManagerReport extends BaseWidget {
|
|
|
this.domObj.find(".btn_search").off().click(e => {
|
|
|
this.getMaintenanceList();
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
this.domObj.find(".btn_update").off().click(e => {
|
|
|
if (!this.dataTable.aExtentData.currentTableData) {
|
|
|
this.toast.show("请选择一行进行修改");
|
|
@@ -125,7 +125,7 @@ class MaintenanceManagerReport extends BaseWidget {
|
|
|
if (dataInfo) {
|
|
|
data = dataInfo;
|
|
|
dataInfo.reportState = true;
|
|
|
- }
|
|
|
+ }
|
|
|
let state= getHtml.state.maintenanceReport;
|
|
|
if(dataInfo){
|
|
|
state=null;
|
|
@@ -151,25 +151,30 @@ class MaintenanceManagerReport extends BaseWidget {
|
|
|
this.toast.show("地址不能为空");
|
|
|
return;
|
|
|
}
|
|
|
- let data = this.getWriteInfo(Obj.conObj, actionInfo,dataInfo);
|
|
|
- let sendData = new FormData();
|
|
|
- for (let item in data) {
|
|
|
- if (item == 'file') {
|
|
|
- let files = data[item];
|
|
|
- if (files && files.length > 0) {
|
|
|
- for (let i = 0; i < files.length; i++) {
|
|
|
- sendData.append(item, files[i]);
|
|
|
- };
|
|
|
+ if(actionInfo == action.add){
|
|
|
+ let data = this.getWriteInfo(Obj.conObj, actionInfo,dataInfo);
|
|
|
+ let sendData = new FormData();
|
|
|
+ for (let item in data) {
|
|
|
+ if (item == 'file') {
|
|
|
+ let files = data[item];
|
|
|
+ if (files && files.length > 0) {
|
|
|
+ for (let i = 0; i < files.length; i++) {
|
|
|
+ sendData.append(item, files[i]);
|
|
|
+ };
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sendData.append(item, data[item]);
|
|
|
}
|
|
|
- } else {
|
|
|
- sendData.append(item, data[item]);
|
|
|
}
|
|
|
+ if (dataInfo) {
|
|
|
+ sendData.append('id', dataInfo.id);
|
|
|
+ }
|
|
|
+ sendData.append('constructionState', getHtml.workOrderState.waitConduct);
|
|
|
+ this.ajaxSend.sendFileAjax(this, sendData, this.config.rushReport, this.ajaxSend.type.post, this.rushReport.bind(this));
|
|
|
+ }else{
|
|
|
+ this.popup.close();
|
|
|
}
|
|
|
- if (dataInfo) {
|
|
|
- sendData.append('id', dataInfo.id);
|
|
|
- }
|
|
|
- sendData.append('constructionState', getHtml.workOrderState.waitConduct);
|
|
|
- this.ajaxSend.sendFileAjax(this, sendData, this.config.rushReport, this.ajaxSend.type.post, this.rushReport.bind(this));
|
|
|
+
|
|
|
}.bind(this));
|
|
|
}
|
|
|
|
|
@@ -393,4 +398,4 @@ class MaintenanceManagerReport extends BaseWidget {
|
|
|
this.domObj.remove();
|
|
|
this.afterDestroy();
|
|
|
}
|
|
|
-}
|
|
|
+}
|