Commit 6147bc3704d16e22b3abc1c8e1ff4a593804fc99

Authored by tongzhonghao
1 parent 1b2d6de5

修改调整页面样式

解决子frame关闭 父frame不刷新问题
src/main/resources/templates/barcode/barCodeHeader/barCodeHeader.html
... ... @@ -157,14 +157,41 @@
157 157 }
158 158 },
159 159 {
  160 + field: 'no',
  161 + title: '序号',
  162 +
  163 + formatter: function (value, row, index) {
  164 + // 通过表的#id 可以得到每页多少条
  165 + var pageSize = $('#bootstrap-table1').bootstrapTable('getOptions').pageSize;
  166 + // 通过表的#id 可以得到当前第几页
  167 + var pageNumber = $('#bootstrap-table1').bootstrapTable('getOptions').pageNumber;
  168 + // 返回每条的序号: 每页条数 * (当前页 - 1 )+ 序号
  169 + return pageSize * (pageNumber - 1) + index + 1;
  170 + }
  171 + },
  172 + {
160 173 field : 'id',
161 174 title : '入库单id',
162   - sortable:true
  175 + visible:false
163 176 },
164 177 {
165   - field : 'createdBy',
166   - title : '创建用户',
167   - sortable:true
  178 + field: 'companyCode',
  179 + title: '货主',
  180 + align: 'center',
  181 + formatter: function(value, row, index) {
  182 + var actions = [];
  183 + $.each(company, function(index, dict) {
  184 + if (dict.code == value) {
  185 + actions.push("<span class='badge badge-info'>" + dict.name + "</span>");
  186 + return false;
  187 + }
  188 + });
  189 + return actions.join('');
  190 + }
  191 + },
  192 + {
  193 + field : 'fbillno',
  194 + title : '生产订单号',
168 195 },
169 196 // {
170 197 // field : 'referType',
... ... @@ -173,20 +200,26 @@
173 200  
174 201 {
175 202 field : 'barCodeHeaderCode',
176   - title : '主条码',
  203 + title : '格林美-托盘码',
177 204 },
178 205 {
179   - field : 'fbillno',
180   - title : '生产订单单据编码',
  206 + field : 'warehouseCode',
  207 + title : '仓库编码',
  208 + visible:false
181 209 },
182   -
183 210 {
184   - field: 'companyCode',
185   - title: '货主',
  211 + field : 'createdBy',
  212 + title : '创建用户',
  213 + sortable:true
  214 + },
  215 + {
  216 + field : 'receiptType',
  217 + title : '入库类型',
  218 + visible:false,
186 219 align: 'center',
187 220 formatter: function(value, row, index) {
188 221 var actions = [];
189   - $.each(company, function(index, dict) {
  222 + $.each(receiptTypes, function(index, dict) {
190 223 if (dict.code == value) {
191 224 actions.push("<span class='badge badge-info'>" + dict.name + "</span>");
192 225 return false;
... ... @@ -196,29 +229,8 @@
196 229 }
197 230 },
198 231 {
199   - field : 'warehouseCode',
200   - title : '仓库编码',
201   - visible:false
202   - },
203   - {
204   - field : 'receiptType',
205   - title : '入库类型'
206   - // align: 'center',
207   - // formatter: function(value, row, index) {
208   - // var actions = [];
209   - // $.each(receiptTypes, function(index, dict) {
210   - // if (dict.code == value) {
211   - // actions.push("<span class='badge badge-info'>" + dict.name + "</span>");
212   - // return false;
213   - // }
214   - // });
215   - // return actions.join('');
216   - // }
217   - },
218   - {
219 232 field : 'totalQty',
220   - title : '总数量',
221   - visible:false
  233 + title : '总数量'
222 234 },
223 235 {
224 236 field : 'totalLines',
... ... @@ -323,8 +335,33 @@
323 335 checkbox: true
324 336 },
325 337 {
  338 + title: '操作',
  339 + align: 'center',
  340 + events:'operateEvents',
  341 + formatter: function(value, row, index) {
  342 + var actions = [];
  343 + actions.push('<a id="table_edit" class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  344 + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>');
  345 + return actions.join('');
  346 + }
  347 + },
  348 + {
  349 + field: 'no',
  350 + title: '序号',
  351 +
  352 + formatter: function (value, row, index) {
  353 + // 通过表的#id 可以得到每页多少条
  354 + var pageSize = $('#bootstrap-table1').bootstrapTable('getOptions').pageSize;
  355 + // 通过表的#id 可以得到当前第几页
  356 + var pageNumber = $('#bootstrap-table1').bootstrapTable('getOptions').pageNumber;
  357 + // 返回每条的序号: 每页条数 * (当前页 - 1 )+ 序号
  358 + return pageSize * (pageNumber - 1) + index + 1;
  359 + }
  360 + },
  361 + {
326 362 field : 'id',
327   - title : 'id'
  363 + title : 'id',
  364 + visible: false
328 365 },
329 366 {
330 367 field : 'code',
... ... @@ -395,18 +432,8 @@
395 432 field : 'lastUpdatedBy',
396 433 title : '更新用户' ,
397 434 visible:false
398   - },
399   - {
400   - title: '操作',
401   - align: 'center',
402   - events:'operateEvents',
403   - formatter: function(value, row, index) {
404   - var actions = [];
405   - actions.push('<a id="table_edit" class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
406   - actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>');
407   - return actions.join('');
408   - }
409   - }]
  435 + }
  436 + ]
410 437 });
411 438  
412 439 /* 入库单列表-详细 */
... ...
src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
... ... @@ -17,6 +17,21 @@
17 17 .isShow{
18 18 display: none;
19 19 }
  20 + /*table {*/
  21 + /* table-layout: fixed;*/
  22 + /*}*/
  23 + /*table td{*/
  24 + /* width:100%;*/
  25 + /* word-break:keep-all;!* 不换行 *!*/
  26 + /* white-space:nowrap;!* 不换行 *!*/
  27 + /* overflow:hidden;!* 内容超出宽度时隐藏超出部分的内容 *!*/
  28 + /* text-overflow:ellipsis;!* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用*!*/
  29 + /* -o-text-overflow:ellipsis;*/
  30 + /* -icab-text-overflow: ellipsis;*/
  31 + /* -khtml-text-overflow: ellipsis;*/
  32 + /* -moz-text-overflow: ellipsis;*/
  33 + /* -webkit-text-overflow: ellipsis;*/
  34 + /*}*/
20 35 </style>
21 36 <body class="gray-bg">
22 37 <div class="container-div">
... ... @@ -72,7 +87,7 @@
72 87 <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/>
73 88 </li>
74 89 <li>
75   - <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  90 + <a class="btn btn-primary btn-rounded btn-sm" id="cli" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
76 91  
77 92 <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('receiptHeader-form')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
78 93 </li>
... ... @@ -200,13 +215,14 @@
200 215 <i class="fa fa-cart-plus"></i> 收货
201 216 </a>
202 217 </div>
203   - <table id="bootstrap-table1" data-mobile-responsive="true" class="table table-bordered table-hover text-nowrap"></table>
  218 + <table id="bootstrap-table1" data-mobile-responsive="true" class="table table-bordered table-hover text-nowrap "></table>
204 219 </div>
205 220 </div>
206 221 </div>
207 222 </div>
208 223 </div>
209 224 <div th:include="include :: footer"></div>
  225 +<th:block th:include="include :: zclip-js" />
210 226 <script th:inline="javascript">
211 227 var printFlag = [[${@permission.hasPermi('receipt:receiptHeader:report')}]];
212 228 var editFlag = [[${@permission.hasPermi('receipt:receiptHeader:edit')}]];
... ... @@ -256,11 +272,11 @@
256 272 },
257 273 {
258 274 title: '操作',
259   - align: 'center',
  275 + align: 'left',
260 276 formatter: function(value, row, index) {
261 277 var actions = [];
262 278 // actions.push('<a id="table_edit" class="btn btn-success btn-xs ' + printFlag + '" href="#" onclick="receiptPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> ');
263   - if (row.lastStatus >= 200)
  279 +
264 280 actions.push('<a style="background: #b5bdc0" class="btn btn-default btn-xs" onclick="detail(\''+ row.id + '\',\''+ row.code + '\',\''+ row.receiptType + '\',\''+ row.grossWeight + '\',\''+ row.tareWeight + '\',\''+ row.netWeight + '\',\''+ row.materialBatch + '\')"><i class="fa fa-list-ul"></i>列表</a> ');
265 281 if (row.firstStatus < 100)
266 282 actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>编辑</a> ');
... ... @@ -282,7 +298,7 @@
282 298 // actions.push('<a class="btn btn-info btn-xs ' + receiveFlag + '" href="#" onclick="receive(\''+row.id+'\')"><i class="fa fa-upload"></i>成品入库回传erp</a>');
283 299 // }
284 300 if (row.firstStatus == 800 && row.lastStatus == 800) {
285   - actions.push('<a class="btn btn-info btn-xs ' + receiveFlag + '" href="#" onclick="receive(\''+row.id+'\')"><i class="fa fa-upload"></i>回传erp</a>');
  301 + actions.push('<a class="btn btn-warning btn-xs ' + receiveFlag + '" href="#" onclick="receive(\''+row.id+'\')"><i class="fa fa-upload"></i>回传</a>');
286 302 }
287 303 return actions.join('');
288 304 }
... ... @@ -290,7 +306,6 @@
290 306 {
291 307 field: 'no',
292 308 title: '序号',
293   -
294 309 formatter: function (value, row, index) {
295 310 // 通过表的#id 可以得到每页多少条
296 311 var pageSize = $('#bootstrap-table1').bootstrapTable('getOptions').pageSize;
... ... @@ -585,7 +600,7 @@
585 600 },
586 601 {
587 602 field : 'materialSpec',
588   - title : '物料规格'
  603 + title : '物料规格',
589 604 },
590 605 {
591 606 field : 'tareWeight',
... ... @@ -965,22 +980,34 @@
965 980 var url = detailPrefix + "/reportBatteryPackage/" + ids;
966 981 $.modal.open("入库电池包打印" , url);
967 982 }
  983 +
  984 + /**
  985 + * 批量绑定车辆信息
  986 + */
968 987 function bindCar(){
969 988 var rows=$("#bootstrap-table1").bootstrapTable('getSelections');
970 989 if (rows.length == 0) {
971 990 $.modal.alertWarning("请至少选择一条记录");
972 991 return;
973 992 }
974   - $.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
  993 + $.modal.confirm("确认要绑定选中的" + rows.length + "条数据吗?", function() {
975 994 var ids = "";
976 995 for(var i=0; i<rows.length; i++) {
977 996 ids = ids + rows[i].id + ","
978 997 }
979 998 var url = ctx + "vehicle/vehicleReceipt/bindVehicleReceipt/"+ids;
980   - $.modal.open("绑定车辆" , url);
  999 + var winObj = $.modal.open("绑定车辆" , url);
  1000 + // console.log()
  1001 + // var loops = setInterval(function() {
  1002 + // if(winObj.closed) {
  1003 + // clearInterval(loops);
  1004 + // loadDetail();
  1005 + // }
  1006 + // }, 1000);
981 1007 })
982 1008 }
983 1009  
  1010 +
984 1011 /* 收货 */
985 1012 function Toreceiving(code) {
986 1013 let storage=window.localStorage;
... ...
src/main/resources/templates/vehicle/vehicleReceipt/gemVehicleReceipt.html
... ... @@ -222,7 +222,14 @@
222 222 let url = ctx + "receipt/receiptDetail/bindCar";
223 223 let data = { "carId": id,"detailIds":detailIds };
224 224 $.operate.submit(url, "post", "json", data);
225   - setTimeout($.modal.close,3000);
  225 + setTimeout(function () {
  226 + // 因为使用layui弹出 所以需要引用
  227 + var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  228 + //
  229 + parent.loadDetail();
  230 + parent.layer.close(index); //再执行关闭
  231 + }, 1000);
  232 +
226 233 }
227 234  
228 235 </script>
... ...