第二期优化基本完成
parent
594ddf9a3f
commit
b4d8520b82
File diff suppressed because it is too large
Load Diff
|
@ -1,219 +1,241 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增合同档案')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
<th:block th:include="include :: header('新增合同档案')"/>
|
||||
<th:block th:include="include :: datetimepicker-css"/>
|
||||
</head>
|
||||
<style>
|
||||
.customerBox{
|
||||
.customerBox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.customerBox div{
|
||||
|
||||
.customerBox div {
|
||||
padding-left: 25px !important;
|
||||
}
|
||||
</style>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-order-add">
|
||||
<h4 class="form-header h4">合同档案信息</h4>
|
||||
<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" class="form-control" type="text">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-order-add">
|
||||
<h4 class="form-header h4">合同档案信息</h4>
|
||||
<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" 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 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 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="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 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 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 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="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 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="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 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 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="customerName" class="form-control" type="text" required>
|
||||
</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
|
||||
});
|
||||
</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" 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" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-order-add').serialize());
|
||||
}
|
||||
<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" 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({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
$("input[name='orderDate']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
$(function () {
|
||||
var options = {
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
align: 'center',
|
||||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||
return columnIndex + $.table.serialNumber(index);
|
||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||
return columnIndex + $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'productCode',
|
||||
align: 'center',
|
||||
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);
|
||||
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: '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) {
|
||||
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);
|
||||
return html;
|
||||
}
|
||||
|
@ -222,7 +244,7 @@
|
|||
field: 'price',
|
||||
align: 'center',
|
||||
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);
|
||||
return html;
|
||||
}
|
||||
|
@ -231,17 +253,17 @@
|
|||
field: 'discount',
|
||||
align: 'center',
|
||||
title: '折扣',
|
||||
width:60,
|
||||
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);
|
||||
return html;
|
||||
width: 60,
|
||||
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);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'amount',
|
||||
align: 'center',
|
||||
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);
|
||||
return html;
|
||||
}
|
||||
|
@ -250,7 +272,7 @@
|
|||
field: 'remark',
|
||||
align: 'center',
|
||||
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);
|
||||
return html;
|
||||
}
|
||||
|
@ -258,157 +280,171 @@
|
|||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
formatter: function (value, row, index) {
|
||||
var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index);
|
||||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + value + '\')"><i class="fa fa-remove"></i>删除</a>';
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
function addRow(row) {
|
||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||
var row = {
|
||||
index: $.table.serialNumber(count),
|
||||
productId: row.productId,
|
||||
productCode: row.productCode,
|
||||
quantity: row.quantity,
|
||||
price: row.price,
|
||||
amount: row.amount,
|
||||
remark: row.remark,
|
||||
createdAt: row.createdAt,
|
||||
updatedAt: row.updatedAt,
|
||||
deletedAt: row.deletedAt,
|
||||
discount: row.discount,
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function addRow(row) {
|
||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||
var row = {
|
||||
index: $.table.serialNumber(count),
|
||||
productId: row.productId,
|
||||
productCode: row.productCode,
|
||||
quantity: row.quantity,
|
||||
price: row.price,
|
||||
amount: row.amount,
|
||||
remark: row.remark,
|
||||
createdAt: row.createdAt,
|
||||
updatedAt: row.updatedAt,
|
||||
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";
|
||||
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;
|
||||
}
|
||||
|
||||
document.getElementById('uploadInput').addEventListener('change', function (event) {
|
||||
const file = event.target.files[0];
|
||||
let data = new FormData()
|
||||
data.append('file', file)
|
||||
var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象
|
||||
xhr.open('POST', prefix + '/list/readData', true); // 设置请求类型和URL
|
||||
// 当请求完成时执行的回调函数
|
||||
xhr.onload = function (res) {
|
||||
let data = JSON.parse(res.currentTarget.response)
|
||||
if (data.code === 0) {
|
||||
$.modal.msgSuccess('导入成功');
|
||||
data.data.forEach((row) => {
|
||||
addRow(row)
|
||||
})
|
||||
|
||||
$('.discount').on('change', function () {
|
||||
|
||||
changeTotal($(this))
|
||||
})
|
||||
$('.discount').on('focus', function () {
|
||||
$(this).blur()
|
||||
})
|
||||
} else {
|
||||
$.modal.msgError(data.msg || '导入失败');
|
||||
}
|
||||
$('[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);
|
||||
$.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();
|
||||
})
|
||||
$('#uploadInput').val('')
|
||||
|
||||
}
|
||||
document.getElementById('uploadInput').addEventListener('change', function(event) {
|
||||
const file = event.target.files[0];
|
||||
let data=new FormData()
|
||||
data.append('file',file)
|
||||
var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象
|
||||
xhr.open('POST',prefix+'/list/readData', true); // 设置请求类型和URL
|
||||
// 当请求完成时执行的回调函数
|
||||
xhr.onload = function (res) {
|
||||
let data=JSON.parse(res.currentTarget.response)
|
||||
if (data.code === 0) {
|
||||
$.modal.msgSuccess('导入成功');
|
||||
data.data.forEach((row)=>{
|
||||
addRow(row)
|
||||
})
|
||||
};
|
||||
|
||||
$('.discount').on('change',function (){
|
||||
|
||||
changeTotal($(this))
|
||||
})
|
||||
$('.discount').on('focus',function(){
|
||||
$(this).blur()
|
||||
})
|
||||
} else {
|
||||
$.modal.msgError(data.msg||'导入失败');
|
||||
}
|
||||
$('#uploadInput').val('')
|
||||
|
||||
};
|
||||
|
||||
// 当请求发生错误时执行的回调函数
|
||||
xhr.onerror = function () {
|
||||
console.log('上传过程中发生错误');
|
||||
};
|
||||
//
|
||||
// // 发送数据到服务器
|
||||
xhr.send(data);
|
||||
// 当请求发生错误时执行的回调函数
|
||||
xhr.onerror = function () {
|
||||
console.log('上传过程中发生错误');
|
||||
};
|
||||
//
|
||||
// // 发送数据到服务器
|
||||
xhr.send(data);
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
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>
|
||||
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>
|
||||
</html>
|
|
@ -1,303 +1,369 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改合同档案')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
<th:block th:include="include :: header('修改合同档案')"/>
|
||||
<th:block th:include="include :: datetimepicker-css"/>
|
||||
<style>
|
||||
.hideTd{
|
||||
.hideTd {
|
||||
display: none;
|
||||
}
|
||||
.customerBox div{
|
||||
|
||||
.customerBox div {
|
||||
padding-left: 25px !important;
|
||||
}
|
||||
</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">
|
||||
<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">
|
||||
</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 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 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" 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 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 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 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 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="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 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" 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 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="customerName" th:field="*{customerName}" 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">
|
||||
</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>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<input id="uploadInput" type="file" accept=".xls,.xlsx" style="display: none">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<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>
|
||||
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
<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>
|
||||
</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
|
||||
});
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-order-edit').serialize());
|
||||
<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());
|
||||
}
|
||||
}
|
||||
|
||||
$("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 || '导入失败');
|
||||
}
|
||||
}
|
||||
$("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);
|
||||
}
|
||||
$('#uploadInput').val('')
|
||||
|
||||
function doSubmitCustomer(index, layero){
|
||||
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
||||
if (rows.length == 0) {
|
||||
$.modal.alertWarning("请选择一个用户");
|
||||
return;
|
||||
};
|
||||
|
||||
// 当请求发生错误时执行的回调函数
|
||||
xhr.onerror = function () {
|
||||
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);
|
||||
$(' [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.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)
|
||||
}
|
||||
|
||||
$.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('导入成功');
|
||||
$.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
|
||||
},
|
||||
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);
|
||||
return $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
align: 'center',
|
||||
title: "id",
|
||||
class:'hideTd',
|
||||
class: 'hideTd',
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<input type='hidden' name='orderListList[%s].id' value='%s'>", index, value);
|
||||
return html;
|
||||
|
@ -307,7 +373,7 @@
|
|||
field: 'productCode',
|
||||
align: 'center',
|
||||
title: 'BOM编码',
|
||||
formatter: function(value, row, index) {
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<p ='' class='form-control-static'>%s</p>", value);
|
||||
return html;
|
||||
}
|
||||
|
@ -316,7 +382,7 @@
|
|||
field: 'productName',
|
||||
align: 'center',
|
||||
title: '产品名称',
|
||||
formatter: function(value, row, index) {
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<p class='form-control-static'>%s</p>", value);
|
||||
return html;
|
||||
}
|
||||
|
@ -326,25 +392,25 @@
|
|||
field: 'quantity',
|
||||
align: 'center',
|
||||
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);
|
||||
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'>", 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'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'discount',
|
||||
align: 'center',
|
||||
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);
|
||||
return html;
|
||||
}
|
||||
|
@ -354,8 +420,8 @@
|
|||
field: 'amount',
|
||||
align: 'center',
|
||||
title: '总价',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input readonly class='form-control' type='text' name='orderListList[%s].amount' value='%s'>", index, value);
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<input readonly class='form-control amount' type='text' name='orderListList[%s].amount' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
|
@ -364,36 +430,20 @@
|
|||
field: 'remark',
|
||||
align: 'center',
|
||||
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);
|
||||
return html;
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
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();
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
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>
|
||||
};
|
||||
$.table.init(options);
|
||||
$('.discount').on('change', function () {
|
||||
changeTotal($(this))
|
||||
})
|
||||
$('.discount').on('focus', function () {
|
||||
$(this).blur()
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -89,7 +89,9 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">所属行业:</label>
|
||||
<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>
|
||||
|
@ -101,39 +103,6 @@
|
|||
</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>
|
||||
</div>
|
||||
<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';
|
||||
$.cxSelect.defaults.url = urlChina;
|
||||
// $.cxSelect.defaults.jsonSpace = 'data';
|
||||
|
|
|
@ -91,7 +91,9 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">所属行业:</label>
|
||||
<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>
|
||||
|
@ -103,38 +105,6 @@
|
|||
</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>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
|
@ -153,24 +123,6 @@
|
|||
$.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';
|
||||
$.cxSelect.defaults.url = urlChina;
|
||||
$('#element1').cxSelect({
|
||||
|
|
|
@ -168,10 +168,6 @@
|
|||
field: 'deleteAt',
|
||||
title: '删除时间'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '数据状态'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增供应商管理')" />
|
||||
<th:block th:include="include :: header('新增代理商管理')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-partner-add">
|
||||
<div class="col-xs-6">
|
||||
<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">
|
||||
<input name="partnerCode" class="form-control" type="text" required>
|
||||
</div>
|
||||
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
<div class="col-xs-6">
|
||||
<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">
|
||||
<input name="partnerName" class="form-control" type="text" required>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改供应商管理')" />
|
||||
<th:block th:include="include :: header('修改代理商管理')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
|
@ -9,7 +9,7 @@
|
|||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="col-xs-6">
|
||||
<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">
|
||||
<input name="partnerCode" th:field="*{partnerCode}" class="form-control" type="text" required>
|
||||
</div>
|
||||
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
<div class="col-xs-6">
|
||||
<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">
|
||||
<input name="partnerName" th:field="*{partnerName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!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('供应商管理列表')" />
|
||||
<th:block th:include="include :: header('代理商管理列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
|
@ -11,11 +11,11 @@
|
|||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>供应商编码:</label>
|
||||
<label>代理商编码:</label>
|
||||
<input type="text" name="partnerCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>供应商名称:</label>
|
||||
<label>代理商名称:</label>
|
||||
<input type="text" name="partnerName"/>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -67,7 +67,7 @@
|
|||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "供应商管理",
|
||||
modalName: "代理商管理",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
|
@ -78,11 +78,11 @@
|
|||
},
|
||||
{
|
||||
field: 'partnerCode',
|
||||
title: '供应商编码'
|
||||
title: '代理商编码'
|
||||
},
|
||||
{
|
||||
field: 'partnerName',
|
||||
title: '供应商名称'
|
||||
title: '代理商名称'
|
||||
},
|
||||
{
|
||||
field: 'province',
|
||||
|
|
|
@ -15,6 +15,14 @@
|
|||
</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="form-group">
|
||||
<label class="col-sm-3 control-label is-required">产品名称:</label>
|
||||
|
@ -39,6 +47,26 @@
|
|||
</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="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
|
|
|
@ -15,6 +15,14 @@
|
|||
</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="form-group">
|
||||
<label class="col-sm-3 control-label is-required">产品名称:</label>
|
||||
|
@ -39,6 +47,26 @@
|
|||
</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="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
|
|
Loading…
Reference in New Issue