2021-07-15 23:38:59 +08:00

161 lines
7.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>layui</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../../lib/layui-v2.5.5/css/layui.css" media="all">
<link rel="stylesheet" href="../../../css/public.css" media="all">
<style>
body {
background-color: #ffffff;
}
</style>
</head>
<body>
<div class="layui-form layuimini-form" lay-filter="viewSupplier">
<div class="layui-form-item">
<label class="layui-form-label required">客户代号</label>
<div class="layui-input-block">
<input type="text" name="supplierCode" required disabled lay-verify="required" lay-reqtext="客户代号不能为空"
placeholder="请输入客户代号" value="" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label required">客户名称</label>
<div class="layui-input-block">
<input type="text" name="supplierName" required disabled lay-verify="required" lay-reqtext="客户名称不能为空"
placeholder="请输入客户名称" value="" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">联系人</label>
<div class="layui-input-block">
<input type="text" name="contacts" disabled placeholder="请输入联系人" value="" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">移动电话</label>
<div class="layui-input-block">
<input type="text" name="mobilephone" disabled placeholder="请输入移动电话" value="" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">固定电话</label>
<div class="layui-input-block">
<input type="text" name="fixedtelephone" disabled placeholder="请输入固定电话" value="" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">邮箱</label>
<div class="layui-input-block">
<input type="text" name="email" disabled placeholder="请输入邮箱" value="" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">地址</label>
<div class="layui-input-block">
<input type="text" name="address" disabled placeholder="请输入地址" value="" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">网址</label>
<div class="layui-input-block">
<input type="text" name="website" disabled placeholder="请输入网址" value="" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">社会统一信用代码</label>
<div class="layui-input-block">
<input type="text" name="creditcode" disabled placeholder="请输入社会统一信用代码" value="" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">开户银行</label>
<div class="layui-input-block">
<input type="text" name="bank" disabled placeholder="请输入开户银行" value="" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">银行账号</label>
<div class="layui-input-block">
<input type="text" name="bankaccount" disabled placeholder="请输入银行账号" value="" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">传真</label>
<div class="layui-input-block">
<input type="text" name="fax" disabled placeholder="请输入传真" value="" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">备注</label>
<div class="layui-input-block">
<input type="text" name="remark" disabled placeholder="请输入备注" value="" class="layui-input">
</div>
</div>
</div>
<script src="../../../lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script src="../../../js/PublicParameters/PublicParameters.js" charset="utf-8"></script>
<script>
layui.use(['form'], function () {
var form = layui.form,
layer = layui.layer,
$ = layui.$;
var ClientID = layui.sessionData('thisClient').data.thisClientID;
if (ClientID == '' || ClientID == null || ClientID == undefined) {
layer.msg('无法获取当前选择的客户ID请重试', { time: 1000 }, function () {
// 关闭弹出层
var iframeIndex = parent.layer.getFrameIndex(window.name);
parent.layer.close(iframeIndex);
});
return false;
}
else {
//获取用户数据
$.ajax({
url: apiUrl + "/api/services/app/Client/Get", //请求的url地址
dataType: "json", //返回格式为json
//async: false,//请求是否异步默认为异步这也是ajax重要特性
data: { id: ClientID }, //参数值
type: "GET", //请求方式
success: function (req) {
//请求成功时处理
var data = req.result;
//加载时赋值
form.val("viewSupplier", { //formTest 即 class="layui-form" 所在元素属性 lay-filter="" 对应的值
'supplierCode': data.supplierCode,// "name": "value"
'supplierName': data.supplierName,
'contacts': data.contacts,
'mobilephone': data.mobilephone,
'fixedtelephone': data.fixedtelephone,
'email': data.email,
'address': data.address,
'website': data.website,
'creditcode': data.creditCode,
'bank': data.bank,
'bankaccount': data.bankAccount,
'fax': data.fax,
'remark': data.remark,
});
},
error: function () {
/*错误信息处理*/
layer.msg("获取客户信息失败,请重试!");
return false;
},
});
}
});
</script>
</body>
</html>