receiptEdit.jsp 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775
  1. <%@ page contentType="text/html;charset=UTF-8"%>
  2. <%@ include file="/WEB-INF/include/taglibs.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <title></title>
  7. <%@ include file="/WEB-INF/include/common.jsp"%>
  8. <script type="text/javascript" src="${ctx}/script/common/jquery.comboboxRef.js"></script>
  9. <script type="text/javascript" src="${ctx}/script/common/jquery.combogridRef.js"></script>
  10. <script type="text/javascript" src="${ctx}/script/common/jquery-easyui-1.3.2/plugins/jquery.quickfilter.js"></script>
  11. <script type="text/javascript">
  12. var date = new Date();
  13. var now = date.getFullYear()+""+(date.getMonth()+1)+""+date.getDate();
  14. var receiptId = "${receiptId }";
  15. var autoLotNumber = "${autoLotNumber }";
  16. var lastIndex = -1;
  17. var editIndex;
  18. var unEditableAttributes = ${requestScope.unEditableAttributes};
  19. var functionId='${functionId}';
  20. var itemMap = ${requestScope.itemMap};
  21. function collectFlagFormat(value,row)
  22. {
  23. var item = itemMap[row.itemId];
  24. if (item.isCollectProductDate == 1)
  25. {
  26. if (item.collectProductType == 0)
  27. {
  28. return "生产日期";
  29. }
  30. else if (item.collectProductType == 1)
  31. {
  32. return "到期日期";
  33. }
  34. }
  35. else if (item.isCollectProductDate == 0)
  36. {
  37. return '不采集';
  38. }
  39. }
  40. function collectDateFormat(value,row)
  41. {
  42. var item = itemMap[row.itemId];
  43. if (item.collectProductType == 0)
  44. {
  45. return row.produceDate;
  46. }
  47. else if (item.collectProductType == 1)
  48. {
  49. return row.expiredDate;
  50. }
  51. }
  52. $(function(){
  53. var receiptButtonData = '${requestScope.receiptButtons}';
  54. //定义页面元素
  55. var operate = '${requestScope.operate}';
  56. var $tabs = $("#tabs");
  57. $tabs.tabs('select',"基本信息");
  58. var receiptData = ${ requestScope.receiptData };
  59. $.ReceiptEdit = new $.AbstractEdit({entity:"Receipt",formId:"receiptForm",operate:operate,id:"receiptId",functionId : functionId }) ;
  60. //扩展或重写方法
  61. $.fn.extend( $.ReceiptEdit ,{
  62. generateDifferent : function(){
  63. $.messager.confirm('提示', '确定要对本收货单进行生成差异单吗?', function(result) {
  64. if (result) {
  65. var url = WEBROOT + "/{0}/generateDifferent.action?id="+receiptId;
  66. url = url.format($.ReceiptEdit.entity);
  67. ajaxRequest(url, null, function(response){
  68. var mes = "";
  69. if(response.code == "success"){
  70. $.ReceiptDetailList.datagrid.datagrid("reload");
  71. mes = "确认成功,生成了差异单!";
  72. }else if(response.code == "fail"){
  73. if(response.errorDesc == "-1"){
  74. mes = "收货单不存在!";
  75. }else if(response.errorDesc == "-2"){
  76. mes = "没有收货单明细!";
  77. }else if(response.errorDesc == "-3"){
  78. mes = "没有差异,不需要生成差异单!";
  79. }else if(response.errorDesc == "-4"){
  80. mes = "收货单类型不是退货入库,无法生成差异单!";
  81. }else if(response.errorDesc == "-5"){
  82. mes = "有其他人员正在操作请稍后!";
  83. }else {
  84. mes = response.errorDesc;
  85. }
  86. }
  87. $.messager.show({
  88. title:'提示',
  89. msg: mes,
  90. timeout:5000,
  91. showType:'slide'
  92. });
  93. }, null, $.ReceiptEdit);
  94. }
  95. });
  96. },
  97. receiptConfirm : function(){
  98. $.messager.confirm('提示', '确定要对本收货单进行确认收货吗?', function(result) {
  99. if (result) {
  100. var url = WEBROOT + "/{0}/doReceiptConfirm.action?id="+receiptId;
  101. url = url.format($.ReceiptEdit.entity);
  102. ajaxRequest(url, null, function(response){
  103. var mes = "";
  104. if(response.code == "success"){
  105. $.ReceiptDetailList.datagrid.datagrid("reload");
  106. if(response.data == "3"){
  107. mes = "确认成功,同时生成了质检任务与入储任务!";
  108. }else if(response.data == "2"){
  109. mes = "确认成功,生成了质检任务!";
  110. }else if(response.data == "1"){
  111. mes = "确认成功,生成了入储任务!";
  112. }
  113. }else if(response.code == "fail"){
  114. if(response.errorDesc == "0"){
  115. mes = "收货单或者收货单明细存在数据问题,无法为你确认收货!";
  116. }else if(response.errorDesc == "-1"){
  117. mes = "没有需要确认收货的收货记录详情!";
  118. }else if(response.errorDesc == "-2"){
  119. mes = "确认收货的过程中发生数据异常错误!";
  120. }else if(response.errorDesc == "-3"){
  121. mes = "不能进行分批收货的记录,必须要本次收货数量等于预期收货数量!";
  122. }else if(response.errorDesc == "-4"){
  123. mes = "确认收货的过程中发生未知错误!";
  124. }else if(response.errorDesc == "-5"){
  125. mes = "有其他人员正在操作请稍后!";
  126. }else {
  127. mes = response.errorDesc;
  128. }
  129. }
  130. $.messager.show({
  131. title:'提示',
  132. msg: mes,
  133. timeout:5000,
  134. showType:'slide'
  135. });
  136. }, null, $.ReceiptEdit);
  137. }
  138. });
  139. },
  140. quickReceiptConfirm : function(){
  141. $.messager.confirm('提示', '确定要对本收货单进行快速收货吗?', function(result) {
  142. if (result) {
  143. var url = WEBROOT + "/{0}/quickReceiptConfirm.action?id="+receiptId;
  144. url = url.format($.ReceiptEdit.entity);
  145. ajaxRequest(url, null, function(response){
  146. var mes = "";
  147. if(response.code == "success"){
  148. $.ReceiptDetailList.datagrid.datagrid("reload");
  149. if(response.data == "3"){
  150. mes = "确认成功,同时生成了质检任务与入储任务!";
  151. }else if(response.data == "2"){
  152. mes = "确认成功,生成了质检任务!";
  153. }else if(response.data == "1"){
  154. mes = "确认成功,生成了入储任务!";
  155. }
  156. }else if(response.code == "fail"){
  157. if(response.errorDesc == "0"){
  158. mes = "收货单或者收货单明细存在数据问题,无法为你确认收货!";
  159. }else if(response.errorDesc == "-1"){
  160. mes = "没有需要确认收货的收货记录详情!";
  161. }else if(response.errorDesc == "-2"){
  162. mes = "确认收货的过程中发生数据异常错误!";
  163. }else if(response.errorDesc == "-3"){
  164. mes = "不能进行分批收货的记录,必须要本次收货数量等于预期收货数量!";
  165. }else if(response.errorDesc == "-4"){
  166. mes = "确认收货的过程中发生未知错误!";
  167. }else if(response.errorDesc == "-5"){
  168. mes = "有其他人员正在操作请稍后!";
  169. }else {
  170. mes = response.errorDesc;
  171. }
  172. }
  173. $.messager.show({
  174. title:'提示',
  175. msg: mes,
  176. timeout:5000,
  177. showType:'slide'
  178. });
  179. }, null, $.ReceiptEdit);
  180. }
  181. });
  182. },
  183. printPick : function(){
  184. var url = WEBROOT + "/Receipt/printReceiptCheck.action";
  185. var ids = [receiptId];
  186. var postData={
  187. ids:$.encodeJSON(ids)
  188. }
  189. ajaxRequest(url, postData, successPrintCheck, null, this);
  190. },
  191. preSorting:function(){
  192. //弹出预分捡界面
  193. var url = WEBROOT + "/Receipt/preSortingCheck.action";
  194. var postData={
  195. receiptId:receiptId
  196. }
  197. ajaxRequest(url, postData, function(response){
  198. if (response.code == 'success')
  199. {
  200. $('#preSortingWindow').window('open');
  201. }
  202. else if (response.code == 'fail')
  203. {
  204. showMsg('提示', response.errorDesc);
  205. }
  206. }, null, this);
  207. },
  208. sortingScan:function(){
  209. var url = WEBROOT + '/Receipt/sortingScanIndex.action?receiptId=' + receiptId;
  210. parent.parent.addOrUpdateTab("分拣扫描",url);
  211. }
  212. });
  213. $("#sortId").combobox({
  214. valueField : 'sortingId',
  215. textField : 'sortingName',
  216. url : WEBROOT + "/loadData.action?entity=sortingRules",
  217. mode : 'remote',
  218. async:false,
  219. onBeforeLoad:function(param){
  220. param.customerId = receiptData.customerId;
  221. }
  222. });
  223. $("#doPreSorting").click(function(){
  224. var url = WEBROOT + "/Receipt/doPreSorting.action";
  225. var postData={
  226. receiptId:receiptId,
  227. sortingId:$("#sortId").combobox('getValue')
  228. }
  229. ajaxRequest(url, postData, function(response){
  230. if (response.code == 'success')
  231. {
  232. showMsg('提示', '预分捡成功');
  233. }
  234. else if (response.code == 'fail')
  235. {
  236. showMsg('提示', response.errorDesc);
  237. }
  238. }, null, this);
  239. });
  240. if( !$.isEmpty(receiptButtonData )){
  241. //构建权限按钮
  242. var jsonButtons = JSON.parse(receiptButtonData);
  243. $.buildToolbar( $("#receiptToolbar"),jsonButtons );
  244. };
  245. $.ReceiptEdit.init();
  246. if( !$.isEmpty( receiptData )){
  247. $.ReceiptEdit.fillData( receiptData );
  248. } ;
  249. $('#separateWindow').window({
  250. title : '产品拆分',
  251. width : 700,
  252. height : 300,
  253. closed : true,
  254. cache : false,
  255. modal : true
  256. });
  257. $('#preSortingWindow').window({
  258. title : '预分捡',
  259. width : 500,
  260. height : 200,
  261. closed : true,
  262. cache : false,
  263. modal : true
  264. });
  265. var normalFlagCombobox = new $.newCombobox({
  266. valueField : 'normalFlag',
  267. textField : 'normalFlag',
  268. data : ${normalFlags},
  269. id : "normalFlag"
  270. });
  271. var buttonData = '${requestScope.receiptDetailButtons}';
  272. //实例化查询表单,当前页面只能实例化一次
  273. var searchForm = $("#searchForm").searchForm();
  274. //实例化实体List
  275. $.ReceiptDetailList = new $.AbstractList( {entity:"ReceiptDetail",searchForm:searchForm,
  276. dblclick : function(index, row){
  277. var url = WEBROOT + "/{0}/showEdit.action?id={1}&receiptId={2}";
  278. url = url.format(this.entity, row[this.id], receiptId);
  279. this.innerFrame.attr("src", url);
  280. this.tabs.tabs('select', "内容");
  281. },
  282. onClickCell : function (rowIndex, field, value) {
  283. var rows = $.ReceiptDetailList.datagrid.datagrid('getRows');
  284. var row = rows[rowIndex];
  285. if(field == "thisReceiveQuantity" || field == "collectDate"){
  286. editIndex = rowIndex;
  287. if (lastIndex != rowIndex) {
  288. $.ReceiptDetailList.datagrid.datagrid('cancelEdit', lastIndex);
  289. $.ReceiptDetailList.datagrid.datagrid('beginEdit', rowIndex);
  290. var edits = $.ReceiptDetailList.datagrid.datagrid('getEditors', rowIndex);
  291. //$(edits[0].target).bind("keyup",function(e){
  292. // if(e.keyCode == 13){
  293. // enterHandler();
  294. // }
  295. //});
  296. var thisReceiveQuantity = row.thisReceiveQuantity;
  297. if (!thisReceiveQuantity)
  298. {
  299. thisReceiveQuantity=0;
  300. }
  301. $(edits[0].target).numberbox({
  302. min:0,
  303. value:thisReceiveQuantity
  304. });
  305. var item = itemMap[row.itemId];
  306. if (item.collectProductType == 0 && row.produceDate)
  307. {
  308. $(edits[1].target).datebox('setValue',row.produceDate);
  309. }
  310. else if (item.collectProductType == 1 && row.expiredDate)
  311. {
  312. $(edits[1].target).datebox('setValue',row.expiredDate);
  313. }
  314. for ( var i = 0; i < edits.length; i++)
  315. {
  316. var editItem = edits[i];
  317. $(editItem.target).bind("keyup",function(e){
  318. if(e.keyCode == 13){
  319. enterHandler();
  320. }
  321. });
  322. }
  323. lastIndex = rowIndex;
  324. }
  325. }
  326. }}) ;
  327. if( !$.isEmpty(buttonData )){
  328. //构建权限按钮
  329. var jsonButtons = JSON.parse(buttonData);
  330. $.buildToolbar( $("#toolbar"),jsonButtons );
  331. };
  332. var separateRow;
  333. //扩展或重写方法
  334. $.fn.extend( $.ReceiptDetailList ,{
  335. add : function() {
  336. if ($.ReceiptEdit.operate == 'edit') {
  337. var url = WEBROOT + "/{0}/showEdit.action?receiptId={1}";
  338. url = url.format(this.entity, receiptId);
  339. this.innerFrame.attr("src", url);
  340. this.tabs.tabs('select', "内容");
  341. } else {
  342. $.messager.show({
  343. title : '提示',
  344. msg : "请先保存产品后再执行操作!"
  345. });
  346. }
  347. },
  348. separate : function(){
  349. var rows = this.getSelections();
  350. var ids = [];
  351. for ( var i = 0; i < rows.length; i++) {
  352. var mes = "";
  353. if (rows[i][this.id] && (!rows[i]["isAllreadyScaned"] || rows[i]["isAllreadyScaned"] == 0)) {
  354. if(rows[i]["lotsAllowed"] == 1){
  355. ids.push(rows[i][this.id]);
  356. continue;
  357. }else{
  358. mes = "选择的记录不允许分批收货,不能进行拆分";
  359. }
  360. }else{
  361. mes = "选择的记录已经扫描,不能进行拆分";
  362. }
  363. $.messager.alert("提示", mes, "error");
  364. return;
  365. }
  366. if (ids.length == 1) {
  367. $.messager.confirm('提示', '确定要对此记录进行拆分吗?',
  368. function(result) {
  369. if (result) {
  370. separateRow = rows[0];
  371. if(separateRow.isGatherLotNumber){
  372. $("#lotNumber").validatebox({required:true});
  373. }
  374. normalFlagCombobox.init();
  375. $('#separateWindow').window("open");
  376. if(autoLotNumber == 1){
  377. if(separateRow.lotNumber && separateRow.lotNumber.indexOf(now) == 0){
  378. $("#lotNumber").val(separateRow.lotNumber);
  379. }else{
  380. $("#lotNumber").val(now+""+(date.getHours()+1)+""+date.getMilliseconds());
  381. }
  382. }
  383. }
  384. });
  385. } else {
  386. $.messager.alert("提示", "请正确选择要拆分的记录,一次必须并且只能操作一条记录", "error");
  387. }
  388. }
  389. });
  390. $("#saveSeparateBtn").click(function(){
  391. if ($("#separateForm").form('validate')) {
  392. var thisReceiveQuantity = $("#thisReceiveQuantity").val();
  393. //判断本次收货数量是否大于被拆分明细的(预期数量-实际收货数量)
  394. if(thisReceiveQuantity <= separateRow.expectedReceiveQuantity-separateRow.actualReceiveQuantity){
  395. //判断产品形态与被拆分的一致,且被拆分的含有预售数量
  396. if(separateRow.preSaleQuantity && separateRow.preSaleQuantity > 0 && $("#normalFlag").combobox("getValue") == separateRow.normalFlag){
  397. //拆分出的明细本次收货数量是否大于被拆分明细的预售数量
  398. if(thisReceiveQuantity > separateRow.preSaleQuantity){
  399. //明细中预售数量为被拆分明细的预售数量
  400. $("#preSaleQuantity").val(separateRow.preSaleQuantity);
  401. }else{
  402. //预售数量为明细的数量
  403. $("#preSaleQuantity").val(thisReceiveQuantity);
  404. }
  405. }
  406. //提交Form表单
  407. var url = WEBROOT + "/{0}/doSeparate.action?id={1}";
  408. url = url.format($.ReceiptDetailList.entity, separateRow.id);
  409. var postData = {
  410. "formData" : JSON.stringify($("#separateForm").getFormValue())
  411. };
  412. ajaxRequest(url, postData, function(response){
  413. if(response.code == "success"){
  414. $.ReceiptDetailList.datagrid.datagrid("reload");
  415. $('#separateWindow').window("close");
  416. }
  417. }, null, this);
  418. }else{
  419. $.messager.alert("提示", "拆分的本次收货数量必须小于等于预期收货数量减去实际收货数量的差值:"+(separateRow.expectedReceiveQuantity-separateRow.actualReceiveQuantity), "error");
  420. }
  421. }
  422. });
  423. /** 自动隐藏**/
  424. var rids = new Array('autoTRReceiptcysxx','autoTRReceiptfhrxx');
  425. autoTRClick(rids);
  426. });
  427. function successPrintCheck(data){
  428. // $.messager.confirm('提示', '共【' + data[0].length + '】个订单可以打印,确定要打印吗?',
  429. $.messager.confirm('提示', '本订单可以打印,确定要打印吗?',
  430. function(result) {
  431. if (result) {
  432. // if(data[0].length>0){
  433. var url = WEBROOT + "/Receipt/doPrintReceipt.action";
  434. var postData={
  435. // ids:$.encodeJSON(data[0])
  436. ids:$.encodeJSON([receiptId])
  437. };
  438. ajaxRequest(url, postData, successQueryPrint, null, this);
  439. // }
  440. }
  441. });
  442. }
  443. function successQueryPrint(ajaxResponse){
  444. if( ajaxResponse.code=='fail'){
  445. alertMsg("打印查询","查询要打印的订单出现异常:"+ajaxResponse.errorDesc,"error");
  446. }else{
  447. var data = ajaxResponse.data;
  448. var config = {
  449. showPrinterSelect:"1",
  450. showPreview:1,
  451. autoMatch:1,
  452. templeteType:'收货单'
  453. };
  454. var printPlugIn = new top.PrintPlugIn(config);
  455. printPlugIn.print(data);
  456. }
  457. }
  458. function enterHandler(){
  459. $.ReceiptDetailList.datagrid.datagrid('endEdit', editIndex);
  460. saveChange();
  461. }
  462. function saveChange(){
  463. var changes = $.ReceiptDetailList.datagrid.datagrid("getChanges");
  464. if(changes && changes.length > 0){
  465. receiptDetailId = changes[0].id;
  466. thisReceiveQuantity = changes[0].thisReceiveQuantity;
  467. var expectedReceiveQuantity = changes[0].expectedReceiveQuantity;
  468. var actualReceiveQuantity = changes[0].actualReceiveQuantity;
  469. if(thisReceiveQuantity >= 0){
  470. var errorMes = "";
  471. if(expectedReceiveQuantity - actualReceiveQuantity - thisReceiveQuantity < 0){
  472. lastIndex = -1;
  473. errorMes = "本次收货数量应该小于等于预期收货数量与实际收货数量的差值:"+(expectedReceiveQuantity - actualReceiveQuantity);
  474. $.ReceiptDetailList.datagrid.datagrid("rejectChanges");
  475. $.messager.alert('提示',errorMes);
  476. }else{
  477. //提交列表修改
  478. var url = WEBROOT + "/{0}/doEditCellSave.action";
  479. url = url.format($.ReceiptDetailList.entity);
  480. var postData = {
  481. "id" : receiptDetailId,
  482. "thisReceiveQuantity" : thisReceiveQuantity,
  483. collectDate : changes[0].collectDate
  484. };
  485. ajaxRequest(url, postData, function(response){
  486. var mes = "";
  487. if(response.code == "success"){
  488. $.ReceiptDetailList.datagrid.datagrid('acceptChanges');
  489. $.ReceiptDetailList.datagrid.datagrid("reload");
  490. mes = "更新成功!";
  491. }else{
  492. $.ReceiptDetailList.datagrid.datagrid('rejectChanges');
  493. $.ReceiptDetailList.datagrid.datagrid("reload");
  494. mes = response.errorDesc;
  495. }
  496. $.messager.alert("提示", mes);
  497. lastIndex = -1;
  498. }, null, this);
  499. //return;
  500. }
  501. }else{
  502. errorMes = "请输入大于等于0的值";
  503. $.messager.alert('提示',errorMes);
  504. }
  505. //$.ReceiptDetailList.datagrid.datagrid('rejectChanges');
  506. //$.ReceiptDetailList.datagrid.datagrid('beginEdit', editIndex);
  507. //var edits = $.ReceiptDetailList.datagrid.datagrid('getEditors', editIndex);
  508. //lastIndex = editIndex;
  509. //$(edits[0].target).val(thisReceiveQuantity);
  510. //$(edits[0].target).bind("keyup",function(e){
  511. // if(e.keyCode == 13){
  512. // enterHandler();
  513. // }
  514. //});
  515. }else{
  516. lastIndex = -1;
  517. }
  518. }
  519. </script>
  520. <script type="text/javascript" src="${ctx}/script/wms/receipt/receiptEdit.js"></script>
  521. <script type="text/javascript">
  522. $(function(){
  523. disabledAttributes($("#body"),unEditableAttributes);
  524. });
  525. </script>
  526. </head>
  527. <body id="body">
  528. <div style="font-size: 12px;" fit="true">
  529. <form id="receiptForm" method="post">
  530. <div id="receiptToolbar" style="padding:5px;border:1px solid #ddd;">
  531. </div>
  532. <input type="hidden" name="receiptId"></input>
  533. <table style="width: 100%">
  534. <tr>
  535. <td>入库订单号:</td>
  536. <td><input class="easyui-validatebox" name="inboundId"></input>
  537. </td>
  538. <td>客户查询号:</td>
  539. <td><input class="easyui-validatebox" name="customerRefferenceId"></input>
  540. </td>
  541. <td>收货单状态 :</td>
  542. <td>
  543. <s:select list="#request.receiptStatus" listKey="id" listValue="dictionaryName" myType="easyui-combobox" cssStyle="width: 155px" name="receiptStatus" theme="simple"></s:select>
  544. </td>
  545. </tr>
  546. <tr>
  547. <td>仓库:</td>
  548. <td>
  549. <s:select list="#request.wareHouses" listKey="warehouseId" listValue="warehouseName" myType="easyui-combobox" cssStyle="width: 155px" name="warehouseId" id="warehouseId" theme="simple"></s:select>
  550. </td>
  551. <td>货主:</td>
  552. <td>
  553. <input myType="easyui-combogrid" style="width: 155px" required="true" id="customerId" name="customerId"></input>
  554. </td>
  555. </tr>
  556. <tr>
  557. <td>期望收货数量:</td>
  558. <td><input class="easyui-numberbox" name="expectedReceiveQuantity"></input>
  559. </td>
  560. <td>预期总价值:</td>
  561. <td><input class="easyui-numberbox" name="expectedOrderFee"></input>
  562. </td>
  563. <td>预售数量:</td>
  564. <td><input class="easyui-numberbox" name="preSaleQuantity"></input>
  565. </td>
  566. </tr>
  567. <tr>
  568. <td>实际收货数量:</td>
  569. <td><input class="easyui-numberbox" name="actualReceiveQuantity"></input>
  570. </td>
  571. <td>预期到货时间:</td>
  572. <td><input class="easyui-datebox" name="expectedReceiveTime"></input>
  573. </td>
  574. <td>实际到货时间:</td>
  575. <td><input class="easyui-datebox" name="actualReceiveTime"></input>
  576. </td>
  577. </tr>
  578. <tr>
  579. <td colspan="6">
  580. <a id="autoTRReceiptfhrxx" onclick="toggerTR(this);">发货人信息:</a>
  581. <hr></td>
  582. </tr>
  583. <tr name="autoTRReceiptfhrxx">
  584. <td>发货人:</td>
  585. <td><input class="easyui-validatebox" name="senderName"></td>
  586. <td>联系人:</td>
  587. <td><input class="easyui-validatebox" name="sendContactor"></td>
  588. <td>国家:</td>
  589. <td><input class="easyui-validatebox" name="sendCountry"></td>
  590. </tr>
  591. <tr name="autoTRReceiptfhrxx">
  592. <td>省:</td>
  593. <td><input class="easyui-validatebox" name="sendProvince"></td>
  594. <td>市:</td>
  595. <td><input class="easyui-validatebox" name="sendCity"></td>
  596. <td>街道:</td>
  597. <td><input class="easyui-validatebox" name="sendStreet"></td>
  598. </tr>
  599. <tr name="autoTRReceiptfhrxx">
  600. <td>联系电话:</td>
  601. <td><input class="easyui-validatebox" name="sendContactorPhone"></td>
  602. <td>手机:</td>
  603. <td><input class="easyui-validatebox" name="sendContactorMobile"></td>
  604. <td></td>
  605. <td></td>
  606. </tr>
  607. <tr>
  608. <td colspan="6">
  609. <a id="autoTRReceiptcysxx" onclick="toggerTR(this);">承运商信息:</a>
  610. <hr>
  611. </td>
  612. </tr>
  613. <tr name="autoTRReceiptcysxx">
  614. <td>承运商:</td>
  615. <td>
  616. <input myType="easyui-combogrid" style="width: 155px" id="carrierId" name="carrierId"></input>
  617. </td>
  618. <td>车辆号码:</td>
  619. <td><input class="easyui-validatebox" name="truckNumber"></input>
  620. </td>
  621. <td>司机:</td>
  622. <td><input class="easyui-validatebox" name="driver"></input>
  623. </td>
  624. </tr>
  625. <tr name="autoTRReceiptcysxx">
  626. <td>身份证:</td>
  627. <td><input class="easyui-validatebox" name="indentityCard"></input>
  628. </td>
  629. <td>司机联系方式:</td>
  630. <td><input class="easyui-validatebox" name="drliverPhone"></input>
  631. </td>
  632. <td>送货评分:</td>
  633. <td><input class="easyui-numberbox" name="deliveryScore"></input>
  634. </td>
  635. </tr>
  636. <tr name="autoTRReceiptcysxx">
  637. <td>承运单号:</td>
  638. <td><input class="easyui-validatebox" name="carrierTrackingNumber"></input>
  639. </td>
  640. <td>件数:</td>
  641. <td><input class="easyui-numberbox" name="packageNum"></input>
  642. </td>
  643. <td>重量:</td>
  644. <td><input class="easyui-numberbox" name="weight"></input>
  645. </td>
  646. </tr>
  647. <tr name="autoTRReceiptcysxx">
  648. <td>体积:</td>
  649. <td><input class="easyui-numberbox" name="cube"></input>
  650. </td>
  651. </tr>
  652. </table>
  653. </form>
  654. <div id="tabs" class="easyui-tabs" fit="true" style="height:350px">
  655. <div title="收货明细">
  656. <form id="searchForm" action="#" method="post">
  657. <input class="easyui-validatebox" type="hidden" style="vertical-align:middle" name="receiptId" value="${receiptId==null?0:receiptId }" condition ='"operator":"="' />
  658. </form>
  659. <div id="toolbar" class="toolbar"></div>
  660. <table id="maingrid" data-options="<s:if test="#request.receiptData.inboundKind != 2003">fitColumns:true</s:if>">
  661. <thead>
  662. <tr>
  663. <th data-options="field:'id',hidden:true">主键</th>
  664. <th data-options="field:'ck',checkbox:true">编码</th>
  665. <th data-options="field:'itemCode',align:'center',width:100">商品代码</th>
  666. <th data-options="field:'itemName',align:'center',width:100,hfilter:{type:'text',options:{ }}">商品名称</th>
  667. <th data-options="field:'normalFlag',align:'center',width:100">产品形态</th>
  668. <th data-options="field:'specification',align:'center',width:100">产品规格</th>
  669. <th data-options="field:'expectedReceiveQuantity',align:'center',width:100">预期数量</th>
  670. <th data-options="field:'actualReceiveQuantity',align:'center',width:100">实际数量</th>
  671. <th data-options="field:'preSaleQuantity',align:'center',width:100">预售数量</th>
  672. <th data-options="field:'thisReceiveQuantity',align:'center',width:100,editor:'numberbox'">本次数量</th>
  673. <s:if test="#request.receiptData.inboundKind == 2003">
  674. <th data-options="field:'orderId',align:'center',width:100">发货订单号</th>
  675. <th data-options="field:'deliverDocumentId',align:'center',width:100">发货单号</th>
  676. </s:if>
  677. <th data-options="field:'lotNumber',align:'center',width:100">批次</th>
  678. <th data-options="field:'itemGroupName',align:'center',width:100,hfilter:{type:'text',options:{ }}">产品组名称</th>
  679. <th data-options="field:'collectFlag',align:'center',width:100,formatter:collectFlagFormat">采集类型</th>
  680. <th data-options="field:'collectDate',align:'center',width:100,formatter:collectDateFormat,editor:{type:'datebox'}">生产/到期日期</th>
  681. </tr>
  682. </thead>
  683. </table>
  684. </div>
  685. <div title="内容">
  686. <iframe id="innerFrame" name="innerTab" scrolling="auto" frameborder="0" style="width:100%;height:99.4%;border:none;"></iframe>
  687. </div>
  688. </div>
  689. </div>
  690. <div style="display: none">
  691. <div id="separateWindow">
  692. <form id="separateForm" method="post">
  693. <input name="id" type="hidden">
  694. <input name="preSaleQuantity" id="preSaleQuantity" type="hidden">
  695. <table style="width: 100%">
  696. <tr>
  697. <td><div class="star">*</div>产品形态:</td>
  698. <td><select id="normalFlag" class="easyui-combobox" name="normalFlag" style="width: 155px" data-options="required: true">
  699. </select></td>
  700. <td>本次收货数量:</td>
  701. <td><input class="easyui-numberbox" name="thisReceiveQuantity" id="thisReceiveQuantity" data-options="required: true"></td>
  702. <td>批次:</td>
  703. <td><input class="easyui-validatebox" name="lotNumber" id="lotNumber">
  704. </td>
  705. </tr>
  706. <tr>
  707. <td>保质期:</td>
  708. <td><input class="easyui-numberbox" name="shelfLife"></td>
  709. <td>生产日期:</td>
  710. <td><input class="easyui-datetimebox" name="produceDate"></td>
  711. <td>到期日期:</td>
  712. <td><input class="easyui-datetimebox" name="expiredDate">
  713. </td>
  714. </tr>
  715. <tr>
  716. <td colspan="6" align="center">
  717. <a href="#" icon="icon-save" id="saveSeparateBtn" class="easyui-linkbutton">保存</a>
  718. </td>
  719. </tr>
  720. </table>
  721. </form>
  722. </div>
  723. </div>
  724. <div style="display: none">
  725. <div id="preSortingWindow">
  726. <table style="width: 100%">
  727. <tr>
  728. <td>
  729. 预分捡规则:
  730. </td>
  731. <td>
  732. <input myType="easyui-combobox" style="width: 155px" required="true" id="sortId"></input>
  733. </td>
  734. </tr>
  735. <tr>
  736. <td colspan="6" align="center">
  737. <a href="#" icon="icon-save" id="doPreSorting" class="easyui-linkbutton">执行预分捡</a>
  738. </td>
  739. </tr>
  740. </table>
  741. </form>
  742. </div>
  743. </div>
  744. </body>
  745. </html>