项目新增未完成
parent
fd4dc6ce4d
commit
392c2b3d52
|
@ -1,484 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改合同档案')"/>
|
||||
<th:block th:include="include :: datetimepicker-css"/>
|
||||
<style>
|
||||
.hideTd {
|
||||
display: none;
|
||||
}
|
||||
|
||||
label[for="versionCode"] {
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-order-edit" th:object="${orderInfo}">
|
||||
<h4 class="form-header h4">合同档案信息</h4>
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">项目编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="projectCode" th:field="*{projectCode}" class="form-control" type="text" disabled>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">合同编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderCode" th:field="*{orderCode}" class="form-control" type="text" required disabled>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">版本号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input disabled name="versionCode" th:field="*{versionCode}" class="form-control" type="number"
|
||||
max="100" min="0" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">合同名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input disabled name="orderName" th:field="*{orderName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">合同类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select disabled name="orderType" class="form-control" th:with="type=${@dict.getType('order_type')}"
|
||||
required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
|
||||
th:field="*{orderType}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">代表处:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="hidden" name="orderAgentCode" th:field="*{orderAgentCode}"/>
|
||||
<input disabled class="form-control" name="orderAgentName" th:field="*{orderAgentName}"
|
||||
required/>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">代理商:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input disabled class="form-control" name="orderPartnerCode" type="hidden"
|
||||
th:field="*{orderPartnerCode}">
|
||||
<input disabled class="form-control" name="orderPartnerName" th:field="*{orderPartnerName}"
|
||||
required>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">签定日期:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input disabled name="orderDate" th:value="${#dates.format(orderInfo.orderDate, 'yyyy-MM-dd')}"
|
||||
class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">客户名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input name="customerName" th:field="*{customerName}" class="form-control" type="text"
|
||||
required disabled>
|
||||
<span class="input-group-addon"><i
|
||||
class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">客户编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input disabled name="customerCode" th:field="*{customerCode}" class="form-control" type="text"
|
||||
required>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">客户联系人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="customerContact" th:field="*{customerContact}" class="form-control"
|
||||
type="text" required disabled>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">客户邮箱:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="customerEmail" th:field="*{customerEmail}" class="form-control" type="text" disabled>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">客户电话:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="customerPhone" th:field="*{customerPhone}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<h4 class="form-header h4">合同清单列表</h4>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer"/>
|
||||
<th:block th:include="include :: datetimepicker-js"/>
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "manage/order";
|
||||
$("#form-order-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-order-edit').serialize());
|
||||
} else {
|
||||
$.modal.alertWarning("请完善表单必填项");
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='orderDate']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
function selectCustomer() {
|
||||
var url = prefix + "/customer";
|
||||
var options = {
|
||||
title: '选择客户',
|
||||
width: "680",
|
||||
url: url,
|
||||
height: '600',
|
||||
|
||||
callBack: doSubmitCustomer
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function selectAgent() {
|
||||
var url = prefix + "/agent";
|
||||
var options = {
|
||||
title: '选择代表处',
|
||||
width: "680",
|
||||
url: url,
|
||||
height: '600',
|
||||
|
||||
callBack: doSubmitAgent
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function selectPartner() {
|
||||
var url = prefix + "/partner";
|
||||
var options = {
|
||||
title: '选择代理商',
|
||||
width: "680",
|
||||
url: url,
|
||||
height: '600',
|
||||
|
||||
callBack: doSubmitPartner
|
||||
};
|
||||
$.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);
|
||||
$(' [name="customerContact"]').val(rows[0].contactPerson);
|
||||
$(' [name="customerEmail"]').val(rows[0].contactEmail);
|
||||
$(' [name="customerPhone"]').val(rows[0].contactPhone);
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
function doSubmitAgent(index, layero) {
|
||||
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
||||
if (rows.length == 0) {
|
||||
$.modal.alertWarning("请选择一个代表处");
|
||||
return;
|
||||
}
|
||||
$('[name="orderAgentCode"]').val(rows[0].agentCode);
|
||||
$('[name="orderAgentName"]').val(rows[0].agentName);
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
function doSubmitPartner(index, layero) {
|
||||
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
||||
if (rows.length == 0) {
|
||||
$.modal.alertWarning("请选择一个代理商");
|
||||
return;
|
||||
}
|
||||
$('[name="orderPartnerCode"]').val(rows[0].partnerCode);
|
||||
$('[name="orderPartnerName"]').val(rows[0].partnerName);
|
||||
|
||||
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
function importList() {
|
||||
$('#uploadInput').click()
|
||||
}
|
||||
|
||||
document.getElementById('uploadInput').addEventListener('change', function (event) {
|
||||
const file = event.target.files[0];
|
||||
let data = new FormData()
|
||||
data.append('file', file)
|
||||
data.append('orderId', $('[name="id"]').val())
|
||||
var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象
|
||||
xhr.open('POST', prefix + '/list/importData', true); // 设置请求类型和URL
|
||||
// 当请求完成时执行的回调函数
|
||||
xhr.onload = function (res) {
|
||||
let data = JSON.parse(res.currentTarget.response)
|
||||
if (data.code === 0) {
|
||||
$.modal.msgSuccess('导入成功');
|
||||
$.operate.get(prefix + `/detail/` + $('[name="id"]').val(), function (res) {
|
||||
$.table.destroy()
|
||||
initTable(res.data)
|
||||
|
||||
})
|
||||
// $.table.refresh();
|
||||
|
||||
} else {
|
||||
$.modal.msgError(data.msg || '导入失败');
|
||||
}
|
||||
$('#uploadInput').val('')
|
||||
|
||||
};
|
||||
|
||||
// 当请求发生错误时执行的回调函数
|
||||
xhr.onerror = function () {
|
||||
console.log('上传过程中发生错误');
|
||||
};
|
||||
//
|
||||
// // 发送数据到服务器
|
||||
xhr.send(data);
|
||||
|
||||
});
|
||||
|
||||
|
||||
$(function () {
|
||||
initTable([[${orderInfo.orderListList}]])
|
||||
parent.layer.style(parent.layer.index, {
|
||||
width: '1100px',
|
||||
height: '630px',
|
||||
top: '30px',
|
||||
left: '300px'
|
||||
});
|
||||
$('[name="versionCode"]').on('focus', function () {
|
||||
$(this).blur()
|
||||
})
|
||||
changeOrderType()
|
||||
});
|
||||
|
||||
function downloadTem() {
|
||||
$.modal.loading("正在下载,请稍候...");
|
||||
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();
|
||||
// })
|
||||
|
||||
}
|
||||
|
||||
function changeTotal(ele) {
|
||||
let price = Number($(ele).parent().parent().find('.price').val()) || 0
|
||||
let quantity = Number($(ele).parent().parent().find('.quantity').val()) || 0
|
||||
let discount = $(ele).val() || 0
|
||||
let res = Number((price * quantity * discount).toFixed(2))
|
||||
$(ele).parent().parent().find('.amount').val(res)
|
||||
}
|
||||
|
||||
function initTable(data) {
|
||||
var options = {
|
||||
data: data,
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [{
|
||||
checkbox: false
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
align: 'center',
|
||||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
return $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
align: 'center',
|
||||
title: "id",
|
||||
class: 'hideTd',
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<input type='hidden' name='orderListList[%s].id' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'productCode',
|
||||
align: 'center',
|
||||
title: 'BOM编码',
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<p ='' class='form-control-static'>%s</p>", value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'productName',
|
||||
align: 'center',
|
||||
title: '产品名称',
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<p class='form-control-static'>%s</p>", value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'quantity',
|
||||
align: 'center',
|
||||
title: '数量',
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<input readonly class='form-control quantity' type='text' name='orderListList[%s].quantity' value='%s' required>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'price',
|
||||
align: 'center',
|
||||
title: '单价',
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<input readonly class='form-control price' type='text' name='orderListList[%s].price' value='%s' required>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'discount',
|
||||
align: 'center',
|
||||
title: '折扣',
|
||||
width: 90,
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<input readonly class='form-control discount' type='number' name='orderListList[%s].discount' value='%s' step='0.0001' max='1' min='0' required>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'amount',
|
||||
align: 'center',
|
||||
title: '总价',
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<input readonly class='form-control amount' type='text' name='orderListList[%s].amount' value='%s' required>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'remark',
|
||||
align: 'center',
|
||||
title: '备注',
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='orderListList[%s].remark' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
$('.discount').on('change', function () {
|
||||
changeTotal($(this))
|
||||
})
|
||||
$('.discount').on('focus', function () {
|
||||
$(this).blur()
|
||||
})
|
||||
}
|
||||
|
||||
function changeOrderType() {
|
||||
let orderType = $('[name="orderType"]').val()
|
||||
if (orderType == 'zq') {
|
||||
$('[name="orderPartnerName"]').removeAttr('required')
|
||||
$('[name="orderPartnerName"]').parent().parent().parent().find('label').removeClass('is-required')
|
||||
} else {
|
||||
$('[name="orderPartnerName"]').attr('required', true)
|
||||
$('[name="orderPartnerName"]').parent().parent().parent().find('label').addClass('is-required')
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -74,35 +74,44 @@
|
|||
<table>
|
||||
<tr>
|
||||
<td class="shortTd">项目编码<span class="is-required">*</span></td>
|
||||
<td colspan="2"><input type="text" name="project_code" class="form-control"></td>
|
||||
<td class="middleTd">项目名称<span class="is-required">*</span></td>
|
||||
<td colspan="2"><input type="text" name="project_name" class="form-control"
|
||||
></td>
|
||||
<td><input type="text" name="projectCode" class="form-control" placeholder="保存后自动生成" readonly>
|
||||
</td>
|
||||
<td class="shortTd">项目名称<span class="is-required">*</span></td>
|
||||
<td><input type="text" name="projectName" 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 class="shortTd">客户名称<span class="is-required">*</span></td>
|
||||
<td><input name="customerName" class="form-control" type="text" required
|
||||
onclick="selectCustomer()">
|
||||
<input name="customerCode" class="form-control" type="hidden"></td>
|
||||
<td class="shortTd">BG<span class="is-required">*</span></td>
|
||||
<td>
|
||||
<select name="bgProperty" class="form-control" th:with="type=${@dict.getType('industry_code')}"
|
||||
onchange="changeOrderType()" required>
|
||||
<option value="">请选择BG</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||
th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="shortTd">行业<span class="is-required">*</span></td>
|
||||
<td>
|
||||
<select name="orderType" class="form-control" th:with="type=${@dict.getType('industry_code')}"
|
||||
<select name="industryType" class="form-control" th:with="type=${@dict.getType('industry_code')}"
|
||||
onchange="changeOrderType()" 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 class="shortTd"> 代表处 <span class="is-required">*</span></td>
|
||||
<td id="element1">
|
||||
<select name="province" class="form-control">
|
||||
</select>
|
||||
<input name="agentName" class="form-control" type="text"
|
||||
onclick="selectAgent()">
|
||||
<input name="agentCode" class="form-control" type="hidden">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>项目阶段<span class="is-required">*</span></td>
|
||||
<td>
|
||||
<select name="orderType" class="form-control"
|
||||
<select name="projectStage" class="form-control"
|
||||
th:with="type=${@dict.getType('project_stage')}"
|
||||
onchange="changeOrderType()" required>
|
||||
<option value="">请选择合项目阶段</option>
|
||||
|
@ -112,7 +121,7 @@
|
|||
</td>
|
||||
<td>项目把握度<span class="is-required">*</span></td>
|
||||
<td>
|
||||
<select name="project_confidence" class="form-control" required>
|
||||
<select name="projectGraspDegree" class="form-control" required>
|
||||
<option>A</option>
|
||||
<option>B</option>
|
||||
<option>C</option>
|
||||
|
@ -120,53 +129,55 @@
|
|||
|
||||
</select>
|
||||
</td>
|
||||
<td>汇智支撑人员</td>
|
||||
<td><input name="peopleName" class="form-control" type="text"
|
||||
<td>汇智责任人</td>
|
||||
<td><input name="hzSupportUserName" class="form-control" type="text"
|
||||
onclick="selectPeople()">
|
||||
<input name="peopleCode" class="form-control" type="hidden"></td>
|
||||
<input name="hzSupportUser" class="form-control" type="hidden"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>运作机构</td>
|
||||
<td>合作渠道</td>
|
||||
<td>
|
||||
<select name="orderType" class="form-control"
|
||||
<select name="operateInstitution" class="form-control"
|
||||
th:with="type=${@dict.getType('operate_institution')}"
|
||||
onchange="changeOrderType()">
|
||||
<option value="">请选择运作机构</option>
|
||||
<option value="">请选择合作渠道</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||
th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</td>
|
||||
<td>代理商<span class="is-required">*</span></td>
|
||||
<td>
|
||||
<input name="orderPartnerName" class="form-control" type="text" required
|
||||
<input name="partnerName" class="form-control" type="text" required
|
||||
onclick="selectPartner()">
|
||||
<input name="orderPartnerCode" class="form-control" type="hidden">
|
||||
<input name="partnerCode" class="form-control" type="hidden">
|
||||
</td>
|
||||
<td>联系方式</td>
|
||||
<td><input type="text" name="contact" class="form-control"></td>
|
||||
<td><input type="text" name="contactWay" class="form-control"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>预计金额(RMB)<span class="is-required">*</span></td>
|
||||
<td><input type="text" name="budget" class="form-control" required></td>
|
||||
<td><input type="number" name="estimatedAmount" class="form-control" required></td>
|
||||
<td>预计下单时间</td>
|
||||
<td><input name="orderDate" class="form-control" placeholder="yyyy-MM-dd" autocomplete="false"></td>
|
||||
<td><input name="estimatedOrderTime" class="form-control" placeholder="yyyy-MM-dd" autocomplete="false">
|
||||
</td>
|
||||
<td>预计发货时间</td>
|
||||
<td><input name="deliveryDate" class="form-control" placeholder="yyyy-MM-dd" autocomplete="false"></td>
|
||||
<td><input name="estimatedDeliverTime" class="form-control" placeholder="yyyy-MM-dd"
|
||||
autocomplete="false"></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>竞争对手</td>
|
||||
<td colspan="5" class="checkbox-group">
|
||||
<div class="checkbox-box">
|
||||
<label><input type="checkbox" name="competitor" value="华为">华为</label>
|
||||
<label><input type="checkbox" name="competitor" value="锐捷">锐捷</label>
|
||||
<label><input type="checkbox" name="competitor" value="深信服">深信服</label>
|
||||
<label><input type="checkbox" name="competitor" value="中兴">中兴</label>
|
||||
<label><input type="checkbox" name="competitor" value="曙云">曙云</label>
|
||||
<label><input type="checkbox" name="competitor[0]" value="华为">华为</label>
|
||||
<label><input type="checkbox" name="competitor[1]" value="锐捷">锐捷</label>
|
||||
<label><input type="checkbox" name="competitor[2]" value="深信服">深信服</label>
|
||||
<label><input type="checkbox" name="competitor[3]" value="中兴">中兴</label>
|
||||
<label><input type="checkbox" name="competitor[4]" value="曙云">曙云</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
其它:<input type="text" name="competitor_other" class="form-control" style="width: 400px">
|
||||
其它:<input type="text" name="competitor[5]" class="form-control" style="width: 400px">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -184,71 +195,78 @@
|
|||
</table>
|
||||
|
||||
<div class="section-title">配置信息</div>
|
||||
<table id="ruanjian">
|
||||
<tr>
|
||||
<th colspan="5" >添加软件
|
||||
<button type="button" class="add-btn" onclick="addRuanjian()">+</button>
|
||||
</th>
|
||||
</tr>
|
||||
<button type="button" class="add-btn" onclick="addProduct()">添加</button>
|
||||
<table id="productTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>软件编码</th>
|
||||
<th>软件型号</th>
|
||||
<th>产品编号</th>
|
||||
<th>产品型号</th>
|
||||
<th>描述</th>
|
||||
<th>数量</th>
|
||||
<th style="width: 80px">目录单价(RMB)</th>
|
||||
<th style="width: 80px">指导折扣</th>
|
||||
<th style="width: 80px">折扣</th>
|
||||
<th style="width: 80px">单价(RMB)</th>
|
||||
<th>总价(RMB)</th>
|
||||
<th>目录总价(RMB)</th>
|
||||
<th>备注</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<table>
|
||||
<th>
|
||||
<th colspan="5" onclick="addYingjian()">添加硬件
|
||||
<button type="button" class="add-btn">+</button>
|
||||
</th>
|
||||
</th>
|
||||
<th>
|
||||
<th>序号</th>
|
||||
<th>硬件编码</th>
|
||||
<th>硬件型号</th>
|
||||
<th>数量</th>
|
||||
<th>备注</th>
|
||||
</th>
|
||||
<tbody>
|
||||
<div>
|
||||
<table>
|
||||
<tr>
|
||||
<td>服务器配置</td>
|
||||
<td><textarea name="serverConfiguration" class="form-control"></textarea></td>
|
||||
<td>是否国产</td>
|
||||
<td>
|
||||
<select name="countryProduct" class="form-control">
|
||||
<option value="">请选择</option>
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
</tbody>
|
||||
|
||||
<tr>
|
||||
<td colspan="4">是否国产</td>
|
||||
<td>
|
||||
<select name="domestic">
|
||||
<option>是</option>
|
||||
<option>否</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="section-title">工作进度</div>
|
||||
<table>
|
||||
<button type="button" class="add-btn" onclick="addLog()">添加</button>
|
||||
<table id="workLog">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>更新内容</th>
|
||||
<th>更新人员</th>
|
||||
<th>更新时间</th>
|
||||
<th>
|
||||
<button type="button" class="add-btn">添加+</button>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
<!-- 可动态添加行 -->
|
||||
</table>
|
||||
<button type="submit">提交</button>
|
||||
<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"/>
|
||||
<th:block th:include="include :: datetimepicker-js"/>
|
||||
<th:block th:include="include :: jquery-cxselect-js"/>
|
||||
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "sip/project"
|
||||
|
@ -263,18 +281,9 @@
|
|||
}
|
||||
|
||||
$(function () {
|
||||
parent.layer.style(parent.layer.index, {
|
||||
height: '700px',
|
||||
width: '1100px',
|
||||
top: '0',
|
||||
left: '240px'
|
||||
});
|
||||
var urlChina = '/cnarea/select';
|
||||
$.cxSelect.defaults.url = urlChina;
|
||||
$('#element1').cxSelect({
|
||||
selects: ['province'],
|
||||
nodata: 'none'
|
||||
});
|
||||
var layerIndex = parent.layer.index
|
||||
parent.layer.full(layerIndex)
|
||||
|
||||
$("input[name='orderDate']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
|
@ -312,6 +321,17 @@
|
|||
$.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 = {
|
||||
|
@ -341,8 +361,8 @@
|
|||
$.modal.alertWarning("请选择一个代理商");
|
||||
return;
|
||||
}
|
||||
$('[name="orderPartnerCode"]').val(rows[0].partnerCode);
|
||||
$('[name="orderPartnerName"]').val(rows[0].partnerName);
|
||||
$('[name="partnerCode"]').val(rows[0].partnerCode);
|
||||
$('[name="partnerName"]').val(rows[0].partnerName);
|
||||
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
@ -353,18 +373,151 @@
|
|||
$.modal.alertWarning("请选择一个代理商");
|
||||
return;
|
||||
}
|
||||
$('[name="peopleCode"]').val(rows[0].userId);
|
||||
$('[name="peopleName"]').val(rows[0].userName);
|
||||
$('[name="hzSupportUser"]').val(rows[0].userId);
|
||||
$('[name="hzSupportUserName"]').val(rows[0].userName);
|
||||
|
||||
$.modal.close(index);
|
||||
}
|
||||
function doSubmitAgent(index, layero) {
|
||||
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
||||
if (rows.length == 0) {
|
||||
$.modal.alertWarning("请选择一个代理商");
|
||||
return;
|
||||
}
|
||||
$('[name="agentCode"]').val(rows[0].agentCode);
|
||||
$('[name="agentName"]').val(rows[0].agentName);
|
||||
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
// 添加软件
|
||||
var freeInput = ['8813A3YA', '8813A3YB', '8813A7U4', '8813A7U2']
|
||||
|
||||
// 添加软件
|
||||
function addRuanjian(){
|
||||
let length= $('#ruanjian tbody').find('tr').length
|
||||
let tr=$(`<tr><td>${length+1}</td><td><input type="text" required></td><td><input type="text" required></td><td><input type="text" required></td><td><input type="text" required></td></tr>`)
|
||||
$('#ruanjian tbody').append(tr)
|
||||
function addProduct() {
|
||||
let length = $('#productTable tbody').find('tr').length
|
||||
let tr = $(`
|
||||
<tr>
|
||||
<td>${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" step="0.1" required></td>
|
||||
<td><input name="projectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" 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><span>删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
$('#productTable tbody').append(tr)
|
||||
initSearchProduct()
|
||||
initPrice()
|
||||
}
|
||||
|
||||
function addLog() {
|
||||
let length = $('#productTable tbody').find('tr').length
|
||||
let tr = $(`
|
||||
<tr>
|
||||
<td>${length + 1}</td>
|
||||
<td><textarea type="text" class="form-control" required></textarea></td>
|
||||
<td><input type="text" class="form-control" value="" required readonly></td>
|
||||
<td><input type="text" class="form-control" required value="" 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)
|
||||
})
|
||||
}
|
||||
|
||||
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))
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('选择代表处')"/>
|
||||
</head>
|
||||
<style>
|
||||
.select-list li{
|
||||
display: inline-block;
|
||||
}
|
||||
.select-list li label{
|
||||
width: 88px !important;
|
||||
}
|
||||
</style>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>办事处编码:</label>
|
||||
<input type="text" name="agentCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>办事处名称:</label>
|
||||
<input type="text" name="agentName"/>
|
||||
</li>
|
||||
<li style="width: 95%;text-align: right">
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<th:block th:include="include :: footer"/>
|
||||
|
||||
|
||||
<script>
|
||||
var prefix = ctx + "system/agent";
|
||||
$(function () {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
showSearch: true,
|
||||
showColumns: false,
|
||||
showToggle: false,
|
||||
showPageGo: true,
|
||||
showRefresh: false,
|
||||
search: false,
|
||||
params: {},
|
||||
columns: [{
|
||||
radio: true
|
||||
},
|
||||
{
|
||||
field: 'agentCode',
|
||||
title: '办事处编码'
|
||||
},
|
||||
{
|
||||
field: 'agentName',
|
||||
title: '办事处名称'
|
||||
},
|
||||
{
|
||||
field: 'province',
|
||||
title: '所在省'
|
||||
},
|
||||
{
|
||||
field: 'city',
|
||||
title: '所在市'
|
||||
},
|
||||
]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function getSelections() {
|
||||
var rows = $('#bootstrap-table').bootstrapTable('getSelections');
|
||||
return rows;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -55,6 +55,12 @@ public class ProjectInfoController extends BaseController
|
|||
{
|
||||
return prefix + "/selectPeople";
|
||||
}
|
||||
@GetMapping("selectAgent")
|
||||
public String selectAgent()
|
||||
{
|
||||
return prefix + "/selectAgent";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询项目管理列表
|
||||
|
|
Loading…
Reference in New Issue