万材erp项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

370 lines
16 KiB

<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增客户资料')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-customer-add">
<div class="form-group">
<label class="col-sm-3 control-label">内外销:</label>
<div class="col-sm-8">
<select name="NWX" id="NWX" class="form-control m-b" th:with="type=${@dict.getType('sys_NWX_class')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">企业代码:</label>
<div class="col-sm-8">
<input id="pCode" name="pCode" class="form-control" type="text" readonly="readonly" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">企业名称:</label>
<div class="col-sm-8">
<input id="pName" name="pName" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">客户简称:</label>
<div class="col-sm-8">
<input id="pHttp" name="pHttp" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">信用额度:</label>
<div class="col-sm-8">
<input id="creditAmt" name="creditAmt" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">英文名称:</label>
<div class="col-sm-8">
<input name="pEnName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">地址:</label>
<div class="col-sm-8">
<input name="pAddress" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">送货地址:</label>
<div class="col-sm-8">
<input name="pWbType" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">邮编:</label>
<div class="col-sm-8">
<input name="pPost" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">法人代表:</label>
<div class="col-sm-8">
<input name="pCeo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">主联系人:</label>
<div class="col-sm-8">
<input name="pLinkman" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系电话:</label>
<div class="col-sm-8">
<input name="pTel" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">传真:</label>
<div class="col-sm-8">
<input name="pFax" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">EMAIL:</label>
<div class="col-sm-8">
<input name="pEmail" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">海关代码:</label>
<div class="col-sm-8">
<input name="pCiqCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付款条件:</label>
<div class="col-sm-8">
<input name="pComCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">发票代码:</label>
<div class="col-sm-8">
<input name="pHyCode" class="form-control" type="text">
</div>
</div>
<!--<div class="form-group"> -->
<!--<label class="col-sm-3 control-label">目的地港:</label>-->
<!--<div class="col-sm-8">-->
<!--<input name="pType" class="form-control" type="text">-->
<!--</div>-->
<!--</div>-->
<div class="form-group">
<label class="col-sm-3 control-label">成立时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="pCreatDate" 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 class="form-group">
<label class="col-sm-3 control-label">结汇银行:</label>
<div class="col-sm-8">
<input name="pJhbank" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">结汇账号:</label>
<div class="col-sm-8">
<input name="pJhbankCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开户银行:</label>
<div class="col-sm-8">
<input name="pBank" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开户账号:</label>
<div class="col-sm-8">
<input name="pBankCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">RMB注册资金:</label>
<div class="col-sm-8">
<input name="pRmbMoney" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">外币注册资金:</label>
<div class="col-sm-8">
<input name="pWbMoney" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注内容:</label>
<div class="col-sm-8">
<textarea name="memoText" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">诚信评级:</label>
<div class="col-sm-8">
<select name="moral" class="form-control m-b" th:with="type=${@dict.getType('fin_customer_moral')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订单号长度:</label>
<div class="col-sm-8">
<input name="ordernoLen" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出货单格式名称:</label>
<div class="col-sm-8">
<input name="sendcpReportname" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">业务员:</label>
<div class="col-sm-8">
<input name="saler" class="form-control" readonly="readonly" type="text" th:value="${@permission.getPrincipalProperty('userName')}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">目的地港代号:</label>
<div class="col-sm-8">
<input name="dWaterNo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">起运港名:</label>
<div class="col-sm-8">
<input name="sWaterName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">起运港代号:</label>
<div class="col-sm-8">
<input name="sWaterNo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">统一编号:</label>
<div class="col-sm-8">
<input name="comCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">币别:</label>
<div class="col-sm-8">
<select name="crlName" class="form-control m-b" th:with="type=${@dict.getType('sys_coin_class')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">国家或地区编号:</label>
<div class="col-sm-8">
<input name="pCountryCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">国家或地区:</label>
<div class="col-sm-8">
<input name="pCountry" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出货需录入使用量:</label>
<div class="col-sm-8">
<select name="senduseConfirm" class="form-control m-b" th:with="type=${@dict.getType('fin_customer_senduseConfirm')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">税率:</label>
<div class="col-sm-8">
<input name="taxPercent" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">含税否:</label>
<div class="col-sm-8">
<select name="taxFlag" class="form-control">
<option value="0"></option>
<option value="1"></option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "finance/customer"
$("#form-customer-add").validate({
focusCleanup: true
});
var workNo = '[[${parameter.Num}]]'
var num = workNo.replace(/[^0-9]/ig,"");
$("#NWX").change(function () {
if ($(this).val() == "内销"){
$("#pCode").val("N"+num);
}
if($(this).val() == "外销"){
$("#pCode").val("W"+num)
}
})
Date.prototype.Format = function (fmt) {
var o = {
"M+": this.getMonth() + 1, //月份
"d+": this.getDate(), //日
"H+": this.getHours(), //小时
"m+": this.getMinutes(), //分
"s+": this.getSeconds(), //秒
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
"S": this.getMilliseconds() //毫秒
};
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
for (var k in o)
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
}
function submitHandler() {
console.log($("#pCode").val())
console.log($("#pName").val())
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-customer-add').serialize());
}
}
// 表单校验
$(function () {
var icon = "<i class='fa fa-times-circle'></i>";
$("#form-customer-add").validate({
rules:{
creditAmt: "required",
pHttp: "required",
pCode: "required",
pName: "required",
},
messages:{
creditAmt: icon + "请输入报价编号",
pHttp:icon + "客户简称",
pCode:icon + "请输入成品名称",
pName: icon + "请输入规格型号",
}
})
})
$("input[name='pCreatDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='comfirmDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='auditingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='approveDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='writeDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>