From e483e59958510e84bb088eb9abf46e82c775a39d Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Wed, 19 Jun 2024 08:45:52 +0800 Subject: [PATCH 1/4] =?UTF-8?q?[fix]=E9=94=80=E5=94=AE=E7=AE=A1=E7=90=86:?= =?UTF-8?q?=20=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=AE=A1=E7=AE=97=E6=A8=A1=E5=9D=97=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E5=9B=9E=E6=98=BE=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=A4=9A=E4=B8=AA=E5=AD=97=E6=AE=B5=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=97=AE=E9=A2=98=20=E6=B7=BB=E5=8A=A0=E9=94=80?= =?UTF-8?q?=E5=94=AE=E8=AE=A2=E5=8D=95=E9=A1=B5=E9=9D=A2=E5=85=B3=E8=81=94?= =?UTF-8?q?table=E8=A1=A8=E6=A0=BC=E7=BC=BA=E5=B0=91=E7=9A=84=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=20=E4=BF=AE=E6=94=B9=E9=94=80=E5=94=AE=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E9=A1=B5=E9=9D=A2=E5=85=B3=E8=81=94table=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E6=AE=B5=E4=B8=BA=E4=B8=8D=E5=8F=AF=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E7=8A=B6=E6=80=81=20=E5=8E=BB=E6=8E=89=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20=E6=B7=BB=E5=8A=A0=E7=89=A9=E6=96=99=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/system/salesOrder/detail.html | 225 ++++-------------- 1 file changed, 50 insertions(+), 175 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/detail.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/detail.html index 1e85b4e2..0c7ee214 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/detail.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/detail.html @@ -180,7 +180,7 @@
- @@ -189,7 +189,7 @@
- +
@@ -197,7 +197,7 @@
+ name="confirmTax" th:value="${dict.dictValue}" th:checked="${dict.default}" th:disabled="${dict.default ? 'disabled' : ''}">
@@ -205,7 +205,7 @@
- +
@@ -213,7 +213,7 @@
+ name="invoice" th:value="${dict.dictValue}" th:checked="${dict.default}" th:disabled="${dict.default ? 'disabled' : ''}">
@@ -221,19 +221,19 @@
- +
- +
- +
@@ -249,7 +249,7 @@
- +
@@ -257,57 +257,47 @@
- +
- +
- +

计算

- - + +
- - + +
- - + +
- - + +
- - + +
-
-
- 选择报价信息 - - 添加物料 - -
- -
@@ -334,93 +324,54 @@ var options = { id:'bootstrap-sub-table-editOrder', url: ctx + "system/orderChild/list", - pagination: false, queryParams: queryParams, sidePagination: "client", + showSearch: false, + showRefresh: false, + showToggle: false, + showColumns: false, + pagination: false, // 设置不分页 model: "物料报价信息", columns: [ {checkbox: true}, {field: 'index',align: 'center', title: "序号", - formatter: function (value, row, index) { - var columnIndex = $.common.sprintf("", $.table.serialNumber(index)); - return columnIndex + $.table.serialNumber(index); + formatter: function (value, row, index,column) { + return $.table.serialNumber(index) - 1; } }, {title: '物料索引id',field: 'materialId',align: 'center',visible: false}, {title: '料号',field: 'materialCode',align: 'center'}, {title: '物料名称',field: 'materialName',align: 'center'}, - {title: '图片',field: 'photoUrl', - formatter: function(value, row, index) { - return $.table.imageView(value); - } - }, - {title: '物料类型',field: 'materialType',align: 'center', - formatter: function(value, row, index) { - return $.table.selectCategoryLabel(materialTypeDatas, value); - } - }, + {title: '图片',field: 'photoUrl',formatter: function(value, row, index) {return $.table.imageView(value);} }, + {title: '物料类型',field: 'materialType',align: 'center',formatter: function(value, row, index) {return $.table.selectCategoryLabel(materialTypeDatas, value);}}, { title: '描述',field: 'describe',align: 'center'}, {title: '品牌',field: 'brand',align: 'center'}, - { title: '单位',field: 'unit',align: 'center', - formatter: function(value, row, index) { - return $.table.selectDictLabel(sysUnitClassDatas, value); - } - }, - {title: '半成品类型',field: 'processMethod',align: 'center', - formatter: function(value, row, index) { - return $.table.selectDictLabel(processMethodDatas, value); - } - }, - { title: '对外售价',field: 'materialSole',editable: true}, - {title: '国内税率',field: 'countTax',align: 'center',editable: true}, - { title: '美元汇率',field: 'usdTax', align: 'center',editable: true}, - {field: 'materialNum',align: 'center',title: '物料的数量',editable: true}, + { title: '单位',field: 'unit',align: 'center', formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);}}, + {title: '半成品类型',field: 'processMethod',align: 'center',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}}, + { title: '对外售价',field: 'materialSole'}, + {title: '国内税率',field: 'countTax',align: 'center'}, + { title: '美元汇率',field: 'usdTax', align: 'center'}, { title: '物料的不含税单价(RMB)', field: 'materialNoRmb', - align: 'center', - editable: function(value, row, index) { - var commonCurrency3 = $("#commonCurrency_edit option:selected").val(); - if (commonCurrency3 == 1){ - return true; - }else{ - return false; - } - } + align: 'center' }, + { title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',}, + {field: 'materialNum',align: 'center',title: '物料的数量', + }, + {title: '物料的不含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',}, + { title: '物料的含税总价(RMB)',field: 'materialRmbSum',align: 'center',}, {title: '物料的不含税单价(美元)', field: 'materialNoUsd', align: 'center', - editable: function(value, row, index) { - var commonCurrency2= $("#commonCurrency_edit option:selected").val(); - if (commonCurrency2 == 2){ - return true; - }else{ - return false; - } - } - }, - { title: '物料的含税单价(美元)',field: 'materialUsd',align: 'center'}, - { title: '物料的含税总价(美元)',field: 'materialUsdSum',align: 'center'}, - { title: '物料的不含税总价(美元)',field: 'materialNoUsdSum',align: 'center'}, - { title: '物料的含税总价(RMB)',field: 'materialNoRmbSum', align: 'center'}, - { title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'}, - { title: '计划交付时间',field: 'deliveryTime',align: 'center', - editable: {type: 'date',title: '计划交付时间',format: 'yyyy-mm-dd', emptytext: "计划交付时间", - formatter: function (value, row, index) { - return value; - }} }, - {title: '质保天数',align: 'center',field: 'expiryDay',formatter: function(value, row, index){ - return value + "天数"; - }, + { title: '物料的含税单价(美元)',field: 'materialUsd',align: 'center',}, + { title: '物料的含税总价(美元)',field: 'materialUsdSum', align: 'center',}, + { title: '物料的不含税总价(美元)',field: 'materialNoUsdSum',align: 'center',}, + { title: '计划交付时间',field: 'deliveryTime',align: 'center' }, + {title: '质保天数',align: 'center',field: 'expiryDay', }, - {title:'已完成数'},{title: '已出货数'},{title: '已出库数'},{title: '已收货数'},{title: '已验收数'}, - { title: '录入人',field: 'createBy',align: 'center',visible: false}, - { title: '录入时间',field: 'createTime',align: 'center',visible: false}, - { title: '更新人',field: 'updateBy',align: 'center',visible: false}, - { title: '上次更新时间',field: 'updateTime',align: 'center',visible: false}, - { title: '备注',field: 'remark',align: 'center', visible: false }, - { title: '审核状态',field: 'auditStatus',align: 'center',visible: false, + {field: 'remark',align: 'center',title: '备注',}, + {field: 'auditStatus',align: 'center',title: '审核状态',visible: false, formatter: function(value, row, index) { return $.table.selectDictLabel(auditStatusDatas, value); } @@ -433,43 +384,6 @@ } } ], - onEditableSave:function(field, row, oldValue, $el){ - var commonCurrency1 = $("#commonCurrency_edit option:selected").val(); - var rmb1 = $("#taxRate_edit").val(); - if (rmb1 =='' || rmb1== null){ - rmb1 = 0; - }else{ - rmb1 = $("#taxRate_edit").val(); - } - var rmb = Number(rmb1).toFixed(2) / 100; - var usd = $("#usdTax_edit").val(); - if (usd =='' || usd== null){ - usd = 0; - }else{ - usd = Number(usd).toFixed(2); - } - if(commonCurrency1 == 1){ - row.materialNoRmb = Number(row.materialNoRmb).toFixed(2); - row.materialRmb = Number(row.materialNoRmb * Number(1 + rmb)); - row.materialNoRmbSum = Number(row.materialNum * Number(row.materialNoRmb)).toFixed(2); - row.materialRmbSum = Number(row.materialRmb * row.materialNum).toFixed(2); - row.materialNoUsd = Number(row.materialNoRmb / usd).toFixed(2); - row.materialNoUsdSum = Number(row.materialNum * row.materialNoUsd).toFixed(2); - row.materialUsd = Number(row.materialNoUsd).toFixed(2) - row.materialUsdSum = Number(row.materialNum * Number(row.materialUsd)).toFixed(2); - } - else if( commonCurrency1 == 2){ - row.materialNoUsd = Number(row.materialNoUsd).toFixed(2); - row.materialUsd = Number(row.materialNoUsd).toFixed(2); - row.materialUsdSum = Number(row.materialNum * row.materialUsd).toFixed(2); - row.materialNoUsdSum = Number(row.materialNoUsd * row.materialNum).toFixed(2); - row.materialNoRmb = Number(row.materialNoUsd * usd).toFixed(2); - row.materialRmb = Number(row.materialNoRmb * (1 + rmb)).toFixed(2); - row.materialNoRmbSum = Number(row.materialNoRmb * row.materialNum).toFixed(2); - row.materialRmbSum = Number(row.materialRmb * row.materialNum).toFixed(2); - } - getTotalAmount() - }, }; $.table.init(options); $.ajax({ @@ -693,46 +607,7 @@ } } } - //计算 - function getTotalAmount(){ - // $("#addFinishbomTable").bootstrapTable('refresh'); - let getData = $("#bootstrap-sub-table-order").bootstrapTable('getData'); - let enterprise = 0;let enterpriseSum = 0; let noRmb = 0; - let rmb = 0;let noRmbSum =0;let rmbSum = 0; - let noUsd = 0;let usd = 0;let noUsdSum =0; let usdSum = 0; - $("input[name='materialSum']").val(0); - $("input[name='enterpriseSum']").val(0); - $("input[name='noRmbPrice']").val(0); - $("input[name='noRmbSum']").val(0); - $("input[name='rmbPrice']").val(0); - $("input[name='rmbTaxSum']").val(0); - $("input[name='noUsdPrice']").val(0); - $("input[name='noUsdSum']").val(0); - $("input[name='usdPrice']").val(0); - $("input[name='usdTaxSum']").val(0); - for(let i=0;i Date: Wed, 19 Jun 2024 08:53:00 +0800 Subject: [PATCH 2/4] =?UTF-8?q?[fix]=E9=94=80=E5=94=AE=E7=AE=A1=E7=90=86:?= =?UTF-8?q?=20=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E4=B8=9A=E5=8A=A1=E7=BB=8F?= =?UTF-8?q?=E7=90=86=E5=AE=A1=E6=A0=B8=E9=A1=B5=E9=9D=A2=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E4=B8=8D=E8=83=BD=E6=AD=A3=E5=B8=B8=E5=9B=9E?= =?UTF-8?q?=E6=98=BE=20=E4=BF=AE=E6=94=B9=E9=94=80=E5=94=AE=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E4=B8=9A=E5=8A=A1=E7=BB=8F=E7=90=86=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=A4=9A=E4=B8=AA=E5=AD=97=E6=AE=B5=E8=83=BD?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E4=B8=9A=E5=8A=A1=E7=BB=8F?= =?UTF-8?q?=E7=90=86=E5=AE=A1=E6=A0=B8=E9=A1=B5=E9=9D=A2=E5=85=B3=E8=81=94?= =?UTF-8?q?table=E8=A1=A8=E6=A0=BC=E7=BC=BA=E5=B0=91=E7=9A=84=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=20=E4=BF=AE=E6=94=B9=E9=94=80=E5=94=AE=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E4=B8=9A=E5=8A=A1=E7=BB=8F=E7=90=86=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=85=B3=E8=81=94table=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=B8=BA=E4=B8=8D=E5=8F=AF=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E7=8A=B6=E6=80=81=20=E5=8E=BB=E6=8E=89=E6=B7=BB=E5=8A=A0=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=89=A9=E6=96=99=E6=8C=89=E9=92=AE=20?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E7=BB=8F=E7=90=86=E5=AE=A1=E6=A0=B8=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9A=84table=E7=9A=84=E5=88=A0=E9=99=A4=E6=8C=89=E9=92=AE=20?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E7=9A=84?= =?UTF-8?q?table=E7=9A=84=E5=88=A0=E9=99=A4=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/system/salesOrder/detail.html | 7 - .../system/salesOrder/taskYwjlVerify.html | 172 ++++-------------- 2 files changed, 33 insertions(+), 146 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/detail.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/detail.html index 0c7ee214..3396927c 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/detail.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/detail.html @@ -376,13 +376,6 @@ return $.table.selectDictLabel(auditStatusDatas, value); } }, - {title: '操作', align: 'center', - formatter: function (value, row, index) { - var actions = []; - actions.push('删除 '); - return actions.join(''); - } - } ], }; $.table.init(options); 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 fc1fdd95..1c43000e 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwjlVerify.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwjlVerify.html @@ -261,31 +261,31 @@ - +
- + - +
- + - +
- + - +
- + - +
@@ -294,11 +294,6 @@
-
-
- 选择报价信息 -
-
@@ -334,113 +329,49 @@ columns: [ {checkbox: true}, {field: 'index',align: 'center', title: "序号", - formatter: function (value, row, index) { - var columnIndex = $.common.sprintf("", $.table.serialNumber(index)); - return columnIndex + $.table.serialNumber(index); + formatter: function (value, row, index,column) { + return $.table.serialNumber(index) - 1; } }, {title: '物料索引id',field: 'materialId',align: 'center',visible: false}, {title: '料号',field: 'materialCode',align: 'center'}, {title: '物料名称',field: 'materialName',align: 'center'}, - {title: '图片',field: 'photoUrl', - formatter: function(value, row, index) { - return $.table.imageView(value); - } - }, - {title: '物料类型',field: 'materialType',align: 'center', - formatter: function(value, row, index) { - return $.table.selectCategoryLabel(materialTypeDatas, value); - } - }, + {title: '图片',field: 'photoUrl',formatter: function(value, row, index) {return $.table.imageView(value);} }, + {title: '物料类型',field: 'materialType',align: 'center',formatter: function(value, row, index) {return $.table.selectCategoryLabel(materialTypeDatas, value);}}, { title: '描述',field: 'describe',align: 'center'}, {title: '品牌',field: 'brand',align: 'center'}, - { title: '单位',field: 'unit',align: 'center', - formatter: function(value, row, index) { - return $.table.selectDictLabel(sysUnitClassDatas, value); - } - }, - {title: '半成品类型',field: 'processMethod',align: 'center', - formatter: function(value, row, index) { - return $.table.selectDictLabel(processMethodDatas, value); - } - }, - { title: '对外售价',field: 'materialSole',editable: false}, - {title: '国内税率',field: 'countTax',align: 'center',editable: false}, - { title: '美元汇率',field: 'usdTax', align: 'center',editable: false}, - {title: '物料的数量',field: 'materialNum',align: 'center',editable: false}, + { title: '单位',field: 'unit',align: 'center', formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);}}, + {title: '半成品类型',field: 'processMethod',align: 'center',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}}, + { title: '对外售价',field: 'materialSole'}, + {title: '国内税率',field: 'countTax',align: 'center'}, + { title: '美元汇率',field: 'usdTax', align: 'center'}, { title: '物料的不含税单价(RMB)', field: 'materialNoRmb', - align: 'center', - editable: { - type: 'text', mode: 'inline', // 同样设定为行内编辑模式 - enabled: function() {return false; }, - options: {placeholder: '请输入USD单价...', maxlength: 10} - } + align: 'center' }, + { title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',}, + {field: 'materialNum',align: 'center',title: '物料的数量', + }, + {title: '物料的不含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',}, + { title: '物料的含税总价(RMB)',field: 'materialRmbSum',align: 'center',}, {title: '物料的不含税单价(美元)', field: 'materialNoUsd', align: 'center', - editable: { - type: 'text', mode: 'inline', // 同样设定为行内编辑模式 - enabled: function() {return false; }, - options: {placeholder: '请输入USD单价...', maxlength: 10} - } }, - { title: '物料的含税单价(美元)',field: 'materialUsd',align: 'center'}, - { title: '物料的含税总价(美元)',field: 'materialUsdSum',align: 'center'}, - { title: '物料的不含税总价(美元)',field: 'materialNoUsdSum',align: 'center'}, - { title: '物料的含税总价(RMB)',field: 'materialNoRmbSum', align: 'center'}, - { title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'}, - { title: '录入人',field: 'createBy',align: 'center',visible: false}, - { title: '录入时间',field: 'createTime',align: 'center',visible: false}, - { title: '更新人',field: 'updateBy',align: 'center',visible: false}, - { title: '上次更新时间',field: 'updateTime',align: 'center',visible: false}, - { title: '备注',field: 'remark',align: 'center', visible: false }, - { title: '审核状态',field: 'auditStatus',align: 'center',visible: false, + { title: '物料的含税单价(美元)',field: 'materialUsd',align: 'center',}, + { title: '物料的含税总价(美元)',field: 'materialUsdSum', align: 'center',}, + { title: '物料的不含税总价(美元)',field: 'materialNoUsdSum',align: 'center',}, + { title: '计划交付时间',field: 'deliveryTime',align: 'center' }, + {title: '质保天数',align: 'center',field: 'expiryDay', + }, + {field: 'remark',align: 'center',title: '备注',}, + {field: 'auditStatus',align: 'center',title: '审核状态',visible: false, formatter: function(value, row, index) { return $.table.selectDictLabel(auditStatusDatas, value); } }, - {title: '操作', align: 'center', - formatter: function (value, row, index) { - var actions = []; - actions.push('删除 '); - return actions.join(''); - } - } ], - onEditableSave:function(field, row, oldValue, $el){ - var commonCurrency1 = $("#commonCurrency_edit option:selected").val(); - var rmbRateInput = parseFloat($("#rmbTax_edit").val()) || 0; - var rmbRate = rmbRateInput / 100; - rmbRate = parseFloat(rmbRate.toFixed(2)); // 确保rmbRate转换为两位小数的浮点数 - var usdRate = parseFloat($("#usdTax_edit").val()) || 0; - var testMaterialNum = parseFloat(row.materialNum) || 0; - if (commonCurrency1 === '1') { - // RMB为基准货币 - row.materialRmb = (parseFloat(row.materialNoRmb) * (1 + rmbRate)).toFixed(2); - row.materialRmbSum = (parseFloat(row.materialRmb) * testMaterialNum).toFixed(2); - row.materialNoRmbSum = (parseFloat(row.materialNoRmb) * testMaterialNum).toFixed(2); - row.materialNoUsd = (parseFloat(row.materialNoRmb) / usdRate).toFixed(2); - row.materialUsd = row.materialNoUsd; // 保持一致,除非有特别的计算逻辑 - row.materialUsdSum = (parseFloat(row.materialUsd) * testMaterialNum).toFixed(2); - row.materialNoUsdSum = (parseFloat(row.materialNoUsd) * testMaterialNum).toFixed(2); - } else if (commonCurrency1 === '2') { - // USD为基准货币 - row.materialUsd = row.materialNoUsd - row.materialUsdSum = (parseFloat(row.materialUsd) * testMaterialNum).toFixed(2); - row.materialNoUsdSum = (parseFloat(row.materialNoUsd) * testMaterialNum).toFixed(2); - row.materialNoRmb = (parseFloat(row.materialNoUsd) * usdRate).toFixed(2); - row.materialRmb = (parseFloat(row.materialNoRmb) * (1 + rmbRate)).toFixed(2); - row.materialNoRmbSum = (parseFloat(row.materialNoRmb) * testMaterialNum).toFixed(2); - row.materialRmbSum = (parseFloat(row.materialRmb) * testMaterialNum).toFixed(2); - } - // 确保getTotalAmount函数存在且正确引用 - if (typeof getTotalAmount === 'function') { - getTotalAmount(); - } - }, }; $.table.init(options); $.ajax({ @@ -631,44 +562,7 @@ minView: "month", autoclose: true }); - //计算 - function getTotalAmount(){ - // $("#addFinishbomTable").bootstrapTable('refresh'); - let getData = $("#bootstrap-sub-table-editOrder1").bootstrapTable('getData',true); - let enterprise = 0;let enterpriseSum = 0; let noRmb = 0; - let rmb = 0;let noRmbSum =0;let rmbSum = 0; - let noUsd = 0;let usd = 0;let noUsdSum =0; let usdSum = 0; - enterprise = getData.length; // 直接获取数据长度 - enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0); - for(var i=0;i Date: Wed, 19 Jun 2024 09:07:11 +0800 Subject: [PATCH 3/4] =?UTF-8?q?[fix]=E9=94=80=E5=94=AE=E7=AE=A1=E7=90=86:?= =?UTF-8?q?=20=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E4=B8=9A=E5=8A=A1=E4=B8=BB?= =?UTF-8?q?=E7=AE=A1=E5=AE=A1=E6=A0=B8=E9=A1=B5=E9=9D=A2=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E4=B8=8D=E8=83=BD=E6=AD=A3=E5=B8=B8=E5=9B=9E?= =?UTF-8?q?=E6=98=BE=20=E4=BF=AE=E6=94=B9=E9=94=80=E5=94=AE=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E4=B8=9A=E5=8A=A1=E4=B8=BB=E7=AE=A1=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=A4=9A=E4=B8=AA=E5=AD=97=E6=AE=B5=E8=83=BD?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E4=B8=9A=E5=8A=A1=E4=B8=BB?= =?UTF-8?q?=E7=AE=A1=E5=AE=A1=E6=A0=B8=E9=A1=B5=E9=9D=A2=E5=85=B3=E8=81=94?= =?UTF-8?q?table=E8=A1=A8=E6=A0=BC=E7=BC=BA=E5=B0=91=E7=9A=84=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=20=E4=BF=AE=E6=94=B9=E9=94=80=E5=94=AE=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E4=B8=9A=E5=8A=A1=E4=B8=BB=E7=AE=A1=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=85=B3=E8=81=94table=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=B8=BA=E4=B8=8D=E5=8F=AF=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E7=8A=B6=E6=80=81=20=E5=8E=BB=E6=8E=89=E6=B7=BB=E5=8A=A0=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=89=A9=E6=96=99=E6=8C=89=E9=92=AE=20?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E4=B8=BB=E7=AE=A1=E5=AE=A1=E6=A0=B8=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9A=84table=E7=9A=84=E5=88=A0=E9=99=A4=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/salesOrder/taskYwzgVerify.html | 173 ++++-------------- 1 file changed, 33 insertions(+), 140 deletions(-) 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 22591689..189c6ea1 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwzgVerify.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwzgVerify.html @@ -261,31 +261,31 @@ - +
- + - +
- + - +
- + - +
- + - +
@@ -293,11 +293,6 @@
-
-
- 选择报价信息 -
-
@@ -331,113 +326,48 @@ columns: [ {checkbox: true}, {field: 'index',align: 'center', title: "序号", - formatter: function (value, row, index) { - var columnIndex = $.common.sprintf("", $.table.serialNumber(index)); - return columnIndex + $.table.serialNumber(index); + formatter: function (value, row, index,column) { + return $.table.serialNumber(index) - 1; } }, {title: '物料索引id',field: 'materialId',align: 'center',visible: false}, {title: '料号',field: 'materialCode',align: 'center'}, {title: '物料名称',field: 'materialName',align: 'center'}, - {title: '图片',field: 'photoUrl', - formatter: function(value, row, index) { - return $.table.imageView(value); - } - }, - {title: '物料类型',field: 'materialType',align: 'center', - formatter: function(value, row, index) { - return $.table.selectCategoryLabel(materialTypeDatas, value); - } - }, + {title: '图片',field: 'photoUrl',formatter: function(value, row, index) {return $.table.imageView(value);} }, + {title: '物料类型',field: 'materialType',align: 'center',formatter: function(value, row, index) {return $.table.selectCategoryLabel(materialTypeDatas, value);}}, { title: '描述',field: 'describe',align: 'center'}, {title: '品牌',field: 'brand',align: 'center'}, - { title: '单位',field: 'unit',align: 'center', - formatter: function(value, row, index) { - return $.table.selectDictLabel(sysUnitClassDatas, value); - } - }, - {title: '半成品类型',field: 'processMethod',align: 'center', - formatter: function(value, row, index) { - return $.table.selectDictLabel(processMethodDatas, value); - } - }, - { title: '对外售价',field: 'materialSole',editable: false}, - {title: '国内税率',field: 'countTax',align: 'center',editable: false}, - { title: '美元汇率',field: 'usdTax', align: 'center',editable: false}, - {title: '物料的数量',field: 'materialNum',align: 'center',editable: false}, + { title: '单位',field: 'unit',align: 'center', formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);}}, + {title: '半成品类型',field: 'processMethod',align: 'center',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}}, + { title: '对外售价',field: 'materialSole'}, + {title: '国内税率',field: 'countTax',align: 'center'}, + { title: '美元汇率',field: 'usdTax', align: 'center'}, { title: '物料的不含税单价(RMB)', field: 'materialNoRmb', - align: 'center', - editable: { - type: 'text', mode: 'inline', // 同样设定为行内编辑模式 - enabled: function() {return false; }, - options: {placeholder: '请输入USD单价...', maxlength: 10} - } + align: 'center' }, + { title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',}, + {field: 'materialNum',align: 'center',title: '物料的数量', + }, + {title: '物料的不含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',}, + { title: '物料的含税总价(RMB)',field: 'materialRmbSum',align: 'center',}, {title: '物料的不含税单价(美元)', field: 'materialNoUsd', align: 'center', - editable: { - type: 'text', mode: 'inline', // 同样设定为行内编辑模式 - enabled: function() {return false; }, - options: {placeholder: '请输入USD单价...', maxlength: 10} - } }, - { title: '物料的含税单价(美元)',field: 'materialUsd',align: 'center'}, - { title: '物料的含税总价(美元)',field: 'materialUsdSum',align: 'center'}, - { title: '物料的不含税总价(美元)',field: 'materialNoUsdSum',align: 'center'}, - { title: '物料的含税总价(RMB)',field: 'materialNoRmbSum', align: 'center'}, - { title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'}, - { title: '录入人',field: 'createBy',align: 'center',visible: false}, - { title: '录入时间',field: 'createTime',align: 'center',visible: false}, - { title: '更新人',field: 'updateBy',align: 'center',visible: false}, - { title: '上次更新时间',field: 'updateTime',align: 'center',visible: false}, - { title: '备注',field: 'remark',align: 'center', visible: false }, - { title: '审核状态',field: 'auditStatus',align: 'center',visible: false, + { title: '物料的含税单价(美元)',field: 'materialUsd',align: 'center',}, + { title: '物料的含税总价(美元)',field: 'materialUsdSum', align: 'center',}, + { title: '物料的不含税总价(美元)',field: 'materialNoUsdSum',align: 'center',}, + { title: '计划交付时间',field: 'deliveryTime',align: 'center' }, + {title: '质保天数',align: 'center',field: 'expiryDay', + }, + {field: 'remark',align: 'center',title: '备注',}, + {field: 'auditStatus',align: 'center',title: '审核状态',visible: false, formatter: function(value, row, index) { return $.table.selectDictLabel(auditStatusDatas, value); } }, - {title: '操作', align: 'center', - formatter: function (value, row, index) { - var actions = []; - actions.push('删除 '); - return actions.join(''); - } - } ], - onEditableSave:function(field, row, oldValue, $el){ - var commonCurrency1 = $("#commonCurrency_edit option:selected").val(); - var rmbRateInput = parseFloat($("#rmbTax_edit").val()) || 0; - var rmbRate = rmbRateInput / 100; - rmbRate = parseFloat(rmbRate.toFixed(2)); // 确保rmbRate转换为两位小数的浮点数 - var usdRate = parseFloat($("#usdTax_edit").val()) || 0; - var testMaterialNum = parseFloat(row.materialNum) || 0; - if (commonCurrency1 === '1') { - // RMB为基准货币 - row.materialRmb = (parseFloat(row.materialNoRmb) * (1 + rmbRate)).toFixed(2); - row.materialRmbSum = (parseFloat(row.materialRmb) * testMaterialNum).toFixed(2); - row.materialNoRmbSum = (parseFloat(row.materialNoRmb) * testMaterialNum).toFixed(2); - row.materialNoUsd = (parseFloat(row.materialNoRmb) / usdRate).toFixed(2); - row.materialUsd = row.materialNoUsd; // 保持一致,除非有特别的计算逻辑 - row.materialUsdSum = (parseFloat(row.materialUsd) * testMaterialNum).toFixed(2); - row.materialNoUsdSum = (parseFloat(row.materialNoUsd) * testMaterialNum).toFixed(2); - } else if (commonCurrency1 === '2') { - // USD为基准货币 - row.materialUsd = row.materialNoUsd - row.materialUsdSum = (parseFloat(row.materialUsd) * testMaterialNum).toFixed(2); - row.materialNoUsdSum = (parseFloat(row.materialNoUsd) * testMaterialNum).toFixed(2); - row.materialNoRmb = (parseFloat(row.materialNoUsd) * usdRate).toFixed(2); - row.materialRmb = (parseFloat(row.materialNoRmb) * (1 + rmbRate)).toFixed(2); - row.materialNoRmbSum = (parseFloat(row.materialNoRmb) * testMaterialNum).toFixed(2); - row.materialRmbSum = (parseFloat(row.materialRmb) * testMaterialNum).toFixed(2); - } - - // 确保getTotalAmount函数存在且正确引用 - if (typeof getTotalAmount === 'function') { - getTotalAmount(); - } - }, }; $.table.init(options); $.ajax({ @@ -628,44 +558,7 @@ minView: "month", autoclose: true }); - //计算 - function getTotalAmount(){ - // $("#addFinishbomTable").bootstrapTable('refresh'); - let getData = $("#bootstrap-sub-table-editOrder2").bootstrapTable('getData',true); - let enterprise = 0;let enterpriseSum = 0; let noRmb = 0; - let rmb = 0;let noRmbSum =0;let rmbSum = 0; - let noUsd = 0;let usd = 0;let noUsdSum =0; let usdSum = 0; - enterprise = getData.length; // 直接获取数据长度 - enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0); - for(var i=0;i Date: Wed, 19 Jun 2024 09:20:04 +0800 Subject: [PATCH 4/4] =?UTF-8?q?[fix]=E9=94=80=E5=94=AE=E7=AE=A1=E7=90=86:?= =?UTF-8?q?=20=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E6=80=BB=E7=BB=8F=E7=90=86?= =?UTF-8?q?=E6=80=BB=E5=8A=A9=E5=AE=A1=E6=A0=B8=E9=A1=B5=E9=9D=A2=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E6=A8=A1=E5=9D=97=E4=B8=8D=E8=83=BD=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E5=9B=9E=E6=98=BE=20=E4=BF=AE=E6=94=B9=E9=94=80=E5=94=AE?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=80=BB=E7=BB=8F=E7=90=86=E6=80=BB=E5=8A=A9?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E9=A1=B5=E9=9D=A2=E5=A4=9A=E4=B8=AA=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E8=83=BD=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E6=80=BB?= =?UTF-8?q?=E7=BB=8F=E7=90=86=E6=80=BB=E5=8A=A9=E5=AE=A1=E6=A0=B8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=85=B3=E8=81=94table=E8=A1=A8=E6=A0=BC=E7=BC=BA?= =?UTF-8?q?=E5=B0=91=E7=9A=84=E5=AD=97=E6=AE=B5=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E6=80=BB=E7=BB=8F=E7=90=86?= =?UTF-8?q?=E6=80=BB=E5=8A=A9=E5=AE=A1=E6=A0=B8=E9=A1=B5=E9=9D=A2=E5=85=B3?= =?UTF-8?q?=E8=81=94table=E4=B8=AD=E7=9A=84=E5=AD=97=E6=AE=B5=E4=B8=BA?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E7=BC=96=E8=BE=91=E7=8A=B6=E6=80=81=20?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=B7=BB=E5=8A=A0=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=89=A9=E6=96=99=E6=8C=89=E9=92=AE=20=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E6=80=BB=E7=BB=8F=E7=90=86?= =?UTF-8?q?=E6=80=BB=E5=8A=A9=E5=AE=A1=E6=A0=B8=E9=A1=B5=E9=9D=A2=E7=9A=84?= =?UTF-8?q?table=E7=9A=84=E5=88=A0=E9=99=A4=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/salesOrder/taskZozjVerify.html | 173 ++++-------------- 1 file changed, 33 insertions(+), 140 deletions(-) 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 c9da065d..355e403b 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskZozjVerify.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskZozjVerify.html @@ -261,31 +261,31 @@ - +
- + - +
- + - +
- + - +
- + - +
@@ -293,11 +293,6 @@
-
-
- 选择报价信息 -
-
@@ -332,113 +327,48 @@ columns: [ {checkbox: true}, {field: 'index',align: 'center', title: "序号", - formatter: function (value, row, index) { - var columnIndex = $.common.sprintf("", $.table.serialNumber(index)); - return columnIndex + $.table.serialNumber(index); + formatter: function (value, row, index,column) { + return $.table.serialNumber(index) - 1; } }, {title: '物料索引id',field: 'materialId',align: 'center',visible: false}, {title: '料号',field: 'materialCode',align: 'center'}, {title: '物料名称',field: 'materialName',align: 'center'}, - {title: '图片',field: 'photoUrl', - formatter: function(value, row, index) { - return $.table.imageView(value); - } - }, - {title: '物料类型',field: 'materialType',align: 'center', - formatter: function(value, row, index) { - return $.table.selectCategoryLabel(materialTypeDatas, value); - } - }, + {title: '图片',field: 'photoUrl',formatter: function(value, row, index) {return $.table.imageView(value);} }, + {title: '物料类型',field: 'materialType',align: 'center',formatter: function(value, row, index) {return $.table.selectCategoryLabel(materialTypeDatas, value);}}, { title: '描述',field: 'describe',align: 'center'}, {title: '品牌',field: 'brand',align: 'center'}, - { title: '单位',field: 'unit',align: 'center', - formatter: function(value, row, index) { - return $.table.selectDictLabel(sysUnitClassDatas, value); - } - }, - {title: '半成品类型',field: 'processMethod',align: 'center', - formatter: function(value, row, index) { - return $.table.selectDictLabel(processMethodDatas, value); - } - }, - { title: '对外售价',field: 'materialSole',editable: false}, - {title: '国内税率',field: 'countTax',align: 'center',editable: false}, - { title: '美元汇率',field: 'usdTax', align: 'center',editable: false}, - {title: '物料的数量',field: 'materialNum',align: 'center',editable: false}, + { title: '单位',field: 'unit',align: 'center', formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);}}, + {title: '半成品类型',field: 'processMethod',align: 'center',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}}, + { title: '对外售价',field: 'materialSole'}, + {title: '国内税率',field: 'countTax',align: 'center'}, + { title: '美元汇率',field: 'usdTax', align: 'center'}, { title: '物料的不含税单价(RMB)', field: 'materialNoRmb', - align: 'center', - editable: { - type: 'text', mode: 'inline', // 同样设定为行内编辑模式 - enabled: function() {return false; }, - options: {placeholder: '请输入USD单价...', maxlength: 10} - } + align: 'center' }, + { title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',}, + {field: 'materialNum',align: 'center',title: '物料的数量', + }, + {title: '物料的不含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',}, + { title: '物料的含税总价(RMB)',field: 'materialRmbSum',align: 'center',}, {title: '物料的不含税单价(美元)', field: 'materialNoUsd', align: 'center', - editable: { - type: 'text', mode: 'inline', // 同样设定为行内编辑模式 - enabled: function() {return false; }, - options: {placeholder: '请输入USD单价...', maxlength: 10} - } }, - { title: '物料的含税单价(美元)',field: 'materialUsd',align: 'center'}, - { title: '物料的含税总价(美元)',field: 'materialUsdSum',align: 'center'}, - { title: '物料的不含税总价(美元)',field: 'materialNoUsdSum',align: 'center'}, - { title: '物料的含税总价(RMB)',field: 'materialNoRmbSum', align: 'center'}, - { title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'}, - { title: '录入人',field: 'createBy',align: 'center',visible: false}, - { title: '录入时间',field: 'createTime',align: 'center',visible: false}, - { title: '更新人',field: 'updateBy',align: 'center',visible: false}, - { title: '上次更新时间',field: 'updateTime',align: 'center',visible: false}, - { title: '备注',field: 'remark',align: 'center', visible: false }, - { title: '审核状态',field: 'auditStatus',align: 'center',visible: false, + { title: '物料的含税单价(美元)',field: 'materialUsd',align: 'center',}, + { title: '物料的含税总价(美元)',field: 'materialUsdSum', align: 'center',}, + { title: '物料的不含税总价(美元)',field: 'materialNoUsdSum',align: 'center',}, + { title: '计划交付时间',field: 'deliveryTime',align: 'center' }, + {title: '质保天数',align: 'center',field: 'expiryDay', + }, + {field: 'remark',align: 'center',title: '备注',}, + {field: 'auditStatus',align: 'center',title: '审核状态',visible: false, formatter: function(value, row, index) { return $.table.selectDictLabel(auditStatusDatas, value); } }, - {title: '操作', align: 'center', - formatter: function (value, row, index) { - var actions = []; - actions.push('删除 '); - return actions.join(''); - } - } ], - onEditableSave:function(field, row, oldValue, $el){ - var commonCurrency1 = $("#commonCurrency_edit option:selected").val(); - var rmbRateInput = parseFloat($("#rmbTax_edit").val()) || 0; - var rmbRate = rmbRateInput / 100; - rmbRate = parseFloat(rmbRate.toFixed(2)); // 确保rmbRate转换为两位小数的浮点数 - var usdRate = parseFloat($("#usdTax_edit").val()) || 0; - var testMaterialNum = parseFloat(row.materialNum) || 0; - if (commonCurrency1 === '1') { - // RMB为基准货币 - row.materialRmb = (parseFloat(row.materialNoRmb) * (1 + rmbRate)).toFixed(2); - row.materialRmbSum = (parseFloat(row.materialRmb) * testMaterialNum).toFixed(2); - row.materialNoRmbSum = (parseFloat(row.materialNoRmb) * testMaterialNum).toFixed(2); - row.materialNoUsd = (parseFloat(row.materialNoRmb) / usdRate).toFixed(2); - row.materialUsd = row.materialNoUsd; // 保持一致,除非有特别的计算逻辑 - row.materialUsdSum = (parseFloat(row.materialUsd) * testMaterialNum).toFixed(2); - row.materialNoUsdSum = (parseFloat(row.materialNoUsd) * testMaterialNum).toFixed(2); - } else if (commonCurrency1 === '2') { - // USD为基准货币 - row.materialUsd = row.materialNoUsd - row.materialUsdSum = (parseFloat(row.materialUsd) * testMaterialNum).toFixed(2); - row.materialNoUsdSum = (parseFloat(row.materialNoUsd) * testMaterialNum).toFixed(2); - row.materialNoRmb = (parseFloat(row.materialNoUsd) * usdRate).toFixed(2); - row.materialRmb = (parseFloat(row.materialNoRmb) * (1 + rmbRate)).toFixed(2); - row.materialNoRmbSum = (parseFloat(row.materialNoRmb) * testMaterialNum).toFixed(2); - row.materialRmbSum = (parseFloat(row.materialRmb) * testMaterialNum).toFixed(2); - } - - // 确保getTotalAmount函数存在且正确引用 - if (typeof getTotalAmount === 'function') { - getTotalAmount(); - } - }, }; $.table.init(options); $.ajax({ @@ -629,44 +559,7 @@ minView: "month", autoclose: true }); - //计算 - function getTotalAmount(){ - // $("#addFinishbomTable").bootstrapTable('refresh'); - let getData = $("#bootstrap-sub-table-editOrder3").bootstrapTable('getData',true); - let enterprise = 0;let enterpriseSum = 0; let noRmb = 0; - let rmb = 0;let noRmbSum =0;let rmbSum = 0; - let noUsd = 0;let usd = 0;let noUsdSum =0; let usdSum = 0; - enterprise = getData.length; // 直接获取数据长度 - enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0); - for(var i=0;i