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 f85a7020..cbfcb55d 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js @@ -412,7 +412,7 @@ function formatAmountNumber(num) { }); } - return Number(num).toFixed(2).toLocaleString("en-US", { + return Number(num).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 index 7a22eec3..587f78e2 100644 --- a/ruoyi-admin/src/main/resources/templates/layout/product-list.html +++ b/ruoyi-admin/src/main/resources/templates/layout/product-list.html @@ -138,7 +138,10 @@ <td><input readonly class="form-control model" type="text" onclick="selectProduct('1','终端产品',this)" value="${data.model || ''}" name="softwareProjectProductInfoList[${length}].model"></td> <td><textarea name="softwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc || ''}</textarea></td> <td><input value="${data.quantity || ''}" name="softwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td> -<td><input value="${data.cataloguePrice || ''}" name="softwareProjectProductInfoList[${length}].cataloguePrice" readonly type="text" class="form-control cataloguePrice" required></td> +<td> +<input value="${data.cataloguePrice || ''}" name="softwareProjectProductInfoList[${length}].cataloguePrice" readonly type="hidden" class="form-control cataloguePrice" required> +<input value="${data.cataloguePriceFormmat || ''}" readonly type="text" class="form-control cataloguePrice" required> +</td> <td> <input value="${data.guidanceDiscount || ''}" name="softwareProjectProductInfoList[${length}].guidanceDiscount" readonly type="hidden" class="form-control guidanceDiscount" > <label style="display: flex;align-items: center"><input style="width: calc(100% - 10px);" value="${data.guidanceDiscountFormat || ''}" readonly required type="number" min="0" max="100" step="0.1" class="form-control guidance-discount-format" required>% @@ -177,7 +180,10 @@ <td><input readonly class="form-control model" type="text" onclick="selectProduct('2','软件产品',this)" value="${data.model || ''}" name="hardwareProjectProductInfoList[${length}].model"></td> <td><textarea name="hardwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc || ''}</textarea></td> <td><input value="${data.quantity || ''}" name="hardwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td> -<td><input value="${data.cataloguePrice || ''}" name="hardwareProjectProductInfoList[${length}].cataloguePrice" readonly type="text" class="form-control cataloguePrice" required></td> +<td> +<input value="${data.cataloguePrice || ''}" name="hardwareProjectProductInfoList[${length}].cataloguePrice" readonly type="hidden" class="form-control cataloguePrice" required> +<input value="${data.cataloguePriceFormmat || ''}" readonly type="text" class="form-control cataloguePrice" required> +</td> <td> <input value="${data.guidanceDiscount || ''}" name="hardwareProjectProductInfoList[${length}].guidanceDiscount" readonly type="hidden" class="form-control guidanceDiscount" > <label style="display: flex;align-items: center"><input style="width: calc(100% - 10px);" value="${data.guidanceDiscountFormat || ''}" readonly required type="number" min="0" max="100" step="0.01" class="form-control guidance-discount-format" required>% @@ -216,7 +222,9 @@ <td><input readonly class="form-control model" type="text" onclick="selectProduct('11,22','服务产品',this)" value="${data.model || ''}" name="maintenanceProjectProductInfoList[${length}].model"></td> <td><textarea name="maintenanceProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc || ''}</textarea></td> <td><input value="${data.quantity || ''}" name="maintenanceProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td> -<td><input value="${data.cataloguePrice || ''}" name="maintenanceProjectProductInfoList[${length}].cataloguePrice" readonly type="text" class="form-control cataloguePrice" required></td> +<td><input value="${data.cataloguePrice || ''}" name="maintenanceProjectProductInfoList[${length}].cataloguePrice" readonly type="hidden" class="form-control cataloguePrice" required> +<input value="${data.cataloguePriceFormmat || ''}" readonly type="text" class="form-control cataloguePrice" required> +</td> <td> <input value="${data.guidanceDiscount || ''}" name="maintenanceProjectProductInfoList[${length}].guidanceDiscount" readonly type="hidden" class="form-control guidanceDiscount" > <label style="display: flex;align-items: center"><input style="width: calc(100% - 10px);" value="${data.guidanceDiscountFormat || ''}" readonly required type="number" min="0" max="100" step="0.01" class="form-control guidance-discount-format" required>% 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 293aab62..c886dec7 100644 --- a/ruoyi-admin/src/main/resources/templates/project/info/project.html +++ b/ruoyi-admin/src/main/resources/templates/project/info/project.html @@ -13,7 +13,9 @@ justify-content: center; margin-right: 30px; } - + .bootstrap-table table { + table-layout: fixed; + } .sortBox div { font-size: 10px; transform: scale(1.2, 1); @@ -107,6 +109,14 @@ <label>汇智负责人:</label> <input type="text" name="hzSupportUserName"/> </li> + <li> + <label>POC:</label> + <select type="text" name="poc"> + <option value="">请选择POC</option> + <option value="1">是</option> + <option value="0">否</option> + </select> + </li> <li class="timeSearch" style="width: 80%"> <div> @@ -162,7 +172,7 @@ </div> </div> <th:block th:include="include :: footer"/> - +<th:block th:include="include :: bootstrap-table-fixed-columns-js" /> <script th:inline="javascript"> var editFlag = [[${@permission.hasPermi('sip:product:edit')}]]; var removeFlag = [[${@permission.hasPermi('sip:product:remove')}]]; @@ -176,6 +186,8 @@ removeUrl: prefix + "/remove", exportUrl: prefix + "/export", modalName: "项目管理", + fixedColumns: true, + fixedRightNumber:1, columns: [{ checkbox: true }, @@ -188,6 +200,7 @@ { field: 'projectCode', title: '项目编号', + width: 100, escape: true, formatter: (value, row, index) => { if (row.highlight) { @@ -199,15 +212,18 @@ }, { field: 'projectName', - title: '项目名称' + title: '项目名称', + width: 300 }, { field: 'customerName', - title: '最终客户' + title: '最终客户', + width: 200 }, { field: 'bgProperty', title: 'BG', + width: 100, formatter: function (value, row, index) { return $.table.selectDictLabel([[${@dict.getType('bg_type')}]], value); } @@ -215,6 +231,7 @@ { field: 'industryType', title: '行业', + width: 100, formatter: function (value, row, index) { if (row.bgProperty === 'YYS') { return $.table.selectDictLabel([[${@dict.getType('bg_yys')}]], value); @@ -226,12 +243,13 @@ }, { field: 'agentName', - title: '代表处' + title: '代表处', + width: 100 }, { field: 'projectGraspDegree', title: '项目把握度', - width: 30, + width: 100, formatter: function (value, row, index) { return '<div style="text-align: center">'+value+'</div>' } @@ -239,22 +257,29 @@ { field: 'projectStage', title: '项目阶段', + width: 100, formatter: function (value, row, index) { return $.table.selectDictLabel([[${@dict.getType('project_stage')}]], value); } }, { field: 'hzSupportUserName', - title: '汇智负责人' + title: '汇智负责人', + width: 100 }, { - field: 'POC', - title: 'poc' + field: 'poc', + title: 'POC', + width: 100, + formatter: function (value, row, index) { + return value==='1'?'是':'否'; + } }, { field: 'estimatedAmount', title: '预计金额(元)', + width: 140, formatter: function (value, row, index) { return value?formatAmountNumber(value):''; } @@ -277,6 +302,7 @@ { title: '操作', align: 'center', + width: 300, titleTooltip:true, formatter: function (value, row, index) { var actions = []; 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 958cf620..4871da85 100644 --- a/ruoyi-admin/src/main/resources/templates/project/order/order.html +++ b/ruoyi-admin/src/main/resources/templates/project/order/order.html @@ -2,11 +2,15 @@ <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <head> <th:block th:include="include :: header('订单管理列表')" /> + </head> <style> .select-list li p, .select-list li label:not(.radio-box){ width: 80px; } + .bootstrap-table table { + table-layout: fixed; + } .sortBox { display: flex; float: right; @@ -16,7 +20,6 @@ justify-content: center; margin-right: 30px; } - .sortBox div { font-size: 10px; transform: scale(1.2, 1); @@ -131,6 +134,7 @@ </div> </div> <th:block th:include="include :: footer" /> + <th:block th:include="include :: bootstrap-table-fixed-columns-js" /> <th:block th:include="include :: jquery-cxselect-js" /> <script th:inline="javascript"> @@ -194,6 +198,8 @@ removeUrl: prefix + "/remove", exportUrl: prefix + "/export", modalName: "订单管理", + fixedColumns:true, + fixedRightNumber:1, columns: [{ checkbox: true }, @@ -204,23 +210,28 @@ }, { field: 'projectCode', - title: '项目编号' + title: '项目编号', + width:100 }, { field: 'projectName', - title: '项目名称' + title: '项目名称', + width:300, }, { field: 'orderCode', - title: '合同编号' + title: '合同编号', + width:200 }, { field: 'customerName', - title: '最终客户' + title: '最终客户', + width:200 }, { field: 'shipmentAmount', title: '金额(¥)', + width:100, formatter: function (value, row, index) { return value?formatAmountNumber(value):''; } @@ -228,44 +239,53 @@ { field: 'orderStatus', title: '订单状态', + width:100, formatter: function (value, row, index) { return $.table.selectDictLabel([[${@dict.getType('order_status')}]], value); } }, { field: 'agentName', - title: '代表处' + title: '代表处', + width:100 }, { field: 'dutyName', - title: '汇智负责人' + title: '汇智负责人', + width:100 }, { field: '', - title: '物流状态' + title: '物流状态', + width:100 }, { field: 'partnerName', - title: '进货商' + title: '进货商', + width:200 }, { field: 'deliveryTime', title: '到货时间', - class: 'time3' + class: 'time3', + width:200 }, { field: 'estimatedOrderTime', title: '下单时间', - class: 'time4' + class: 'time4', + width:200 }, { field: 'orderEndTime', title: '执行单截止时间', - class: 'time5' + class: 'time5', + width:200 }, { title: '操作', align: 'center', + width:200, formatter: function(value, row, index) { var actions = []; actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editFull(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); 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 7cebc8e1..7e126e44 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 @@ -1,6 +1,7 @@ package com.ruoyi.sip.service.impl; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.date.StopWatch; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.exception.ServiceException; @@ -21,6 +22,7 @@ import java.time.LocalDate; import java.time.Period; import java.time.ZoneId; import java.util.*; +import java.util.concurrent.TimeUnit; import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -108,7 +110,6 @@ public class ProjectInfoServiceImpl implements IProjectInfoService { @Override public List<ProjectInfo> selectProjectInfoList(ProjectInfo projectInfo) { List<ProjectInfo> projectInfos = projectInfoMapper.selectProjectInfoList(projectInfo); - if (CollUtil.isEmpty(projectInfos)){ return projectInfos; } diff --git a/ruoyi-sip/src/main/resources/mapper/sip/ProjectInfoMapper.xml b/ruoyi-sip/src/main/resources/mapper/sip/ProjectInfoMapper.xml index 3c9abf49..9172c52e 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" <sql id="selectProjectInfoVo"> 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,h3c_person,h3c_phone 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,poc from project_info t1 </sql> <sql id="selectRelationProjectInfoVo"> 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.h3c_person,t1.h3c_phone, + t1.customer_user_name,t1.customer_phone,t1.partner_email,t1.partner_user_name,t1.h3c_person,t1.poc,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 @@ -81,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <where> <if test="projectCode != null and projectCode != ''"> and t1.project_code = #{projectCode}</if> <if test="projectName != null and projectName != ''"> and t1.project_name like concat('%', #{projectName}, '%')</if> + <if test="poc != null and poc != ''"> and t1.poc =#{poc}</if> <if test="customerCode != null and customerCode != ''"> and t1.customer_code = #{customerCode}</if> <if test="agentCode != null and agentCode != ''"> and t1.agent_code = #{agentCode}</if> <if test="agentName != null and agentName != ''"> and t2.agent_name like concat('%', #{agentName}, '%')</if> @@ -171,6 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <trim prefix="(" suffix=")" suffixOverrides=","> <if test="projectCode != null">project_code,</if> <if test="projectName != null">project_name,</if> + <if test="poc != null">poc,</if> <if test="customerCode != null">customer_code,</if> <if test="customerName != null">customer_name,</if> <if test="customerUserName != null">customer_user_name,</if> @@ -206,6 +208,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="projectCode != null">#{projectCode},</if> <if test="projectName != null">#{projectName},</if> + <if test="poc != null">#{poc},</if> <if test="customerCode != null">#{customerCode},</if> <if test="customerName != null">#{customerName},</if> <if test="customerUserName != null">#{customerUserName},</if> @@ -245,6 +248,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <trim prefix="SET" suffixOverrides=","> <if test="projectCode != null">project_code = #{projectCode},</if> <if test="projectName != null">project_name = #{projectName},</if> + <if test="poc != null">poc = #{poc},</if> <if test="customerCode != null">customer_code = #{customerCode},</if> <if test="customerName != null">customer_name = #{customerName},</if> <if test="customerUserName != null">customer_user_name=#{customerUserName},</if>