From dbdb3b06211f29e203c4d641011c16852768869d Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Wed, 13 Nov 2024 11:10:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E4=BB=B6=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/accessory/child/accessory_store_detail.js | 34 ++++++++++--------- .../child/accessory_store_edit_form.js | 6 ++-- .../child/accessory_store_detail.html | 6 ++-- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/js/accessory/child/accessory_store_detail.js b/js/accessory/child/accessory_store_detail.js index ccd3492..8913926 100644 --- a/js/accessory/child/accessory_store_detail.js +++ b/js/accessory/child/accessory_store_detail.js @@ -13,7 +13,7 @@ function setParams(params) { element = layui.element; layer = layui.layer; getInputDetails(); - // initTable(); + initTable(); }); } @@ -90,8 +90,9 @@ function queryTable(type) { if (type === 1) { reloadTable(1); } else if (type === 2) { + $('#type').val(''); $('#name').val(''); - $('#module').val(''); + $('#model').val(''); layui.form.render(); reloadTable(1); } @@ -110,10 +111,10 @@ function reloadTable(pageNum) { }, where: { encryptedData: JSON.stringify({ + 'type': $('#type').val(), 'name': $('#name').val(), - 'module': $('#module').val(), - 'proId': objParam.proId, - 'id': id + 'model': $('#model').val(), + 'id': objParam.id }), }, }, @@ -129,12 +130,13 @@ function initTable() { authorization: sessionStorage.getItem("gz-token"), }, height: "full", - url: dataUrl + "backstage/planOut/getOutDetailList", + url: dataUrl + "backstage/partInput/getInputDetailListByPage", where: { encryptedData: JSON.stringify({ + 'type': $('#type').val(), 'name': $('#name').val(), - 'module': $('#module').val(), - 'id': id + 'model': $('#model').val(), + 'id': objParam.id }), }, request: { @@ -160,56 +162,56 @@ function initTable() { }, }, { - field: "type", + field: "partType", width: '10%', title: "配件类型", unresize: true, align: "center", }, { - field: "name", + field: "partName", width: '10%', title: "配件名称", unresize: true, align: "center", }, { - field: "model", + field: "partModel", title: "规格型号", width: '10%', unresize: true, align: "center", }, { - field: "unit", + field: "partUnit", title: "单位", width: '10%', unresize: true, align: "center", }, { - field: "needNum", + field: "inputNum", title: "入库量", width: '10%', unresize: true, align: "center", }, { - field: "fhNum", + field: "partPrice", width: '10%', title: "单价(元)", unresize: true, align: "center", }, { - field: "tzNum", + field: "vendName", width: '15%', title: "配件厂家", unresize: true, align: "center", }, { - field: "remarks", + field: "remark", title: "备注", width: '17%', align: "center", diff --git a/js/accessory/child/accessory_store_edit_form.js b/js/accessory/child/accessory_store_edit_form.js index 9fa9fe7..d007ecb 100644 --- a/js/accessory/child/accessory_store_edit_form.js +++ b/js/accessory/child/accessory_store_edit_form.js @@ -200,9 +200,9 @@ function submitApply(data) { } formData.append('params', JSON.stringify(data.field)); console.log(JSON.stringify(data.field)); - /* let loadingMsg = layer.msg('正在提交保存,请稍等...', { icon: 16, shade: 0.01, time: '0' }); + let loadingMsg = layer.msg('正在提交保存,请稍等...', { icon: 16, shade: 0.01, time: '0' }); console.log(JSON.stringify(data.field)); - let url = dataUrl + 'backstage/partInput/addInputData'; + let url = dataUrl + 'backstage/partInput/updateInputData'; ajaxRequestByUploadFile(url, formData, function () { $('.save').addClass("layui-btn-disabled").attr("disabled", true); $('.cancel').addClass("layui-btn-disabled").attr("disabled", true); @@ -223,7 +223,7 @@ function submitApply(data) { $('.save').removeClass("layui-btn-disabled").attr("disabled", false); $('.cancel').removeClass("layui-btn-disabled").attr("disabled", false); errorFn(xhr, status, error) - }, null); */ + }, null); } // 获取入库配件明细数据 diff --git a/page/accessory/child/accessory_store_detail.html b/page/accessory/child/accessory_store_detail.html index 9c72a74..dd8a583 100644 --- a/page/accessory/child/accessory_store_detail.html +++ b/page/accessory/child/accessory_store_detail.html @@ -106,20 +106,20 @@
-
-
-