From 43906d59efe6c43495ddd13d57df8c7c28cb4092 Mon Sep 17 00:00:00 2001 From: chenhao <852066789@qq.com> Date: Wed, 11 Jun 2025 16:15:09 +0800 Subject: [PATCH] =?UTF-8?q?feat(project):=20=E4=BC=98=E5=8C=96=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E4=BF=A1=E6=81=AF=E6=B7=BB=E5=8A=A0=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E5=92=8C=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -调整表格样式,优化字段布局 - 移除产品配置相关表格 - 增加 POC 测试日志表格 - 更新字段名称和样式 -调整日期格式输入框 --- .../main/resources/static/ruoyi/js/common.js | 19 +- .../templates/layout/product-list.html | 347 +++++++++++++ .../templates/manage/delivery/import.html | 12 + .../resources/templates/project/info/add.html | 376 ++++---------- .../templates/project/info/edit.html | 464 +++++++----------- .../templates/project/info/project.html | 17 +- .../templates/project/order/add.html | 313 ++---------- .../templates/project/order/edit.html | 301 +----------- .../templates/project/order/order.html | 2 +- .../java/com/ruoyi/sip/domain/OrderList.java | 4 +- .../com/ruoyi/sip/domain/ProjectInfo.java | 4 +- .../sip/domain/ProjectOrderConfigInfo.java | 8 +- .../service/impl/ProjectInfoServiceImpl.java | 20 +- .../impl/ProjectPocInfoServiceImpl.java | 4 +- .../mapper/sip/ProjectInfoMapper.xml | 10 +- 15 files changed, 744 insertions(+), 1157 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/layout/product-list.html diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js index d4d5e17b..f85a7020 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js @@ -405,16 +405,17 @@ function endOfTime(date) { } } function formatAmountNumber(num) { - let str = num.toString(); - let result = ""; - while (str.length > 3) { - result = "," + str.slice(-3) + result; - str = str.slice(0, str.length - 3); + if (typeof num == "number"){ + return num.toLocaleString("en-US", { + minimumFractionDigits: 2, + maximumFractionDigits: 2 + }); } - if (str) { - result = str + result; - } - return result; + + return Number(num).toFixed(2).toLocaleString("en-US", { + minimumFractionDigits: 2, + maximumFractionDigits: 2 + }); } /** 重置日期/年月日 */ diff --git a/ruoyi-admin/src/main/resources/templates/layout/product-list.html b/ruoyi-admin/src/main/resources/templates/layout/product-list.html new file mode 100644 index 00000000..d024fb3b --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/layout/product-list.html @@ -0,0 +1,347 @@ + + + + 配置信息表格组件 + + + + +
+
+
配置信息
+
+

软件产品

+ +
+ + + + + + + + + + + + + + + + + + + + +
序号产品编码产品型号描述数量目录单价(¥)指导折扣折扣单价(¥)总价(¥)目录总价(¥)备注操作
+
+

终端产品

+ +
+ + + + + + + + + + + + + + + + + + + + + +
序号产品编码产品型号描述数量目录单价(¥)指导折扣折扣单价(¥)总价(¥)目录总价(¥)备注操作
+
+

服务产品

+ +
+ + + + + + + + + + + + + + + + + + + + +
序号产品编码产品型号描述数量目录单价(¥)指导折扣折扣单价(¥)总价(¥)目录总价(¥)备注操作
+
+ + + + +
+ + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/manage/delivery/import.html b/ruoyi-admin/src/main/resources/templates/manage/delivery/import.html index 15759c21..9e800bb2 100644 --- a/ruoyi-admin/src/main/resources/templates/manage/delivery/import.html +++ b/ruoyi-admin/src/main/resources/templates/manage/delivery/import.html @@ -39,13 +39,16 @@ diff --git a/ruoyi-admin/src/main/resources/templates/project/info/project.html b/ruoyi-admin/src/main/resources/templates/project/info/project.html index c246aff5..bc40c4f9 100644 --- a/ruoyi-admin/src/main/resources/templates/project/info/project.html +++ b/ruoyi-admin/src/main/resources/templates/project/info/project.html @@ -92,14 +92,13 @@ -
  • @@ -114,8 +113,8 @@
    @@ -235,7 +234,10 @@ { field: 'projectGraspDegree', title: '项目把握度', - width: 30 + width: 30, + formatter: function (value, row, index) { + return '
    '+value+'
    ' + } }, { field: 'projectStage', @@ -270,7 +272,10 @@ field: 'updateTime', title: '更新时间', class: 'time3', - width: 160 + width: 160, + formatter: function (value, row, index) { + return value; + } }, { title: '操作', diff --git a/ruoyi-admin/src/main/resources/templates/project/order/add.html b/ruoyi-admin/src/main/resources/templates/project/order/add.html index 4958c098..803ba28b 100644 --- a/ruoyi-admin/src/main/resources/templates/project/order/add.html +++ b/ruoyi-admin/src/main/resources/templates/project/order/add.html @@ -290,84 +290,7 @@
    -
    配置信息
    -
    -

    软件产品

    - -
    - - - - - - - - - - - - - - - - - - - - -
    序号产品编码产品型号描述数量目录单价(RMB)指导折扣折扣单价(RMB)总价(RMB)目录总价(RMB)备注操作
    -
    -

    终端产品

    - -
    - - - - - - - - - - - - - - - - - - - - - -
    序号产品编码产品型号描述数量目录单价(RMB)指导折扣折扣单价(RMB)总价(RMB)目录总价(RMB)备注操作
    -
    -

    服务产品

    - -
    - - - - - - - - - - - - - - - - - - - - - -
    序号产品编码产品型号描述数量目录单价(RMB)指导折扣折扣单价(RMB)总价(RMB)目录总价(RMB)备注操作
    +
    内容-2
    内容-3
    @@ -670,104 +593,6 @@ } - function addProduct(data) { - let length = $('#productTable tbody').find('tr').length - let tr = $(` - -${length + 1} - - - - - - - - - - - - - - - - - - - - -删除 - -`) - $('#productTable tbody').append(tr) - initSearchProduct('1') - initPrice() - } - - function addProduct2(data) { - let length = $('#productTable2 tbody').find('tr').length - let tr = $(` - -${length + 1} - - - - - - - - - - - - - - - - - - - - -删除 - -`) - $('#productTable2 tbody').append(tr) - initSearchProduct('2') - initPrice() - } - - function addProduct3(data) { - let length = $('#productTable3 tbody').find('tr').length - let tr = $(` - -${length + 1} - - - - - - - - - - - - - - - - - - - - -删除 - -`) - $('#productTable3 tbody').append(tr) - initSearchProduct('11,22') - initPrice() - } function addLog() { let length = $('#workLog tbody').find('tr').length @@ -801,58 +626,7 @@ }) } - function initPrice() { - $('.productTable .quantity').on('input', function () { - let num = $(this).val() - let priceVal = $(this).parent().parent().find('.price').val() - let cateVal = $(this).parent().parent().find('.cataloguePrice').val() - if (priceVal && num) { - $(this).parent().parent().find('.allPrice').val((num * priceVal).toFixed(2)) - $(this).parent().parent().find('.allPrice-formmat').val(Number((num * priceVal).toFixed(2)).toLocaleString("en-US")) - } - if (cateVal && num) { - $(this).parent().parent().find('.catalogueAllPrice').val((num * cateVal).toFixed(2)) - $(this).parent().parent().find('.catalogueAllPrice-formmat').val(Number((num * cateVal).toFixed(2)).toLocaleString("en-US")) - } - }) - $('.productTable .cataloguePrice').on('input', function () { - let val = $(this).val() - $(this).parent().parent().find('.price').val(val) - let quantity = $(this).parent().parent().find('.quantity').val() - if (quantity && val) - $(this).parent().parent().find('.catalogueAllPrice').val((val * quantity).toFixed(2)) - $(this).parent().parent().find('.catalogueAllPrice-formmat').val(Number((val * quantity).toFixed(2)).toLocaleString("en-US")) - }) - $('.productTable .guidanceDiscount').on('input', function () { - let val = $(this).val() - let cataloguePrice = $(this).parent().parent().find('.cataloguePrice').val() - $(this).parent().parent().find('.discount').val(val) - $(this).parent().parent().find('.price').val((cataloguePrice * val).toFixed(2)) - let price = $(this).parent().parent().find('.price').val() - let quantity = $(this).parent().parent().find('.quantity').val() - if (price && quantity) { - $(this).parent().parent().find('.allPrice').val((price * quantity).toFixed(2)) - $(this).parent().parent().find('.allPrice-formmat').val(Number((price * quantity).toFixed(2)).toLocaleString("en-US")) - } - }) - $('.productTable .discount').on('input', function () { - let discount = $(this).val() - let val = $(this).parent().parent().find('.cataloguePrice').val() - $(this).parent().parent().find('.price').val((val * discount).toFixed(2)) - let price = $(this).parent().parent().find('.price').val() - $(this).parent().parent().find('.price-formmat').val(Number(price).toLocaleString("en-US")) - let num = $(this).parent().parent().find('.quantity').val() - $(this).parent().parent().find('.allPrice').val((price * num).toFixed(2)) - let allPrice = $(this).parent().parent().find('.allPrice').val() - $(this).parent().parent().find('.allPrice-formmat').val(Number(allPrice).toLocaleString("en-US")) - }) - $('.productTable .price').change('input', function () { - let val = $(this).val() - let num = $(this).parent().parent().find('.quantity').val() - $(this).parent().parent().find('.allPrice').val((val * num).toFixed(2)) - $(this).parent().parent().find('.allPrice-formmat').val(Number((price * quantity).toFixed(2)).toLocaleString("en-US")) - }) - } + function changeBg() { if ($('[name="bgProperty"]').val() != 'YYS') { @@ -960,26 +734,30 @@ ${ $('#productTable2 tbody').html('') $('#productTable3 tbody').html('') data.softwareProjectProductInfoList ? data.softwareProjectProductInfoList.forEach((ele) => { - ele.cataloguePriceFormmat = ele.cataloguePrice ? ele.cataloguePrice.toLocaleString("en-US") : "" - ele.priceFormmat = ele.price ? ele.price.toLocaleString("en-US") : "" - ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? ele.catalogueAllPrice.toLocaleString("en-US") : "" - ele.allPriceFormmat = ele.allPrice ? ele.allPrice.toLocaleString("en-US") : "" + ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : "" + ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : "" + ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : "" + ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : "" + ele.discountFormat = ele.discount ? ele.discount*100 : "" + ele.guidanceDiscountFormat = ele.guidanceDiscount ? ele.guidanceDiscount*100 : "" addProduct(ele) }) : '' data.hardwareProjectProductInfoList ? data.hardwareProjectProductInfoList.forEach((ele) => { - ele.cataloguePriceFormmat = ele.cataloguePrice ? ele.cataloguePrice.toLocaleString("en-US") : "" - - ele.priceFormmat = ele.price ? ele.price.toLocaleString("en-US") : "" - ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? ele.catalogueAllPrice.toLocaleString("en-US") : "" - ele.allPriceFormmat = ele.allPrice ? ele.allPrice.toLocaleString("en-US") : "" + ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : "" + ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : "" + ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : "" + ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : "" + ele.discountFormat = ele.discount ? ele.discount*100 : "" + ele.guidanceDiscountFormat = ele.guidanceDiscount ? ele.guidanceDiscount*100 : "" addProduct2(ele) }) : '' data.maintenanceProjectProductInfoList ? data.maintenanceProjectProductInfoList.forEach((ele) => { - ele.cataloguePriceFormmat = ele.cataloguePrice ? ele.cataloguePrice.toLocaleString("en-US") : "" - - ele.priceFormmat = ele.price ? ele.price.toLocaleString("en-US") : "" - ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? ele.catalogueAllPrice.toLocaleString("en-US") : "" - ele.allPriceFormmat = ele.allPrice ? ele.allPrice.toLocaleString("en-US") : "" + ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : "" + ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : "" + ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : "" + ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : "" + ele.discountFormat = ele.discount ? ele.discount*100 : "" + ele.guidanceDiscountFormat = ele.guidanceDiscount ? ele.guidanceDiscount*100 : "" addProduct3(ele) }) : '' return @@ -990,24 +768,30 @@ ${ $('#productTable2 tbody').html('') $('#productTable3 tbody').html('') res.data.softwareProjectProductInfoList ? res.data.softwareProjectProductInfoList.forEach((ele) => { - ele.cataloguePriceFormmat = ele.cataloguePrice ? ele.cataloguePrice.toLocaleString("en-US") : "" - ele.priceFormmat = ele.price ? ele.price.toLocaleString("en-US") : "" - ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? ele.catalogueAllPrice.toLocaleString("en-US") : "" - ele.allPriceFormmat = ele.allPrice ? ele.allPrice.toLocaleString("en-US") : "" + ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : "" + ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : "" + ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : "" + ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : "" + ele.discountFormat = ele.discount ? ele.discount*100 : "" + ele.guidanceDiscountFormat = ele.guidanceDiscount ? ele.guidanceDiscount*100 : "" addProduct(ele) }) : '' res.data.hardwareProjectProductInfoList ? res.data.hardwareProjectProductInfoList.forEach((ele) => { - ele.cataloguePriceFormmat = ele.cataloguePrice ? ele.cataloguePrice.toLocaleString("en-US") : "" - ele.priceFormmat = ele.price ? ele.price.toLocaleString("en-US") : "" - ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? ele.catalogueAllPrice.toLocaleString("en-US") : "" - ele.allPriceFormmat = ele.allPrice ? ele.allPrice.toLocaleString("en-US") : "" + ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : "" + ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : "" + ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : "" + ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : "" + ele.discountFormat = ele.discount ? ele.discount*100 : "" + ele.guidanceDiscountFormat = ele.guidanceDiscount ? ele.guidanceDiscount*100 : "" addProduct2(ele) }) : '' res.data.maintenanceProjectProductInfoList ? res.data.maintenanceProjectProductInfoList.forEach((ele) => { - ele.cataloguePriceFormmat = ele.cataloguePrice ? ele.cataloguePrice.toLocaleString("en-US") : "" - ele.priceFormmat = ele.price ? ele.price.toLocaleString("en-US") : "" - ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? ele.catalogueAllPrice.toLocaleString("en-US") : "" - ele.allPriceFormmat = ele.allPrice ? ele.allPrice.toLocaleString("en-US") : "" + ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : "" + ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : "" + ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : "" + ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : "" + ele.discountFormat = ele.discount ? ele.discount*100 : "" + ele.guidanceDiscountFormat = ele.guidanceDiscount ? ele.guidanceDiscount*100 : "" addProduct3(ele) }) : '' }) @@ -1045,28 +829,7 @@ ${ }) } - function selectProduct(type, name, ele) { - var url = prefix + "/selectProduct"; - window.localStorage.setItem('procuctType', type) - var options = { - title: '选择' + name, - width: "800", - height: '600', - url: url, - callBack: (index, layero) => { - doSubmitProduct(index, layero, ele) - } - }; - $.modal.openOptions(options); - } - function doSubmitProduct(index, layero, ele) { - var rows = layero.find("iframe")[0].contentWindow.getSelections(); - $(ele).parent().parent().find('.productBomCode').val(rows[0].productCode) - $(ele).parent().parent().find('.model').val(rows[0].model) - $(ele).parent().parent().find('.productDesc').val(rows[0].description) - $.modal.close(index); - } \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/project/order/edit.html b/ruoyi-admin/src/main/resources/templates/project/order/edit.html index 121a1567..87fa250a 100644 --- a/ruoyi-admin/src/main/resources/templates/project/order/edit.html +++ b/ruoyi-admin/src/main/resources/templates/project/order/edit.html @@ -299,86 +299,7 @@
    -
    配置信息
    -
    -

    软件产品

    - -
    - - - - - - - - - - - - - - - - - - - - - -
    序号产品编码产品型号描述数量目录单价(RMB)指导折扣折扣单价(RMB)总价(RMB)目录总价(RMB)备注操作
    -
    -

    终端产品

    - -
    - - - - - - - - - - - - - - - - - - - - - - -
    序号产品编码产品型号描述数量目录单价(RMB)指导折扣折扣单价(RMB)总价(RMB)目录总价(RMB)备注操作
    -
    -

    服务产品

    - -
    - - - - - - - - - - - - - - - - - - - - - -
    序号产品编码产品型号描述数量目录单价(RMB)指导折扣折扣单价(RMB)总价(RMB)目录总价(RMB)备注操作
    +
    内容-2
    内容-3
    @@ -475,6 +396,7 @@ title: "确认并提交订单", maxmin: false, full: false, + id:'confirmOrder', type: 1, btn: ['确认', '取消'], content: ` @@ -488,7 +410,7 @@ yes: function (index, layero) { $.operate.save(prefix + "/edit", $('#form-order-edit').serialize()); }, - end: function () { + end: function (index) { parent.$('.layui-layer-btn').show() } }; @@ -676,104 +598,6 @@ // 添加软件 - function addProduct(data) { - let length = $('#productTable tbody').find('tr').length - let tr = $(` - -${length + 1} - - - - - - - - - - - - - - - - - - - - -删除 - -`) - $('#productTable tbody').append(tr) - initSearchProduct('1') - initPrice() - } - - function addProduct2(data) { - let length = $('#productTable2 tbody').find('tr').length - let tr = $(` - -${length + 1} - - - - - - - - - - - - - - - - - - - - -删除 - -`) - $('#productTable2 tbody').append(tr) - initSearchProduct('2') - initPrice() - } - - function addProduct3(data) { - let length = $('#productTable3 tbody').find('tr').length - let tr = $(` - -${length + 1} - - - - - - - - - - - - - - - - - - - - -删除 - -`) - $('#productTable3 tbody').append(tr) - initSearchProduct('11,22') - initPrice() - } function addLog() { let length = $('#workLog tbody').find('tr').length @@ -807,71 +631,7 @@ }) } - function initPrice() { - $('.productTable .quantity').on('input', function () { - let num = $(this).val() - let priceVal = $(this).parent().parent().find('.price').val() - let cateVal = $(this).parent().parent().find('.cataloguePrice').val() - if (priceVal && num) { - $(this).parent().parent().find('.allPrice').val((num * priceVal).toFixed(2)) - $(this).parent().parent().find('.allPrice-formmat').val(Number((num * priceVal).toFixed(2)).toLocaleString("en-US")) - } - if (cateVal && num) { - $(this).parent().parent().find('.catalogueAllPrice').val((num * cateVal).toFixed(2)) - $(this).parent().parent().find('.catalogueAllPrice-formmat').val(Number((num * cateVal).toFixed(2)).toLocaleString("en-US")) - } - }) - $('.productTable .cataloguePrice').on('input', function () { - let val = $(this).val() - $(this).parent().parent().find('.price').val(val) - let quantity = $(this).parent().parent().find('.quantity').val() - debugger - let discount = $(this).parent().parent().find('.discount').val() - if (val && discount){ - $(this).parent().parent().find('.price').val((val * discount).toFixed(2)) - let price = $(this).parent().parent().find('.price').val() - $(this).parent().parent().find('.price-formmat').val(Number(price).toLocaleString("en-US")) - if (quantity){ - $(this).parent().parent().find('.allPrice').val((val * quantity*discount).toFixed(2)) - let allPrice = $(this).parent().parent().find('.allPrice').val() - $(this).parent().parent().find('.allPrice-formmat').val(Number(allPrice).toLocaleString("en-US")) - } - } - if (quantity && val) - $(this).parent().parent().find('.catalogueAllPrice').val((val * quantity).toFixed(2)) - $(this).parent().parent().find('.catalogueAllPrice-formmat').val(Number((val * quantity).toFixed(2)).toLocaleString("en-US")) - }) - $('.productTable .guidanceDiscount').on('input', function () { - let val = $(this).val() - let cataloguePrice = $(this).parent().parent().find('.cataloguePrice').val() - $(this).parent().parent().find('.discount').val(val) - $(this).parent().parent().find('.price').val((cataloguePrice * val).toFixed(2)) - let price = $(this).parent().parent().find('.price').val() - $(this).parent().parent().find('.price-formmat').val(Number(price).toLocaleString("en-US")) - let quantity = $(this).parent().parent().find('.quantity').val() - if (price && quantity) { - $(this).parent().parent().find('.allPrice').val((price * quantity).toFixed(2)) - $(this).parent().parent().find('.allPrice-formmat').val(Number((price * quantity).toFixed(2)).toLocaleString("en-US")) - } - }) - $('.productTable .discount').on('input', function () { - let discount = $(this).val() - let val = $(this).parent().parent().find('.cataloguePrice').val() - $(this).parent().parent().find('.price').val((val * discount).toFixed(2)) - let price = $(this).parent().parent().find('.price').val() - $(this).parent().parent().find('.price-formmat').val(Number(price).toLocaleString("en-US")) - let num = $(this).parent().parent().find('.quantity').val() - $(this).parent().parent().find('.allPrice').val((price * num).toFixed(2)) - let allPrice = $(this).parent().parent().find('.allPrice').val() - $(this).parent().parent().find('.allPrice-formmat').val(Number(allPrice).toLocaleString("en-US")) - }) - $('.productTable .price').change('input', function () { - let val = $(this).val() - let num = $(this).parent().parent().find('.quantity').val() - $(this).parent().parent().find('.allPrice').val((val * num).toFixed(2)) - $(this).parent().parent().find('.allPrice-formmat').val(Number((price * quantity).toFixed(2)).toLocaleString("en-US")) - }) - } + function changeBg() { if ($('[name="bgProperty"]').val() != 'YYS') { @@ -981,24 +741,30 @@ ${ $('#productTable2 tbody').html('') $('#productTable3 tbody').html('') res.data.softwareProjectProductInfoList ? res.data.softwareProjectProductInfoList.forEach((ele) => { - ele.cataloguePriceFormmat = ele.cataloguePrice ? ele.cataloguePrice.toLocaleString("en-US") : "" - ele.priceFormmat = ele.price ? ele.price.toLocaleString("en-US") : "" - ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? ele.catalogueAllPrice.toLocaleString("en-US") : "" - ele.allPriceFormmat = ele.allPrice ? ele.allPrice.toLocaleString("en-US") : "" + ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : "" + ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : "" + ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : "" + ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : "" + ele.discountFormat = ele.discount ? ele.discount*100 : "" + ele.guidanceDiscountFormat = ele.guidanceDiscount ? ele.guidanceDiscount*100 : "" addProduct(ele) }) : ''; res.data.hardwareProjectProductInfoList ? res.data.hardwareProjectProductInfoList.forEach((ele) => { - ele.cataloguePriceFormmat = ele.cataloguePrice ? ele.cataloguePrice.toLocaleString("en-US") : "" - ele.priceFormmat = ele.price ? ele.price.toLocaleString("en-US") : "" - ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? ele.catalogueAllPrice.toLocaleString("en-US") : "" - ele.allPriceFormmat = ele.allPrice ? ele.allPrice.toLocaleString("en-US") : "" + ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : "" + ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : "" + ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : "" + ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : "" + ele.discountFormat = ele.discount ? ele.discount*100 : "" + ele.guidanceDiscountFormat = ele.guidanceDiscount ? ele.guidanceDiscount*100 : "" addProduct2(ele) }) : ''; res.data.maintenanceProjectProductInfoList ? res.data.maintenanceProjectProductInfoList.forEach((ele) => { - ele.cataloguePriceFormmat = ele.cataloguePrice ? ele.cataloguePrice.toLocaleString("en-US") : "" - ele.priceFormmat = ele.price ? ele.price.toLocaleString("en-US") : "" - ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? ele.catalogueAllPrice.toLocaleString("en-US") : "" - ele.allPriceFormmat = ele.allPrice ? ele.allPrice.toLocaleString("en-US") : "" + ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : "" + ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : "" + ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : "" + ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : "" + ele.discountFormat = ele.discount ? ele.discount*100 : "" + ele.guidanceDiscountFormat = ele.guidanceDiscount ? ele.guidanceDiscount*100 : "" addProduct3(ele) }) : ''; window.localStorage.removeItem('getDetail') @@ -1019,7 +785,7 @@ ${ function initSaveDraft() { let draft = $(` - { - doSubmitProduct(index, layero, ele) - } - }; - $.modal.openOptions(options); - } - function doSubmitProduct(index, layero, ele) { - var rows = layero.find("iframe")[0].contentWindow.getSelections(); - $(ele).parent().parent().find('.productBomCode').val(rows[0].productCode) - $(ele).parent().parent().find('.model').val(rows[0].model) - $(ele).parent().parent().find('.productDesc').val(rows[0].description) - $.modal.close(index); - } \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/project/order/order.html b/ruoyi-admin/src/main/resources/templates/project/order/order.html index d22b3e25..75c5cde1 100644 --- a/ruoyi-admin/src/main/resources/templates/project/order/order.html +++ b/ruoyi-admin/src/main/resources/templates/project/order/order.html @@ -140,7 +140,7 @@ }, { field: 'shipmentAmount', - title: '金额(RMB)', + title: '金额(¥)', formatter: function (value, row, index) { return value?formatAmountNumber(value):''; } diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/OrderList.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/OrderList.java index 000d8e47..2995ed48 100644 --- a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/OrderList.java +++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/OrderList.java @@ -41,13 +41,13 @@ public class OrderList extends BaseEntity private Long quantity; /** 单价 */ - @Excel(name = "目录单价(RMB)") + @Excel(name = "目录单价(¥)") private BigDecimal price; /** 优惠 */ @Excel(name = "折扣") private BigDecimal discount; /** 总价 */ - @Excel(name = "目录总价(RMB)") + @Excel(name = "目录总价(¥)") private BigDecimal amount; @Excel(name = "备注") private String remark; diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/ProjectInfo.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/ProjectInfo.java index 9ad205dc..477c7909 100644 --- a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/ProjectInfo.java +++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/ProjectInfo.java @@ -105,6 +105,8 @@ public class ProjectInfo extends BaseEntity /** 币种 */ // @Excel(name = "币种") private String currencyType; + private String h3cPerson; + private String h3cPhone; /** 预计下单时间 */ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @@ -121,7 +123,7 @@ public class ProjectInfo extends BaseEntity private Date estimatedDeliverTimeEnd; private Date updateTimeStart; private Date updateTimeEnd; - + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") private Date updateTime; /** 竞争对手 */ diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/ProjectOrderConfigInfo.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/ProjectOrderConfigInfo.java index b561ab86..418f3904 100644 --- a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/ProjectOrderConfigInfo.java +++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/ProjectOrderConfigInfo.java @@ -47,7 +47,7 @@ public class ProjectOrderConfigInfo extends BaseEntity private Long quantity; /** 目录单价 */ - @Excel(name = "目录单价(RMB)") + @Excel(name = "目录单价(¥)") private BigDecimal cataloguePrice; /** 指导折扣 */ @Excel(name = "指导折扣") @@ -58,13 +58,13 @@ public class ProjectOrderConfigInfo extends BaseEntity private BigDecimal discount; /** 单价 */ - @Excel(name = "单价(RMB)") + @Excel(name = "单价(¥)") private BigDecimal price; /** 总价 */ - @Excel(name = "总价(RMB)") + @Excel(name = "总价(¥)") private BigDecimal allPrice; /** 目录总价 */ - @Excel(name = "目录总价(RMB)") + @Excel(name = "目录总价(¥)") private BigDecimal catalogueAllPrice; diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/ProjectInfoServiceImpl.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/ProjectInfoServiceImpl.java index 2af25d89..4fd36a7a 100644 --- a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/ProjectInfoServiceImpl.java +++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/ProjectInfoServiceImpl.java @@ -264,7 +264,7 @@ public class ProjectInfoServiceImpl implements IProjectInfoService { logIndex = compareBigDecimalField(logContent, logIndex, "预计金额", oldProjectInfo.getEstimatedAmount(), projectInfo.getEstimatedAmount()); logIndex = compareField(logContent, logIndex, "预计下单时间", formatterDate(oldProjectInfo.getEstimatedOrderTime()), formatterDate(projectInfo.getEstimatedOrderTime())); - logIndex = compareField(logContent, logIndex, "预计发货时间", formatterDate(oldProjectInfo.getEstimatedDeliverTime()), formatterDate(projectInfo.getEstimatedDeliverTime())); +// logIndex = compareField(logContent, logIndex, "预计发货时间", formatterDate(oldProjectInfo.getEstimatedDeliverTime()), formatterDate(projectInfo.getEstimatedDeliverTime())); logIndex = compareField(logContent, logIndex, "竞争对手", oldProjectInfo.getCompetitor(), projectInfo.getCompetitor()); logIndex = compareField(logContent, logIndex, "关键技术问题", oldProjectInfo.getKeyProblem(), projectInfo.getKeyProblem()); logIndex = compareField(logContent, logIndex, "项目简述", oldProjectInfo.getProjectDesc(), projectInfo.getProjectDesc()); @@ -294,7 +294,8 @@ public class ProjectInfoServiceImpl implements IProjectInfoService { logIndex = compareProductInfoList(logContent, logIndex, "配置硬件信息", oldMaintenanceProductList, newMaintenanceProductList); if (logSimpleIndex != logIndex) { - logSimpleContent.add(StringUtils.format("{}.配置信息发生变更", logSimpleContent.length() + 1)); + int index = logSimpleContent.length() + 1; + logSimpleContent.add(StringUtils.format("{}.配置信息发生变更", index)); logSimpleIndex = logIndex; } //记录poc信息变更 @@ -303,7 +304,8 @@ public class ProjectInfoServiceImpl implements IProjectInfoService { if (logSimpleIndex != logIndex) { - logSimpleContent.add(StringUtils.format("{}.poc信息发生变更", logSimpleContent.length() + 1)); + int index = logSimpleContent.length() + 1; + logSimpleContent.add(StringUtils.format("{}.poc信息发生变更", index)); logSimpleIndex = logIndex; } // 插入操作日志 @@ -338,12 +340,12 @@ public class ProjectInfoServiceImpl implements IProjectInfoService { return ++index; } if (oldInfo != null) { - index=compareField(logContent, index, "测试环境", oldInfo.getTestEnvironment(), info.getTestEnvironment()); - index=compareField(logContent, index, "测试进展", oldInfo.getTestProgress(), info.getTestProgress()); - index=compareField(logContent, index, "项目成员信息", oldInfo.getProjectUserInfo(), info.getProjectUserInfo()); - index=compareField(logContent, index, "启动日期", formatterDate(oldInfo.getStartDate()), formatterDate(info.getStartDate())); - index=compareField(logContent, index, "预计完成日期", formatterDate(oldInfo.getPlanFinishTime()), formatterDate(info.getPlanFinishTime())); - index=compareField(logContent, index, "实际完成日期", formatterDate(oldInfo.getRealFinishTime()), formatterDate(info.getRealFinishTime())); + index=compareField(logContent, index, "POC记录测试环境", oldInfo.getTestEnvironment(), info.getTestEnvironment()); + index=compareField(logContent, index, "POC记录测试进展", oldInfo.getTestProgress(), info.getTestProgress()); + index=compareField(logContent, index, "POC记录项目成员信息", oldInfo.getProjectUserInfo(), info.getProjectUserInfo()); + index=compareField(logContent, index, "POC记录启动日期", formatterDate(oldInfo.getStartDate()), formatterDate(info.getStartDate())); + index=compareField(logContent, index, "POC记录预计完成日期", formatterDate(oldInfo.getPlanFinishTime()), formatterDate(info.getPlanFinishTime())); + index=compareField(logContent, index, "POC记录实际完成日期", formatterDate(oldInfo.getRealFinishTime()), formatterDate(info.getRealFinishTime())); } return index; } diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/ProjectPocInfoServiceImpl.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/ProjectPocInfoServiceImpl.java index 898d009a..869fc585 100644 --- a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/ProjectPocInfoServiceImpl.java +++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/ProjectPocInfoServiceImpl.java @@ -110,10 +110,10 @@ public class ProjectPocInfoServiceImpl implements IProjectPocInfoService } List addList = projectPocInfos.stream().filter(projectPocInfo -> projectPocInfo.getId() == null).collect(Collectors.toList()); List updateList = projectPocInfos.stream().filter(projectPocInfo -> projectPocInfo.getId() != null).collect(Collectors.toList()); - if (CollUtil.isEmpty(addList)){ + if (CollUtil.isNotEmpty(addList)){ projectPocInfoMapper.insertBatch(addList); } - if (CollUtil.isEmpty(updateList)){ + if (CollUtil.isNotEmpty(updateList)){ projectPocInfoMapper.updateBatch(updateList); } } diff --git a/ruoyi-sip/src/main/resources/mapper/sip/ProjectInfoMapper.xml b/ruoyi-sip/src/main/resources/mapper/sip/ProjectInfoMapper.xml index ed57d12b..3c9abf49 100644 --- a/ruoyi-sip/src/main/resources/mapper/sip/ProjectInfoMapper.xml +++ b/ruoyi-sip/src/main/resources/mapper/sip/ProjectInfoMapper.xml @@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select id, project_code, project_name,bg_property, customer_code, customer_name, industry_type, agent_code, project_stage, project_grasp_degree, hz_support_user, operate_institution , partner_code, partner_name, contact_way, estimated_amount, currency_type, estimated_order_time, estimated_deliver_time, competitor, country_product, server_configuration - , key_problem, project_desc, create_by, create_time, update_by, update_time,customer_user_name,customer_phone,partner_email,partner_user_name from project_info t1 + , key_problem, project_desc, create_by, create_time, update_by, update_time,customer_user_name,customer_phone,partner_email,partner_user_name,h3c_person,h3c_phone from project_info t1 select t1.id, @@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" t1.create_time, t1.update_by, t1.update_time, - t1.customer_user_name,t1.customer_phone,t1.partner_email,t1.partner_user_name, + t1.customer_user_name,t1.customer_phone,t1.partner_email,t1.partner_user_name,t1.h3c_person,t1.h3c_phone, t2.agent_name,t2.contact_email,t2.contact_phone,t2.contact_person, t3.user_name as hz_support_user_name from project_info t1 @@ -175,6 +175,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" customer_name, customer_user_name, customer_phone, + h3c_person, + h3c_phone, industry_type, bg_property, agent_code, @@ -208,6 +210,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{customerName}, #{customerUserName}, #{customerPhone}, + #{h3cPerson}, + #{h3cPhone}, #{industryType}, #{bgProperty}, #{agentCode}, @@ -245,6 +249,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" customer_name = #{customerName}, customer_user_name=#{customerUserName}, customer_phone=#{customerPhone}, + h3c_phone=#{h3cPhone}, + h3c_person=#{h3cPerson}, bg_property=#{bgProperty}, industry_type = #{industryType}, agent_code = #{agentCode},