+
发货明细
+| + + | +序号 | +类型 | +名称 | +规格 | +单位 | +需要量 | +*采购量 | +*利库量 | +*供应商 | +*出厂日期 | +*检验日期 | +备注 | +
|---|
From 4f7d815a46801def3a73f5b40c827c9fe8829f9b Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Mon, 24 Mar 2025 14:45:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=8F=91=E8=B4=A7=E5=8A=A0?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=8F=91=E8=B4=A7=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/aq_demand_plan/child/choose_type_list.js | 2 +- .../child/send_out_form_device.js | 423 ++++++++++++++++++ .../child/send_out_pro_detail.js | 10 +- js/xlsx.full.min.js | 22 + .../child/send_out_form_device.html | 120 +++++ 5 files changed, 575 insertions(+), 2 deletions(-) create mode 100644 js/aq_demand_plan/child/send_out_form_device.js create mode 100644 js/xlsx.full.min.js create mode 100644 page/aq_demand_plan/child/send_out_form_device.html diff --git a/js/aq_demand_plan/child/choose_type_list.js b/js/aq_demand_plan/child/choose_type_list.js index 8362487..3818e42 100644 --- a/js/aq_demand_plan/child/choose_type_list.js +++ b/js/aq_demand_plan/child/choose_type_list.js @@ -388,7 +388,7 @@ function importExcel() { } formData.append("file[]", $("#articleImageFile")[0].files[0]); let loadingMsg = layer.msg('正在提交,请稍等...', { icon: 16, shade: 0.01, time: '0' }); - let url = dataUrlDevice + "backstage/planApply/importExcelTools"; + let url = dataUrl + "backstage/planApply/importExcelTools"; ajaxRequestByUploadFile(url, formData, function () { $('.save').addClass("layui-btn-disabled").attr("disabled", true); $('.cancel').addClass("layui-btn-disabled").attr("disabled", true); diff --git a/js/aq_demand_plan/child/send_out_form_device.js b/js/aq_demand_plan/child/send_out_form_device.js new file mode 100644 index 0000000..5ad36af --- /dev/null +++ b/js/aq_demand_plan/child/send_out_form_device.js @@ -0,0 +1,423 @@ +let objParam, dataObj, fileList = new Array(), imgListUp = new Array(); +let form, laydate, layer, upload, table, util; +let pageNum = 1, tableIns; // 定义分页 +let supplierList = []; // 供应商下拉选 +function setParams(obj) { + objParam = JSON.parse(obj); + console.error(objParam); + $('#proName').html(objParam.proName); + layui.use(['form', 'layer', 'laydate', 'upload', 'table'], function () { + form = layui.form; + layer = layui.layer; + laydate = layui.laydate; + upload = layui.upload; + table = layui.table; + util = layui.util; + var userData = JSON.parse(sessionStorage.getItem("us")); + $('#jbUser').val(userData.username); + laydate.render({ + elem: '#fhDay' + }); + laydate.render({ + elem: '.cjDate' + }); + laydate.render({ + elem: '.jyDate' + }); + form.verify(); + form.on('submit(formData)', function (data) { + // 提交前确认 + beforeSubmitApply(data); + }); + form.render(); + form.on('select(supplier)', function (data) { + if (data.value) { + let value = $(data.elem).val(); + let item = JSON.parse($(data.elem).find('option:checked').attr('item')); + let modelId = $(data.elem).find('option:checked').attr('modelId'); + // 安全工器具类型、合同ID、厂家ID 进行校验 + let flag = supCheck(modelId, item.contractId, value); + if (!flag) { + $(data.elem).val(''); + return layer.msg('该厂家合同无此工器具,请重新选择', { icon: 7 }); + } + $('.supplier' + modelId + '').each(function (index, item) { + let id = $(this).find('option:checked').val(); + if (id && id === value && !($(data.elem).is($(this)))) { + $(data.elem).val(''); + return layer.msg('请勿重复选择供应商', { icon: 7 }); + } + }) + } + }); + let uploadObj = upload.render({ + elem: '#test2', + multiple: true, + dataType: "json", + exts: 'jpg|png|jpeg|doc|docx|pdf|xlsx|xls', + acceptMime: 'image/jpg,image/png,image/jpeg,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + number: 5, //最大上传数量 + size: 1024 * 10, //最大文件大小,单位k + auto: false, //是否自动上传 ,默认为true + bindAction: '#hideUpload', //绑定的按钮 + choose: function (obj) { + let length = $('.file-iteme').length; + if (length >= 5) { + return layer.msg('最多上传5个发货附件', { icon: 7 }); + } + uploadObj.config.elem.next()[0].value = ''; + let num = 0; + obj.preview(function (index, file, result) { + num ++; + if(num <= (5-length)){ + $('#uploader-list').append( + '
x
' + file.name + '
' + + '发货明细
+| + + | +序号 | +类型 | +名称 | +规格 | +单位 | +需要量 | +*采购量 | +*利库量 | +*供应商 | +*出厂日期 | +*检验日期 | +备注 | +
|---|