Commit 27b157fe authored by 刘学辉's avatar 刘学辉

物料/产品接口数据修改 供应商主数据修改

parent db2b27d3
......@@ -86,7 +86,7 @@
<div class="hg-form-cols">
<div class="hg-form-row">
<x:hidden name="businessUsage"/>
<x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="11" disabled="true"/>
</div>
......
......@@ -91,7 +91,6 @@
<div class="hg-form-cols">
<div class="hg-form-row">
<x:hidden name="businessUsage"/>
<x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="11" disabled="true"/>
</div>
......
......@@ -115,7 +115,6 @@
<div class="hg-form-cols">
<div class="hg-form-row">
<x:hidden name="businessUsage"/>
<x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="11" disabled="true"/>
</div>
......
......@@ -93,7 +93,6 @@
<div class="hg-form-cols">
<div class="hg-form-row">
<x:hidden name="businessUsage"/>
<x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="11" disabled="true"/>
</div>
......
......@@ -19,7 +19,9 @@ function initializate() {
$("#klart").val("023")
$("#classify").val("Z_YCL")
//页面控制
switch ($("#active").val()) {
UICtrl.enable($("#businessUsage"));
UICtrl.enable($("#matklName"));
switch ($("#active").val()) {
case '0'://已分发未完成
$("#businessUsageDiv").hide();
if ($("#deptCode").val() === "system") {
......
......@@ -12,9 +12,9 @@
<x:hidden name="deptCode" value="false"/> <!--是否是详情页-->
<div class="container-fluid" style="padding: 10px;">
<c:if test="${applyType==0}">
<x:billTitle title="非产品/非本成品类物料基本信息维护" needStatus="false" needPerson="true"/>
</c:if>
<c:if test="${applyType==0}">
<x:billTitle title="非产品/非本成品类物料基本信息维护" needStatus="false" needPerson="true"/>
</c:if>
<c:if test="${applyType==1}">
<x:billTitle title="非产品/非本成品类物料变更基本信息维护" needStatus="false" needPerson="true"/>
</c:if>
......@@ -130,13 +130,10 @@
</div>
<div class="hg-form-cols">
<!--x:checkboxListC name="businessUsageSeled" label="扩展前业务用途" list="businessUsageSeledList" labelCol="1"
fieldCol="5" disabled="true"/-->
<!--x:checkboxListC name="businessUsage" label="业务用途" list="businessUsageUnSeledList" labelCol="1"
fieldCol="5"/-->
<c:if test="${applyType==2}">
<div class="hg-form-row">
<x:checkboxListC name="businessUsage" label="业务用途" list="businessUsageUnSeledList" labelCol="1"
......
......@@ -86,7 +86,6 @@
<div class="hg-form-cols">
<div class="hg-form-row">
<x:hidden name="businessUsage"/>
<x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="11" disabled="true"/>
</div>
......
......@@ -92,7 +92,6 @@
<div class="hg-form-cols">
<div class="hg-form-row">
<x:hidden name="businessUsage"/>
<x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="11" disabled="true"/>
</div>
......
......@@ -27,7 +27,7 @@ function initializate() {
$("#showChart").remove();
}
break;
case '1'://完成/审核
case '1'://已分发
// $("#auditForm").show();
// alert($("#deptCode").val());
$("#buttonBox").show();
......
......@@ -109,7 +109,6 @@
<div class="hg-form-cols">
<div class="hg-form-row">
<x:hidden name="businessUsage"/>
<x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="11" disabled="true"/>
</div>
......
......@@ -90,7 +90,6 @@
<div class="hg-form-cols">
<div class="hg-form-row">
<x:hidden name="businessUsage"/>
<x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="11" disabled="true"/>
</div>
......
......@@ -100,7 +100,7 @@
<div class="hg-form-cols">
<div class="hg-form-row">
<x:hidden name="businessUsage"/>
<!--x:hidden name="businessUsage"/-->
<x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="11" disabled="true"/>
</div>
......
......@@ -36,6 +36,9 @@ function setId(bizId) {
_grid.options.parms.id = bizId;
var _grid = UICtrl.getGridManager('#sapSuppliersBuyerGrid');
_grid.options.parms.id = bizId;
var _grid = UICtrl.getGridManager('#sapSuppliersBankGrid');
_grid.options.parms.id = bizId;
}
/**
......@@ -72,12 +75,12 @@ function loadSuppliersPayListGrid() {
deleteHandler: function () {
var _grid = UICtrl.getGridManager('#sapSuppliersPayGrid');
DataUtil.delSelectedRows({
action: 'sapPriceMasterData/deletePriceMasterDataById.ajax',
action: 'sapSuppliersData/deleteSuppliersPays.ajax',
param: {},
gridManager: _grid,
idFieldName: 'id',
onSuccess: function () {
reloadGrid();
sapSuppliersPayGridManager.loadData();
}
});
}
......@@ -90,7 +93,7 @@ function loadSuppliersPayListGrid() {
//gridManager: null,
columns: [
{
display: "行号", name: "sequence", width: 100, minWidth: 60, type: "String", align: "left",
display: "行号", name: "sequence", width: 80, minWidth: 60, type: "String", align: "left",
//editor: {type: 'spinner', min: 1, max: 100, mask: 'nnn'}
},
{
......@@ -143,7 +146,17 @@ function loadSuppliersPayListGrid() {
},
{
display: "考虑的付款方式清单", name: "zwels", width: 140, minWidth: 60, type: "String", align: "left",
editor: {type: 'text'}
editor: {
type: 'dictionary',
data: {name: 'zwels'},
textField: 'zwelsTextView',
valueField: 'zwels',
checkbox:true,
required: true,
render: function (item) {
return item.zwelsTextView;
}
},
},
{
display: "检查双重发票", name: "reprf", width: 160, minWidth: 60, type: "String", align: "left",
......@@ -192,16 +205,16 @@ function loadSuppliersBuyerListGrid() {
}
);
},
// 删除选中的尺码信息
// 删除
deleteHandler: function () {
var _grid = UICtrl.getGridManager('#sapSuppliersBuyerGrid');
DataUtil.delSelectedRows({
action: 'sapPriceMasterData/deletePriceMasterDataById.ajax',
action: 'sapSuppliersData/deleteSuppliersBuyers.ajax',
param: {},
gridManager: _grid,
idFieldName: 'id',
onSuccess: function () {
reloadGrid();
sapSuppliersBuyerGridManager.loadData();
}
});
}
......@@ -214,7 +227,7 @@ function loadSuppliersBuyerListGrid() {
gridManager: null,
columns: [
{
display: "行号", name: "sequence", width: 100, minWidth: 60, type: "String", align: "left",
display: "行号", name: "sequence", width: 80, minWidth: 60, type: "String", align: "left",
//editor: {type: 'spinner', min: 1, max: 100, mask: 'nnn'}
},
{
......@@ -297,10 +310,10 @@ function loadSuppliersBuyerListGrid() {
display: "服务的发票校验标识", name: "lebre", width: 140, minWidth: 60, type: "String", align: "left",
editor: {type: 'text', required: false}
},
{
/*{
display: "边境运输方式", name: "expvz", width: 140, minWidth: 60, type: "String", align: "left",
editor: {type: 'text', required: false}
},
}, */
{
display: "采购冻结", name: "sperm", width: 140, minWidth: 60, type: "String", align: "left",
editor: {type: 'text', required: false}
......@@ -339,12 +352,12 @@ function loadSuppliersBankListGrid() {
deleteHandler: function () {
var _grid = UICtrl.getGridManager('#sapSuppliersBankGrid');
DataUtil.delSelectedRows({
action: 'sapPriceMasterData/deletePriceMasterDataById.ajax',
action: 'sapSuppliersData/deleteSuppliersBanks.ajax',
param: {},
gridManager: _grid,
idFieldName: 'id',
onSuccess: function () {
reloadGrid();
sapSuppliersBankGridManager.loadData();
}
});
}
......@@ -357,12 +370,12 @@ function loadSuppliersBankListGrid() {
gridManager: null,
columns: [
{
display: "行号", name: "sequence", width: 100, minWidth: 60, type: "String", align: "left",
display: "行号", name: "sequence", width: 80, minWidth: 60, type: "String", align: "left",
//editor: {type: 'spinner', min: 1, max: 100, mask: 'nnn'}
},
{
display: "银行所属国家", name: "banksTextView", width: 150, minWidth: 60, type: "String", align: "left",
editor: {
/* editor: {
type: 'dictionary',
data: {name: 'country'},
emptyOption:true,
......@@ -372,15 +385,32 @@ function loadSuppliersBankListGrid() {
render: function (item) {
return item.banksTextView;
}
},
},*/
editor: {
required: true, type: "select",
data: {
type: 'system',
name: "countrySelect",
getParam: function (item) {
return {fieldName: "name"}
},
// checkbox:true,
// checkboxIndex:'value',
back: {
value: "banks",
name:"banksTextView"
}
// valueIndex:'value'
},
}
},
{
display: "银行代码", name: "bankl", width: 200, minWidth: 60, type: "String", align: "left",
editor: {type: 'text', required: true}
editor: {type: 'text', required: true }
},
{
display: "银行帐户号码", name: "bankn", width: 200, minWidth: 60, type: "String", align: "left",
editor: {type: 'text', required: true}
editor: {type: 'text', required: true, maxLength :18 }
},
{
display: "银行细目的参考明细", name: "bkref", width: 140, minWidth: 60, type: "String", align: "left",
......@@ -556,4 +586,10 @@ function bindEvent(){
$('#city1Name').val(data.BEZEI);
}
});
}
function reloadGrid() {
sapSuppliersPayGridManager.loadData();
sapSuppliersBuyerGridManager.loadData();
sapSuppliersBankGridManager.loadData();
}
\ No newline at end of file
......@@ -66,18 +66,23 @@
<x:inputC name="regionName" label="地区" labelCol="1" fieldCol="2" required="true" wrapper="select"/>
<x:hidden name="region"/>
<x:inputC name="city1" label="城市" labelCol="1" fieldCol="2" required="true" />
<x:hidden name="city1"/>
<x:inputC name="street" label="街道地址" labelCol="1" fieldCol="2"/>
<x:inputC name="langu" label="语言关键字" labelCol="1" fieldCol="2"/>
<x:inputC name="street" label="街道地址" labelCol="1" fieldCol="2" maxLength="35"/>
<x:inputC name="strSuppl1" label="街道2" labelCol="1" fieldCol="2" maxLength="35"/>
<x:inputC name="strSuppl2" label="街道3" labelCol="1" fieldCol="2" maxLength="35"/>
<x:inputC name="strSuppl3" label="街道4" labelCol="1" fieldCol="2" maxLength="35"/>
<x:inputC name="strSuppl4" label="街道5" labelCol="1" fieldCol="2" maxLength="35"/>
<x:selectC name="langu" label="语言" labelCol="1" fieldCol="2" required="true" dictionary="langu"/>
<x:inputC name="smtpAddr" label="电子邮件地址" labelCol="1" fieldCol="2"/>
<x:inputC name="postCode1" label="城市邮政编码" labelCol="1" fieldCol="2"/>
<x:inputC name="postCode1" label="城市邮政编码" labelCol="1" fieldCol="2" required="true" maxLength="6"/>
<x:inputC name="telNumber" label="电话" labelCol="1" fieldCol="2"/>
<%--<x:inputC name="telExtens" label="第一个电话号码分机" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="mobNumber" label="移动电话" labelCol="1" fieldCol="2"/>
<%--<x:inputC name="mobExtens" label="第一个移动电话号码分机" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="faxNumber" label="传真" labelCol="1" fieldCol="2"/>
<%--<x:inputC name="faxExtens" label="第一个传真号分机号" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="ktokk" label="供应商帐户组" labelCol="1" fieldCol="2"/>
<x:selectC name="ktokk" label="供应商帐户组" labelCol="1" fieldCol="2" required="true" dictionary="buGroup"/>
<x:inputC name="sperm" label="集中设置的采购冻结" labelCol="1" fieldCol="2"/>
<x:inputC name="sperr" label="中心记帐冻结" labelCol="1" fieldCol="2"/>
<x:inputC name="vbund" label="贸易伙伴" labelCol="1" fieldCol="2"/>
......
package com.huigou.topsun.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.huigou.cache.DictUtil;
import com.huigou.topsun.sap.sapApplication.application.SapAreaApplication;
import com.huigou.topsun.sap.sapApplication.application.SapDictionaryApplication;
import com.huigou.topsun.sap.sapApplication.application.SapMaterialApplication;
import com.huigou.topsun.sap.sapApplication.application.SapPaymentApplication;
import com.huigou.topsun.sap.sapApplication.domain.query.SapDialogQuery;
import com.huigou.topsun.util.SAPUtils;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.bmp.common.easysearch.EasySearch;
import com.huigou.uasp.bmp.common.easysearch.domain.model.EasySearchParse;
import com.huigou.uasp.bmp.common.easysearch.domain.model.QuerySchemeField;
import com.huigou.uasp.bmp.configuration.application.DictionaryApplication;
import com.huigou.uasp.bmp.opm.application.MemEasySearcher;
import com.huigou.uasp.bmp.opm.application.impl.MemEasySearcherImpl;
import com.huigou.util.JSONUtil;
......@@ -42,6 +46,8 @@ public class ResourceSearchController {
private SapMaterialApplication sapMaterialApplication;
@Autowired
private SapAreaApplication sapAreaApplication;
@Autowired
private DictionaryApplication dictionaryApplication;
@EasySearch(queryName = "knttp")
public Map<String, Object> knttpSelect(SDO sdo){
......@@ -149,6 +155,61 @@ public class ResourceSearchController {
return model;
}
@EasySearch(queryName = "countrySelect")
public Map<String, Object> countrySelect(SDO sdo) throws IOException {
String param = sdo.getString("paramValue");
String filterValue = sdo.getString("filterValue");
SapDialogQuery queryRequest = sdo.toObject(SapDialogQuery.class);
queryRequest.setWerks(filterValue);
Map maps = dictionaryApplication.querySysDictionaryDetailsByCode("country");
// List<Map<String,String>> mapList =(List<Map<String,String>>)maps.get("Rows");
// List<Map<String,String>> mapList = sapMaterialApplication.getSapMaterial(queryRequest);
ObjectMapper objectMapper = SAPUtils.objectMapper();
List<Map<String,String>> mapList = objectMapper.readValue(JSONUtil.toString(maps.get("Rows")), new TypeReference<List<Map<String, String>>>() {});
if (CollectionUtil.isNotEmpty(mapList)){
if (StringUtil.isNotBlank(filterValue)){//固定条件过滤,比如选了工厂后,只能读取改工厂下的物料组
mapList = mapList
.stream()
.filter(map -> map.containsValue(filterValue))
.collect(Collectors.toList());
}
}
if (CollectionUtil.isNotEmpty(mapList)){
if (StringUtil.isNotBlank(param)){//模糊条件过滤
mapList = mapList
.stream()
.filter(map -> map.values().stream().anyMatch(value->value.contains(param)))
.collect(Collectors.toList());
}
}
Integer intPage = sdo.getInteger("intPage", 1);
Integer pageSize = sdo.getInteger("pageSize",10);
PageRequest pageRequest = new PageRequest(intPage - 1, pageSize);
EasySearchParse easySearchParse = new EasySearchParse();
List<QuerySchemeField> fields =
Arrays.asList(
// new QuerySchemeField("工厂", "WERKS", "string", 100L),
new QuerySchemeField("国家", "name", "string", 200L),
new QuerySchemeField("代码", "value", "string", 200L)
// new QuerySchemeField("物料名称", "MAKTX", "string", 200L),
// new QuerySchemeField("库存地点", "LGFSB", "string", 100L),
// new QuerySchemeField("库存地点名称", "LGOBE", "string", 200L),
// new QuerySchemeField("物料组", "MATKL", "string", 100L),
// new QuerySchemeField("物料组名称", "WGBEZ", "string", 200L),
// new QuerySchemeField("基本计量单位", "MEINS", "string", 100L),
// new QuerySchemeField("基本计量单位名称", "MSEHL", "string", 100L),
// new QuerySchemeField("采购组", "EKGRP", "string", 100L),
// new QuerySchemeField("采购组名称", "EKNAM", "string", 200L),
// new QuerySchemeField("价格基数", "PEINH", "string", 100L)
);
easySearchParse.setFields(fields);
easySearchParse.setWidth(450L);
MemEasySearcher<Map<String, String>> memEasySearcher = new MemEasySearcherImpl<>();
Map<String, Object> model = memEasySearcher.search(mapList, easySearchParse, pageRequest, null);
return model;
}
@EasySearch(queryName = "dictionary")
public Map<String, Object> queryDictionary(SDO sdo) throws IOException {
String param = sdo.getString("paramValue");
......
......@@ -52,7 +52,7 @@ public class NonProdApplyNextController extends CommonController {
SDO sdo = this.getSDO();
String id = sdo.getBizId();
// this.putAttribute("active", ActiveStatus.UNFINISHED.getValue() );//定义流程环节的id
if (StringUtil.isNotBlank(sdo.getString("prod"))){
if (StringUtil.isNotBlank(sdo.getString("prod"))){ //首页进入的产品信息
SapNonProdApplyDept applyDept=nonProdApplyDeptApplication.getNonProdApplyDeptById(id);
id=applyDept.getBaseInfoId();
}
......@@ -117,6 +117,9 @@ public class NonProdApplyNextController extends CommonController {
if (nonProdApplyBaseInfo.getDistribute()!=null&&nonProdApplyBaseInfo.getDistribute()==1){
this.putAttribute("active",1);
}
if ("product".equals(nonProdApplyDept.getKind())){
this.putAttribute("kind","product");
}
return forward("nonProdApplyNext", nonProdApplyDept);
} else {
this.putAttribute("active",0);
......@@ -273,6 +276,7 @@ public void getBaseInfoAttrs(NonProdApplyBaseInfo baseInfo,SapNonProdApplyDept n
nonProdApplyDept.setMaterialUsage(baseInfo.getMaterialUsage());
nonProdApplyDept.setItemAttributes(baseInfo.getItemAttributes());
nonProdApplyDept.setDistribute(baseInfo.getDistribute());
nonProdApplyDept.setKind(baseInfo.getKind());
}
// @EasySearch(queryName = "userNameSelect")
......
......@@ -878,6 +878,8 @@ public class SapNonProdApplyDept implements Serializable {
private String itemAttributes;
@Transient
private Integer distribute;
@Transient
private String kind;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -33,7 +33,13 @@ public interface SuppliersDataApplication {
Map<String, Object> loadSuppliersBankDatas(SuppliersBankQueryRequest queryRequest);
void deleteSuppliersDataByIds( List<String> ids);
void deleteSuppliersDataByIds( List<String> ids);
List<SuppliersInfo> findDeletedSuppliersDataById(String id);
void deleteSuppliersPaysByIds( List<String> ids);
void deleteSuppliersBuyerByIds( List<String> ids);
void deleteSuppliersBankByIds( List<String> ids);
}
......@@ -473,4 +473,30 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
List<SuppliersInfo> list = suppliersInfoRepository.findDeletedById(id);
return list;
}
@Override
public void deleteSuppliersPaysByIds( List<String> ids){
for (String id:ids){
SuppliersPay suppliersPay=suppliersPayRepository.findOne(id);
suppliersPayRepository.delete(suppliersPay);
}
}
@Override
public void deleteSuppliersBuyerByIds( List<String> ids){
for (String id:ids){
SuppliersBuyer suppliersBuyer=suppliersBuyerRepository.findOne(id);
suppliersBuyerRepository.delete(suppliersBuyer);
}
}
@Override
public void deleteSuppliersBankByIds( List<String> ids){
for (String id:ids){
SuppliersBank suppliersBank =suppliersBankRepository.findOne(id);
suppliersBankRepository.delete(suppliersBank);
}
}
}
......@@ -157,4 +157,25 @@ public class SuppliersDataController extends CommonController {
suppliersDataApplication.deleteSuppliersDataByIds(ids);
return success();
}
public String deleteSuppliersPays() {
SDO sdo = this.getSDO();
List<String> ids = sdo.getIds();
suppliersDataApplication.deleteSuppliersPaysByIds(ids);
return success();
}
public String deleteSuppliersBanks() {
SDO sdo = this.getSDO();
List<String> ids = sdo.getIds();
suppliersDataApplication.deleteSuppliersBankByIds(ids);
return success();
}
public String deleteSuppliersBuyers() {
SDO sdo = this.getSDO();
List<String> ids = sdo.getIds();
suppliersDataApplication.deleteSuppliersBuyerByIds(ids);
return success();
}
}
......@@ -114,6 +114,14 @@ public class SuppliersInfo extends FlowBillAbstractEntity {
@JsonProperty("STR_SUPPL3")
private String strSuppl3;
/**
* 街道5
*/
@Column(name = "str_suppl4")
@JsonProperty("STR_SUPPL4")
private String strSuppl4;
/**
* 国家/地区代码
*/
......
......@@ -11,7 +11,8 @@
FROM bsn_message_execute t
LEFT JOIN bsn_message_sponsor t2 ON t2.id = t.message_sponsor_id
LEFT JOIN sap_non_prod_apply_dept ad ON ad.apply_dept_id = t2.business_id
WHERE t.active IN (0, 3) and task_execute = :taskExecute
left join sap_non_prod_apply_base_info bs on bs.id=ad.base_info_id
WHERE t.active IN (0, 3) and bs.distribute=1 and task_execute = :taskExecute
</sql-query>
</query>
......
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