From 4c849fba45d788f28d3aa4ae8edbb0304aaa4428 Mon Sep 17 00:00:00 2001 From: "LAPTOP-UV1MNL38\\18023" <1802330370@qq.com> Date: Sat, 25 May 2024 20:29:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=96=B0=E5=A2=9E=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=9A=84=E5=AE=9A=E4=BB=B7=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/purchaseRequest/purchaseRequestList.js | 46 ++++++++++++++++--- .../purchaseRequest/purchaseRequestList.html | 11 ++++- .../resources/template/json/language.json | 3 ++ 3 files changed, 52 insertions(+), 8 deletions(-) diff --git a/erp/src/main/resources/template/js/purchaseRequest/purchaseRequestList.js b/erp/src/main/resources/template/js/purchaseRequest/purchaseRequestList.js index 3c1329d1e..dd7f08a7a 100644 --- a/erp/src/main/resources/template/js/purchaseRequest/purchaseRequestList.js +++ b/erp/src/main/resources/template/js/purchaseRequest/purchaseRequestList.js @@ -34,6 +34,9 @@ layui.config({ { field: 'fromTypeId', title: '单据来源', width: 90, templet: function (d) { return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("purchaseRequestFromType", 'id', d.fromTypeId, 'name'); }}, + { field: 'projectMation', title: '项目', align: 'left', width: 150, templet: function (d) { + return getNotUndefinedVal(d.projectMation?.name); + }}, { field: 'totalPrice', title: '合计金额', align: 'left', width: 120 }, { field: 'operTime', title: '单据日期', align: 'center', width: 140 }, { field: 'inquiryState', title: '询价状态', width: 90, templet: function (d) { @@ -71,6 +74,10 @@ layui.config({ activitiUtil.activitiDetails(data); } else if (layEvent === 'revoke') { //撤销 revoke(data); + }else if (layEvent === 'inquiry') { //询价 + inquiry(data); + }else if (layEvent === 'fixedPrice') { //定价 + fixedPrice(data); } }); @@ -92,9 +99,9 @@ layui.config({ layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { layer.close(index); AjaxPostUtil.request({url: sysMainMation.erpBasePath + "deletePurchaseRequest", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); + winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); }); } @@ -111,6 +118,33 @@ layui.config({ }}); } + // 询价 + function inquiry(data) { + _openNewWindows({ + url: systemCommonUtil.getUrl('FP2024052400005&id=' + data.id, null), + title: systemLanguage["com.skyeye.inquiryPageTitle"][languageType], + pageId: "purchaseRequestInquiry", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + } + + //定价 + function fixedPrice(data){ + _openNewWindows({ + url: systemCommonUtil.getUrl('FP2024052500001&id=' + data.id, null), + title: systemLanguage["com.skyeye.fixedPricePageTitle"][languageType], + pageId: "purchaseRequestFixedPrice", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + } + + // 详情 function details(data) { _openNewWindows({ @@ -127,9 +161,9 @@ layui.config({ layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) { layer.close(index); AjaxPostUtil.request({url: sysMainMation.erpBasePath + "revokePurchaseRequest", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) { - winui.window.msg("提交成功", {icon: 1, time: 2000}); - loadTable(); - }}); + winui.window.msg("提交成功", {icon: 1, time: 2000}); + loadTable(); + }}); }); } diff --git a/erp/src/main/resources/template/tpl/purchaseRequest/purchaseRequestList.html b/erp/src/main/resources/template/tpl/purchaseRequest/purchaseRequestList.html index fa9751449..787f1bfd7 100644 --- a/erp/src/main/resources/template/tpl/purchaseRequest/purchaseRequestList.html +++ b/erp/src/main/resources/template/tpl/purchaseRequest/purchaseRequestList.html @@ -33,8 +33,15 @@ {{# } }} {{# } }} {{# if(d.state == 'pass') { }} - {{# if(auth('1571812784641')){ }} - 转采购入库 + {{# if(d.inquiryState == 2 || d.inquiryState == 3) { }} + {{# if(auth('1716560596026')){ }} + 询价 + {{# } }} + {{# } }} + {{# if(d.inquiryState == 3) { }} + {{# if(auth('1716620356873')){ }} + 定价 + {{# } }} {{# } }} {{# } }} diff --git a/web/src/main/resources/template/json/language.json b/web/src/main/resources/template/json/language.json index d094f7f38..111292241 100644 --- a/web/src/main/resources/template/json/language.json +++ b/web/src/main/resources/template/json/language.json @@ -40,6 +40,9 @@ "com.skyeye.editBtn": {"zh": "编辑", "cn": "Edit"}, "com.skyeye.editPageTitle": {"zh": "编辑", "cn": "Edit"}, + + "com.skyeye.inquiryPageTitle": {"zh": "询价", "cn": "Inquiry"}, + "com.skyeye.fixedPricePageTitle": {"zh": "定价", "cn": "fixedPrice"}, "com.skyeye.enableBtn": {"zh": "启用", "cn": "Enable"}, "com.skyeye.enableOperation": {"zh": "启用操作", "cn": "Enable Operation"}, -- GitLab