2025-05-30 02:10:24 +00:00
|
|
|
|
<!DOCTYPE html>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
2025-05-30 02:10:24 +00:00
|
|
|
|
<head>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
<th:block th:include="include :: header('新增项目管理')"/>
|
|
|
|
|
|
<th:block th:include="include :: datetimepicker-css"/>
|
2025-05-30 02:10:24 +00:00
|
|
|
|
</head>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
<style>
|
|
|
|
|
|
body {
|
|
|
|
|
|
font-family: "微软雅黑", Arial, sans-serif;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
table {
|
|
|
|
|
|
border-collapse: collapse;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
th, td {
|
|
|
|
|
|
border: 1px solid #ccc;
|
|
|
|
|
|
padding: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.is-required {
|
|
|
|
|
|
color: red;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
th {
|
|
|
|
|
|
background: #f5f5f5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.section-title {
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
padding: 10px 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.checkbox-group label {
|
|
|
|
|
|
margin-right: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.add-btn {
|
|
|
|
|
|
background: #409eff;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
padding: 5px 10px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.checkbox-box {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
gap: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.checkbox-box label {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
gap: 5px;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.shortTd {
|
|
|
|
|
|
width: 100px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-06-05 12:07:28 +00:00
|
|
|
|
input, textarea, .productTable td {
|
2025-06-05 07:52:23 +00:00
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
2025-06-09 06:17:32 +00:00
|
|
|
|
|
|
|
|
|
|
.productTable label[id*="iscount"] {
|
2025-06-08 07:14:25 +00:00
|
|
|
|
top: -30px !important;
|
|
|
|
|
|
}
|
2025-06-09 06:17:32 +00:00
|
|
|
|
|
|
|
|
|
|
table tr:nth-child(odd) {
|
|
|
|
|
|
background: #f3f3f3;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
input[type=checkbox], input[type=radio] {
|
|
|
|
|
|
margin-top: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
label {
|
|
|
|
|
|
margin-bottom: 0 !important;
|
|
|
|
|
|
}
|
2025-06-05 07:52:23 +00:00
|
|
|
|
</style>
|
2025-05-30 02:10:24 +00:00
|
|
|
|
<body class="white-bg">
|
2025-06-05 07:52:23 +00:00
|
|
|
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
|
|
|
|
|
<form id="form-product-add" th:object="${projectInfo}">
|
|
|
|
|
|
<input type="hidden" name="id" th:field="*{id}">
|
|
|
|
|
|
<div class="section-title">项目信息</div>
|
|
|
|
|
|
<table>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td class="shortTd">项目编码<span class="is-required">*</span></td>
|
2025-06-05 12:07:28 +00:00
|
|
|
|
<td><input type="text" th:field="*{projectCode}" name="projectCode" class="form-control"
|
|
|
|
|
|
placeholder="保存后自动生成" readonly>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
</td>
|
|
|
|
|
|
<td class="shortTd">项目名称<span class="is-required">*</span></td>
|
2025-06-05 12:07:28 +00:00
|
|
|
|
<td><input type="text" th:field="*{projectName}" name="projectName" maxlength="40"
|
|
|
|
|
|
placeholder="限制40个字符"
|
2025-06-05 07:52:23 +00:00
|
|
|
|
class="form-control"></td>
|
2025-06-09 06:17:32 +00:00
|
|
|
|
<td>预计金额(RMB)<span class="is-required">*</span></td>
|
|
|
|
|
|
<td><input type="number" name="estimatedAmount" class="form-control" th:field="*{estimatedAmount}"
|
|
|
|
|
|
required></td>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td class="shortTd">BG<span class="is-required">*</span></td>
|
|
|
|
|
|
<td>
|
2025-06-05 12:07:28 +00:00
|
|
|
|
<select name="bgProperty" th:field="*{bgProperty}" class="form-control"
|
|
|
|
|
|
th:with="type=${@dict.getType('bg_type')}"
|
2025-06-05 07:52:23 +00:00
|
|
|
|
onchange="changeBg()" required>
|
|
|
|
|
|
<option value="">请选择BG</option>
|
|
|
|
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
|
|
|
|
|
th:value="${dict.dictValue}"></option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="shortTd">行业<span class="is-required">*</span></td>
|
|
|
|
|
|
<td id="industryTypeBox">
|
|
|
|
|
|
<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">
|
2025-06-05 12:07:28 +00:00
|
|
|
|
<input name="agentName" th:field="*{agentName}" class="form-control" type="text"
|
2025-06-05 07:52:23 +00:00
|
|
|
|
onclick="selectAgent()" required>
|
|
|
|
|
|
<input name="agentCode" th:field="*{agentCode}" class="form-control" type="hidden" required>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>项目阶段<span class="is-required">*</span></td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<select name="projectStage" th:field="*{projectStage}" class="form-control"
|
|
|
|
|
|
th:with="type=${@dict.getType('project_stage')}"
|
|
|
|
|
|
required>
|
|
|
|
|
|
<option value="">请选择合项目阶段</option>
|
|
|
|
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
|
|
|
|
|
th:value="${dict.dictValue}"></option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td>项目把握度<span class="is-required">*</span></td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<select name="projectGraspDegree" class="form-control" th:field="*{projectGraspDegree}" required>
|
|
|
|
|
|
<option value="">请选择</option>
|
|
|
|
|
|
<option value="A">A</option>
|
|
|
|
|
|
<option value="B">B</option>
|
|
|
|
|
|
<option value="C">C</option>
|
|
|
|
|
|
<option value="D">D</option>
|
|
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td>汇智责任人</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<input name="hzSupportUserName" class="form-control" type="text"
|
|
|
|
|
|
onclick="selectPeople()" th:field="*{hzSupportUserName}">
|
|
|
|
|
|
<input name="hzSupportUser" class="form-control" type="hidden" th:field="*{hzSupportUser}"></td>
|
|
|
|
|
|
</tr>
|
2025-06-09 06:17:32 +00:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td class="shortTd">最终客户<span class="is-required">*</span></td>
|
|
|
|
|
|
<td><input name="customerName" class="form-control" th:field="*{customerName}" type="text" required
|
|
|
|
|
|
onclick="selectCustomer()">
|
|
|
|
|
|
<input name="customerCode" class="form-control" th:field="*{customerCode}" type="hidden"></td>
|
|
|
|
|
|
<td class="shortTd">联系人</td>
|
|
|
|
|
|
<td><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}">
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td>合作渠道</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<select name="operateInstitution" class="form-control"
|
|
|
|
|
|
th:with="type=${@dict.getType('operate_institution')}"
|
|
|
|
|
|
onchange="changeInstitution()" th:field="*{operateInstitution}">
|
|
|
|
|
|
<option value="">请选择合作渠道</option>
|
|
|
|
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
|
|
|
|
|
th:value="${dict.dictValue}"></option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td>代理商<span class="is-required">*</span></td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<input name="partnerName" class="form-control" type="text" required
|
|
|
|
|
|
onclick="selectPartner()" th:field="*{partnerName}">
|
|
|
|
|
|
<input name="partnerCode" class="form-control" type="hidden" th:field="*{partnerCode}">
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td>联系方式</td>
|
2025-06-05 12:07:28 +00:00
|
|
|
|
<td><input type="text" name="contactWay" class="form-control" placeholder="姓名+电话"
|
|
|
|
|
|
th:field="*{contactWay}"></td>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
2025-06-09 06:17:32 +00:00
|
|
|
|
|
2025-06-05 07:52:23 +00:00
|
|
|
|
<td>预计下单时间</td>
|
2025-06-05 12:07:28 +00:00
|
|
|
|
<td><input name="estimatedOrderTime" class="form-control" placeholder="yyyy-MM-dd"
|
2025-06-06 07:35:41 +00:00
|
|
|
|
th:value="${#dates.format(projectInfo.estimatedOrderTime, 'yyyy-MM-dd')}">
|
2025-06-05 07:52:23 +00:00
|
|
|
|
</td>
|
|
|
|
|
|
<td>预计发货时间</td>
|
|
|
|
|
|
<td><input name="estimatedDeliverTime" class="form-control" placeholder="yyyy-MM-dd"
|
2025-06-06 07:35:41 +00:00
|
|
|
|
th:value="${#dates.format(projectInfo.estimatedDeliverTime, 'yyyy-MM-dd')}"></td>
|
2025-06-09 06:17:32 +00:00
|
|
|
|
<td>POC测试</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<select name="countryProduct" class="form-control" th:field="*{countryProduct}" readonly="">
|
|
|
|
|
|
<option value="">根据POC记录变化</option>
|
|
|
|
|
|
<option value="1">是</option>
|
|
|
|
|
|
<option value="0">否</option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</td>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>竞争对手</td>
|
2025-06-09 06:17:32 +00:00
|
|
|
|
<td colspan="3" class="checkbox-group">
|
2025-06-05 07:52:23 +00:00
|
|
|
|
<div class="checkbox-box">
|
|
|
|
|
|
<label><input type="checkbox" name="competitorList[0]" value="华为">华为</label>
|
|
|
|
|
|
<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>
|
2025-06-09 06:17:32 +00:00
|
|
|
|
<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">
|
|
|
|
|
|
</div>
|
2025-05-30 02:10:24 +00:00
|
|
|
|
</div>
|
2025-06-09 06:17:32 +00:00
|
|
|
|
</td>
|
|
|
|
|
|
<td>是否国产</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<select name="countryProduct" class="form-control" th:field="*{countryProduct}">
|
|
|
|
|
|
<option value="">请选择</option>
|
|
|
|
|
|
<option value="1">是</option>
|
|
|
|
|
|
<option value="0">否</option>
|
|
|
|
|
|
</select>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>关键技术问题</td>
|
|
|
|
|
|
<td colspan="5"><input type="text" name="keyProblem" style="width:98%;"
|
2025-06-05 12:07:28 +00:00
|
|
|
|
class="form-control" maxlength="200" th:field="*{keyProblem}"
|
|
|
|
|
|
placeholder="限制200个字符"></td>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>项目简述<span class="is-required">*</span></td>
|
|
|
|
|
|
<td colspan="5"><textarea name="projectDesc" style="width:98%;" rows="2"
|
|
|
|
|
|
class="form-control" required maxlength="200"
|
|
|
|
|
|
placeholder="限制200个字符" th:field="*{projectDesc}"></textarea>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2025-06-09 06:17:32 +00:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td>服务器配置</td>
|
|
|
|
|
|
<td colspan="5"><textarea name="serverConfiguration" class="form-control" maxlength="200"
|
|
|
|
|
|
placeholder="限制200个字符" th:field="*{serverConfiguration}"></textarea></td>
|
|
|
|
|
|
|
|
|
|
|
|
</tr>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
</table>
|
2025-05-30 02:10:24 +00:00
|
|
|
|
|
2025-06-05 07:52:23 +00:00
|
|
|
|
<div class="section-title">配置信息</div>
|
2025-06-05 12:07:28 +00:00
|
|
|
|
<h3>软件</h3>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
<button type="button" class="add-btn" onclick="addProduct({})">添加</button>
|
2025-06-05 12:07:28 +00:00
|
|
|
|
<table id="productTable" class="productTable">
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<th>序号</th>
|
|
|
|
|
|
<th>产品编号</th>
|
|
|
|
|
|
<th>产品型号</th>
|
|
|
|
|
|
<th>描述</th>
|
2025-06-08 07:14:25 +00:00
|
|
|
|
<th style="width: 80px">数量</th>
|
2025-06-05 12:07:28 +00:00
|
|
|
|
<th style="width: 90px">目录单价(RMB)</th>
|
|
|
|
|
|
<th style="width: 90px">指导折扣</th>
|
|
|
|
|
|
<th style="width: 90px">折扣</th>
|
|
|
|
|
|
<th style="width: 90px">单价(RMB)</th>
|
|
|
|
|
|
<th style="width: 120px">总价(RMB)</th>
|
|
|
|
|
|
<th style="width: 120px">目录总价(RMB)</th>
|
|
|
|
|
|
<th>备注</th>
|
|
|
|
|
|
<th style="width: 60px">操作</th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
<h3>硬件</h3>
|
|
|
|
|
|
<button type="button" class="add-btn" onclick="addProduct2({})">添加</button>
|
|
|
|
|
|
<table id="productTable2" class="productTable">
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<th>序号</th>
|
|
|
|
|
|
<th>产品编号</th>
|
|
|
|
|
|
<th>产品型号</th>
|
|
|
|
|
|
<th>描述</th>
|
2025-06-08 07:14:25 +00:00
|
|
|
|
<th style="width: 80px">数量</th>
|
2025-06-05 12:07:28 +00:00
|
|
|
|
<th style="width: 90px">目录单价(RMB)</th>
|
|
|
|
|
|
<th style="width: 90px">指导折扣</th>
|
|
|
|
|
|
<th style="width: 90px">折扣</th>
|
|
|
|
|
|
<th style="width: 90px">单价(RMB)</th>
|
|
|
|
|
|
<th style="width: 120px">总价(RMB)</th>
|
|
|
|
|
|
<th style="width: 120px">目录总价(RMB)</th>
|
|
|
|
|
|
<th>备注</th>
|
|
|
|
|
|
<th style="width: 60px">操作</th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
<h3>维保</h3>
|
|
|
|
|
|
<button type="button" class="add-btn" onclick="addProduct3({})">添加</button>
|
|
|
|
|
|
<table id="productTable3" class="productTable">
|
2025-06-05 07:52:23 +00:00
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<th>序号</th>
|
|
|
|
|
|
<th>产品编号</th>
|
|
|
|
|
|
<th>产品型号</th>
|
|
|
|
|
|
<th>描述</th>
|
2025-06-08 07:14:25 +00:00
|
|
|
|
<th style="width: 80px">数量</th>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
<th style="width: 90px">目录单价(RMB)</th>
|
|
|
|
|
|
<th style="width: 90px">指导折扣</th>
|
|
|
|
|
|
<th style="width: 90px">折扣</th>
|
|
|
|
|
|
<th style="width: 90px">单价(RMB)</th>
|
|
|
|
|
|
<th style="width: 120px">总价(RMB)</th>
|
|
|
|
|
|
<th style="width: 120px">目录总价(RMB)</th>
|
|
|
|
|
|
<th>备注</th>
|
|
|
|
|
|
<th style="width: 60px">操作</th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
2025-06-09 06:17:32 +00:00
|
|
|
|
<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>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
<div class="layui-tab-content">
|
|
|
|
|
|
<div class="layui-tab-item layui-show">
|
|
|
|
|
|
<button type="button" class="add-btn" onclick="addLog({})">添加</button>
|
|
|
|
|
|
<table id="workLog">
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<th>序号</th>
|
|
|
|
|
|
<th>更新内容</th>
|
|
|
|
|
|
<th>更新人员</th>
|
|
|
|
|
|
<th>更新时间</th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody></tbody>
|
|
|
|
|
|
<!-- 可动态添加行 -->
|
|
|
|
|
|
</table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="layui-tab-item">
|
|
|
|
|
|
<table id="sysLog">
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<th>序号</th>
|
|
|
|
|
|
<th>操作人员</th>
|
|
|
|
|
|
<th>操作内容</th>
|
|
|
|
|
|
<th>操作时间</th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody></tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="layui-tab-item">
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
</form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<th:block th:include="include :: footer"/>
|
|
|
|
|
|
<th:block th:include="include :: datetimepicker-js"/>
|
2025-06-06 07:35:41 +00:00
|
|
|
|
<th:block th:include="include :: layui"/>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
<script th:inline="javascript">
|
|
|
|
|
|
var prefix = ctx + "sip/project"
|
|
|
|
|
|
$("#form-product-add").validate({
|
|
|
|
|
|
focusCleanup: true
|
|
|
|
|
|
});
|
2025-06-06 07:35:41 +00:00
|
|
|
|
var softwareProjectProductInfoList = []
|
|
|
|
|
|
var hardwareProjectProductInfoList = []
|
|
|
|
|
|
var maintenanceProjectProductInfoList = []
|
|
|
|
|
|
|
|
|
|
|
|
function initProductList() {
|
|
|
|
|
|
let data = {
|
|
|
|
|
|
pageSize: 100000,
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
isTable: 0,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) {
|
|
|
|
|
|
softwareProjectProductInfoList = res.rows
|
2025-06-08 07:14:25 +00:00
|
|
|
|
softwareProjectProductInfoList.unshift({
|
2025-06-09 06:17:32 +00:00
|
|
|
|
model: '',
|
|
|
|
|
|
productCode: ''
|
2025-06-08 07:14:25 +00:00
|
|
|
|
})
|
2025-06-06 07:35:41 +00:00
|
|
|
|
let softwareProjectProductInfoListAll = [[${projectInfo.softwareProjectProductInfoList}]] || []
|
|
|
|
|
|
softwareProjectProductInfoListAll.forEach((ele) => {
|
|
|
|
|
|
addProduct(ele)
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) {
|
|
|
|
|
|
hardwareProjectProductInfoList = res.rows
|
2025-06-08 07:14:25 +00:00
|
|
|
|
hardwareProjectProductInfoList.unshift({
|
2025-06-09 06:17:32 +00:00
|
|
|
|
model: '',
|
|
|
|
|
|
productCode: ''
|
2025-06-08 07:14:25 +00:00
|
|
|
|
})
|
2025-06-06 07:35:41 +00:00
|
|
|
|
let hardwareProjectProductInfoListAll = [[${projectInfo.hardwareProjectProductInfoList}]] || []
|
|
|
|
|
|
hardwareProjectProductInfoListAll.forEach((ele) => {
|
|
|
|
|
|
addProduct2(ele)
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
|
|
|
|
|
|
maintenanceProjectProductInfoList = res.rows
|
2025-06-08 07:14:25 +00:00
|
|
|
|
maintenanceProjectProductInfoList.unshift({
|
2025-06-09 06:17:32 +00:00
|
|
|
|
model: '',
|
|
|
|
|
|
productCode: ''
|
2025-06-08 07:14:25 +00:00
|
|
|
|
})
|
2025-06-06 07:35:41 +00:00
|
|
|
|
let maintenanceProjectProductInfoListAll = [[${projectInfo.maintenanceProjectProductInfoList}]] || []
|
|
|
|
|
|
maintenanceProjectProductInfoListAll.forEach((ele) => {
|
|
|
|
|
|
addProduct3(ele)
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2025-06-05 07:52:23 +00:00
|
|
|
|
|
|
|
|
|
|
function submitHandler() {
|
|
|
|
|
|
if ($.validate.form()) {
|
|
|
|
|
|
$.operate.save(prefix + "/edit", $('#form-product-add').serialize());
|
2025-06-09 06:17:32 +00:00
|
|
|
|
} else {
|
2025-06-06 11:59:13 +00:00
|
|
|
|
$.modal.alertWarning("请完善表单");
|
2025-05-30 02:10:24 +00:00
|
|
|
|
}
|
2025-06-05 07:52:23 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$(function () {
|
2025-06-06 07:35:41 +00:00
|
|
|
|
initProductList()
|
2025-06-05 07:52:23 +00:00
|
|
|
|
var layerIndex = parent.layer.index
|
2025-05-30 02:10:24 +00:00
|
|
|
|
$("input[name='estimatedOrderTime']").datetimepicker({
|
|
|
|
|
|
format: "yyyy-mm-dd",
|
|
|
|
|
|
minView: "month",
|
|
|
|
|
|
autoclose: true
|
|
|
|
|
|
});
|
|
|
|
|
|
$("input[name='estimatedDeliverTime']").datetimepicker({
|
|
|
|
|
|
format: "yyyy-mm-dd",
|
|
|
|
|
|
minView: "month",
|
|
|
|
|
|
autoclose: true
|
|
|
|
|
|
});
|
2025-06-05 07:52:23 +00:00
|
|
|
|
initData()
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
function selectCustomer() {
|
|
|
|
|
|
var url = prefix + "/selectCustomer";
|
|
|
|
|
|
var options = {
|
|
|
|
|
|
title: '选择客户',
|
2025-06-07 14:24:57 +00:00
|
|
|
|
width: "800",
|
2025-06-05 07:52:23 +00:00
|
|
|
|
url: url,
|
|
|
|
|
|
height: '600',
|
|
|
|
|
|
callBack: doSubmitCustomer
|
|
|
|
|
|
};
|
|
|
|
|
|
$.modal.openOptions(options);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function selectPartner() {
|
|
|
|
|
|
var url = prefix + "/selectPartner";
|
|
|
|
|
|
var options = {
|
|
|
|
|
|
title: '选择代理商',
|
2025-06-07 14:24:57 +00:00
|
|
|
|
width: "800",
|
2025-06-05 07:52:23 +00:00
|
|
|
|
height: '600',
|
|
|
|
|
|
url: url,
|
|
|
|
|
|
callBack: doSubmitPartner
|
|
|
|
|
|
};
|
|
|
|
|
|
$.modal.openOptions(options);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function selectAgent() {
|
|
|
|
|
|
var url = prefix + "/selectAgent";
|
|
|
|
|
|
var options = {
|
2025-06-07 14:24:57 +00:00
|
|
|
|
title: '选择代表处',
|
|
|
|
|
|
width: "800",
|
2025-06-05 07:52:23 +00:00
|
|
|
|
height: '600',
|
|
|
|
|
|
url: url,
|
|
|
|
|
|
callBack: doSubmitAgent
|
|
|
|
|
|
};
|
|
|
|
|
|
$.modal.openOptions(options);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function selectPeople() {
|
|
|
|
|
|
var url = prefix + "/selectPeople";
|
|
|
|
|
|
var options = {
|
2025-06-07 14:24:57 +00:00
|
|
|
|
title: '选择责任人',
|
|
|
|
|
|
width: "800",
|
2025-06-05 07:52:23 +00:00
|
|
|
|
height: '600',
|
|
|
|
|
|
url: url,
|
|
|
|
|
|
callBack: doSubmitPeople
|
|
|
|
|
|
};
|
|
|
|
|
|
$.modal.openOptions(options);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function doSubmitCustomer(index, layero) {
|
|
|
|
|
|
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
|
|
|
|
|
if (rows.length == 0) {
|
2025-06-07 14:24:57 +00:00
|
|
|
|
$.modal.alertWarning("请选择一个客户");
|
2025-06-05 07:52:23 +00:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
$('[name="customerCode"]').val(rows[0].customerCode);
|
2025-06-09 07:59:26 +00:00
|
|
|
|
$('[name="customerName"]').val(rows[0].customerName);
|
|
|
|
|
|
$('[name="customerUserName"]').val(rows[0].contactPerson);
|
|
|
|
|
|
$('[name="contactPhone"]').val(rows[0].contactPhone);
|
2025-06-05 07:52:23 +00:00
|
|
|
|
$.modal.close(index);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function doSubmitPartner(index, layero) {
|
|
|
|
|
|
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
|
|
|
|
|
if (rows.length == 0) {
|
|
|
|
|
|
$.modal.alertWarning("请选择一个代理商");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
$('[name="partnerCode"]').val(rows[0].partnerCode);
|
|
|
|
|
|
$('[name="partnerName"]').val(rows[0].partnerName);
|
|
|
|
|
|
|
|
|
|
|
|
$.modal.close(index);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function doSubmitPeople(index, layero) {
|
|
|
|
|
|
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
|
|
|
|
|
if (rows.length == 0) {
|
2025-06-07 14:24:57 +00:00
|
|
|
|
$.modal.alertWarning("请选择一个责任人");
|
2025-06-05 07:52:23 +00:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
$('[name="hzSupportUser"]').val(rows[0].userId);
|
|
|
|
|
|
$('[name="hzSupportUserName"]').val(rows[0].userName);
|
|
|
|
|
|
|
|
|
|
|
|
$.modal.close(index);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function doSubmitAgent(index, layero) {
|
|
|
|
|
|
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
|
|
|
|
|
if (rows.length == 0) {
|
2025-06-07 14:24:57 +00:00
|
|
|
|
$.modal.alertWarning("请选择一个代表处");
|
2025-06-05 07:52:23 +00:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
$('[name="agentCode"]').val(rows[0].agentCode);
|
|
|
|
|
|
$('[name="agentName"]').val(rows[0].agentName);
|
|
|
|
|
|
|
|
|
|
|
|
$.modal.close(index);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 添加软件
|
|
|
|
|
|
function initData() {
|
2025-06-09 06:17:32 +00:00
|
|
|
|
let competitorList = [[${projectInfo.competitorList}]] || []
|
|
|
|
|
|
competitorList.forEach((ele, index) => {
|
|
|
|
|
|
if (ele) {
|
|
|
|
|
|
$(`input[type="checkbox"][value="${ele}"]`).attr('checked', true)
|
2025-06-06 08:41:11 +00:00
|
|
|
|
}
|
2025-06-09 06:17:32 +00:00
|
|
|
|
if ((!$(`input[type="checkbox"][value="${ele}"]`).length) && ele) {
|
2025-06-06 08:41:11 +00:00
|
|
|
|
$(`[name="competitorList[5]"]`).val(ele)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2025-06-05 12:07:28 +00:00
|
|
|
|
let arr2 = [[${projectInfo.projectWorkProgressList}]]
|
|
|
|
|
|
arr2.forEach((ele) => {
|
|
|
|
|
|
addLog(ele)
|
|
|
|
|
|
})
|
|
|
|
|
|
let arr3 = [[${projectInfo.projectOperateLogList}]]
|
|
|
|
|
|
arr3.forEach((ele, index) => {
|
|
|
|
|
|
let tr = $(`
|
|
|
|
|
|
<tr><td>${index + 1}</td><td>${ele.operateUserName}</td><td>${ele.operateLog}</td><td>${ele.operateTime}</td></tr>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
`)
|
|
|
|
|
|
$('#sysLog tbody').append(tr)
|
|
|
|
|
|
})
|
|
|
|
|
|
changeBg()
|
|
|
|
|
|
$('[name="industryType"]').val([[${projectInfo.industryType}]])
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function addProduct(data) {
|
|
|
|
|
|
let length = $('#productTable tbody').find('tr').length
|
|
|
|
|
|
let tr = $(`
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td class="indexBox">${length + 1}</td>
|
2025-06-06 07:35:41 +00:00
|
|
|
|
<td class="layui-form"><input type="hidden" name="softwareProjectProductInfoList[${length}].id" value="${data.id || ''}">
|
|
|
|
|
|
<select value="${data.productBomCode || ''}" name="softwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode1">
|
|
|
|
|
|
${softwareProjectProductInfoList.map((ele) => {
|
2025-06-09 06:17:32 +00:00
|
|
|
|
return `<option value="${ele.productCode}" ${ele.productCode == data.productBomCode ? 'selected' : ''}>${ele.productCode}</option>`
|
2025-06-06 07:35:41 +00:00
|
|
|
|
}).join('')
|
|
|
|
|
|
}
|
|
|
|
|
|
</select></td>
|
|
|
|
|
|
<td class="layui-form"><select value="${data.model || ''}" name="softwareProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel1">
|
|
|
|
|
|
${softwareProjectProductInfoList.map((ele) => {
|
2025-06-09 06:17:32 +00:00
|
|
|
|
return `<option value="${ele.model}" ${ele.model == data.model ? 'selected' : ''}>${ele.model}</option>`
|
2025-06-06 07:35:41 +00:00
|
|
|
|
}).join('')
|
|
|
|
|
|
}
|
|
|
|
|
|
</select></td>
|
2025-06-05 12:07:28 +00:00
|
|
|
|
<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.remark || ''}" name="softwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
|
|
|
|
|
|
|
|
|
|
|
</tr>`)
|
|
|
|
|
|
$('#productTable tbody').append(tr)
|
2025-06-06 02:01:46 +00:00
|
|
|
|
initSearchProduct('1')
|
2025-06-05 07:52:23 +00:00
|
|
|
|
initPrice()
|
|
|
|
|
|
}
|
2025-06-06 07:35:41 +00:00
|
|
|
|
|
2025-06-05 12:07:28 +00:00
|
|
|
|
function addProduct2(data) {
|
|
|
|
|
|
let length = $('#productTable2 tbody').find('tr').length
|
|
|
|
|
|
let tr = $(`
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td class="indexBox">${length + 1}</td>
|
2025-06-06 07:35:41 +00:00
|
|
|
|
<td class="layui-form"><input type="hidden" name="hardwareProjectProductInfoList[${length}].id" value="${data.id || ''}">
|
2025-06-06 09:34:50 +00:00
|
|
|
|
<select value="${data.productBomCode || ''}" name="hardwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode2">
|
2025-06-06 07:35:41 +00:00
|
|
|
|
${hardwareProjectProductInfoList.map((ele) => {
|
2025-06-09 06:17:32 +00:00
|
|
|
|
return `<option value="${ele.productCode}" ${ele.productCode == data.productBomCode ? 'selected' : ''}>${ele.productCode}</option>`
|
2025-06-06 07:35:41 +00:00
|
|
|
|
}).join('')
|
|
|
|
|
|
}
|
|
|
|
|
|
</select></td>
|
2025-06-06 09:34:50 +00:00
|
|
|
|
<td class="layui-form"><select value="${data.model || ''}" name="hardwareProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel2">
|
2025-06-06 07:35:41 +00:00
|
|
|
|
${hardwareProjectProductInfoList.map((ele) => {
|
2025-06-09 06:17:32 +00:00
|
|
|
|
return `<option value="${ele.model}" ${ele.model == data.model ? 'selected' : ''}>${ele.model}</option>`
|
2025-06-06 07:35:41 +00:00
|
|
|
|
}).join('')
|
|
|
|
|
|
}
|
|
|
|
|
|
</select></td>
|
2025-06-05 12:07:28 +00:00
|
|
|
|
<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.remark || ''}" name="hardwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
|
|
|
|
|
|
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
|
2025-06-05 12:07:28 +00:00
|
|
|
|
</tr>`)
|
|
|
|
|
|
$('#productTable2 tbody').append(tr)
|
2025-06-06 02:01:46 +00:00
|
|
|
|
initSearchProduct('2')
|
2025-06-05 12:07:28 +00:00
|
|
|
|
initPrice()
|
|
|
|
|
|
}
|
2025-06-06 07:35:41 +00:00
|
|
|
|
|
2025-06-05 12:07:28 +00:00
|
|
|
|
function addProduct3(data) {
|
|
|
|
|
|
let length = $('#productTable3 tbody').find('tr').length
|
|
|
|
|
|
let tr = $(`
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td class="indexBox">${length + 1}</td>
|
2025-06-06 07:35:41 +00:00
|
|
|
|
<td class="layui-form"><input type="hidden" name="maintenanceProjectProductInfoList[${length}].id" value="${data.id || ''}">
|
2025-06-06 09:34:50 +00:00
|
|
|
|
<select value="${data.productBomCode || ''}" name="maintenanceProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode3">
|
2025-06-06 07:35:41 +00:00
|
|
|
|
${maintenanceProjectProductInfoList.map((ele) => {
|
2025-06-09 06:17:32 +00:00
|
|
|
|
return `<option value="${ele.productCode}" ${ele.productCode == data.productBomCode ? 'selected' : ''}>${ele.productCode}</option>`
|
2025-06-06 07:35:41 +00:00
|
|
|
|
}).join('')
|
|
|
|
|
|
}
|
|
|
|
|
|
</select></td>
|
2025-06-06 09:34:50 +00:00
|
|
|
|
<td class="layui-form"><select value="${data.model || ''}" name="maintenanceProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel3">
|
2025-06-06 07:35:41 +00:00
|
|
|
|
${maintenanceProjectProductInfoList.map((ele) => {
|
2025-06-09 06:17:32 +00:00
|
|
|
|
return `<option value="${ele.model}" ${ele.model == data.model ? 'selected' : ''}>${ele.model}</option>`
|
2025-06-06 07:35:41 +00:00
|
|
|
|
}).join('')
|
|
|
|
|
|
}
|
|
|
|
|
|
</select></td>
|
2025-06-05 12:07:28 +00:00
|
|
|
|
<td><textarea name="maintenanceProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc || ''}</textarea></td>
|
|
|
|
|
|
<td><input value="${data.quantity || ''}" name="maintenanceProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
|
|
|
|
|
<td><input value="${data.cataloguePrice || ''}" name="maintenanceProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
|
|
|
|
|
<td><input value="${data.guidanceDiscount || ''}" name="maintenanceProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
|
|
|
|
|
<td><input value="${data.discount || ''}" name="maintenanceProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
|
|
|
|
|
<td><input value="${data.price || ''}" name="maintenanceProjectProductInfoList[${length}].price" type="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.remark || ''}" name="maintenanceProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
|
|
|
|
|
|
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
|
|
|
|
|
|
|
|
|
|
|
</tr>`)
|
|
|
|
|
|
$('#productTable3 tbody').append(tr)
|
2025-06-06 02:01:46 +00:00
|
|
|
|
initSearchProduct('11,22')
|
2025-06-05 12:07:28 +00:00
|
|
|
|
initPrice()
|
|
|
|
|
|
}
|
2025-06-06 07:35:41 +00:00
|
|
|
|
|
2025-06-05 07:52:23 +00:00
|
|
|
|
function addLog(data) {
|
|
|
|
|
|
let length = $('#workLog tbody').find('tr').length
|
|
|
|
|
|
let tr = $(`
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>${length + 1}</td>
|
2025-06-06 08:41:11 +00:00
|
|
|
|
<td><input type="hidden" value="${data.id || ''}" name="projectWorkProgressList[${length}].id"><textarea type="text" name="projectWorkProgressList[${length}].workContent" class="form-control" required>${data.workContent || ''}</textarea></td>
|
2025-06-05 12:07:28 +00:00
|
|
|
|
<td><input type="text" class="form-control" placeholder="保存后自动填入" value="${data.userName || ''}" readonly></td>
|
|
|
|
|
|
<td><input type="text" class="form-control" placeholder="保存后自动填入" value="${data.workTime || ''}" readonly></td>
|
2025-06-05 07:52:23 +00:00
|
|
|
|
</tr>`)
|
|
|
|
|
|
$('#workLog tbody').append(tr)
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-06-06 02:01:46 +00:00
|
|
|
|
function initSearchProduct(type) {
|
2025-06-06 07:35:41 +00:00
|
|
|
|
layui.use(function () {
|
|
|
|
|
|
var form = layui.form
|
|
|
|
|
|
form.render()
|
|
|
|
|
|
form.on('select(productCode1)', function (data) {
|
|
|
|
|
|
searchProduct(data.value, 'code', data.elem)
|
|
|
|
|
|
})
|
|
|
|
|
|
form.on('select(productCode2)', function (data) {
|
|
|
|
|
|
searchProduct(data.value, 'code', data.elem)
|
|
|
|
|
|
})
|
|
|
|
|
|
form.on('select(productCode3)', function (data) {
|
|
|
|
|
|
searchProduct(data.value, 'code', data.elem)
|
|
|
|
|
|
})
|
|
|
|
|
|
form.on('select(productModel1)', function (data) {
|
|
|
|
|
|
searchProduct(data.value, 'model', data.elem)
|
|
|
|
|
|
})
|
|
|
|
|
|
form.on('select(productModel2)', function (data) {
|
|
|
|
|
|
searchProduct(data.value, 'model', data.elem)
|
|
|
|
|
|
})
|
|
|
|
|
|
form.on('select(productModel3)', function (data) {
|
|
|
|
|
|
searchProduct(data.value, 'model', data.elem)
|
|
|
|
|
|
})
|
2025-06-09 06:17:32 +00:00
|
|
|
|
$('.layui-input').on('mouseout', function () {
|
2025-06-06 08:41:11 +00:00
|
|
|
|
$(this).blur()
|
|
|
|
|
|
})
|
2025-06-05 07:52:23 +00:00
|
|
|
|
})
|
2025-06-05 12:07:28 +00:00
|
|
|
|
$('.productTable .delRow').on('click', function () {
|
2025-06-05 07:52:23 +00:00
|
|
|
|
let ele = $(this)
|
|
|
|
|
|
$.modal.confirm('是否确认删除', function () {
|
|
|
|
|
|
$(ele).parent().parent().remove()
|
|
|
|
|
|
$('#productTable tbody tr').each((index, item) => {
|
|
|
|
|
|
$(item).find('.indexBox').text(index + 1)
|
|
|
|
|
|
})
|
2025-06-05 12:07:28 +00:00
|
|
|
|
$('#productTable2 tbody tr').each((index, item) => {
|
|
|
|
|
|
$(item).find('.indexBox').text(index + 1)
|
|
|
|
|
|
})
|
|
|
|
|
|
$('#productTable3 tbody tr').each((index, item) => {
|
|
|
|
|
|
$(item).find('.indexBox').text(index + 1)
|
|
|
|
|
|
})
|
2025-06-05 07:52:23 +00:00
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-06-06 07:35:41 +00:00
|
|
|
|
function searchProduct(val, type, ele, typeId) {
|
|
|
|
|
|
let selectObj = {}
|
|
|
|
|
|
let listName = $(ele).attr('name')
|
2025-06-05 07:52:23 +00:00
|
|
|
|
if (type == 'code') {
|
2025-06-06 07:35:41 +00:00
|
|
|
|
if (listName.indexOf('softwareProjectProductInfoList') > -1) {
|
|
|
|
|
|
selectObj = softwareProjectProductInfoList.find((ele) => ele.productCode == val)
|
|
|
|
|
|
} else if (listName.indexOf('hardwareProjectProductInfoList') > -1) {
|
|
|
|
|
|
selectObj = hardwareProjectProductInfoList.find((ele) => ele.productCode == val)
|
|
|
|
|
|
} else if (listName.indexOf('maintenanceProjectProductInfoList') > -1) {
|
|
|
|
|
|
selectObj = maintenanceProjectProductInfoList.find((ele) => ele.productCode == val)
|
2025-06-05 07:52:23 +00:00
|
|
|
|
}
|
2025-06-06 07:35:41 +00:00
|
|
|
|
$(ele).parent().parent().find('.model+div').find('.layui-input').val(selectObj.model)
|
|
|
|
|
|
$(ele).parent().parent().find('.model').val(selectObj.model)
|
|
|
|
|
|
} else {
|
|
|
|
|
|
if (listName.indexOf('softwareProjectProductInfoList') > -1) {
|
|
|
|
|
|
selectObj = softwareProjectProductInfoList.find((ele) => ele.model == val)
|
|
|
|
|
|
} else if (listName.indexOf('hardwareProjectProductInfoList') > -1) {
|
|
|
|
|
|
selectObj = hardwareProjectProductInfoList.find((ele) => ele.model == val)
|
|
|
|
|
|
} else if (listName.indexOf('maintenanceProjectProductInfoList') > -1) {
|
|
|
|
|
|
selectObj = maintenanceProjectProductInfoList.find((ele) => ele.model == val)
|
|
|
|
|
|
}
|
|
|
|
|
|
$(ele).parent().parent().find('.productBomCode+div').find('.layui-input').val(selectObj.model)
|
|
|
|
|
|
$(ele).parent().parent().find('.productBomCode').val(selectObj.productCode)
|
|
|
|
|
|
}
|
|
|
|
|
|
$(ele).parent().parent().find('.productDesc').val(selectObj.description)
|
2025-06-05 07:52:23 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function initPrice() {
|
2025-06-08 07:14:25 +00:00
|
|
|
|
$('.productTable .quantity').on('input', function () {
|
2025-06-05 07:52:23 +00:00
|
|
|
|
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))
|
|
|
|
|
|
}
|
|
|
|
|
|
if (cateVal && num) {
|
|
|
|
|
|
$(this).parent().parent().find('.catalogueAllPrice').val((num * cateVal).toFixed(2))
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2025-06-08 07:14:25 +00:00
|
|
|
|
$('.productTable .cataloguePrice').on('input', function () {
|
2025-06-05 07:52:23 +00:00
|
|
|
|
let val = $(this).val()
|
|
|
|
|
|
$(this).parent().parent().find('.price').val(val)
|
|
|
|
|
|
let quantity = $(this).parent().parent().find('.quantity').val()
|
|
|
|
|
|
if (quantity && val)
|
|
|
|
|
|
$(this).parent().parent().find('.catalogueAllPrice').val((val * quantity).toFixed(2))
|
|
|
|
|
|
})
|
2025-06-08 07:14:25 +00:00
|
|
|
|
$('.productTable .guidanceDiscount').on('input', function () {
|
2025-06-05 07:52:23 +00:00
|
|
|
|
let val = $(this).val()
|
|
|
|
|
|
let cataloguePrice = $(this).parent().parent().find('.cataloguePrice').val()
|
|
|
|
|
|
$(this).parent().parent().find('.discount').val(val)
|
|
|
|
|
|
$(this).parent().parent().find('.price').val((cataloguePrice * val).toFixed(2))
|
|
|
|
|
|
let price = $(this).parent().parent().find('.price').val()
|
|
|
|
|
|
let quantity = $(this).parent().parent().find('.quantity').val()
|
|
|
|
|
|
if (price && quantity) {
|
|
|
|
|
|
$(this).parent().parent().find('.allPrice').val((price * quantity).toFixed(2))
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2025-06-08 07:14:25 +00:00
|
|
|
|
$('.productTable .discount').on('input', function () {
|
2025-06-05 07:52:23 +00:00
|
|
|
|
let discount = $(this).val()
|
|
|
|
|
|
let val = $(this).parent().parent().find('.cataloguePrice').val()
|
|
|
|
|
|
$(this).parent().parent().find('.price').val((val * discount).toFixed(2))
|
|
|
|
|
|
})
|
2025-06-08 07:14:25 +00:00
|
|
|
|
$('.productTable .price').change('input', function () {
|
2025-06-05 07:52:23 +00:00
|
|
|
|
let val = $(this).val()
|
|
|
|
|
|
let num = $(this).parent().parent().find('.quantity').val()
|
|
|
|
|
|
$(this).parent().parent().find('.allPrice').val((val * num).toFixed(2))
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function changeInstitution() {
|
|
|
|
|
|
if ($('[name="operateInstitution"]').val() == 'h3c') {
|
|
|
|
|
|
$('[name="partnerName"]').val('新华三')
|
|
|
|
|
|
$('[name="partnerCode"]').val('')
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function changeBg() {
|
|
|
|
|
|
if ($('[name="bgProperty"]').val() != 'YYS') {
|
|
|
|
|
|
let datas = [[${@dict.getType('bg_hysy')}]]
|
|
|
|
|
|
let str = ``
|
|
|
|
|
|
datas.forEach((ele) => {
|
|
|
|
|
|
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
|
|
|
|
|
|
})
|
|
|
|
|
|
$('#industryTypeBox').html(`
|
|
|
|
|
|
<select name="industryType" class="form-control" required>
|
|
|
|
|
|
<option value="">请选择行业</option>
|
|
|
|
|
|
${str}
|
|
|
|
|
|
</select>
|
|
|
|
|
|
`)
|
|
|
|
|
|
} else {
|
|
|
|
|
|
let datas = [[${@dict.getType('bg_yys')}]]
|
|
|
|
|
|
let str = ``
|
|
|
|
|
|
datas.forEach((ele) => {
|
|
|
|
|
|
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
|
|
|
|
|
|
})
|
|
|
|
|
|
$('#industryTypeBox').html(`
|
|
|
|
|
|
<select name="industryType" class="form-control" required>
|
|
|
|
|
|
<option value="">请选择行业</option>
|
|
|
|
|
|
${str}
|
|
|
|
|
|
</select>
|
|
|
|
|
|
`)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
2025-05-30 02:10:24 +00:00
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|