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

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

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