inventoryHeader.html 8.66 KB
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<style>
    #toolbar1{
        display: inline-block;
        /*position: absolute;
        margin: 10px auto;*/
        line-height: 34px;
    }
</style>
<body class="gray-bg">
    <div class="container-div">
		<div class="row">
			<div class="col-sm-12 select-info">
				<ul id="myTab" class="nav nav-tabs">
					<li class="active"><a href="#tabHeader" data-toggle="tab">主表</a></li>
					<li><a href="#tabDetail" data-toggle="tab">明细</a></li>
				</ul>
				<div id="myTabContent" class="tab-content">
					<div class="tab-pane fade in active" id="tabHeader">
						<div class="col-sm-12 select-info">
							<form id="inventoryHeader-form">
								<div class="select-list">
									<ul>
										<li>
											差异单编号:<input type="text" name="code"/>
										</li>
										<li>
											源盘点单号:<input type="text" name="sourceCode"/>
										</li>
										<!--<li>
											差异单状态:<select name="status"
														  th:with="lastStatus=${@dict.getType('adjustType')}">
											<option value="">所有</option>
											<option th:each="e : ${lastStatus}" th:text="${e['dictLabel']}"
													th:value="${e['dictValue']}"></option>
										</select>
										</li>-->
										<li class="time">
											<label>创建时间: </label>
											<input type="text" class="time-input" id="startTime" placeholder="开始时间"
												   name="params[createdBegin]"/>
											<span>-</span>
											<input type="text" class="time-input" id="endTime" placeholder="结束时间"
												   name="params[createdEnd]"/>
										</li>
										<li>
											货主编码:<input type="text" name="companyCode"/>
										</li>
										<li>
											创建人:<input type="text" name="createdBy"/>
										</li>
										<li>
											更新人:<input type="text" name="lastUpdatedBy"/>
										</li>
										<li>
											<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
													class="fa fa-search"></i>&nbsp;搜索</a>
										</li>
									</ul>
								</div>
							</form>
						</div>
						<table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table>
					</div>
					<div class="tab-pane fade" id="tabDetail"></div>
				</div>
			</div>

		</div>
    </div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var prefix = ctx + "inventory/inventoryHeader";
		//var upload = [[${@permission.hasPermi('inventoryHeader:cyclecountAdjust:upload')}]];
        var report =[[${@permission.hasPermi('inventoryHeader:cyclecountAdjust:report')}]];
        var datas = [[${@dict.getType('sys_normal_disable')}]];
		var status2 = [[${@dict.getType('adjustType')}]];

        $(function() {
            var options = {
                url: prefix + "/inventoryLook",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                modalName: "库存头",
                sortName: "id",
                sortOrder: "desc",
                search: false,
                // onDblClickRow: function (row) {
                //     showDetail(row.id,row.code);
                // },
                columns: [
                    {
		                checkbox: true
                    },
                    {
                        field : 'id',
                        title : '库存头ID',
                        sortable:true
                    },
                    {
                        field : 'warehouseCode',
                        title : '仓库 ',
                        visible: false
                    },
                    {
                        field : 'companyCode',
                        title : ' 货主',
                        visible: false
                    },
                    {
                        field : 'locationCode',
                        title : '库位 '
                    },
                    {
                        field : 'containerCode',
                        title : ' 容器'
                    },
                    {
                        field : 'containerStatus',
                        title : ' 容器状态'
                    },
                    {
                        field : 'totalWeight',
                        title : ' 总重量'
                    },
                    {
                        field : 'materialSkuQty',
                        title : ' 商品种类的数量'
                    },
                    {
                        field : 'totalQty',
                        title : ' 总数量'
                    },
                    {
                        field : 'totalLines',
                        title : '总行量 '
                    },
                    {
                        field : 'projectNos',
                        title : ' 项目号列表'
                    },
                    {
                        field : 'batchs',
                        title : ' 批次列表'
                    },
                    {
                        field : 'lots',
                        title : ' 批号列表'
                    },
                    {
                        field : 'lastCycleCountDate',
                        title : ' 上次盘点日期'
                    },
                    {
                        field : 'lock',
                        title : ' 锁定'
                    },
                    {
                        field : 'lockRemark',
                        title : ' 锁定备注'
                    },
                    {
                        field : 'created',
                        title : ' 创建时间'
                    },
                    {
                        field : 'createdBy',
                        title : ' 创建用户'
                    },
                    {
                        field : 'lastUpdated',
                        title : ' 更新时间'
                    },
                    {
                        field : 'lastUpdatedBy',
                        title : ' 更新用户'
                    },
                    {
                        field : 'version',
                        title : ' 数据版本'
                    },
                    {
                        field : 'userDef1',
                        title : ' 自定义字段1'
                    },
                    {
                        field : 'userDef2',
                        title : ' 自定义字段2'
                    },

                    {
                        field: 'enable',
                        title: '状态',
                        align: 'center',
                        formatter: function (value, row, index) {
                            return $.table.selectDictLabel(datas, value);
                        }
                    },
		        ]
            };
            $.table.init(options);

        });

        function detail(id) {
            let url= ctx + "shipment/shipmentHeader";  //网页地址
            if (id){
                url = ctx +"inventory/inventoryDetail?id="+id;
            }
            $("#tabDetail").children().remove();
            $("#myTab li").removeClass("active");
            var height = $(document).height()-100 + 'px';
            var str = '<iframe class="huaheng_iframe" name="iframe" width="100%" height="' + height + '" src="' + url + '" frameborder="0" data-id="' + url + '" seamless></iframe>';
            $("#tabDetail").empty();
            $("#tabDetail").append(str);
            $(".tab-pane").removeClass("in active");
            $("#myTab li:eq(1)").addClass("active");
            $("#tabDetail").addClass("in active");
        }

        function cyclecountPrint(id) {
            var url = prefix + "/report/" + id;
            $.modal.open("差异单打印" , url);
        }

        $("#myTab li:eq(1)").click(function () {
            detail();
        });

        // function upLoad(code,sourceCode) {
        //     $.ajax({
        //         url:ctx+'/api/icsCyclecount/cycleCountDiff',
        //         type:'post',
        //         data:{
        //             code:code,
        //             sourceCode:sourceCode
        //         },
        //         success:function (res) {
        //             if (res.code === 200) {
        //                 $.modal.msgSuccess();
        //             }
        //             else {
        //                 $.modal.msgError(res.msg);
        //             }
        //         }
        //     })
        // }
    </script>
</body>
</html>