Angular.js(出库查看)

查看就非常简单了,直接贴代码吧。
1、控制器

app.controller("search", ['$scope', 'app_settings', 'SystemParam', '$http', 'Post', 'Get', '$state', '$stateParams',
function ($scope, app_settings, SystemParam, $http, Post, Get, $state, $stateParams) {
    //页面参数
    console.log(SystemParam.dict())
    //页面跳转查询数据
    console.log($stateParams.SearchID)
    var parameters = { 'ids': $stateParams.SearchID };
    var RtnData = Get.get(app_settings.api_host_url + 'api/instock/SingleStock', parameters);

    RtnData.then(function (resultMessage) {
        if (resultMessage.StateCode == "0") {

            $scope.InStockEntity = resultMessage.Data;

        }

    });

}]);

2、对应的html页面。平时很少去看代码的编译规范,对于提行缩进几个格子,何时该打分号没有太多去探究。没事儿的时候就按照自己的喜好将写过的代码整理,贴出来的代码肯定有多处不规范的地方,恩,先贴出来,需要注意的规范在敲代码的过程中自然就学会了。

<style>
    .change.active {
        background-color: #F5F5F5;        
    }
</style>
<script>
    console.log("当前页")
    console.log(window.location.href);
    if (window.location.href == window.location.href) {
        console.log("进入判断");
        $("#bread a:eq(1)").css({ 'color': '#3B73AF', 'font-weight': '600', });
    };
    $("#bread").find("a:first").on({
        'mouseover': function () {

            $(this).css({ 'color': '#3B73AF', 'font-weight': '600', });
        },
        'mouseleave': function () {

            $(this).css({ 'color': '#3B73AF', 'font-weight': '400', });
        }
    });
</script>
<div class="hbox hbox-auto-lg bg-light m-t-md no-padder container " ng-init="
  app.settings.asideFixed = false;
  app.settings.asideDock = true;
  app.settings.container = false;
  app.hideAside = false;
  app.hideFooter = false;
  " ng-controller="search" style="height: auto;margin-top:0px;">
    <!-- column -->
    <div class="container-fluid">

        <div class="col w-xs">
            <p class=""> <h4 class=" text-dark   font-bold  w-xs ">采购入库</h4></p>
        </div>
        <!--Breadcrumb-->
        <div class="col" style="padding-top:5px;">
            <ol id="bread" class="breadcrumb">
                <li><i class="fa fa-university"></i>&nbsp;<a href="" ui-sref="app.instock" style="color:#3B73AF">列表</a></li>
                <li><i class="fa fa-plus"></i>&nbsp;<a href="">查看</a></li>

            </ol>
        </div>
        <!--Breadcrumb End-->
        <!--<div class="col col-lg-2 m-t">
            <span>入库人员:</span><span>{{mode.operUserName}}</span>
            <span>入库日期:</span><span class="m-r-xl">{{ today | date:'yyyy-MM-dd HH:mm:ss' }}</span>

        </div>-->
        <div class="bg-light lter wrapper">          
            <div class="hbox m-l">
                <span class="w-xs" >供应商:</span>
                <span style="height:34px;">{{InStockEntity.pvName}}</span>
                 <span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
                <span class="w-xs" >仓库:</span>
                <span style="height:34px;">{{InStockEntity. whName}}</span>
            </div>
        </div>
        <div class="Normal-center col-lg-12   b-light  no-padder ">
            <div class=" r r-2x ">
                <div class=" r r-2x  ">
                    <div class="vbox ">
                        <div class="">
                            <div class="panel panel-default lter m-t col-lg-12 w-full">
                                <table class="table">
                                    <thead>
                                        <tr>
                                            <th width="8%" class="text-center ">
                                                <label class="i-checks m-b-none " style="margin-left:-3px"><input type="checkbox" name="post[]" class="group-checkable"><i></i></label>
                                            </th>
                                            <th width="32%" class="">商品代码</th>
                                            <th width="32&">商品名称</th>
                                            <th width="32%">数量</th>

                                        </tr>
                                    </thead>
                                    <tbody ng-repeat="table in InStockEntity.inStockDetails">
                                        <tr class="change" ng-class="{true:'active',false:''}[inStockDetails.focus]" ng-mouseover ="inStockDetails.focus=true" ng-mouseleave ="inStockDetails.focus=false ">
                                            <td width="8%" class="text-center ">
                                                <label class="i-checks m-b-none " style="margin-left:-3px"><input type="checkbox" name="post[]" class="group-checkable"><i></i></label>
                                            </td>
                                            <td>{{table.pSKU}}</td>
                                            <td>{{table.pName}}</td>
                                            <td>{{table.isNum }}</td>
                                        </tr>
                                    </tbody>
                                    <tfoot>
                                        <tr>
                                            <td class="text-center">
                                                <span >总计:</span>
                                            </td>
                                            <td></td>
                                            <td></td>
                                            <td>
                                                {{InStockEntity.proNum}}
                                            </td>
                                        </tr>
                                    </tfoot>                        
                                </table>                      
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="footer">           
            <div class="bg-light lter  col-lg-12  wrapper lter r r-3x ">
                <div class="navbar-right m-r">

                    <button class="btn  btn-info  btn-sm m-l-md ">确&nbsp;&nbsp;定</button>
                    <button class="btn  btn-info  btn-sm m-l-md ">取&nbsp;&nbsp;消</button>
                </div>
            </div>
        </div>
    </div>
</div>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值