diff --git a/erp-produce/src/main/resources/template/js/erpProduction/erpProductionList.js b/erp-produce/src/main/resources/template/js/erpProduction/erpProductionList.js index 0941625e9c552fc58f5679447e78d5def1e3b54a..aa84eec1e61b14cec9c8e3e106f5f8a0df608ccf 100644 --- a/erp-produce/src/main/resources/template/js/erpProduction/erpProductionList.js +++ b/erp-produce/src/main/resources/template/js/erpProduction/erpProductionList.js @@ -39,10 +39,10 @@ layui.config({ return '' + getNotUndefinedVal(d.processInstanceId) + ''; }}, { field: 'state', title: '状态', rowspan: '2', width: 90, templet: function (d) { - return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("erpOrderStateEnum", 'id', d.state, 'name'); + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name'); }}, - { field: 'machinOrderState', title: '加工状态', rowspan: '2', width: 90, templet: function (d) { + { field: 'machinOrderState', title: '加工单下达状态', rowspan: '2', width: 90, templet: function (d) { return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("productionMachinOrderState", 'id', d.machinOrderState, 'name'); }}, { field: 'outState', title: '委外状态', rowspan: '2', width: 90, templet: function (d) { diff --git a/erp-produce/src/main/resources/template/js/wholeOut/productionPlanToOutsourcing.js b/erp-produce/src/main/resources/template/js/wholeOut/productionPlanToOutsourcing.js index 13a1b1d91be3f03655febd4aadc8d00a876d4707..c302839a72c5d550724df4d61f2dfca1cf9b49ce 100644 --- a/erp-produce/src/main/resources/template/js/wholeOut/productionPlanToOutsourcing.js +++ b/erp-produce/src/main/resources/template/js/wholeOut/productionPlanToOutsourcing.js @@ -14,7 +14,6 @@ layui.config({ var index = parent.layer.getFrameIndex(window.name); var $ = layui.$; var id = GetUrlParam("id"); - var serviceClassName = sysServiceMation["materialReceiptForm"]["key"]; // 生产计划转整单委外 AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryProductionTransWholeById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { diff --git a/erp-produce/src/main/resources/template/js/wholeOut/wholeOutList.js b/erp-produce/src/main/resources/template/js/wholeOut/wholeOutList.js index 4ffe5227e6108f5c39de167dcb51befdf14a127e..b8d1943ba29ab3f302b542a5d583b16092775a5a 100644 --- a/erp-produce/src/main/resources/template/js/wholeOut/wholeOutList.js +++ b/erp-produce/src/main/resources/template/js/wholeOut/wholeOutList.js @@ -27,28 +27,44 @@ layui.config({ limits: getLimits(), limit: getLimit(), cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'oddNumber', title: '单号', rowspan: '2', align: 'left', width: 220, templet: function (d) { + { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers', rowspan: '2' }, + { field: 'oddNumber', title: '单号', rowspan: '2', width: 200, align: 'center', templet: function (d) { var str = '' + d.oddNumber + ''; if (!isNull(d.fromId)) { str += '[转]'; } return str; }}, - { field: 'operTime', width: 150, title: '单据日期', align: 'center'}, - { field: 'totalPrice', title: '合计金额', rowspan: '2', align: 'center', width: 120 }, + { field: 'operTime', title: '单据日期', rowspan: '2', align: 'center', width: 140 }, + { colspan: '2', title: '来源单据信息', align: 'center' }, { field: 'holderMation', title: '供应商', rowspan: '2', align: 'center', width: 150, templet: function (d) { return getNotUndefinedVal(d.holderMation?.name); }}, - { field: 'processInstanceId', width: 200, title: '流程ID', align: 'center'}, - { field: 'state', title: '状态', width: 90, templet: function (d) { + { field: 'totalPrice', title: '总金额', rowspan: '2', align: 'center', width: 140 }, + { field: 'processInstanceId', title: '流程ID', rowspan: '2', width: 100, templet: function (d) { + return '' + getNotUndefinedVal(d.processInstanceId) + ''; + }}, + { field: 'state', title: '状态', rowspan: '2', width: 90, templet: function (d) { return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("erpOrderStateEnum", 'id', d.state, 'name'); }}, - { field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 }, - { field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 }, - { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 }, - { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 240, toolbar: '#tableBar'} + { field: 'otherState', title: '到货状态', rowspan: '2', width: 150, templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("orderArrivalState", 'id', d.otherState, 'name'); + }}, + { field: 'qualityInspection', title: '质检状态', rowspan: '2', width: 150, templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("orderQualityInspectionType", 'id', d.qualityInspection, 'name'); + }}, + { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], rowspan: '2', width: 120 }, + { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], rowspan: '2', align: 'center', width: 150 }, + { field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], rowspan: '2', align: 'left', width: 120 }, + { field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], rowspan: '2', align: 'center', width: 150 }, + { title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'} + ], [ + { field: 'fromTypeId', title: '来源类型', width: 150, templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("wholeOrderOutFromType", 'id', d.fromTypeId, 'name'); + }}, + { field: 'fromId', title: '单据编号', width: 200, templet: function (d) { + return getNotUndefinedVal(d.fromMation?.oddNumber); + }} ]], done: function(json) { matchingLanguage(); @@ -79,9 +95,53 @@ layui.config({ erpOrderUtil.revokeOrderMation(data.processInstanceId, serviceClassName, function() { loadTable(); }); + }else if (layEvent === 'wholeOutToPut') { //转采购入库单 + wholeOutToPut(data); + } else if (layEvent === 'wholeOutToArrival') { //转到货单 + wholeOutToArrival(data); + }else if (layEvent === 'wholeOutToReturn') { //转采购退货单 + wholeOutToReturn(data); } }); + // 转采购入库 + function wholeOutToPut(data) { + _openNewWindows({ + url: "../../tpl/wholeOut/wholeOutToPut.html?id=" + data.id, + title: "转采购入库", + pageId: "wholeOutToPut", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + } + //转到货单 + function wholeOutToArrival(data){ + _openNewWindows({ + url: "../../tpl/wholeOut/wholeOutToArrival.html?id=" + data.id, + title: '转到货单', + pageId: "wholeOutToArrival", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + } + + //转采购退货 + function wholeOutToReturn(data){ + _openNewWindows({ + url: "../../tpl/wholeOut/wholeOutToReturn.html?id=" + data.id, + title: '转采购退货', + pageId: "wholeOutToReturn", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + } + // 新增 $("body").on("click", "#addBean", function() { _openNewWindows({ diff --git a/erp-produce/src/main/resources/template/js/wholeOut/wholeOutToArrival.js b/erp-produce/src/main/resources/template/js/wholeOut/wholeOutToArrival.js new file mode 100644 index 0000000000000000000000000000000000000000..2cbc9172bd9f2805703590a0b2f28598561945fa --- /dev/null +++ b/erp-produce/src/main/resources/template/js/wholeOut/wholeOutToArrival.js @@ -0,0 +1,55 @@ + +// 以下两个参数开启团队权限时有值 +var objectId = '', objectKey = ''; +// 根据以下两个参数判断:工作流的判断是否要根据serviceClassName的判断 +var serviceClassName; + +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'table', 'jquery'], function (exports) { + winui.renderColor(); + var index = parent.layer.getFrameIndex(window.name); + var $ = layui.$; + var id = GetUrlParam("id"); + + // 整单委外单转到货单 + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryWholeOrderOutTransById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { + let data = json.bean; + console.log(data) + // 采购到货的【编辑布局】 + dsFormUtil.initEditPageForStatic('content', 'FP2024061100002', data, { + savePreParams: function (params) { + }, + saveData: function (params) { + // 保存数据 + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertWholeOrderOutToTurnDelivery", params: params, type: 'json', method: "POST", callback: function(json) { + parent.layer.close(index); + parent.refreshCode = '0'; + }}); + + }, + loadComponentCallback: function () { + $("div[controlType='supplier']").remove(); + $("div[controlType='purchaseDeliveryFromType']").remove(); + }, + tableAddRowCallback: function (tableId) { + $("#addRow" + tableId).remove(); + $("div[controlType='simpleTable']").find(".unitPrice").prop('disabled', true); + $("div[controlType='simpleTable']").find(".amountOfMoney").prop('disabled', true); + $("div[controlType='simpleTable']").find(".taxRate").prop('disabled', true); + $("div[controlType='simpleTable']").find(".taxMoney").prop('disabled', true); + $("div[controlType='simpleTable']").find(".taxUnitPrice").prop('disabled', true); + $("div[controlType='simpleTable']").find(".taxLastMoney").prop('disabled', true); + $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true); + $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true); + $("div[controlType='simpleTable']").find(".qualityInspection").prop('disabled', true); + $("div[controlType='simpleTable']").find(".taxLastinspectionRatio").prop('disabled', true); + + } + }); + }}); + +}); \ No newline at end of file diff --git a/erp-produce/src/main/resources/template/js/wholeOut/wholeOutToPut.js b/erp-produce/src/main/resources/template/js/wholeOut/wholeOutToPut.js new file mode 100644 index 0000000000000000000000000000000000000000..f65d3923668ce33aba37c565de8355cd80c7423a --- /dev/null +++ b/erp-produce/src/main/resources/template/js/wholeOut/wholeOutToPut.js @@ -0,0 +1,52 @@ + +// 以下两个参数开启团队权限时有值 +var objectId = '', objectKey = ''; +// 根据以下两个参数判断:工作流的判断是否要根据serviceClassName的判断 +var serviceClassName; + +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'table', 'jquery'], function (exports) { + winui.renderColor(); + var index = parent.layer.getFrameIndex(window.name); + var $ = layui.$; + var id = GetUrlParam("id"); + + // 整单委外单转采购入库 + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryWholeOrderOutTransById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { + let data = json.bean; + // 采购入库的【编辑布局】 + dsFormUtil.initEditPageForStatic('content', 'FP2023042300002', data, { + savePreParams: function (params) { + params.holderId=data.holderId + params.holderKey=data.holderKey + }, + saveData: function (params) { + // 保存数据 + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertWholeOrderOutToTurnPut", params: params, type: 'json', method: "POST", callback: function(json) { + parent.layer.close(index); + parent.refreshCode = '0'; + }}); + }, + loadComponentCallback: function () { + $("div[controlType='supplier']").remove(); + $("div[controlType='purchasePutFromType']").remove(); + }, + tableAddRowCallback: function (tableId) { + $("#addRow" + tableId).remove(); + $("div[controlType='simpleTable']").find(".unitPrice").prop('disabled', true); + $("div[controlType='simpleTable']").find(".amountOfMoney").prop('disabled', true); + $("div[controlType='simpleTable']").find(".taxRate").prop('disabled', true); + $("div[controlType='simpleTable']").find(".taxMoney").prop('disabled', true); + $("div[controlType='simpleTable']").find(".taxUnitPrice").prop('disabled', true); + $("div[controlType='simpleTable']").find(".taxLastMoney").prop('disabled', true); + $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true); + $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true); + } + }); + }}); + +}); \ No newline at end of file diff --git a/erp-produce/src/main/resources/template/js/wholeOut/wholeOutToReturn.js b/erp-produce/src/main/resources/template/js/wholeOut/wholeOutToReturn.js new file mode 100644 index 0000000000000000000000000000000000000000..27c1b06b2bd95a72b0dc29248b8b9402928c2ffe --- /dev/null +++ b/erp-produce/src/main/resources/template/js/wholeOut/wholeOutToReturn.js @@ -0,0 +1,52 @@ + +// 以下两个参数开启团队权限时有值 +var objectId = '', objectKey = ''; +// 根据以下两个参数判断:工作流的判断是否要根据serviceClassName的判断 +var serviceClassName; + +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'table', 'jquery'], function (exports) { + winui.renderColor(); + var index = parent.layer.getFrameIndex(window.name); + var $ = layui.$; + var id = GetUrlParam("id"); + + // 整单委外单转采购退货单 + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryWholeOrderOutTransById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { + let data = json.bean; + // 采购退货的【编辑布局】 + dsFormUtil.initEditPageForStatic('content', 'FP2023042400002', data, { + savePreParams: function (params) { + params.holderId=data.holderId + params.holderKey=data.holderKey + }, + saveData: function (params) { + // 保存数据 + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertWholeOrderOutToReturns", params: params, type: 'json', method: "POST", callback: function(json) { + parent.layer.close(index); + parent.refreshCode = '0'; + }}); + }, + loadComponentCallback: function () { + $("div[controlType='supplier']").remove(); + $("div[controlType='purchaseReturnsFromType']").remove(); + }, + tableAddRowCallback: function (tableId) { + $("#addRow" + tableId).remove(); + $("div[controlType='simpleTable']").find(".unitPrice").prop('disabled', true); + $("div[controlType='simpleTable']").find(".amountOfMoney").prop('disabled', true); + $("div[controlType='simpleTable']").find(".taxRate").prop('disabled', true); + $("div[controlType='simpleTable']").find(".taxMoney").prop('disabled', true); + $("div[controlType='simpleTable']").find(".taxUnitPrice").prop('disabled', true); + $("div[controlType='simpleTable']").find(".taxLastMoney").prop('disabled', true); + $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true); + $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true); + } + }); + }}); + +}); \ No newline at end of file diff --git a/erp-produce/src/main/resources/template/tpl/wholeOut/wholeOutList.html b/erp-produce/src/main/resources/template/tpl/wholeOut/wholeOutList.html index cd1beaebeac5d74cded1a137f17e190566f54244..6898654f2c28169769ffef150533360c68a54403 100644 --- a/erp-produce/src/main/resources/template/tpl/wholeOut/wholeOutList.html +++ b/erp-produce/src/main/resources/template/tpl/wholeOut/wholeOutList.html @@ -33,6 +33,23 @@ 撤销 {{# } }} {{# } }} + {{# if (d.state == 'pass' || d.state == 'partiallyCompleted') { }} + {{# if (d.otherState == 1) { }} + {{# if (auth('1720836111714')) { }} + 转采购入库 + {{# } }} + {{# } }} + {{# if (d.otherState == 1) { }} + {{# if (auth('1720836053850')) { }} + 转采购退货 + {{# } }} + {{# } }} + {{# if (d.otherState == 2 || d.otherState == 3) { }} + {{# if (auth('1720836096049')) { }} + 转到货单 + {{# } }} + {{# } }} + {{# } }} diff --git a/erp-produce/src/main/resources/template/tpl/wholeOut/wholeOutToArrival.html b/erp-produce/src/main/resources/template/tpl/wholeOut/wholeOutToArrival.html new file mode 100644 index 0000000000000000000000000000000000000000..dd9f3c983310ff162a3d311b8ac39fa4b2aad7ec --- /dev/null +++ b/erp-produce/src/main/resources/template/tpl/wholeOut/wholeOutToArrival.html @@ -0,0 +1,29 @@ + + +
+ +