|
@@ -0,0 +1,338 @@
|
|
|
+<%@ page contentType="text/html;charset=UTF-8" %>
|
|
|
+ <script>
|
|
|
+ $(document).ready(function() {
|
|
|
+ var item = "";
|
|
|
+ //bootstrapTable加载数据
|
|
|
+ $('#informationTable').bootstrapTable({
|
|
|
+ //请求方法
|
|
|
+ method: 'post',
|
|
|
+ //类型json
|
|
|
+ dataType: "json",
|
|
|
+ contentType: "application/x-www-form-urlencoded",
|
|
|
+ //显示检索按钮
|
|
|
+ showSearch: false,
|
|
|
+ //显示刷新按钮
|
|
|
+ showRefresh: false,
|
|
|
+ //显示切换手机试图按钮
|
|
|
+ showToggle: false,
|
|
|
+ //显示 内容列下拉框
|
|
|
+ showColumns: false,
|
|
|
+ //显示到处按钮
|
|
|
+ showExport: false,
|
|
|
+ //显示切换分页按钮
|
|
|
+ showPaginationSwitch: false,
|
|
|
+ //最低显示2行
|
|
|
+ minimumCountColumns: 2,
|
|
|
+ //是否显示行间隔色
|
|
|
+ striped: true,
|
|
|
+ //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
|
|
|
+ cache: false,
|
|
|
+ //是否显示分页(*)
|
|
|
+ pagination: false,
|
|
|
+ //排序方式
|
|
|
+ sortOrder: "asc",
|
|
|
+ //初始化加载第一页,默认第一页
|
|
|
+ pageNumber:1,
|
|
|
+ //每页的记录行数(*)
|
|
|
+ pageSize: 10,
|
|
|
+ //可供选择的每页的行数(*)
|
|
|
+ pageList: [10, 25, 50, 100],
|
|
|
+ //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
|
|
|
+ url: "${ctx}/picking/showlist/data",
|
|
|
+ //默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
|
|
|
+ ////查询参数,每次调用是会带上这个参数,可自定义
|
|
|
+ queryParams : function(params) {
|
|
|
+ var searchParam = $("#searchForm").serializeJSON();
|
|
|
+ searchParam.pageNo = params.limit === undefined? "1" :params.offset/params.limit+1;
|
|
|
+ searchParam.pageSize = params.limit === undefined? -1 : params.limit;
|
|
|
+ searchParam.orderBy = params.sort === undefined? "" : params.sort+ " "+ params.order;
|
|
|
+ return searchParam;
|
|
|
+ },
|
|
|
+ //分页方式:client客户端分页,server服务端分页(*)
|
|
|
+ sidePagination: "server",
|
|
|
+ contextMenuTrigger:"right",//pc端 按右键弹出菜单
|
|
|
+ contextMenuTriggerMobile:"press",//手机端 弹出菜单,click:单击, press:长按。
|
|
|
+ contextMenu: '#context-menu',
|
|
|
+ onClickRow: function(row, $el){
|
|
|
+ },
|
|
|
+ onShowSearch: function () {
|
|
|
+ $("#search-collapse").slideToggle();
|
|
|
+ },
|
|
|
+ formatNoMatches:function(){
|
|
|
+ return "你的自定义文字说明";
|
|
|
+ },
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ field: 'materialCode',
|
|
|
+ title: '物料编码',
|
|
|
+ },{
|
|
|
+ field: 'materialDescription',
|
|
|
+ title: '物料名称',
|
|
|
+ },{
|
|
|
+ field: 'extensionDescription',
|
|
|
+ title: '扩展描述',
|
|
|
+ },{
|
|
|
+ field: 'mdUnits',
|
|
|
+ title: '单位',
|
|
|
+ },{
|
|
|
+ field: 'mdTotalAmount',
|
|
|
+ title: '总量',
|
|
|
+ },{
|
|
|
+ field: 'mdSingleWeight',
|
|
|
+ title: '单重/kg',
|
|
|
+ },{
|
|
|
+ field: 'mdTotalWeight',
|
|
|
+ title: '总重/吨',
|
|
|
+ },{
|
|
|
+ field: 'mdTheParty',
|
|
|
+ title: '甲乙供',
|
|
|
+ },{
|
|
|
+ field: 'mdText',
|
|
|
+ title: '备注',
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#informationTable2').bootstrapTable({
|
|
|
+ //请求方法
|
|
|
+ method: 'post',
|
|
|
+ //类型json
|
|
|
+ dataType: "json",
|
|
|
+ contentType: "application/x-www-form-urlencoded",
|
|
|
+ //显示检索按钮
|
|
|
+ showSearch: false,
|
|
|
+ //显示刷新按钮
|
|
|
+ showRefresh: false,
|
|
|
+ //显示切换手机试图按钮
|
|
|
+ showToggle: false,
|
|
|
+ //显示 内容列下拉框
|
|
|
+ showColumns: false,
|
|
|
+ //显示到处按钮
|
|
|
+ showExport: false,
|
|
|
+ //显示切换分页按钮
|
|
|
+ showPaginationSwitch: false,
|
|
|
+ //最低显示2行
|
|
|
+ minimumCountColumns: 2,
|
|
|
+ //是否显示行间隔色
|
|
|
+ striped: true,
|
|
|
+ //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
|
|
|
+ cache: false,
|
|
|
+ //是否显示分页(*)
|
|
|
+ pagination: false,
|
|
|
+ //排序方式
|
|
|
+ sortOrder: "asc",
|
|
|
+ //初始化加载第一页,默认第一页
|
|
|
+ pageNumber:1,
|
|
|
+ //每页的记录行数(*)
|
|
|
+ pageSize: 10,
|
|
|
+ //可供选择的每页的行数(*)
|
|
|
+ pageList: [10, 25, 50, 100],
|
|
|
+ //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
|
|
|
+ url: "${ctx}/picking/showlist/mkData",
|
|
|
+ //默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
|
|
|
+ ////查询参数,每次调用是会带上这个参数,可自定义
|
|
|
+ queryParams : function(params) {
|
|
|
+ var searchParam = $("#searchForm").serializeJSON();
|
|
|
+ searchParam.pageNo = params.limit === undefined? "1" :params.offset/params.limit+1;
|
|
|
+ searchParam.pageSize = params.limit === undefined? -1 : params.limit;
|
|
|
+ searchParam.orderBy = params.sort === undefined? "" : params.sort+ " "+ params.order;
|
|
|
+ return searchParam;
|
|
|
+ },
|
|
|
+ //分页方式:client客户端分页,server服务端分页(*)
|
|
|
+ sidePagination: "server",
|
|
|
+ contextMenuTrigger:"right",//pc端 按右键弹出菜单
|
|
|
+ contextMenuTriggerMobile:"press",//手机端 弹出菜单,click:单击, press:长按。
|
|
|
+ contextMenu: '#context-menu',
|
|
|
+ onClickRow: function(row, $el){
|
|
|
+ },
|
|
|
+ onShowSearch: function () {
|
|
|
+ $("#search-collapse").slideToggle();
|
|
|
+ },
|
|
|
+ formatNoMatches:function(){
|
|
|
+ return "你的自定义文字说明";
|
|
|
+ },
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ field: 'mdBigClass',
|
|
|
+ title: '模块大类',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'mdTheClass',
|
|
|
+ title: '模块中类',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'mdName',
|
|
|
+ title: '模块名称',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'materialCode',
|
|
|
+ title: '物料编码',
|
|
|
+ },{
|
|
|
+ field: 'materialDescription',
|
|
|
+ title: '物料名称',
|
|
|
+ },{
|
|
|
+ field: 'extensionDescription',
|
|
|
+ title: '扩展描述',
|
|
|
+ },{
|
|
|
+ field: 'mdUnits',
|
|
|
+ title: '单位',
|
|
|
+ },{
|
|
|
+ field: 'mdTotalAmount',
|
|
|
+ title: '总量',
|
|
|
+ },{
|
|
|
+ field: 'mdSingleWeight',
|
|
|
+ title: '单重/kg',
|
|
|
+ },{
|
|
|
+ field: 'mdTotalWeight',
|
|
|
+ title: '总重/吨',
|
|
|
+ },{
|
|
|
+ field: 'mdTheParty',
|
|
|
+ title: '甲乙供',
|
|
|
+ },{
|
|
|
+ field: 'mdText',
|
|
|
+ title: '备注',
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
|
|
|
+ $('#informationTable').bootstrapTable("toggleView");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ function getTime(value, row, index) {
|
|
|
+ return [
|
|
|
+ "<input id="+row.id+" type='number' name='changeAmount' class='form-control required deal' value="+row.mdTotalAmount+">",
|
|
|
+ ].join('');
|
|
|
+ }
|
|
|
+
|
|
|
+ // 绑定查询按扭
|
|
|
+ $("#search").click("click", function() {
|
|
|
+ $('#informationTable').bootstrapTable('refresh');
|
|
|
+ });
|
|
|
+ $("#click1").click("click", function() {
|
|
|
+ // alert("1");
|
|
|
+ $("#click2").attr("style","");
|
|
|
+ $("#click1").attr("style","border-bottom: 0px;border-left: 1px solid rgb(221,221,221);border-right: 1px solid rgb(221,221,221);border-top: 1px solid rgb(221,221,221)");
|
|
|
+ });
|
|
|
+ $("#click2").click("click",function () {
|
|
|
+ $("#click1").attr("style","");
|
|
|
+ $("#click2").attr("style","border-bottom: 0px;border-left: 1px solid rgb(221,221,221);border-right: 1px solid rgb(221,221,221);border-top: 1px solid rgb(221,221,221)");
|
|
|
+ });
|
|
|
+ // 绑定查询重置按扭
|
|
|
+ $("#reset").click("click", function() {
|
|
|
+ $("#searchForm input").val("");
|
|
|
+ $("#searchForm select").val("");
|
|
|
+ $('#informationTable').bootstrapTable('refresh');
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#dq").click("click", function () {
|
|
|
+ $("#div1").attr("style", "display:block;");
|
|
|
+ $("#div2").attr("style", "display:none;");
|
|
|
+ $("#div3").attr("style", "display:none;");
|
|
|
+ });
|
|
|
+ $("#qd").click("click", function () {
|
|
|
+ $("#div1").attr("style", "display:none;");
|
|
|
+ $("#div2").attr("style", "display:block;");
|
|
|
+ $("#div3").attr("style", "display:none;");
|
|
|
+ var item = "";
|
|
|
+ $('input[name="need"]').each(function(){
|
|
|
+ var val = $(this).val();
|
|
|
+ if (val!=null&&val!=""&&val>0) {
|
|
|
+ item += $(this).attr("id")+":"+val+";"
|
|
|
+ console.log("item"+item);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ $('#informationTable').bootstrapTable('refresh', {
|
|
|
+ query:
|
|
|
+ {
|
|
|
+ item: item
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ $("#mkqd").click("click", function () {
|
|
|
+ $("#div1").attr("style", "display:none;");
|
|
|
+ $("#div2").attr("style", "display:none;");
|
|
|
+ $("#div3").attr("style", "display:block;");
|
|
|
+ var item = "";
|
|
|
+ $('input[name="need"]').each(function(){
|
|
|
+ var val = $(this).val();
|
|
|
+ if (val!=null&&val!=""&&val>0) {
|
|
|
+ item += $(this).attr("id")+":"+val+";"
|
|
|
+ console.log(item+"\t");
|
|
|
+ }
|
|
|
+ })
|
|
|
+ $('#informationTable2').bootstrapTable('refresh', {
|
|
|
+ query:
|
|
|
+ {
|
|
|
+ item: item
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ $("#agree").click(function () {
|
|
|
+ var item = "";
|
|
|
+ $('input[name="need"]').each(function(){
|
|
|
+ var val = $(this).val();
|
|
|
+ if (val!=null&&val!=""&&val>0) {
|
|
|
+ item += $(this).attr("id")+":"+val+";"
|
|
|
+ console.log(item+"\t");
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (item == null || item == "") {
|
|
|
+ jp.error("请填写模块表");
|
|
|
+ } else {
|
|
|
+ jp.prompt("审核通过", function (message) {
|
|
|
+ jp.post("${ctx}/act/task/materialReport",
|
|
|
+ {
|
|
|
+ "taskId": "${showList.act.taskId}",
|
|
|
+ "taskName": "${showList.act.taskName}",
|
|
|
+ "taskDefKey": "${showList.act.taskDefKey}",
|
|
|
+ "procInsId": "${showList.act.procInsId}",
|
|
|
+ "procDefId": "${showList.act.procDefId}",
|
|
|
+ "selectNumber":item,
|
|
|
+ "flag": "yes",
|
|
|
+ "reserveName":$("#reserveName").val(),
|
|
|
+ "comment": window.encodeURI(message)
|
|
|
+ },
|
|
|
+ function (data) {
|
|
|
+ if(data.success){
|
|
|
+ jp.success(data.msg);
|
|
|
+ jp.go("${ctx}/act/task/todo")
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ function getIdSelections() {
|
|
|
+ return $.map($("#informationTable").bootstrapTable('getSelections'), function (row) {
|
|
|
+ return row.id
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //刷新列表
|
|
|
+ function refresh() {
|
|
|
+ $('#informationTable').bootstrapTable('refresh');
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ function addRow(list, idx, tpl, row){
|
|
|
+ $(list).append(Mustache.render(tpl, {
|
|
|
+ idx: idx, delBtn: true, row: row
|
|
|
+ }));
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // $(document).ready(function (){
|
|
|
+ // $("li").each(function(index){
|
|
|
+ // $(this).click(function(){
|
|
|
+ // alert(index)
|
|
|
+ // $("li").removeClass("style");//删除当前元素的样式
|
|
|
+ // $("li").eq(index).attr("style","border-bottom: 0px;border-left: 1px solid rgb(221,221,221);border-right: 1px solid rgb(221,221,221);border-top: 1px solid rgb(221,221,221)");//添加当前元素的样式
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+
|
|
|
+ </script>
|