From 07d4055bb63c41e7aeb25cbc8b5e595c95ffe77a Mon Sep 17 00:00:00 2001 From: qiankunpingtai Date: Mon, 29 Jul 2019 11:51:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=93=E5=AD=98=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/materials/material_forselect.html | 32 +------------------ .../materials/materialcategory_forselect.html | 17 ++-------- .../mapper_xml/DepotItemMapperEx.xml | 4 +-- .../resources/mapper_xml/MaterialMapperEx.xml | 21 ++++++++---- 4 files changed, 20 insertions(+), 54 deletions(-) diff --git a/erp_web/pages/materials/material_forselect.html b/erp_web/pages/materials/material_forselect.html index f64e978d..ac29e964 100644 --- a/erp_web/pages/materials/material_forselect.html +++ b/erp_web/pages/materials/material_forselect.html @@ -89,37 +89,7 @@ {title: '品名', field: 'name', width: 150}, {title: '型号', field: 'model', width: 100}, {title: '类别', field: 'categoryName', width: 130}, - {title: '单位', field: 'unit', width: 60}, - { - title: '库存', field: 'abc', width: 70, formatter: function (value, rec) { - var monthTime = getNowFormatMonth(); - var mId = rec.id; //商品id - var thisStock = 0; - //查询库存 - $.ajax({ - type: "get", - url: '/depotItem/findStockNumByMaterialId', - data: { - materialId: mId - }, - dataType: "json", - success: function (res) { - if(res && res.code === 200) { - if (res.data && res.data.page && res.data.page[0]) { - thisStock = res.data.page[0].thisSum - 0; - if (thisStock > 0) { - $("#tableForSelectPanel .class-" + rec.id).text(thisStock); //延迟加载库存数据 - } - } - } - }, - error: function () { - $.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error'); - } - }); - return "" + thisStock + ""; - } - }, + {title: '单位', field: 'unit', width: 60} ]], toolbar: [ ], diff --git a/erp_web/pages/materials/materialcategory_forselect.html b/erp_web/pages/materials/materialcategory_forselect.html index 6e6f1427..39c365d7 100644 --- a/erp_web/pages/materials/materialcategory_forselect.html +++ b/erp_web/pages/materials/materialcategory_forselect.html @@ -46,21 +46,8 @@ function forSelectMaterialCategory(node) { console.log(node); - if(clickType) { - if(clickType == "selectBtn") { - $("#searchParentName").val(node.text); - $("#searchParentId").val(node.id); - types = ""; - initMCData(node.id); - } else if(clickType == "editBtn") { - $("#parentName").val(node.text); - $("#parentid").val(node.id); - } - } - else { - $("#parentName").val(node.text); - $("#parentid").val(node.id); - } + $("#parentName").val(node.text); + $("#parentid").val(node.id); $('#forSelectMaterialCategoryDlg').dialog('close'); } }); diff --git a/src/main/resources/mapper_xml/DepotItemMapperEx.xml b/src/main/resources/mapper_xml/DepotItemMapperEx.xml index b803cce9..4c23405f 100644 --- a/src/main/resources/mapper_xml/DepotItemMapperEx.xml +++ b/src/main/resources/mapper_xml/DepotItemMapperEx.xml @@ -149,7 +149,7 @@ and ifnull(delete_Flag,'0') !='1' - select ifnull(sum(BasicNumber),0) as BasicNumber from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId and ifnull(di.delete_Flag,'0') !='1' where dh.type='入库' @@ -157,7 +157,7 @@ and ifnull(dh.delete_Flag,'0') !='1' - select ifnull(sum(BasicNumber),0) as BasicNumber from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId and ifnull(di.delete_Flag,'0') !='1' where dh.type='出库' diff --git a/src/main/resources/mapper_xml/MaterialMapperEx.xml b/src/main/resources/mapper_xml/MaterialMapperEx.xml index cd008d63..6345177c 100644 --- a/src/main/resources/mapper_xml/MaterialMapperEx.xml +++ b/src/main/resources/mapper_xml/MaterialMapperEx.xml @@ -24,8 +24,11 @@ and m.model like #{model} - - and m.CategoryId in (#{categoryIds}) + + and m.CategoryId in + + #{did} + and ifnull(m.delete_Flag,'0') !='1' order by m.id asc @@ -49,8 +52,11 @@ and m.model like #{model} - - and m.CategoryId in (#{categoryIds}) + + and m.CategoryId in + + #{did} + and ifnull(m.delete_Flag,'0') !='1' @@ -108,8 +114,11 @@ and m.model like #{model} - - and m.CategoryId in (#{categoryIds}) + + and m.CategoryId in + + #{did} + and ifnull(m.delete_Flag,'0') !='1' order by m.id asc