123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- @using MES.Production.Service;
- @using Central.Control.Domain;
- @using Ant.Service.Common;
- @using CommonToolHelper;
- @{
- ViewBag.Title = "经销商信息";
- Layout = "~/Views/Shared/_Layout.cshtml";
- }
- @model Central.Control.Domain.SYS_DISTRIBUTORS
- <style>
- body {
- height: auto;
- }
- .pad {
- margin: 10px 20px 10px 0px;
- }
- .tab-pane .form-group .under {
- border-bottom: 1px solid #ccc;
- min-height: 18px;
- float: left;
- margin-top: 7px;
- }
- .tab-pane .form-group .col-sm-1 {
- width: 15%;
- }
- </style>
- <div class="pad">
- <!-- head star -->
- <div class="tnav row wrapper border-bottom white-bg page-heading" style="margin: 5px 0px !important">
- <div class="col-sm-3">
- <h2 class="fl">经销商信息</h2>
- </div>
- <div class="col-sm-9">
- <div class="ibox-tools rboor" style="margin-top: 15px !important;">
- <a class="btn btn-primary btn-xs p310" id="insert" action="add"><i class="im-plus"></i> 创建新经销商</a>
- @{
- if (Model.ID != null)
- {
- <a class="btn btn-primary btn-xs p310" id="iChild" action="addchild"><i class="im-arrow-right"></i> 创建下级经销商</a>
- <a class="btn btn-primary btn-xs p310" id="allocation" action="allocation"><i class="im-road"></i> 分配岗位</a>
- <a class="btn btn-primary btn-xs p310" id="modify" action="edit"><i class="im-pencil2"></i> 编辑</a>
- <a class="btn btn-primary btn-xs p310" id="deletes" action="remove"><i class="im-remove4"></i> 删除</a>
- }
- }
- </div>
- </div>
- </div>
- <!-- head end -->
- <!-- form star -->
- <div class="row white-bg animated fadeInRight">
- <div class="wrapper-content">
- <form class="form-horizontal mform tip-wal">
- <div class="panel-body">
- <div class="tab-content">
- <div id="tab-1" class="tab-pane active">
- <div class="form-group">
- <label class="col-sm-1 control-label">经销商编号</label>
- <label class="col-sm-10 under">
- @Html.Hidden("dptId", Model.ID)@Model.CODE
- </label>
- </div>
- <div class="form-group">
- <label class="col-sm-1 control-label">经销商名称</label>
- <label class="col-sm-10 under"> @Model.NAME</label>
- </div>
- <div class="form-group">
- <label class="col-sm-1 control-label">经销商级别</label>
- <label class="col-sm-10 under">@Model.BUSINESSLEVEL</label>
- </div>
- <div class="form-group">
- <label class="col-sm-1 control-label">经销商排序值</label>
- <label class="col-sm-10 under">
- @Model.SHOWORDER
- </label>
- </div>
- <div class="form-group">
- <label class="col-sm-1 control-label">创建时间</label>
- <label class="col-sm-10 under">
- @Model.CREATEDATE
- </label>
- </div>
- <div class="form-group">
- <label class="col-sm-1 control-label">创建时间</label>
- <label class="col-sm-10 under">
- @Model.CREATEDATE
- </label>
- </div>
- @{
- var postlist = ViewData["postInfo"] as List<SYS_POST>;
- var userlist = ViewData["userInfo"] as dynamic;
- if (postlist != null && postlist.Count > 0)
- {
- foreach (var item in postlist)
- {
- <div class="form-group">
- <label class="col-sm-1 control-label">@item.POSTNAME</label>
- <label class="col-sm-10 under">
- @{
- if (userlist != null)
- {
- string name = string.Empty;
- foreach (var user in userlist)
- {
- if (user.POSTID == item.ID)
- {
- name += user.NAME + ",";
- }
- }
- @Html.Raw(name.TrimEnd(','))
- }
- }
- </label>
- </div>
- }
- }
- }
- </div>
- </div>
- </div>
- </form>
- </div>
- </div>
- <!-- form end -->
- </div>
- @section scripts{
- <script type="text/javascript">
- //列表增加
- $("#insert").click(function () {
- dig.addModel("添加/编辑经销商", "/Sys/Department/detail", 700, 800, function () {
- if (this.returnValue == 'yes') {
- location.reload();
- }
- });
- });
- //分配岗位
- $('#allocation').click(function () {
- dig.addModel('分配岗位', '/Sys/Post/PostCall?dptId=' + $('#dptId').val(), 500, 400, function () {
- if (this.returnValue == 'yes') {
- location.reload();
- }
- });
- });
- //添加子部门
- $('#iChild').click(function () {
- dig.addModel("添加下级经销商", "/Sys/Department/detail?parentId=" + $('#dptId').val(), 700, 300, function () {
- if (this.returnValue == 'yes') {
- location.reload();
- }
- });
- });
- //列表选择修改
- $('#modify').click(function () {
- dig.addModel("添加/编辑经销商", "/Sys/Department/detail/" + $('#dptId').val(), 700, 800, function () {
- if (this.returnValue == 'yes') {
- location.reload();
- }
- });
- });
- //删除
- $('#deletes').click(function () {
- var vals = $('#dptId').val();
- if (vals == '' || vals == ',') {
- dig.alertError("提示", "对不起,请选中您要操作的记录!");
- return;
- }
- var msg = "删除记录后不可恢复,您确定吗?";
- dig.confirm("删除确认", msg, function () {
- $.post('/Sys/Department/Delete', { idList: vals }, function (res) {
- if (res.Status == "y") {
- dig.alertSuccess('提示', '删除成功', function () {
- location.reload();
- });
- } else {
- dig.alertError("提示", res.Msg);
- }
- }, "json");
- });
- });
- </script>
- }
|