From 5ca11eb0ea7efa3fcbc26e66241ed8eb8fff22c1 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Fri, 1 Nov 2024 14:32:00 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=E9=94=80=E5=94=AE=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E6=96=B0=E5=A2=9E=E9=A1=B5=E9=9D=A2=EF=BC=9A=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=201=E3=80=81=E7=BE=8E=E5=85=83=E6=B1=87=E7=8E=87?= =?UTF-8?q?=EF=BC=8C=E4=B8=9A=E5=8A=A1=E8=87=AA=E5=B7=B1=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E6=89=8B=E5=8A=A8=E7=BB=B4=E6=8A=A4=EF=BC=8C=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E6=8A=A5=E4=BB=B7=E5=8D=95=E7=9A=84=E5=BD=93=E5=89=8D=E6=97=B6?= =?UTF-8?q?=E9=97=B4=EF=BC=8C=E7=BE=8E=E5=85=83=E6=B1=87=E7=8E=87=E4=BB=8E?= =?UTF-8?q?=E3=80=90=E5=9F=BA=E7=A1=80=E8=B5=84=E6=96=99-=E6=B1=87?= =?UTF-8?q?=E7=8E=87=E7=AE=A1=E7=90=86=E3=80=91=E4=B8=AD=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E6=97=B6=E9=97=B4=E7=9A=84=E7=BE=8E=E5=85=83?= =?UTF-8?q?=E5=BF=BD=E7=95=A5=201.1=E3=80=81=E8=8E=B7=E5=8F=96=E5=88=B0?= =?UTF-8?q?=E7=BE=8E=E5=85=83=E6=B1=87=E7=8E=87=EF=BC=8C=E5=88=99=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=BE=8E=E5=85=83=E6=B1=87=E7=8E=87=201.2=E3=80=81?= =?UTF-8?q?=E6=9C=AA=E8=8E=B7=E5=8F=96=E5=88=B0=E7=BE=8E=E5=85=83=E6=B1=87?= =?UTF-8?q?=E7=8E=87=EF=BC=8C=E5=88=99=E6=98=BE=E7=A4=BA=E2=80=9C=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E6=9C=AA=E9=85=8D=E7=BD=AE=E7=BE=8E=E5=85=83=E6=B1=87?= =?UTF-8?q?=E7=8E=87=EF=BC=8C=E8=AF=B7=E8=81=94=E7=B3=BB=E6=80=BB=E7=BB=8F?= =?UTF-8?q?=E7=90=86=E2=80=9D=20=E4=B8=89=E3=80=81=E7=A1=AE=E5=AE=9A=201?= =?UTF-8?q?=E3=80=81=E7=82=B9=E5=87=BB=E3=80=90=E6=96=B0=E5=A2=9E=E7=89=A9?= =?UTF-8?q?=E6=96=99=E3=80=91=E6=97=B6=EF=BC=8C=E8=8B=A5=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=9C=AA=E8=8E=B7=E5=8F=96=E5=88=B0=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E7=9A=84=E3=80=90=E7=BE=8E=E5=85=83=E6=B1=87=E7=8E=87?= =?UTF-8?q?=E3=80=91=EF=BC=8C=E5=BC=B9=E7=AA=97=E6=8F=90=E7=A4=BA=E2=80=9C?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E6=9C=AA=E9=85=8D=E7=BD=AE=E7=BE=8E=E5=85=83?= =?UTF-8?q?=E6=B1=87=E7=8E=87=EF=BC=8C=E8=AF=B7=E8=81=94=E7=B3=BB=E6=80=BB?= =?UTF-8?q?=E7=BB=8F=E7=90=86=E2=80=9D=20=E8=AE=BE=E7=BD=AE=E7=BE=8E?= =?UTF-8?q?=E5=85=83=E6=B1=87=E7=8E=87=E4=B8=BA=E5=8F=AA=E8=AF=BB=20?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E7=89=A9=E6=96=99=E5=88=97=E8=A1=A8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=9B=BD=E5=86=85=E7=A8=8E=E7=8E=87=E5=92=8C=E7=BE=8E?= =?UTF-8?q?=E5=85=83=E6=B1=87=E7=8E=87=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/system/salesOrder/add.html | 142 +++++------------- 1 file changed, 38 insertions(+), 104 deletions(-) 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 3e8dcec3..b9cd8541 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html @@ -345,7 +345,7 @@ {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: 'photoUrl',align: 'center',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'}, @@ -367,8 +367,8 @@ return actions.join(''); } }, - {title: '国内税率',field: 'countTax',align: 'center',editable: {type: 'text',mode: 'inline',},}, - { title: '美元汇率',field: 'usdTax', align: 'center',editable: {type: 'text',mode: 'inline', }}, + // {title: '国内税率',field: 'countTax',align: 'center',editable: {type: 'text',mode: 'inline',},}, + // { title: '美元汇率',field: 'usdTax', align: 'center',editable: {type: 'text',mode: 'inline', }}, {title: '物料的数量',field: 'materialNum',align: 'center', editable:{ type : 'text', @@ -457,11 +457,6 @@ format: function (value, row, index) { return value + "天数";} }, {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) { @@ -520,83 +515,6 @@ }); function selectBuniesessMembers(){ - //获取业务员 - // $.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) { - // $("select[name='businessMembers']").append( - // ""); - // } - // } else { - // $.modal.msgError(res.msg); - // } - // } - // }); - //获取单号 - // $.ajax({ - // url: prefix + "/getId", - // type: "post", - // dateType: "json", - // success: function (resp) { - // if (resp.code === 0) {$("input[name='salesOrderCode']").val(resp.data);} else {$.modal.msgError("失败啦");} - // }, - // error: function () {$.modal.msgError("后台出错啦!");} - // }); - //获取客户信息 - var options = []; - // $.ajax({ - // type: "get", - // url: ctx + "system/customer/matchCustomerList", - // dataType: "json", - // success: function (res) { - // if (res.code == 0) { - // var resultList = res.data; - // customerList = resultList; - // for (var i = 0, len = resultList.length; i < len; i++) { - // var option = resultList[i]; - // option.id = resultList[i]["enterpriseCode"]; - // option.text = resultList[i]["enterpriseCode"]; - // options.push(option); - // } - // } - // } - // }); - // $("select[name='enterpriseCode']").select2({ - // theme: "bootstrap", - // allowClear: true, - // placeholder: "请选择客户", - // data: options, - // ajax: { - // type: "get", - // url: ctx + "system/customer/matchCustomerList", - // dataType: "json", - // delay: 250, - // timeout: 10000, // 设置超时时间为10秒 - // cache: true, - // processResults: function (res, params) { - // if (res.code == 0) { - // var resultList = res.data; - // customerList = resultList; - // for (var i = 0, len = resultList.length; i < len; i++) { - // var option = resultList[i]; - // option.id = resultList[i]["enterpriseCode"]; - // option.text = resultList[i]["enterpriseCode"]; - // options.push(option); - // } - // } - // return { - // results: options - // }; - // }, - // escapeMarkup: function (markup) { return markup; }, - // minimumInputLength: 1 - // } - // }); $("select[name='enterpriseName']").select2({ theme: "bootstrap", allowClear: true, @@ -670,8 +588,8 @@ // 更新列可见性的函数 function updateColumnVisibility(currencyType,columnName) { var $table = $("#bootstrap-sub-table-order"); - var usdColumns = ['usdTax', 'materialNoUsd', 'materialUsd', 'materialUsdSum', 'materialNoUsdSum']; - var rmbColumns = ['countTax', 'materialNoRmb', 'materialRmb', 'materialNoRmbSum', 'materialRmbSum']; + var usdColumns = [ 'materialNoUsd', 'materialUsd', 'materialUsdSum', 'materialNoUsdSum']; + var rmbColumns = [ 'materialNoRmb', 'materialRmb', 'materialNoRmbSum', 'materialRmbSum']; if (currencyType === '1') { // 隐藏指定的列 usdColumns.forEach(function(columnName) { @@ -682,9 +600,9 @@ $table.bootstrapTable('showColumn', columnName); }); var data = $table.bootstrapTable('getData'); - data.forEach(function(row, index) { - updateColumnValue(index, 0, "usdTax"); - }); + // data.forEach(function(row, index) { + // updateColumnValue(index, 0, "usdTax"); + // }); } else { // 隐藏指定的列 rmbColumns.forEach(function(columnName) { @@ -695,9 +613,9 @@ $table.bootstrapTable('showColumn', columnName); }); var data = $table.bootstrapTable('getData'); - data.forEach(function(row, index) { - updateColumnValue(index, 0, "countTax"); - }); + // data.forEach(function(row, index) { + // updateColumnValue(index, 0, "countTax"); + // }); } } // 更新或清除特定行的指定列的值 @@ -744,6 +662,8 @@ }); $taxArea.find('#taxRate_add').trigger('change'); }else if(selectedValue ==="2"){ + //当弹出美元汇率的时候,自动获取美元汇率 + loadLatestUsdTax(); if($('#usdTax').length!=0){ $('#usdTax').remove(); } @@ -754,7 +674,7 @@ '
' + '' + '
' + - '' + + '' + '
' + '
' ); @@ -947,18 +867,18 @@ warehouseDept: rowData.warehouseDept, countTax: $("#taxRate_add").val(), usdTax: $("#usdTax_add").val(), - materialSole: 0, + materialSole:"", recentQuotationRMB: quotationData.data.materialRmb || '', recentQuotationUSD: quotationData.data.materialUsd || '', materialNum: "", - materialNoRmb: 0.00, - materialNoUsd: 0.00, - materialRmb: 0.00, - materialNoRmbSum: 0.00, - materialRmbSum: 0.00, - materialUsd: 0.00, - materialUsdSum: 0.00, - materialNoUsdSum: 0.00, + materialNoRmb:"", + materialNoUsd: "", + materialRmb: "", + materialNoRmbSum: "", + materialRmbSum: "", + materialUsd: "", + materialUsdSum: "", + materialNoUsdSum:"", expiryDay:"", createBy: "", createTime: "", @@ -1016,7 +936,7 @@ } if($('#usdTax').length!=0){ if ($("#usdTax_add").val() == null || $("#usdTax_add").val() == '') { - $.modal.alertWarning("请输入美元的汇率"); + $.modal.alertWarning("当前未配置美元汇率,请联系总经理"); return; } } @@ -1145,6 +1065,20 @@ $.modal.open("最新报价历史", url); } + + //from的最新美元汇率 + function loadLatestUsdTax() { + var url = ctx + 'system/exchangeRate/getLatestUsdTax'; + $.ajax({ + type: 'GET', // 请求类型 + url: url, // 后端接口URL + dataType: 'json', // 预期服务器返回的数据类型 + success: function(data) { + $("#usdTax_add").val(data.data); + } + }); + } +