From ae4aeefb97ab554b1117c2a3ff1835777d71bde3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E8=BF=AA?= <2596750866@qq.com> Date: Sat, 12 Oct 2024 09:23:34 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E7=9B=98=E7=82=B9=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E3=80=81=E7=BC=96=E8=BE=91=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E7=9B=98=E7=82=B9=E9=A1=B5=E9=9D=A2=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=89=A9=E6=96=99=E5=9B=9E=E8=B0=83=E5=87=BD?= =?UTF-8?q?=E6=95=B0=EF=BC=9B=20=E4=BF=AE=E6=94=B9=E7=89=A9=E6=96=99?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E9=A1=B5=E9=9D=A2=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../warehouse/inventoryCheck/add.html | 42 ++++++++++----- .../warehouse/inventoryCheck/edit.html | 51 ++++++++++++------- .../inventoryCheck/materialSelect.html | 38 +++++++++++--- 3 files changed, 93 insertions(+), 38 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/add.html b/ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/add.html index dddc7b13..5ddf1795 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/add.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/add.html @@ -124,7 +124,7 @@ //添加物料信息 function insertRow() { - var url = ctx + 'warehouse/inventoryCheck/materialSelect'; + var url = ctx + "erp/material/select"; var options = { title: '选择物料', url: url, @@ -168,27 +168,41 @@ }) 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, + var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections'); + //判断是否重复 + var data = $("#bootstrap-table").bootstrapTable('getData'); + var rows = data.length; + if(rows > 0){ + for(var i=0;i 0){ + for(var i=0;i
+
+
+
+ +
+
+
+
-
+
@@ -22,14 +43,19 @@ $(function() { var materialList = [[${materialList}]]; + materialList.forEach(function (data){ + data.describe = data.materialDescribe; + data.brand = data.materialBrand; + data.unit = data.materialUnit; + }) var formattedData = { total: materialList.length, // 总记录数 rows: materialList // 数据行 }; var options = { - id: 'bootstrap-materialSelect-table', + id: 'bootstrap-select-table', clickToSelect: true, // 点击选中行 - singleSelect: true, // 单选 + // singleSelect: true, // 单选 // url: prefix + "/getAllMaterialInfo", data: formattedData, pagination: true, @@ -64,15 +90,15 @@ }, { title: '描述', - field: 'materialDescribe', + field: 'describe', }, { title: '品牌', - field: 'materialBrand', + field: 'brand', }, { title: '单位', - field: 'materialUnit', + field: 'unit', }, { title: '加工方式', field: 'processMethod',