From 66901d0528df33269de877f54051112368496f30 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Wed, 13 Nov 2024 09:50:06 +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 --- .../child/accessory_store_edit_form.js | 50 ++++++++++++++----- js/accessory/child/accessory_store_form.js | 1 + .../child/accessory_store_edit_form.html | 9 ---- 3 files changed, 39 insertions(+), 21 deletions(-) diff --git a/js/accessory/child/accessory_store_edit_form.js b/js/accessory/child/accessory_store_edit_form.js index b5e7e86..aacf84d 100644 --- a/js/accessory/child/accessory_store_edit_form.js +++ b/js/accessory/child/accessory_store_edit_form.js @@ -52,6 +52,44 @@ function setParams(obj) { }); getVendList(); } + +// 获取配件到货入库详情 +function getInputDetails() { + let params = { + encryptedData: JSON.stringify({ + 'id': objParam.id + }) + }; + let url = dataUrl + 'backstage/partInput/getInputDetails'; + ajaxRequest(url, "POST", params, true, function () { + }, function (result) { + console.error(result); + if (result.code === 200) { + + } else { + } + }, function (xhr, status, error) { + errorFn(xhr, status, error) + }, null); +} + +// 获取入库配件表格明细 +function getInputDetailList() { + let encryptedData = { + 'id': objParam.id, + }; + let url = dataUrl + 'backstage/partInput/getInputDetailList?encryptedData=' + encodeURIComponent(JSON.stringify(encryptedData)); + ajaxRequest(url, "GET", null, true, function () { + }, function (result) { + console.log(result); + if (result.code === 200) { + + } + }, function (xhr, status, error) { + errorFn(xhr, status, error) + }, null); +} + // 设置文件类型 function handleFileType(index, file, result) { let html = '', img = ''; @@ -90,18 +128,6 @@ $(document).on("click", ".file-iteme .handle", function (event) { }); }); - -// 根据id 判断对象数组的对象是否存在 如果存在则替换,不存在则添加 -function updateOrAddObject(id, newObject) { - const index = jjDetailArr.findIndex(obj => obj.id === id); - if (index !== -1) { - // 如果对象存在,则替换它 - jjDetailArr[index] = newObject; - } else { - // 如果对象不存在,则添加到数组 - jjDetailArr.push(newObject); - } -} function saveData2() { $('#formSubmit').trigger('click') } diff --git a/js/accessory/child/accessory_store_form.js b/js/accessory/child/accessory_store_form.js index b5e7e86..a3ecdad 100644 --- a/js/accessory/child/accessory_store_form.js +++ b/js/accessory/child/accessory_store_form.js @@ -185,6 +185,7 @@ function getBaseTableData() { inputNum: num ? num : 0, partPrice: price ? price : 0, vendId: $(this).find('td').eq(8).find('select[name="manufacturer"]').val(), + vendName: $(this).find('td').eq(8).find('select[name="manufacturer"]').find('option:checked').text(), remark: $(this).find('td').eq(9).find('input[name="remarks"]').val(), }) }) diff --git a/page/accessory/child/accessory_store_edit_form.html b/page/accessory/child/accessory_store_edit_form.html index 3894365..50b0c67 100644 --- a/page/accessory/child/accessory_store_edit_form.html +++ b/page/accessory/child/accessory_store_edit_form.html @@ -57,13 +57,6 @@

入库配件明细

- -
- 无数据 -

您还没选择入库配件类型

-

需要添加配件类型后才能执行入库操作

- -