From e683065b0c3552e56222ea7f18486279cfb3c5e7 Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Tue, 9 Jul 2024 21:04:55 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E4=BF=AE=E5=A4=8D:=20=E9=94=80=E5=94=AE?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=8B=92=E7=BB=9D=E7=94=B3=E8=AF=B7=E5=90=8E?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=AE=A1=E8=AF=B7=E3=80=82=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9A=84=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SysSalesOrderController.java | 4 +- .../ruoyi/system/domain/SysSalesOrder.java | 10 +- .../ruoyi/system/domain/SysSalesOrderVo.java | 1 + .../mapper/system/SysSalesOrderMapper.xml | 6 +- .../templates/system/salesOrder/add.html | 7 +- .../system/salesOrder/taskModifyApply.html | 172 +++++++----------- .../system/salesOrder/taskYwjlVerify.html | 58 ++---- .../system/salesOrder/taskYwzgVerify.html | 79 ++------ .../system/salesOrder/taskZozjVerify.html | 88 ++------- 9 files changed, 125 insertions(+), 300 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java index ed2aa5ee..3caf45fe 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java @@ -517,9 +517,9 @@ public class SysSalesOrderController extends BaseController } @GetMapping("/getBinessMembers") @ResponseBody - public TableDataInfo getBinessMembers(){ + public TableDataInfo getBusinessMembers(){ startPage(); - List list = sysUserService.selectRoleToUserList("ywyRole,ywjlRole,ywzgRole"); + List list = sysUserService.selectRoleToUserList("ywyRole,ywjlRole,ywzgRole,zozjRole,admin"); return getDataTable(list); } } \ No newline at end of file diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java index 098637d0..bfc77b27 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java @@ -20,15 +20,15 @@ public class SysSalesOrder extends BaseEntity { /* 订单id*/ private Long salesOrderId; - /*使用状态*/ + /*使用状态 0未使用,1使用,2已作废*/ private String useStatus; - /*审核状态*/ + /*审核状态 (0未审核,1审核通过,2审核拒绝)*/ private String auditStatus; - /*出货状态*/ + /*出货状态(0待出货通知,1待准备货,2待出货,3部分收货,4全部收货,5部分出货,6全部出货,7部分验收,8全部验收)*/ private String deliveryStatus; - /*收款结案状态*/ + /*收款结案状态(0待收款,1部分收款,2全部收款,3已结案)*/ private String closeStatus; - /*生产状态*/ + /**生产状态(0待评审、1待部门主管确认、2待工程审核、3待生产、4生产中、5部分完成、6全部完成)*/ private String makeStatus; /* 订单编号*/ @Excel(name = "销售订单编号") diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrderVo.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrderVo.java index 925ccf13..21e058c9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrderVo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrderVo.java @@ -20,6 +20,7 @@ public class SysSalesOrderVo extends SysSalesOrder{ /** 流程实例类型名称 */ private String instanceTypeName; + /** * 关键词 */ diff --git a/ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml index 47730301..478ebe5e 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml @@ -36,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -79,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" common_currency,enterprise_name, material_sum, enterprise_sum, noRmbPrice, noRmbSum, rmbPrice, rmbTaxSum,noUsdPrice, noUsdSum, usdPrice, usdTaxSum, payment_terms, delivery_time, delivery_conditions, delivery_method, delivery_address,delivery_phone,customer_delivery, - order_receiving_mode,customer_contact, contact_number,contact_email, contact_post, + order_receiving_mode,order_receiving_time,customer_contact, contact_number,contact_email, contact_post, customer_fax, business_members, confirm_tax, tax_rate,usd_tax,invoice,total_amount, modification_time,standby_one,standby_two, first_add_time, update_info_time, file_upload, create_by, create_time, update_by, update_time,trade_clause, remark, out_bound_quantity, @@ -94,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" s.customer_purser,s.common_currency,s.enterprise_name, s.material_sum, s.enterprise_sum, s.noRmbPrice, s.noRmbSum, s.rmbPrice, s.rmbTaxSum,s.noUsdPrice, s.noUsdSum, s.usdPrice, s.usdTaxSum, s.payment_terms, s.delivery_time,s.delivery_conditions, s.delivery_method, s.delivery_address,s.delivery_phone, - s.customer_delivery,s.order_receiving_mode,s.customer_contact, s.contact_number,s.contact_email, s.contact_post, + s.customer_delivery,s.order_receiving_mode,s.order_receiving_time,s.customer_contact, s.contact_number,s.contact_email, s.contact_post, s.customer_fax,s.business_members, s.confirm_tax, s.tax_rate, s.usd_tax,s.invoice,s.total_amount, s.billing_time, s.modification_time,s.standby_one,s.standby_two, s.first_add_time,s.update_info_time, s.file_upload, s.create_by, s.create_time, s.update_by, s.update_time, s.remark,s.out_bound_quantity, s.un_bound_quantity, s.trade_clause, @@ -390,7 +391,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" apply_time = #{applyTime}, apply_title = #{applyTitle}, update_time = #{updateTime}, - update_info_time = now() where sales_order_code = #{salesOrderCode} diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html index b3c6cc37..27dbf13e 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html @@ -317,6 +317,7 @@ var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]]; var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; + var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]]; var prefix = ctx + "system/salesOrder" $(function() { var options = { @@ -324,6 +325,8 @@ pagination: false, sidePagination: "client", model: "物料报价信息", + fixedColumns: true, // 启用冻结列 + fixedRightNumber: 1, // 冻结右列个数 columns: [ {checkbox: true}, {field: 'index',align: 'center', title: "序号", @@ -340,7 +343,9 @@ {title: '品牌',field: 'brand',align: 'center'}, { title: '单位',field: 'unit',align: 'center', formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);}}, { title: '入库部门',field: 'warehouseDept',align: 'center', - formatter: function(value, row, index) {} + formatter: function(value, row, index) { + + } }, {title: '半成品类型',field: 'processMethod',align: 'center',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}}, { title: '对外售价',field: 'materialSole',editable: true}, diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskModifyApply.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskModifyApply.html index e67db420..c68303e5 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskModifyApply.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskModifyApply.html @@ -12,7 +12,7 @@
-
+ @@ -20,6 +20,7 @@ +
@@ -74,8 +75,9 @@
- - +
@@ -99,7 +101,7 @@
-
@@ -118,13 +120,13 @@
- +
-
@@ -133,7 +135,7 @@
- +
@@ -156,14 +158,14 @@
- +
-
@@ -216,8 +218,8 @@
- - + +
@@ -237,8 +239,7 @@
- +
@@ -279,19 +280,24 @@
-
+
选择报价信息 + + 添加物料 +
+
@@ -313,24 +319,12 @@ var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]]; - var sysSalesOrder = [[${formData}]]; - $("#form-modfify-audit").validate({onkeyup: false,rules:{},messages: {}, focusCleanup: true}); + var salesOrderCode = [[${formData.salesOrderCode}]]; + var customerContact = [[${formData.customerContact}]]; + var customerDelivery = [[${formData.customerDelivery}]]; + var enterpriseCode = [[${formData.enterpriseCode}]]; + $("#form-modify-audit").validate({onkeyup: false,rules:{},messages: {}, focusCleanup: true}); - function submitHandler() { - if ($.validate.form()) { - var taskId = [[${taskId}]]; - $.operate.save(prefix + "/complete/" + taskId, $('#form-modfify-audit').serialize()); - } - } - $("#form-modfify-audit").validate({focusCleanup: true}); - var prefix = ctx + "system/salesOrder"; - var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]]; - var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; - var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; - var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; - var processMethodDatas = [[${@dict.getType('processMethod')}]]; - var sysSalesOrder = [[${formData}]]; - $("#form-modfify-audit").validate({focusCleanup: true}); $(function() { var options = { id:'bootstrap-sub-table-editOrder4', @@ -341,10 +335,9 @@ model: "物料报价信息", columns: [ {checkbox: true}, - {field: 'index',align: 'center', title: "序号", + {field: 'materialIndex',align: 'center', title: "序号", formatter: function (value, row, index) { - var columnIndex = $.common.sprintf("", $.table.serialNumber(index)); - return columnIndex + $.table.serialNumber(index); + return $.table.serialNumber(index); } }, {title: '物料索引id',field: 'materialId',align: 'center',visible: false}, @@ -418,7 +411,7 @@ {title: '操作', align: 'center', formatter: function (value, row, index) { var actions = []; - actions.push('删除 '); + actions.push('删除 '); return actions.join(''); } } @@ -462,25 +455,6 @@ }, }; $.table.init(options); - $.ajax({ - type: "post", - url:ctx + "system/customer/customerList", - dataType:"json", - delay:250, - cache:true, - success: function (res, params) { - if (res.rows.length > 0) { - var result = res.rows; - for (let i in result) { - $("#form-modfify-audit select[name='enterpriseCode']").append( - ""); - } - $("#form-modfify-audit select[name='enterpriseCode']").val(sysSalesOrder.enterpriseCode).trigger("change"); - } else { - $.modal.msgError(res.msg); - } - }, - }); $.ajax({ type: "post", url:ctx + "system/customer/shippingList", @@ -488,16 +462,16 @@ delay:250, cache:true, data:{ - enterpriseCode:sysSalesOrder.enterpriseCode, + enterpriseCode:enterpriseCode, }, success: function (res, params) { if (res.rows.length > 0) { var result = res.rows; for (let i in result) { - $("#form-modfify-audit select[name='customerDelivery']").append( + $("#form-modify-audit select[name='customerDelivery']").append( ""); } - $("#form-modfify-audit select[name='customerDelivery']").val(sysSalesOrder.customerDelivery).trigger() + $("#form-modify-audit select[name='customerDelivery']").val(customerDelivery).trigger("change"); } } }); @@ -508,42 +482,22 @@ delay:250, cache:true, data:{ - enterpriseCode:sysSalesOrder.enterpriseCode, + enterpriseCode:enterpriseCode, }, success: function (res, params) { if (res.rows.length > 0) { var result = res.rows; for (let i in result) { - $("#form-modfify-audit select[name='customerContact']").append( + $("#form-modify-audit select[name='customerContact']").append( ""); } - $("#form-modfify-audit select[name='customerContact']").val(sysSalesOrder.customerContact).trigger("change"); + $("#form-modify-audit select[name='customerContact']").val(customerContact).trigger("change"); } else { $.modal.msgError(res.msg); } }, }); - $("#enterprise_edit").val(sysSalesOrder.enterprise); - $("#enterpriseSum_edit").val(sysSalesOrder.enterpriseSum); - $("#noRmb_edit").val(sysSalesOrder.noRmb); - $("#rmb_edit").val(sysSalesOrder.rmb); - $("#noRmbSum_edit").val(sysSalesOrder.noRmbSum); - $("#rmbTax_edit").val(sysSalesOrder.rmbSum); - $("#noUsd_edit").val(sysSalesOrder.noUsd); - $("#usd_edit").val(sysSalesOrder.usd); - $("#noUsdSum_edit").val(sysSalesOrder.noUsdSum); - $("#usdSum_edit").val(sysSalesOrder.usdSum); - binessMembers(); - }); - $('#enterpriseCode_edit').on('select2:select', function (e) { - var data = e.params.data; - $("input[name='enterpriseName']").val(data.enterpriseName); - $("input[name='customerPurser']").val(data.customerPurser); - $("input[name='taxRate']").val(data.taxRate); - $("input[name='confirmFax']").val(data.confirmTax); - $("#commonCurrency_add").val(data.commonCurrency).trigger('change'); - commonCurrency = $("#commonCurrency_edit option:selected").val(); - console.log("commonCurrency",commonCurrency); + getBusinessMembers(); }); $('#customerContact_edit').on('select2:select', function (e) { var data = e.params.data; @@ -556,17 +510,17 @@ $("input[name='deliveryPhone']").val(data1.customerPhone); $("input[name='deliveryAddress']").val(data1.deliveryAddress); }); - function binessMembers(){ + function getBusinessMembers(){ $.ajax({ url: ctx + 'system/salesOrder/getBinessMembers', type: 'get', success: function (res) { console.log(res) if (res.rows.length > 0) { - var usertData = res.rows; - for (let i in usertData) { + var userData = res.rows; + for (let i in userData) { $("select[name='businessMembers']").append( - ""); + ""); } } else { $.modal.msgError(res.msg); @@ -579,9 +533,9 @@ // 传递参数查询参数 pageSize: params.limit, pageNum: params.offset / params.limit + 1, - quoteId: sysSalesOrder.salesOrderCode, + quoteId: salesOrderCode }; - curParams.quoteId = sysSalesOrder.salesOrderCode; + curParams.quoteId = salesOrderCode return curParams; } function doSubmit(index, layero,uniqueId){ @@ -642,32 +596,12 @@ $.modal.openOptions(options); } /* 删除指定表格行 */ - function removeRow(index){ + function removeRow(materialId){ $("#bootstrap-sub-table-editOrder4").bootstrapTable('remove', { - field: 'index', - value: index + field: 'materialId', + values: materialId }) } - $("input[name='pricingDate']").datetimepicker({ - format: "yyyy-mm-dd", - minView: "month", - autoclose: true - }); - $("input[name='deliveryTime']").datetimepicker({ - format: "yyyy-mm-dd", - minView: "month", - autoclose: true - }); - $("input[name='orderReceivingTime']").datetimepicker({ - format: "yyyy-mm-dd", - minView: "month", - autoclose: true - }); - $("input[name='modificationTime']").datetimepicker({ - format: "yyyy-mm-dd", - minView: "month", - autoclose: true - }); //计算 function getTotalAmount(){ let getData = $("#bootstrap-sub-table-editOrder4").bootstrapTable('getData'); @@ -727,6 +661,24 @@ minView: "month", autoclose: true }); + + function submitHandler() { + if ($.validate.form()) { + $("#p_B_reApply").val(); + $("#reApply").val() + var taskId = [[${taskId}]]; + var tableData = $("#bootstrap-sub-table-editOrder4").bootstrapTable('getData'); + if (tableData.length === 0) { + $.modal.alertWarning("子表数据不能为空!"); + } else { + // 将子表数据添加到FormData中 + $("#salesOrderChildList_modify").val(JSON.stringify(tableData)); + var formData = $("#form-modify-audit").serialize(); + // 发送请求 + $.operate.save(prefix + "/complete/" + taskId, formData) + } + } + } \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwjlVerify.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwjlVerify.html index 0a5224f6..5e793120 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwjlVerify.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwjlVerify.html @@ -316,7 +316,7 @@ var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]]; - var sysSalesOrderCode = [[${formData.sysSalesOrderCode}]]; + var sysSalesOrderCode = [[${formData.salesOrderCode}]]; $("#form-ywjl-audit").validate({focusCleanup: true}); $(function() { var options = { @@ -374,6 +374,18 @@ }; $.table.init(options); + getBusinessMembers(); + }); + function queryParams(params) { + var curParams = { + // 传递参数查询参数 + pageSize: params.limit, + pageNum: params.offset / params.limit + 1, + quoteId: sysSalesOrderCode + }; + return curParams; + } + function customerInit(){ $.ajax({ type: "post", url:ctx + "system/customer/customerList", @@ -435,50 +447,18 @@ } }, }); - binessMembers(); - getTotalAmount(); - }); - $('#enterpriseCode_edit').on('select2:select', function (e) { - var data = e.params.data; - $("input[name='enterpriseName']").val(data.enterpriseName); - $("input[name='customerPurser']").val(data.customerPurser); - $("input[name='taxRate']").val(data.taxRate); - $("input[name='confirmFax']").val(data.confirmTax); - $("#commonCurrency_add").val(data.commonCurrency).trigger('change'); - commonCurrency = $("#commonCurrency_edit option:selected").val(); - console.log("commonCurrency",commonCurrency); - }); - $('#customerContact_edit').on('select2:select', function (e) { - var data = e.params.data; - $("input[name='contactPost']").val(data.customerPosition); - $("input[name='contactNumber']").val(data.cellPhone); - $("input[name='contactEmail']").val(data.commonEmail); - }); - $('#customerDelivery_edit').on('select2:select', function (e) { - var data1 = e.params.data; - $("input[name='deliveryPhone']").val(data1.customerPhone); - $("input[name='deliveryAddress']").val(data1.deliveryAddress); - }); - function queryParams(params) { - var curParams = { - // 传递参数查询参数 - pageSize: params.limit, - pageNum: params.offset / params.limit + 1, - quoteId: sysSalesOrderCode - }; - return curParams; } - function binessMembers(){ + function getBusinessMembers(){ $.ajax({ url: ctx + 'system/salesOrder/getBinessMembers', type: 'get', success: function (res) { console.log(res) if (res.rows.length > 0) { - var usertData = res.rows; - for (let i in usertData) { + var userData = res.rows; + for (let i in userData) { $("select[name='businessMembers']").append( - ""); + ""); } } else { $.modal.msgError(res.msg); @@ -510,16 +490,12 @@ function submitHandler() { var taskId = [[${taskId}]]; if ($.validate.form()) { - $("select[name='salesOrderType']").removeAttr("disabled"); - $("#selectEngineer").removeAttr("disabled"); - $("#commonCurrency_edit").removeAttr("disabled"); if ($('textarea[name="comment"]').val()) { $('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); } var tableData = $("#bootstrap-sub-table-editOrder1").bootstrapTable('getData'); $("input[name= 'salesOrderChildList']").val(JSON.stringify(tableData)); var formData = $("#form-ywjl-audit").serialize(); - console.log("$(\"#form-ywjl-audit\").serialize()",formData); $.operate.save(prefix + "/complete/" + taskId,formData); } } diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwzgVerify.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwzgVerify.html index 9c511db2..4e1cc319 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwzgVerify.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwzgVerify.html @@ -313,7 +313,10 @@ var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]]; - var sysSalesOrderCode = [[${formData.sysSalesOrderCode}]]; + var sysSalesOrderCode = [[${formData.salesOrderCode}]]; + var customerContact = [[${formData.customerContact}]]; + var customerDelivery = [[${formData.customerDelivery}]]; + var enterpriseCode = [[${formData.enterpriseCode}]]; $("#form-ywzg-audit").validate({focusCleanup: true}); $(function() { var options = { @@ -370,6 +373,9 @@ ], }; $.table.init(options); + getBusinessMembers(); + }); + function customerInit(){ $.ajax({ type: "post", url:ctx + "system/customer/customerList", @@ -431,19 +437,7 @@ } }, }); - binessMembers(); - getTotalAmount(); - }); - $('#enterpriseCode_edit').on('select2:select', function (e) { - var data = e.params.data; - $("input[name='enterpriseName']").val(data.enterpriseName); - $("input[name='customerPurser']").val(data.customerPurser); - $("input[name='taxRate']").val(data.taxRate); - $("input[name='confirmFax']").val(data.confirmTax); - $("#commonCurrency_add").val(data.commonCurrency).trigger('change'); - commonCurrency = $("#commonCurrency_edit option:selected").val(); - console.log("commonCurrency",commonCurrency); - }); + } $('#customerContact_edit').on('select2:select', function (e) { var data = e.params.data; $("input[name='contactPost']").val(data.customerPosition); @@ -464,17 +458,17 @@ }; return curParams; } - function binessMembers(){ + function getBusinessMembers(){ $.ajax({ url: ctx + 'system/salesOrder/getBinessMembers', type: 'get', success: function (res) { console.log(res) if (res.rows.length > 0) { - var usertData = res.rows; - for (let i in usertData) { + var userData = res.rows; + for (let i in userData) { $("select[name='businessMembers']").append( - ""); + ""); } } else { $.modal.msgError(res.msg); @@ -482,55 +476,6 @@ } }); } - function doSubmit(index, layero,uniqueId){ - var iframeWin = window[layero.find('iframe')[0]['name']]; - var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0]; - console.log("rowData:"+rowData); - var totalNum = $("#bootstrap-select-table").bootstrapTable('getData').length; - var commonCurrency1 = $("#commonCurrency_edit option:selected").val(); - var rmbRateInput = parseFloat($("#rmbTax_detail").val()) || 0; - var rmbRate = rmbRateInput / 100; - rmbRate = parseFloat(rmbRate.toFixed(2)); // 确保rmbRate转换为两位小数的浮点数 - var usdRate = parseFloat($("#usdTax_edit").val()) || 0; - $("#bootstrap-sub-table-editOrder2").bootstrapTable('insertRow', { - index: 1, - row: { - id:'', - materialId:rowData.id, - materialCode: rowData.materialNo, - materialName: rowData.materialName, - materialType: rowData.materialType, - describe: rowData.describe, - brand: rowData.brand, - photoUrl: rowData.photoUrl, - unit: rowData.unit, - processMethod: rowData.processMethod, - countTax:rmbRateInput, - usdTax: usdRate, - materialSole: rowData.materialSole, - materialNum: 0, - materialNoRmb: 0.0, - materialNoUsd: 0.0, - materialRmb: 0.0, - materialNoRmbSum: 0.0, - materialRmbSum: 0, - materialUsd: 0.0, - materialUsdSum: 0.0, - materialNoUsdSum: 0.0, - remark: "", - } - }) - layer.close(index); - } - function insertRow() { - var url = ctx + "erp/material/select"; - var options = { - title: '选择料号', - url: url, - callBack: doSubmit - }; - $.modal.openOptions(options); - } /* 删除指定表格行 */ function removeRow(index){ $("#bootstrap-sub-table-editOrder2").bootstrapTable('remove', { diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskZozjVerify.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskZozjVerify.html index 92b65911..4c186484 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskZozjVerify.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskZozjVerify.html @@ -315,7 +315,10 @@ var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]]; - var sysSalesOrderCode = [[${formData.sysSalesOrderCode}]]; + var sysSalesOrderCode = [[${formData.salesOrderCode}]]; + var customerContact = [[${formData.customerContact}]]; + var customerDelivery = [[${formData.customerDelivery}]]; + var enterpriseCode = [[${formData.enterpriseCode}]]; $(function() { var options = { id:'bootstrap-sub-table-editOrder3', @@ -371,6 +374,9 @@ ], }; $.table.init(options); + getBusinessMembers(); + }); + function customerInit(){ $.ajax({ type: "post", url:ctx + "system/customer/customerList", @@ -384,7 +390,7 @@ $("#form-ywzg-audit select[name='enterpriseCode']").append( ""); } - $("#form-ywzg-audit select[name='enterpriseCode']").val(sysSalesOrder.enterpriseCode).trigger("change"); + $("#form-ywzg-audit select[name='enterpriseCode']").val(enterpriseCode).trigger("change"); } else { $.modal.msgError(res.msg); } @@ -406,7 +412,7 @@ $("#form-ywzg-audit select[name='customerDelivery']").append( ""); } - $("#form-ywzg-audit select[name='customerDelivery']").val(sysSalesOrder.customerDelivery).trigger() + $("#form-ywzg-audit select[name='customerDelivery']").val(customerDelivery).trigger() } } }); @@ -417,7 +423,7 @@ delay:250, cache:true, data:{ - enterpriseCode:sysSalesOrder.enterpriseCode, + enterpriseCode:enterpriseCode, }, success: function (res, params) { if (res.rows.length > 0) { @@ -426,15 +432,13 @@ $("#form-ywzg-audit select[name='customerContact']").append( ""); } - $("#form-ywzg-audit select[name='customerContact']").val(sysSalesOrder.customerContact).trigger("change"); + $("#form-ywzg-audit select[name='customerContact']").val(customerContact).trigger("change"); } else { $.modal.msgError(res.msg); } }, }); - binessMembers(); - getTotalAmount(); - }); + } $('#enterpriseCode_edit').on('select2:select', function (e) { var data = e.params.data; $("input[name='enterpriseName']").val(data.enterpriseName); @@ -465,17 +469,17 @@ }; return curParams; } - function binessMembers(){ + function getBusinessMembers(){ $.ajax({ url: ctx + 'system/salesOrder/getBinessMembers', type: 'get', success: function (res) { console.log(res) if (res.rows.length > 0) { - var usertData = res.rows; - for (let i in usertData) { + var userData = res.rows; + for (let i in userData) { $("select[name='businessMembers']").append( - ""); + ""); } } else { $.modal.msgError(res.msg); @@ -483,62 +487,6 @@ } }); } - function doSubmit(index, layero,uniqueId){ - var iframeWin = window[layero.find('iframe')[0]['name']]; - var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0]; - console.log("rowData:"+rowData); - var totalNum = $("#bootstrap-select-table").bootstrapTable('getData').length; - var commonCurrency1 = $("#commonCurrency_edit option:selected").val(); - var rmbRateInput = parseFloat($("#rmbTax_detail").val()) || 0; - var rmbRate = rmbRateInput / 100; - rmbRate = parseFloat(rmbRate.toFixed(2)); // 确保rmbRate转换为两位小数的浮点数 - var usdRate = parseFloat($("#usdTax_edit").val()) || 0; - $("#bootstrap-sub-table-editOrder3").bootstrapTable('insertRow', { - index: 1, - row: { - id:'', - materialId:rowData.id, - materialCode: rowData.materialNo, - materialName: rowData.materialName, - materialType: rowData.materialType, - describe: rowData.describe, - brand: rowData.brand, - photoUrl: rowData.photoUrl, - unit: rowData.unit, - processMethod: rowData.processMethod, - countTax:rmbRateInput, - usdTax: usdRate, - materialSole: rowData.materialSole, - materialNum: 0, - materialNoRmb: 0.0, - materialNoUsd: 0.0, - materialRmb: 0.0, - materialNoRmbSum: 0.0, - materialRmbSum: 0, - materialUsd: 0.0, - materialUsdSum: 0.0, - materialNoUsdSum: 0.0, - remark: "", - } - }) - layer.close(index); - } - function insertRow() { - var url = ctx + "erp/material/select"; - var options = { - title: '选择料号', - url: url, - callBack: doSubmit - }; - $.modal.openOptions(options); - } - /* 删除指定表格行 */ - function removeRow(index){ - $("#bootstrap-sub-table-editOrder3").bootstrapTable('remove', { - field: 'index', - value: index - }) - } $("input[name='pricingDate']").datetimepicker({ format: "yyyy-mm-dd", minView: "month", @@ -567,10 +515,8 @@ } var tableData = $("#bootstrap-sub-table-editOrder3").bootstrapTable('getData'); $("input[name= 'salesOrderChildList']").val(JSON.stringify(tableData)); - var formData = $("#form-zozj-audit").serialize(); - console.log("$(\"#form-zozj-audit\").serialize()",formData); var taskId = [[${taskId}]]; - $.operate.save(prefix + "/complete/" + taskId, formData); + $.operate.save(prefix + "/complete/" + taskId, $("#form-zozj-audit").serialize()); } }