From a277dab32b0a6aa19b4f977fa6c352d008bce214 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Wed, 13 Nov 2024 18:17:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=98=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../choose_inventory_count_fit_type_list.js | 61 ++++++++++--------- js/accessory/child/inventory_count_form.js | 37 +---------- js/accessory/inventory_count_list.js | 27 ++++---- .../choose_inventory_count_fit_type_list.html | 8 --- .../accessory/child/inventory_count_form.html | 28 ++++++--- 5 files changed, 69 insertions(+), 92 deletions(-) diff --git a/js/accessory/child/choose_inventory_count_fit_type_list.js b/js/accessory/child/choose_inventory_count_fit_type_list.js index 15b4577..98b71d1 100644 --- a/js/accessory/child/choose_inventory_count_fit_type_list.js +++ b/js/accessory/child/choose_inventory_count_fit_type_list.js @@ -4,8 +4,7 @@ let pageNum = 1; let quanju = new Array();//全局 let huancun = new Array();//缓存 let huancunObj = new Array();//缓存2 -let cjList = []; -let jjDetailArr = []; // 入库配件类型数据 +let jjDetailArr = []; // 盘点数据 function setParams(obj) { objParam = JSON.parse(obj); console.log(objParam); @@ -15,26 +14,10 @@ function setParams(obj) { element = layui.element; layer = layui.layer; util = layui.util; - getVendList(); initTable(); }); } -// 厂家下拉选 -function getVendList() { - cjList.splice(0, cjList.length); - let encryptedData = {}; - let url = dataUrl + 'backstage/paType/getVendList?encryptedData=' + encodeURIComponent(JSON.stringify(encryptedData)); - ajaxRequest(url, "GET", null, false, function () { - }, function (result) { - console.log(result); - if (result.code === 200) { - cjList = result.data; - } - }, function (xhr, status, error) { - errorFn(xhr, status, error) - }, null); -} // 查询/重置 function queryTable(type) { @@ -121,25 +104,32 @@ function initTable() { }, { field: "type", - width: '11.8%', + width: '8%', title: "配件类型", unresize: true, align: "center", }, { field: "name", - width: '12%', + width: '8%', title: "配件名称", unresize: true, align: "center", }, { field: "model", - width: '10%', + width: '8%', title: "规格型号", unresize: true, align: "center", }, + { + field: "unit", + title: "平均单价(元)", + width: '9%', + unresize: true, + align: "center", + }, { field: "unit", title: "单位", @@ -147,10 +137,20 @@ function initTable() { unresize: true, align: "center", }, + { + field: "unit", + title: "库存量", + width: '8%', + unresize: true, + align: "center", + templet: function (d) { + return '1'; + }, + }, { field: "num", width: '10%', - title: " * 本次入库量", + title: " * 本次盘点量", unresize: true, align: "center", edit: 'text', @@ -158,24 +158,25 @@ function initTable() { }, { field: "price", - width: '9.8%', - title: "单价(元)", + width: '10%', + title: " * 盘盈量", unresize: true, align: "center", edit: 'text', style: 'outline: 1px solid #e6e6e6;outline-offset: -5px;' }, { - field: "manufacturer", - width: '15%', - title: " * 配件厂家", + field: " * price", + width: '10%', + title: "盘亏量", unresize: true, align: "center", - templet: '#TPL-select-demo' + edit: 'text', + style: 'outline: 1px solid #e6e6e6;outline-offset: -5px;' }, { field: "remarks", - width: '12%', + width: '10%', title: "备注", unresize: true, align: "center", @@ -369,7 +370,7 @@ function addFitTypeData() { openIframeByParamObj2("add_fit_type_data", "配件类型", "../../../page/basic/fit_type_list.html", "92%", "95%", {}); } -function closePage(type,params) { +function closePage(type, params) { let index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe层的索引 parent.layer.close(index); // 再执行关闭 if (type == 1) { diff --git a/js/accessory/child/inventory_count_form.js b/js/accessory/child/inventory_count_form.js index 7c37507..2a2dd6f 100644 --- a/js/accessory/child/inventory_count_form.js +++ b/js/accessory/child/inventory_count_form.js @@ -2,7 +2,6 @@ let idParam, objParam, fileList = new Array(), imgListUp = new Array(); let form, laydate, layer, upload, table, util; let pageNum = 1, tableIns; // 定义分页 let jjDataArr = []; // 入库配件数据 -let cjList = []; // 厂家下拉选 let delIdArr = []; function setParams(obj) { objParam = JSON.parse(obj); @@ -54,7 +53,6 @@ function setParams(obj) { }); } }); - getVendList(); }); } // 设置文件类型 @@ -290,7 +288,9 @@ function setTableData(results) { html += "