From 0e7ea9ebe4c09add868a0d616b0ffbdc9fce019e Mon Sep 17 00:00:00 2001 From: "LAPTOP-UV1MNL38\\18023" <1802330370@qq.com> Date: Thu, 13 Jun 2024 11:47:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E8=BD=AC=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93=E5=92=8C=E8=BD=AC?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=88=B0=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchaseDeliveryNoteList.js | 144 ++++++++++++++++++ .../js/purchaseOrder/purchaseToWarehouse.js | 75 ++++----- .../js/purchaseOrder/purchaseToWaybill.js | 17 +-- .../js/purchaseRequest/requestToContract.js | 3 +- .../purchaseDeliveryNoteList.html | 43 ++++++ .../purchaseRequest/requestToContract.html | 2 +- .../template/json/sysServiceMation.json | 1 + 7 files changed, 230 insertions(+), 55 deletions(-) create mode 100644 erp/src/main/resources/template/js/purchaseDeliveryNote/purchaseDeliveryNoteList.js create mode 100644 erp/src/main/resources/template/tpl/purchaseDeliveryNote/purchaseDeliveryNoteList.html diff --git a/erp/src/main/resources/template/js/purchaseDeliveryNote/purchaseDeliveryNoteList.js b/erp/src/main/resources/template/js/purchaseDeliveryNote/purchaseDeliveryNoteList.js new file mode 100644 index 000000000..c255c151d --- /dev/null +++ b/erp/src/main/resources/template/js/purchaseDeliveryNote/purchaseDeliveryNoteList.js @@ -0,0 +1,144 @@ + +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { + winui.renderColor(); + var $ = layui.$, + form = layui.form, + table = layui.table; + var serviceClassName = sysServiceMation["puchaseDeliveryNoteList"]["key"]; + authBtn('1718098062750');//新增 + + table.render({ + id: 'messageTable', + elem: '#messageTable', + method: 'post', + url: sysMainMation.erpBasePath + 'queryPurchaseDeliveryList', + where: getTableParams(), + even: true, + page: true, + limits: getLimits(), + limit: getLimit(), + cols: [[ + { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers', rowspan: '2' }, + { field: 'oddNumber', title: '单号', rowspan: '2', width: 200, align: 'center', templet: function (d) { + return '' + d.oddNumber + ''; + if (!isNull(d.fromId)) { + str += '[转]'; + } + return str; + }}, + { field: 'holderMation', title: '供应商', rowspan: '2', align: 'left', width: 150, templet: function (d) { + return getNotUndefinedVal(d.holderMation?.name); + }}, + { field: 'totalPrice', title: '合计金额', rowspan: '2', align: 'left', width: 120 }, + { field: 'operTime', title: '单据日期', rowspan: '2', align: 'center', width: 140 }, + { colspan: '2', title: '来源单据信息', align: 'center' }, + { 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: 'qualityInspection', title: '质检状态', rowspan: '2', width: 90, 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("purchaseOrderFromType", 'id', d.fromTypeId, 'name'); + }}, + { field: 'fromId', title: '单据编号', width: 200, templet: function (d) { + return getNotUndefinedVal(d.fromMation?.oddNumber); + }} + ]], + done: function(json) { + matchingLanguage(); + initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号", function () { + table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); + }); + } + }); + + table.on('tool(messageTable)', function (obj) { + var data = obj.data; + var layEvent = obj.event; + if (layEvent === 'delete') { //删除 + erpOrderUtil.deleteOrderMation(data.id, serviceClassName, function() { + loadTable(); + }); + } else if (layEvent === 'details') { //详情 + details(data); + } else if (layEvent === 'edit') { //编辑 + edit(data); + } else if (layEvent === 'subApproval') { //提交审核 + erpOrderUtil.submitOrderMation(data.id, serviceClassName, function() { + loadTable(); + }); + } else if (layEvent === 'processDetails') { // 工作流流程详情查看 + activitiUtil.activitiDetails(data); + } else if (layEvent === 'revoke') { //撤销 + erpOrderUtil.revokeOrderMation(data.processInstanceId, serviceClassName, function() { + loadTable(); + }); + } + }); + + // 添加 + $("body").on("click", "#addBean", function() { + _openNewWindows({ + url: systemCommonUtil.getUrl('FP2024061100001', null), + title: systemLanguage["com.skyeye.addPageTitle"][languageType], + pageId: "deliveryNoteAdd", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + }); + + // 编辑 + function edit(data) { + _openNewWindows({ + url: systemCommonUtil.getUrl('FP2024061100002&id=' + data.id, null), + title: systemLanguage["com.skyeye.editPageTitle"][languageType], + pageId: "deliveryNoteEdit", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + } + + // 详情 + function details(data) { + _openNewWindows({ + url: systemCommonUtil.getUrl('FP2024061100003&id=' + data.id, null), + title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], + pageId: "deliveryNoteDetails", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + }}); + } + + form.render(); + $("body").on("click", "#reloadTable", function() { + loadTable(); + }); + function loadTable() { + table.reloadData("messageTable", {where: getTableParams()}); + } + + function getTableParams() { + return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable")); + } + + exports('puchaseDeliveryNoteList', {}); +}); diff --git a/erp/src/main/resources/template/js/purchaseOrder/purchaseToWarehouse.js b/erp/src/main/resources/template/js/purchaseOrder/purchaseToWarehouse.js index 0662d79eb..e118a85e2 100644 --- a/erp/src/main/resources/template/js/purchaseOrder/purchaseToWarehouse.js +++ b/erp/src/main/resources/template/js/purchaseOrder/purchaseToWarehouse.js @@ -15,47 +15,38 @@ layui.config({ var $ = layui.$; var id = GetUrlParam("id"); - // 采购合同转采购订单 - AjaxPostUtil.request({url: sysMainMation.erpBasePath + "guerypurchase0rderTransById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { - let data = json.bean; - // data.erpOrderItemList = data.supplierContractChildList - console.log(data) - // 采购订单的【编辑布局】 - dsFormUtil.initEditPageForStatic('content', 'FP2023042000002', data, { - savePreParams: function (params) { - console.log(params) - // params.holderId=data.objectId - // params.holderKey=data.objectKey - // params.id=id - }, - saveData: function (params) { - // 保存数据 - AjaxPostUtil.request({url: sysMainMation.erpBasePath + "purchaseorder009", params: params, type: 'json', method: "POST", callback: function(json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - - }, - loadComponentCallback: function () { - $("div[controlType='supplier']").remove(); - $("div[controlType='purchaseOrderFromType']").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); - - - - - } - }); - }}); + // 采购订单转采购入库 + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryPurchaseOrderTransById", 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 + "purchaseorder009", params: params, type: 'json', method: "POST", callback: function(json) { + parent.layer.close(index); + parent.refreshCode = '0'; + }}); + }, + loadComponentCallback: function () { + $("div[controlType='supplier']").remove(); + $("div[controlType='purchaseOrderFromType']").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/src/main/resources/template/js/purchaseOrder/purchaseToWaybill.js b/erp/src/main/resources/template/js/purchaseOrder/purchaseToWaybill.js index 83ad51c01..ec79ba38e 100644 --- a/erp/src/main/resources/template/js/purchaseOrder/purchaseToWaybill.js +++ b/erp/src/main/resources/template/js/purchaseOrder/purchaseToWaybill.js @@ -15,21 +15,17 @@ layui.config({ var $ = layui.$; var id = GetUrlParam("id"); - // 采购合同转采购订单 - AjaxPostUtil.request({url: sysMainMation.erpBasePath + "querySupplierContractTransById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { + // 采购订购单转到货单 + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryPurchaseOrderTransById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { let data = json.bean; - data.erpOrderItemList = data.supplierContractChildList console.log(data) - // 采购订单的【编辑布局】 - dsFormUtil.initEditPageForStatic('content', 'FP2023042000002', data, { + // 采购到货的【编辑布局】 + dsFormUtil.initEditPageForStatic('content', 'FP2024061100002', data, { savePreParams: function (params) { - params.holderId=data.objectId - params.holderKey=data.objectKey - params.id=id }, saveData: function (params) { // 保存数据 - AjaxPostUtil.request({url: sysMainMation.erpBasePath + "supplierContractToOrder", params: params, type: 'json', method: "POST", callback: function(json) { + AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertPurchaseOrderToTurnDelivery", params: params, type: 'json', method: "POST", callback: function(json) { parent.layer.close(index); parent.refreshCode = '0'; }}); @@ -49,7 +45,8 @@ layui.config({ $("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); diff --git a/erp/src/main/resources/template/js/purchaseRequest/requestToContract.js b/erp/src/main/resources/template/js/purchaseRequest/requestToContract.js index c7acedb27..3b53da26e 100644 --- a/erp/src/main/resources/template/js/purchaseRequest/requestToContract.js +++ b/erp/src/main/resources/template/js/purchaseRequest/requestToContract.js @@ -245,6 +245,7 @@ layui.config({ sysSupplierUtil.openSysSupplierChoosePage(function (supplierMation) { $("#" + inputId).val(supplierMation.name); $("#" + inputId).attr("objectId", supplierMation.id); + $("#" + inputId).attr("objectKey", supplierMation.serviceClassName); // 获取所选供应商的联系人 AjaxPostUtil.request({url: sysMainMation.reqBasePath + "queryContactsListByObject", params: {objectId:supplierMation.id}, type: 'json', method: "GET", callback: function(json) { @@ -253,8 +254,6 @@ layui.config({ $("#" + contactsId).html(getDataUseHandlebars(selOption, {rows: contactsList})); form.render(); }}); - - }); }); diff --git a/erp/src/main/resources/template/tpl/purchaseDeliveryNote/purchaseDeliveryNoteList.html b/erp/src/main/resources/template/tpl/purchaseDeliveryNote/purchaseDeliveryNoteList.html new file mode 100644 index 000000000..35c65124c --- /dev/null +++ b/erp/src/main/resources/template/tpl/purchaseDeliveryNote/purchaseDeliveryNoteList.html @@ -0,0 +1,43 @@ + + + + + + + + + +
+
+ + +
+
+
+
+ +
+ + + + + \ No newline at end of file diff --git a/erp/src/main/resources/template/tpl/purchaseRequest/requestToContract.html b/erp/src/main/resources/template/tpl/purchaseRequest/requestToContract.html index 59e966bfc..9f46e26f2 100644 --- a/erp/src/main/resources/template/tpl/purchaseRequest/requestToContract.html +++ b/erp/src/main/resources/template/tpl/purchaseRequest/requestToContract.html @@ -60,7 +60,7 @@
-
+
diff --git a/web/src/main/resources/template/json/sysServiceMation.json b/web/src/main/resources/template/json/sysServiceMation.json index 810addb83..3665df122 100644 --- a/web/src/main/resources/template/json/sysServiceMation.json +++ b/web/src/main/resources/template/json/sysServiceMation.json @@ -8,6 +8,7 @@ "putIsPurchase": {"name": "采购入库单申请", "key": "com.skyeye.purchase.service.impl.PurchasePutServiceImpl"}, "purchaseOrder": {"name": "采购订单申请", "key": "com.skyeye.purchase.service.impl.PurchaseOrderServiceImpl"}, "purchaseRequest": {"name": "采购申请", "key": "com.skyeye.request.service.impl.PurchaseRequestServiceImpl"}, + "puchaseDeliveryNoteList": {"name": "采购到货单", "key": "com.skyeye.purchase.service.impl.PurchaseDeliveryServiceImpl"}, "putIsOthers": {"name": "其他入库单申请", "key": "com.skyeye.other.service.impl.OtherWareHousServiceImpl"}, "outIsOthers": {"name": "其他出库单申请", "key": "com.skyeye.other.service.impl.OtherOutLetsServiceImpl"}, "splitListOrder": {"name": "拆分订单", "key": "com.skyeye.other.service.impl.SplitListServiceImpl"}, -- GitLab