第二期优化基本完成
parent
594ddf9a3f
commit
b4d8520b82
File diff suppressed because it is too large
Load Diff
|
@ -9,6 +9,7 @@
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.customerBox div {
|
||||
padding-left: 25px !important;
|
||||
}
|
||||
|
@ -53,18 +54,21 @@
|
|||
<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 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>
|
||||
<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>
|
||||
<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>
|
||||
|
@ -72,10 +76,12 @@
|
|||
</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">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" name="orderPartnerCode" onclick="selectPartner()" required>
|
||||
<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>
|
||||
|
@ -92,6 +98,53 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">客户编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input name="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-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>
|
||||
</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>
|
||||
|
||||
<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>
|
||||
|
@ -100,41 +153,6 @@
|
|||
</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 class="col-xs-12">
|
||||
<h4 class="form-header h4">合同清单列表</h4>
|
||||
|
@ -142,8 +160,12 @@
|
|||
<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>
|
||||
<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>
|
||||
|
@ -266,6 +288,7 @@
|
|||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function addRow(row) {
|
||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||
var row = {
|
||||
|
@ -284,6 +307,7 @@
|
|||
sub.addRow(row);
|
||||
|
||||
}
|
||||
|
||||
function selectCustomer() {
|
||||
var url = prefix + "/customer";
|
||||
var options = {
|
||||
|
@ -294,6 +318,7 @@
|
|||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function selectAgent() {
|
||||
var url = prefix + "/agent";
|
||||
var options = {
|
||||
|
@ -304,6 +329,7 @@
|
|||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function selectPartner() {
|
||||
var url = prefix + "/partner";
|
||||
var options = {
|
||||
|
@ -314,6 +340,7 @@
|
|||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmitCustomer(index, layero) {
|
||||
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
||||
if (rows.length == 0) {
|
||||
|
@ -327,6 +354,7 @@
|
|||
$(' [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) {
|
||||
|
@ -334,8 +362,11 @@
|
|||
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) {
|
||||
|
@ -343,11 +374,15 @@
|
|||
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) {
|
||||
|
@ -362,6 +397,7 @@
|
|||
})
|
||||
|
||||
}
|
||||
|
||||
document.getElementById('uploadInput').addEventListener('change', function (event) {
|
||||
const file = event.target.files[0];
|
||||
let data = new FormData()
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
.hideTd {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.customerBox div {
|
||||
padding-left: 25px !important;
|
||||
}
|
||||
|
@ -53,18 +54,22 @@
|
|||
<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 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>
|
||||
<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/>
|
||||
<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>
|
||||
|
@ -72,10 +77,14 @@
|
|||
</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">
|
||||
<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>
|
||||
<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>
|
||||
|
@ -85,12 +94,64 @@
|
|||
<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>
|
||||
<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-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>
|
||||
<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>
|
||||
|
@ -100,48 +161,19 @@
|
|||
</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>
|
||||
|
||||
<h4 class="form-header h4">合同清单列表</h4>
|
||||
<input id="uploadInput" type="file" accept=".xls,.xlsx" style="display: none">
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<input id="uploadInput" type="file" accept=".xls,.xlsx" style="display: none">
|
||||
|
||||
<div class="col-xs-12">
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="downloadTem()"><i
|
||||
class="fa fa-download"> 下载模板</i></button>
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="importList()"><i class="fa fa-upload">
|
||||
导入</i></button>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<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>
|
||||
|
@ -161,11 +193,13 @@
|
|||
$.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 = {
|
||||
|
@ -176,6 +210,7 @@
|
|||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function selectAgent() {
|
||||
var url = prefix + "/agent";
|
||||
var options = {
|
||||
|
@ -186,6 +221,7 @@
|
|||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function selectPartner() {
|
||||
var url = prefix + "/partner";
|
||||
var options = {
|
||||
|
@ -210,6 +246,7 @@
|
|||
$(' [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) {
|
||||
|
@ -217,8 +254,10 @@
|
|||
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) {
|
||||
|
@ -226,14 +265,16 @@
|
|||
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()
|
||||
|
@ -246,14 +287,12 @@
|
|||
let data = JSON.parse(res.currentTarget.response)
|
||||
if (data.code === 0) {
|
||||
$.modal.msgSuccess('导入成功');
|
||||
$.table.refresh();
|
||||
$('.discount').on('change',function (){
|
||||
$.operate.get(prefix + `/detail/` + $('[name="id"]').val(), function (res) {
|
||||
$.table.destroy()
|
||||
initTable(res.data)
|
||||
|
||||
changeTotal($(this))
|
||||
})
|
||||
$('.discount').on('focus',function(){
|
||||
$(this).blur()
|
||||
})
|
||||
// $.table.refresh();
|
||||
|
||||
} else {
|
||||
$.modal.msgError(data.msg || '导入失败');
|
||||
|
@ -274,8 +313,35 @@
|
|||
|
||||
|
||||
$(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);
|
||||
}
|
||||
$.modal.closeLoading();
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function changeTotal(ele) {
|
||||
let price = Number($(ele).parent().parent().find('.price').val()) || 0
|
||||
let quantity = Number($(ele).parent().parent().find('.quantity').val()) || 0
|
||||
let discount = $(ele).val() || 0
|
||||
let res = Number((price * quantity * discount).toFixed(2))
|
||||
$(ele).parent().parent().find('.amount').val(res)
|
||||
}
|
||||
|
||||
function initTable(data) {
|
||||
var options = {
|
||||
data: [[${orderInfo.orderListList}]],
|
||||
data: data,
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
|
@ -355,7 +421,7 @@
|
|||
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);
|
||||
var html = $.common.sprintf("<input readonly class='form-control amount' type='text' name='orderListList[%s].amount' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
|
@ -371,28 +437,12 @@
|
|||
}]
|
||||
};
|
||||
$.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();
|
||||
$('.discount').on('change', function () {
|
||||
changeTotal($(this))
|
||||
})
|
||||
$('.discount').on('focus', function () {
|
||||
$(this).blur()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
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>
|
||||
|
|
|
@ -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