diff --git a/index.html b/index.html index 5ceaac7..9f60fa5 100644 --- a/index.html +++ b/index.html @@ -176,7 +176,8 @@ let login_url = dataUrl + 'login/userLogin' const params = { "username": 'bns', - "password": '3NBzZK7qxhMhrmvi63FnuQ==', + // "password": '3NBzZK7qxhMhrmvi63FnuQ==', + "password": '1769fb2837e10e9d22c1c25add76355a', } ajaxRequest(login_url, "POST", params, true, function () { }, function (result) { diff --git a/js/accessory/child/accessory_return_form.js b/js/accessory/child/accessory_return_form.js index f9856ec..2d2179d 100644 --- a/js/accessory/child/accessory_return_form.js +++ b/js/accessory/child/accessory_return_form.js @@ -378,7 +378,7 @@ function sel(selectStatus, that, id) { $(that).prop('checked', false); for (let i = 0; i < delIdArr.length; i++) { if (delIdArr[i] == id) { - arr.splice(i, 1); + delIdArr.splice(i, 1); break; } } diff --git a/js/accessory/child/accessory_scrap_form.js b/js/accessory/child/accessory_scrap_form.js index 4d4f4b3..7401509 100644 --- a/js/accessory/child/accessory_scrap_form.js +++ b/js/accessory/child/accessory_scrap_form.js @@ -352,7 +352,7 @@ function sel(selectStatus, that, id) { $(that).prop('checked', false); for (let i = 0; i < delIdArr.length; i++) { if (delIdArr[i] == id) { - arr.splice(i, 1); + delIdArr.splice(i, 1); break; } } diff --git a/js/accessory/child/accessory_store_form.js b/js/accessory/child/accessory_store_form.js index 4322829..ffc77fe 100644 --- a/js/accessory/child/accessory_store_form.js +++ b/js/accessory/child/accessory_store_form.js @@ -378,7 +378,7 @@ function sel(selectStatus, that, id) { $(that).prop('checked', false); for (let i = 0; i < delIdArr.length; i++) { if (delIdArr[i] == id) { - arr.splice(i, 1); + delIdArr.splice(i, 1); break; } } 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 2b16640..0d2afa7 100644 --- a/js/accessory/child/choose_inventory_count_fit_type_list.js +++ b/js/accessory/child/choose_inventory_count_fit_type_list.js @@ -124,7 +124,7 @@ function initTable() { align: "center", }, { - field: "unit", + field: "price", title: "平均单价(元)", width: '9%', unresize: true, @@ -163,7 +163,7 @@ function initTable() { unresize: true, align: "center", // edit: 'text', - style: 'outline: 1px solid #e6e6e6;outline-offset: -5px;' + // style: 'outline: 1px solid #e6e6e6;outline-offset: -5px;' }, { field: "subNum", @@ -172,7 +172,7 @@ function initTable() { unresize: true, align: "center", // edit: 'text', - style: 'outline: 1px solid #e6e6e6;outline-offset: -5px;' + // style: 'outline: 1px solid #e6e6e6;outline-offset: -5px;' }, { field: "remarks", diff --git a/js/accessory/child/inventory_count_form.js b/js/accessory/child/inventory_count_form.js index 2a2dd6f..cf268a3 100644 --- a/js/accessory/child/inventory_count_form.js +++ b/js/accessory/child/inventory_count_form.js @@ -14,7 +14,7 @@ function setParams(obj) { util = layui.util; laydate.render({ elem: '#ID-laydate-rangeLinked', - range: ['#startDay', '#endDay'], + range: ['#startTime', '#endTime'], rangeLinked: true }); form.verify(); @@ -34,7 +34,7 @@ function setParams(obj) { bindAction: '#hideUpload', //绑定的按钮 choose: function (obj) { let length = $('.file-iteme').length; - if(length >= 5){ + if (length >= 5) { return layer.msg('最多上传5个附件证明', { icon: 7 }); } uploadObj.config.elem.next()[0].value = ''; @@ -119,15 +119,14 @@ function submitApply(data) { } // 校验配件入库数量 if (list.length === 0) { - return layer.msg('未填写配件入库数量', { icon: 7 }); + return layer.msg('未添加盘点明细数据', { icon: 7 }); } for (let i = 0; i < list.length; i++) { - - if (!list[i].inputNum || list[i].inputNum === '0') { - return layer.msg('入库配件明细,第' + (i + 1) + '行,未填写配件入库数量', { icon: 7 }); + if (list[i].checkNum === 0) { + return layer.msg('盘点明细,第' + (i + 1) + '行,未填写本次盘点量', { icon: 7 }); } } - data.field.details = list; + data.field.detailList = list; let formData = new FormData(); //遍历最终文件集合 for (let i = 0; i < fileList.length; i++) { @@ -137,7 +136,7 @@ function submitApply(data) { console.log(JSON.stringify(data.field)); 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/partCheck/insertCheckData'; ajaxRequestByUploadFile(url, formData, function () { $('.save').addClass("layui-btn-disabled").attr("disabled", true); $('.cancel').addClass("layui-btn-disabled").attr("disabled", true); @@ -165,19 +164,19 @@ function submitApply(data) { function getBaseTableData() { let tableData = []; $('#baseTable tbody tr').each(function (index, item) { - let price = $(this).find('td').eq(7).find('input[name="price"]').val(); - let num = $(this).find('td').eq(6).find('input[name="num"]').val(); + let checkNum = $(this).find('td').eq(8).find('input[name="checkNum"]').val(); tableData.push({ partId: $(this).attr('id'), partType: $(this).find('td').eq(2).html(), partName: $(this).find('td').eq(3).html(), partModel: $(this).find('td').eq(4).html(), - partUnit: $(this).find('td').eq(5).html(), - 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(), + price: $(this).find('td').eq(5).html(), + partUnit: $(this).find('td').eq(6).html(), + num: $(this).find('td').eq(7).html(), + checkNum: checkNum ? checkNum : 0, + addNum: $(this).find('td').eq(9).html(), + subNum: $(this).find('td').eq(10).html(), + remark: $(this).find('td').eq(11).find('input[name="remarks"]').val(), }) }) return tableData; @@ -288,31 +287,46 @@ function setTableData(results) { html += "
盘盈:653
-¥ 15,653
+盘盈:653
+¥ 0
盘亏:120
-¥ 12,120
+盘亏:120
+¥ 0