Commit 7e69ed9d authored by 1650842865's avatar 1650842865

成品变更和原材料编码的单据编号PD改为ECN,尾数0001这个不管什么哪天的,都按需求0001-0002-0003这样子排序下去。ECN+年月日+流水号,例...

成品变更和原材料编码的单据编号PD改为ECN,尾数0001这个不管什么哪天的,都按需求0001-0002-0003这样子排序下去。ECN+年月日+流水号,例如今天2025.03.11编写的变更单,是今年的第35个,编号为ECN20250311-0035;列表 的物料产品编码去掉10个0
parent f9bd3e23
......@@ -1047,11 +1047,12 @@ function getExtendedData(processAction) {
$('#submitForm').attr('check', false);
}
var extendedData = {};
let exceptionReasonType = $('#exceptionReasonType').val();
var _grid = UICtrl.getGridManager('#producegrid');
if ($('#exceptionReasonType').val() == "1") { //供应商材料问题
if ( exceptionReasonType === "1") { //供应商材料问题
_grid = UICtrl.getGridManager('#purchasegrid');
}
if ($('#exceptionReasonType').val() == "3") { //客户异常
if (exceptionReasonType === "3" || exceptionReasonType === "2") { //客户异常
_grid = UICtrl.getGridManager('#clientgrid');
}
if (_grid) {
......
......@@ -54,7 +54,7 @@ function initGrid() {
heightDiff: -4,
sortName: 'fillinDate',
sortOrder: 'desc',
checkbox: true,
checkbox: false,
usePager: true,
rownumbers: true,
enabledEdit: false,
......
......@@ -106,9 +106,9 @@ function loadNonProdApplyListGrid() {
},
{display: "工厂", name: "werksName", width: 200, minWidth: 60, type: "string", align: "left"},
{display: "物料/产品编码", name: "matnr", width: 150, minWidth: 60, type: "string", align: "left",
// render:function(item){
// return item.matnr.replace(/^0+/, '');
// }
render:function(item){
return item.matnr.replace(/^0+/, '');
}
},
{display: "维护类型", name: "maintenanceTypeTextView", width: 130, minWidth: 60, type: "string", align: "left",
render:function(item){
......
......@@ -12,6 +12,7 @@ import com.huigou.topsun.sap.purchaseInfoRecord.application.SapPurchaseInfoRecor
import com.huigou.topsun.sap.purchaseInfoRecord.domain.SapPurchaseInfoRecord;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.bmp.common.BizBillStatus;
import com.huigou.uasp.bmp.fn.CodeGenerator;
import com.huigou.uasp.bpm.engine.application.ActApplication;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.ClassHelper;
......@@ -44,6 +45,8 @@ public class EpChangeFormController extends CommonController {
private EpChangeFormImplItemApplication changeFormImplItemApplication;
@Autowired
private EpChangeFormStockItemApplication changeFormStockItemApplication;
@Autowired
private CodeGenerator codeGenerator;
public String forwardEpChangeFormList(){
return forward("epChangeFormList");
......@@ -67,6 +70,22 @@ public class EpChangeFormController extends CommonController {
*/
Operator operator = getOperator();
epChangeForm.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName()));
//ECN{yyyy}-{4}
String epChangeFormNo = codeGenerator.getNextCode("epChangeFormNo");
//ECN{yyyyMMdd}-{4}
String billCode = epChangeForm.getBillCode();
// 提取A中-后面的部分
String suffixA = epChangeFormNo.substring(epChangeFormNo.indexOf("-") + 1);
// 提取B中-前面的部分
String prefixB = billCode.substring(0, billCode.indexOf("-") + 1);
// 组合成新字符串
billCode = prefixB + suffixA;
//把年月日的流水号替换成年的流水号
epChangeForm.setBillCode(billCode);
Map<String, String> reasonForChange = new HashMap<>();
String type = this.getSDO().getString("type");
if ("product".equals(type)){
......
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