feat(project): 优化项目信息添加页面布局和功能

-调整表格样式,优化字段布局
- 移除产品配置相关表格
- 增加 POC 测试日志表格
- 更新字段名称和样式
-调整日期格式输入框
master
chenhao 2025-06-11 16:15:09 +08:00
parent 18d586ce9f
commit 43906d59ef
15 changed files with 744 additions and 1157 deletions

View File

@ -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
});
}
/** 重置日期/年月日 */

View File

@ -0,0 +1,347 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>配置信息表格组件</title>
</head>
<style>
.add-btn-div {
display: flex;
justify-content: space-between;
}
.add-btn {
background: #409eff;
color: #fff;
border: none;
padding: 5px 10px;
cursor: pointer;
margin-bottom: 5px;
}
.section-title {
font-weight: bold;
font-size: 30px;
padding: 10px 0;
color: #0075ff;
}
</style>
<body>
<div id="config-info-component" th:fragment="configInfoTable()">
<div class="layui-tab">
<div class="section-title">配置信息</div>
<div class="add-btn-div">
<h3>软件产品</h3>
<button type="button" class="add-btn" onclick="addProduct({})">添加</button>
</div>
<table id="productTable" class="productTable">
<thead>
<tr>
<th style="width: 50px">序号</th>
<th style="width: 100px;">产品编码</th>
<th style="width: 150px;">产品型号</th>
<th style="min-width: 400px;">描述</th>
<th style="width: 90px;">数量</th>
<th style="min-width: 90px">目录单价(¥)</th>
<th style="min-width: 90px">指导折扣</th>
<th style="width: 94px;">折扣</th>
<th style="width: 100px;">单价(¥)</th>
<th style="min-width: 120px">总价(¥)</th>
<th style="min-width: 120px">目录总价(¥)</th>
<th style="min-width: 120px">备注</th>
<th style="min-width: 60px">操作</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="add-btn-div">
<h3>终端产品</h3>
<button type="button" class="add-btn" onclick="addProduct2({})">添加</button>
</div>
<table id="productTable2" class="productTable">
<thead>
<tr>
<th style="width: 50px">序号</th>
<th style="width: 100px;">产品编码</th>
<th style="width: 150px;">产品型号</th>
<th style="min-width: 400px;">描述</th>
<th style="width: 90px;">数量</th>
<th style="min-width: 90px">目录单价(¥)</th>
<th style="min-width: 90px">指导折扣</th>
<th style="width: 94px;">折扣</th>
<th style="width: 100px;">单价(¥)</th>
<th style="min-width: 120px">总价(¥)</th>
<th style="min-width: 120px">目录总价(¥)</th>
<th style="min-width: 120px">备注</th>
<th style="min-width: 60px">操作</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="add-btn-div">
<h3>服务产品</h3>
<button type="button" class="add-btn" onclick="addProduct3({})">添加</button>
</div>
<table id="productTable3" class="productTable">
<thead>
<tr>
<th style="width: 50px">序号</th>
<th style="width: 100px;">产品编码</th>
<th style="width: 150px;">产品型号</th>
<th style="min-width: 400px;">描述</th>
<th style="width: 90px;">数量</th>
<th style="min-width: 90px">目录单价(¥)</th>
<th style="min-width: 90px">指导折扣</th>
<th style="width: 94px;">折扣</th>
<th style="width: 100px;">单价(¥)</th>
<th style="min-width: 120px">总价(¥)</th>
<th style="min-width: 120px">目录总价(¥)</th>
<th style="min-width: 120px">备注</th>
<th style="min-width: 60px">操作</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<!-- JS 函数引用或内联 -->
<script th:inline="javascript"> /*<![CDATA[*/
document.addEventListener("DOMContentLoaded", function () {
// 初始化删除逻辑等
$('.productTable .delRow').on('click', function () {
let ele = $(this);
$.modal.confirm('是否确认删除', function () {
$(ele).parent().parent().remove();
updateIndices();
});
});
function updateIndices() {
$('#productTable tbody tr').each(function (index) {
$(this).find('.indexBox').text(index + 1);
});
}
});
function addProduct(data) {
let length = $('#productTable tbody').find('tr').length
let tr = $(`
<tr>
<td style="text-align: center;" class="indexBox">${length + 1}</td>
<td> <input type="hidden" name="softwareProjectProductInfoList[${length}].id" value="${data.id || ''}"><input class="form-control productBomCode" type="text" onclick="selectProduct('1','终端产品',this)" value="${data.productBomCode || ''}" name="softwareProjectProductInfoList[${length}].productBomCode"></td>
<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.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 discount-format" required>%
</label>
</td>
<td><input value="${data.discount || ''}" name="maintenanceProjectProductInfoList[${length}].discount" type="hidden" class="form-control discount" required>
<label style="display: flex;align-items: center"><input style="width: calc(100% - 10px);" value="${data.discountFormat || ''}" required type="number" min="0" max="100" step="0.1" class="form-control discount-format" required>%
</label></td>
<td>
<input value="${data.price || ''}" name="softwareProjectProductInfoList[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" required readonly>
<input type="text" value="${data.priceFormmat || ''}" class="form-control price-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.allPrice || ''}" name="softwareProjectProductInfoList[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.allPriceFormmat || ''}" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.catalogueAllPrice || ''}" name="softwareProjectProductInfoList[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.catalogueAllPriceFormmat || ''}" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td><input value="${data.remark || ''}" name="softwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
<td><span style="cursor:pointer;color: #ff5722" class="delRow">删除</span></td>
</tr>`)
$('#productTable tbody').append(tr)
initSearchProduct('1')
initPrice()
}
function addProduct2(data) {
let length = $('#productTable2 tbody').find('tr').length
let tr = $(`
<tr>
<td style="text-align: center;" class="indexBox">${length + 1}</td>
<td> <input type="hidden" name="hardwareProjectProductInfoList[${length}].id" value="${data.id || ''}"><input class="form-control productBomCode" type="text" onclick="selectProduct('2','软件产品',this)" value="${data.productBomCode || ''}" name="hardwareProjectProductInfoList[${length}].productBomCode"></td>
<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.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 discount-format" required>%
</label>
</td>
<td><input value="${data.discount || ''}" name="maintenanceProjectProductInfoList[${length}].discount" type="hidden" class="form-control discount" required>
<label style="display: flex;align-items: center"><input style="width: calc(100% - 10px);" value="${data.discountFormat || ''}" required type="number" min="0" max="100" step="0.1" class="form-control discount-format" required>%
</label></td>
<td>
<input value="${data.price || ''}" name="hardwareProjectProductInfoList[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" required readonly>
<input type="text" value="${data.priceFormmat || ''}" class="form-control price-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.allPrice || ''}" name="hardwareProjectProductInfoList[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.allPriceFormmat || ''}" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.catalogueAllPrice || ''}" name="hardwareProjectProductInfoList[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.catalogueAllPriceFormmat || ''}" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td><input value="${data.remark || ''}" name="hardwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
<td><span style="cursor:pointer;color: #ff5722" class="delRow">删除</span></td>
</tr>`)
$('#productTable2 tbody').append(tr)
initSearchProduct('2')
initPrice()
}
function addProduct3(data) {
let length = $('#productTable3 tbody').find('tr').length
let tr = $(`
<tr>
<td style="text-align: center;" class="indexBox">${length + 1}</td>
<td> <input type="hidden" name="maintenanceProjectProductInfoList[${length}].id" value="${data.id || ''}"><input class="form-control productBomCode" type="text" onclick="selectProduct('11,22','服务产品',this)" value="${data.productBomCode || ''}" name="maintenanceProjectProductInfoList[${length}].productBomCode"></td>
<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.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 discount-format" required>%
</label>
</td>
<td><input value="${data.discount || ''}" name="maintenanceProjectProductInfoList[${length}].discount" type="hidden" class="form-control discount" required>
<label style="display: flex;align-items: center"><input style="width: calc(100% - 10px);" value="${data.discountFormat || ''}" type="number" min="0" max="100" step="0.1" class="form-control discount-format" required>%
</label>
</td>
<td>
<input value="${data.price || ''}" name="maintenanceProjectProductInfoList[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" required readonly>
<input type="text" value="${data.priceFormmat || ''}" class="form-control price-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.allPrice || ''}" name="maintenanceProjectProductInfoList[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.allPriceFormmat || ''}" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.catalogueAllPrice || ''}" name="maintenanceProjectProductInfoList[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.catalogueAllPriceFormmat || ''}" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td><input value="${data.remark || ''}" name="maintenanceProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
<td><span style="cursor:pointer;color: #ff5722" class="delRow">删除</span></td>
</tr>`)
$('#productTable3 tbody').append(tr)
initSearchProduct('11,22')
initPrice()
}
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(formatAmountNumber((num * priceVal).toFixed(2)))
}
if (cateVal && num) {
$(this).parent().parent().find('.catalogueAllPrice').val((num * cateVal).toFixed(2))
$(this).parent().parent().find('.catalogueAllPrice-formmat').val(formatAmountNumber((num * cateVal).toFixed(2)))
}
})
$('.productTable .cataloguePrice').on('input', function () {
let val = $(this).val()
$(this).parent().parent().find('.price').val(val)
let quantity = $(this).parent().parent().find('.quantity').val()
let discount=$(this).parent().parent().find('.discount').val()
if (discount && 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(formatAmountNumber(price))
if (quantity){
$(this).parent().parent().find('.allPrice').val((quantity * val * discount).toFixed(2))
let allPrice = $(this).parent().parent().find('.allPrice').val()
$(this).parent().parent().find('.allPrice-formmat').val(formatAmountNumber(allPrice))
}
}
if (quantity && val) {
$(this).parent().parent().find('.catalogueAllPrice').val((val * quantity).toFixed(2))
$(this).parent().parent().find('.catalogueAllPrice-formmat').val(formatAmountNumber((val * quantity).toFixed(2)))
}
})
// $('.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))
// $(this).parent().parent().find('.price-formmat').val(Number((cataloguePrice * val).toFixed(2)).toLocaleString("en-US"))
// 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-format').on('change', function () {
let percentageDiscount = $(this).val()
let discount = (percentageDiscount/100).toFixed(3)
$(this).parent().parent().find('.discount').val(discount)
let val = $(this).parent().parent().parent().find('.cataloguePrice').val()
$(this).parent().parent().parent().find('.price').val((val * discount).toFixed(2))
let price = $(this).parent().parent().parent().find('.price').val()
$(this).parent().parent().parent().find('.price-formmat').val(formatAmountNumber(price))
let num = $(this).parent().parent().parent().find('.quantity').val()
$(this).parent().parent().parent().find('.allPrice').val((price * num).toFixed(2))
let allPrice = $(this).parent().parent().parent().find('.allPrice').val()
$(this).parent().parent().parent().find('.allPrice-formmat').val(formatAmountNumber(allPrice))
})
$('.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(formatAmountNumber((val * num).toFixed(2)))
})
}
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);
}
/*]]>*/
</script>
</div>
</body>
</html>

View File

@ -39,13 +39,16 @@
<script>
var prefix=ctx+'sip/list'
var removeFlag = [[${@permission.hasPermi('manage:delivery:import:remove')}]]
$(function() {
var options = {
url: prefix + "/list",
removeUrl: prefix + "/remove",
showSearch:false,
showColumns:false,
showToggle:false,
showPageGo:true,
modalName: "发货清单",
params:{
deliveryId:$('#bootstrap-table').attr('deliveryid')
},
@ -84,6 +87,15 @@ url: prefix + "/list",
field: 'remark',
title: '备注'
},
// {
// title: '操作',
// align: 'center',
// formatter: function(value, row, index) {
// var actions = [];
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// }
]
};
$.table.init(options);

View File

@ -22,6 +22,9 @@
.is-required {
color: red;
display: inline-block;
vertical-align: middle;
font-size: 25px;
}
th {
@ -101,7 +104,7 @@
<td colspan="2" ><input type="text" name="projectCode" class="form-control" placeholder="保存后自动生成"
readonly>
</td>
<td class="shortTd">项目名称<span class="is-required">*</span></td>
<td class="shortTd" style="text-align: right;">项目名称<span class="is-required">*</span></td>
<td colspan="2"><input type="text" name="projectName" maxlength="40" placeholder="限制40个字符"
class="form-control"></td>
@ -148,7 +151,6 @@
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
</select>
</td>
@ -161,17 +163,17 @@
<td class="shortTd">最终客户<span class="is-required">*</span></td>
<td><input name="customerName" class="form-control" type="text" required onclick="selectCustomer()">
<input name="customerCode" class="form-control" type="hidden"></td>
<td class="shortTd">联系人</td>
<td class="shortTd">客户联系人</td>
<td><input name="customerUserName" class="form-control" type="text">
</td>
<td class="shortTd">联系方式</td>
<td><input name="customerPhone" class="form-control" type="text">
<td class="shortTd">最终客户 TEL</td>
<td><input name="customerPhone" maxlength="11" class="form-control" type="text">
</td>
</tr>
</tr>
<tr>
<td>合作渠道<span class="is-required">*</span></td>
<td colspan="2">
<td>运作方<span class="is-required">*</span></td>
<td >
<select name="operateInstitution" class="form-control"
th:with="type=${@dict.getType('operate_institution')}"
onchange="changeInstitution()">
@ -180,21 +182,29 @@
th:value="${dict.dictValue}"></option>
</select>
</td>
<td>代理商<span class="is-required">*</span></td>
<td colspan="2">
<input name="partnerName" class="form-control" type="text" required
onclick="selectPartner()">
<input name="partnerCode" class="form-control" type="hidden">
<td>H3C联系人</td>
<td >
<input name="h3cPerson" class="form-control" type="text"
>
</td>
<td>H3C TEL</td>
<td >
<input name="h3cPhone " class="form-control" type="text"
>
</td>
</tr>
<tr>
<td>代理商<span class="is-required">*</span></td>
<td >
<input name="partnerName" class="form-control" type="text" required
onclick="selectPartner()">
<input name="partnerCode" class="form-control" type="hidden">
</td>
<td>代理商联系人<span class="is-required">*</span></td>
<td><input name="partnerUserName" class="form-control" type="text" required></td>
<td>Email</td>
<td><input name="partnerEmail" class="form-control" type="text"></td>
<td>联系方式</td>
<td><input name="contactWay" class="form-control" type="text"></td>
<td>代理商 TEL</td>
<td><input name="contactWay" class="form-control" maxlength="11" type="text"></td>
</tr>
<tr>
@ -206,8 +216,8 @@
onblur="updateRawValue()">
<input type="hidden" id="estimatedAmount" name="estimatedAmount" class="form-control" >
</td>
<td>预计发货时间</td>
<td><input name="estimatedDeliverTime" class="form-control" autocomplete="off" placeholder="yyyy-MM-dd"
<td>预计下单时间</td>
<td><input name="estimatedOrderTime" class="form-control" autocomplete="off" placeholder="yyyy-MM-dd"
></td>
<td>POC测试</td>
<td>
@ -246,102 +256,24 @@
</tr>
<tr>
<td>关键技术问题</td>
<td colspan="5"><input type="text" name="keyProblem" style="width:98%;"
class="form-control" maxlength="200" placeholder="限制200个字符"></td>
<td colspan="5"><textarea rows="2" type="text" name="keyProblem"
class="form-control" maxlength="200" placeholder="限制200个字符"></textarea></td>
</tr>
<tr>
<td>项目简述<span class="is-required">*</span></td>
<td colspan="5"><textarea name="projectDesc" style="width:98%;" rows="2"
<td colspan="5"><textarea name="projectDesc" rows="2"
class="form-control" required maxlength="200"
placeholder="限制200个字符"></textarea>
</td>
</tr>
<tr>
<td>服务器配置</td>
<td colspan="5"><textarea name="serverConfiguration" class="form-control" maxlength="200"
<td colspan="5"><textarea rows="2" name="serverConfiguration" class="form-control" maxlength="200"
placeholder="限制200个字符"></textarea></td>
</tr>
</table>
<div class="section-title">配置信息</div>
<div class="add-btn-div">
<h3>软件产品</h3>
<button type="button" class="add-btn" onclick="addProduct()">添加</button>
</div>
<table id="productTable" class="productTable">
<thead>
<tr>
<th>序号</th>
<th>产品编码</th>
<th>产品型号</th>
<th>描述</th>
<th>数量</th>
<th style="width: 90px">目录单价(RMB)</th>
<th style="width: 90px">指导折扣</th>
<th style="width: 90px">折扣</th>
<th style="width: 90px">单价(RMB)</th>
<th style="width: 120px">总价(RMB)</th>
<th style="width: 120px">目录总价(RMB)</th>
<th>备注</th>
<th style="width: 60px">操作</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="add-btn-div">
<h3>终端产品</h3>
<button type="button" class="add-btn" onclick="addProduct2()">添加</button>
</div>
<table id="productTable2" class="productTable">
<thead>
<tr>
<th>序号</th>
<th>产品编码</th>
<th>产品型号</th>
<th>描述</th>
<th>数量</th>
<th style="width: 90px">目录单价(RMB)</th>
<th style="width: 90px">指导折扣</th>
<th style="width: 90px">折扣</th>
<th style="width: 90px">单价(RMB)</th>
<th style="width: 120px">总价(RMB)</th>
<th style="width: 120px">目录总价(RMB)</th>
<th>备注</th>
<th style="width: 60px">操作</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="add-btn-div">
<h3>服务产品</h3>
<button type="button" class="add-btn" onclick="addProduct3()">添加</button>
</div>
<table id="productTable3" class="productTable">
<thead>
<tr>
<th>序号</th>
<th>产品编码</th>
<th>产品型号</th>
<th>描述</th>
<th>数量</th>
<th style="width: 90px">目录单价(RMB)</th>
<th style="width: 90px">指导折扣</th>
<th style="width: 90px">折扣</th>
<th style="width: 90px">单价(RMB)</th>
<th style="width: 120px">总价(RMB)</th>
<th style="width: 120px">目录总价(RMB)</th>
<th>备注</th>
<th style="width: 60px">操作</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div th:replace="layout/product-list::configInfoTable()"></div>
<div class="layui-tab">
<ul class="layui-tab-title">
<li class="layui-this" lay-id="11">工作进度</li>
@ -356,17 +288,45 @@
<table id="workLog">
<thead>
<tr>
<th>序号</th>
<th style="width: 50px">序号</th>
<th>更新内容</th>
<th>更新人员</th>
<th>更新时间</th>
<th style="width: 100px">更新人员</th>
<th style="width: 120px">更新时间</th>
</tr>
</thead>
<tbody></tbody>
<!-- 可动态添加行 -->
</table>
</div>
<div class="layui-tab-item">
<div style="display: flex;flex-direction: row-reverse;">
<button type="button" class="add-btn" onclick="addPocLog({})">添加</button>
</div>
<table id="pocLog">
<thead>
<tr>
<th style="white-space: pre-line">测试环境
1.服务器配置
2.终端配置
3.操作系统
4.云桌面软件版本
</th>
<th>测试进展</th>
<th style="white-space: pre-line">项目成员信息
1.H3C销售/SE
2.汇智接口人
3.研发处理人员
4.现场处理人员
</th>
<th style="width: 110px">启动日期</th>
<th style="width: 110px">预计完成日期</th>
<th style="width: 110px">实际完成日期</th>
</tr>
</thead>
<tbody></tbody>
<!-- 可动态添加行 -->
</table>
</div>
<div class="layui-tab-item"></div>
</div>
</div>
</form>
@ -487,28 +447,6 @@
$.modal.openOptions(options);
}
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);
}
function doSubmitCustomer(index, layero) {
var rows = layero.find("iframe")[0].contentWindow.getSelections();
@ -564,104 +502,7 @@
}
// 添加软件
function addProduct() {
let length = $('#productTable tbody').find('tr').length
let tr = $(`
<tr>
<td class="indexBox">${length + 1}</td>
<td><input class="form-control productBomCode" type="text" onclick="selectProduct('1','终端产品',this)" name="softwareProjectProductInfoList[${length}].productBomCode"></td>
<td><input class="form-control model" type="text" onclick="selectProduct('1','终端产品',this)" name="softwareProjectProductInfoList[${length}].model"></td>
<td><textarea name="softwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${softwareProjectProductInfoList[0]?.description || ''}</textarea></td>
<td><input name="softwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
<td><input name="softwareProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
<td><input name="softwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
<td><input name="softwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
<td>
<input name="softwareProjectProductInfoList[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" readonly>
<input type="text" class="form-control price-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input name="softwareProjectProductInfoList[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" readonly>
<input type="text" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input name="softwareProjectProductInfoList[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" readonly>
<input type="text" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td><input name="softwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
<td><span style="cursor:pointer;color: #ff5722" class="delRow">删除</span></td>
</tr>`)
$('#productTable tbody').append(tr)
initSearchProduct('1')
initPrice()
}
function addProduct2() {
let length = $('#productTable2 tbody').find('tr').length
let tr = $(`
<tr>
<td class="indexBox">${length + 1}</td>
<td><input class="form-control productBomCode" type="text" onclick="selectProduct('2','软件产品',this)" name="hardwareProjectProductInfoList[${length}].productBomCode"></td>
<td><input class="form-control model" type="text" onclick="selectProduct('2','软件产品',this)" name="hardwareProjectProductInfoList[${length}].model"></td>
<td><textarea name="hardwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${hardwareProjectProductInfoList[0]?.description || ''}</textarea></td>
<td><input name="hardwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
<td><input name="hardwareProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
<td><input name="hardwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
<td><input name="hardwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
<td>
<input name="hardwareProjectProductInfoList[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" readonly>
<input type="text" class="form-control price-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input name="hardwareProjectProductInfoList[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" readonly>
<input type="text" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input name="hardwareProjectProductInfoList[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" readonly>
<input type="text" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td><input name="hardwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
<td><span style="cursor:pointer;color: #ff5722" class="delRow">删除</span></td>
</tr>`)
$('#productTable2 tbody').append(tr)
initSearchProduct('2')
initPrice()
}
function addProduct3() {
let length = $('#productTable3 tbody').find('tr').length
let tr = $(`
<tr>
<td class="indexBox">${length + 1}</td>
<td><input class="form-control productBomCode" type="text" onclick="selectProduct('11,22','服务产品',this)" name="maintenanceProjectProductInfoList[${length}].productBomCode"></td>
<td><input class="form-control model" type="text" onclick="selectProduct('11,22','服务产品',this)" name="maintenanceProjectProductInfoList[${length}].model"></td>
<td><textarea name="maintenanceProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${maintenanceProjectProductInfoList[0]?.description || ''}</textarea></td>
<td><input name="maintenanceProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
<td><input name="maintenanceProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
<td><input name="maintenanceProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
<td><input name="maintenanceProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
<td>
<input name="maintenanceProjectProductInfoList[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" readonly>
<input type="text" class="form-control price-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input name="maintenanceProjectProductInfoList[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" readonly>
<input type="text" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input name="maintenanceProjectProductInfoList[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" readonly>
<input type="text" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td><input name="maintenanceProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
<td><span style="cursor:pointer;color: #ff5722" class="delRow">删除</span></td>
</tr>`)
$('#productTable3 tbody').append(tr)
initSearchProduct('11,22')
initPrice()
}
function addLog() {
let length = $('#workLog tbody').find('tr').length
@ -675,7 +516,41 @@
$('#workLog tbody').append(tr)
}
function addPocLog(data) {
let length = $('#workLog tbody').find('tr').length
let tr = $(`
<tr>
<td><input type="hidden" value="${data.id || ''}" name="projectPocInfo.id">
<input type="text" onclick="showDetailValue(this,true)" name="projectPocInfo.testEnvironment" class="form-control" required value="${data.testEnvironment || ''}"></input></td>
<td><input type="text" onclick="showDetailValue(this,true)" name="projectPocInfo.testProgress" class="form-control" required value="${data.testProgress || ''}"></input></td>
<td><input type="text" onclick="showDetailValue(this,true)" name="projectPocInfo.projectUserInfo" class="form-control" required value="${data.projectUserInfo || ''}"></input></td>
<td><input name="projectPocInfo.startDate" autocomplete="off" class="form-control" placeholder="yyyy-MM-dd"></td>
<td><input name="projectPocInfo.planFinishTime" autocomplete="off" class="form-control" placeholder="yyyy-MM-dd"></td>
<td><input name="projectPocInfo.realFinishTime" autocomplete="off" class="form-control" placeholder="yyyy-MM-dd"></td>
</tr>`)
$('#pocLog tbody').append(tr)
$("input[name='projectPocInfo.startDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true,
pickerPosition:"top-right"
});
$("input[name='projectPocInfo.planFinishTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true,
pickerPosition:"top-right"
});
$("input[name='projectPocInfo.realFinishTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true,
pickerPosition:"top-right"
});
}
function initSearchProduct(type) {
$('.productTable .delRow').on('click', function () {
let ele = $(this)
@ -695,60 +570,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))
$(this).parent().parent().find('.price-formmat').val(Number((cataloguePrice * val).toFixed(2)).toLocaleString("en-US"))
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((val * num).toFixed(2)).toLocaleString("en-US"))
})
}
function changeInstitution() {
if ($('[name="operateInstitution"]').val() == 'h3c') {

View File

@ -22,6 +22,9 @@
.is-required {
color: red;
display: inline-block;
vertical-align: middle;
font-size: 25px;
}
th {
@ -34,7 +37,12 @@
padding: 10px 0;
color: #0075ff;
}
.discount-format::after{
content: "%"; /* 或其他后缀 */
position: absolute; /* 或使用 relative 和 left/right */
right: 5px; /* 根据需要调整 */
pointer-events: none; /* 防止点击后缀 */
}
.checkbox-group label {
margin-right: 20px;
}
@ -92,19 +100,25 @@
label {
margin-bottom: 0 !important;
}
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form id="form-product-add" th:object="${projectInfo}">
<input type="hidden" name="id" th:field="*{id}">
<div class="section-title">项目信息</div>
<div style="display: flex;justify-content: space-between;">
<div class="section-title">项目信息</div>
<div>更新时间:<span style="margin-left: 10px" th:text="*{#dates.format(updateTime, 'yyyy-MM-dd')}"></span>
</div>
</div>
<table>
<tr>
<td class="shortTd">项目编码<span class="is-required">*</span></td>
<td colspan="2"><input type="text" th:field="*{projectCode}" name="projectCode" class="form-control"
placeholder="保存后自动生成" readonly>
</td>
<td class="shortTd">项目名称<span class="is-required">*</span></td>
<td class="shortTd" style=" text-align: right;">项目名称<span class="is-required">*</span></td>
<td colspan="2"><input type="text" th:field="*{projectName}" name="projectName" maxlength="40"
placeholder="限制40个字符"
class="form-control"></td>
@ -152,7 +166,6 @@
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
</select>
</td>
@ -167,16 +180,16 @@
<td><input name="customerName" class="form-control" th:field="*{customerName}" type="text" required
onclick="selectCustomer()">
<input name="customerCode" class="form-control" th:field="*{customerCode}" type="hidden"></td>
<td class="shortTd">联系人</td>
<td class="shortTd">客户联系人</td>
<td><input name="customerUserName" class="form-control" type="text" th:field="*{customerUserName}">
</td>
<td class="shortTd">联系方式</td>
<td class="shortTd">客户 TEL</td>
<td><input name="customerPhone" class="form-control" type="text" th:field="*{customerPhone}">
</td>
</tr>
<tr>
<td>合作渠道</td>
<td colspan="2">
<td>运作方</td>
<td >
<select name="operateInstitution" class="form-control"
th:with="type=${@dict.getType('operate_institution')}"
onchange="changeInstitution()" th:field="*{operateInstitution}">
@ -185,20 +198,30 @@
th:value="${dict.dictValue}"></option>
</select>
</td>
<td>H3C联系人</td>
<td >
<input name="h3cPerson" class="form-control" type="text" th:field="*{h3cPerson}"
>
</td>
<td>H3C TEL</td>
<td >
<input name="h3cPhone " class="form-control" type="text" th:field="*{h3cPhone}"
>
</td>
</tr>
<tr>
<td>代理商<span class="is-required">*</span></td>
<td colspan="2">
<td >
<input name="partnerName" class="form-control" type="text" required
onclick="selectPartner()" th:field="*{partnerName}">
<input name="partnerCode" class="form-control" type="hidden" th:field="*{partnerCode}">
</td>
</tr>
<tr>
<td>代理商联系人<span class="is-required">*</span></td>
<td><input name="partnerUserName" th:field="*{partnerUserName}" class="form-control" type="text"
required></td>
<td>Email</td>
<td><input name="partnerEmail" th:field="*{partnerEmail}" class="form-control" type="text"></td>
<td>联系方式</td>
<td>代理商 TEL</td>
<td><input name="contactWay" th:field="*{contactWay}" class="form-control" type="text"></td>
</tr>
<tr>
@ -212,9 +235,9 @@
<input type="hidden" th:field="*{estimatedAmount}" id="estimatedAmount" name="estimatedAmount"
class="form-control">
</td>
<td>预计发货时间</td>
<td><input name="estimatedDeliverTime" autocomplete="off" class="form-control" placeholder="yyyy-MM-dd"
th:value="${#dates.format(projectInfo.estimatedDeliverTime, 'yyyy-MM-dd')}"></td>
<td>预计下单时间</td>
<td><input name="estimatedOrderTime" autocomplete="off" class="form-control" placeholder="yyyy-MM-dd"
th:value="${#dates.format(projectInfo.estimatedOrderTime, 'yyyy-MM-dd')}"></td>
<td>POC测试</td>
<td>
<select name="countryProduct" class="form-control" th:field="*{countryProduct}" readonly="">
@ -250,107 +273,31 @@
</tr>
<tr>
<td>关键技术问题</td>
<td colspan="5"><input type="text" name="keyProblem" style="width:98%;"
<td colspan="5"><textarea rows="2" type="text" name="keyProblem"
class="form-control" maxlength="200" th:field="*{keyProblem}"
placeholder="限制200个字符"></td>
placeholder="限制200个字符"></textarea></td>
</tr>
<tr>
<td>项目简述<span class="is-required">*</span></td>
<td colspan="5"><textarea name="projectDesc" style="width:98%;" rows="2"
<td colspan="5"><textarea name="projectDesc" rows="2"
class="form-control" required maxlength="200"
placeholder="限制200个字符" th:field="*{projectDesc}"></textarea>
</td>
</tr>
<tr>
<td>服务器配置</td>
<td colspan="5"><textarea name="serverConfiguration" class="form-control" maxlength="200"
<td colspan="5"><textarea name="serverConfiguration" class="form-control" maxlength="200" rows="2"
placeholder="限制200个字符" th:field="*{serverConfiguration}"></textarea></td>
</tr>
</table>
<div class="section-title">配置信息</div>
<div class="add-btn-div">
<h3>软件产品</h3>
<button type="button" class="add-btn" onclick="addProduct({})">添加</button>
</div>
<table id="productTable" class="productTable">
<thead>
<tr>
<th>序号</th>
<th>产品编码</th>
<th>产品型号</th>
<th>描述</th>
<th style="width: 80px">数量</th>
<th style="width: 90px">目录单价(RMB)</th>
<th style="width: 90px">指导折扣</th>
<th style="width: 90px">折扣</th>
<th style="width: 90px">单价(RMB)</th>
<th style="width: 120px">总价(RMB)</th>
<th style="width: 120px">目录总价(RMB)</th>
<th>备注</th>
<th style="width: 60px">操作</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="add-btn-div">
<h3>终端产品</h3>
<button type="button" class="add-btn" onclick="addProduct2({})">添加</button>
</div>
<table id="productTable2" class="productTable">
<thead>
<tr>
<th>序号</th>
<th>产品编码</th>
<th>产品型号</th>
<th>描述</th>
<th style="width: 80px">数量</th>
<th style="width: 90px">目录单价(RMB)</th>
<th style="width: 90px">指导折扣</th>
<th style="width: 90px">折扣</th>
<th style="width: 90px">单价(RMB)</th>
<th style="width: 120px">总价(RMB)</th>
<th style="width: 120px">目录总价(RMB)</th>
<th>备注</th>
<th style="width: 60px">操作</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="add-btn-div">
<h3>服务产品</h3>
<button type="button" class="add-btn" onclick="addProduct3({})">添加</button>
</div>
<table id="productTable3" class="productTable">
<thead>
<tr>
<th>序号</th>
<th>产品编码</th>
<th>产品型号</th>
<th>描述</th>
<th style="width: 80px">数量</th>
<th style="width: 90px">目录单价(RMB)</th>
<th style="width: 90px">指导折扣</th>
<th style="width: 90px">折扣</th>
<th style="width: 90px">单价(RMB)</th>
<th style="width: 120px">总价(RMB)</th>
<th style="width: 120px">目录总价(RMB)</th>
<th>备注</th>
<th style="width: 60px">操作</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div th:replace="layout/product-list::configInfoTable()"></div>
<div class="layui-tab">
<ul class="layui-tab-title">
<li class="layui-this" lay-id="11">工作进度</li>
<li lay-id="33">POC测试</li>
<li lay-id="33">POC记录</li>
<li lay-id="22">操作日志</li>
</ul>
<div class="layui-tab-content">
@ -361,10 +308,10 @@
<table id="workLog">
<thead>
<tr>
<th>序号</th>
<th style="width: 50px">序号</th>
<th>更新内容</th>
<th>更新人员</th>
<th>更新时间</th>
<th style="width: 100px">更新人员</th>
<th style="width: 120px">更新时间</th>
</tr>
</thead>
<tbody></tbody>
@ -372,7 +319,33 @@
</table>
</div>
<div class="layui-tab-item">
<div style="display: flex;flex-direction: row-reverse;">
<button type="button" id="addPocLog" class="add-btn" onclick="addPocLog({})">添加</button>
</div>
<table id="pocLog">
<thead>
<tr>
<th style="white-space: pre-line">测试环境
1.服务器配置
2.终端配置
3.操作系统
4.云桌面软件版本
</th>
<th>测试进展</th>
<th style="white-space: pre-line">项目成员信息
1.H3C销售/SE
2.汇智接口人
3.研发处理人员
4.现场处理人员
</th>
<th style="width: 110px">启动日期</th>
<th style="width: 110px">预计完成日期</th>
<th style="width: 110px">实际完成日期</th>
</tr>
</thead>
<tbody></tbody>
<!-- 可动态添加行 -->
</table>
</div>
<div class="layui-tab-item">
<table id="sysLog">
@ -381,7 +354,7 @@
<th style="width: 50px;">序号</th>
<th style="width: 100px;">操作人员</th>
<th>操作内容</th>
<th style="width: 100px;">操作时间</th>
<th style="width: 150px;">操作时间</th>
</tr>
</thead>
<tbody></tbody>
@ -406,27 +379,32 @@
function initProductList() {
let softwareProjectProductInfoListAll = [[${projectInfo.softwareProjectProductInfoList}]] || []
softwareProjectProductInfoListAll.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)
})
let hardwareProjectProductInfoListAll = [[${projectInfo.hardwareProjectProductInfoList}]] || []
hardwareProjectProductInfoListAll.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)
})
let maintenanceProjectProductInfoListAll = [[${projectInfo.maintenanceProjectProductInfoList}]] || []
maintenanceProjectProductInfoListAll.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)
})
}
@ -594,119 +572,27 @@
let arr3 = [[${projectInfo.projectOperateLogList}]]
arr3.forEach((ele, index) => {
let tr = $(`
<tr><td>${index + 1}</td><td>${ele.operateUserName}</td><td>${ele.operateLog}</td><td>${ele.operateTime}</td></tr>
<tr><td style="text-align: center">${index + 1}</td><td>${ele.operateUserName}</td><td>${ele.operateLog}</td><td>${ele.operateTime}</td></tr>
`)
$('#sysLog tbody').append(tr)
})
let pocLog = [[${projectInfo.projectPocInfo}]];
if (pocLog) {
addPocLog(pocLog)
document.getElementById('addPocLog').setAttribute("style", "display:none")
}
changeBg()
$('[name="industryType"]').val([[${projectInfo.industryType}]])
}
function addProduct(data) {
let length = $('#productTable tbody').find('tr').length
let tr = $(`
<tr>
<td class="indexBox">${length + 1}</td>
<td> <input type="hidden" name="softwareProjectProductInfoList[${length}].id" value="${data.id || ''}"><input class="form-control productBomCode" type="text" onclick="selectProduct('1','终端产品',this)" value="${data.productBomCode || ''}" name="softwareProjectProductInfoList[${length}].productBomCode"></td>
<td><input 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" type="text" class="form-control cataloguePrice" required></td>
<td><input value="${data.guidanceDiscount || ''}" name="softwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
<td><input value="${data.discount || ''}" name="softwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
<td>
<input value="${data.price || ''}" name="softwareProjectProductInfoList[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" required readonly>
<input type="text" value="${data.priceFormmat || ''}" class="form-control price-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.allPrice || ''}" name="softwareProjectProductInfoList[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.allPriceFormmat || ''}" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.catalogueAllPrice || ''}" name="softwareProjectProductInfoList[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.catalogueAllPriceFormmat || ''}" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td><input value="${data.remark || ''}" name="softwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
</tr>`)
$('#productTable tbody').append(tr)
initSearchProduct('1')
initPrice()
}
function addProduct2(data) {
let length = $('#productTable2 tbody').find('tr').length
let tr = $(`
<tr>
<td class="indexBox">${length + 1}</td>
<td> <input type="hidden" name="hardwareProjectProductInfoList[${length}].id" value="${data.id || ''}"><input class="form-control productBomCode" type="text" onclick="selectProduct('2','软件产品',this)" value="${data.productBomCode || ''}" name="hardwareProjectProductInfoList[${length}].productBomCode"></td>
<td><input 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" type="text" class="form-control cataloguePrice" required></td>
<td><input value="${data.guidanceDiscount || ''}" name="hardwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
<td><input value="${data.discount || ''}" name="hardwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
<td>
<input value="${data.price || ''}" name="hardwareProjectProductInfoList[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" required readonly>
<input type="text" value="${data.priceFormmat || ''}" class="form-control price-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.allPrice || ''}" name="hardwareProjectProductInfoList[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.allPriceFormmat || ''}" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.catalogueAllPrice || ''}" name="hardwareProjectProductInfoList[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.catalogueAllPriceFormmat || ''}" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td><input value="${data.remark || ''}" name="hardwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
</tr>`)
$('#productTable2 tbody').append(tr)
initSearchProduct('2')
initPrice()
}
function addProduct3(data) {
let length = $('#productTable3 tbody').find('tr').length
let tr = $(`
<tr>
<td class="indexBox">${length + 1}</td>
<td> <input type="hidden" name="maintenanceProjectProductInfoList[${length}].id" value="${data.id || ''}"><input class="form-control productBomCode" type="text" onclick="selectProduct('11,22','服务产品',this)" value="${data.productBomCode || ''}" name="maintenanceProjectProductInfoList[${length}].productBomCode"></td>
<td><input 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" type="text" class="form-control cataloguePrice" required></td>
<td><input value="${data.guidanceDiscount || ''}" name="maintenanceProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
<td><input value="${data.discount || ''}" name="maintenanceProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
<td>
<input value="${data.price || ''}" name="maintenanceProjectProductInfoList[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" required readonly>
<input type="text" value="${data.priceFormmat || ''}" class="form-control price-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.allPrice || ''}" name="maintenanceProjectProductInfoList[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.allPriceFormmat || ''}" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.catalogueAllPrice || ''}" name="maintenanceProjectProductInfoList[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.catalogueAllPriceFormmat || ''}" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td><input value="${data.remark || ''}" name="maintenanceProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
<td><span style="cursor:pointer;color: #ff5722" class="delRow">删除</span></td>
</tr>`)
$('#productTable3 tbody').append(tr)
initSearchProduct('11,22')
initPrice()
}
function addLog(data) {
let length = $('#workLog tbody').find('tr').length
let tr = $(`
<tr>
<td>${length + 1}</td>
<td><input type="hidden" value="${data.id || ''}" name="projectWorkProgressList[${length}].id"><textarea type="text" name="projectWorkProgressList[${length}].workContent" class="form-control" required>${data.workContent || ''}</textarea></td>
<td style="text-align: center;">${length + 1}</td>
<td><input type="hidden" value="${data.id || ''}" name="projectWorkProgressList[${length}].id">
<input type="text" onclick="showDetailValue(this)" name="projectWorkProgressList[${length}].workContent" class="form-control" required value="${data.workContent || ''}"></input></td>
<td><input type="text" class="form-control" placeholder="保存后自动填入" value="${data.userName || ''}" readonly></td>
<td><input type="text" class="form-control" placeholder="保存后自动填入" value="${data.workTime || ''}" readonly></td>
</tr>`)
@ -714,6 +600,75 @@
}
function addPocLog(data) {
let length = $('#workLog tbody').find('tr').length
let tr = $(`
<tr>
<td><input type="hidden" value="${data.id || ''}" name="projectPocInfo.id"/>
<input type="text" onclick="showDetailValue(this,true)" name="projectPocInfo.testEnvironment" class="form-control" required value="${data.testEnvironment || ''}"></input></td>
<td><input type="text" onclick="showDetailValue(this,true)" name="projectPocInfo.testProgress" class="form-control" required value="${data.testProgress || ''}"></input></td>
<td><input type="text" onclick="showDetailValue(this,true)" name="projectPocInfo.projectUserInfo" class="form-control" required value="${data.projectUserInfo || ''}"></input></td>
<td><input name="projectPocInfo.startDate" autocomplete="off" class="form-control" placeholder="yyyy-MM-dd"
value="${data.startDate||''}"></td>
<td><input name="projectPocInfo.planFinishTime" value="${data.planFinishTime||''}" autocomplete="off" class="form-control" placeholder="yyyy-MM-dd"></td>
<td><input name="projectPocInfo.realFinishTime" value="${data.realFinishTime||''}" autocomplete="off" class="form-control" placeholder="yyyy-MM-dd"></td>
</tr>`)
$('#pocLog tbody').append(tr)
$("input[name='projectPocInfo.startDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true,
pickerPosition:"top-right"
});
$("input[name='projectPocInfo.planFinishTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true,
pickerPosition:"top-right"
});
$("input[name='projectPocInfo.realFinishTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true,
pickerPosition:"top-right"
});
}
function addLog(data) {
let length = $('#workLog tbody').find('tr').length
let tr = $(`
<tr>
<td style="text-align: center;">${length + 1}</td>
<td><input type="hidden" value="${data.id || ''}" name="projectWorkProgressList[${length}].id">
<input type="text" onclick="showDetailValue(this)" name="projectWorkProgressList[${length}].workContent" class="form-control" required value="${data.workContent || ''}"></input></td>
<td><input type="text" class="form-control" placeholder="保存后自动填入" value="${data.userName || ''}" readonly></td>
<td><input type="text" class="form-control" placeholder="保存后自动填入" value="${data.workTime || ''}" readonly></td>
</tr>`)
$('#workLog tbody').append(tr)
}
function showDetailValue(ele, canUpdate) {
let msg = ele.value;
if (msg && !canUpdate) {
top.layer.alert(msg, {title: '更新内容'})
} else {
top.layer.prompt({
title: '请输入更新内容',
value: msg,
formType: 2
}, function (value, index, elem) {
ele.value = value;
// 关闭 prompt
top.layer.close(index);
});
}
}
function initSearchProduct(type) {
$('.productTable .delRow').on('click', function () {
let ele = $(this)
@ -734,58 +689,6 @@
}
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 changeInstitution() {
if ($('[name="operateInstitution"]').val() == 'h3c') {
@ -823,28 +726,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);
}
</script>
</body>

View File

@ -92,14 +92,13 @@
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
</select>
</li>
<li>
<label>项目阶段:</label>
<select name="projectStage" class="form-control"
th:with="type=${@dict.getType('project_stage')}">
<option value="">请选择项目阶段</option>
<option value="">请选择项目阶段</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
@ -114,8 +113,8 @@
<label>时间选择:</label>
<select name="timeType" onchange="changeTimeType()" value="0">
<option value="0">预计下单时间</option>
<option value="1">预计发货时间</option>
<option value="2">最后一次更新时间</option>
<option value="2">更新时间</option>
</select>
</div>
<div class="timeSearch">
@ -235,7 +234,10 @@
{
field: 'projectGraspDegree',
title: '项目把握度',
width: 30
width: 30,
formatter: function (value, row, index) {
return '<div style="text-align: center">'+value+'</div>'
}
},
{
field: 'projectStage',
@ -270,7 +272,10 @@
field: 'updateTime',
title: '更新时间',
class: 'time3',
width: 160
width: 160,
formatter: function (value, row, index) {
return value;
}
},
{
title: '操作',

View File

@ -290,84 +290,7 @@
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<div class="section-title">配置信息</div>
<div class="add-btn-div">
<h3>软件产品</h3>
<button type="button" class="add-btn" onclick="addProduct({})">添加</button>
</div>
<table id="productTable" class="productTable">
<thead>
<tr>
<th>序号</th>
<th>产品编码</th>
<th >产品型号</th>
<th>描述</th>
<th>数量</th>
<th style="width: 90px">目录单价(RMB)</th>
<th style="width: 90px">指导折扣</th>
<th style="width: 90px">折扣</th>
<th style="width: 90px">单价(RMB)</th>
<th style="width: 120px">总价(RMB)</th>
<th style="width: 120px">目录总价(RMB)</th>
<th>备注</th>
<th style="width: 60px">操作</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="add-btn-div">
<h3>终端产品</h3>
<button type="button" class="add-btn" onclick="addProduct2({})">添加</button>
</div>
<table id="productTable2" class="productTable">
<thead>
<tr>
<th>序号</th>
<th>产品编码</th>
<th>产品型号</th>
<th>描述</th>
<th>数量</th>
<th style="width: 90px">目录单价(RMB)</th>
<th style="width: 90px">指导折扣</th>
<th style="width: 90px">折扣</th>
<th style="width: 90px">单价(RMB)</th>
<th style="width: 120px">总价(RMB)</th>
<th style="width: 120px">目录总价(RMB)</th>
<th>备注</th>
<th style="width: 60px">操作</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="add-btn-div">
<h3>服务产品</h3>
<button type="button" class="add-btn" onclick="addProduct3({})">添加</button>
</div>
<table id="productTable3" class="productTable">
<thead>
<tr>
<th>序号</th>
<th>产品编码</th>
<th>产品型号</th>
<th>描述</th>
<th>数量</th>
<th style="width: 90px">目录单价(RMB)</th>
<th style="width: 90px">指导折扣</th>
<th style="width: 90px">折扣</th>
<th style="width: 90px">单价(RMB)</th>
<th style="width: 120px">总价(RMB)</th>
<th style="width: 120px">目录总价(RMB)</th>
<th>备注</th>
<th style="width: 60px">操作</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div th:replace="layout/product-list::configInfoTable()"></div>
</div>
<div class="layui-tab-item">内容-2</div>
<div class="layui-tab-item">内容-3</div>
@ -670,104 +593,6 @@
}
function addProduct(data) {
let length = $('#productTable tbody').find('tr').length
let tr = $(`
<tr>
<td class="indexBox">${length + 1}</td>
<td> <input type="hidden" name="softwareProjectProductInfoList[${length}].id" value="${data.id || ''}"><input class="form-control productBomCode" type="text" onclick="selectProduct('1','终端产品',this)" value="${data.productBomCode || ''}" name="softwareProjectProductInfoList[${length}].productBomCode"></td>
<td><input 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" type="text" class="form-control cataloguePrice" required></td>
<td><input value="${data.guidanceDiscount || ''}" name="softwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
<td><input value="${data.discount || ''}" name="softwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
<td>
<input value="${data.price || ''}" name="softwareProjectProductInfoList[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" required readonly>
<input type="text" value="${data.priceFormmat || ''}" class="form-control price-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.allPrice || ''}" name="softwareProjectProductInfoList[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.allPriceFormmat || ''}" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.catalogueAllPrice || ''}" name="softwareProjectProductInfoList[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.catalogueAllPriceFormmat || ''}" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td><input value="${data.remark || ''}" name="softwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
</tr>`)
$('#productTable tbody').append(tr)
initSearchProduct('1')
initPrice()
}
function addProduct2(data) {
let length = $('#productTable2 tbody').find('tr').length
let tr = $(`
<tr>
<td class="indexBox">${length + 1}</td>
<td> <input type="hidden" name="hardwareProjectProductInfoList[${length}].id" value="${data.id || ''}"><input class="form-control productBomCode" type="text" onclick="selectProduct('2','软件产品',this)" value="${data.productBomCode || ''}" name="hardwareProjectProductInfoList[${length}].productBomCode"></td>
<td><input 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" type="text" class="form-control cataloguePrice" required></td>
<td><input value="${data.guidanceDiscount || ''}" name="hardwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
<td><input value="${data.discount || ''}" name="hardwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
<td>
<input value="${data.price || ''}" name="hardwareProjectProductInfoList[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" required readonly>
<input type="text" value="${data.priceFormmat || ''}" class="form-control price-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.allPrice || ''}" name="hardwareProjectProductInfoList[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.allPriceFormmat || ''}" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.catalogueAllPrice || ''}" name="hardwareProjectProductInfoList[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.catalogueAllPriceFormmat || ''}" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td><input value="${data.remark || ''}" name="hardwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
</tr>`)
$('#productTable2 tbody').append(tr)
initSearchProduct('2')
initPrice()
}
function addProduct3(data) {
let length = $('#productTable3 tbody').find('tr').length
let tr = $(`
<tr>
<td class="indexBox">${length + 1}</td>
<td> <input type="hidden" name="maintenanceProjectProductInfoList[${length}].id" value="${data.id || ''}"><input class="form-control productBomCode" type="text" onclick="selectProduct('11,22','服务产品',this)" value="${data.productBomCode || ''}" name="maintenanceProjectProductInfoList[${length}].productBomCode"></td>
<td><input 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" type="text" class="form-control cataloguePrice" required></td>
<td><input value="${data.guidanceDiscount || ''}" name="maintenanceProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
<td><input value="${data.discount || ''}" name="maintenanceProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
<td>
<input value="${data.price || ''}" name="maintenanceProjectProductInfoList[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" required readonly>
<input type="text" value="${data.priceFormmat || ''}" class="form-control price-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.allPrice || ''}" name="maintenanceProjectProductInfoList[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.allPriceFormmat || ''}" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.catalogueAllPrice || ''}" name="maintenanceProjectProductInfoList[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.catalogueAllPriceFormmat || ''}" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td><input value="${data.remark || ''}" name="maintenanceProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
<td><span style="cursor:pointer;color: #ff5722" class="delRow">删除</span></td>
</tr>`)
$('#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);
}
</script>
</body>
</html>

View File

@ -299,86 +299,7 @@
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<div class="section-title">配置信息</div>
<div class="add-btn-div">
<h3>软件产品</h3>
<button type="button" class="add-btn" onclick="addProduct({})">添加</button>
</div>
<table id="productTable" class="productTable">
<thead>
<tr>
<th>序号</th>
<th>产品编码</th>
<th>产品型号</th>
<th>描述</th>
<th>数量</th>
<th style="width: 90px">目录单价(RMB)</th>
<th style="width: 90px">指导折扣</th>
<th style="width: 90px">折扣</th>
<th style="width: 90px">单价(RMB)</th>
<th style="width: 120px">总价(RMB)</th>
<th style="width: 120px">目录总价(RMB)</th>
<th>备注</th>
<th style="width: 60px">操作</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="add-btn-div">
<h3>终端产品</h3>
<button type="button" class="add-btn" onclick="addProduct2({})">添加</button>
</div>
<table id="productTable2" class="productTable">
<thead>
<tr>
<th>序号</th>
<th>产品编码</th>
<th>产品型号</th>
<th>描述</th>
<th>数量</th>
<th style="width: 90px">目录单价(RMB)</th>
<th style="width: 90px">指导折扣</th>
<th style="width: 90px">折扣</th>
<th style="width: 90px">单价(RMB)</th>
<th style="width: 120px">总价(RMB)</th>
<th style="width: 120px">目录总价(RMB)</th>
<th>备注</th>
<th style="width: 60px">操作</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="add-btn-div">
<h3>服务产品</h3>
<button type="button" class="add-btn" onclick="addProduct3({})">添加</button>
</div>
<table id="productTable3" class="productTable">
<thead>
<tr>
<th>序号</th>
<th>产品编码</th>
<th>产品型号</th>
<th>描述</th>
<th>数量</th>
<th style="width: 90px">目录单价(RMB)</th>
<th style="width: 90px">指导折扣</th>
<th style="width: 90px">折扣</th>
<th style="width: 90px">单价(RMB)</th>
<th style="width: 120px">总价(RMB)</th>
<th style="width: 120px">目录总价(RMB)</th>
<th>备注</th>
<th style="width: 60px">操作</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div th:replace="layout/product-list::configInfoTable()"></div>
</div>
<div class="layui-tab-item">内容-2</div>
<div class="layui-tab-item">内容-3</div>
@ -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 = $(`
<tr>
<td class="indexBox">${length + 1}</td>
<td> <input type="hidden" name="softwareProjectProductInfoList[${length}].id" value="${data.id || ''}"><input class="form-control productBomCode" type="text" onclick="selectProduct('1','终端产品',this)" value="${data.productBomCode || ''}" name="softwareProjectProductInfoList[${length}].productBomCode"></td>
<td><input 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" type="text" class="form-control cataloguePrice" required></td>
<td><input value="${data.guidanceDiscount || ''}" name="softwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
<td><input value="${data.discount || ''}" name="softwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
<td>
<input value="${data.price || ''}" name="softwareProjectProductInfoList[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" required readonly>
<input type="text" value="${data.priceFormmat || ''}" class="form-control price-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.allPrice || ''}" name="softwareProjectProductInfoList[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.allPriceFormmat || ''}" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.catalogueAllPrice || ''}" name="softwareProjectProductInfoList[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.catalogueAllPriceFormmat || ''}" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td><input value="${data.remark || ''}" name="softwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
</tr>`)
$('#productTable tbody').append(tr)
initSearchProduct('1')
initPrice()
}
function addProduct2(data) {
let length = $('#productTable2 tbody').find('tr').length
let tr = $(`
<tr>
<td class="indexBox">${length + 1}</td>
<td> <input type="hidden" name="hardwareProjectProductInfoList[${length}].id" value="${data.id || ''}"><input class="form-control productBomCode" type="text" onclick="selectProduct('2','软件产品',this)" value="${data.productBomCode || ''}" name="hardwareProjectProductInfoList[${length}].productBomCode"></td>
<td><input 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" type="text" class="form-control cataloguePrice" required></td>
<td><input value="${data.guidanceDiscount || ''}" name="hardwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
<td><input value="${data.discount || ''}" name="hardwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
<td>
<input value="${data.price || ''}" name="hardwareProjectProductInfoList[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" required readonly>
<input type="text" value="${data.priceFormmat || ''}" class="form-control price-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.allPrice || ''}" name="hardwareProjectProductInfoList[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.allPriceFormmat || ''}" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.catalogueAllPrice || ''}" name="hardwareProjectProductInfoList[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.catalogueAllPriceFormmat || ''}" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td><input value="${data.remark || ''}" name="hardwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
</tr>`)
$('#productTable2 tbody').append(tr)
initSearchProduct('2')
initPrice()
}
function addProduct3(data) {
let length = $('#productTable3 tbody').find('tr').length
let tr = $(`
<tr>
<td class="indexBox">${length + 1}</td>
<td> <input type="hidden" name="maintenanceProjectProductInfoList[${length}].id" value="${data.id || ''}"><input class="form-control productBomCode" type="text" onclick="selectProduct('11,22','服务产品',this)" value="${data.productBomCode || ''}" name="maintenanceProjectProductInfoList[${length}].productBomCode"></td>
<td><input 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" type="text" class="form-control cataloguePrice" required></td>
<td><input value="${data.guidanceDiscount || ''}" name="maintenanceProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
<td><input value="${data.discount || ''}" name="maintenanceProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
<td>
<input value="${data.price || ''}" name="maintenanceProjectProductInfoList[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" required readonly>
<input type="text" value="${data.priceFormmat || ''}" class="form-control price-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.allPrice || ''}" name="maintenanceProjectProductInfoList[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.allPriceFormmat || ''}" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td>
<input value="${data.catalogueAllPrice || ''}" name="maintenanceProjectProductInfoList[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.catalogueAllPriceFormmat || ''}" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td><input value="${data.remark || ''}" name="maintenanceProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
<td><span style="cursor:pointer;color: #ff5722" class="delRow">删除</span></td>
</tr>`)
$('#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 = $(`
<span class="saveDraft" style=" position: absolute;
<span class="saveDraft layui-layer-btn" style=" position: absolute;
right: 160px;
bottom: 12px;
display: inline-block;
@ -1038,28 +804,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);
}
</script>
</body>
</html>

View File

@ -140,7 +140,7 @@
},
{
field: 'shipmentAmount',
title: '金额(RMB)',
title: '金额(¥)',
formatter: function (value, row, index) {
return value?formatAmountNumber(value):'';
}

View File

@ -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;

View File

@ -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;
/** 竞争对手 */

View File

@ -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;

View File

@ -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;
}

View File

@ -110,10 +110,10 @@ public class ProjectPocInfoServiceImpl implements IProjectPocInfoService
}
List<ProjectPocInfo> addList = projectPocInfos.stream().filter(projectPocInfo -> projectPocInfo.getId() == null).collect(Collectors.toList());
List<ProjectPocInfo> 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);
}
}

View File

@ -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 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
</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.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"
<if test="customerName != null">customer_name,</if>
<if test="customerUserName != null">customer_user_name,</if>
<if test="customerPhone != null">customer_phone,</if>
<if test="h3cPerson != null">h3c_person,</if>
<if test="h3cPhone != null">h3c_phone,</if>
<if test="industryType != null">industry_type,</if>
<if test="bgProperty != null">bg_property,</if>
<if test="agentCode != null">agent_code,</if>
@ -208,6 +210,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerName != null">#{customerName},</if>
<if test="customerUserName != null">#{customerUserName},</if>
<if test="customerPhone != null">#{customerPhone},</if>
<if test="h3cPerson != null">#{h3cPerson},</if>
<if test="h3cPhone != null">#{h3cPhone},</if>
<if test="industryType != null">#{industryType},</if>
<if test="bgProperty != null">#{bgProperty},</if>
<if test="agentCode != null">#{agentCode},</if>
@ -245,6 +249,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerName != null">customer_name = #{customerName},</if>
<if test="customerUserName != null">customer_user_name=#{customerUserName},</if>
<if test="customerPhone != null">customer_phone=#{customerPhone},</if>
<if test="h3cPhone != null">h3c_phone=#{h3cPhone},</if>
<if test="h3cPerson != null">h3c_person=#{h3cPerson},</if>
<if test="bgProperty != null">bg_property=#{bgProperty},</if>
<if test="industryType != null">industry_type = #{industryType},</if>
<if test="agentCode != null">agent_code = #{agentCode},</if>