Commit 51e19abb authored by 刘学辉's avatar 刘学辉

采购信息记录编辑改为弹窗

parent ed3ed85d
...@@ -23,6 +23,7 @@ function initItemGrid() { ...@@ -23,6 +23,7 @@ function initItemGrid() {
width:1200, width:1200,
height:860, height:860,
init: initShowDialog, init: initShowDialog,
okVal: '确定',
ok: doSaveDefine, ok: doSaveDefine,
close: onDialogCloseHandler close: onDialogCloseHandler
}); });
...@@ -42,7 +43,8 @@ function initItemGrid() { ...@@ -42,7 +43,8 @@ function initItemGrid() {
gridManager: _grid, gridManager: _grid,
idFieldName: 'id', idFieldName: 'id',
onSuccess: function () { onSuccess: function () {
reloadGrid(); itemGridManager.loadData();
//reloadGrid();
} }
}); });
}, },
...@@ -133,7 +135,7 @@ function getGridColumns() { ...@@ -133,7 +135,7 @@ function getGridColumns() {
}, },
} */ } */
}, },
{display: "供应商", name: "lifnr", width: "200", align: "left", type: "string" {display: "供应商编码", name: "lifnr", width: "100", align: "left", type: "string"
/*,editor: { /*,editor: {
required: true, type: "select", required: true, type: "select",
data: { data: {
...@@ -149,13 +151,13 @@ function getGridColumns() { ...@@ -149,13 +151,13 @@ function getGridColumns() {
}, },
} */ } */
}, },
{display: "名称1", name: "name1", width: "300", align: "left", type: "string" {display: "供应商名称1", name: "name1", width: "200", align: "left", type: "string"
// ,editor: {required: false, type: "text"} // ,editor: {required: false, type: "text"}
}, },
{display: "供应商物料编码", name: "idnlf", width: "200", align: "left", type: "string" {display: "供应商物料编码", name: "idnlf", width: "120", align: "left", type: "string"
// ,editor: {required: false, type: "text"} // ,editor: {required: false, type: "text"}
}, },
{display: "物料编码", name: "matnr", width: "200", align: "left", type: "string", {display: "物料编码", name: "matnr", width: "160", align: "left", type: "string",
/*,editor: { /*,editor: {
required: true, type: "select", required: true, type: "select",
data: { data: {
...@@ -186,7 +188,7 @@ function getGridColumns() { ...@@ -186,7 +188,7 @@ function getGridColumns() {
//,editor: {required: true, type: "text"} //,editor: {required: true, type: "text"}
}, },
{display: "物料组编号", name: "matkl", width: "10", align: "left", type: "string",hide:true}, {display: "物料组编号", name: "matkl", width: "10", align: "left", type: "string",hide:true},
{display: "物料组", name: "matklName", width: "200", align: "left", type: "string" {display: "物料组", name: "matklName", width: "160", align: "left", type: "string"
/*,editor: { /*,editor: {
required: true, type: "select", required: true, type: "select",
data: { data: {
...@@ -205,7 +207,7 @@ function getGridColumns() { ...@@ -205,7 +207,7 @@ function getGridColumns() {
}*/ }*/
}, },
{display: "采购信息记录分类编号", name: "esokz", width: "20", align: "left", type: "string",hide:true}, {display: "采购信息记录分类编号", name: "esokz", width: "20", align: "left", type: "string",hide:true},
{display: "采购信息记录分类", name: "esokzTextView", width: "200", align: "left", type: "string" {display: "采购信息记录分类", name: "esokzTextView", width: "140", align: "left", type: "string"
/* ,editor: { /* ,editor: {
type: 'dictionary', type: 'dictionary',
data: {name: 'esokz'}, data: {name: 'esokz'},
...@@ -685,7 +687,7 @@ function viewHandler(data){ ...@@ -685,7 +687,7 @@ function viewHandler(data){
//debugger //debugger
var param = JSON.stringify(data); var param = JSON.stringify(data);
var rowId=data.__id; var rowId=data.__id;
if ($("#isReadOnly").val()=="true") { if ($("#isReadOnly").val()=="true"||$("#statusId").val()!=0) {
UICtrl.showAjaxDialog({ UICtrl.showAjaxDialog({
title: "添加采购信息记录", title: "添加采购信息记录",
url: web_app.name + '/sapPurchaseInfoRecord/addSapPurchaseInfoRecordDetail.load?id=' + data.id + '&rowId=' + rowId, url: web_app.name + '/sapPurchaseInfoRecord/addSapPurchaseInfoRecordDetail.load?id=' + data.id + '&rowId=' + rowId,
...@@ -708,6 +710,7 @@ function viewHandler(data){ ...@@ -708,6 +710,7 @@ function viewHandler(data){
width: 1200, width: 1200,
height: 860, height: 860,
init: initShowDialog, init: initShowDialog,
okVal: '确定',
ok: doSaveDefine, ok: doSaveDefine,
close: onDialogCloseHandler close: onDialogCloseHandler
}); });
......
...@@ -45,20 +45,20 @@ function initPurchaseListGrid() { ...@@ -45,20 +45,20 @@ function initPurchaseListGrid() {
}); });
purchaseInfoRecordGridManager = UICtrl.grid('#purchaseInfoRecordGrid', { purchaseInfoRecordGridManager = UICtrl.grid('#purchaseInfoRecordGrid', {
columns: [ columns: [
{display: "状态", name: "statusTextView", width: "100", align: "left", type: "string"}, {display: "状态", name: "statusTextView", width: "80", align: "left", type: "string"},
{display: "id", name: "id", width: "140", align: "left", type: "string", hide: true}, {display: "id", name: "id", width: "140", align: "left", type: "string", hide: true},
{display: "采购信息记录编号", name: "billCode", width: 150, minWidth: 60, type: "string", align: "center"}, {display: "单据编号", name: "billCode", width: 150, minWidth: 60, type: "string", align: "center"},
{display: "消息类型", name: "typeTextView", width: 150, minWidth: 60, type: "string", align: "center"}, {display: "消息类型", name: "typeTextView", width: 100, minWidth: 60, type: "string", align: "center"},
{display: "消息文本", name: "message", width: 300, minWidth: 60, type: "string", align: "center"}, {display: "消息文本", name: "message", width: 300, minWidth: 60, type: "string", align: "center"},
{display: "工厂", name: "werksName", width: "200", align: "left", type: "string"}, {display: "工厂", name: "werksName", width: "200", align: "left", type: "string"},
{display: "采购组织", name: "ekorgName", width: "200", align: "left", type: "string"}, {display: "采购组织", name: "ekorgName", width: "200", align: "left", type: "string"},
{display: "供应商", name: "lifnr", width: "100", align: "left", type: "string"}, {display: "供应商编号", name: "lifnr", width: "100", align: "left", type: "string"},
{display: "名称1", name: "name1", width: "300", align: "left", type: "string"}, {display: "供应商名称1", name: "name1", width: "300", align: "left", type: "string"},
{display: "供应商物料编码", name: "idnlf", width: "200", align: "left", type: "string"}, {display: "供应商物料编码", name: "idnlf", width: "200", align: "left", type: "string"},
{display: "物料编码", name: "matnr", width: "150", align: "left", type: "string"}, {display: "物料编码", name: "matnr", width: "150", align: "left", type: "string"},
{display: "物料描述", name: "maktx", width: "300", align: "left", type: "string"}, {display: "物料描述", name: "maktx", width: "300", align: "left", type: "string"},
{display: "物料组", name: "matklName", width: "150", align: "left", type: "string"}, {display: "物料组", name: "matklName", width: "150", align: "left", type: "string"},
{display: "采购信息记录分类", name: "esokzTextView", width: "200", align: "left", type: "string"}, {display: "采购信息记录分类", name: "esokzTextView", width: "140", align: "left", type: "string"},
{display: "采购组", name: "ekgrpName", width: "200", align: "left", type: "string"}, {display: "采购组", name: "ekgrpName", width: "200", align: "left", type: "string"},
{display: "净价", name: "netpr", width: "100", align: "left", type: "string"}, {display: "净价", name: "netpr", width: "100", align: "left", type: "string"},
{display: "货币码", name: "waersTextView", width: "100", align: "left", type: "string",}, {display: "货币码", name: "waersTextView", width: "100", align: "left", type: "string",},
......
...@@ -631,8 +631,7 @@ function bindEvent(){ ...@@ -631,8 +631,7 @@ function bindEvent(){
} }
function reloadGrid() { function reloadGrid() {
alert(sid); sid=$("#id").val();
sid=$("#id").val(); alert(sid);
sapSuppliersPayGridManager.loadData(); sapSuppliersPayGridManager.loadData();
sapSuppliersBuyerGridManager.loadData(); sapSuppliersBuyerGridManager.loadData();
sapSuppliersBankGridManager.loadData(); sapSuppliersBankGridManager.loadData();
......
...@@ -62,7 +62,8 @@ public class DefaultHttpClient extends BaseApplication implements HttpClient { ...@@ -62,7 +62,8 @@ public class DefaultHttpClient extends BaseApplication implements HttpClient {
.append(applicationContext) .append(applicationContext)
.append(url) .append(url)
.append("?") .append("?")
.append(client); .append(client)
.append("&sap-language=ZH");
String usernameAndPassword = username + ":" + password; String usernameAndPassword = username + ":" + password;
return this.buildHttpClient(param, String.valueOf(serverUrl),usernameAndPassword); return this.buildHttpClient(param, String.valueOf(serverUrl),usernameAndPassword);
} }
......
...@@ -9,6 +9,7 @@ import com.huigou.util.StringUtil; ...@@ -9,6 +9,7 @@ import com.huigou.util.StringUtil;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -41,17 +42,15 @@ public class SapPurchaseInfoRecordItemController extends CommonController { ...@@ -41,17 +42,15 @@ public class SapPurchaseInfoRecordItemController extends CommonController {
public String deleteSapPurchaseInfoRecordItem(){ public String deleteSapPurchaseInfoRecordItem(){
SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
List<String> ids = sdo.getIds(); List<String> ids = sdo.getIds();
List<String> newIds =new ArrayList<>();
for (String id:ids){ for (String id:ids){
if (id.equals("undefined")){ if (!id.equals("undefined")){
ids.remove(id); newIds.add(id);
if (ids.size()==0){
break;
} }
} }
} // System.out.println("newIds==="+newIds);
System.out.println("ids==="+ids); if (newIds!=null&&newIds.size()>0) {
if (ids!=null&&ids.size()>0) { sapPurchaseInfoRecordItemApplication.deleteByIds(newIds);
sapPurchaseInfoRecordItemApplication.deleteByIds(ids);
} }
return success(); return success();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment