Compare commits
2 Commits
3e6feb0237
...
a9a7dca53c
| Author | SHA1 | Date |
|---|---|---|
|
|
a9a7dca53c | |
|
|
1e1094eb1b |
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 326 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
|
@ -36,10 +36,20 @@
|
|||
<script th:src="@{/ajax/libs/iCheck/icheck.min.js?v=1.0.3}"></script>
|
||||
<script th:src="@{/ajax/libs/layer/layer.min.js?v=3.7.0}"></script>
|
||||
<script th:src="@{/ajax/libs/layui/layui.min.js?v=2.8.18}"></script>
|
||||
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.8.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.8.0}"></script>
|
||||
</div>
|
||||
|
||||
<!--layui库-->
|
||||
<div th:fragment="layui">
|
||||
<script th:src="@{/js/layui/layui.js?v=2.11.2}"></script>
|
||||
<link th:href="@{/js/layui/css/layui.css?v=2.11.2}" rel="stylesheet">
|
||||
<style>
|
||||
th, td{
|
||||
padding: 8px !important;
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
<!-- ztree树插件 -->
|
||||
<div th:fragment="ztree-css">
|
||||
<link th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
|
||||
|
|
|
|||
|
|
@ -423,20 +423,8 @@
|
|||
function downloadTem() {
|
||||
var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象
|
||||
window.location.href = prefix + "/list/export"
|
||||
$.modal.closeLoading();
|
||||
// $.post(prefix + "/list/export", {}, function (result) {
|
||||
// if (result.code == web_status.SUCCESS) {
|
||||
// window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
|
||||
// } else if (result.code == web_status.WARNING) {
|
||||
// $.modal.alertWarning(result.msg)
|
||||
// } else {
|
||||
// $.modal.alertError(result.msg);
|
||||
// }
|
||||
// $.modal.closeLoading();
|
||||
// })
|
||||
|
||||
$.modal.closeLoading()
|
||||
}
|
||||
|
||||
document.getElementById('uploadInput').addEventListener('change', function (event) {
|
||||
const file = event.target.files[0];
|
||||
let data = new FormData()
|
||||
|
|
@ -471,11 +459,8 @@
|
|||
xhr.onerror = function () {
|
||||
console.log('上传过程中发生错误');
|
||||
};
|
||||
//
|
||||
// // 发送数据到服务器
|
||||
xhr.send(data);
|
||||
|
||||
|
||||
});
|
||||
|
||||
function changeTotal(ele) {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
width: 100px;
|
||||
}
|
||||
|
||||
input, textarea, #productTable td {
|
||||
input, textarea, .productTable td {
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -155,7 +155,7 @@
|
|||
<td><input type="text" name="contactWay" class="form-control" placeholder="姓名+电话"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>预计金额(RMB)<span class="is-required">*</span></td>
|
||||
<td>预计金额(元)<span class="is-required">*</span></td>
|
||||
<td><input type="number" name="estimatedAmount" class="form-control" required></td>
|
||||
<td>预计下单时间</td>
|
||||
<td><input name="estimatedOrderTime" class="form-control" placeholder="yyyy-MM-dd">
|
||||
|
|
@ -196,8 +196,55 @@
|
|||
</table>
|
||||
|
||||
<div class="section-title">配置信息</div>
|
||||
<h3>软件</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct()">添加</button>
|
||||
<table id="productTable">
|
||||
<table id="productTable" class="productTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>产品编号</th>
|
||||
<th>产品型号</th>
|
||||
<th>描述</th>
|
||||
<th>数量</th>
|
||||
<th style="width: 90px">目录单价(RMB)</th>
|
||||
<th style="width: 90px">指导折扣</th>
|
||||
<th style="width: 90px">折扣</th>
|
||||
<th style="width: 90px">单价(RMB)</th>
|
||||
<th style="width: 120px">总价(RMB)</th>
|
||||
<th style="width: 120px">目录总价(RMB)</th>
|
||||
<th>备注</th>
|
||||
<th style="width: 60px">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<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>
|
||||
<th>数量</th>
|
||||
<th style="width: 90px">目录单价(RMB)</th>
|
||||
<th style="width: 90px">指导折扣</th>
|
||||
<th style="width: 90px">折扣</th>
|
||||
<th style="width: 90px">单价(RMB)</th>
|
||||
<th style="width: 120px">总价(RMB)</th>
|
||||
<th style="width: 120px">目录总价(RMB)</th>
|
||||
<th>备注</th>
|
||||
<th style="width: 60px">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>维保</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct3()">添加</button>
|
||||
<table id="productTable3" class="productTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
|
|
@ -215,9 +262,7 @@
|
|||
<th style="width: 60px">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div>
|
||||
|
|
@ -253,18 +298,6 @@
|
|||
<tbody></tbody>
|
||||
<!-- 可动态添加行 -->
|
||||
</table>
|
||||
<div class="section-title">操作日志</div>
|
||||
<table id="sysLog">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>操作人员</th>
|
||||
<th>操作内容</th>
|
||||
<th>操作时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer"/>
|
||||
|
|
@ -395,24 +428,22 @@
|
|||
}
|
||||
|
||||
// 添加软件
|
||||
var freeInput = ['8813A3YA', '8813A3YB', '8813A7U4', '8813A7U2']
|
||||
|
||||
function addProduct() {
|
||||
let length = $('#productTable tbody').find('tr').length
|
||||
let tr = $(`
|
||||
<tr>
|
||||
<td class="indexBox">${length + 1}</td>
|
||||
<td><input name="projectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" required></td>
|
||||
<td><input name="projectProductInfoList[${length}].model" type="text" class="form-control model" required></td>
|
||||
<td><textarea name="projectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly></textarea></td>
|
||||
<td><input name="projectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
||||
<td><input name="projectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||
<td><input name="projectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="projectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="projectProductInfoList[${length}].price" type="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="projectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="projectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="projectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" required></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].model" type="text" class="form-control model" required></td>
|
||||
<td><textarea name="softwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly></textarea></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].price" type="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}].remark" type="text" class="form-control" ></td>
|
||||
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
|
|
@ -420,6 +451,52 @@
|
|||
initSearchProduct()
|
||||
initPrice()
|
||||
}
|
||||
function addProduct2() {
|
||||
let length = $('#productTable2 tbody').find('tr').length
|
||||
let tr = $(`
|
||||
<tr>
|
||||
<td class="indexBox">${length + 1}</td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" required></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].model" type="text" class="form-control model" required></td>
|
||||
<td><textarea name="hardwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly></textarea></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].price" type="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}].remark" type="text" class="form-control" ></td>
|
||||
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
$('#productTable2 tbody').append(tr)
|
||||
initSearchProduct()
|
||||
initPrice()
|
||||
}
|
||||
function addProduct3() {
|
||||
let length = $('#productTable3 tbody').find('tr').length
|
||||
let tr = $(`
|
||||
<tr>
|
||||
<td class="indexBox">${length + 1}</td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" required></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].model" type="text" class="form-control model" required></td>
|
||||
<td><textarea name="maintenanceProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly></textarea></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].price" type="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}].remark" type="text" class="form-control" ></td>
|
||||
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
$('#productTable3 tbody').append(tr)
|
||||
initSearchProduct()
|
||||
initPrice()
|
||||
}
|
||||
|
||||
function addLog() {
|
||||
let length = $('#workLog tbody').find('tr').length
|
||||
|
|
@ -435,25 +512,30 @@
|
|||
}
|
||||
|
||||
function initSearchProduct() {
|
||||
$('#productTable .productBomCode').on('input', function () {
|
||||
$('.productTable .productBomCode').on('input', function () {
|
||||
let val = $(this).val()
|
||||
searchProduct(val, 'code', this)
|
||||
})
|
||||
$('#productTable .model').on('input', function () {
|
||||
$('.productTable .model').on('input', function () {
|
||||
let val = $(this).val()
|
||||
searchProduct(val, 'model', this)
|
||||
})
|
||||
$('#productTable .delRow').on('click', function () {
|
||||
$('.productTable .delRow').on('click', function () {
|
||||
let ele = $(this)
|
||||
$.modal.confirm('是否确认删除', function () {
|
||||
$(ele).parent().parent().remove()
|
||||
$('#productTable tbody tr').each((index, item) => {
|
||||
$(item).find('.indexBox').text(index + 1)
|
||||
})
|
||||
$('#productTable2 tbody tr').each((index, item) => {
|
||||
$(item).find('.indexBox').text(index + 1)
|
||||
})
|
||||
$('#productTable3 tbody tr').each((index, item) => {
|
||||
$(item).find('.indexBox').text(index + 1)
|
||||
})
|
||||
|
||||
});
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function searchProduct(val, type, ele) {
|
||||
|
|
@ -494,7 +576,7 @@
|
|||
}
|
||||
|
||||
function initPrice() {
|
||||
$('#productTable .quantity').on('input', function () {
|
||||
$('.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()
|
||||
|
|
@ -505,14 +587,14 @@
|
|||
$(this).parent().parent().find('.catalogueAllPrice').val((num * cateVal).toFixed(2))
|
||||
}
|
||||
})
|
||||
$('#productTable .cataloguePrice').on('input', function () {
|
||||
$('.productTable .cataloguePrice').on('input', function () {
|
||||
let val = $(this).val()
|
||||
$(this).parent().parent().find('.price').val(val)
|
||||
let quantity = $(this).parent().parent().find('.quantity').val()
|
||||
if (quantity && val)
|
||||
$(this).parent().parent().find('.catalogueAllPrice').val((val * quantity).toFixed(2))
|
||||
})
|
||||
$('#productTable .guidanceDiscount').on('input', function () {
|
||||
$('.productTable .guidanceDiscount').on('input', function () {
|
||||
let val = $(this).val()
|
||||
let cataloguePrice = $(this).parent().parent().find('.cataloguePrice').val()
|
||||
$(this).parent().parent().find('.discount').val(val)
|
||||
|
|
@ -523,12 +605,12 @@
|
|||
$(this).parent().parent().find('.allPrice').val((price * quantity).toFixed(2))
|
||||
}
|
||||
})
|
||||
$('#productTable .discount').on('input', function () {
|
||||
$('.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))
|
||||
})
|
||||
$('#productTable .price').change('input', function () {
|
||||
$('.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))
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
width: 100px;
|
||||
}
|
||||
|
||||
input, textarea, #productTable td {
|
||||
input, textarea, .productTable td {
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -75,19 +75,23 @@
|
|||
<table>
|
||||
<tr>
|
||||
<td class="shortTd">项目编码<span class="is-required">*</span></td>
|
||||
<td><input type="text" th:field="*{projectCode}" name="projectCode" class="form-control" placeholder="保存后自动生成" readonly>
|
||||
<td><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" placeholder="限制40个字符"
|
||||
<td><input type="text" th:field="*{projectName}" name="projectName" maxlength="40"
|
||||
placeholder="限制40个字符"
|
||||
class="form-control"></td>
|
||||
<td class="shortTd">最终客户<span class="is-required">*</span></td>
|
||||
<td><input name="customerName" th:field="*{customerName}" class="form-control" type="text" required onclick="selectCustomer()">
|
||||
<td><input name="customerName" th:field="*{customerName}" class="form-control" type="text" required
|
||||
onclick="selectCustomer()">
|
||||
<input name="customerCode" th:field="*{customerCode}" class="form-control" type="hidden"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="shortTd">BG<span class="is-required">*</span></td>
|
||||
<td>
|
||||
<select name="bgProperty" th:field="*{bgProperty}" class="form-control" th:with="type=${@dict.getType('bg_type')}"
|
||||
<select name="bgProperty" th:field="*{bgProperty}" class="form-control"
|
||||
th:with="type=${@dict.getType('bg_type')}"
|
||||
onchange="changeBg()" required>
|
||||
<option value="">请选择BG</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||
|
|
@ -154,13 +158,16 @@
|
|||
<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>
|
||||
<td><input type="text" name="contactWay" class="form-control" placeholder="姓名+电话"
|
||||
th:field="*{contactWay}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>预计金额(RMB)<span class="is-required">*</span></td>
|
||||
<td><input type="number" name="estimatedAmount" class="form-control" th:field="*{estimatedAmount}" required></td>
|
||||
<td><input type="number" name="estimatedAmount" class="form-control" th:field="*{estimatedAmount}"
|
||||
required></td>
|
||||
<td>预计下单时间</td>
|
||||
<td><input name="estimatedOrderTime" class="form-control" placeholder="yyyy-MM-dd" th:field="*{estimatedOrderTime}">
|
||||
<td><input name="estimatedOrderTime" class="form-control" placeholder="yyyy-MM-dd"
|
||||
th:field="*{estimatedOrderTime}">
|
||||
</td>
|
||||
<td>预计发货时间</td>
|
||||
<td><input name="estimatedDeliverTime" class="form-control" placeholder="yyyy-MM-dd"
|
||||
|
|
@ -179,14 +186,16 @@
|
|||
</div>
|
||||
|
||||
<div>
|
||||
其它:<input type="text" name="competitorList[5]" th:field="*{competitorList[5]}" class="form-control" style="width: 400px">
|
||||
其它:<input type="text" name="competitorList[5]" th:field="*{competitorList[5]}"
|
||||
class="form-control" style="width: 400px">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>关键技术问题</td>
|
||||
<td colspan="5"><input type="text" name="keyProblem" style="width:98%;"
|
||||
class="form-control" maxlength="200" th:field="*{keyProblem}" placeholder="限制200个字符"></td>
|
||||
class="form-control" maxlength="200" th:field="*{keyProblem}"
|
||||
placeholder="限制200个字符"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>项目简述<span class="is-required">*</span></td>
|
||||
|
|
@ -198,8 +207,55 @@
|
|||
</table>
|
||||
|
||||
<div class="section-title">配置信息</div>
|
||||
<h3>软件</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct({})">添加</button>
|
||||
<table id="productTable">
|
||||
<table id="productTable" class="productTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>产品编号</th>
|
||||
<th>产品型号</th>
|
||||
<th>描述</th>
|
||||
<th>数量</th>
|
||||
<th style="width: 90px">目录单价(RMB)</th>
|
||||
<th style="width: 90px">指导折扣</th>
|
||||
<th style="width: 90px">折扣</th>
|
||||
<th style="width: 90px">单价(RMB)</th>
|
||||
<th style="width: 120px">总价(RMB)</th>
|
||||
<th style="width: 120px">目录总价(RMB)</th>
|
||||
<th>备注</th>
|
||||
<th style="width: 60px">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<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>
|
||||
<th>数量</th>
|
||||
<th style="width: 90px">目录单价(RMB)</th>
|
||||
<th style="width: 90px">指导折扣</th>
|
||||
<th style="width: 90px">折扣</th>
|
||||
<th style="width: 90px">单价(RMB)</th>
|
||||
<th style="width: 120px">总价(RMB)</th>
|
||||
<th style="width: 120px">目录总价(RMB)</th>
|
||||
<th>备注</th>
|
||||
<th style="width: 60px">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>维保</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct3({})">添加</button>
|
||||
<table id="productTable3" class="productTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
|
|
@ -217,9 +273,7 @@
|
|||
<th style="width: 60px">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div>
|
||||
|
|
@ -400,16 +454,23 @@
|
|||
|
||||
// 添加软件
|
||||
function initData() {
|
||||
let arr=[[${projectInfo.projectProductInfoList}]]
|
||||
arr.forEach((ele)=>{
|
||||
let softwareProjectProductInfoList = [[${projectInfo.softwareProjectProductInfoList}]]
|
||||
softwareProjectProductInfoList.forEach((ele) => {
|
||||
addProduct(ele)
|
||||
})
|
||||
let hardwareProjectProductInfoList = [[${projectInfo.hardwareProjectProductInfoList}]]
|
||||
hardwareProjectProductInfoList.forEach((ele) => {
|
||||
addProduct2(ele)
|
||||
})
|
||||
let maintenanceProjectProductInfoList = [[${projectInfo.maintenanceProjectProductInfoList}]]
|
||||
maintenanceProjectProductInfoList.forEach((ele) => {
|
||||
addProduct3(ele)
|
||||
})
|
||||
|
||||
let arr2 = [[${projectInfo.projectWorkProgressList}]]
|
||||
arr2.forEach((ele) => {
|
||||
addLog(ele)
|
||||
})
|
||||
console.log(123,arr)
|
||||
|
||||
let arr3 = [[${projectInfo.projectOperateLogList}]]
|
||||
arr3.forEach((ele, index) => {
|
||||
let tr = $(`
|
||||
|
|
@ -426,17 +487,17 @@
|
|||
let tr = $(`
|
||||
<tr>
|
||||
<td class="indexBox">${length + 1}</td>
|
||||
<td><input type="hidden" name="projectProductInfoList[${length}].id" value="${data.id||''}"><input name="projectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" value="${data.productBomCode||''}" required></td>
|
||||
<td><input name="projectProductInfoList[${length}].model" type="text" class="form-control model" required value="${data.model||''}"></td>
|
||||
<td><textarea name="projectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc||''}</textarea></td>
|
||||
<td><input value="${data.quantity||''}" name="projectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
||||
<td><input value="${data.cataloguePrice||''}" name="projectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||
<td><input value="${data.guidanceDiscount||''}" name="projectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input value="${data.discount||''}" name="projectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input value="${data.price||''}" name="projectProductInfoList[${length}].price" type="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.allPrice||''}" name="projectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.catalogueAllPrice||''}" name="projectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.remark||''}" name="projectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
|
||||
<td><input type="hidden" name="softwareProjectProductInfoList[${length}].id" value="${data.id || ''}"><input name="projectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" value="${data.productBomCode || ''}" required></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].model" type="text" class="form-control model" required value="${data.model || ''}"></td>
|
||||
<td><textarea name="softwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc || ''}</textarea></td>
|
||||
<td><input value="${data.quantity || ''}" name="softwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
||||
<td><input value="${data.cataloguePrice || ''}" name="softwareProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||
<td><input value="${data.guidanceDiscount || ''}" name="softwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input value="${data.discount || ''}" name="softwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input value="${data.price || ''}" name="softwareProjectProductInfoList[${length}].price" type="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>
|
||||
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
|
|
@ -444,7 +505,52 @@
|
|||
initSearchProduct()
|
||||
initPrice()
|
||||
}
|
||||
function addProduct2(data) {
|
||||
let length = $('#productTable2 tbody').find('tr').length
|
||||
let tr = $(`
|
||||
<tr>
|
||||
<td class="indexBox">${length + 1}</td>
|
||||
<td><input type="hidden" name="hardwareProjectProductInfoList[${length}].id" value="${data.id || ''}"><input name="projectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" value="${data.productBomCode || ''}" required></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].model" type="text" class="form-control model" required value="${data.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.remark || ''}" name="hardwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
|
||||
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
$('#productTable2 tbody').append(tr)
|
||||
initSearchProduct()
|
||||
initPrice()
|
||||
}
|
||||
function addProduct3(data) {
|
||||
let length = $('#productTable3 tbody').find('tr').length
|
||||
let tr = $(`
|
||||
<tr>
|
||||
<td class="indexBox">${length + 1}</td>
|
||||
<td><input type="hidden" name="maintenanceProjectProductInfoList[${length}].id" value="${data.id || ''}"><input name="projectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" value="${data.productBomCode || ''}" required></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].model" type="text" class="form-control model" required value="${data.model || ''}"></td>
|
||||
<td><textarea name="maintenanceProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc || ''}</textarea></td>
|
||||
<td><input value="${data.quantity || ''}" name="maintenanceProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
||||
<td><input value="${data.cataloguePrice || ''}" name="maintenanceProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||
<td><input value="${data.guidanceDiscount || ''}" name="maintenanceProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input value="${data.discount || ''}" name="maintenanceProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input value="${data.price || ''}" name="maintenanceProjectProductInfoList[${length}].price" type="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)
|
||||
initSearchProduct()
|
||||
initPrice()
|
||||
}
|
||||
function addLog(data) {
|
||||
let length = $('#workLog tbody').find('tr').length
|
||||
let tr = $(`
|
||||
|
|
@ -459,21 +565,27 @@
|
|||
}
|
||||
|
||||
function initSearchProduct() {
|
||||
$('#productTable .productBomCode').on('input', function () {
|
||||
$('.productTable .productBomCode').on('input', function () {
|
||||
let val = $(this).val()
|
||||
searchProduct(val, 'code', this)
|
||||
})
|
||||
$('#productTable .model').on('input', function () {
|
||||
$('.productTable .model').on('input', function () {
|
||||
let val = $(this).val()
|
||||
searchProduct(val, 'model', this)
|
||||
})
|
||||
$('#productTable .delRow').on('click', function () {
|
||||
$('.productTable .delRow').on('click', function () {
|
||||
let ele = $(this)
|
||||
$.modal.confirm('是否确认删除', function () {
|
||||
$(ele).parent().parent().remove()
|
||||
$('#productTable tbody tr').each((index, item) => {
|
||||
$(item).find('.indexBox').text(index + 1)
|
||||
})
|
||||
$('#productTable2 tbody tr').each((index, item) => {
|
||||
$(item).find('.indexBox').text(index + 1)
|
||||
})
|
||||
$('#productTable3 tbody tr').each((index, item) => {
|
||||
$(item).find('.indexBox').text(index + 1)
|
||||
})
|
||||
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@
|
|||
},
|
||||
{
|
||||
field: 'estimatedAmount',
|
||||
title: '预计金额(RMB)'
|
||||
title: '预计金额(元)'
|
||||
},
|
||||
{
|
||||
field: 'estimatedOrderTime',
|
||||
|
|
|
|||
|
|
@ -1,213 +1,814 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增订单管理')" />
|
||||
<th:block th:include="include :: header('新增项目管理')"/>
|
||||
<th:block th:include="include :: datetimepicker-css"/>
|
||||
</head>
|
||||
<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;
|
||||
}
|
||||
|
||||
input, textarea, .productTable td {
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-order-add">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">项目主键:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="projectId" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">地市:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="city" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">进货商商务接口人姓名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="businessPerson" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">邮箱:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="businessEmail" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">电话:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="businessPhone" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">合同编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderCode" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">出货金额:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="shipmentAmount" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">实际进货金额:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="actualPurchaseAmount" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">执行单有效截止时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="orderEndTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">要求到货时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="deliveryTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">公司直发:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="companyDelivery" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">通知人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="notifier" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">通知人邮箱:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="notifierEmail" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">通知人电话:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="notifierPhone" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">责任人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="duty" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">责任人邮箱:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="dutyEmail" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">责任人电话:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="dutyPhone" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">下单通路:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderChannel" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">进货商:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="partnerCode" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">供货商:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="supplier" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">其它特别说明:</label>
|
||||
<div class="col-sm-8">
|
||||
<form id="form-product-add">
|
||||
<div class="section-title">新建订单</div>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="shortTd">项目编号<span class="is-required">*</span></td>
|
||||
<td><input type="text" name="projectCode" class="form-control" oninput="searchProject()">
|
||||
</td>
|
||||
<td class="shortTd">项目名称<span class="is-required">*</span></td>
|
||||
<td><input type="text" name="projectName" maxlength="40" placeholder="限制40个字符"
|
||||
class="form-control"></td>
|
||||
<td class="shortTd">最终客户<span class="is-required">*</span></td>
|
||||
<td><input name="customerName" class="form-control" type="text" required onclick="selectCustomer()">
|
||||
<input name="customerCode" class="form-control" type="hidden"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>BG<span class="is-required">*</span></td>
|
||||
<td colspan="2">
|
||||
<select name="bgProperty" class="form-control" th:with="type=${@dict.getType('bg_type')}"
|
||||
onchange="changeBg()" required>
|
||||
<option value="">请选择BG</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 colspan="2" id="industryTypeBox">
|
||||
<select name="industryType" class="form-control"
|
||||
required>
|
||||
<option value="">请先选择BG</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr id="element1">
|
||||
<td>属地<span class="is-required">*</span></td>
|
||||
<td colspan="2">
|
||||
<select name="province" class="province form-control m-b" data-first-title="选择省">
|
||||
<option value="">请选择</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="地市">属地<span class="is-required">*</span></td>
|
||||
<td colspan="2">
|
||||
<select name="city" class="city form-control m-b" data-first-title="选择省">
|
||||
<option value="">请选择</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>进货商商务接口人姓名<span class="is-required">*</span></td>
|
||||
<td><input type="text" name="businessPerson" class="form-control" required>
|
||||
</td>
|
||||
<td>Email</td>
|
||||
<td><input type="text" name="businessEmail"
|
||||
class="form-control"></td>
|
||||
<td>联系方式<span class="is-required">*</span></td>
|
||||
<td><input name="businessPhone" class="form-control" type="text" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>合同编号<span class="is-required">*</span></td>
|
||||
<td><input type="text" name="orderCode" class="form-control" placeholder="自动生成">
|
||||
</td>
|
||||
<td>币种<span class="is-required">*</span></td>
|
||||
<td>
|
||||
<select name="currencyType" class="form-control" th:with="type=${@dict.getType('currency_type')}"
|
||||
required>
|
||||
<option value="">请选择币种</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><input name="shipmentAmount" class="form-control" type="number" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>实际进货金额<span class="is-required">*</span></td>
|
||||
<td colspan="2"><input type="number" name="actualPurchaseAmount" class="form-control" required>
|
||||
</td>
|
||||
<td>执行单有效截止时间<span class="is-required">*</span></td>
|
||||
<td colspan="2">
|
||||
<input name="orderEndTime" class="form-control" placeholder="yyyy-MM-dd"
|
||||
required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td>要求到货时间<span class="is-required">*</span></td>
|
||||
<td colspan="2">
|
||||
<input name="deliveryTime" class="form-control" placeholder="yyyy-MM-dd" required>
|
||||
</td>
|
||||
<td>公司直发</td>
|
||||
<td colspan="2">
|
||||
<select name="companyDelivery" class="form-control"
|
||||
th:with="type=${@dict.getType('company_delivery')}"
|
||||
required>
|
||||
<option value="">请选择</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||
th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>通知人<span class="is-required">*</span></td>
|
||||
<td><input type="text" name="notifier" class="form-control" required>
|
||||
</td>
|
||||
<td>Email</td>
|
||||
<td><input type="text" name="notifierEmail"
|
||||
class="form-control"></td>
|
||||
<td>联系方式<span class="is-required">*</span></td>
|
||||
<td><input name="notifierPhone" class="form-control" type="text" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>汇智责任人</td>
|
||||
<td><input name="dutyName" class="form-control" type="text"
|
||||
onclick="selectPeople()">
|
||||
<input name="duty" class="form-control" type="hidden"></td>
|
||||
<td>Email</td>
|
||||
<td><input type="text" name="dutyEmail"
|
||||
class="form-control"></td>
|
||||
<td>联系方式<span class="is-required">*</span></td>
|
||||
<td><input name="dutyPhone" class="form-control" type="text" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>下单通路<span class="is-required">*</span></td>
|
||||
<td colspan="5">
|
||||
<select name="orderChannel" class="form-control" required>
|
||||
<option value="">请选择</option>
|
||||
<option value="1">总代</option>
|
||||
<option value="2">直签</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>进货商<span class="is-required">*</span></td>
|
||||
<td><input name="partnerName" class="form-control" type="text"
|
||||
onclick="selectPeople()" required></td>
|
||||
<td>进货商代码<span class="is-required">*</span></td>
|
||||
<td><input type="text" name="partnerCode"
|
||||
class="form-control" required></td>
|
||||
<td>进货商类型<span class="is-required">*</span></td>
|
||||
<td><input name="level" class="form-control" type="text" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>供货商<span class="is-required">*</span></td>
|
||||
<td colspan="5">
|
||||
<input name="supplier" class="form-control" type="text" required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>其他特别说明</td>
|
||||
<td colspan="5">
|
||||
<input name="remark" class="form-control" type="text">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<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">备货信息</li>
|
||||
<li lay-id="44">物流信息</li>
|
||||
<li lay-id="55">合同信息</li>
|
||||
</ul>
|
||||
<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>
|
||||
<table id="productTable" class="productTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>产品编号</th>
|
||||
<th>产品型号</th>
|
||||
<th>描述</th>
|
||||
<th>数量</th>
|
||||
<th style="width: 90px">目录单价(RMB)</th>
|
||||
<th style="width: 90px">指导折扣</th>
|
||||
<th style="width: 90px">折扣</th>
|
||||
<th style="width: 90px">单价(RMB)</th>
|
||||
<th style="width: 120px">总价(RMB)</th>
|
||||
<th style="width: 120px">目录总价(RMB)</th>
|
||||
<th>备注</th>
|
||||
<th style="width: 60px">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<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>
|
||||
<th>数量</th>
|
||||
<th style="width: 90px">目录单价(RMB)</th>
|
||||
<th style="width: 90px">指导折扣</th>
|
||||
<th style="width: 90px">折扣</th>
|
||||
<th style="width: 90px">单价(RMB)</th>
|
||||
<th style="width: 120px">总价(RMB)</th>
|
||||
<th style="width: 120px">目录总价(RMB)</th>
|
||||
<th>备注</th>
|
||||
<th style="width: 60px">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>维保</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct3()">添加</button>
|
||||
<table id="productTable3" class="productTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>产品编号</th>
|
||||
<th>产品型号</th>
|
||||
<th>描述</th>
|
||||
<th>数量</th>
|
||||
<th style="width: 90px">目录单价(RMB)</th>
|
||||
<th style="width: 90px">指导折扣</th>
|
||||
<th style="width: 90px">折扣</th>
|
||||
<th style="width: 90px">单价(RMB)</th>
|
||||
<th style="width: 120px">总价(RMB)</th>
|
||||
<th style="width: 120px">目录总价(RMB)</th>
|
||||
<th>备注</th>
|
||||
<th style="width: 60px">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="layui-tab-item">内容-2</div>
|
||||
<div class="layui-tab-item">内容-3</div>
|
||||
<div class="layui-tab-item">内容-4</div>
|
||||
<div class="layui-tab-item">
|
||||
<div class="row">
|
||||
<input id="uploadInput" type="file" accept=".xls,.xlsx" style="display: none">
|
||||
<div class="col-xs-12">
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="downloadTem()"><i
|
||||
class="fa fa-download">
|
||||
下载模板</i></button>
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="importList()"><i
|
||||
class="fa fa-upload">
|
||||
上传</i>
|
||||
</button>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer"/>
|
||||
<th:block th:include="include :: datetimepicker-js"/>
|
||||
<th:block th:include="include :: layui"/>
|
||||
<th:block th:include="include :: jquery-cxselect-js"/>
|
||||
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "project/order"
|
||||
$("#form-order-add").validate({
|
||||
var prefix = ctx + "sip/project"
|
||||
$("#form-product-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-order-add').serialize());
|
||||
$.operate.save(prefix + "/add", $('#form-product-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
var layerIndex = parent.layer.index
|
||||
parent.layer.full(layerIndex)
|
||||
|
||||
$("input[name='estimatedOrderTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
$("input[name='estimatedDeliverTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
layui.use('element', function () {
|
||||
var element = layui.element;
|
||||
});
|
||||
var urlChina = '/cnarea/select';
|
||||
$.cxSelect.defaults.url = urlChina;
|
||||
$('#element1').cxSelect({
|
||||
selects: ['province', 'city'],
|
||||
nodata: 'none'
|
||||
|
||||
});
|
||||
$("input[name='orderEndTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("input[name='deliveryTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
})
|
||||
|
||||
function selectCustomer() {
|
||||
var url = prefix + "/selectCustomer";
|
||||
var options = {
|
||||
title: '选择客户',
|
||||
width: "680",
|
||||
url: url,
|
||||
height: '600',
|
||||
callBack: doSubmitCustomer
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function selectPartner() {
|
||||
var url = prefix + "/selectPartner";
|
||||
var options = {
|
||||
title: '选择代理商',
|
||||
width: "680",
|
||||
height: '600',
|
||||
url: url,
|
||||
callBack: doSubmitPartner
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function selectAgent() {
|
||||
var url = prefix + "/selectAgent";
|
||||
var options = {
|
||||
title: '选择代理商',
|
||||
width: "680",
|
||||
height: '600',
|
||||
url: url,
|
||||
callBack: doSubmitAgent
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function selectPeople() {
|
||||
var url = prefix + "/selectPeople";
|
||||
var options = {
|
||||
title: '选择代理商',
|
||||
width: "680",
|
||||
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) {
|
||||
$.modal.alertWarning("请选择一个用户");
|
||||
return;
|
||||
}
|
||||
$('[name="customerCode"]').val(rows[0].customerCode);
|
||||
$(' [name="customerName"]').val(rows[0].customerName);
|
||||
$.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) {
|
||||
$.modal.alertWarning("请选择一个代理商");
|
||||
return;
|
||||
}
|
||||
$('[name="duty"]').val(rows[0].userId);
|
||||
$('[name="dutyName"]').val(rows[0].userName);
|
||||
$('[name="dutyPhone"]').val(rows[0].phonenumber);
|
||||
$('[name="dutyEmail"]').val(rows[0].email);
|
||||
|
||||
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
function doSubmitAgent(index, layero) {
|
||||
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
||||
if (rows.length == 0) {
|
||||
$.modal.alertWarning("请选择一个代理商");
|
||||
return;
|
||||
}
|
||||
$('[name="agentCode"]').val(rows[0].agentCode);
|
||||
$('[name="agentName"]').val(rows[0].agentName);
|
||||
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
// 添加软件
|
||||
function addProduct() {
|
||||
let length = $('#productTable tbody').find('tr').length
|
||||
let tr = $(`
|
||||
<tr>
|
||||
<td class="indexBox">${length + 1}</td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" required></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].model" type="text" class="form-control model" required></td>
|
||||
<td><textarea name="softwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly></textarea></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].price" type="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}].remark" type="text" class="form-control" ></td>
|
||||
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
$('#productTable tbody').append(tr)
|
||||
initSearchProduct()
|
||||
initPrice()
|
||||
}
|
||||
|
||||
function addProduct2() {
|
||||
let length = $('#productTable2 tbody').find('tr').length
|
||||
let tr = $(`
|
||||
<tr>
|
||||
<td class="indexBox">${length + 1}</td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" required></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].model" type="text" class="form-control model" required></td>
|
||||
<td><textarea name="hardwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly></textarea></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].price" type="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}].remark" type="text" class="form-control" ></td>
|
||||
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
$('#productTable2 tbody').append(tr)
|
||||
initSearchProduct()
|
||||
initPrice()
|
||||
}
|
||||
|
||||
function addProduct3() {
|
||||
let length = $('#productTable3 tbody').find('tr').length
|
||||
let tr = $(`
|
||||
<tr>
|
||||
<td class="indexBox">${length + 1}</td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" required></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].model" type="text" class="form-control model" required></td>
|
||||
<td><textarea name="maintenanceProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly></textarea></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].price" type="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}].remark" type="text" class="form-control" ></td>
|
||||
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
$('#productTable3 tbody').append(tr)
|
||||
initSearchProduct()
|
||||
initPrice()
|
||||
}
|
||||
|
||||
function addLog() {
|
||||
let length = $('#workLog tbody').find('tr').length
|
||||
let tr = $(`
|
||||
<tr>
|
||||
<td>${length + 1}</td>
|
||||
<td><textarea type="text" name="projectWorkProgressList[${length}].workContent" class="form-control" required></textarea></td>
|
||||
<td><input type="text" class="form-control" placeholder="保存后自动填入" readonly></td>
|
||||
<td><input type="text" class="form-control" placeholder="保存后自动填入" readonly></td>
|
||||
</tr>`)
|
||||
$('#workLog tbody').append(tr)
|
||||
|
||||
}
|
||||
|
||||
function initSearchProduct() {
|
||||
$('.productTable .productBomCode').on('input', function () {
|
||||
let val = $(this).val()
|
||||
searchProduct(val, 'code', this)
|
||||
})
|
||||
$('.productTable .model').on('input', function () {
|
||||
let val = $(this).val()
|
||||
searchProduct(val, 'model', this)
|
||||
})
|
||||
$('.productTable .delRow').on('click', function () {
|
||||
let ele = $(this)
|
||||
$.modal.confirm('是否确认删除', function () {
|
||||
$(ele).parent().parent().remove()
|
||||
$('#productTable tbody tr').each((index, item) => {
|
||||
$(item).find('.indexBox').text(index + 1)
|
||||
})
|
||||
$('#productTable2 tbody tr').each((index, item) => {
|
||||
$(item).find('.indexBox').text(index + 1)
|
||||
})
|
||||
$('#productTable3 tbody tr').each((index, item) => {
|
||||
$(item).find('.indexBox').text(index + 1)
|
||||
})
|
||||
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function searchProduct(val, type, ele) {
|
||||
if (!val) {
|
||||
$(ele).parent().parent().find('.productBomCode').val('')
|
||||
$(ele).parent().parent().find('.model').val('')
|
||||
$(ele).parent().parent().find('.productDesc').val('')
|
||||
return
|
||||
}
|
||||
let data = {
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
isTable: 0
|
||||
}
|
||||
if (type == 'code') {
|
||||
data.productCode = val
|
||||
} else if (type == 'model') {
|
||||
data.model = val
|
||||
}
|
||||
$.operate.post(ctx + 'system/product/list', data, function (res) {
|
||||
if (res.rows.length) {
|
||||
if (type == 'code') {
|
||||
$(ele).parent().parent().find('.model').val(res.rows[0].model)
|
||||
} else if (type == 'model') {
|
||||
$(ele).parent().parent().find('.productBomCode').val(res.rows[0].productCode)
|
||||
}
|
||||
$(ele).parent().parent().find('.productDesc').val(res.rows[0].description)
|
||||
} else {
|
||||
if (type == 'code') {
|
||||
$(ele).parent().parent().find('.model').val('')
|
||||
} else if (type == 'model') {
|
||||
$(ele).parent().parent().find('.productBomCode').val('')
|
||||
}
|
||||
$(ele).parent().parent().find('.productDesc').val('')
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
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))
|
||||
}
|
||||
if (cateVal && num) {
|
||||
$(this).parent().parent().find('.catalogueAllPrice').val((num * cateVal).toFixed(2))
|
||||
}
|
||||
})
|
||||
$('.productTable .cataloguePrice').on('input', function () {
|
||||
let val = $(this).val()
|
||||
$(this).parent().parent().find('.price').val(val)
|
||||
let quantity = $(this).parent().parent().find('.quantity').val()
|
||||
if (quantity && val)
|
||||
$(this).parent().parent().find('.catalogueAllPrice').val((val * quantity).toFixed(2))
|
||||
})
|
||||
$('.productTable .guidanceDiscount').on('input', function () {
|
||||
let val = $(this).val()
|
||||
let cataloguePrice = $(this).parent().parent().find('.cataloguePrice').val()
|
||||
$(this).parent().parent().find('.discount').val(val)
|
||||
$(this).parent().parent().find('.price').val((cataloguePrice * val).toFixed(2))
|
||||
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))
|
||||
}
|
||||
})
|
||||
$('.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))
|
||||
})
|
||||
$('.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))
|
||||
})
|
||||
}
|
||||
|
||||
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>
|
||||
`)
|
||||
}
|
||||
}
|
||||
|
||||
function downloadTem() {
|
||||
var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象
|
||||
window.location.href = prefix + "/list/export"
|
||||
$.modal.closeLoading()
|
||||
}
|
||||
document.getElementById('uploadInput').addEventListener('change', function (event) {
|
||||
const file = event.target.files[0];
|
||||
let data = new FormData()
|
||||
data.append('file', file)
|
||||
var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象
|
||||
xhr.open('POST', prefix + '/list/readData', true); // 设置请求类型和URL
|
||||
// 当请求完成时执行的回调函数
|
||||
xhr.onload = function (res) {
|
||||
let data = JSON.parse(res.currentTarget.response)
|
||||
if (data.code === 0) {
|
||||
$.modal.msgSuccess('导入成功');
|
||||
|
||||
data.data.forEach((row) => {
|
||||
addRow(row)
|
||||
})
|
||||
|
||||
$('.discount').on('change', function () {
|
||||
|
||||
changeTotal($(this))
|
||||
})
|
||||
$('.discount').on('focus', function () {
|
||||
$(this).blur()
|
||||
})
|
||||
} else {
|
||||
$.modal.msgError(data.msg || '导入失败');
|
||||
}
|
||||
$('#uploadInput').val('')
|
||||
|
||||
};
|
||||
|
||||
// 当请求发生错误时执行的回调函数
|
||||
xhr.onerror = function () {
|
||||
console.log('上传过程中发生错误');
|
||||
};
|
||||
// // 发送数据到服务器
|
||||
xhr.send(data);
|
||||
});
|
||||
|
||||
function initTable() {
|
||||
var options = {
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
align: 'center',
|
||||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||
return columnIndex + $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'fileName',
|
||||
align: 'center',
|
||||
title: '合同名称',
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<input readonly class='form-control' type='text' name='contractFileList[%s].fileName' value='%s' required>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'uploadUser',
|
||||
align: 'center',
|
||||
title: '上传人',
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<input readonly class='form-control' type='text' name='contractFileList[%s].uploadUser' value='%s' required>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'uploadTime',
|
||||
align: 'center',
|
||||
title: '上传时间',
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<input readonly class='form-control' type='text' name='contractFileList[%s].uploadTime' value='%s' required>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index);
|
||||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + value + '\')"><i class="fa fa-remove"></i>删除</a>';
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -14,82 +14,30 @@
|
|||
<label>订单信息:</label>
|
||||
<input type="text" name="projectId" placeholder="项目编号/项目名称/项目负责人" />
|
||||
</li>
|
||||
<li>
|
||||
<label>地市:</label>
|
||||
<input type="text" name="city"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>进货商商务接口人姓名:</label>
|
||||
<input type="text" name="businessPerson"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>邮箱:</label>
|
||||
<input type="text" name="businessEmail"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>电话:</label>
|
||||
<input type="text" name="businessPhone"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>合同编号:</label>
|
||||
<input type="text" name="orderCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>出货金额:</label>
|
||||
<input type="text" name="shipmentAmount"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>实际进货金额:</label>
|
||||
<input type="text" name="actualPurchaseAmount"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>执行单有效截止时间:</label>
|
||||
<input type="text" class="time-input" placeholder="请选择执行单有效截止时间" name="orderEndTime"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>要求到货时间:</label>
|
||||
<input type="text" class="time-input" placeholder="请选择要求到货时间" name="deliveryTime"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>公司直发:</label>
|
||||
<input type="text" name="companyDelivery"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>通知人:</label>
|
||||
<input type="text" name="notifier"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>通知人邮箱:</label>
|
||||
<input type="text" name="notifierEmail"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>通知人电话:</label>
|
||||
<input type="text" name="notifierPhone"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>责任人:</label>
|
||||
<input type="text" name="duty"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>责任人邮箱:</label>
|
||||
<input type="text" name="dutyEmail"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>责任人电话:</label>
|
||||
<input type="text" name="dutyPhone"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>下单通路:</label>
|
||||
<input type="text" name="orderChannel"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>进货商:</label>
|
||||
<input type="text" name="partnerCode"/>
|
||||
<li id="element1">
|
||||
<label>属地:</label>
|
||||
<select name="province" class="province form-control m-b" data-first-title="选择省">
|
||||
<option value="">请选择</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>供货商:</label>
|
||||
<input type="text" name="supplier"/>
|
||||
<select name="bgProperty" class="form-control">
|
||||
<option value="">请选择供货商</option>
|
||||
<option value="">省代</option>
|
||||
<option value="">非省代</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>订单状态:</label>
|
||||
<select name="bgProperty" class="form-control">
|
||||
<option value="">请选择</option>
|
||||
<option value="0">草稿</option>
|
||||
<option value="1">待审批</option>
|
||||
</select>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
|
|
@ -119,12 +67,22 @@
|
|||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: jquery-cxselect-js" />
|
||||
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('product:order:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('product:order:remove')}]];
|
||||
var prefix = ctx + "project/order";
|
||||
|
||||
$(function() {
|
||||
var urlChina = '/cnarea/select';
|
||||
$.cxSelect.defaults.url = urlChina;
|
||||
// $.cxSelect.defaults.jsonSpace = 'data';
|
||||
$('#element1').cxSelect({
|
||||
selects: ['province', 'city'],
|
||||
nodata: 'none'
|
||||
|
||||
});
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
|
|
@ -141,97 +99,53 @@
|
|||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'projectId',
|
||||
title: '项目主键'
|
||||
field: 'projectCode',
|
||||
title: '项目编号'
|
||||
},
|
||||
{
|
||||
field: 'city',
|
||||
title: '地市'
|
||||
},
|
||||
{
|
||||
field: 'businessPerson',
|
||||
title: '进货商商务接口人姓名'
|
||||
},
|
||||
{
|
||||
field: 'businessEmail',
|
||||
title: '邮箱'
|
||||
},
|
||||
{
|
||||
field: 'businessPhone',
|
||||
title: '电话'
|
||||
field: 'projectName',
|
||||
title: '项目名称'
|
||||
},
|
||||
{
|
||||
field: 'orderCode',
|
||||
title: '合同编号'
|
||||
},
|
||||
{
|
||||
field: 'currencyType',
|
||||
title: '币种'
|
||||
field: 'customerName',
|
||||
title: '最终用户'
|
||||
},
|
||||
{
|
||||
field: 'shipmentAmount',
|
||||
title: '出货金额'
|
||||
title: '金额(RMB)'
|
||||
},
|
||||
{
|
||||
field: 'actualPurchaseAmount',
|
||||
title: '实际进货金额'
|
||||
},
|
||||
{
|
||||
field: 'orderEndTime',
|
||||
title: '执行单有效截止时间'
|
||||
},
|
||||
{
|
||||
field: 'deliveryTime',
|
||||
title: '要求到货时间'
|
||||
},
|
||||
{
|
||||
field: 'companyDelivery',
|
||||
title: '公司直发'
|
||||
},
|
||||
{
|
||||
field: 'notifier',
|
||||
title: '通知人'
|
||||
},
|
||||
{
|
||||
field: 'notifierEmail',
|
||||
title: '通知人邮箱'
|
||||
},
|
||||
{
|
||||
field: 'notifierPhone',
|
||||
title: '通知人电话'
|
||||
},
|
||||
{
|
||||
field: 'duty',
|
||||
title: '责任人'
|
||||
},
|
||||
{
|
||||
field: 'dutyEmail',
|
||||
title: '责任人邮箱'
|
||||
},
|
||||
{
|
||||
field: 'dutyPhone',
|
||||
title: '责任人电话'
|
||||
},
|
||||
{
|
||||
field: 'orderChannel',
|
||||
title: '下单通路'
|
||||
},
|
||||
{
|
||||
field: 'partnerCode',
|
||||
title: '进货商'
|
||||
},
|
||||
{
|
||||
field: 'supplier',
|
||||
title: '供货商'
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '其它特别说明'
|
||||
field: 'createTime',
|
||||
title: '下单时间'
|
||||
},
|
||||
{
|
||||
field: 'orderStatus',
|
||||
title: '订单状态'
|
||||
},
|
||||
{
|
||||
field: 'a',
|
||||
title: '物流状态'
|
||||
},
|
||||
{
|
||||
field: 'province',
|
||||
title: '属地'
|
||||
},
|
||||
{
|
||||
field: 'dutyName',
|
||||
title: '汇智负责人'
|
||||
},
|
||||
{
|
||||
field: 'notifierName',
|
||||
title: '通知人'
|
||||
},
|
||||
{
|
||||
field: 'notifierEmail',
|
||||
title: '进货商'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
|
|
|
|||
Loading…
Reference in New Issue