From 7ff1af2c44055535ebfdd20a94d2bd9219259347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E8=BF=AA?= <2596750866@qq.com> Date: Wed, 8 Jan 2025 17:11:19 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E5=93=81=E8=B4=A8=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E9=80=80=E6=8D=A2=E8=B4=A7=E5=8D=95=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=80=80=E6=8D=A2=E8=B4=A7=E5=8D=95=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E4=BF=AE=E6=94=B9=E8=A1=A8=E6=A0=BC=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=9B=9E=E8=B0=83=E5=87=BD?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=8F=92=E5=85=A5=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E6=96=B0=E8=A1=8C=E5=87=BD=E6=95=B0=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=A1=B5=E9=9D=A2=E6=8F=90=E4=BA=A4=E5=87=BD=E6=95=B0?= =?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=E7=A1=AE=E8=AE=A4=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E9=80=80=E8=B4=A7=E4=BE=9B=E5=BA=94=E5=95=86=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4=E5=87=BD?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E4=BF=AE=E6=94=B9=E8=A1=A8=E6=A0=BC=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?ID=E5=92=8C=E5=90=8D=E7=A7=B0=E4=B8=8B=E6=8B=89=E6=A1=86?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E3=80=81=E7=9B=91=E5=90=AC=E5=87=BD?= =?UTF-8?q?=E6=95=B0=EF=BC=9B=20=E4=BF=AE=E6=94=B9=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E5=89=8D=E3=80=81=E5=90=8E=E9=80=80=E6=8D=A2=E8=B4=A7=E5=93=81?= =?UTF-8?q?=E8=B4=A8=E6=8A=A5=E5=91=8A=E6=98=BE=E7=A4=BA=E6=95=88=E6=9E=9C?= =?UTF-8?q?=EF=BC=9B=20=E4=BF=AE=E6=94=B9=E5=85=A5=E5=BA=93=E5=89=8D?= =?UTF-8?q?=E9=80=80=E6=8D=A2=E8=B4=A7=E7=A1=AE=E8=AE=A4=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=96=B0=E5=A2=9E=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=A1=86=EF=BC=8C=E4=BF=AE=E6=94=B9=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=96=B9=E6=B3=95=E5=8F=8A=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=EF=BC=8C=E4=BE=9B=E5=BA=94=E5=95=86=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=9C=A8=E5=AD=90=E8=A1=A8=E4=B8=AD=E6=98=BE=E7=A4=BA=EF=BC=9B?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E7=89=A9=E6=96=99=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E5=8E=BB=E9=99=A4=E5=8D=95=E9=80=89?= =?UTF-8?q?=E9=99=90=E5=88=B6=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=A0=8F=EF=BC=9B=20=E4=BF=AE=E6=94=B9=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=80=80=E6=8D=A2=E8=B4=A7=E5=93=81=E8=B4=A8=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E5=8E=BB=E9=99=A4=E8=A1=8C=E5=86=85?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=A0=B7=E5=BC=8F=EF=BC=9B=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=85=A5=E5=BA=93=E5=89=8D=E3=80=81=E5=90=8E=E9=80=80?= =?UTF-8?q?=E6=8D=A2=E8=B4=A7=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A1=A8=E6=A0=BC=E5=AD=97=E6=AE=B5=EF=BC=9B?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E9=80=80=E6=8D=A2=E8=B4=A7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=88=97?= =?UTF-8?q?=E5=B1=85=E4=B8=AD=E6=A0=B7=E5=BC=8F=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../quality/refundsExchanges/add.html | 115 ++++++-- .../afterNoConfirmSupplier.html | 260 ++++++++++-------- .../afterQualityReportDetail.html | 20 +- .../beforeHasConfirmSupplier.html | 146 +++++----- .../beforeQualityReportDetail.html | 88 +++--- .../refundsExchanges/materialSelect.html | 35 ++- .../refundsExchanges/qualityOrderReport.html | 10 +- .../refundsExchanges/refundsExchanges.html | 14 +- .../returnAfterStorageDetail.html | 11 +- .../refundsExchangesOutWarehouse.html | 51 +++- 10 files changed, 467 insertions(+), 283 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/add.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/add.html index 329cebf5..e6772ccb 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/add.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/add.html @@ -3,6 +3,7 @@ +
@@ -85,15 +86,32 @@ // ...其他字段 }; }); - + var hasNull = false; + var hasReportNull = false; materialDataList.forEach(function (material){ var key = 'unqualifiedDataList' + material.materialNo; var dataString = sessionStorage.getItem(key); + if(dataString === ''|| dataString === null || dataString === undefined){ + hasReportNull = true; + } if(dataString){ var refundsExchangesUnqualifieds = JSON.parse(dataString); material.refundsExchangesUnqualifieds = refundsExchangesUnqualifieds; + }; + if(material.refundsExchangesNum === ''||material.refundsExchangesNum === null + || material.refundsExchangesNum === undefined){ + hasNull = true; } - }) + }); + if(hasReportNull){ + $.modal.msgError("存在品质报告为空,请检查!"); + return; + } + if(hasNull){ + $.modal.msgError("退换货数不能为空!"); + return; + } + // 将全局变量 refundsExchangesCode 添加到要提交的数据中 const combinedData = Object.assign({}, refundsExchangesData, { refundsExchangesDetails: materialDataList, @@ -125,9 +143,7 @@ showToggle: false, showColumns: false, pagination: false, // 设置不分页 - columns: [{ - checkbox: true - }, + columns: [ { title: '退换货单号', field: 'refundsExchangesCode', @@ -137,9 +153,11 @@ { title: '料号', field: 'materialNo', + align: 'center', }, { title: '图片', + align: 'center', field: 'materialPhotourl', formatter: function(value, row, index) { return $.table.imageView(value); @@ -147,29 +165,41 @@ }, { title: '物料名称', + align: 'center', field: 'materialName', }, { title: '物料类型', + align: 'center', field: 'materialType', + visible: false, formatter: function(value, row, index) { return $.table.selectCategoryLabel(materialTypeDatas, value); } }, + { + title: '型号', + align: 'center', + field: 'materialModel', + }, { title: '描述', + align: 'center', field: 'materialDescribe', }, { title: '品牌', + align: 'center', field: 'materialBrand', }, { title: '单位', + align: 'center', field: 'materialUnit', }, { - title: '物料加工方式', + title: '加工方式', + align: 'center', field: 'materialProcessMethod', formatter: function(value, row, index) { return $.table.selectDictLabel(processMethodDatas, value); @@ -187,7 +217,23 @@ }, { title: '退换数', + align: 'center', field: 'refundsExchangesNum', + formatter: function(value, row, index) { + if(value == null || value == undefined){ + return ''; + } + return value; + }, + editable: { + type: 'text', + validate: function (v,row) { + if (!v) return '数量不能为空'; + if (isNaN(v)) return '数量必须是数字'; + var actualOutOrderSum = parseInt(v); + if (actualOutOrderSum <= 0) return '数量必须是正整数'; + } + } }, { title: '是否含品质报告数据', @@ -221,29 +267,46 @@ function doSubmit(index, layero,uniqueId){ - console.log(uniqueId); var iframeWin = window[layero.find('iframe')[0]['name']]; - var rowData = iframeWin.$('#bootstrap-materialSelect-table').bootstrapTable('getSelections')[0]; - console.log("rowData: "+rowData); - $("#bootstrap-table").bootstrapTable('insertRow', { - index:1, - row: { - materialNo:rowData.materialNo, - materialPhotourl:rowData.materialPhotourl, - materialName: rowData.materialName, - materialType: rowData.materialType, - materialDescribe: rowData.describe, - materialBrand: rowData.brand, - materialUnit: rowData.unit, - materialProcessMethod: rowData.processMethod, - makeTotal:rowData.makeTotal, - refundsExchangesNum: '', - hasQualifiedReport: 0, - } - }) + var rowData = iframeWin.$('#bootstrap-materialSelect-table').bootstrapTable('getSelections'); + //判断是否重复 + var data = $("#bootstrap-table").bootstrapTable('getData'); + var rows = data.length; + if(rows>0){ + for(var i=0;i
- +
@@ -25,7 +25,15 @@
- + +
+
+
+ +
+
@@ -48,6 +56,8 @@ var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; var supplier = []; + var supplierCodeList = []; + var supplierNameList = []; var $table = $("#bootstrap-table"); var prefix = ctx + "quality/refundsExchanges"; @@ -58,17 +68,17 @@ // 新增提交 function submitHandler() { - $("input[name='refundsExchangesCode']").removeAttr("disabled"); - $("input[name='qualityRemark']").removeAttr("disabled"); + var isReturnedToSupplier = $("#isReturnedToSupplier").val(); + if(isReturnedToSupplier === ''||isReturnedToSupplier === null||isReturnedToSupplier === undefined){ + $.modal.msgError("请选择是否退回供应商"); + return; + } const afterNoConfirmSupplierData = $("#form-afterNoConfirmSupplier-edit").serializeArray().reduce((obj, item) => { obj[item.name] = item.value; return obj; }, {}); - // 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据 var table = $('#bootstrap-table').bootstrapTable('getData'); - - // 将表数据转换成与afterNoConfirmSupplierData格式一致的数组 var materialDataList = table.map(function(item) { // 根据实际字段名调整 return { @@ -79,6 +89,8 @@ "materialType": item.materialType, "materialUnit": item.materialUnit, "materialBrand": item.materialBrand, + "materialModel": item.materialModel, + "materialProcessMethod": item.materialProcessMethod, "materialDescribe": item.materialDescribe, "makeTotal":item.makeTotal, "qualityHasqualifiedNum":item.qualityHasqualifiedNum, @@ -93,8 +105,18 @@ }; }); - // 合并表单数据和表格数据 - //const combinedData = Object.assign({}, ...afterNoConfirmSupplierData.map(item => ({ [item.name]: item.value })), ...materialData); + if(isReturnedToSupplier === "1"){ + var supplierNull = false; + materialDataList.forEach(function (data){ + if(data.supplierCode === ''|| data.supplierCode === null ||data.supplierCode === undefined){ + supplierNull = true; + } + }); + if(supplierNull){ + $.modal.msgError("存在供应商信息为空,请选择"); + return; + } + } const combinedData = Object.assign({}, afterNoConfirmSupplierData, { refundsExchangesDetails: materialDataList }); console.log(combinedData) @@ -116,9 +138,7 @@ pagination: false, // 设置不分页 queryParams: queryParams, modalName: "选择物料", - columns: [{ - checkbox: true - }, + columns: [ { title: '退换货详情Id', field: 'refundsExchangesDetailId', @@ -131,10 +151,12 @@ }, { title: '料号', - field: 'materialNo' + field: 'materialNo', + align: 'center', }, { title: '图片', + align: 'center', field: 'materialPhotourl', formatter: function(value, row, index) { return $.table.imageView(value); @@ -142,49 +164,45 @@ }, { title: '物料名称', + align: 'center', field: 'materialName' }, + // { + // title: '物料类型', + // align: 'center', + // field: 'materialType', + // formatter: function(value, row, index) { + // return $.table.selectCategoryLabel(materialTypeDatas, value); + // } + // }, { - title: '物料类型', - field: 'materialType', - formatter: function(value, row, index) { - return $.table.selectCategoryLabel(materialTypeDatas, value); - } + title: '描述', + align: 'center', + field: 'materialDescribe', }, { - title: '物料描述', - field: 'materialDescribe', + title: '型号', + align: 'center', + field: 'materialModel', }, { title: '品牌', + align: 'center', field: 'materialBrand', }, { title: '单位', + align: 'center', field: 'materialUnit', }, { title: '加工方式', + align: 'center', 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', @@ -196,33 +214,40 @@ }, { title: '品质不合格数', + align: 'center', field: 'qualityUnqualifiedNum', }, - {title: '选择供应商ID',field: 'supplierCode', + { + title: '供应商ID',field: 'supplierCode', + align: 'center', formatter:function (value, row, index) { - return supplierCodeAsyncFormatter(value,row,index); + return supplierCodeFormatter(value,row,index); } }, - {title: '选择供应商名称',field: 'supplierName', + {title: '供应商名称',field: 'supplierName', formatter:function(value, row, index){ - return getSupplierNameType(value,row,index) + return supplierNameFormatter(value,row,index); } }, { title: '退货联系人', field: 'customerContact', + align: 'center', }, { title: '联系人电话', field: 'contactNumber', + align: 'center', }, { title: '退货地址', field: 'supplierAddress', + align: 'center', } ] }; $.table.init(options); + loadSupplierCodes(); }) function queryParams(params) { @@ -235,93 +260,110 @@ } - // 自定义供应商代码列的格式化函数,异步获取供应商代码 - function supplierCodeAsyncFormatter(value, row, index) { - var selectHtml = ''; - loadSupplierCodes(selectHtml, index); // 异步加载供应商代码 - return selectHtml; - } // 加载供应商代码的函数 - function loadSupplierCodes(selectHtml, index) { + function loadSupplierCodes() { $.ajax({ - url: ctx + 'system/supplier/getSupplierCodes', // 获取所有供应商代码 + url: ctx + 'system/supplier/matchSupplierList', // 获取所有供应商代码 type: 'POST', dataType: 'json', - success: function (codes) { - var selectElement = $('.supplier-code:eq(' + index + ')'); - codes.forEach(function (code) { - selectElement.append(''); + success: function (result) { + var supplierList = result.data; + supplierList.forEach(function (data){ + supplierCodeList.push(data.supplierCode); + supplierNameList.push(data.supplierName); }); - supplier = codes; - // 设置默认值(如果存在) - var rowData = $table.bootstrapTable('getData')[index]; - if (rowData && rowData.supplierCode) { - selectElement.val(rowData.supplierCode); - } } }); } - - // 列中获取成本类型的下拉改变数据 - function supplierCodeChange(selectElement, rowIndex) { - var newSupplierCode = $(selectElement).val(); - 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; - } + //自定义供应商编号的初始化函数 + function supplierCodeFormatter(value, row, index){ + var selectHtml = `'; + return selectHtml; } - function getSupplierNameType(value, row, index) { - var selectHtml = ''; - return selectHtml; } } - // 供应商名称改变时的处理函数 - function onSupplierNameChange(selectElement, rowIndex) { - var newSupplierName = $(selectElement).val(); - 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; - } + + //自定义供应商名称的初始化函数 + function supplierNameFormatter(value, row, index){ + var selectHtml = `'; + return selectHtml; + } + function onSupplierNameChange(selectElement, rowIndex) { + var supplierNameValue = $(selectElement).val(); + console.log(supplierNameValue); + if (supplierNameValue) { + $.ajax({ + url: ctx + 'system/supplier/getSelectSupplier', + method: 'GET', + dataType: 'json', + data:{supplierName: supplierNameValue}, + success: function(response) { + console.log(response); + if (response.data) { + var newData = response.data; + var newRowData = { + supplierName : supplierNameValue, + supplierCode : newData.supplierCode, + customerContact : newData.customerContact, + contactNumber : newData.contactNumber, + supplierAddress : newData.customerAddress, + }; + $('#bootstrap-table').bootstrapTable('updateRow', { + index: rowIndex, // 使用传递进来的索引 + row: newRowData + }); + } else { + console.error('后端请求数据为空'); + } + }, + error: function(xhr, status, error) { + console.error('请求出错:', status, ", ", error); + } + }); + } } function qualityReport(materialNo, refundsExchangesCode) { 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 857d3875..51ad24b9 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterQualityReportDetail.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterQualityReportDetail.html @@ -1,7 +1,7 @@ - + @@ -26,8 +26,8 @@
-
- +
+
@@ -35,10 +35,10 @@
-
+
- +
@@ -115,11 +115,11 @@ title: '报告', field: 'unqualifiedReportUrl', align: 'center', - formatter: function(value, row, index) { - var actions = []; - actions.push('报告 '); - return actions.join(''); - } + // formatter: function(value, row, index) { + // var actions = []; + // actions.push('报告 '); + // return actions.join(''); + // } }, ] }; diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/beforeHasConfirmSupplier.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/beforeHasConfirmSupplier.html index 42277418..2600aef2 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/beforeHasConfirmSupplier.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/beforeHasConfirmSupplier.html @@ -3,22 +3,7 @@ - +
@@ -27,7 +12,7 @@
- +
@@ -44,12 +29,20 @@
-
- -
-
- -
+ +
+ +
+ +
+
+ + +
+
+
@@ -75,6 +68,12 @@ var refundsExchangesId = $("input[name='refundsExchangesId']").val(); var qualityRefundsExchanges = { refundsExchangesId: refundsExchangesId, + isReturnedToSupplier: $("#isReturnedToSupplier").val(), + } + if(qualityRefundsExchanges.isReturnedToSupplier === '' || qualityRefundsExchanges.isReturnedToSupplier === null + || qualityRefundsExchanges.isReturnedToSupplier === undefined){ + $.modal.msgError("请选择是否退回给供应商"); + return; } $.operate.saveJson(prefix + "/beforeHasConfirmSupplier",JSON.stringify(qualityRefundsExchanges)); } @@ -82,50 +81,26 @@ $(function() { - // 假设refundsExchangesCode已经定义或者可以通过某种方式获取到 - var refundsExchangesCode = [[${qualityRefundsExchanges.refundsExchangesCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 - - $.getJSON(prefix + "/detailListGroupedBySupplier?refundsExchangesCode=" + refundsExchangesCode, function(data) { - for (var supplierCode in data) { - if (data.hasOwnProperty(supplierCode)) { - var supplierData = data[supplierCode]; - createTableForSupplier(supplierCode, supplierData); - } - } - }); - }); - - function createTableForSupplier(supplierCode, supplierData) { - var tableId = 'bootstrap-table-' + supplierCode.replace(/[^a-z0-9]/gi, '_').toLowerCase(); - var $tableWrapper = $('
'); - - // 确保supplierData至少有一条记录,并从中提取供应商详细信息 - var supplierInfo = supplierData.length > 0 ? supplierData[0] : {}; // 默认为空对象,以防数据不存在 - - // 构建含有额外供应商信息的标题字符串 - var headerTitle ='供应商'+'
'+supplierCode + ' - ' + (supplierInfo.supplierName || 'N/A') + - '
' + (supplierInfo.customerContact || 'N/A') + - ' - ' + (supplierInfo.contactNumber || 'N/A') + - ' - ' + (supplierInfo.supplierAddress || 'N/A'); - - var $header = $('

' + headerTitle + '

'); - var $table = $('
'); - - $table.bootstrapTable({ - data: supplierData, - columns: [{ - checkbox: true - }, + var options = { + modalName: "物料信息", + url: prefix + "/getMaterialListByRefundsExchangesCode", + queryParams: { - title: '供应商ID', - field: 'supplierCode', - visible: false + refundsExchangesCode: $("#refundsExchangesCode").val(), }, + showSearch: false, + showRefresh: false, + showToggle: false, + showColumns: false, + pagination: false, // 设置不分页 + columns: [ { title: '料号', + align: 'center', field: 'materialNo' }, { title: '物料名称', + align: 'center', field: 'materialName' }, { @@ -137,23 +112,27 @@ } }, { - title: '物料图片地址', + title: '图片', + align: 'center', field: 'materialPhotourl', }, { - title: '物料描述', + title: '描述', + align: 'center', field: 'materialDescribe', }, { - title: '物料品牌', + title: '品牌', + align: 'center', field: 'materialBrand', }, { - title: '物料单位', + title: '单位', + align: 'center', field: 'materialUnit', }, { - title: '物料加工方式', + title: '加工方式', field: 'materialProcessMethod', align: 'center', formatter: function(value, row, index) { @@ -172,13 +151,38 @@ }, { title: '品质不合格数', + align: 'center', field: 'qualityUnqualifiedNum', - }] - }); - - $tableWrapper.append($header).append($table); - $('#tablesContainer').append($tableWrapper); - } + }, + { + title: '供应商ID', + align: 'center', + field: 'supplierCode', + }, + { + title: '供应商名称', + align: 'center', + field: 'supplierName', + }, + { + title: '联系人', + align: 'center', + field: 'customerContact', + }, + { + title: '联系人电话', + align: 'center', + field: 'contactNumber', + }, + { + title: '联系人地址', + align: 'center', + field: 'supplierAddress', + }, + ], + }; + $.table.init(options); + }); /*品质报告*/ diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/beforeQualityReportDetail.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/beforeQualityReportDetail.html index 57f71a96..90d5f832 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/beforeQualityReportDetail.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/beforeQualityReportDetail.html @@ -26,47 +26,47 @@
-
- -
- -
-
-
- -
- -
-
+ + + + + + + + + + + +
-
-

合格数

-
-
- - -
-
- - + + + + + + + + + + - -
-
-
-
- - -
-
- - - -
-
-
+ + + + + + + + + + + + + + +
@@ -84,7 +84,7 @@
-
+
@@ -93,7 +93,7 @@
-
+
@@ -165,11 +165,11 @@ title: '报告', field: 'unqualifiedReportUrl', align: 'center', - formatter: function(value, row, index) { - var actions = []; - actions.push('报告 '); - return actions.join(''); - } + // formatter: function(value, row, index) { + // var actions = []; + // actions.push('报告 '); + // return actions.join(''); + // } }, ] }; diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/materialSelect.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/materialSelect.html index b752dc7a..3ad5c3ba 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/materialSelect.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/materialSelect.html @@ -6,6 +6,27 @@
+
+
+
+ +
+
+
+
@@ -25,7 +46,6 @@ var options = { id: 'bootstrap-materialSelect-table', clickToSelect: true, // 点击选中行 - singleSelect: true, // 单选 showSearch: false, showRefresh: false, showToggle: false, @@ -39,9 +59,11 @@ { title: '料号', field: 'materialNo', + align: 'center', }, { title: '图片', + align: 'center', field: 'materialPhotourl', formatter: function(value, row, index) { return $.table.imageView(value); @@ -50,28 +72,39 @@ }, { title: '物料名称', + align: 'center', field: 'materialName', }, { title: '类型', + align: 'center', field: 'materialType', formatter: function(value, row, index) { return $.table.selectCategoryLabel(materialTypeDatas, value); } }, + { + title: '型号', + align: 'center', + field: 'materialModel', + }, { title: '描述', + align: 'center', field: 'describe', }, { title: '品牌', + align: 'center', field: 'brand', }, { title: '单位', + align: 'center', field: 'unit', }, { title: '加工方式', + align: 'center', field: 'processMethod', formatter: function(value, row, index) { return $.table.selectDictLabel(processMethodDatas, value); diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/qualityOrderReport.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/qualityOrderReport.html index 1bb31d97..89609357 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/qualityOrderReport.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/qualityOrderReport.html @@ -2,6 +2,7 @@ + @@ -170,7 +171,6 @@ align: 'center', editable:{ type: 'text', - mode:'inline', validate: function (v) { if (!v) return '数量不能为空'; if (isNaN(v)) return '数量必须是数字'; @@ -183,11 +183,9 @@ title: '报告', field: 'unqualifiedReportUrl', align: 'center', - formatter: function(value, row, index) { - var actions = []; - actions.push('上传 '); - return actions.join(''); - } + editable: { + type: 'text', // 表示该列可以被编辑为文本 + }, }, { title: '操作', diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html index 06204a13..c6df71af 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html @@ -117,9 +117,11 @@ { title: '退换货单号', field: 'refundsExchangesCode', + align: 'center', }, { title: '退换货状态', + align: 'center', field: 'refundsExchangesStatus', formatter: function(value, row, index) { return $.table.selectDictLabel(refundsExchangesStatusDatas, value); @@ -127,6 +129,7 @@ }, { title: '仓库状态', + align: 'center', field: 'qualityWarehouseStatus', formatter: function(value, row, index) { return $.table.selectDictLabel(qualityWarehouseStatusDatas, value); @@ -134,6 +137,7 @@ }, { title: '采购状态', + align: 'center', field: 'qualityPurchaseStatus', formatter: function(value, row, index) { return $.table.selectDictLabel(qualityPurchaseStatusDatas, value); @@ -141,10 +145,12 @@ }, { title: '关联单号', + align: 'center', field: 'relatedOrderCode', }, { title: '退货节点', + align: 'center', field: 'qualityReturnNode', formatter: function(value, row, index) { return $.table.selectDictLabel(qualityReturnNodeDatas, value); @@ -152,6 +158,7 @@ }, { title: '物料合计', + align: 'center', field: 'materialTotal', footerFormatter: function (value) { var sum = 0; @@ -163,6 +170,7 @@ }, { title: '数量合计', + align: 'center', field: 'numTotal', footerFormatter: function (value) { var sum = 0; @@ -179,18 +187,22 @@ }, { title: '录入人', + align: 'center', field: 'createBy', }, { title: '录入时间', + align: 'center', field: 'createTime', }, { title: '更新人', + align: 'center', field: 'updateBy', }, { title: '上次更新时间', + align: 'center', field: 'updateTime', }, { @@ -211,7 +223,7 @@ actions.push('详情 '); } /*入库前退换货-确认供应商-已有供应商*/ - if (row.qualityReturnNode == 0 && row.qualityPurchaseStatus == 0 && row.qualityWarehouseStatus == 1){ + if (row.qualityReturnNode == 0 && row.qualityPurchaseStatus == 0 ){ actions.push('确认供应商 '); } /*入库前退换货-确认收货-已有供应商*/ diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html index 5da58095..db5d36b7 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html @@ -119,9 +119,7 @@ showToggle: false, showColumns: false, pagination: false, // 设置不分页 - columns: [{ - checkbox: true - }, + columns: [ { title: '退换货单号', field: 'refundsExchangesCode', @@ -130,10 +128,12 @@ { title: '料号', + align: 'center', field: 'materialNo', }, { title: '图片', + align: 'center', field: 'materialPhotourl', }, { @@ -149,6 +149,11 @@ return $.table.selectCategoryLabel(materialTypeDatas, value); } }, + { + title: '物料型号', + field: 'materialModel', + align: 'center', + }, { title: '描述', field: 'materialDescribe', diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/refundsExchangesOutWarehouse.html b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/refundsExchangesOutWarehouse.html index be668a1d..23b58777 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/refundsExchangesOutWarehouse.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/refundsExchangesOutWarehouse.html @@ -3,12 +3,11 @@ + @@ -18,7 +17,7 @@
- +
@@ -142,9 +141,7 @@ $table.bootstrapTable({ data: supplierData, - columns: [{ - checkbox: true - }, + columns: [ { title: '出库单详情ID', field: 'outOrderDetailId', @@ -159,58 +156,88 @@ { title: '料号', field: 'materialNo', + align: 'center', }, { title: '图片', + align: 'center', field: 'materialPhotourl', }, { title: '物料名称', + align: 'center', field: 'materialName', }, { title: '物料类型', + align: 'center', field: 'materialType', formatter: function(value, row, index) { return $.table.selectCategoryLabel(materialTypeDatas, value); } }, + { + title: '型号', + align: 'center', + field: 'materialModel', + }, { title: '描述', + align: 'center', field: 'materialDescribe', }, { title: '品牌', + align: 'center', field: 'materialBrand', }, { title: '单位', + align: 'center', field: 'materialUnit', }, { title: '加工方式', + align: 'center', field: 'materialProcessMethod', formatter: function(value, row, index) { return $.table.selectDictLabel(processMethodDatas, value); } }, - { - title: '订单数量', - field: 'makeNum', - }, + // { + // title: '订单数量', + // field: 'makeNum', + // }, { title: '已出库数', + align: 'center', field: 'hasOutOrderSum', }, { title: '申请出库数', + align: 'center', field: 'applyOutOrderSum', }, { title: '实际出库数', + align: 'center', field: 'actualOutOrderSum', - editable:true - } + formatter: function(value, row, index) { + if(value == null || value == undefined){ + return ''; + } + return value; + }, + editable: { + type: 'text', + validate: function (v,row) { + if (!v) return '数量不能为空'; + if (isNaN(v)) return '数量必须是数字'; + var actualOutOrderSum = parseInt(v); + if (actualOutOrderSum < 0) return '数量必须是正整数'; + } + } + }, ] });