From 6c114ce5c26d05c40e72b1ed8435a8281f9df83f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E8=BF=AA?= <2596750866@qq.com> Date: Fri, 23 Aug 2024 16:16:23 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E5=93=81=E8=B4=A8=E7=AE=A1=E7=90=86?= =?UTF-8?q?=20=E9=80=80=E6=8D=A2=E8=B4=A7=E5=8D=95=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=90=8E=E9=80=80=E8=B4=A7=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E9=A1=B5=E9=9D=A2=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=A1=A8=E5=8D=95=E6=A8=A1=E5=9D=97=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=8C=E6=96=B0=E5=A2=9E=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E9=80=80=E6=8D=A2=E8=B4=A7ID=E3=80=81?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=E5=8F=B7=EF=BC=9B=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=A1=A8=E6=A0=BC=E5=88=97=E8=A1=A8=E7=BB=93=E6=9E=84?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=BE=9B=E5=BA=94=E5=95=86=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=B8=8B=E6=8B=89=E6=A1=86=E7=9B=91=E5=90=AC=E5=87=BD?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E5=8A=A8=E6=80=81=E6=9B=B4=E6=96=B0=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E4=BF=A1=E6=81=AF=EF=BC=9B=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=8F=90=E4=BA=A4=E6=96=B9=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=A1=A8=E5=8D=95=E6=95=B0=E6=8D=AE=E5=89=8D?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=85=83=E7=B4=A0disabled=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=EF=BC=9B=20=E4=BF=AE=E6=94=B9=E5=85=A5=E5=BA=93=E5=90=8E?= =?UTF-8?q?=E9=80=80=E8=B4=A7=E6=8A=A5=E5=91=8A=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E8=B0=83=E6=95=B4=E8=A1=A8=E6=A0=BC=E7=BB=93?= =?UTF-8?q?=E6=9E=84=EF=BC=8C=E6=B7=BB=E5=8A=A0=E6=8A=A5=E5=91=8A=E6=8C=89?= =?UTF-8?q?=E9=92=AE=EF=BC=9B=20=E4=BF=AE=E6=94=B9=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E5=90=8E=E9=80=80=E8=B4=A7=E7=A1=AE=E8=AE=A4=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E8=B0=83=E6=95=B4=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E7=BB=93=E6=9E=84=EF=BC=8C=E5=93=81=E8=B4=A8=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8C=89=E9=92=AE=E5=8F=8A=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../afterConfirmDelivery.html | 40 ++++---- .../afterNoConfirmSupplier.html | 97 +++++++++++++------ .../afterQualityReportDetail.html | 13 ++- 3 files changed, 97 insertions(+), 53 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterConfirmDelivery.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterConfirmDelivery.html index 6c64b32a..df51e886 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterConfirmDelivery.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterConfirmDelivery.html @@ -51,6 +51,9 @@ var refundsExchangesCode = [[${qualityRefundsExchanges.refundsExchangesCode}]] + var processMethodDatas = [[${@dict.getType('processMethod')}]]; + var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; + var qualityDeliveryStatusDatas = [[${@dict.getType('quality_delivery_status')}]]; var prefix = ctx + "quality/refundsExchanges"; $("#form-afterConfirmDelivery-edit").validate({ @@ -156,17 +159,24 @@ { title: '料号', field: 'materialNo' - }, { + }, + { title: '物料名称', field: 'materialName' }, { title: '物料类型', field: 'materialType', + formatter: function(value, row, index) { + return $.table.selectCategoryLabel(materialTypeDatas, value); + } }, { - title: '物料图片地址', + title: '物料图片', field: 'materialPhotourl', + formatter: function(value, row, index) { + return $.table.imageView(value); + } }, { title: '物料描述', @@ -183,26 +193,16 @@ { title: '物料加工方式', field: 'materialProcessMethod', - }, - { - title: '订单数', - field: 'makeTotal', - }, - { - title: '品质已合格数', - field: 'qualityHasqualifiedNum', - }, - { - title: '本次到货数', - field: 'thisArrivedNum', + formatter: function(value, row, index) { + return $.table.selectDictLabel(processMethodDatas, value); + } }, { title: '品质报告', align: 'center', formatter: function(value, row, index) { - // 这里直接使用row对象获取supplierCode,假设它是存在的 var actions = []; - actions.push('报告 '); + actions.push('报告 '); return actions.join(''); } }, @@ -227,13 +227,13 @@ /*品质报告*/ - function qualityReport(materialNo, supplierCode) { + function qualityReport(materialNo, refundsExchangesCode) { var queryParams = new URLSearchParams(); queryParams.append('materialNo', materialNo); - queryParams.append('supplierCode', encodeURIComponent(supplierCode)); + queryParams.append('refundsExchangesCode', encodeURIComponent(refundsExchangesCode)); - var url = ctx + 'quality/qualityOrder/qualityReport?' + queryParams.toString(); - $.modal.open("品质报告", url); + var url = ctx + 'quality/refundsExchanges/afterQualityReportDetail?' + queryParams.toString(); + $.modal.open("品质报告详情", url); } // 列中获取收货状态下拉改变数据 diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterNoConfirmSupplier.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterNoConfirmSupplier.html index d4d8e1a9..d97242be 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterNoConfirmSupplier.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterNoConfirmSupplier.html @@ -6,6 +6,8 @@
+ +
@@ -13,17 +15,17 @@
- +
- +
- +
- +
@@ -42,7 +44,10 @@ var refundsExchangesCode = [[${qualityRefundsExchanges.refundsExchangesCode}]] var qualityRefundsExchanges = [[${qualityRefundsExchanges}]]; + var processMethodDatas = [[${@dict.getType('processMethod')}]]; + var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; + var supplier = []; var $table = $("#bootstrap-table"); var prefix = ctx + "quality/refundsExchanges"; @@ -50,18 +55,12 @@ focusCleanup: true }); - // function submitHandler() { - // if ($.validate.form()) { - // $.operate.save(prefix + "/returnBeforeStorageDetail", $('#form-qualityRefundsExchanges-edit').serialize()); - // } - // } - - // 新增提交 function submitHandler() { - // 获取表单数据 - // const afterNoConfirmSupplierData = $("#form-afterNoConfirmSupplier-edit").serializeArray(); - // 获取表单数据 + + $("input[name='refundsExchangesCode']").removeAttr("disabled"); + $("input[name='qualityRemark']").removeAttr("disabled"); + const afterNoConfirmSupplierData = $("#form-afterNoConfirmSupplier-edit").serializeArray().reduce((obj, item) => { obj[item.name] = item.value; return obj; @@ -121,65 +120,77 @@ checkbox: true }, { - title: '供应商ID', - field: 'supplierCode', + title: '退换货详情Id', + field: 'refundsExchangesDetailId', visible: false }, { - title: '退换货详情Id', - field: 'refundsExchangesDetailId', + title: '退换货单号', + field: 'refundsExchangesCode', visible: false }, { title: '料号', field: 'materialNo' - }, { + }, + { + title: '图片', + field: 'materialPhotourl', + formatter: function(value, row, index) { + return $.table.imageView(value); + } + }, + { title: '物料名称', field: 'materialName' }, { title: '物料类型', field: 'materialType', - }, - { - title: '物料图片地址', - field: 'materialPhotourl', + formatter: function(value, row, index) { + return $.table.selectCategoryLabel(materialTypeDatas, value); + } }, { title: '物料描述', field: 'materialDescribe', }, { - title: '物料品牌', + title: '品牌', field: 'materialBrand', }, { - title: '物料单位', + title: '单位', field: 'materialUnit', }, { - title: '物料加工方式', + title: '加工方式', field: 'materialProcessMethod', + formatter: function(value, row, index) { + return $.table.selectDictLabel(processMethodDatas, value); + } }, { title: '订单数', field: 'makeTotal', + visible: false }, { title: '品质已合格数', field: 'qualityHasqualifiedNum', + visible: false }, { title: '本次到货数', field: 'thisArrivedNum', + visible: false }, { title: '品质报告', align: 'center', formatter: function(value, row, index) { - // 这里直接使用row对象获取supplierCode,假设它是存在的 var actions = []; - actions.push('报告 '); + actions.push('报告 '); return actions.join(''); } }, @@ -244,6 +255,7 @@ codes.forEach(function (code) { selectElement.append(''); }); + supplier = codes; // 设置默认值(如果存在) var rowData = $table.bootstrapTable('getData')[index]; if (rowData && rowData.supplierCode) { @@ -259,6 +271,14 @@ var tableData = $table.bootstrapTable('getData'); var newRow = tableData[rowIndex]; newRow.supplierCode = newSupplierCode; + supplier.forEach(function (index){ + if(index.supplierCode === newSupplierCode){ + newRow.supplierName = index.supplierName; + newRow.customerContact = index.customerContact; + newRow.contactNumber = index.contactNumber; + newRow.supplierAddress = index.customerAddress; + } + }); // getSupplierNameType(newRow.supplierCode,newRow,rowIndex); $table.bootstrapTable('updateRow', {index: rowIndex, row: newRow}); @@ -293,9 +313,26 @@ var tableData = $table.bootstrapTable('getData'); var newRow = tableData[rowIndex]; // 获取当前行数据 newRow.supplierName = newSupplierName; + supplier.forEach(function (index){ + if(index.supplierName === newSupplierName){ + newRow.customerContact = index.customerContact; + newRow.contactNumber = index.contactNumber; + newRow.supplierAddress = index.customerAddress; + } + }); // 更新行数据 $table.bootstrapTable('updateRow', {index: rowIndex, row: newRow}); } + + function qualityReport(materialNo, refundsExchangesCode) { + var queryParams = new URLSearchParams(); + queryParams.append('materialNo', materialNo); + queryParams.append('refundsExchangesCode', encodeURIComponent(refundsExchangesCode)); + console.log("materialNo:"+materialNo); + console.log("refundsExchangesCode:"+refundsExchangesCode); + var url = ctx + 'quality/refundsExchanges/afterQualityReportDetail?' + queryParams.toString(); + $.modal.open("品质报告详情", url); + } \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterQualityReportDetail.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterQualityReportDetail.html index 19d46a0f..e517000a 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterQualityReportDetail.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterQualityReportDetail.html @@ -89,9 +89,7 @@ showSearch:false, singleSelect:true, queryParams:queryParams, - columns: [{ - checkbox: false - }, + columns: [ { title: '品质报告单id', field: 'qualityOrderReportId', @@ -100,6 +98,7 @@ { title: '不良分类', field: 'processBadClassification', + align: 'center', formatter: function(value, row, index) { return $.table.selectDictLabel(processBadClassificationDatas, value); } @@ -108,6 +107,7 @@ { title: '不良等级', field: 'processBadGrade', + align: 'center', formatter: function(value, row, index) { return $.table.selectDictLabel(processBadGradeDatas, value); } @@ -115,10 +115,17 @@ { title: '数量', field: 'processBadNum', + align: 'center', }, { title: '报告', field: 'unqualifiedReportUrl', + align: 'center', + formatter: function(value, row, index) { + var actions = []; + actions.push('报告 '); + return actions.join(''); + } }, ] };