addShipmentEntry.jsp 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828
  1. <%-- <%@ include file="/include/head.jsp"%> --%>
  2. <%@ page contentType="text/html;charset=GBK"%>
  3. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5. <HEAD>
  6. <TITLE>新增合同</TITLE>
  7. <link href="main.css" rel="stylesheet" type="text/css"></link>
  8. <link href="./liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css"></link>
  9. <script type="text/javascript" src="/shares/js/jquery-1.3.2.min.js"></script>
  10. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  11. <%-- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script> --%>
  12. <script type="text/javascript" src="/shares/js/common.js"></script>
  13. <script type="text/javascript" src="/shares/js/constant.js"></script>
  14. <script type="text/javascript" src="/shares/js/file.js"></script>
  15. <!-- 里程碑 -->
  16. <link href="/shares/xheditor/xheditor-1.1.14/demos/common.css" rel="stylesheet" type="text/css" media="screen" />
  17. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/form.css" rel="stylesheet" type="text/css" />
  18. <link href="/shares/css/yw/tms/task.css" rel="stylesheet" type="text/css" />
  19. <link href="${pageContext.request.contextPath }/main.css" rel="stylesheet" type="text/css" />
  20. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  21. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
  22. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
  23. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
  24. <script type="text/javascript" src="/shares/js/yw/erp/endproduct/eplogistLookupToListDetail.js"></script>
  25. <script type="text/javascript">
  26. var grid = null;
  27. var gr=null;
  28. var is_load=false;
  29. var logist_tache=false;
  30. $(document).ready(function(){
  31. $("input[type='text']:first").focus();
  32. loadLogistDetailList();
  33. var logist_detail_id=$("#logist_detail_id").val();
  34. loadShipmentList(logist_detail_id);
  35. var initTime=$("#shipment\\.shipment_date_string").val();
  36. $("#shipment\\.shipment_date").ligerDateEditor({
  37. labelWidth : 128,
  38. labelAlign : 'right',
  39. showTime : true,
  40. initValue: initTime
  41. });
  42. });
  43. //初始化材料列表
  44. function loadLogistDetailList() {
  45. var universalid=$("#shipment\\.logist_id").val();
  46. var columns = [
  47. {display : '调拨材料',name : 'product_name',width : 350,
  48. render : function(row) {
  49. var load_finish = "";
  50. var product_name = row.product_name == undefined ?'': row.product_name;
  51. var product_stand_model = row.product_stand_model == undefined ?'': row.product_stand_model;
  52. if(row.is_load_finish=='0'){
  53. load_finish="<font style='color:#ff0000'>(出货中)</font>";
  54. }else if(row.is_load_finish=='1'){
  55. load_finish="<font style='color:#0000FF'>(出货完成)</font>";
  56. }
  57. var html = product_name + '&nbsp;'+product_stand_model+load_finish;
  58. return html;
  59. }
  60. },
  61. //{display : '材料名称',name : 'product_name',width : 120},
  62. //{display : '材料规格',name : 'product_stand_model',width : 120},
  63. {display : '调拨数量',name : 'product_number',width : 120,
  64. render : function(row) {
  65. var html = row.product_number + ' 吨';
  66. return html;
  67. }
  68. },
  69. {
  70. display : '发料仓库',
  71. name : 'sdepot_name',
  72. width : 120
  73. },
  74. // {
  75. // display : '出货状态',
  76. // name : 'is_load_finish',
  77. // width : 120,
  78. // render : function(row) {
  79. // var html = "";
  80. // if(row.is_load_finish=='0'){
  81. // html="<font style='color:#ff0000'>未完成</font>";
  82. // }else if(row.is_load_finish=='1'){
  83. // html="<font style='color:#0000FF'>完成</font>";
  84. // }
  85. // return html;
  86. // }
  87. // },
  88. {
  89. display : '出货操作人',
  90. name : 'load_user_name',
  91. width : 120
  92. },
  93. {
  94. display : '出货操作时间',
  95. name : 'load_date',
  96. width : 165
  97. }];
  98. /* if(universalid!=""){ */
  99. grid = $("#logistDetailGrid")
  100. .ligerGrid(
  101. { columns:columns,
  102. url : 'erpEndProdShipmentAction.do?task=getLogistDetailList&universalid='+universalid+'&time=' + new Date().getTime(),
  103. width : "85.8%",
  104. height : 100,
  105. checkbox: true,
  106. isChecked: f_isChecked,
  107. onCheckRow : function(checked, rowdata, rowindex) {
  108. $("#logist_detail_id").val(rowdata.universalid);
  109. $("#product_name").val(rowdata.product_name);
  110. $("#product_stand_model").val(rowdata.product_stand_model);
  111. for ( var rowid in this.records)
  112. this.unselect(rowid);
  113. this.select(rowindex);
  114. if(checked=true){
  115. loadShipmentList(rowdata.universalid);
  116. }
  117. },
  118. pageSize : 15,
  119. pageParmName : 'p',
  120. usePager:false,
  121. pagesizeParmName : 'pSize'
  122. });
  123. /* }else{
  124. grid = $("#logistDetailGrid")
  125. .ligerGrid(
  126. { columns:columns,
  127. data : {
  128. Rows : []
  129. },
  130. checkbox: true,
  131. onCheckRow : function(checked, rowdata, rowindex) {
  132. $("#logist_detail_id").val(rowdata.universalid);
  133. for ( var rowid in this.records)
  134. this.unselect(rowid);
  135. this.select(rowindex);
  136. if(checked=true){
  137. loadShipmentList(rowdata.universalid);
  138. }
  139. },
  140. width : "70.8%",
  141. height : 100,
  142. pageSize : 15,
  143. enabledEdit: true,
  144. clickToEdit: false,
  145. rownumbers:false,
  146. pageParmName : 'p',
  147. usePager:false,
  148. pagesizeParmName : 'pSize'
  149. });
  150. } */
  151. $("#pageloading").hide();
  152. $(".l-grid-hd-cell-btn-checkbox").css("display", "none"); //隱藏checkAll
  153. }
  154. function f_isChecked(rowdata){
  155. if (rowdata.__id == 'r1001'){
  156. $("#logist_detail_id").val(rowdata.universalid);
  157. $("#product_name").val(rowdata.product_name);
  158. $("#product_stand_model").val(rowdata.product_stand_model);
  159. loadShipmentList(rowdata.universalid);
  160. return true;
  161. }
  162. return false;
  163. }
  164. //初始化出货列表
  165. function loadShipmentList(universalid){
  166. var columns = [
  167. {
  168. display : '操作',
  169. name : '',
  170. width : 80,
  171. render : function(row) {
  172. var html = '<a href=\"#\" onclick=\"delShipmentEntry('
  173. + row.universalid
  174. + ')\">删除</a>&nbsp;';
  175. return html;
  176. }
  177. },
  178. {
  179. display : '类型',
  180. name : 'product_type',
  181. width : 80,
  182. render : function(row) {
  183. var html = "";
  184. if(row.product_type=='1'){
  185. html='装货';
  186. }else if(row.product_type=='2'){
  187. html='退包';
  188. }else if(row.product_type=='3'){
  189. html='增包';
  190. }
  191. return html;
  192. }
  193. },
  194. {
  195. display : '材料名称',
  196. name : 'product_name',
  197. width : 120
  198. },
  199. {
  200. display : '材料规格',
  201. name : 'product_stand_model',
  202. width : 120
  203. },
  204. {
  205. display : '数量',
  206. name : 'product_count',
  207. width : 120,
  208. render : function(row) {
  209. var html = "";
  210. html+=row.product_count+" 包";
  211. return html;
  212. }
  213. },
  214. {
  215. display : '点包器编号',
  216. name : 'ctmach_num',
  217. width : 100
  218. },
  219. {
  220. display : '点包时间',
  221. name : 'ctmach_date',
  222. width : 150
  223. },
  224. {
  225. display : '操作人',
  226. name : 'create_user_name',
  227. width : 150
  228. },
  229. {
  230. display : '操作时间',
  231. name : 'create_date',
  232. width : 150
  233. }];
  234. gr = $("#shipmentGrid")
  235. .ligerGrid(
  236. { columns:columns,
  237. url : 'erpEndProdShipmentAction.do?task=shipmentDetailList&universalid='+universalid+'&time=' + new Date().getTime(),
  238. width : "99.8%",
  239. height : "99.8%",
  240. /* checkbox: true,
  241. onCheckRow : function(checked, rowdata, rowindex) {
  242. for ( var rowid in this.records){
  243. this.unselect(rowid);
  244. }
  245. this.select(rowindex);
  246. if(checked=true){
  247. loadShipmentList(rowdata.universalid);
  248. }
  249. }, */
  250. pageSize : 15,
  251. enabledEdit: true,
  252. clickToEdit: false,
  253. rownumbers:false,
  254. pageParmName : 'p',
  255. usePager:false,
  256. pagesizeParmName : 'pSize'
  257. });
  258. $("#pageloading").hide();
  259. $(".l-grid-hd-cell-btn-checkbox").css("display", "none"); //隱藏checkAll
  260. statisShipment();
  261. }
  262. //添加出货
  263. function addShipmentEntry(){
  264. var rows = grid.getCheckedRows();
  265. if(rows.length==0){
  266. $.ligerDialog.warn('请选择材料!');
  267. return;
  268. }
  269. if(rows.length>1){
  270. $.ligerDialog.warn('只能选择一个材料!');
  271. return;
  272. }
  273. var logist_detail_id=$("#logist_detail_id").val();
  274. var spdata={"logist_detail_id":logist_detail_id};
  275. //验证物流情况
  276. $.ajax({
  277. type:"POST",
  278. url:"erpEndProdShipmentAction.do?task=verifyLogist",
  279. data : spdata,
  280. timeout:10000,
  281. dataType:"json",
  282. success:function(data){
  283. if(data.tache!='2'){
  284. logist_tache=false;
  285. }else{
  286. logist_tache=true;
  287. if(data.is_load_finish=='1'){
  288. is_load=true;
  289. }else{
  290. is_load=false;
  291. }
  292. }
  293. },
  294. complete:function(){
  295. if(logist_tache){
  296. if(is_load){
  297. $.ligerDialog.error('该材料已经装货完成!');
  298. return;
  299. }
  300. }else{
  301. $.ligerDialog.error('该物流指令已经进入二次过磅环节!');
  302. return;
  303. }
  304. logist_detail_id=rows[0].universalid;
  305. $("#logist_detail_id").val(logist_detail_id);
  306. var obj = window.top;
  307. if (obj != undefined && obj != null) {
  308. obj.$.ligerDialog.open({
  309. title : '点包器计数选择',
  310. width : 700,
  311. height : 370,
  312. url : 'erpEndProdShipmentAction.do?task=toSelectShipment&logist_detail_id='+logist_detail_id,
  313. buttons : [
  314. // {
  315. // text : '刷新',
  316. // onclick : f_refreshShipmentOk
  317. // },
  318. {
  319. text : '确定',
  320. onclick : f_selectShipmentOk
  321. },{
  322. text : '取消',
  323. onclick : selectShipmentCancel
  324. } ]
  325. });
  326. }
  327. }
  328. });
  329. }
  330. function f_refreshShipmentOk(item, dialog){
  331. dialog.frame.f_refresh();
  332. return;
  333. }
  334. function f_selectShipmentOk(item, dialog){
  335. var logist_detail_id=$("#logist_detail_id").val();
  336. var rough=$("#rough").val();
  337. var suttle=$("#suttle").val();
  338. var rows = dialog.frame.f_select();
  339. var counter_nos="";
  340. var counter_vals="";
  341. var counter_times="";
  342. var counter_ids="";
  343. for(var i=0;i<rows.length;i++){
  344. if(i>0){
  345. counter_nos+=",";
  346. counter_vals+=",";
  347. counter_times+=",";
  348. counter_ids+=",";
  349. }
  350. counter_nos+=rows[i].counter_no;
  351. counter_vals+=rows[i].counter_val;
  352. counter_times+=rows[i].counter_time;
  353. counter_ids+=rows[i].universalid;
  354. }
  355. var spdata={"counter_nos":counter_nos,"counter_vals":counter_vals,"counter_times":counter_times,
  356. "logist_detail_id":logist_detail_id,"rough":rough,"suttle":suttle,"counter_ids":counter_ids};
  357. $.ajax({
  358. type:"POST",
  359. url:"erpEndProdShipmentAction.do?task=addShipment",
  360. data : spdata,
  361. timeout:10000,
  362. dataType:"json",
  363. success:function(data){
  364. },
  365. complete:function(){
  366. loadShipmentList(logist_detail_id);
  367. }
  368. });
  369. dialog.close();
  370. }
  371. function selectShipmentCancel(item, dialog){
  372. dialog.close();
  373. }
  374. function delShipmentEntry(universalid){
  375. var logist_detail_id=$("#logist_detail_id").val();
  376. var spdata={"universalid":universalid};
  377. if (window.confirm("确定要删除吗?")){
  378. $.ajax({
  379. type:"POST",
  380. url:"erpEndProdShipmentAction.do?task=delShipmentEntry",
  381. data : spdata,
  382. timeout:10000,
  383. dataType:"json",
  384. success:function(data){
  385. if(data.error!=null){
  386. $.ligerDialog.error(data.error);
  387. }
  388. if(data.success!=null){
  389. $.ligerDialog.success(data.success);
  390. }
  391. },
  392. complete:function(){
  393. loadShipmentList(logist_detail_id);
  394. }
  395. });
  396. }
  397. }
  398. //出货完成
  399. function finishShipment(){
  400. var rows = grid.getCheckedRows();
  401. if(rows.length==0){
  402. $.ligerDialog.warn('请选择材料!');
  403. return;
  404. }
  405. if(rows.length>1){
  406. $.ligerDialog.warn('只能选择一个材料!');
  407. return;
  408. }
  409. var product_name=$("#product_name").val();
  410. var product_stand_model=$("#product_stand_model").val();
  411. var logist_detail_id=$("#logist_detail_id").val();
  412. var spdata={"logist_detail_id":logist_detail_id};
  413. $.ajax({
  414. type:"POST",
  415. url:"erpEndProdShipmentAction.do?task=verifyLogist",
  416. data : spdata,
  417. timeout:10000,
  418. dataType:"json",
  419. success:function(data){
  420. if(data.tache!='2'){
  421. logist_tache=false;
  422. }else{
  423. logist_tache=true;
  424. if(data.is_load_finish=='1'){
  425. is_load=true;
  426. }else{
  427. is_load=false;
  428. }
  429. }
  430. },
  431. complete:function(){
  432. if(logist_tache){
  433. if(is_load){
  434. $.ligerDialog.error('该材料已经装货完成!');
  435. return;
  436. }
  437. }else{
  438. $.ligerDialog.error('该物流指令已经进入二次过磅环节!');
  439. return;
  440. }
  441. if (window.confirm("是否该材料("+product_name+" "+product_stand_model+") 已出货完成?")){
  442. var logist_id=$("#shipment\\.logist_id").val();
  443. var sdata={"logist_id":logist_id,"logist_detail_id":logist_detail_id};
  444. $.ajax({
  445. type:"POST",
  446. url:"erpEndProdShipmentAction.do?task=finishShipment",
  447. data : sdata,
  448. timeout:10000,
  449. dataType:"json",
  450. success:function(data){
  451. if(data.error!=null){
  452. $.ligerDialog.error(data.error);
  453. }
  454. if(data.success!=null){
  455. $.ligerDialog.success(data.success);
  456. }
  457. },
  458. complete:function(){
  459. loadShipmentList(logist_detail_id);
  460. grid = $("#logistDetailGrid").ligerGetGridManager();
  461. grid.loadData();
  462. }
  463. });
  464. }
  465. }
  466. });
  467. }
  468. //退包
  469. function reduceShipment(){
  470. var rows = grid.getCheckedRows();
  471. if(rows.length==0){
  472. $.ligerDialog.warn('请选择材料!');
  473. return;
  474. }
  475. if(rows.length>1){
  476. $.ligerDialog.warn('只能选择一个材料!');
  477. return;
  478. }
  479. var rough=$("#rough").val();
  480. var suttle=$("#suttle").val();
  481. var logist_detail_id=$("#logist_detail_id").val();
  482. var spdata={"logist_detail_id":logist_detail_id};
  483. $.ajax({
  484. type:"POST",
  485. url:"erpEndProdShipmentAction.do?task=verifyLogist",
  486. data : spdata,
  487. timeout:10000,
  488. dataType:"json",
  489. success:function(data){
  490. if(data.tache!='2'){
  491. logist_tache=false;
  492. }else{
  493. logist_tache=true;
  494. if(data.is_load_finish=='1'){
  495. is_load=true;
  496. }else{
  497. is_load=false;
  498. }
  499. }
  500. },
  501. complete:function(){
  502. if(logist_tache){
  503. if(is_load){
  504. $.ligerDialog.error('该材料已经装货完成!');
  505. return;
  506. }
  507. }else{
  508. $.ligerDialog.error('该物流指令已经进入二次过磅环节!');
  509. return;
  510. }
  511. var obj = window.top;
  512. if (obj != undefined && obj != null) {
  513. obj.$.ligerDialog.open({
  514. title : '退包',
  515. width : 500,
  516. height : 270,
  517. url : 'erpEndProdShipmentAction.do?task=toReduceShipment&logist_detail_id='+logist_detail_id+'&rough='+rough+'&suttle='+suttle,
  518. buttons : [ {
  519. text : '确定',
  520. onclick : f_reduceShipmentOk
  521. },{
  522. text : '取消',
  523. onclick : selectShipmentCancel
  524. } ]
  525. });
  526. }
  527. }
  528. });
  529. }
  530. //增包
  531. function increaseShipment(){
  532. var rows = grid.getCheckedRows();
  533. if(rows.length==0){
  534. $.ligerDialog.warn('请选择材料!');
  535. return;
  536. }
  537. if(rows.length>1){
  538. $.ligerDialog.warn('只能选择一个材料!');
  539. return;
  540. }
  541. var rough=$("#rough").val();
  542. var suttle=$("#suttle").val();
  543. var logist_detail_id=$("#logist_detail_id").val();
  544. var spdata={"logist_detail_id":logist_detail_id};
  545. $.ajax({
  546. type:"POST",
  547. url:"erpEndProdShipmentAction.do?task=verifyLogist",
  548. data : spdata,
  549. timeout:10000,
  550. dataType:"json",
  551. success:function(data){
  552. if(data.tache!='2'){
  553. logist_tache=false;
  554. }else{
  555. logist_tache=true;
  556. if(data.is_load_finish=='1'){
  557. is_load=true;
  558. }else{
  559. is_load=false;
  560. }
  561. }
  562. },
  563. complete:function(){
  564. if(logist_tache){
  565. if(is_load){
  566. $.ligerDialog.error('该材料已经装货完成!');
  567. return;
  568. }
  569. }else{
  570. $.ligerDialog.error('该物流指令已经进入二次过磅环节!');
  571. return;
  572. }
  573. var obj = window.top;
  574. if (obj != undefined && obj != null) {
  575. obj.$.ligerDialog.open({
  576. title : '增包',
  577. width : 500,
  578. height : 270,
  579. url : 'erpEndProdShipmentAction.do?task=toIncreaseShipment&logist_detail_id='+logist_detail_id+'&rough='+rough+'&suttle='+suttle,
  580. buttons : [ {
  581. text : '确定',
  582. onclick : f_reduceShipmentOk
  583. },{
  584. text : '取消',
  585. onclick : selectShipmentCancel
  586. } ]
  587. });
  588. }
  589. }
  590. });
  591. }
  592. function f_reduceShipmentOk(item, dialog){
  593. var rs=dialog.frame.addReduceEntry();
  594. if(rs!=0){
  595. var logist_detail_id=$("#logist_detail_id").val();
  596. setTimeout("loadShipmentList("+logist_detail_id+")",200);
  597. //loadShipmentList(logist_detail_id);
  598. dialog.close();
  599. }else{
  600. return;
  601. }
  602. }
  603. //统计
  604. function statisShipment(){
  605. var logist_detail_id=$("#logist_detail_id").val();
  606. if(logist_detail_id!=''){
  607. var spdata={"logist_detail_id":logist_detail_id};
  608. $.ajax({
  609. type:"POST",
  610. url:"erpEndProdShipmentAction.do?task=statisShipment",
  611. data : spdata,
  612. timeout:10000,
  613. dataType:"json",
  614. success:function(data){
  615. var suttle = $("#suttle").val();//净重(公斤/包)
  616. //$("#rough_sum").html(data.rough_sum);
  617. var product_number = grid.getCheckedRows()[0].product_number;//调拨吨数
  618. $("#product_number").html(product_number);
  619. var product_number_suttle = ((product_number * 1000)/suttle).toFixed(0);//调拨包数
  620. $("#product_number_suttle").html(product_number_suttle);
  621. var suttle_sum = (data.suttle_sum/1000).toFixed(4)*100/100;//已装货吨数
  622. $("#suttle_sum").html(suttle_sum);
  623. $("#product_count").html(data.product_count);//已装货多少包
  624. var deal_suttle_sum = (product_number - suttle_sum).toFixed(4)*100/100;//待装货吨数
  625. $("#deal_suttle_sum").html(deal_suttle_sum);
  626. var deal_count = ((deal_suttle_sum * 1000)/suttle).toFixed(0);//待装货包数
  627. $("#deal_count").html(deal_count);
  628. },
  629. });
  630. }
  631. }
  632. //修改毛/净重设置
  633. function updateWeighSet(){
  634. var obj = window.top;
  635. if (obj != undefined && obj != null) {
  636. obj.$.ligerDialog.open({
  637. title : '修改设置',
  638. width : 500,
  639. height : 270,
  640. url : 'erpEndProdShipmentAction.do?task=toUpdateWeighSet',
  641. buttons : [ {
  642. text : '确定',
  643. onclick : f_updateWeighSetOk
  644. },{
  645. text : '取消',
  646. onclick : selectShipmentCancel
  647. } ]
  648. });
  649. }
  650. }
  651. function f_updateWeighSetOk(item, dialog){
  652. var rs=dialog.frame.updateWeighSet();
  653. if(rs!=0){
  654. var result=rs.split(",");
  655. var rough=result[0];
  656. var suttle=result[1];
  657. $("#rough").val(rough);
  658. $("#suttle").val(suttle);
  659. var rough_show="毛重:"+rough+"公斤/包";
  660. var suttle_show="净重:"+suttle+"公斤/包";
  661. $("#rough_show").html(rough_show);
  662. $("#suttle_show").html(suttle_show);
  663. statisShipment();//重新统计
  664. dialog.close();
  665. }else{
  666. return;
  667. }
  668. }
  669. </script>
  670. <style type="text/css">
  671. body {
  672. padding: 5px;
  673. margin: 0;
  674. }
  675. #layout1 {
  676. width: 100%;
  677. margin: 0;
  678. padding: 0;
  679. }
  680. .l-button {
  681. margin-left: 1px;
  682. }
  683. #deptBtn {
  684. width: 100%;
  685. background: #e5ecf9;
  686. text-align: center;
  687. height: 25px;
  688. padding-top: 3px
  689. }
  690. #leftBtn{
  691. width: 100%;
  692. background: #e5ecf9;
  693. height: 25px;
  694. padding-top: 3px
  695. }
  696. .l-layout-left {
  697. overflow-y: auto;
  698. }
  699. #displayMoneyDiv{
  700. font-family: "楷体_GB2312";
  701. /* "宋体",, "黑体",Arial,Helvetica, sans-serif */
  702. /* color:#000000; */
  703. color:red;
  704. font-size: 13px;
  705. }
  706. </style>
  707. </HEAD>
  708. <BODY>
  709. <%@ include file="/include/button.jsp"%>
  710. <%@ include file="/include/message.jsp"%>
  711. <div id="title" class="form-button">
  712. <input type="button" value="关闭" class="l-button" onclick="closeWindow();"/>
  713. </div>
  714. <div class="container-layout" >
  715. <form id="addShipmentEntryForm" name="addShipmentEntryForm" method="post" action="erpEndProdShipmentAction.do?task=addShipmentEntry">
  716. <div class="forum-container">
  717. <input type="hidden" id="logist_detail_id" name="logist_detail_id" value=""/>
  718. <input type="hidden" id="product_name" name="product_name" value=""/>
  719. <input type="hidden" id="product_stand_model" name="product_stand_model" value=""/>
  720. <%-- <input type="hidden" id="shipment.shipment_date_string" name="shipment.shipment_date_string" value="${shipment.shipment_date_string }"/> --%>
  721. <input id="tabid" name="tabid" value="${param.tabid }" type="hidden"/>
  722. <table border="0" cellspacing="1" cellpadding="0" class="l-table-edit line">
  723. <tr>
  724. <th colspan="4">物流指令信息</th>
  725. </tr>
  726. <tr>
  727. <td class="l-table-edit-text" style="width:15%;">物流指令<FONT COLOR="red">*</FONT>:</td>
  728. <td class="l-table-edit-td" style="width:35%;">
  729. <input type="hidden" id="shipment.logist_id" name="shipment.logist_id" value="${shipment.logist_id }" />
  730. <input id="shipment.logist_num" name="shipment.logist_num" type='text' value="${shipment.logist_num }" style="border: 0px;"/>
  731. <c:if test="${requestScope.toView == null || requestScope.toView == '' }">
  732. <input type="button" id="chooseLogistBtn" value="请选择" class="l-button"
  733. onclick="chooseLogist({universalid:'shipment\\.logist_id',logist_num:'shipment\\.logist_num',driver_name:'shipment\\.driver_name',car_number:'shipment\\.car_number',tran_num:'shipment\\.tran_num',tache:'2'})"/>
  734. </c:if>
  735. </td>
  736. <td class="l-table-edit-text" style="width:15%;">司机姓名:</td>
  737. <td class="l-table-edit-td" style="width:35%;">
  738. <input id="shipment.driver_name" name="shipment.driver_name" type='text' value="${shipment.driver_name }" readonly="readonly" style="border: 0px;"/>
  739. </td>
  740. </tr>
  741. <tr>
  742. <td class="l-table-edit-text">车牌号:</td>
  743. <td class="l-table-edit-td" >
  744. <input id="shipment.car_number" name="shipment.car_number" type='text' value="${shipment.car_number }" readonly="readonly" style="border: 0px;"/>
  745. </td>
  746. <td class="l-table-edit-text">调拨单:</td>
  747. <td class="l-table-edit-td" >
  748. <input id="shipment.tran_num" name="shipment.tran_num" type='text' value="${shipment.tran_num }" style="width:260px;border: 0px;" readonly="readonly" />
  749. </td>
  750. </tr>
  751. </table>
  752. </div>
  753. <div style="overflow: hidden; clear: both;">
  754. <div id="logistDetailGrid" style="margin: 0; padding: 0"></div>
  755. </div>
  756. <div position="center" id="center" title="" class="forum-container">
  757. <table border="0" cellspacing="1" cellpadding="0" class="l-table-edit line">
  758. <tr>
  759. <th colspan="4">出货信息</th>
  760. </tr>
  761. </table>
  762. <table border="0" cellspacing="1" cellpadding="0" class="l-table-edit line">
  763. <tr>
  764. <td colspan="4" style="font-size: 25px;">
  765. 待装货:<span id="deal_suttle_sum" style="color: red;font-size: 25px;"></span>吨/约<span id="deal_count" style="color: red;font-size: 25px;"></span>包
  766. &nbsp;
  767. 调拨数:<span id="product_number" style="font-size: 25px;"></span>吨/约<span id="product_number_suttle" style="font-size: 25px;"></span>包
  768. &nbsp;
  769. 已装货:<span id="suttle_sum" style="font-size: 25px;"></span>吨/<span id="product_count" style="font-size: 25px;"></span>包
  770. </td>
  771. </tr>
  772. </table>
  773. <div style="overflow: visible; clear: both;margin-top:5px;">
  774. <c:if test="${requestScope.toView == null || requestScope.toView == '' }">
  775. <input type="button" class="l-button" value="+装货" onclick="addShipmentEntry()" id="addShipmentEntryBtn" />
  776. &nbsp;
  777. <input type="button" class="l-button" value="√装货完成" onclick="finishShipment()"/>
  778. &nbsp;
  779. <input type="button" class="l-button" value="+增包" onclick="increaseShipment()"/>
  780. &nbsp;
  781. <input type="button" class="l-button" value="-退包" onclick="reduceShipment()"/>
  782. </c:if>
  783. <input type="hidden" id="rough" name="rough" value="${rough }"/>
  784. <input type="hidden" id="suttle" name="suttle" value="${suttle }"/>
  785. &nbsp;&nbsp;&nbsp;<span id="rough_show">毛重:${rough }公斤/包</span>
  786. &nbsp;&nbsp;&nbsp;<span id="suttle_show">净重:${suttle }公斤/包</span>
  787. &nbsp;&nbsp;&nbsp;<a href="#" onclick="updateWeighSet()">修改</a>
  788. </div>
  789. </div>
  790. <div style="overflow: hidden; clear: both;">
  791. <div id="shipmentGrid" style="margin: 0; padding: 0"></div>
  792. </div>
  793. </form>
  794. </div>
  795. </BODY>
  796. </HTML>