feat(project): 优化项目信息页面布局和功能
- 调整表格布局,增加合并单元格 - 优化金额输入格式,添加格式化显示 - 修复部分字段显示和计算问题 - 优化页面样式,调整字体大小和颜色master
parent
992512f0e9
commit
18d586ce9f
|
@ -404,6 +404,18 @@ function endOfTime(date) {
|
|||
return $.common.sprintf("%s 23:59:59", 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 (str) {
|
||||
result = str + result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** 重置日期/年月日 */
|
||||
function resetDate() {
|
||||
|
|
|
@ -30,20 +30,25 @@
|
|||
|
||||
.section-title {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
font-size: 30px;
|
||||
padding: 10px 0;
|
||||
color: #0075ff;
|
||||
}
|
||||
|
||||
.checkbox-group label {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.checkbox-box {
|
||||
|
@ -60,7 +65,10 @@
|
|||
}
|
||||
|
||||
.shortTd {
|
||||
width: 100px;
|
||||
width: 112px;
|
||||
}
|
||||
.inputTd{
|
||||
width: 27vw;
|
||||
}
|
||||
|
||||
input, textarea, .productTable td {
|
||||
|
@ -87,21 +95,20 @@
|
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form id="form-product-add">
|
||||
<div class="section-title">项目信息</div>
|
||||
<table>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td class="shortTd">项目编码<span class="is-required">*</span></td>
|
||||
<td><input type="text" name="projectCode" class="form-control" placeholder="保存后自动生成"
|
||||
<td colspan="2" ><input type="text" name="projectCode" class="form-control" placeholder="保存后自动生成"
|
||||
readonly>
|
||||
</td>
|
||||
<td class="shortTd">项目名称<span class="is-required">*</span></td>
|
||||
<td><input type="text" name="projectName" maxlength="40" placeholder="限制40个字符"
|
||||
<td colspan="2"><input type="text" name="projectName" maxlength="40" placeholder="限制40个字符"
|
||||
class="form-control"></td>
|
||||
<td>预计金额(元)<span class="is-required">*</span></td>
|
||||
<td><input type="number" name="estimatedAmount" class="form-control" required></td>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="shortTd">BG<span class="is-required">*</span></td>
|
||||
<td>
|
||||
<td class="inputTd">
|
||||
<select name="bgProperty" class="form-control" th:with="type=${@dict.getType('bg_type')}"
|
||||
onchange="changeBg()" required>
|
||||
<option value="">请选择BG</option>
|
||||
|
@ -110,14 +117,14 @@
|
|||
</select>
|
||||
</td>
|
||||
<td class="shortTd">行业<span class="is-required">*</span></td>
|
||||
<td id="industryTypeBox">
|
||||
<td id="industryTypeBox" class="inputTd">
|
||||
<select name="industryType" class="form-control"
|
||||
required>
|
||||
<option value="">请先选择BG</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="shortTd"> 代表处 <span class="is-required">*</span></td>
|
||||
<td id="element1">
|
||||
<td id="element1" class="inputTd">
|
||||
<input name="agentName" class="form-control" type="text"
|
||||
onclick="selectAgent()">
|
||||
<input name="agentCode" class="form-control" type="hidden">
|
||||
|
@ -155,7 +162,7 @@
|
|||
<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><input name=" customerUserName" class="form-control" type="text">
|
||||
<td><input name="customerUserName" class="form-control" type="text">
|
||||
</td>
|
||||
<td class="shortTd">联系方式</td>
|
||||
<td><input name="customerPhone" class="form-control" type="text">
|
||||
|
@ -163,8 +170,8 @@
|
|||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>合作渠道</td>
|
||||
<td>
|
||||
<td>合作渠道<span class="is-required">*</span></td>
|
||||
<td colspan="2">
|
||||
<select name="operateInstitution" class="form-control"
|
||||
th:with="type=${@dict.getType('operate_institution')}"
|
||||
onchange="changeInstitution()">
|
||||
|
@ -174,21 +181,33 @@
|
|||
</select>
|
||||
</td>
|
||||
<td>代理商<span class="is-required">*</span></td>
|
||||
<td>
|
||||
<td colspan="2">
|
||||
<input name="partnerName" class="form-control" type="text" required
|
||||
onclick="selectPartner()">
|
||||
<input name="partnerCode" class="form-control" type="hidden">
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<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 type="text" name="contactWay" class="form-control" placeholder="姓名+电话"></td>
|
||||
<td><input name="contactWay" class="form-control" type="text"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td>预计下单时间</td>
|
||||
<td><input name="estimatedOrderTime" class="form-control" placeholder="yyyy-MM-dd">
|
||||
<td class="shortTd">预计金额(元)<span class="is-required">*</span></td>
|
||||
<td>
|
||||
<input type="text" required id="displayEstimatedAmount" class="form-control" placeholder="输入金额"
|
||||
oninput="this.value = this.value.replace(/[^0-9.]/g,'').replace(/(\..*)\./g, '$1');"
|
||||
onfocus="this.value=document.getElementById('estimatedAmount').value"
|
||||
onblur="updateRawValue()">
|
||||
<input type="hidden" id="estimatedAmount" name="estimatedAmount" class="form-control" >
|
||||
</td>
|
||||
<td>预计发货时间</td>
|
||||
<td><input name="estimatedDeliverTime" class="form-control" placeholder="yyyy-MM-dd"
|
||||
<td><input name="estimatedDeliverTime" class="form-control" autocomplete="off" placeholder="yyyy-MM-dd"
|
||||
></td>
|
||||
<td>POC测试</td>
|
||||
<td>
|
||||
|
@ -207,7 +226,7 @@
|
|||
<label><input type="checkbox" name="competitorList[1]" value="锐捷">锐捷</label>
|
||||
<label><input type="checkbox" name="competitorList[2]" value="深信服">深信服</label>
|
||||
<label><input type="checkbox" name="competitorList[3]" value="中兴">中兴</label>
|
||||
<label><input type="checkbox" name="competitorList[4]" value="曙云">曙云</label>
|
||||
<label><input type="checkbox" name="competitorList[4]" value="噢易云">噢易云</label>
|
||||
<div style="float: right;display: flex;flex-display:row;align-items: center">
|
||||
<span>其它:</span><input type="text" name="competitorList[5]" class="form-control"
|
||||
style="width: 400px">
|
||||
|
@ -245,13 +264,16 @@
|
|||
</tr>
|
||||
</table>
|
||||
<div class="section-title">配置信息</div>
|
||||
<h3>软件</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct()">添加</button>
|
||||
<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>数量</th>
|
||||
|
@ -268,13 +290,15 @@
|
|||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>硬件</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct2()">添加</button>
|
||||
<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>数量</th>
|
||||
|
@ -291,13 +315,17 @@
|
|||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>维保</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct3()">添加</button>
|
||||
|
||||
<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>数量</th>
|
||||
|
@ -321,7 +349,10 @@
|
|||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<button type="button" class="add-btn" onclick="addLog()">添加</button>
|
||||
<div style="display: flex;flex-direction: row-reverse;">
|
||||
<button type="button" class="add-btn" onclick="addLog()">添加</button>
|
||||
</div>
|
||||
|
||||
<table id="workLog">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -354,20 +385,36 @@
|
|||
var maintenanceProjectProductInfoList = []
|
||||
|
||||
function initProductList() {
|
||||
let softwareProjectProductInfoListAll = [[${projectInfo.softwareProjectProductInfoList}]] || []
|
||||
let softwareProjectProductInfoListAll = []
|
||||
softwareProjectProductInfoListAll.forEach((ele) => {
|
||||
addProduct(ele)
|
||||
})
|
||||
let hardwareProjectProductInfoListAll = [[${projectInfo.hardwareProjectProductInfoList}]] || []
|
||||
let hardwareProjectProductInfoListAll = []
|
||||
hardwareProjectProductInfoListAll.forEach((ele) => {
|
||||
addProduct2(ele)
|
||||
})
|
||||
let maintenanceProjectProductInfoListAll = [[${projectInfo.maintenanceProjectProductInfoList}]] || []
|
||||
let maintenanceProjectProductInfoListAll = []
|
||||
maintenanceProjectProductInfoListAll.forEach((ele) => {
|
||||
addProduct3(ele)
|
||||
})
|
||||
|
||||
}
|
||||
function updateRawValue() {
|
||||
// 获取显示用的输入框
|
||||
const displayInput = document.getElementById('displayEstimatedAmount');
|
||||
// 获取隐藏字段
|
||||
const rawInput = document.getElementById('estimatedAmount');
|
||||
// 去除逗号并过滤非数字字符
|
||||
let rawValue = displayInput.value.replace(/[^0-9]/g, '');
|
||||
|
||||
// 更新隐藏字段的值
|
||||
rawInput.value = rawValue;
|
||||
|
||||
// 格式化显示(可选)
|
||||
if (rawValue) {
|
||||
displayInput.value = Number(rawValue).toLocaleString('en-US');
|
||||
}
|
||||
}
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
|
@ -472,7 +519,7 @@
|
|||
$('[name="customerCode"]').val(rows[0].customerCode);
|
||||
$('[name="customerName"]').val(rows[0].customerName);
|
||||
$('[name="customerUserName"]').val(rows[0].contactPerson);
|
||||
$('[name="contactPhone"]').val(rows[0].contactPhone);
|
||||
$('[name="customerPhone"]').val(rows[0].contactPhone);
|
||||
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
@ -485,6 +532,9 @@
|
|||
}
|
||||
$('[name="partnerCode"]').val(rows[0].partnerCode);
|
||||
$('[name="partnerName"]').val(rows[0].partnerName);
|
||||
$('[name="partnerUserName"]').val(rows[0].contactPerson);
|
||||
// $('[name="partnerEmail"]').val(rows[0].concactEmail);
|
||||
$('[name="contactWay"]').val(rows[0].contactPhone);
|
||||
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
@ -526,9 +576,18 @@
|
|||
<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="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></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>
|
||||
|
||||
|
@ -550,11 +609,20 @@
|
|||
<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="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></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>
|
||||
<td><span style="cursor:pointer;color: #ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
$('#productTable2 tbody').append(tr)
|
||||
|
@ -574,9 +642,18 @@
|
|||
<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="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></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>
|
||||
|
||||
|
@ -625,9 +702,12 @@
|
|||
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 () {
|
||||
|
@ -636,27 +716,37 @@
|
|||
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"))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -30,20 +30,26 @@
|
|||
|
||||
.section-title {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
font-size: 30px;
|
||||
padding: 10px 0;
|
||||
color: #0075ff;
|
||||
}
|
||||
|
||||
.checkbox-group label {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.checkbox-box {
|
||||
|
@ -60,7 +66,11 @@
|
|||
}
|
||||
|
||||
.shortTd {
|
||||
width: 100px;
|
||||
width: 112px;
|
||||
}
|
||||
|
||||
.inputTd {
|
||||
width: 27vw;
|
||||
}
|
||||
|
||||
input, textarea, .productTable td {
|
||||
|
@ -91,20 +101,17 @@
|
|||
<table>
|
||||
<tr>
|
||||
<td class="shortTd">项目编码<span class="is-required">*</span></td>
|
||||
<td><input type="text" th:field="*{projectCode}" name="projectCode" class="form-control"
|
||||
<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><input type="text" th:field="*{projectName}" name="projectName" maxlength="40"
|
||||
<td colspan="2"><input type="text" th:field="*{projectName}" name="projectName" maxlength="40"
|
||||
placeholder="限制40个字符"
|
||||
class="form-control"></td>
|
||||
<td>预计金额(RMB)<span class="is-required">*</span></td>
|
||||
<td><input type="number" name="estimatedAmount" class="form-control" th:field="*{estimatedAmount}"
|
||||
required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="shortTd">BG<span class="is-required">*</span></td>
|
||||
<td>
|
||||
<td class="inputTd">
|
||||
<select name="bgProperty" th:field="*{bgProperty}" class="form-control"
|
||||
th:with="type=${@dict.getType('bg_type')}"
|
||||
onchange="changeBg()" required>
|
||||
|
@ -114,14 +121,14 @@
|
|||
</select>
|
||||
</td>
|
||||
<td class="shortTd">行业<span class="is-required">*</span></td>
|
||||
<td id="industryTypeBox">
|
||||
<td id="industryTypeBox" class="inputTd">
|
||||
<select name="industryType" th:field="*{industryType}" class="form-control"
|
||||
required>
|
||||
<option value="">请先选择BG</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="shortTd"> 代表处 <span class="is-required">*</span></td>
|
||||
<td id="element1">
|
||||
<td id="element1" class="inputTd">
|
||||
<input name="agentName" th:field="*{agentName}" class="form-control" type="text"
|
||||
onclick="selectAgent()" required>
|
||||
<input name="agentCode" th:field="*{agentCode}" class="form-control" type="hidden" required>
|
||||
|
@ -161,7 +168,7 @@
|
|||
onclick="selectCustomer()">
|
||||
<input name="customerCode" class="form-control" th:field="*{customerCode}" type="hidden"></td>
|
||||
<td class="shortTd">联系人</td>
|
||||
<td><input name=" customerUserName" class="form-control" type="text" th:field="*{customerUserName}">
|
||||
<td><input name="customerUserName" class="form-control" type="text" th:field="*{customerUserName}">
|
||||
</td>
|
||||
<td class="shortTd">联系方式</td>
|
||||
<td><input name="customerPhone" class="form-control" type="text" th:field="*{customerPhone}">
|
||||
|
@ -169,7 +176,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>合作渠道</td>
|
||||
<td>
|
||||
<td colspan="2">
|
||||
<select name="operateInstitution" class="form-control"
|
||||
th:with="type=${@dict.getType('operate_institution')}"
|
||||
onchange="changeInstitution()" th:field="*{operateInstitution}">
|
||||
|
@ -179,23 +186,34 @@
|
|||
</select>
|
||||
</td>
|
||||
<td>代理商<span class="is-required">*</span></td>
|
||||
<td>
|
||||
<td colspan="2">
|
||||
<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>
|
||||
<td>联系方式</td>
|
||||
<td><input type="text" name="contactWay" class="form-control" placeholder="姓名+电话"
|
||||
th:field="*{contactWay}"></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><input name="contactWay" th:field="*{contactWay}" class="form-control" type="text"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="shortTd">预计金额(元)<span class="is-required">*</span></td>
|
||||
<td>
|
||||
<input type="text" required id="displayEstimatedAmount" class="form-control" placeholder="输入金额"
|
||||
oninput="this.value = this.value.replace(/[^0-9.]/g,'').replace(/(\..*)\./g, '$1');"
|
||||
onfocus="this.value=document.getElementById('estimatedAmount').value"
|
||||
onblur="updateRawValue()">
|
||||
|
||||
<td>预计下单时间</td>
|
||||
<td><input name="estimatedOrderTime" class="form-control" placeholder="yyyy-MM-dd"
|
||||
th:value="${#dates.format(projectInfo.estimatedOrderTime, 'yyyy-MM-dd')}">
|
||||
<input type="hidden" th:field="*{estimatedAmount}" id="estimatedAmount" name="estimatedAmount"
|
||||
class="form-control">
|
||||
</td>
|
||||
<td>预计发货时间</td>
|
||||
<td><input name="estimatedDeliverTime" class="form-control" placeholder="yyyy-MM-dd"
|
||||
<td><input name="estimatedDeliverTime" autocomplete="off" class="form-control" placeholder="yyyy-MM-dd"
|
||||
th:value="${#dates.format(projectInfo.estimatedDeliverTime, 'yyyy-MM-dd')}"></td>
|
||||
<td>POC测试</td>
|
||||
<td>
|
||||
|
@ -214,7 +232,7 @@
|
|||
<label><input type="checkbox" name="competitorList[1]" value="锐捷">锐捷</label>
|
||||
<label><input type="checkbox" name="competitorList[2]" value="深信服">深信服</label>
|
||||
<label><input type="checkbox" name="competitorList[3]" value="中兴">中兴</label>
|
||||
<label><input type="checkbox" name="competitorList[4]" value="曙云">曙云</label>
|
||||
<label><input type="checkbox" name="competitorList[4]" value="噢易云">噢易云</label>
|
||||
<div style="float: right;display: flex;flex-display:row;align-items: center">
|
||||
<span>其它:</span><input type="text" name="competitorList[5]" class="form-control"
|
||||
style="width: 400px">
|
||||
|
@ -252,13 +270,15 @@
|
|||
</table>
|
||||
|
||||
<div class="section-title">配置信息</div>
|
||||
<h3>软件</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct({})">添加</button>
|
||||
<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: 80px">数量</th>
|
||||
|
@ -275,13 +295,16 @@
|
|||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>硬件</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct2({})">添加</button>
|
||||
<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: 80px">数量</th>
|
||||
|
@ -298,13 +321,15 @@
|
|||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>维保</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct3({})">添加</button>
|
||||
<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: 80px">数量</th>
|
||||
|
@ -324,12 +349,15 @@
|
|||
<div class="layui-tab">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this" lay-id="11">工作进度</li>
|
||||
<li lay-id="22">操作日志</li>
|
||||
|
||||
<li lay-id="33">POC测试</li>
|
||||
<li lay-id="22">操作日志</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<button type="button" class="add-btn" onclick="addLog({})">添加</button>
|
||||
<div style="display: flex;flex-direction: row-reverse;">
|
||||
<button type="button" class="add-btn" onclick="addLog({})">添加</button>
|
||||
</div>
|
||||
<table id="workLog">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -342,23 +370,23 @@
|
|||
<tbody></tbody>
|
||||
<!-- 可动态添加行 -->
|
||||
</table>
|
||||
</div>
|
||||
<div class="layui-tab-item">
|
||||
|
||||
</div>
|
||||
<div class="layui-tab-item">
|
||||
<table id="sysLog">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>操作人员</th>
|
||||
<th style="width: 50px;">序号</th>
|
||||
<th style="width: 100px;">操作人员</th>
|
||||
<th>操作内容</th>
|
||||
<th>操作时间</th>
|
||||
<th style="width: 100px;">操作时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="layui-tab-item">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -378,18 +406,49 @@
|
|||
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") : ""
|
||||
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") : ""
|
||||
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") : ""
|
||||
addProduct3(ele)
|
||||
})
|
||||
}
|
||||
|
||||
function updateRawValue() {
|
||||
// 获取显示用的输入框
|
||||
const displayInput = document.getElementById('displayEstimatedAmount');
|
||||
// 获取隐藏字段
|
||||
const rawInput = document.getElementById('estimatedAmount');
|
||||
// 去除逗号并过滤非数字字符
|
||||
let rawValue = displayInput.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');
|
||||
|
||||
// 更新隐藏字段的值
|
||||
rawInput.value = rawValue;
|
||||
|
||||
// 格式化显示(可选)
|
||||
if (rawValue) {
|
||||
displayInput.value = Number(rawValue).toLocaleString('en-US');
|
||||
} else {
|
||||
displayInput.value = "";
|
||||
}
|
||||
}
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-product-add').serialize());
|
||||
|
@ -399,6 +458,10 @@
|
|||
}
|
||||
|
||||
$(function () {
|
||||
let amount = [[${projectInfo.estimatedAmount}]] || ''
|
||||
if (amount) {
|
||||
document.getElementById('displayEstimatedAmount').value=amount.toLocaleString('en-US');
|
||||
}
|
||||
initProductList()
|
||||
$("input[name='estimatedOrderTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
|
@ -471,7 +534,7 @@
|
|||
$('[name="customerCode"]').val(rows[0].customerCode);
|
||||
$('[name="customerName"]').val(rows[0].customerName);
|
||||
$('[name="customerUserName"]').val(rows[0].contactPerson);
|
||||
$('[name="contactPhone"]').val(rows[0].contactPhone);
|
||||
$('[name="customerPhone"]').val(rows[0].contactPhone);
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
|
@ -483,7 +546,9 @@
|
|||
}
|
||||
$('[name="partnerCode"]').val(rows[0].partnerCode);
|
||||
$('[name="partnerName"]').val(rows[0].partnerName);
|
||||
|
||||
$('[name="partnerUserName"]').val(rows[0].contactPerson);
|
||||
// $('[name="partnerEmail"]').val(rows[0].concactEmail);
|
||||
$('[name="contactWay"]').val(rows[0].contactPhone);
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
|
@ -549,9 +614,18 @@
|
|||
<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="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.allPrice || ''}" name="softwareProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.catalogueAllPrice || ''}" name="softwareProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></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>
|
||||
|
||||
|
@ -573,9 +647,18 @@
|
|||
<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="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.allPrice || ''}" name="hardwareProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.catalogueAllPrice || ''}" name="hardwareProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></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>
|
||||
|
||||
|
@ -597,11 +680,20 @@
|
|||
<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="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.allPrice || ''}" name="maintenanceProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.catalogueAllPrice || ''}" name="maintenanceProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></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>
|
||||
<td><span style="cursor:pointer;color: #ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
$('#productTable3 tbody').append(tr)
|
||||
|
@ -649,9 +741,11 @@
|
|||
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 () {
|
||||
|
@ -660,6 +754,7 @@
|
|||
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()
|
||||
|
@ -670,17 +765,25 @@
|
|||
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"))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -38,9 +38,13 @@
|
|||
.disableBtnfalse {
|
||||
color: #ccc;
|
||||
}
|
||||
.select-list li p, .select-list li label:not(.radio-box){
|
||||
width: 80px;
|
||||
}
|
||||
</style>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<!-- <div th:replace="layout/product-list::configInfoTable('','','')"></div>-->
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
|
@ -58,15 +62,6 @@
|
|||
<label>最终客户:</label>
|
||||
<input type="text" name="customerName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>项目阶段:</label>
|
||||
<select name="projectStage" class="form-control"
|
||||
th:with="type=${@dict.getType('project_stage')}">
|
||||
<option value="">请选择合项目阶段</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||
th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>BG:</label>
|
||||
<select name="bgProperty" class="form-control" th:with="type=${@dict.getType('bg_type')}"
|
||||
|
@ -85,6 +80,11 @@
|
|||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>代表处:</label>
|
||||
<input type="text" name="agentName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>项目把握度:</label>
|
||||
<select name="projectGraspDegree" onchange="changeTimeType()" value="0">
|
||||
|
@ -96,13 +96,19 @@
|
|||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>汇智支撑:</label>
|
||||
<input type="text" name="hzSupportUserName"/>
|
||||
<label>项目阶段:</label>
|
||||
<select name="projectStage" class="form-control"
|
||||
th:with="type=${@dict.getType('project_stage')}">
|
||||
<option value="">请选择合项目阶段</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||
th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>代表处:</label>
|
||||
<input type="text" name="agentName"/>
|
||||
<label>汇智负责人:</label>
|
||||
<input type="text" name="hzSupportUserName"/>
|
||||
</li>
|
||||
|
||||
<li class="timeSearch" style="width: 80%">
|
||||
<div>
|
||||
<label>时间选择:</label>
|
||||
|
@ -185,7 +191,7 @@
|
|||
},
|
||||
{
|
||||
field: 'projectCode',
|
||||
title: '项目编码',
|
||||
title: '项目编号',
|
||||
escape: true,
|
||||
formatter: (value, row, index) => {
|
||||
if (row.highlight) {
|
||||
|
@ -214,10 +220,10 @@
|
|||
field: 'industryType',
|
||||
title: '行业',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.bgProperty == 'YYS') {
|
||||
if (row.bgProperty === 'YYS') {
|
||||
return $.table.selectDictLabel([[${@dict.getType('bg_yys')}]], value);
|
||||
} else {
|
||||
return $.table.selectDictLabel([[${@dict.getType('bg_hsys')}]], value);
|
||||
return $.table.selectDictLabel([[${@dict.getType('bg_hysy')}]], value);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -242,9 +248,17 @@
|
|||
field: 'hzSupportUserName',
|
||||
title: '汇智负责人'
|
||||
},
|
||||
{
|
||||
field: 'poc',
|
||||
title: 'poc'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'estimatedAmount',
|
||||
title: '预计金额(元)'
|
||||
title: '预计金额(元)',
|
||||
formatter: function (value, row, index) {
|
||||
return value?formatAmountNumber(value):'';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'estimatedOrderTime',
|
||||
|
@ -252,21 +266,16 @@
|
|||
class: 'time1',
|
||||
width: 140
|
||||
},
|
||||
{
|
||||
field: 'estimatedDeliverTime',
|
||||
title: '预计发货时间',
|
||||
class: 'time2',
|
||||
width: 140
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
title: '最后一次更新时间',
|
||||
title: '更新时间',
|
||||
class: 'time3',
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
titleTooltip:true,
|
||||
formatter: function (value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs mb5' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editFull(\'' + row.id + '\')"><i class="fa fa-edit"></i>项目详情</a> ');
|
||||
|
@ -325,7 +334,6 @@
|
|||
});
|
||||
|
||||
function initHighlight() {
|
||||
console.log($('.highlight'), 11)
|
||||
$('span.highlight').parent().parent().addClass('highlightRow')
|
||||
}
|
||||
|
||||
|
|
|
@ -31,10 +31,7 @@
|
|||
<label>联系人:</label>
|
||||
<input type="text" name="contactPerson"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>联系电话:</label>
|
||||
<input type="text" name="contactPhone"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>所属行业:</label>
|
||||
<select name="industryType" class="form-control"
|
||||
|
@ -115,10 +112,7 @@
|
|||
field: 'customerName',
|
||||
title: '客户名称'
|
||||
},
|
||||
{
|
||||
field: 'customerPostcode',
|
||||
title: '客户邮编'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'address',
|
||||
title: '详细地址'
|
||||
|
|
|
@ -30,20 +30,26 @@
|
|||
|
||||
.section-title {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
font-size: 30px;
|
||||
padding: 10px 0;
|
||||
color: #0075ff;
|
||||
}
|
||||
|
||||
.checkbox-group label {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.checkbox-box {
|
||||
|
@ -97,7 +103,8 @@
|
|||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form id="form-order-add">
|
||||
<div class="section-title">新建订单<span id="projectNameBox"></span></div>
|
||||
<div class="section-title">新建订单<span style="margin-left: 10px">|</span>
|
||||
<span id="projectNameBox" style="color: black"></span></div>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="shortTd">项目编号<span class="is-required">*</span></td>
|
||||
|
@ -164,11 +171,21 @@
|
|||
th:value="${dict.dictValue}"></option>
|
||||
</select></td>
|
||||
<td class="shortTd">出货金额<span class="is-required">*</span></td>
|
||||
<td><input name="shipmentAmount" class="form-control" type="number" required></td>
|
||||
<td>
|
||||
<input id="shipmentAmount" name="shipmentAmount" class="form-control" type="hidden" >
|
||||
<input type="text" required id="displayshipmentAmount" class="form-control" placeholder="输入金额"
|
||||
oninput="this.value = this.value.replace(/[^0-9.]/g,'').replace(/(\..*)\./g, '$1');"
|
||||
onfocus="this.value=document.getElementById('shipmentAmount').value"
|
||||
onblur="updateShipmentAmountValue('shipmentAmount')" >
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>实际进货金额<span class="is-required">*</span></td>
|
||||
<td><input type="number" name="actualPurchaseAmount" class="form-control" required>
|
||||
<td><input type="hidden" id="actualPurchaseAmount" name="actualPurchaseAmount" class="form-control" >
|
||||
<input type="text" required id="displayactualPurchaseAmount" class="form-control" placeholder="输入金额"
|
||||
oninput="this.value = this.value.replace(/[^0-9.]/g,'').replace(/(\..*)\./g, '$1');"
|
||||
onfocus="this.value=document.getElementById('actualPurchaseAmount').value"
|
||||
onblur="updateShipmentAmountValue('actualPurchaseAmount')" >
|
||||
</td>
|
||||
<td>执行单有效截止时间<span class="is-required">*</span></td>
|
||||
<td colspan="3">
|
||||
|
@ -274,14 +291,16 @@
|
|||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div class="section-title">配置信息</div>
|
||||
<h3>软件</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct({})">添加</button>
|
||||
<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>描述</th>
|
||||
<th>数量</th>
|
||||
<th style="width: 90px">目录单价(RMB)</th>
|
||||
|
@ -297,13 +316,16 @@
|
|||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>硬件</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct2({})">添加</button>
|
||||
<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>数量</th>
|
||||
|
@ -320,13 +342,16 @@
|
|||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>维保</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct3({})">添加</button>
|
||||
<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>数量</th>
|
||||
|
@ -423,6 +448,24 @@
|
|||
|
||||
}
|
||||
|
||||
function updateShipmentAmountValue(key) {
|
||||
// 获取显示用的输入框
|
||||
const displayInput = document.getElementById('display'+key);
|
||||
// 获取隐藏字段
|
||||
const rawInput = document.getElementById(key);
|
||||
// 去除逗号并过滤非数字字符
|
||||
let rawValue = displayInput.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');
|
||||
|
||||
// 更新隐藏字段的值
|
||||
rawInput.value = rawValue;
|
||||
|
||||
// 格式化显示(可选)
|
||||
if (rawValue) {
|
||||
displayInput.value = Number(rawValue).toLocaleString('en-US');
|
||||
} else {
|
||||
displayInput.value = "";
|
||||
}
|
||||
}
|
||||
function saveSelect() {
|
||||
var options = {
|
||||
title: "确认并提交订单",
|
||||
|
@ -487,6 +530,9 @@
|
|||
$('[name="bgProperty"]').val(data.bgProperty);
|
||||
$('[name="agentName"]').val(data.agentName);
|
||||
$('[name="agentCode"]').val(data.agentCode);
|
||||
$('[name="businessPerson"]').val(data.contactPerson);
|
||||
$('[name="businessEmail"]').val(data.contactEmail);
|
||||
$('[name="businessPhone"]').val(data.contactPhone);
|
||||
changeBg()
|
||||
$('[name="industryType"]').val(data.industryType);
|
||||
initProjectList(data)
|
||||
|
@ -584,6 +630,10 @@
|
|||
$('[name="agentCode"]').val(rows[0].agentCode);
|
||||
changeBg()
|
||||
$('[name="industryType"]').val(rows[0].industryType);
|
||||
|
||||
$('[name="businessPerson"]').val(rows[0].contactPerson);
|
||||
$('[name="businessEmail"]').val(rows[0].contactEmail);
|
||||
$('[name="businessPhone"]').val(rows[0].contactPhone);
|
||||
initProjectList()
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
@ -620,7 +670,6 @@
|
|||
}
|
||||
|
||||
|
||||
// 添加软件
|
||||
function addProduct(data) {
|
||||
let length = $('#productTable tbody').find('tr').length
|
||||
let tr = $(`
|
||||
|
@ -628,23 +677,25 @@
|
|||
<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><select name="softwareProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel1">
|
||||
${softwareProjectProductInfoList.map((ele) => {
|
||||
return `<option value="${ele.model}" ${ele.model == data.model ? 'selected' : ''}>${ele.model}</option>`
|
||||
}).join('')
|
||||
}
|
||||
</select></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="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.allPrice || ''}" name="softwareProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.catalogueAllPrice || ''}" name="softwareProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></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: #1686d8" class="delRow">删除</span></td>
|
||||
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
$('#productTable tbody').append(tr)
|
||||
|
@ -664,12 +715,20 @@ ${softwareProjectProductInfoList.map((ele) => {
|
|||
<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="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.allPrice || ''}" name="hardwareProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.catalogueAllPrice || ''}" name="hardwareProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></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: #1686d8" class="delRow">删除</span></td>
|
||||
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
$('#productTable2 tbody').append(tr)
|
||||
|
@ -685,16 +744,24 @@ ${softwareProjectProductInfoList.map((ele) => {
|
|||
<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 name="maintenanceProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required value="${data.quantity || ''}" ></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="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.allPrice || ''}" name="maintenanceProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.catalogueAllPrice || ''}" name="maintenanceProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></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: #1686d8" class="delRow">删除</span></td>
|
||||
<td><span style="cursor:pointer;color: #ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
$('#productTable3 tbody').append(tr)
|
||||
|
@ -741,9 +808,11 @@ ${softwareProjectProductInfoList.map((ele) => {
|
|||
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 () {
|
||||
|
@ -752,6 +821,7 @@ ${softwareProjectProductInfoList.map((ele) => {
|
|||
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()
|
||||
|
@ -762,17 +832,25 @@ ${softwareProjectProductInfoList.map((ele) => {
|
|||
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"))
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -882,12 +960,26 @@ ${
|
|||
$('#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") : ""
|
||||
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") : ""
|
||||
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") : ""
|
||||
addProduct3(ele)
|
||||
}) : ''
|
||||
return
|
||||
|
@ -898,12 +990,24 @@ ${
|
|||
$('#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") : ""
|
||||
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") : ""
|
||||
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") : ""
|
||||
addProduct3(ele)
|
||||
}) : ''
|
||||
})
|
||||
|
|
|
@ -30,20 +30,26 @@
|
|||
|
||||
.section-title {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
font-size: 30px;
|
||||
padding: 10px 0;
|
||||
color: #0075ff;
|
||||
}
|
||||
|
||||
.checkbox-group label {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.checkbox-box label {
|
||||
|
@ -91,7 +97,8 @@
|
|||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form id="form-order-edit" th:object="${projectOrderInfo}">
|
||||
<div class="section-title">编辑订单<span id="projectNameBox"></span></div>
|
||||
<div class="section-title">编辑订单<span style="margin-left: 10px">|</span>
|
||||
<span id="projectNameBox" style="color: black"></span></div>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="shortTd">项目编号<span class="is-required">*</span></td>
|
||||
|
@ -163,13 +170,22 @@
|
|||
th:value="${dict.dictValue}"></option>
|
||||
</select></td>
|
||||
<td class="shortTd">出货金额<span class="is-required">*</span></td>
|
||||
<td><input name="shipmentAmount" th:field="*{shipmentAmount}" class="form-control" type="number"
|
||||
required></td>
|
||||
<td><input name="shipmentAmount" id="shipmentAmount" th:field="*{shipmentAmount}" class="form-control" type="hidden"
|
||||
>
|
||||
<input type="text" required id="displayshipmentAmount" class="form-control" placeholder="输入金额"
|
||||
oninput="this.value = this.value.replace(/[^0-9.]/g,'').replace(/(\..*)\./g, '$1');"
|
||||
onfocus="this.value=document.getElementById('shipmentAmount').value"
|
||||
onblur="updateShipmentAmountValue('shipmentAmount')" >
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>实际进货金额<span class="is-required">*</span></td>
|
||||
<td><input type="number" name="actualPurchaseAmount" th:field="*{actualPurchaseAmount}"
|
||||
class="form-control" required>
|
||||
<td><input type="hidden" id="actualPurchaseAmount" name="actualPurchaseAmount" th:field="*{actualPurchaseAmount}"
|
||||
class="form-control" >
|
||||
<input type="text" required id="displayactualPurchaseAmount" class="form-control" placeholder="输入金额"
|
||||
oninput="this.value = this.value.replace(/[^0-9.]/g,'').replace(/(\..*)\./g, '$1');"
|
||||
onfocus="this.value=document.getElementById('actualPurchaseAmount').value"
|
||||
onblur="updateShipmentAmountValue('actualPurchaseAmount')" >
|
||||
</td>
|
||||
<td>执行单有效截止时间<span class="is-required">*</span></td>
|
||||
<td colspan="3">
|
||||
|
@ -284,13 +300,16 @@
|
|||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div class="section-title">配置信息</div>
|
||||
<h3>软件</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct({})">添加</button>
|
||||
<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>数量</th>
|
||||
|
@ -307,13 +326,17 @@
|
|||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>硬件</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct2({})">添加</button>
|
||||
<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>数量</th>
|
||||
|
@ -330,13 +353,16 @@
|
|||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>维保</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct3({})">添加</button>
|
||||
<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>数量</th>
|
||||
|
@ -491,6 +517,14 @@
|
|||
}
|
||||
|
||||
$(function () {
|
||||
let shipmentAmount = [[${projectOrderInfo.shipmentAmount}]] || ''
|
||||
if (shipmentAmount) {
|
||||
document.getElementById('displayshipmentAmount').value=shipmentAmount.toLocaleString('en-US');
|
||||
}
|
||||
let actualPurchaseAmount = [[${projectOrderInfo.actualPurchaseAmount}]] || ''
|
||||
if (actualPurchaseAmount) {
|
||||
document.getElementById('displayactualPurchaseAmount').value=actualPurchaseAmount.toLocaleString('en-US');
|
||||
}
|
||||
initProductList()
|
||||
initSaveDraft()
|
||||
$("input[name='estimatedOrderTime']").datetimepicker({
|
||||
|
@ -579,6 +613,9 @@
|
|||
changeBg()
|
||||
$('[name="industryType"]').val(rows[0].industryType);
|
||||
initProjectList()
|
||||
$('[name="businessPerson"]').val(rows[0].contactPerson);
|
||||
$('[name="businessEmail"]').val(rows[0].contactEmail);
|
||||
$('[name="businessPhone"]').val(rows[0].contactPhone);
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
|
@ -618,27 +655,53 @@
|
|||
|
||||
$.modal.close(index);
|
||||
}
|
||||
function updateShipmentAmountValue(key) {
|
||||
// 获取显示用的输入框
|
||||
const displayInput = document.getElementById('display'+key);
|
||||
// 获取隐藏字段
|
||||
const rawInput = document.getElementById(key);
|
||||
// 去除逗号并过滤非数字字符
|
||||
let rawValue = displayInput.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');
|
||||
|
||||
// 更新隐藏字段的值
|
||||
rawInput.value = rawValue;
|
||||
|
||||
// 格式化显示(可选)
|
||||
if (rawValue) {
|
||||
displayInput.value = Number(rawValue).toLocaleString('en-US');
|
||||
} else {
|
||||
displayInput.value = "";
|
||||
}
|
||||
}
|
||||
|
||||
// 添加软件
|
||||
|
||||
function addProduct(data) {
|
||||
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" value="${data.productBomCode || ''}"></td>
|
||||
<td><input class="form-control model" type="text" onclick="selectProduct('1','终端产品',this)" name="softwareProjectProductInfoList[${length}].model" value="${data.model || ''}"></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" oninvalid="()=>{ return '0-1'}" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" 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="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.allPrice || ''}" name="softwareProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.catalogueAllPrice || ''}" name="softwareProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></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: #1686d8" class="delRow">删除</span></td>
|
||||
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
$('#productTable tbody').append(tr)
|
||||
|
@ -651,19 +714,27 @@
|
|||
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" value="${data.productBomCode || ''}"></td>
|
||||
<td><input class="form-control model" type="text" onclick="selectProduct('2','软件产品',this)" name="hardwareProjectProductInfoList[${length}].model" value="${data.model || ''}"></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="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.allPrice || ''}" name="hardwareProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.catalogueAllPrice || ''}" name="hardwareProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></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: #1686d8" class="delRow">删除</span></td>
|
||||
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
$('#productTable2 tbody').append(tr)
|
||||
|
@ -676,19 +747,27 @@
|
|||
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" value="${data.productBomCode || ''}"></td>
|
||||
<td><input class="form-control model" type="text" onclick="selectProduct('11,22','服务产品',this)" value="${data.model || ''}" name="maintenanceProjectProductInfoList[${length}].model" value="${data.model || ''}"></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 name="maintenanceProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required value="${data.quantity || ''}" ></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="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.allPrice || ''}" name="maintenanceProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.catalogueAllPrice || ''}" name="maintenanceProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></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: #1686d8" class="delRow">删除</span></td>
|
||||
<td><span style="cursor:pointer;color: #ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
$('#productTable3 tbody').append(tr)
|
||||
|
@ -728,24 +807,39 @@
|
|||
})
|
||||
}
|
||||
|
||||
function 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(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()
|
||||
|
@ -753,20 +847,29 @@
|
|||
$(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"))
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -878,12 +981,24 @@ ${
|
|||
$('#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") : ""
|
||||
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") : ""
|
||||
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") : ""
|
||||
addProduct3(ele)
|
||||
}) : '';
|
||||
window.localStorage.removeItem('getDetail')
|
||||
|
|
|
@ -3,11 +3,18 @@
|
|||
<head>
|
||||
<th:block th:include="include :: header('订单管理列表')" />
|
||||
</head>
|
||||
<style>
|
||||
.select-list li p, .select-list li label:not(.radio-box){
|
||||
width: 80px;
|
||||
}
|
||||
</style>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<!-- <div th:replace="layout/product-list::product()"></div>-->
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div id="content"></div>
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
|
@ -18,22 +25,39 @@
|
|||
<label>项目名称:</label>
|
||||
<input type="text" name="projectName" placeholder="项目名称" />
|
||||
</li>
|
||||
<li>
|
||||
<label>合同编号:</label>
|
||||
<input type="text" name="orderCode" placeholder="合同编号" />
|
||||
</li>
|
||||
<li>
|
||||
<label>最终客户:</label>
|
||||
<input type="text" name="customerName" placeholder="最终客户" />
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>订单状态:</label>
|
||||
<select name="orderStatus" class="form-control" th:with="type=${@dict.getType('order_status')}">
|
||||
<option value="">请选择</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||
th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>代表处:</label>
|
||||
<input type="text" name="agentName" placeholder="代表处" />
|
||||
</li>
|
||||
<li>
|
||||
<label>汇智负责人:</label>
|
||||
<input type="text" name="dutyName" placeholder="项目负责人" />
|
||||
</li>
|
||||
<li>
|
||||
<label>供货商:</label>
|
||||
<input type="text" name="supplier" placeholder="项目负责人" />
|
||||
|
||||
<label>通知人:</label>
|
||||
<input type="text" name="notifier" placeholder="通知人" />
|
||||
</li>
|
||||
<li>
|
||||
<label>订单状态:</label>
|
||||
<select name="orderStatus" class="form-control">
|
||||
<option value="">请选择</option>
|
||||
<option value="0">草稿</option>
|
||||
<option value="1">待审批</option>
|
||||
</select>
|
||||
<label>进货商:</label>
|
||||
<input type="text" name="partnerName" placeholder="进货商" />
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
@ -74,6 +98,7 @@
|
|||
var prefix = ctx + "project/order";
|
||||
|
||||
$(function() {
|
||||
// $('#content').load(ctx + 'project/order/add');
|
||||
var urlChina = '/cnarea/select';
|
||||
$.cxSelect.defaults.url = urlChina;
|
||||
// $.cxSelect.defaults.jsonSpace = 'data';
|
||||
|
@ -111,11 +136,14 @@
|
|||
},
|
||||
{
|
||||
field: 'customerName',
|
||||
title: '最终用户'
|
||||
title: '最终客户'
|
||||
},
|
||||
{
|
||||
field: 'shipmentAmount',
|
||||
title: '金额(RMB)'
|
||||
title: '金额(RMB)',
|
||||
formatter: function (value, row, index) {
|
||||
return value?formatAmountNumber(value):'';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
|
@ -123,11 +151,22 @@
|
|||
},
|
||||
{
|
||||
field: 'orderStatus',
|
||||
title: '订单状态'
|
||||
title: '订单状态',
|
||||
formatter: function (value, row, index) {
|
||||
return $.table.selectDictLabel([[${@dict.getType('order_status')}]], value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'dutyName',
|
||||
title: '汇智负责人'
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '物流状态'
|
||||
},
|
||||
{
|
||||
field: 'agentName',
|
||||
title: '代表处'
|
||||
},
|
||||
{
|
||||
field: 'notifier',
|
||||
|
|
|
@ -26,7 +26,7 @@ public class ProjectInfo extends BaseEntity
|
|||
private Long id;
|
||||
|
||||
/** 项目编码 */
|
||||
@Excel(name = "项目编码")
|
||||
@Excel(name = "项目编号")
|
||||
private String projectCode;
|
||||
|
||||
/** 项目名称 */
|
||||
|
@ -36,15 +36,18 @@ public class ProjectInfo extends BaseEntity
|
|||
/** 客户code */
|
||||
// @Excel(name = "客户code")
|
||||
private String customerCode;
|
||||
/** BG属性 */
|
||||
private String bgProperty;
|
||||
|
||||
|
||||
/** 客户名称 */
|
||||
@Excel(name = "客户名称")
|
||||
@Excel(name = "最终客户")
|
||||
private String customerName;
|
||||
private String customerUserName;
|
||||
private String customerPhone;
|
||||
|
||||
/**
|
||||
* BG属性
|
||||
*/
|
||||
@Excel(name = "BG", dictType = "bg_type")
|
||||
private String bgProperty;
|
||||
/** 行业 */
|
||||
@Excel(name = "行业")
|
||||
private String industryType;
|
||||
|
@ -54,38 +57,49 @@ public class ProjectInfo extends BaseEntity
|
|||
// private String province;
|
||||
/** 代表处 */
|
||||
private String agentCode;
|
||||
@Excel(name = "代表处")
|
||||
private String agentName;
|
||||
private String contactEmail;
|
||||
private String contactPerson;
|
||||
private String contactPhone;
|
||||
/** 项目把握度 */
|
||||
@Excel(name = "项目把握度")
|
||||
private String projectGraspDegree;
|
||||
/** 项目阶段 */
|
||||
@Excel(name = "项目阶段")
|
||||
/**
|
||||
* 项目阶段
|
||||
*/
|
||||
@Excel(name = "项目阶段", dictType = "project_stage")
|
||||
private String projectStage;
|
||||
|
||||
|
||||
|
||||
/** 汇智支撑人员id */
|
||||
@Excel(name = "汇智支撑人员id")
|
||||
private String hzSupportUser;
|
||||
private String hzSupportUserName;
|
||||
|
||||
/** 运作机构 */
|
||||
@Excel(name = "运作机构")
|
||||
private String hzSupportUser;
|
||||
@Excel(name = "汇智负责人")
|
||||
private String hzSupportUserName;
|
||||
@Excel(name = "poc")
|
||||
private String poc;
|
||||
/**
|
||||
* 运作机构
|
||||
*/
|
||||
// @Excel(name = "运作机构")
|
||||
private String operateInstitution;
|
||||
|
||||
/** 代理商code */
|
||||
|
||||
private String partnerCode;
|
||||
@Excel(name = "代理商")
|
||||
// @Excel(name = "代理商")
|
||||
private String partnerName;
|
||||
private String partnerUserName;
|
||||
private String partnerEmail;
|
||||
|
||||
/** 联系方式 */
|
||||
@Excel(name = "联系方式")
|
||||
// @Excel(name = "联系方式")
|
||||
private String contactWay;
|
||||
|
||||
/** 预计金额 */
|
||||
@Excel(name = "预计金额")
|
||||
@Excel(name = "预计金额(元)")
|
||||
private BigDecimal estimatedAmount;
|
||||
|
||||
/** 币种 */
|
||||
|
@ -101,35 +115,40 @@ public class ProjectInfo extends BaseEntity
|
|||
|
||||
/** 预计发货时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "预计发货时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
// @Excel(name = "预计发货时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date estimatedDeliverTime;
|
||||
private Date estimatedDeliverTimeStart;
|
||||
private Date estimatedDeliverTimeEnd;
|
||||
private Date updateTimeStart;
|
||||
private Date updateTimeEnd;
|
||||
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updateTime;
|
||||
/** 竞争对手 */
|
||||
@Excel(name = "竞争对手")
|
||||
// @Excel(name = "竞争对手")
|
||||
private String competitor;
|
||||
private List<String> competitorList;
|
||||
|
||||
/** 是否国产 */
|
||||
@Excel(name = "是否国产",readConverterExp = "0=否,1=是")
|
||||
/**
|
||||
* 是否国产
|
||||
*/
|
||||
// @Excel(name = "是否国产",readConverterExp = "0=否,1=是")
|
||||
private String countryProduct;
|
||||
|
||||
/** 服务器配置 */
|
||||
@Excel(name = "服务器配置")
|
||||
// @Excel(name = "服务器配置")
|
||||
private String serverConfiguration;
|
||||
|
||||
/** 关键技术问题 */
|
||||
@Excel(name = "关键技术问题")
|
||||
// @Excel(name = "关键技术问题")
|
||||
private String keyProblem;
|
||||
|
||||
/** 项目描述 */
|
||||
@Excel(name = "项目描述")
|
||||
// @Excel(name = "项目描述")
|
||||
private String projectDesc;
|
||||
private Boolean highlight;
|
||||
private Boolean canGenerate;
|
||||
|
||||
/** 项目产品信息 */
|
||||
private List<ProjectProductInfo> softwareProjectProductInfoList;
|
||||
private List<ProjectProductInfo> hardwareProjectProductInfoList;
|
||||
|
|
|
@ -31,133 +31,156 @@ public class ProjectOrderInfo extends BaseEntity {
|
|||
*/
|
||||
|
||||
private Long projectId;
|
||||
/**
|
||||
* 项目编号
|
||||
*/
|
||||
@Excel(name="项目编号")
|
||||
private String projectCode;
|
||||
@Excel(name="项目名称")
|
||||
private String projectName;
|
||||
private String customerName;
|
||||
|
||||
private String industryType;
|
||||
private String bgProperty;
|
||||
private String agentName;
|
||||
|
||||
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 地市
|
||||
*/
|
||||
@Excel(name = "地市")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 进货商商务接口人姓名
|
||||
*/
|
||||
@Excel(name = "进货商商务接口人姓名")
|
||||
private String businessPerson;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@Excel(name = "邮箱")
|
||||
private String businessEmail;
|
||||
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
@Excel(name = "电话")
|
||||
private String businessPhone;
|
||||
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
@Excel(name = "合同编号")
|
||||
private String orderCode;
|
||||
|
||||
/**
|
||||
* 币种
|
||||
*/
|
||||
@Excel(name = "币种")
|
||||
private String currencyType;
|
||||
@Excel(name = "最终客户")
|
||||
private String customerName;
|
||||
|
||||
/**
|
||||
* 出货金额
|
||||
*/
|
||||
@Excel(name = "出货金额")
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal shipmentAmount;
|
||||
|
||||
/**
|
||||
* 实际进货金额
|
||||
*/
|
||||
@Excel(name = "实际进货金额")
|
||||
private BigDecimal actualPurchaseAmount;
|
||||
|
||||
/**
|
||||
* 执行单有效截止时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "执行单有效截止时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderEndTime;
|
||||
@Excel(name="下单时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 订单状态
|
||||
*/
|
||||
@Excel(name = "订单状态",dictType = "order_status")
|
||||
private String orderStatus;
|
||||
|
||||
/**
|
||||
* 要求到货时间
|
||||
* 责任人
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "要求到货时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date deliveryTime;
|
||||
|
||||
/**
|
||||
* 公司直发
|
||||
*/
|
||||
@Excel(name = "公司直发")
|
||||
private String companyDelivery;
|
||||
|
||||
private String duty;
|
||||
@Excel(name = "汇智负责人")
|
||||
private String dutyName;
|
||||
@Excel(name = "代表处")
|
||||
private String agentName;
|
||||
/**
|
||||
* 通知人
|
||||
*/
|
||||
@Excel(name = "通知人")
|
||||
private String notifier;
|
||||
|
||||
/**
|
||||
* 地市
|
||||
*/
|
||||
// @Excel(name = "地市")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 进货商商务接口人姓名
|
||||
*/
|
||||
// @Excel(name = "进货商商务接口人姓名")
|
||||
private String businessPerson;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
// @Excel(name = "邮箱")
|
||||
private String businessEmail;
|
||||
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
// @Excel(name = "电话")
|
||||
private String businessPhone;
|
||||
|
||||
|
||||
/**
|
||||
* 币种
|
||||
*/
|
||||
// @Excel(name = "币种")
|
||||
private String currencyType;
|
||||
|
||||
/**
|
||||
* 进货商
|
||||
*/
|
||||
|
||||
private String partnerCode;
|
||||
@Excel(name = "进货商")
|
||||
private String partnerName;
|
||||
|
||||
/**
|
||||
* 实际进货金额
|
||||
*/
|
||||
// @Excel(name = "实际进货金额")
|
||||
private BigDecimal actualPurchaseAmount;
|
||||
|
||||
/**
|
||||
* 执行单有效截止时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
// @Excel(name = "执行单有效截止时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderEndTime;
|
||||
|
||||
/**
|
||||
* 要求到货时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
// @Excel(name = "要求到货时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date deliveryTime;
|
||||
|
||||
/**
|
||||
* 公司直发
|
||||
*/
|
||||
// @Excel(name = "公司直发")
|
||||
private String companyDelivery;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通知人邮箱
|
||||
*/
|
||||
@Excel(name = "通知人邮箱")
|
||||
// @Excel(name = "通知人邮箱")
|
||||
private String notifierEmail;
|
||||
|
||||
/**
|
||||
* 通知人电话
|
||||
*/
|
||||
@Excel(name = "通知人电话")
|
||||
// @Excel(name = "通知人电话")
|
||||
private String notifierPhone;
|
||||
|
||||
/**
|
||||
* 责任人
|
||||
*/
|
||||
|
||||
private String duty;
|
||||
@Excel(name = "责任人")
|
||||
private String dutyName;
|
||||
|
||||
/**
|
||||
* 责任人邮箱
|
||||
*/
|
||||
@Excel(name = "责任人邮箱")
|
||||
// @Excel(name = "责任人邮箱")
|
||||
private String dutyEmail;
|
||||
|
||||
/**
|
||||
* 责任人电话
|
||||
*/
|
||||
@Excel(name = "责任人电话")
|
||||
// @Excel(name = "责任人电话")
|
||||
private String dutyPhone;
|
||||
|
||||
/**
|
||||
* 下单通路
|
||||
*/
|
||||
@Excel(name = "下单通路")
|
||||
// @Excel(name = "下单通路")
|
||||
private String orderChannel;
|
||||
|
||||
/**
|
||||
* 进货商
|
||||
*/
|
||||
@Excel(name = "进货商")
|
||||
private String partnerCode;
|
||||
private String partnerName;
|
||||
|
||||
private String partnerEmail;
|
||||
private String partnerUserName;
|
||||
private String partnerPhone;
|
||||
|
@ -171,14 +194,10 @@ public class ProjectOrderInfo extends BaseEntity {
|
|||
/**
|
||||
* 供货商
|
||||
*/
|
||||
@Excel(name = "供货商")
|
||||
// @Excel(name = "供货商")
|
||||
private String supplier;
|
||||
|
||||
/**
|
||||
* 订单状态
|
||||
*/
|
||||
@Excel(name = "订单状态")
|
||||
private String orderStatus;
|
||||
|
||||
private List<ProjectOrderFileLog> contractFileList;
|
||||
private List<ProjectOrderFileLog> configFileList;
|
||||
|
||||
|
|
|
@ -50,10 +50,12 @@ public class ProjectInfoServiceImpl implements IProjectInfoService {
|
|||
@Autowired
|
||||
private IProjectOrderInfoService orderInfoService;
|
||||
private static final String PROJECT_CODE_PREFIX = "V";
|
||||
private static final Integer PROJECT_CODE_LENGTH = 5;
|
||||
private static final Integer PROJECT_CODE_LENGTH = 6;
|
||||
|
||||
|
||||
public static final String INDUSTRY_TYPE_DICT_TYPE = "industry_type";
|
||||
|
||||
public static final String INDUSTRY_TYPE_YYS_DICT_TYPE = "bg_yys";
|
||||
public static final String INDUSTRY_TYPE_DICT_TYPE = "bg_hysy";
|
||||
public static final String BG_TYPE_DICT_TYPE = "bg_type";
|
||||
public static final String PROJECT_STAGE_DICT_TYPE = "project_stage";
|
||||
public static final String OPERATE_INSTITUTION_DICT_TYPE = "operate_institution";
|
||||
|
@ -453,12 +455,12 @@ public class ProjectInfoServiceImpl implements IProjectInfoService {
|
|||
public List<ProjectInfo> selectProjectInfoExportList(ProjectInfo projectInfo) {
|
||||
List<ProjectInfo> projectInfos = projectInfoMapper.selectProjectInfoList(projectInfo);
|
||||
for (ProjectInfo info : projectInfos) {
|
||||
info.setIndustryType(DictUtils.getDictLabel(INDUSTRY_TYPE_DICT_TYPE, info.getIndustryType()));
|
||||
info.setProjectStage(DictUtils.getDictLabel(PROJECT_STAGE_DICT_TYPE, info.getIndustryType()));
|
||||
if (info.getHzSupportUser() != null) {
|
||||
List<SysUser> sysUsers = projectInfoMapper.selectUserById(Collections.singletonList(info.getHzSupportUser()));
|
||||
Map<String, String> userMap = sysUsers.stream().collect(Collectors.toMap(item -> item.getUserId().toString(), SysUser::getUserName));
|
||||
info.setHzSupportUser(userMap.getOrDefault(info.getHzSupportUser(), ""));
|
||||
// info.setIndustryType(DictUtils.getDictLabel(INDUSTRY_TYPE_DICT_TYPE, info.getIndustryType()));
|
||||
// info.setProjectStage(DictUtils.getDictLabel(PROJECT_STAGE_DICT_TYPE, info.getIndustryType()));
|
||||
if ("YYS".equals(info.getBgProperty())){
|
||||
info.setIndustryType(DictUtils.getDictLabel(INDUSTRY_TYPE_YYS_DICT_TYPE, info.getIndustryType()));
|
||||
}else{
|
||||
info.setIndustryType(DictUtils.getDictLabel(INDUSTRY_TYPE_DICT_TYPE, info.getIndustryType()));
|
||||
}
|
||||
}
|
||||
return projectInfos;
|
||||
|
|
|
@ -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 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 from project_info t1
|
||||
</sql>
|
||||
<sql id="selectRelationProjectInfoVo">
|
||||
select t1.id,
|
||||
|
@ -68,8 +68,8 @@ 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,
|
||||
t2.agent_name,
|
||||
t1.customer_user_name,t1.customer_phone,t1.partner_email,t1.partner_user_name,
|
||||
t2.agent_name,t2.contact_email,t2.contact_phone,t2.contact_person,
|
||||
t3.user_name as hz_support_user_name
|
||||
from project_info t1
|
||||
left join agent_info t2 on t1.agent_code = t2.agent_code
|
||||
|
@ -184,6 +184,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="operateInstitution != null">operate_institution,</if>
|
||||
<if test="partnerCode != null">partner_code,</if>
|
||||
<if test="partnerName != null">partner_name,</if>
|
||||
<if test="partnerUserName != null">partner_user_name,</if>
|
||||
<if test="partnerEmail != null">partner_email,</if>
|
||||
<if test="contactWay != null">contact_way,</if>
|
||||
<if test="estimatedAmount != null">estimated_amount,</if>
|
||||
|
@ -216,6 +217,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="operateInstitution != null">#{operateInstitution},</if>
|
||||
<if test="partnerCode != null">#{partnerCode},</if>
|
||||
<if test="partnerName != null">#{partnerName},</if>
|
||||
<if test="partnerUserName != null">#{partnerUserName},</if>
|
||||
<if test="partnerEmail != null">#{partnerEmail},</if>
|
||||
<if test="contactWay != null">#{contactWay},</if>
|
||||
<if test="estimatedAmount != null">#{estimatedAmount},</if>
|
||||
|
@ -252,6 +254,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="operateInstitution != null">operate_institution = #{operateInstitution},</if>
|
||||
partner_code = #{partnerCode},
|
||||
<if test="partnerName != null">partner_name = #{partnerName},</if>
|
||||
<if test="partnerUserName != null">partner_user_name = #{partnerUserName},</if>
|
||||
<if test="partnerEmail != null">partner_email=#{partnerEmail},</if>
|
||||
<if test="contactWay != null">contact_way = #{contactWay},</if>
|
||||
<if test="estimatedAmount != null">estimated_amount = #{estimatedAmount},</if>
|
||||
|
|
|
@ -61,8 +61,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<include refid="selectProjectOrderInfoRelationVo"/>
|
||||
<where>
|
||||
<if test="projectId != null "> and t1.project_id = #{projectId}</if>
|
||||
<if test="projectCode != null and projectCode!='' "> and t2.project_code = #{projectCode}</if>
|
||||
<if test="projectName != null and projectName!=''"> and t2.project_name = #{projectName}</if>
|
||||
<if test="projectCode != null and projectCode!='' "> and t2.project_code like concat('%',#{projectCode},'%')</if>
|
||||
<if test="projectName != null and projectName!=''"> and t2.project_name like concat('%', #{projectName},'%')</if>
|
||||
<if test="customerName != null and customerName!=''"> and t2.customer_name like concat('%',#{customerName},'%')</if>
|
||||
<if test="agentName != null and agentName!=''"> and t4.agent_name like concat('%',#{agentName},'%')</if>
|
||||
<if test="province != null and province != ''"> and t1.province = #{province}</if>
|
||||
<if test="city != null and city != ''"> and t1.city = #{city}</if>
|
||||
<if test="businessPerson != null and businessPerson != ''"> and t1.business_person = #{businessPerson}</if>
|
||||
|
@ -84,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="dutyPhone != null and dutyPhone != ''"> and t1.duty_phone = #{dutyPhone}</if>
|
||||
<if test="orderChannel != null and orderChannel != ''"> and t1.order_channel = #{orderChannel}</if>
|
||||
<if test="partnerCode != null and partnerCode != ''"> and t1.partner_code = #{partnerCode}</if>
|
||||
<if test="partnerName != null and partnerName != ''"> and t3.partner_name like concat('%', #{partnerName}, '%')</if>
|
||||
<if test="supplier != null and supplier != ''"> and t1.supplier = #{supplier}</if>
|
||||
<if test="supplier != null and supplier != ''"> and t1.supplier = #{supplier}</if>
|
||||
<if test="orderStatus != null and orderStatus != ''"> and t1.order_status = #{orderStatus}</if>
|
||||
|
|
Loading…
Reference in New Issue