第二期优化基本完成
parent
594ddf9a3f
commit
b4d8520b82
File diff suppressed because it is too large
Load Diff
|
@ -1,219 +1,241 @@
|
||||||
<!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>
|
<style>
|
||||||
.customerBox{
|
.customerBox {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
.customerBox div{
|
|
||||||
|
.customerBox div {
|
||||||
padding-left: 25px !important;
|
padding-left: 25px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</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 class="form-horizontal m" id="form-order-add">
|
||||||
<h4 class="form-header h4">合同档案信息</h4>
|
<h4 class="form-header h4">合同档案信息</h4>
|
||||||
<div class="col-xs-6">
|
<div class="col-xs-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label">项目编号:</label>
|
<label class="col-sm-4 control-label">项目编号:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="projectCode" class="form-control" type="text">
|
<input name="projectCode" class="form-control" type="text">
|
||||||
|
</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" 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">
|
||||||
|
<input name="versionCode" class="form-control" type="number" 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 name="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 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}"></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">
|
||||||
|
<input class="form-control" type="text" name="orderAgentName" onclick="selectAgent()" required>
|
||||||
|
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6">
|
</div>
|
||||||
<div class="form-group">
|
<div class="col-xs-6">
|
||||||
<label class="col-sm-4 control-label is-required">合同编号:</label>
|
<div class="form-group">
|
||||||
<div class="col-sm-8">
|
<label class="col-sm-4 control-label is-required">代理商:</label>
|
||||||
<input name="orderCode" class="form-control" type="text" required>
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group">
|
||||||
|
<input class="form-control" type="hidden" name="orderPartnerCode">
|
||||||
|
<input class="form-control" type="text" name="orderPartnerName" onclick="selectPartner()"
|
||||||
|
required>
|
||||||
|
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6">
|
</div>
|
||||||
<div class="form-group">
|
<div class="col-xs-6">
|
||||||
<label class="col-sm-4 control-label is-required">版本号:</label>
|
<div class="form-group">
|
||||||
<div class="col-sm-8">
|
<label class="col-sm-4 control-label is-required">签定日期:</label>
|
||||||
<input name="versionCode" class="form-control" type="number" required>
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="orderDate" 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>
|
</div>
|
||||||
<div class="col-xs-6">
|
</div>
|
||||||
<div class="form-group">
|
<div class="col-sm-6">
|
||||||
<label class="col-sm-4 control-label is-required">合同名称:</label>
|
<div class="form-group">
|
||||||
<div class="col-sm-8">
|
<label class="col-sm-4 control-label is-required">客户编码:</label>
|
||||||
<input name="orderName" class="form-control" type="text" required>
|
<div class="col-sm-8">
|
||||||
</div>
|
<div class="input-group">
|
||||||
</div>
|
<input name="customerCode" class="form-control" type="text" required
|
||||||
</div>
|
onclick="selectCustomer()">
|
||||||
<div class="col-xs-6">
|
<span class="input-group-addon" style="width: 40px !important;"><i
|
||||||
<div class="form-group">
|
class="fa fa-search"></i></span>
|
||||||
<label class="col-sm-4 control-label is-required">合同类型:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<select 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}"></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="text" name="orderAgentCode" onclick="selectAgent()" 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 class="form-control" type="text" name="orderPartnerCode" onclick="selectPartner()" 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 name="orderDate" 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-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"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="col-sm-4 customerBox">
|
|
||||||
<div class="col-sm-12 is-required">客户编码:</div>
|
|
||||||
<div class="col-sm-12 input-group" style="display: flex">
|
|
||||||
<input name="customerCode" class="form-control" type="text" required style="width: 70% !important" onclick="selectCustomer()">
|
|
||||||
<span class="input-group-addon" style="width: 40px !important;"><i class="fa fa-search"></i></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4 customerBox">
|
|
||||||
<div class="col-sm-12 is-required">客户名称:</div>
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<input name="customerName" readonly class="form-control" type="text" required>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4 customerBox">
|
|
||||||
<div class="col-sm-12 ">客户联系人:</div>
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<input name="customerContact" readonly class="form-control" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4 customerBox">
|
|
||||||
<div class="col-sm-12">客户邮箱:</div>
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<input name="customerEmail" readonly class="form-control" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4 customerBox">
|
|
||||||
<div class="col-sm-12">客户电话:</div>
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<input name="customerPhone" readonly class="form-control" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12">
|
<div class="col-sm-6">
|
||||||
<h4 class="form-header h4">合同清单列表</h4>
|
<div class="form-group">
|
||||||
</div>
|
<label class="col-sm-4 control-label is-required">客户名称:</label>
|
||||||
<div class="row">
|
<div class="col-sm-8">
|
||||||
<input id="uploadInput" type="file" accept=".xls,.xlsx" style="display: none">
|
<input name="customerName" class="form-control" type="text" required>
|
||||||
<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>
|
||||||
</form>
|
</div>
|
||||||
</div>
|
<div class="col-sm-6">
|
||||||
<th:block th:include="include :: footer" />
|
<div class="form-group">
|
||||||
<th:block th:include="include :: datetimepicker-js" />
|
<label class="col-sm-4 control-label is-required">客户联系人:</label>
|
||||||
<script th:inline="javascript">
|
<div class="col-sm-8">
|
||||||
var prefix = ctx + "manage/order"
|
<input name="customerContact" class="form-control" type="text">
|
||||||
$("#form-order-add").validate({
|
</div>
|
||||||
focusCleanup: true
|
</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="customerEmail" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
function submitHandler() {
|
<div class="col-sm-6">
|
||||||
if ($.validate.form()) {
|
<div class="form-group">
|
||||||
$.operate.save(prefix + "/add", $('#form-order-add').serialize());
|
<label class="col-sm-4 control-label is-required">客户电话:</label>
|
||||||
}
|
<div class="col-sm-8">
|
||||||
|
<input name="customerPhone" class="form-control" type="text">
|
||||||
|
</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"></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 class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</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-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-order-add').serialize());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$("input[name='orderDate']").datetimepicker({
|
$("input[name='orderDate']").datetimepicker({
|
||||||
format: "yyyy-mm-dd",
|
format: "yyyy-mm-dd",
|
||||||
minView: "month",
|
minView: "month",
|
||||||
autoclose: true
|
autoclose: true
|
||||||
});
|
});
|
||||||
|
|
||||||
$(function() {
|
$(function () {
|
||||||
var options = {
|
var options = {
|
||||||
pagination: false,
|
pagination: false,
|
||||||
showSearch: false,
|
showSearch: false,
|
||||||
showRefresh: false,
|
showRefresh: false,
|
||||||
showToggle: false,
|
showToggle: false,
|
||||||
showColumns: false,
|
showColumns: false,
|
||||||
sidePagination: "client",
|
sidePagination: "client",
|
||||||
columns: [{
|
columns: [{
|
||||||
checkbox: true
|
checkbox: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'index',
|
field: 'index',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: "序号",
|
title: "序号",
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||||
return columnIndex + $.table.serialNumber(index);
|
return columnIndex + $.table.serialNumber(index);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'productCode',
|
field: 'productCode',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: 'BOM编码',
|
title: 'BOM编码',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<input readonly class='form-control' type='text' name='orderListList[%s].productCode' value='%s'>", index, value);
|
var html = $.common.sprintf("<input readonly class='form-control' type='text' name='orderListList[%s].productCode' value='%s'>", index, value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'productName',
|
field: 'productName',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '产品名称',
|
title: '产品名称',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<p class='form-control-static'>%s</p>", value);
|
var html = $.common.sprintf("<p class='form-control-static'>%s</p>", value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'quantity',
|
field: 'quantity',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '数量',
|
title: '数量',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<input readonly class='form-control quantity' type='number' name='orderListList[%s].quantity' value='%s'>", index, value);
|
var html = $.common.sprintf("<input readonly class='form-control quantity' type='number' name='orderListList[%s].quantity' value='%s'>", index, value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
@ -222,7 +244,7 @@
|
||||||
field: 'price',
|
field: 'price',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '单价',
|
title: '单价',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<input readonly class='form-control price' type='number' name='orderListList[%s].price' value='%s'>", index, value);
|
var html = $.common.sprintf("<input readonly class='form-control price' type='number' name='orderListList[%s].price' value='%s'>", index, value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
@ -231,17 +253,17 @@
|
||||||
field: 'discount',
|
field: 'discount',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '折扣',
|
title: '折扣',
|
||||||
width:60,
|
width: 60,
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<input class='form-control discount' type='number' name='orderListList[%s].discount' value='%s' step='0.1' max='1' min='0'>", index, value);
|
var html = $.common.sprintf("<input class='form-control discount' type='number' name='orderListList[%s].discount' value='%s' step='0.1' max='1' min='0'>", index, value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'amount',
|
field: 'amount',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '总价',
|
title: '总价',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<input readonly class='form-control amount' type='number' name='orderListList[%s].amount' value='%s'>", index, value);
|
var html = $.common.sprintf("<input readonly class='form-control amount' type='number' name='orderListList[%s].amount' value='%s'>", index, value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
@ -250,7 +272,7 @@
|
||||||
field: 'remark',
|
field: 'remark',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '备注',
|
title: '备注',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='orderListList[%s].remark' value='%s'>", index, value);
|
var html = $.common.sprintf("<input class='form-control' type='text' name='orderListList[%s].remark' value='%s'>", index, value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
@ -258,157 +280,171 @@
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(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>';
|
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);
|
$.table.init(options);
|
||||||
});
|
});
|
||||||
function addRow(row) {
|
|
||||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
function addRow(row) {
|
||||||
var row = {
|
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||||
index: $.table.serialNumber(count),
|
var row = {
|
||||||
productId: row.productId,
|
index: $.table.serialNumber(count),
|
||||||
productCode: row.productCode,
|
productId: row.productId,
|
||||||
quantity: row.quantity,
|
productCode: row.productCode,
|
||||||
price: row.price,
|
quantity: row.quantity,
|
||||||
amount: row.amount,
|
price: row.price,
|
||||||
remark: row.remark,
|
amount: row.amount,
|
||||||
createdAt: row.createdAt,
|
remark: row.remark,
|
||||||
updatedAt: row.updatedAt,
|
createdAt: row.createdAt,
|
||||||
deletedAt: row.deletedAt,
|
updatedAt: row.updatedAt,
|
||||||
discount: row.discount,
|
deletedAt: row.deletedAt,
|
||||||
|
discount: row.discount,
|
||||||
|
}
|
||||||
|
sub.addRow(row);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectCustomer() {
|
||||||
|
var url = prefix + "/customer";
|
||||||
|
var options = {
|
||||||
|
title: '选择客户',
|
||||||
|
width: "680",
|
||||||
|
url: url,
|
||||||
|
callBack: doSubmitCustomer
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectAgent() {
|
||||||
|
var url = prefix + "/agent";
|
||||||
|
var options = {
|
||||||
|
title: '选择代表处',
|
||||||
|
width: "680",
|
||||||
|
url: url,
|
||||||
|
callBack: doSubmitAgent
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectPartner() {
|
||||||
|
var url = prefix + "/partner";
|
||||||
|
var options = {
|
||||||
|
title: '选择代理商',
|
||||||
|
width: "680",
|
||||||
|
url: url,
|
||||||
|
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()
|
||||||
|
}
|
||||||
|
|
||||||
|
function downloadTem() {
|
||||||
|
$.modal.loading("正在下载,请稍候...");
|
||||||
|
$.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);
|
||||||
}
|
}
|
||||||
sub.addRow(row);
|
$.modal.closeLoading();
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
function selectCustomer(){
|
|
||||||
var url = prefix+"/customer";
|
document.getElementById('uploadInput').addEventListener('change', function (event) {
|
||||||
var options = {
|
const file = event.target.files[0];
|
||||||
title: '选择客户',
|
let data = new FormData()
|
||||||
width: "680",
|
data.append('file', file)
|
||||||
url: url,
|
var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象
|
||||||
callBack: doSubmitCustomer
|
xhr.open('POST', prefix + '/list/readData', true); // 设置请求类型和URL
|
||||||
};
|
// 当请求完成时执行的回调函数
|
||||||
$.modal.openOptions(options);
|
xhr.onload = function (res) {
|
||||||
}
|
let data = JSON.parse(res.currentTarget.response)
|
||||||
function selectAgent() {
|
if (data.code === 0) {
|
||||||
var url = prefix+"/agent";
|
$.modal.msgSuccess('导入成功');
|
||||||
var options = {
|
data.data.forEach((row) => {
|
||||||
title: '选择代表处',
|
addRow(row)
|
||||||
width: "680",
|
})
|
||||||
url: url,
|
|
||||||
callBack: doSubmitAgent
|
$('.discount').on('change', function () {
|
||||||
};
|
|
||||||
$.modal.openOptions(options);
|
changeTotal($(this))
|
||||||
}
|
})
|
||||||
function selectPartner() {
|
$('.discount').on('focus', function () {
|
||||||
var url = prefix+"/partner";
|
$(this).blur()
|
||||||
var options = {
|
})
|
||||||
title: '选择代理商',
|
} else {
|
||||||
width: "680",
|
$.modal.msgError(data.msg || '导入失败');
|
||||||
url: url,
|
|
||||||
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);
|
$('#uploadInput').val('')
|
||||||
$(' [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);
|
|
||||||
$.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);
|
|
||||||
$.modal.close(index);
|
|
||||||
}
|
|
||||||
function importList(){
|
|
||||||
$('#uploadInput').click()
|
|
||||||
}
|
|
||||||
function downloadTem(){
|
|
||||||
$.modal.loading("正在下载,请稍候...");
|
|
||||||
$.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) {
|
|
||||||
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 (){
|
// 当请求发生错误时执行的回调函数
|
||||||
|
xhr.onerror = function () {
|
||||||
changeTotal($(this))
|
console.log('上传过程中发生错误');
|
||||||
})
|
};
|
||||||
$('.discount').on('focus',function(){
|
//
|
||||||
$(this).blur()
|
// // 发送数据到服务器
|
||||||
})
|
xhr.send(data);
|
||||||
} else {
|
|
||||||
$.modal.msgError(data.msg||'导入失败');
|
|
||||||
}
|
|
||||||
$('#uploadInput').val('')
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// 当请求发生错误时执行的回调函数
|
|
||||||
xhr.onerror = function () {
|
|
||||||
console.log('上传过程中发生错误');
|
|
||||||
};
|
|
||||||
//
|
|
||||||
// // 发送数据到服务器
|
|
||||||
xhr.send(data);
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function changeTotal(ele){
|
function changeTotal(ele) {
|
||||||
let price= Number($(ele).parent().parent().find('.price').val())||0
|
let price = Number($(ele).parent().parent().find('.price').val()) || 0
|
||||||
let quantity=Number($(ele).parent().parent().find('.quantity').val())||0
|
let quantity = Number($(ele).parent().parent().find('.quantity').val()) || 0
|
||||||
let discount=$(ele).val()||0
|
let discount = $(ele).val() || 0
|
||||||
let res= Number((price*quantity*discount).toFixed(2))
|
let res = Number((price * quantity * discount).toFixed(2))
|
||||||
$(ele).parent().parent().find('.amount').val(res)
|
$(ele).parent().parent().find('.amount').val(res)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -1,303 +1,369 @@
|
||||||
<!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"/>
|
||||||
<style>
|
<style>
|
||||||
.hideTd{
|
.hideTd {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.customerBox div{
|
|
||||||
|
.customerBox div {
|
||||||
padding-left: 25px !important;
|
padding-left: 25px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<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-edit" th:object="${orderInfo}">
|
<form class="form-horizontal m" id="form-order-edit" th:object="${orderInfo}">
|
||||||
<h4 class="form-header h4">合同档案信息</h4>
|
<h4 class="form-header h4">合同档案信息</h4>
|
||||||
<input name="id" th:field="*{id}" type="hidden">
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
<div class="col-xs-6">
|
<div class="col-xs-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label">项目编号:</label>
|
<label class="col-sm-4 control-label">项目编号:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="projectCode" th:field="*{projectCode}" class="form-control" type="text">
|
<input name="projectCode" th:field="*{projectCode}" class="form-control" type="text">
|
||||||
|
</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>
|
||||||
|
</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="versionCode" th:field="*{versionCode}" 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">
|
||||||
|
<input 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 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 class="form-control" name="orderAgentName" th:field="*{orderAgentName}"
|
||||||
|
onclick="selectAgent()" required/>
|
||||||
|
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6">
|
</div>
|
||||||
<div class="form-group">
|
<div class="col-xs-6">
|
||||||
<label class="col-sm-4 control-label is-required">合同编号:</label>
|
<div class="form-group">
|
||||||
<div class="col-sm-8">
|
<label class="col-sm-4 control-label is-required">代理商:</label>
|
||||||
<input name="orderCode" th:field="*{orderCode}" class="form-control" type="text" required>
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group">
|
||||||
|
<input class="form-control" name="orderPartnerCode" type="hidden"
|
||||||
|
th:field="*{orderPartnerCode}">
|
||||||
|
<input class="form-control" name="orderPartnerName" th:field="*{orderPartnerName}"
|
||||||
|
onclick="selectPartner()" required>
|
||||||
|
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6">
|
</div>
|
||||||
<div class="form-group">
|
<div class="col-xs-6">
|
||||||
<label class="col-sm-4 control-label is-required">版本号:</label>
|
<div class="form-group">
|
||||||
<div class="col-sm-8">
|
<label class="col-sm-4 control-label is-required">签定日期:</label>
|
||||||
<input name="versionCode" th:field="*{versionCode}" class="form-control" type="text" required>
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input 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>
|
</div>
|
||||||
<div class="col-xs-6">
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-4 control-label is-required">合同名称:</label>
|
<div class="col-sm-6">
|
||||||
<div class="col-sm-8">
|
<div class="form-group">
|
||||||
<input name="orderName" th:field="*{orderName}" class="form-control" type="text" required>
|
<label class="col-sm-4 control-label is-required">客户编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group">
|
||||||
|
<input name="customerCode" th:field="*{customerCode}" class="form-control" type="text"
|
||||||
|
required onclick="selectCustomer()">
|
||||||
|
<span class="input-group-addon" style="width: 40px !important;"><i
|
||||||
|
class="fa fa-search"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6">
|
</div>
|
||||||
<div class="form-group">
|
<div class="col-sm-6">
|
||||||
<label class="col-sm-4 control-label is-required">合同类型:</label>
|
<div class="form-group">
|
||||||
<div class="col-sm-8">
|
<label class="col-sm-4 control-label is-required">客户名称:</label>
|
||||||
<select name="orderType" class="form-control" th:with="type=${@dict.getType('order_type')}" required>
|
<div class="col-sm-8">
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{orderType}"></option>
|
<input name="customerName" th:field="*{customerName}" class="form-control" type="text"
|
||||||
</select>
|
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">
|
|
||||||
<div class="input-group">
|
|
||||||
<input class="form-control" name="orderAgentCode" th:field="*{orderAgentCode}" onclick="selectAgent()" 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 class="form-control" name="orderPartnerCode" th:field="*{orderPartnerCode}" onclick="selectPartner()" 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 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-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">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="col-sm-4 customerBox">
|
|
||||||
<div class="col-sm-12 is-required">客户编码:</div>
|
|
||||||
<div class="col-sm-12 input-group" style="display: flex">
|
|
||||||
<input name="customerCode" th:field="*{customerCode}" class="form-control" type="text" required style="width: 70% !important" onclick="selectCustomer()">
|
|
||||||
<span class="input-group-addon" style="width: 40px !important;"><i class="fa fa-search"></i></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4 customerBox">
|
|
||||||
<div class="col-sm-12 is-required">客户名称:</div>
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<input name="customerName" th:field="*{customerName}" disabled class="form-control" type="text" required>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4 customerBox">
|
|
||||||
<div class="col-sm-12 ">客户联系人:</div>
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<input name="customerContact" th:field="*{customerContact}" disabled class="form-control" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4 customerBox">
|
|
||||||
<div class="col-sm-12">客户邮箱:</div>
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<input name="customerEmail" th:field="*{customerEmail}" disabled class="form-control" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4 customerBox">
|
|
||||||
<div class="col-sm-12">客户电话:</div>
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<input name="customerPhone" th:field="*{customerPhone}" disabled class="form-control" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</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 name="customerContact" th:field="*{customerContact}" class="form-control"
|
||||||
|
type="text">
|
||||||
|
</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="customerEmail" th:field="*{customerEmail}" class="form-control" type="text">
|
||||||
|
</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">
|
||||||
|
</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>
|
<h4 class="form-header h4">合同清单列表</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
<input id="uploadInput" type="file" accept=".xls,.xlsx" style="display: none">
|
<input id="uploadInput" type="file" accept=".xls,.xlsx" style="display: none">
|
||||||
|
|
||||||
<div class="row">
|
<div class="col-xs-12">
|
||||||
<div class="col-sm-12 select-table table-striped">
|
<button type="button" class="btn btn-white btn-sm" onclick="downloadTem()"><i
|
||||||
<button type="button" class="btn btn-white btn-sm" onclick="downloadTem()"><i class="fa fa-download"> 下载模板</i></button>
|
class="fa fa-download"> 下载模板</i></button>
|
||||||
<button type="button" class="btn btn-white btn-sm" onclick="importList()"><i class="fa fa-upload"> 导入</i></button>
|
<button type="button" class="btn btn-white btn-sm" onclick="importList()"><i class="fa fa-upload">
|
||||||
|
导入</i></button>
|
||||||
<table id="bootstrap-table"></table>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
<div class="col-sm-12 select-table table-striped">
|
||||||
</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() {
|
<table id="bootstrap-table"></table>
|
||||||
if ($.validate.form()) {
|
</div>
|
||||||
$.operate.save(prefix + "/edit", $('#form-order-edit').serialize());
|
</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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("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,
|
||||||
|
callBack: doSubmitCustomer
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectAgent() {
|
||||||
|
var url = prefix + "/agent";
|
||||||
|
var options = {
|
||||||
|
title: '选择代表处',
|
||||||
|
width: "680",
|
||||||
|
url: url,
|
||||||
|
callBack: doSubmitAgent
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectPartner() {
|
||||||
|
var url = prefix + "/partner";
|
||||||
|
var options = {
|
||||||
|
title: '选择代理商',
|
||||||
|
width: "680",
|
||||||
|
url: url,
|
||||||
|
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].partnerCode);
|
||||||
|
|
||||||
|
|
||||||
|
$.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('')
|
||||||
$("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,
|
|
||||||
callBack: doSubmitCustomer
|
|
||||||
};
|
|
||||||
$.modal.openOptions(options);
|
|
||||||
}
|
|
||||||
function selectAgent() {
|
|
||||||
var url = prefix+"/agent";
|
|
||||||
var options = {
|
|
||||||
title: '选择代表处',
|
|
||||||
width: "680",
|
|
||||||
url: url,
|
|
||||||
callBack: doSubmitAgent
|
|
||||||
};
|
|
||||||
$.modal.openOptions(options);
|
|
||||||
}
|
|
||||||
function selectPartner() {
|
|
||||||
var url = prefix+"/partner";
|
|
||||||
var options = {
|
|
||||||
title: '选择代理商',
|
|
||||||
width: "680",
|
|
||||||
url: url,
|
|
||||||
callBack: doSubmitPartner
|
|
||||||
};
|
|
||||||
$.modal.openOptions(options);
|
|
||||||
}
|
|
||||||
|
|
||||||
function doSubmitCustomer(index, layero){
|
};
|
||||||
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
|
||||||
if (rows.length == 0) {
|
// 当请求发生错误时执行的回调函数
|
||||||
$.modal.alertWarning("请选择一个用户");
|
xhr.onerror = function () {
|
||||||
return;
|
console.log('上传过程中发生错误');
|
||||||
|
};
|
||||||
|
//
|
||||||
|
// // 发送数据到服务器
|
||||||
|
xhr.send(data);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
initTable([[${orderInfo.orderListList}]])
|
||||||
|
});
|
||||||
|
|
||||||
|
function downloadTem() {
|
||||||
|
$.modal.loading("正在下载,请稍候...");
|
||||||
|
$.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);
|
||||||
}
|
}
|
||||||
$('[name="customerCode"]').val(rows[0].customerCode);
|
$.modal.closeLoading();
|
||||||
$(' [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);
|
|
||||||
$.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);
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
|
||||||
$.modal.close(index);
|
function initTable(data) {
|
||||||
}
|
var options = {
|
||||||
function importList(){
|
data: data,
|
||||||
$('#uploadInput').click()
|
pagination: false,
|
||||||
}
|
showSearch: false,
|
||||||
document.getElementById('uploadInput').addEventListener('change', function(event) {
|
showRefresh: false,
|
||||||
const file = event.target.files[0];
|
showToggle: false,
|
||||||
let data=new FormData()
|
showColumns: false,
|
||||||
data.append('file',file)
|
sidePagination: "client",
|
||||||
data.append('orderId',$('[name="id"]').val())
|
columns: [{
|
||||||
var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象
|
checkbox: false
|
||||||
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('导入成功');
|
|
||||||
$.table.refresh();
|
|
||||||
$('.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() {
|
|
||||||
var options = {
|
|
||||||
data: [[${orderInfo.orderListList}]],
|
|
||||||
pagination: false,
|
|
||||||
showSearch: false,
|
|
||||||
showRefresh: false,
|
|
||||||
showToggle: false,
|
|
||||||
showColumns: false,
|
|
||||||
sidePagination: "client",
|
|
||||||
columns: [{
|
|
||||||
checkbox: false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: 'index',
|
field: 'index',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: "序号",
|
title: "序号",
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
return $.table.serialNumber(index);
|
return $.table.serialNumber(index);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'id',
|
field: 'id',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: "id",
|
title: "id",
|
||||||
class:'hideTd',
|
class: 'hideTd',
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<input type='hidden' name='orderListList[%s].id' value='%s'>", index, value);
|
var html = $.common.sprintf("<input type='hidden' name='orderListList[%s].id' value='%s'>", index, value);
|
||||||
return html;
|
return html;
|
||||||
|
@ -307,7 +373,7 @@
|
||||||
field: 'productCode',
|
field: 'productCode',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: 'BOM编码',
|
title: 'BOM编码',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<p ='' class='form-control-static'>%s</p>", value);
|
var html = $.common.sprintf("<p ='' class='form-control-static'>%s</p>", value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
@ -316,7 +382,7 @@
|
||||||
field: 'productName',
|
field: 'productName',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '产品名称',
|
title: '产品名称',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<p class='form-control-static'>%s</p>", value);
|
var html = $.common.sprintf("<p class='form-control-static'>%s</p>", value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
@ -326,25 +392,25 @@
|
||||||
field: 'quantity',
|
field: 'quantity',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '数量',
|
title: '数量',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<input readonly class='form-control quantity' type='text' name='orderListList[%s].quantity' value='%s'>", index, value);
|
var html = $.common.sprintf("<input readonly class='form-control quantity' type='text' name='orderListList[%s].quantity' value='%s'>", index, value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'price',
|
field: 'price',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '单价',
|
title: '单价',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<input readonly class='form-control price' type='text' name='orderListList[%s].price' value='%s'>", index, value);
|
var html = $.common.sprintf("<input readonly class='form-control price' type='text' name='orderListList[%s].price' value='%s'>", index, value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'discount',
|
field: 'discount',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '折扣',
|
title: '折扣',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<input class='form-control discount' type='number' name='orderListList[%s].discount' value='%s' step='0.1' max='1' min='0'>", index, value);
|
var html = $.common.sprintf("<input class='form-control discount' type='number' name='orderListList[%s].discount' value='%s' step='0.1' max='1' min='0'>", index, value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
@ -354,8 +420,8 @@
|
||||||
field: 'amount',
|
field: 'amount',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '总价',
|
title: '总价',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<input readonly class='form-control' type='text' name='orderListList[%s].amount' value='%s'>", index, value);
|
var html = $.common.sprintf("<input readonly class='form-control amount' type='text' name='orderListList[%s].amount' value='%s'>", index, value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -364,36 +430,20 @@
|
||||||
field: 'remark',
|
field: 'remark',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '备注',
|
title: '备注',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='orderListList[%s].remark' value='%s'>", index, value);
|
var html = $.common.sprintf("<input class='form-control' type='text' name='orderListList[%s].remark' value='%s'>", index, value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
});
|
$('.discount').on('change', function () {
|
||||||
function downloadTem(){
|
changeTotal($(this))
|
||||||
$.modal.loading("正在下载,请稍候...");
|
})
|
||||||
$.post( prefix + "/list/export", {}, function(result) {
|
$('.discount').on('focus', function () {
|
||||||
if (result.code == web_status.SUCCESS) {
|
$(this).blur()
|
||||||
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
|
})
|
||||||
} else if (result.code == web_status.WARNING) {
|
}
|
||||||
$.modal.alertWarning(result.msg)
|
</script>
|
||||||
} 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)
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -89,7 +89,9 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label">所属行业:</label>
|
<label class="col-sm-4 control-label">所属行业:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="industryType" class="form-control" type="text">
|
<select name="industryType" class="form-control" th:with="type=${@dict.getType('industry_code')}" required>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -101,39 +103,6 @@
|
||||||
</div>
|
</div>
|
||||||
</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 name="createAt" 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-xs-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-4 control-label">更新时间:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<div class="input-group date">
|
|
||||||
<input name="updateAt" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-4 control-label">删除时间:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<div class="input-group date">
|
|
||||||
<input name="deleteAt" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<th:block th:include="include :: footer" />
|
<th:block th:include="include :: footer" />
|
||||||
|
@ -152,23 +121,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$("input[name='createAt']").datetimepicker({
|
|
||||||
format: "yyyy-mm-dd",
|
|
||||||
minView: "month",
|
|
||||||
autoclose: true
|
|
||||||
});
|
|
||||||
|
|
||||||
$("input[name='updateAt']").datetimepicker({
|
|
||||||
format: "yyyy-mm-dd",
|
|
||||||
minView: "month",
|
|
||||||
autoclose: true
|
|
||||||
});
|
|
||||||
|
|
||||||
$("input[name='deleteAt']").datetimepicker({
|
|
||||||
format: "yyyy-mm-dd",
|
|
||||||
minView: "month",
|
|
||||||
autoclose: true
|
|
||||||
});
|
|
||||||
var urlChina = '/cnarea/select';
|
var urlChina = '/cnarea/select';
|
||||||
$.cxSelect.defaults.url = urlChina;
|
$.cxSelect.defaults.url = urlChina;
|
||||||
// $.cxSelect.defaults.jsonSpace = 'data';
|
// $.cxSelect.defaults.jsonSpace = 'data';
|
||||||
|
|
|
@ -91,7 +91,9 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label">所属行业:</label>
|
<label class="col-sm-4 control-label">所属行业:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="industryType" th:field="*{industryType}" class="form-control" type="text">
|
<select name="industryType" th:field="*{industryType}" class="form-control" th:with="type=${@dict.getType('industry_code')}" required>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -103,38 +105,6 @@
|
||||||
</div>
|
</div>
|
||||||
</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 name="createAt" th:value="${#dates.format(customerInfo.createAt, '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-xs-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-4 control-label">更新时间:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<div class="input-group date">
|
|
||||||
<input name="updateAt" th:value="${#dates.format(customerInfo.updateAt, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-4 control-label">删除时间:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<div class="input-group date">
|
|
||||||
<input name="deleteAt" th:value="${#dates.format(customerInfo.deleteAt, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<th:block th:include="include :: footer" />
|
<th:block th:include="include :: footer" />
|
||||||
|
@ -153,24 +123,6 @@
|
||||||
$.operate.save(prefix + "/edit", $('#form-info-edit').serialize());
|
$.operate.save(prefix + "/edit", $('#form-info-edit').serialize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$("input[name='createAt']").datetimepicker({
|
|
||||||
format: "yyyy-mm-dd",
|
|
||||||
minView: "month",
|
|
||||||
autoclose: true
|
|
||||||
});
|
|
||||||
|
|
||||||
$("input[name='updateAt']").datetimepicker({
|
|
||||||
format: "yyyy-mm-dd",
|
|
||||||
minView: "month",
|
|
||||||
autoclose: true
|
|
||||||
});
|
|
||||||
|
|
||||||
$("input[name='deleteAt']").datetimepicker({
|
|
||||||
format: "yyyy-mm-dd",
|
|
||||||
minView: "month",
|
|
||||||
autoclose: true
|
|
||||||
});
|
|
||||||
var urlChina = '/cnarea/select';
|
var urlChina = '/cnarea/select';
|
||||||
$.cxSelect.defaults.url = urlChina;
|
$.cxSelect.defaults.url = urlChina;
|
||||||
$('#element1').cxSelect({
|
$('#element1').cxSelect({
|
||||||
|
|
|
@ -168,10 +168,6 @@
|
||||||
field: 'deleteAt',
|
field: 'deleteAt',
|
||||||
title: '删除时间'
|
title: '删除时间'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
field: 'status',
|
|
||||||
title: '数据状态'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<!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('新增代理商管理')" />
|
||||||
</head>
|
</head>
|
||||||
<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-partner-add">
|
<form class="form-horizontal m" id="form-partner-add">
|
||||||
<div class="col-xs-6">
|
<div class="col-xs-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label is-required">供应商编码:</label>
|
<label class="col-sm-4 control-label is-required">代理商编码:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="partnerCode" class="form-control" type="text" required>
|
<input name="partnerCode" class="form-control" type="text" required>
|
||||||
</div>
|
</div>
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6">
|
<div class="col-xs-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label is-required">供应商名称:</label>
|
<label class="col-sm-4 control-label is-required">代理商名称:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="partnerName" class="form-control" type="text" required>
|
<input name="partnerName" class="form-control" type="text" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!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('修改代理商管理')" />
|
||||||
</head>
|
</head>
|
||||||
<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">
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
<input name="id" th:field="*{id}" type="hidden">
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
<div class="col-xs-6">
|
<div class="col-xs-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label is-required">供应商编码:</label>
|
<label class="col-sm-4 control-label is-required">代理商编码:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="partnerCode" th:field="*{partnerCode}" class="form-control" type="text" required>
|
<input name="partnerCode" th:field="*{partnerCode}" class="form-control" type="text" required>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6">
|
<div class="col-xs-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label is-required">供应商名称:</label>
|
<label class="col-sm-4 control-label is-required">代理商名称:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="partnerName" th:field="*{partnerName}" class="form-control" type="text" required>
|
<input name="partnerName" th:field="*{partnerName}" class="form-control" type="text" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
<head>
|
<head>
|
||||||
<th:block th:include="include :: header('供应商管理列表')" />
|
<th:block th:include="include :: header('代理商管理列表')" />
|
||||||
</head>
|
</head>
|
||||||
<body class="gray-bg">
|
<body class="gray-bg">
|
||||||
<div class="container-div">
|
<div class="container-div">
|
||||||
|
@ -11,11 +11,11 @@
|
||||||
<div class="select-list">
|
<div class="select-list">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label>供应商编码:</label>
|
<label>代理商编码:</label>
|
||||||
<input type="text" name="partnerCode"/>
|
<input type="text" name="partnerCode"/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label>供应商名称:</label>
|
<label>代理商名称:</label>
|
||||||
<input type="text" name="partnerName"/>
|
<input type="text" name="partnerName"/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
updateUrl: prefix + "/edit/{id}",
|
updateUrl: prefix + "/edit/{id}",
|
||||||
removeUrl: prefix + "/remove",
|
removeUrl: prefix + "/remove",
|
||||||
exportUrl: prefix + "/export",
|
exportUrl: prefix + "/export",
|
||||||
modalName: "供应商管理",
|
modalName: "代理商管理",
|
||||||
columns: [{
|
columns: [{
|
||||||
checkbox: true
|
checkbox: true
|
||||||
},
|
},
|
||||||
|
@ -78,11 +78,11 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'partnerCode',
|
field: 'partnerCode',
|
||||||
title: '供应商编码'
|
title: '代理商编码'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'partnerName',
|
field: 'partnerName',
|
||||||
title: '供应商名称'
|
title: '代理商名称'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'province',
|
field: 'province',
|
||||||
|
|
|
@ -15,6 +15,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">华智编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="hzCode" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">产品名称:</label>
|
<label class="col-sm-3 control-label is-required">产品名称:</label>
|
||||||
|
@ -39,6 +47,26 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">产品类型:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="type" class="form-control" th:with="type=${@dict.getType('product_type')}" required>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">产品类型值:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="value" class="form-control" th:with="type=${@dict.getType('product_type')}" required>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictValue}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">备注:</label>
|
<label class="col-sm-3 control-label">备注:</label>
|
||||||
|
|
|
@ -15,6 +15,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">华智编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="hzCode" th:field="*{hzCode}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">产品名称:</label>
|
<label class="col-sm-3 control-label is-required">产品名称:</label>
|
||||||
|
@ -39,6 +47,26 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">产品类型:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select th:field="*{type}" name="type" class="form-control" th:with="type=${@dict.getType('product_type')}" required>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">产品类型值:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select th:field="*{value}" name="value" class="form-control" th:with="type=${@dict.getType('product_type')}" required>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictValue}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">备注:</label>
|
<label class="col-sm-3 control-label">备注:</label>
|
||||||
|
|
Loading…
Reference in New Issue