订单新增未完成

master
wangjiuyun 2025-06-05 20:07:28 +08:00
parent 094f528e53
commit 1e1094eb1b
14 changed files with 1598 additions and 483 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 326 KiB

File diff suppressed because one or more lines are too long

View File

@ -36,10 +36,20 @@
<script th:src="@{/ajax/libs/iCheck/icheck.min.js?v=1.0.3}"></script> <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/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="@{/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/common.js?v=4.8.0}"></script>
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.8.0}"></script> <script th:src="@{/ruoyi/js/ry-ui.js?v=4.8.0}"></script>
</div> </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树插件 --> <!-- ztree树插件 -->
<div th:fragment="ztree-css"> <div th:fragment="ztree-css">
<link th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/> <link th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>

View File

@ -423,20 +423,8 @@
function downloadTem() { function downloadTem() {
var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象 var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象
window.location.href = prefix + "/list/export" window.location.href = prefix + "/list/export"
$.modal.closeLoading(); $.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();
// })
} }
document.getElementById('uploadInput').addEventListener('change', function (event) { document.getElementById('uploadInput').addEventListener('change', function (event) {
const file = event.target.files[0]; const file = event.target.files[0];
let data = new FormData() let data = new FormData()
@ -471,11 +459,8 @@
xhr.onerror = function () { xhr.onerror = function () {
console.log('上传过程中发生错误'); console.log('上传过程中发生错误');
}; };
//
// // 发送数据到服务器 // // 发送数据到服务器
xhr.send(data); xhr.send(data);
}); });
function changeTotal(ele) { function changeTotal(ele) {

View File

@ -63,7 +63,7 @@
width: 100px; width: 100px;
} }
input, textarea, #productTable td { input, textarea, .productTable td {
position: relative; position: relative;
} }
</style> </style>
@ -155,7 +155,7 @@
<td><input type="text" name="contactWay" class="form-control" placeholder="姓名+电话"></td> <td><input type="text" name="contactWay" class="form-control" placeholder="姓名+电话"></td>
</tr> </tr>
<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><input type="number" name="estimatedAmount" class="form-control" required></td>
<td>预计下单时间</td> <td>预计下单时间</td>
<td><input name="estimatedOrderTime" class="form-control" placeholder="yyyy-MM-dd"> <td><input name="estimatedOrderTime" class="form-control" placeholder="yyyy-MM-dd">
@ -196,8 +196,55 @@
</table> </table>
<div class="section-title">配置信息</div> <div class="section-title">配置信息</div>
<h3>软件</h3>
<button type="button" class="add-btn" onclick="addProduct()">添加</button> <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> <thead>
<tr> <tr>
<th>序号</th> <th>序号</th>
@ -215,9 +262,7 @@
<th style="width: 60px">操作</th> <th style="width: 60px">操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
</tbody> </tbody>
</table> </table>
<div> <div>
@ -253,18 +298,6 @@
<tbody></tbody> <tbody></tbody>
<!-- 可动态添加行 --> <!-- 可动态添加行 -->
</table> </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> </form>
</div> </div>
<th:block th:include="include :: footer"/> <th:block th:include="include :: footer"/>
@ -395,24 +428,22 @@
} }
// 添加软件 // 添加软件
var freeInput = ['8813A3YA', '8813A3YB', '8813A7U4', '8813A7U2']
function addProduct() { function addProduct() {
let length = $('#productTable tbody').find('tr').length let length = $('#productTable tbody').find('tr').length
let tr = $(` let tr = $(`
<tr> <tr>
<td class="indexBox">${length + 1}</td> <td class="indexBox">${length + 1}</td>
<td><input name="projectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" required></td> <td><input name="softwareProjectProductInfoList[${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><input name="softwareProjectProductInfoList[${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><textarea name="softwareProjectProductInfoList[${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="softwareProjectProductInfoList[${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="softwareProjectProductInfoList[${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="softwareProjectProductInfoList[${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="softwareProjectProductInfoList[${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="softwareProjectProductInfoList[${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="softwareProjectProductInfoList[${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="softwareProjectProductInfoList[${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}].remark" type="text" class="form-control" ></td>
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td> <td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
</tr>`) </tr>`)
@ -420,6 +451,52 @@
initSearchProduct() initSearchProduct()
initPrice() 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() { function addLog() {
let length = $('#workLog tbody').find('tr').length let length = $('#workLog tbody').find('tr').length
@ -435,25 +512,30 @@
} }
function initSearchProduct() { function initSearchProduct() {
$('#productTable .productBomCode').on('input', function () { $('.productTable .productBomCode').on('input', function () {
let val = $(this).val() let val = $(this).val()
searchProduct(val, 'code', this) searchProduct(val, 'code', this)
}) })
$('#productTable .model').on('input', function () { $('.productTable .model').on('input', function () {
let val = $(this).val() let val = $(this).val()
searchProduct(val, 'model', this) searchProduct(val, 'model', this)
}) })
$('#productTable .delRow').on('click', function () { $('.productTable .delRow').on('click', function () {
let ele = $(this) let ele = $(this)
$.modal.confirm('是否确认删除', function () { $.modal.confirm('是否确认删除', function () {
$(ele).parent().parent().remove() $(ele).parent().parent().remove()
$('#productTable tbody tr').each((index, item) => { $('#productTable tbody tr').each((index, item) => {
$(item).find('.indexBox').text(index + 1) $(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) { function searchProduct(val, type, ele) {
@ -494,7 +576,7 @@
} }
function initPrice() { function initPrice() {
$('#productTable .quantity').on('input', function () { $('.productTable .quantity').on('input', function () {
let num = $(this).val() let num = $(this).val()
let priceVal = $(this).parent().parent().find('.price').val() let priceVal = $(this).parent().parent().find('.price').val()
let cateVal = $(this).parent().parent().find('.cataloguePrice').val() let cateVal = $(this).parent().parent().find('.cataloguePrice').val()
@ -505,14 +587,14 @@
$(this).parent().parent().find('.catalogueAllPrice').val((num * cateVal).toFixed(2)) $(this).parent().parent().find('.catalogueAllPrice').val((num * cateVal).toFixed(2))
} }
}) })
$('#productTable .cataloguePrice').on('input', function () { $('.productTable .cataloguePrice').on('input', function () {
let val = $(this).val() let val = $(this).val()
$(this).parent().parent().find('.price').val(val) $(this).parent().parent().find('.price').val(val)
let quantity = $(this).parent().parent().find('.quantity').val() let quantity = $(this).parent().parent().find('.quantity').val()
if (quantity && val) if (quantity && val)
$(this).parent().parent().find('.catalogueAllPrice').val((val * quantity).toFixed(2)) $(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 val = $(this).val()
let cataloguePrice = $(this).parent().parent().find('.cataloguePrice').val() let cataloguePrice = $(this).parent().parent().find('.cataloguePrice').val()
$(this).parent().parent().find('.discount').val(val) $(this).parent().parent().find('.discount').val(val)
@ -523,12 +605,12 @@
$(this).parent().parent().find('.allPrice').val((price * quantity).toFixed(2)) $(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 discount = $(this).val()
let val = $(this).parent().parent().find('.cataloguePrice').val() let val = $(this).parent().parent().find('.cataloguePrice').val()
$(this).parent().parent().find('.price').val((val * discount).toFixed(2)) $(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 val = $(this).val()
let num = $(this).parent().parent().find('.quantity').val() let num = $(this).parent().parent().find('.quantity').val()
$(this).parent().parent().find('.allPrice').val((val * num).toFixed(2)) $(this).parent().parent().find('.allPrice').val((val * num).toFixed(2))

View File

@ -63,7 +63,7 @@
width: 100px; width: 100px;
} }
input, textarea, #productTable td { input, textarea, .productTable td {
position: relative; position: relative;
} }
</style> </style>
@ -75,19 +75,23 @@
<table> <table>
<tr> <tr>
<td class="shortTd">项目编码<span class="is-required">*</span></td> <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>
<td class="shortTd">项目名称<span class="is-required">*</span></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> class="form-control"></td>
<td class="shortTd">最终客户<span class="is-required">*</span></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> <input name="customerCode" th:field="*{customerCode}" class="form-control" type="hidden"></td>
</tr> </tr>
<tr> <tr>
<td class="shortTd">BG<span class="is-required">*</span></td> <td class="shortTd">BG<span class="is-required">*</span></td>
<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> onchange="changeBg()" required>
<option value="">请选择BG</option> <option value="">请选择BG</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
@ -154,13 +158,16 @@
<input name="partnerCode" class="form-control" type="hidden" th:field="*{partnerCode}"> <input name="partnerCode" class="form-control" type="hidden" th:field="*{partnerCode}">
</td> </td>
<td>联系方式</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>
<tr> <tr>
<td>预计金额RMB<span class="is-required">*</span></td> <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>预计下单时间</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> <td>预计发货时间</td>
<td><input name="estimatedDeliverTime" class="form-control" placeholder="yyyy-MM-dd" <td><input name="estimatedDeliverTime" class="form-control" placeholder="yyyy-MM-dd"
@ -179,14 +186,16 @@
</div> </div>
<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> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>关键技术问题</td> <td>关键技术问题</td>
<td colspan="5"><input type="text" name="keyProblem" style="width:98%;" <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>
<tr> <tr>
<td>项目简述<span class="is-required">*</span></td> <td>项目简述<span class="is-required">*</span></td>
@ -198,8 +207,55 @@
</table> </table>
<div class="section-title">配置信息</div> <div class="section-title">配置信息</div>
<h3>软件</h3>
<button type="button" class="add-btn" onclick="addProduct({})">添加</button> <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> <thead>
<tr> <tr>
<th>序号</th> <th>序号</th>
@ -217,9 +273,7 @@
<th style="width: 60px">操作</th> <th style="width: 60px">操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
</tbody> </tbody>
</table> </table>
<div> <div>
@ -400,20 +454,27 @@
// 添加软件 // 添加软件
function initData() { function initData() {
let arr=[[${projectInfo.projectProductInfoList}]] let softwareProjectProductInfoList = [[${projectInfo.softwareProjectProductInfoList}]]
arr.forEach((ele)=>{ softwareProjectProductInfoList.forEach((ele) => {
addProduct(ele) addProduct(ele)
}) })
let arr2=[[${projectInfo.projectWorkProgressList }]] let hardwareProjectProductInfoList = [[${projectInfo.hardwareProjectProductInfoList}]]
arr2.forEach((ele)=>{ hardwareProjectProductInfoList.forEach((ele) => {
addProduct2(ele)
})
let maintenanceProjectProductInfoList = [[${projectInfo.maintenanceProjectProductInfoList}]]
maintenanceProjectProductInfoList.forEach((ele) => {
addProduct3(ele)
})
let arr2 = [[${projectInfo.projectWorkProgressList}]]
arr2.forEach((ele) => {
addLog(ele) addLog(ele)
}) })
console.log(123,arr) let arr3 = [[${projectInfo.projectOperateLogList}]]
arr3.forEach((ele, index) => {
let arr3=[[${projectInfo.projectOperateLogList}]] let tr = $(`
arr3.forEach((ele,index)=>{ <tr><td>${index + 1}</td><td>${ele.operateUserName}</td><td>${ele.operateLog}</td><td>${ele.operateTime}</td></tr>
let tr=$(`
<tr><td>${index+1}</td><td>${ele.operateUserName}</td><td>${ele.operateLog}</td><td>${ele.operateTime}</td></tr>
`) `)
$('#sysLog tbody').append(tr) $('#sysLog tbody').append(tr)
}) })
@ -426,17 +487,17 @@
let tr = $(` let tr = $(`
<tr> <tr>
<td class="indexBox">${length + 1}</td> <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 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="projectProductInfoList[${length}].model" type="text" class="form-control model" required value="${data.model||''}"></td> <td><input name="softwareProjectProductInfoList[${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><textarea name="softwareProjectProductInfoList[${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.quantity || ''}" name="softwareProjectProductInfoList[${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.cataloguePrice || ''}" name="softwareProjectProductInfoList[${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.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="projectProductInfoList[${length}].discount" type="number" class="form-control discount" 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="projectProductInfoList[${length}].price" type="number" class="form-control price" placeholder="自动计算" required readonly></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="projectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" 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="projectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" 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="projectProductInfoList[${length}].remark" type="text" class="form-control" ></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> <td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
</tr>`) </tr>`)
@ -444,36 +505,87 @@
initSearchProduct() initSearchProduct()
initPrice() 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) { function addLog(data) {
let length = $('#workLog tbody').find('tr').length let length = $('#workLog tbody').find('tr').length
let tr = $(` let tr = $(`
<tr> <tr>
<td>${length + 1}</td> <td>${length + 1}</td>
<td><input type="hidden" value="${data.id}" name="projectWorkProgressList[${length}].id"><textarea type="text" name="projectWorkProgressList[${length}].workContent" class="form-control" required>${data.workContent||''}</textarea></td> <td><input type="hidden" value="${data.id}" name="projectWorkProgressList[${length}].id"><textarea type="text" name="projectWorkProgressList[${length}].workContent" class="form-control" required>${data.workContent || ''}</textarea></td>
<td><input type="text" class="form-control" placeholder="保存后自动填入" value="${data.userName||''}" readonly></td> <td><input type="text" class="form-control" placeholder="保存后自动填入" value="${data.userName || ''}" readonly></td>
<td><input type="text" class="form-control" placeholder="保存后自动填入" value="${data.workTime||''}" readonly></td> <td><input type="text" class="form-control" placeholder="保存后自动填入" value="${data.workTime || ''}" readonly></td>
</tr>`) </tr>`)
$('#workLog tbody').append(tr) $('#workLog tbody').append(tr)
} }
function initSearchProduct() { function initSearchProduct() {
$('#productTable .productBomCode').on('input', function () { $('.productTable .productBomCode').on('input', function () {
let val = $(this).val() let val = $(this).val()
searchProduct(val, 'code', this) searchProduct(val, 'code', this)
}) })
$('#productTable .model').on('input', function () { $('.productTable .model').on('input', function () {
let val = $(this).val() let val = $(this).val()
searchProduct(val, 'model', this) searchProduct(val, 'model', this)
}) })
$('#productTable .delRow').on('click', function () { $('.productTable .delRow').on('click', function () {
let ele = $(this) let ele = $(this)
$.modal.confirm('是否确认删除', function () { $.modal.confirm('是否确认删除', function () {
$(ele).parent().parent().remove() $(ele).parent().parent().remove()
$('#productTable tbody tr').each((index, item) => { $('#productTable tbody tr').each((index, item) => {
$(item).find('.indexBox').text(index + 1) $(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)
})
}); });
}) })

View File

@ -239,7 +239,7 @@
}, },
{ {
field: 'estimatedAmount', field: 'estimatedAmount',
title: '预计金额(RMB)' title: '预计金额()'
}, },
{ {
field: 'estimatedOrderTime', field: 'estimatedOrderTime',

View File

@ -1,213 +1,814 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head> <head>
<th:block th:include="include :: header('新增订单管理')" /> <th:block th:include="include :: header('新增项目管理')"/>
<th:block th:include="include :: datetimepicker-css" /> <th:block th:include="include :: datetimepicker-css"/>
</head> </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"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-order-add"> <form id="form-product-add">
<div class="col-xs-12"> <div class="section-title">新建订单</div>
<div class="form-group"> <table>
<label class="col-sm-3 control-label is-required">项目主键:</label> <tr>
<div class="col-sm-8"> <td class="shortTd">项目编号<span class="is-required">*</span></td>
<input name="projectId" class="form-control" type="text" required> <td><input type="text" name="projectCode" class="form-control" oninput="searchProject()">
</div> </td>
</div> <td class="shortTd">项目名称<span class="is-required">*</span></td>
</div> <td><input type="text" name="projectName" maxlength="40" placeholder="限制40个字符"
<div class="col-xs-12"> class="form-control"></td>
<div class="form-group"> <td class="shortTd">最终客户<span class="is-required">*</span></td>
<label class="col-sm-3 control-label">地市:</label> <td><input name="customerName" class="form-control" type="text" required onclick="selectCustomer()">
<div class="col-sm-8"> <input name="customerCode" class="form-control" type="hidden"></td>
<input name="city" class="form-control" type="text"> </tr>
</div> <tr>
</div> <td>BG<span class="is-required">*</span></td>
</div> <td colspan="2">
<div class="col-xs-12"> <select name="bgProperty" class="form-control" th:with="type=${@dict.getType('bg_type')}"
<div class="form-group"> onchange="changeBg()" required>
<label class="col-sm-3 control-label">进货商商务接口人姓名:</label> <option value="">请选择BG</option>
<div class="col-sm-8"> <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
<input name="businessPerson" class="form-control" type="text"> th:value="${dict.dictValue}"></option>
</div> </select>
</div> </td>
</div> <td>行业<span class="is-required">*</span></td>
<div class="col-xs-12"> <td colspan="2" id="industryTypeBox">
<div class="form-group"> <select name="industryType" class="form-control"
<label class="col-sm-3 control-label">邮箱:</label> required>
<div class="col-sm-8"> <option value="">请先选择BG</option>
<input name="businessEmail" class="form-control" type="text"> </select>
</div> </td>
</div>
</div> </tr>
<div class="col-xs-12"> <tr id="element1">
<div class="form-group"> <td>属地<span class="is-required">*</span></td>
<label class="col-sm-3 control-label">电话:</label> <td colspan="2">
<div class="col-sm-8"> <select name="province" class="province form-control m-b" data-first-title="选择省">
<input name="businessPhone" class="form-control" type="text"> <option value="">请选择</option>
</div> </select>
</div> </td>
</div> <td class="地市">属地<span class="is-required">*</span></td>
<div class="col-xs-12"> <td colspan="2">
<div class="form-group"> <select name="city" class="city form-control m-b" data-first-title="选择省">
<label class="col-sm-3 control-label">合同编号:</label> <option value="">请选择</option>
<div class="col-sm-8"> </select>
<input name="orderCode" class="form-control" type="text"> </td>
</div>
</div> </tr>
</div> <tr>
<div class="col-xs-12"> <td>进货商商务接口人姓名<span class="is-required">*</span></td>
<div class="form-group"> <td><input type="text" name="businessPerson" class="form-control" required>
<label class="col-sm-3 control-label">出货金额:</label> </td>
<div class="col-sm-8"> <td>Email</td>
<input name="shipmentAmount" class="form-control" type="text"> <td><input type="text" name="businessEmail"
</div> class="form-control"></td>
</div> <td>联系方式<span class="is-required">*</span></td>
</div> <td><input name="businessPhone" class="form-control" type="text" required></td>
<div class="col-xs-12"> </tr>
<div class="form-group"> <tr>
<label class="col-sm-3 control-label">实际进货金额:</label> <td>合同编号<span class="is-required">*</span></td>
<div class="col-sm-8"> <td><input type="text" name="orderCode" class="form-control" placeholder="自动生成">
<input name="actualPurchaseAmount" class="form-control" type="text"> </td>
</div> <td>币种<span class="is-required">*</span></td>
</div> <td>
</div> <select name="currencyType" class="form-control" th:with="type=${@dict.getType('currency_type')}"
<div class="col-xs-12"> required>
<div class="form-group"> <option value="">请选择币种</option>
<label class="col-sm-3 control-label">执行单有效截止时间:</label> <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
<div class="col-sm-8"> th:value="${dict.dictValue}"></option>
<div class="input-group date"> </select></td>
<input name="orderEndTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> <td class="shortTd">出货金额<span class="is-required">*</span></td>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <td><input name="shipmentAmount" class="form-control" type="number" required></td>
</div> </tr>
</div> <tr>
</div> <td>实际进货金额<span class="is-required">*</span></td>
</div> <td colspan="2"><input type="number" name="actualPurchaseAmount" class="form-control" required>
<div class="col-xs-12"> </td>
<div class="form-group"> <td>执行单有效截止时间<span class="is-required">*</span></td>
<label class="col-sm-3 control-label">要求到货时间:</label> <td colspan="2">
<div class="col-sm-8"> <input name="orderEndTime" class="form-control" placeholder="yyyy-MM-dd"
<div class="input-group date"> required>
<input name="deliveryTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> </td>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> </tr>
</div> <tr>
</div>
</div> <td>要求到货时间<span class="is-required">*</span></td>
</div> <td colspan="2">
<div class="col-xs-12"> <input name="deliveryTime" class="form-control" placeholder="yyyy-MM-dd" required>
<div class="form-group"> </td>
<label class="col-sm-3 control-label">公司直发:</label> <td>公司直发</td>
<div class="col-sm-8"> <td colspan="2">
<input name="companyDelivery" class="form-control" type="text"> <select name="companyDelivery" class="form-control"
</div> th:with="type=${@dict.getType('company_delivery')}"
</div> required>
</div> <option value="">请选择</option>
<div class="col-xs-12"> <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
<div class="form-group"> th:value="${dict.dictValue}"></option>
<label class="col-sm-3 control-label">通知人:</label> </select>
<div class="col-sm-8"> </td>
<input name="notifier" class="form-control" type="text"> </tr>
</div> <tr>
</div> <td>通知人<span class="is-required">*</span></td>
</div> <td><input type="text" name="notifier" class="form-control" required>
<div class="col-xs-12"> </td>
<div class="form-group"> <td>Email</td>
<label class="col-sm-3 control-label">通知人邮箱:</label> <td><input type="text" name="notifierEmail"
<div class="col-sm-8"> class="form-control"></td>
<input name="notifierEmail" class="form-control" type="text"> <td>联系方式<span class="is-required">*</span></td>
</div> <td><input name="notifierPhone" class="form-control" type="text" required></td>
</div> </tr>
</div> <tr>
<div class="col-xs-12"> <td>汇智责任人</td>
<div class="form-group"> <td><input name="dutyName" class="form-control" type="text"
<label class="col-sm-3 control-label">通知人电话:</label> onclick="selectPeople()">
<div class="col-sm-8"> <input name="duty" class="form-control" type="hidden"></td>
<input name="notifierPhone" class="form-control" type="text"> <td>Email</td>
</div> <td><input type="text" name="dutyEmail"
</div> class="form-control"></td>
</div> <td>联系方式<span class="is-required">*</span></td>
<div class="col-xs-12"> <td><input name="dutyPhone" class="form-control" type="text" required></td>
<div class="form-group"> </tr>
<label class="col-sm-3 control-label">责任人:</label> <tr>
<div class="col-sm-8"> <td>下单通路<span class="is-required">*</span></td>
<input name="duty" class="form-control" type="text"> <td colspan="5">
</div> <select name="orderChannel" class="form-control" required>
</div> <option value="">请选择</option>
</div> <option value="1">总代</option>
<div class="col-xs-12"> <option value="2">直签</option>
<div class="form-group"> </select>
<label class="col-sm-3 control-label">责任人邮箱:</label> </td>
<div class="col-sm-8"> </tr>
<input name="dutyEmail" class="form-control" type="text"> <tr>
</div> <td>进货商<span class="is-required">*</span></td>
</div> <td><input name="partnerName" class="form-control" type="text"
</div> onclick="selectPeople()" required></td>
<div class="col-xs-12"> <td>进货商代码<span class="is-required">*</span></td>
<div class="form-group"> <td><input type="text" name="partnerCode"
<label class="col-sm-3 control-label">责任人电话:</label> class="form-control" required></td>
<div class="col-sm-8"> <td>进货商类型<span class="is-required">*</span></td>
<input name="dutyPhone" class="form-control" type="text"> <td><input name="level" class="form-control" type="text" required></td>
</div> </tr>
</div> <tr>
</div> <td>供货商<span class="is-required">*</span></td>
<div class="col-xs-12"> <td colspan="5">
<div class="form-group"> <input name="supplier" class="form-control" type="text" required>
<label class="col-sm-3 control-label">下单通路:</label> </td>
<div class="col-sm-8"> </tr>
<input name="orderChannel" class="form-control" type="text"> <tr>
</div> <td>其他特别说明</td>
</div> <td colspan="5">
</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">
<input name="remark" class="form-control" type="text"> <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>
</div>
</div>
</div>
</form> </form>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js" /> <th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript"> <th:block th:include="include :: layui"/>
var prefix = ctx + "project/order" <th:block th:include="include :: jquery-cxselect-js"/>
$("#form-order-add").validate({
<script th:inline="javascript">
var prefix = ctx + "sip/project"
$("#form-product-add").validate({
focusCleanup: true focusCleanup: true
}); });
function submitHandler() { function submitHandler() {
if ($.validate.form()) { 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({ $("input[name='orderEndTime']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
$("input[name='deliveryTime']").datetimepicker({ $("input[name='deliveryTime']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
</script> })
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> </body>
</html> </html>

View File

@ -14,82 +14,30 @@
<label>订单信息:</label> <label>订单信息:</label>
<input type="text" name="projectId" placeholder="项目编号/项目名称/项目负责人" /> <input type="text" name="projectId" placeholder="项目编号/项目名称/项目负责人" />
</li> </li>
<li> <li id="element1">
<label>地市:</label> <label>属地:</label>
<input type="text" name="city"/> <select name="province" class="province form-control m-b" data-first-title="选择省">
</li> <option value="">请选择</option>
<li> </select>
<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> </li>
<li> <li>
<label>供货商:</label> <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>
<li>
<label>订单状态:</label>
<select name="bgProperty" class="form-control">
<option value="">请选择</option>
<option value="0">草稿</option>
<option value="1">待审批</option>
</select>
</li>
<li> <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a> <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@ -119,12 +67,22 @@
</div> </div>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: jquery-cxselect-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('product:order:edit')}]]; var editFlag = [[${@permission.hasPermi('product:order:edit')}]];
var removeFlag = [[${@permission.hasPermi('product:order:remove')}]]; var removeFlag = [[${@permission.hasPermi('product:order:remove')}]];
var prefix = ctx + "project/order"; var prefix = ctx + "project/order";
$(function() { $(function() {
var urlChina = '/cnarea/select';
$.cxSelect.defaults.url = urlChina;
// $.cxSelect.defaults.jsonSpace = 'data';
$('#element1').cxSelect({
selects: ['province', 'city'],
nodata: 'none'
});
var options = { var options = {
url: prefix + "/list", url: prefix + "/list",
createUrl: prefix + "/add", createUrl: prefix + "/add",
@ -141,97 +99,53 @@
visible: false visible: false
}, },
{ {
field: 'projectId', field: 'projectCode',
title: '项目主键' title: '项目编号'
}, },
{ {
field: 'city', field: 'projectName',
title: '地市' title: '项目名称'
},
{
field: 'businessPerson',
title: '进货商商务接口人姓名'
},
{
field: 'businessEmail',
title: '邮箱'
},
{
field: 'businessPhone',
title: '电话'
}, },
{ {
field: 'orderCode', field: 'orderCode',
title: '合同编号' title: '合同编号'
}, },
{ {
field: 'currencyType', field: 'customerName',
title: '币种' title: '最终用户'
}, },
{ {
field: 'shipmentAmount', field: 'shipmentAmount',
title: '出货金额' title: '金额(RMB)'
}, },
{ {
field: 'actualPurchaseAmount', field: 'createTime',
title: '实际进货金额' 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: 'orderStatus', field: 'orderStatus',
title: '订单状态' title: '订单状态'
}, },
{
field: 'a',
title: '物流状态'
},
{
field: 'province',
title: '属地'
},
{
field: 'dutyName',
title: '汇智负责人'
},
{
field: 'notifierName',
title: '通知人'
},
{
field: 'notifierEmail',
title: '进货商'
},
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',