You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

976 lines
36 KiB

3 weeks ago
  1. 
  2. @{
  3. ViewBag.Title = "SeachInventory";
  4. Layout = "~/Views/Shared/_Index.cshtml";
  5. }
  6. <link href="~/Content/js/select2/select2.min.css" rel="stylesheet" />
  7. <link href="~/Content/js/dialog/dialog.css?v=20120420" rel="stylesheet" />
  8. <script src="~/Content/js/datepicker/WdatePicker.js"></script>
  9. <script src="~/Content/js/select2/select2.min.js"></script>
  10. <style>
  11. .divbox{
  12. margin-left:20px;
  13. margin-top:10px;
  14. display:inline-block;
  15. float:left;
  16. }
  17. .divformValue{
  18. display:inline-block;
  19. float:left;
  20. }
  21. .divformTitle{
  22. display:inline-block;
  23. float:left;
  24. }
  25. /*.divformValue{
  26. display:inline-block;
  27. }*/
  28. </style>
  29. <script>
  30. var Type = '';
  31. debugger;
  32. $(function () {
  33. $("#txtQuantity").val(0);
  34. LoadShow();
  35. SetCols();
  36. Extension();
  37. Init();
  38. });
  39. function SetCols() {
  40. $.ajax({
  41. url: "/Print/SelectColumnName?" + Math.random(),
  42. dataType: "json",
  43. async: false,
  44. success: function (data) {
  45. var cols = new Array();
  46. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  47. cols.push(collast);
  48. var collast = { label: '仓库', name: 'WarehouseCode', width: 120, align: 'left' };
  49. cols.push(collast);
  50. var collast = { label: '库位', name: 'LocationCode', width: 120, align: 'left' };
  51. cols.push(collast);
  52. var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' };
  53. cols.push(collast);
  54. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  55. cols.push(collast);
  56. var collast = { label: '料品名称', name: 'InvName', width: 120, align: 'left' };
  57. cols.push(collast);
  58. var collast = { label: '料品描述', name: 'InvDesc', width: 100, align: 'left' };
  59. cols.push(collast);
  60. var collast = { label: '规格型号', name: 'InvStd', width: 100, align: 'left' };
  61. cols.push(collast);
  62. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  63. cols.push(collast);
  64. var collast = { label: '总数量', name: 'Quantity', width: 100, align: 'left' };
  65. cols.push(collast);
  66. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  67. cols.push(collast);
  68. var collast = { label: '库位', name: 'LocationCode', hidden: true };
  69. cols.push(collast);
  70. if (data != null && data.length > 0) {
  71. DateList = data;
  72. for (var i = 0; i < data.length; i++) {
  73. var ColName = data[i].ColName;
  74. var ColCode = data[i].ColCode;
  75. var obj = new Array();
  76. obj = {
  77. label: ColName,
  78. name: ColCode,
  79. width: 80,
  80. align: "left"
  81. }
  82. cols.push(obj);
  83. }
  84. }
  85. _Clos = cols;
  86. }
  87. });
  88. }
  89. function Extension() {
  90. $.ajax({
  91. url: "/WMS/WMSCreateItemLot/SelectICSExtensionEnable" + "?" + Math.random(),
  92. dataType: "json",
  93. async: false,
  94. success: function (data) {
  95. debugger;
  96. if (data != null && data.length > 0) {
  97. for (var i = 0; i < data.length; i++) {
  98. if (data[i].ColCode == 'ProjectCode') { $("#ProjectCode").css('display', 'none'); }
  99. if (data[i].ColCode == 'BatchCode') { $("#BatchCode").css('display', 'none'); }
  100. if (data[i].ColCode == 'Version') { $("#Version").css('display', 'none'); }
  101. if (data[i].ColCode == 'Brand') { $("#Brand").css('display', 'none'); }
  102. if (data[i].ColCode == 'cFree1') { $("#cFree1").css('display', 'none'); }
  103. if (data[i].ColCode == 'cFree2') { $("#cFree2").css('display', 'none'); }
  104. if (data[i].ColCode == 'cFree3') { $("#cFree3").css('display', 'none'); }
  105. if (data[i].ColCode == 'cFree4') { $("#cFree4").css('display', 'none'); }
  106. if (data[i].ColCode == 'cFree5') { $("#cFree5").css('display', 'none'); }
  107. if (data[i].ColCode == 'cFree6') { $("#cFree6").css('display', 'none'); }
  108. if (data[i].ColCode == 'cFree7') { $("#cFree7").css('display', 'none'); }
  109. if (data[i].ColCode == 'cFree8') { $("#cFree8").css('display', 'none'); }
  110. if (data[i].ColCode == 'cFree9') { $("#cFree9").css('display', 'none'); }
  111. if (data[i].ColCode == 'cFree10') { $("#cFree10").css('display', 'none'); }
  112. }
  113. }
  114. }
  115. });
  116. }
  117. function Init() {
  118. document.getElementById("gridPanel").innerHTML = ' <span><strong>详细信息</strong></span> <table id="gridList"></table> ';//重置grid
  119. var LotNo = $("#txt_LotNo").val();
  120. var InvCode = $("#txt_InvCode").val();
  121. var WHCode = $("#txt_WHCode").val();
  122. $("#gridList").dataGrid({
  123. url: "/WMS/ICSMTDOC/GetRepertory" + "?LotNo=" + LotNo + "&InvCode=" + InvCode + "&WHCode=" + WHCode+ "&" + Math.random(),
  124. height: $(window).height() - 20,
  125. width: $(window).width() - 300,
  126. colModel: _Clos,
  127. // colModel: [
  128. //{ label: '主键', name: 'ID', hidden: true, key: true },
  129. //{ label: '仓库', name: 'WarehouseCode', width: 100, align: 'left' },
  130. //{ label: '条码', name: 'LotNo', width: 100, align: 'left' },
  131. //{ label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  132. //{ label: '料品名称', name: 'InvName', width: 100, align: 'left' },
  133. //{ label: '料品描述', name: 'InvDesc', width: 100, align: 'left' },
  134. //{ label: '规格型号', name: 'InvStd', width: 100, align: 'left' },
  135. //{ label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  136. //{ label: '总数量', name: 'Quantity', width: 100, align: 'left' },
  137. //{ label: '辅计量数量', name: 'Amount', width: 100, align: 'left' },
  138. // ],
  139. shrinkToFit: false,//宽度自适应
  140. autowidth: true,
  141. gridComplete: function () {
  142. },
  143. rowNum: 10000,
  144. autoScroll: true,
  145. sortname: 'LotNO',
  146. sortorder: "desc",
  147. viewrecords: true,
  148. multiselect: true,
  149. })
  150. };
  151. function submitForm() {
  152. debugger;
  153. var rows = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  154. if (rows.length <= 0) {
  155. $.modalAlertNew("WMS00080");
  156. return;
  157. }
  158. var InvCode = $("#txtInvCode").val();
  159. var LocationCode = $("#txtLocationCode").val();
  160. var LocationCodeFlag = $("#txtLocationCode").val();
  161. var WHCode = $("#txtWarehouseCode").val();
  162. var Memo = $("#txtMemo").val();
  163. var Quantity = $("#txtQuantity").val();
  164. var ICSMTDOC = [];
  165. var chkWHCode = "";
  166. for (var i = 0; i < rows.length; i++) {
  167. var rowData = $("#gridList").jqGrid('getRowData', rows[i]);
  168. if (i == 0) {
  169. chkWHCode = rowData.WarehouseCode;
  170. }
  171. else {
  172. if (chkWHCode != rowData.WarehouseCode) {
  173. $.modalAlert("条码:" + rowData.LotNo + "所属仓库:" + rowData.WarehouseCode + "与其他条码不同,只能选择相同仓库的条码!");
  174. return;
  175. }
  176. }
  177. if (rowData.Amount=='') {
  178. var Amounts = 0;
  179. } else {
  180. var Amounts = rowData.Amount;
  181. }
  182. var FlagProjectCode = '';
  183. var FlagBatchCode = '';
  184. var FlagVersion = '';
  185. var FlagBrand = '';
  186. var FlagcFree1 = '';
  187. var FlagcFree2 = '';
  188. var FlagcFree3 = '';
  189. var FlagcFree4 = '';
  190. var FlagcFree5 = '';
  191. var FlagcFree6 = '';
  192. var FlagcFree7 = '';
  193. var FlagcFree8 = '';
  194. var FlagcFree9 = '';
  195. var FlagcFree10 = '';
  196. var FlagInvCode = '';
  197. var FlagcFree11 = '';
  198. if ($("#BatchCodebox").is(':checked')) {
  199. FlagBatchCode = '1';
  200. }
  201. if ($("#ProjectCodebox").is(':checked')) {
  202. FlagProjectCode = '1';
  203. }
  204. if ($("#Versionbox").is(':checked')) {
  205. FlagVersion = '1';
  206. }
  207. if ($("#Brandbox").is(':checked')) {
  208. FlagBrand = '1';
  209. }
  210. if ($("#cFree1box").is(':checked')) {
  211. FlagcFree1 = '1';
  212. }
  213. if ($("#cFree2box").is(':checked')) {
  214. FlagcFree2 = '1';
  215. }
  216. if ($("#cFree3box").is(':checked')) {
  217. FlagcFree3 = '1';
  218. }
  219. if ($("#cFree4box").is(':checked')) {
  220. FlagcFree4 = '1';
  221. }
  222. if ($("#cFree5box").is(':checked')) {
  223. FlagcFree5 = '1';
  224. }
  225. if ($("#cFree6box").is(':checked')) {
  226. FlagcFree6 = '1';
  227. }
  228. if ($("#cFree7box").is(':checked')) {
  229. FlagcFree7 = '1';
  230. }
  231. if ($("#cFree8box").is(':checked')) {
  232. FlagcFree8 = '1';
  233. }
  234. if ($("#cFree9box").is(':checked')) {
  235. FlagcFree9 = '1';
  236. }
  237. if ($("#cFree10box").is(':checked')) {
  238. FlagcFree10 = '1';
  239. }
  240. if ($("#InvCodebox").is(':checked')) {
  241. FlagInvCode = '1';
  242. }
  243. if ($("#LocationCodebox").is(':checked')) {
  244. FlagcFree11 = '1';
  245. }
  246. debugger;
  247. if (LocationCodeFlag == '') {
  248. LocationCode = rowData.LocationCode;
  249. WHCode = rowData.WarehouseCode;
  250. }
  251. var obj = {
  252. WHCode: WHCode,//仓库
  253. LotNo: rowData.LotNo,//条码
  254. LocationCode: LocationCode,
  255. Quantity: rowData.Quantity,//数量
  256. Amount: Amounts,//辅计量数量
  257. MTDOCQuantity: rowData.Quantity,//已转换数量
  258. InvCodeQuantity: Quantity,
  259. ProjectCode: $("#txtProjectCode").val(),
  260. BatchCode: $("#txtBatchCode").val(),
  261. ProductDate: $("#ProductDate").val(),
  262. Version: $("#txtVersion").val(),
  263. Brand: $("#txtBrand").val(),
  264. cFree1: $("#txtcFree1").val(),
  265. cFree2: $("#txtcFree2").val(),
  266. cFree3: $("#txtcFree3").val(),
  267. cFree4: $("#txtcFree4").val(),
  268. cFree5: $("#txtcFree5").val(),
  269. cFree6: $("#txtcFree6").val(),
  270. cFree7: $("#txtcFree7").val(),
  271. cFree8: $("#txtcFree8").val(),
  272. cFree9: $("#txtcFree9").val(),
  273. cFree10: $("#txtcFree10").val(),
  274. FlagProjectCode: FlagProjectCode,
  275. FlagBatchCode: FlagBatchCode,
  276. FlagVersion: FlagVersion,
  277. FlagBrand: FlagBrand,
  278. FlagcFree1: FlagcFree1,
  279. FlagcFree2: FlagcFree2,
  280. FlagcFree3: FlagcFree3,
  281. FlagcFree4: FlagcFree4,
  282. FlagcFree5: FlagcFree5,
  283. FlagcFree6: FlagcFree6,
  284. FlagcFree7: FlagcFree7,
  285. FlagcFree8: FlagcFree8,
  286. FlagcFree9: FlagcFree9,
  287. FlagcFree10: FlagcFree10,
  288. FlagInvCode: FlagInvCode,
  289. FlagcFree11: FlagcFree11
  290. }
  291. ICSMTDOC.push(obj);
  292. }
  293. $.modalConfirm("确定保存吗?", function (r) {
  294. if (r) {
  295. debugger;
  296. $.submitForm({
  297. url: "/DHAY/ICSMTDOC/CreateICSMTDOC?InvCode=" + InvCode + "&Memo=" + Memo + "&LocationCode=" + LocationCode+ "&" + Math.random(),
  298. param: { ICSMTDOC: JSON.stringify(ICSMTDOC) },
  299. success: function () {
  300. $.currentWindow().$("#gridList").trigger("reloadGrid");
  301. }
  302. })
  303. }
  304. });
  305. };
  306. //监听Check事件
  307. function OncheckBox1() {
  308. if ($("#InvCodebox").is(':checked')) {
  309. $('#txtInvCode').attr("disabled", false);
  310. } else {
  311. $("#txtInvCode").attr("disabled", "disabled");
  312. }
  313. }
  314. function OncheckBoxLocationCodebox() {
  315. if ($("#LocationCodebox").is(':checked')) {
  316. $('#txtLocationCode').attr("disabled", false);
  317. } else {
  318. $("#txtLocationCode").attr("disabled", "disabled");
  319. }
  320. }
  321. function OncheckBoxProductDatebox() {
  322. if ($("#ProductDatebox").is(':checked')) {
  323. $('#ProductDate').attr("disabled", false);
  324. } else {
  325. $("#ProductDate").attr("disabled", "disabled");
  326. }
  327. }
  328. function OncheckBox2() {
  329. if ($("#BatchCodebox").is(':checked')) {
  330. $('#txtBatchCode').attr("disabled", false);
  331. $('#SearchBatchCode').attr("disabled", false);
  332. $('#ProductDate').attr("disabled", false);
  333. } else {
  334. $("#txtBatchCode").attr("disabled", "disabled");
  335. $('#SearchBatchCode').attr("disabled", "disabled");
  336. }
  337. }
  338. function OncheckBoxProjectCode() {
  339. if ($("#ProjectCodebox").is(':checked')) {
  340. $('#txtProjectCode').attr("disabled", false);
  341. } else {
  342. $("#txtProjectCode").attr("disabled", "disabled");
  343. }
  344. }
  345. function OncheckBoxVersion() {
  346. if ($("#Versionbox").is(':checked')) {
  347. $('#txtVersion').attr("disabled", false);
  348. } else {
  349. $("#txtVersion").attr("disabled", "disabled");
  350. }
  351. }
  352. function OncheckBoxBrand() {
  353. if ($("#Brandbox").is(':checked')) {
  354. $('#txtBrand').attr("disabled", false);
  355. } else {
  356. $("#txtBrand").attr("disabled", "disabled");
  357. }
  358. }
  359. function OncheckBoxcFree1() {
  360. if ($("#cFree1box").is(':checked')) {
  361. $('#txtcFree1').attr("disabled", false);
  362. } else {
  363. $("#txtcFree1").attr("disabled", "disabled");
  364. }
  365. }
  366. function OncheckBoxcFree2() {
  367. if ($("#cFree2box").is(':checked')) {
  368. $('#txtcFree2').attr("disabled", false);
  369. } else {
  370. $("#txtcFree2").attr("disabled", "disabled");
  371. }
  372. }
  373. function OncheckBoxcFree3() {
  374. if ($("#cFree3box").is(':checked')) {
  375. $('#txtcFree3').attr("disabled", false);
  376. } else {
  377. $("#txtcFree3").attr("disabled", "disabled");
  378. }
  379. }
  380. function OncheckBoxcFree4() {
  381. if ($("#cFree4box").is(':checked')) {
  382. $('#txtcFree4').attr("disabled", false);
  383. } else {
  384. $("#txtcFree4").attr("disabled", "disabled");
  385. }
  386. }
  387. function OncheckBoxcFree5() {
  388. if ($("#cFree5box").is(':checked')) {
  389. $('#txtcFree5').attr("disabled", false);
  390. } else {
  391. $("#txtcFree5").attr("disabled", "disabled");
  392. }
  393. }
  394. function OncheckBoxcFree6() {
  395. if ($("#cFree6box").is(':checked')) {
  396. $('#txtcFree6').attr("disabled", false);
  397. } else {
  398. $("#txtcFree6").attr("disabled", "disabled");
  399. }
  400. }
  401. function OncheckBoxcFree7() {
  402. if ($("#cFree7box").is(':checked')) {
  403. $('#txtcFree7').attr("disabled", false);
  404. } else {
  405. $("#txtcFree7").attr("disabled", "disabled");
  406. }
  407. }
  408. function OncheckBoxcFree8() {
  409. if ($("#cFree8box").is(':checked')) {
  410. $('#txtcFree8').attr("disabled", false);
  411. } else {
  412. $("#txtcFree8").attr("disabled", "disabled");
  413. }
  414. }
  415. function OncheckBoxcFree9() {
  416. if ($("#cFree9box").is(':checked')) {
  417. $('#txtcFree9').attr("disabled", false);
  418. } else {
  419. $("#txtcFree9").attr("disabled", "disabled");
  420. }
  421. }
  422. function OncheckBoxcFree10() {
  423. if ($("#cFree10box").is(':checked')) {
  424. $('#txtcFree10').attr("disabled", false);
  425. } else {
  426. $("#txtcFree10").attr("disabled", "disabled");
  427. }
  428. }
  429. //数量
  430. function Quantity() {
  431. if ($("#Quantitybox").is(':checked')) {
  432. $('#txtQuantity').attr("disabled", false);
  433. } else {
  434. $("#txtQuantity").attr("disabled", "disabled");
  435. }
  436. }
  437. //物料
  438. function GetInventory() {
  439. $.modalOpen({
  440. id: "GetICSInventory",
  441. title: "形态转换",
  442. url: "/WMS/ICSMTDOC/GetICSInventory?"+ Math.random(),
  443. width: "1000px",
  444. height: "1000px",
  445. callBack: function (iframeId) {
  446. var obj = top.frames[iframeId].submitForm();
  447. $("#txtInvCode").val(obj.InvCode);
  448. top.frames[iframeId].Close();
  449. }
  450. })
  451. }
  452. function GetLocationCode() {
  453. $.modalOpen({
  454. id: "GetLocationCode",
  455. title: "形态转换",
  456. url: "/WMS/ICSMTDOC/GetLocationCode?" + Math.random(),
  457. width: "1000px",
  458. height: "1000px",
  459. callBack: function (iframeId) {
  460. var obj = top.frames[iframeId].submitForm();
  461. $("#txtLocationCode").val(obj.LocationCode);
  462. $("#txtWarehouseCode").val(obj.WarehouseCode);
  463. top.frames[iframeId].Close();
  464. }
  465. })
  466. }
  467. //批次
  468. function GetBatchCode() {
  469. $.modalOpen({
  470. id: "GetBatchCode",
  471. title: "批次",
  472. url: "/WMS/ICSMTDOC/GetBatchCode?Type=" + 2 + "&" + Math.random(),
  473. width: "1000px",
  474. height: "1000px",
  475. callBack: function (iframeId) {
  476. var obj = top.frames[iframeId].submitForm();
  477. $("#txtBatchCode").val(obj.Code);
  478. top.frames[iframeId].Close();
  479. }
  480. })
  481. }
  482. //项目号
  483. function GetProjectCode() {
  484. debugger;
  485. $.modalOpen({
  486. id: "GetProjectCode",
  487. title: "项目号",
  488. url: "/WMS/ICSMTDOC/GetBatchCode?Type=" + 1 + "&" + Math.random(),
  489. width: "1000px",
  490. height: "1000px",
  491. callBack: function (iframeId) {
  492. var obj = top.frames[iframeId].submitForm();
  493. $("#txtProjectCode").val(obj.Code);
  494. top.frames[iframeId].Close();
  495. }
  496. })
  497. }
  498. //版本
  499. function GetVersion() {
  500. $.modalOpen({
  501. id: "GetVersion",
  502. title: "版本",
  503. url: "/WMS/ICSMTDOC/GetBatchCode?Type=" + 3 + "&" + Math.random(),
  504. width: "1000px",
  505. height: "1000px",
  506. callBack: function (iframeId) {
  507. var obj = top.frames[iframeId].submitForm();
  508. $("#txtVersion").val(obj.Code);
  509. top.frames[iframeId].Close();
  510. }
  511. })
  512. }
  513. //厂牌
  514. function GetBrand() {
  515. $.modalOpen({
  516. id: "GetBrand",
  517. title: "版本",
  518. url: "/WMS/ICSMTDOC/GetBatchCode?Type=" + 4 + "&" + Math.random(),
  519. width: "1000px",
  520. height: "1000px",
  521. callBack: function (iframeId) {
  522. var obj = top.frames[iframeId].submitForm();
  523. $("#txtBrand").val(obj.Code);
  524. top.frames[iframeId].Close();
  525. }
  526. })
  527. }
  528. //自由项1
  529. function GetcFree1() {
  530. $.modalOpen({
  531. id: "GetcFree1",
  532. title: "自由项1",
  533. url: "/WMS/ICSMTDOC/GetBatchCode?Type=" + 5 + "&" + Math.random(),
  534. width: "1000px",
  535. height: "1000px",
  536. callBack: function (iframeId) {
  537. var obj = top.frames[iframeId].submitForm();
  538. $("#txtcFree1").val(obj.Code);
  539. top.frames[iframeId].Close();
  540. }
  541. })
  542. }
  543. //自由项2
  544. function GetcFree2() {
  545. $.modalOpen({
  546. id: "GetcFree2",
  547. title: "自由项2",
  548. url: "/WMS/ICSMTDOC/GetBatchCode?Type=" + 6 + "&" + Math.random(),
  549. width: "1000px",
  550. height: "1000px",
  551. callBack: function (iframeId) {
  552. var obj = top.frames[iframeId].submitForm();
  553. $("#txtcFree2").val(obj.Code);
  554. top.frames[iframeId].Close();
  555. }
  556. })
  557. }
  558. //自由项3
  559. function GetcFree3() {
  560. $.modalOpen({
  561. id: "GetcFree3",
  562. title: "自由项3",
  563. url: "/WMS/ICSMTDOC/GetBatchCode?Type=" + 7 + "&" + Math.random(),
  564. width: "1000px",
  565. height: "1000px",
  566. callBack: function (iframeId) {
  567. var obj = top.frames[iframeId].submitForm();
  568. $("#txtcFree3").val(obj.Code);
  569. top.frames[iframeId].Close();
  570. }
  571. })
  572. }
  573. //自由项4
  574. function GetcFree4() {
  575. $.modalOpen({
  576. id: "GetcFree4",
  577. title: "自由项4",
  578. url: "/WMS/ICSMTDOC/GetBatchCode?Type=" + 8 + "&" + Math.random(),
  579. width: "1000px",
  580. height: "1000px",
  581. callBack: function (iframeId) {
  582. var obj = top.frames[iframeId].submitForm();
  583. $("#txtcFree4").val(obj.Code);
  584. top.frames[iframeId].Close();
  585. }
  586. })
  587. }
  588. //自由项5
  589. function GetcFree5() {
  590. $.modalOpen({
  591. id: "GetcFree5",
  592. title: "自由项5",
  593. url: "/WMS/ICSMTDOC/GetBatchCode?Type=" + 9 + "&" + Math.random(),
  594. width: "1000px",
  595. height: "1000px",
  596. callBack: function (iframeId) {
  597. var obj = top.frames[iframeId].submitForm();
  598. $("#txtcFree5").val(obj.Code);
  599. top.frames[iframeId].Close();
  600. }
  601. })
  602. }
  603. //自由项6
  604. function GetcFree6() {
  605. $.modalOpen({
  606. id: "GetcFree6",
  607. title: "自由项6",
  608. url: "/WMS/ICSMTDOC/GetBatchCode?Type=" + 10 + "&" + Math.random(),
  609. width: "1000px",
  610. height: "1000px",
  611. callBack: function (iframeId) {
  612. var obj = top.frames[iframeId].submitForm();
  613. $("#txtcFree6").val(obj.Code);
  614. top.frames[iframeId].Close();
  615. }
  616. })
  617. }
  618. //自由项7
  619. function GetcFree7() {
  620. $.modalOpen({
  621. id: "GetcFree7",
  622. title: "自由项7",
  623. url: "/WMS/ICSMTDOC/GetBatchCode?Type=" + 11 + "&" + Math.random(),
  624. width: "1000px",
  625. height: "1000px",
  626. callBack: function (iframeId) {
  627. var obj = top.frames[iframeId].submitForm();
  628. $("#txtcFree7").val(obj.Code);
  629. top.frames[iframeId].Close();
  630. }
  631. })
  632. }
  633. //自由项8
  634. function GetcFree8() {
  635. $.modalOpen({
  636. id: "GetcFree8",
  637. title: "自由项8",
  638. url: "/WMS/ICSMTDOC/GetBatchCode?Type=" + 12 + "&" + Math.random(),
  639. width: "1000px",
  640. height: "1000px",
  641. callBack: function (iframeId) {
  642. var obj = top.frames[iframeId].submitForm();
  643. $("#txtcFree8").val(obj.Code);
  644. top.frames[iframeId].Close();
  645. }
  646. })
  647. }
  648. //自由项9
  649. function GetcFree9() {
  650. $.modalOpen({
  651. id: "GetcFree9",
  652. title: "自由项9",
  653. url: "/WMS/ICSMTDOC/GetBatchCode?Type=" + 13 + "&" + Math.random(),
  654. width: "1000px",
  655. height: "1000px",
  656. callBack: function (iframeId) {
  657. var obj = top.frames[iframeId].submitForm();
  658. $("#txtcFree9").val(obj.Code);
  659. top.frames[iframeId].Close();
  660. }
  661. })
  662. }
  663. //自由项10
  664. function GetcFree10() {
  665. $.modalOpen({
  666. id: "GetcFree10",
  667. title: "自由项10",
  668. url: "/WMS/ICSMTDOC/GetBatchCode?Type=" + 14 + "&" + Math.random(),
  669. width: "1000px",
  670. height: "1000px",
  671. callBack: function (iframeId) {
  672. var obj = top.frames[iframeId].submitForm();
  673. $("#txtcFree10").val(obj.Code);
  674. top.frames[iframeId].Close();
  675. }
  676. })
  677. }
  678. function Close() {
  679. $.modalClose();
  680. }
  681. function reloadData() {
  682. }
  683. function LoadShow() {
  684. $.ajax({
  685. url: "/WMS/WMSCreateItemLot/GetLoadShow" + "?" + Math.random(),
  686. dataType: "json",
  687. async: false,
  688. success: function (data) {
  689. debugger;
  690. $("#LableProjectCode").text(data.rows[0].ColName);
  691. $("#LableBatchCode").text(data.rows[1].ColName);
  692. $("#LableVersion").text(data.rows[2].ColName);
  693. $("#LableBrand").text(data.rows[3].ColName);
  694. $("#LablecFree1").text(data.rows[4].ColName);
  695. $("#LablecFree2").text(data.rows[5].ColName);
  696. $("#LablecFree3").text(data.rows[6].ColName);
  697. $("#LablecFree4").text(data.rows[7].ColName);
  698. $("#LablecFree5").text(data.rows[8].ColName);
  699. $("#LablecFree6").text(data.rows[9].ColName);
  700. $("#LablecFree7").text(data.rows[10].ColName);
  701. $("#LablecFree8").text(data.rows[11].ColName);
  702. $("#LablecFree9").text(data.rows[12].ColName);
  703. $("#LablecFree10").text(data.rows[13].ColName);
  704. }
  705. });
  706. }
  707. </script>
  708. <div class="topPanel" style="height:50px">
  709. <div class="search">
  710. <table>
  711. <tr>
  712. <td>
  713. <label>条码:</label>
  714. </td>
  715. <td>
  716. <div class="input-group">
  717. <input id="txt_LotNo" type="text" class="form-control" placeholder="条码" style="width: 120px;">
  718. </div>
  719. </td>
  720. <td>
  721. <label>&nbsp;&nbsp; 物料编码:</label>
  722. </td>
  723. <td>
  724. <div class="input-group">
  725. <input id="txt_InvCode" type="text" class="form-control" placeholder="物料编码" style="width: 120px;">
  726. </div>
  727. </td>
  728. <td>
  729. <label>&nbsp;&nbsp; 仓库:</label>
  730. </td>
  731. <td>
  732. <div class="input-group">
  733. <input id="txt_WHCode" type="text" class="form-control" placeholder="仓库" style="width: 120px;">
  734. </div>
  735. </td>
  736. <td>
  737. <a id="Search" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="Init()"><i class="fa fa-pencil-square-o"></i>查询</a>
  738. </td>
  739. </tr>
  740. <tr></tr>
  741. </table>
  742. </div>
  743. </div>
  744. <div style="margin-right: 20px;">
  745. <table class="form">
  746. <thead>选择转换料品</thead>
  747. <tr>
  748. <th class="formTitle"><input id="InvCodebox" type="checkbox" onclick="OncheckBox1(this)"> 料品编码:</th>
  749. <td class="formValue">
  750. <input id="txtInvCode" type="text" disabled="disabled" class="form-control" onclick="GetInventory()" autocomplete="off" />
  751. </td>
  752. <th class="formTitle">转换原因:</th>
  753. <td class="formValue">
  754. <input id="txtMemo" type="text" class="form-control" />
  755. </td>
  756. </tr>
  757. <tr>
  758. <th>&nbsp;&nbsp;&nbsp;&nbsp;<input id="LocationCodebox" type="checkbox" onclick="OncheckBoxLocationCodebox(this)"> 库位:</th>
  759. <td class="formValue">
  760. <input id="txtLocationCode" type="text" disabled="disabled" class="form-control" onclick="GetLocationCode()" autocomplete="off" />
  761. <input id="txtWarehouseCode" style="display:none" />
  762. </td>
  763. <th class="formTitle">转换原因:</th>
  764. <td class="formValue">
  765. <input id="txtMemo" type="text" class="form-control" />
  766. </td>
  767. </tr>
  768. <tr>
  769. <th>&nbsp;&nbsp;&nbsp;&nbsp;<input id="ProductDatebox" type="checkbox" onclick="OncheckBoxProductDatebox(this)"> 生产日期:</th>
  770. @*<th class="formTitle">生产日期</th>*@
  771. <td class="formValue">
  772. <input type="text" disabled="disabled" name="ProductDate" id="ProductDate" class="form-control " onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="生产日期" style="height:30px" />
  773. </td>
  774. </tr>
  775. </table>
  776. </div>
  777. <div style="height:135px">
  778. <div style="width:260px" class="divbox" id="ProjectCode">
  779. <div class="formTitle divformTitle" style="width:75px"><input id="ProjectCodebox" type="checkbox" onclick="OncheckBoxProjectCode(this)"> <label id="LableProjectCode"></label></div>
  780. <div class="input-group divformValue">
  781. <input id="txtProjectCode" type="text" disabled="disabled" onclick="GetProjectCode()" autocomplete="off" />
  782. </div>
  783. </div>
  784. <div style="width:294px; margin-left: 15px;" class="divbox" id="BatchCode">
  785. <div class="formTitle divformTitle" style="width:52px"><input id="BatchCodebox" type="checkbox" onclick="OncheckBox2(this)"> <label id="LableBatchCode"></label></div>
  786. <div class="input-group divformValue">
  787. <table>
  788. <tr>
  789. <td>
  790. <input id="txtBatchCode" type="text" disabled="disabled" autocomplete="off" />
  791. </td>
  792. <td>
  793. <a id="SearchBatchCode" authorize="yes" style="margin-left:3px;" class="btn btn-primary" disabled="disabled" onclick="GetBatchCode()"><i class="fa fa-pencil-square-o"></i>...</a>
  794. </td>
  795. </tr>
  796. </table>
  797. </div>
  798. </div>
  799. <div style="width:260px" class="divbox" id="Version">
  800. <div class="formTitle divformTitle" style="width:75px"><input id="Versionbox" type="checkbox" onclick="OncheckBoxVersion(this)"><label id="LableVersion"></label></div>
  801. <div class="input-group divformValue">
  802. <input id="txtVersion" type="text" disabled="disabled" onclick="GetVersion()" autocomplete="off" />
  803. </div>
  804. </div>
  805. <div style="width:260px" class="divbox" id="Brand">
  806. <div class="formTitle divformTitle" style="width:75px"><input id="Brandbox" type="checkbox" onclick="OncheckBoxBrand(this)"><label id="LableBrand"></label></div>
  807. <div class="input-group divformValue">
  808. <input id="txtBrand" type="text" disabled="disabled" onclick="GetBrand()" autocomplete="off" />
  809. </div>
  810. </div>
  811. <div style="width:260px" class="divbox" id="cFree1">
  812. <div class="formTitle divformTitle" style="width:75px"><input id="cFree1box" type="checkbox" onclick="OncheckBoxcFree1(this)"><label id="LablecFree1"></label></div>
  813. <div class="input-group divformValue">
  814. <input id="txtcFree1" type="text" disabled="disabled" onclick="GetcFree1()" autocomplete="off" />
  815. </div>
  816. </div>
  817. <div style="width:260px" class="divbox" id="cFree2">
  818. <div class="formTitle divformTitle" style="width:75px"><input id="cFree2box" type="checkbox" onclick="OncheckBoxcFree2(this)"><label id="LablecFree2"></label></div>
  819. <div class="input-group divformValue">
  820. <input id="txtcFree2" type="text" disabled="disabled" onclick="GetcFree2()" autocomplete="off" />
  821. </div>
  822. </div>
  823. <div style="width:260px" class="divbox" id="cFree3">
  824. <div class="formTitle divformTitle" style="width:75px"><input id="cFree3box" type="checkbox" onclick="OncheckBoxcFree2(this)"><label id="LablecFree3"></label></div>
  825. <div class="input-group divformValue">
  826. <input id="txtcFree3" type="text" disabled="disabled" onclick="GetcFree3()" autocomplete="off" />
  827. </div>
  828. </div>
  829. <div style="width:260px" class="divbox" id="cFree4">
  830. <div class="formTitle divformTitle" style="width:75px"><input id="cFree4box" type="checkbox" onclick="OncheckBoxcFree4(this)"><label id="LablecFree4"></label></div>
  831. <div class="input-group divformValue">
  832. <input id="txtcFree4" type="text" disabled="disabled" onclick="GetcFree4()" autocomplete="off" />
  833. </div>
  834. </div>
  835. <div style="width:260px" class="divbox" id="cFree5">
  836. <div class="formTitle divformTitle" style="width:75px"><input id="cFree5box" type="checkbox" onclick="OncheckBoxcFree5(this)"><label id="LablecFree5"></label></div>
  837. <div class="input-group divformValue">
  838. <input id="txtcFree5" type="text" disabled="disabled" onclick="GetcFree5()" autocomplete="off" />
  839. </div>
  840. </div>
  841. <div style="width:260px" class="divbox" id="cFree6">
  842. <div class="formTitle divformTitle" style="width:75px"><input id="cFree6box" type="checkbox" onclick="OncheckBoxcFree6(this)"><label id="LablecFree6"></label></div>
  843. <div class="input-group divformValue">
  844. <input id="txtcFree6" type="text" disabled="disabled" onclick="GetcFree6()" autocomplete="off" />
  845. </div>
  846. </div>
  847. <div style="width:260px" class="divbox" id="cFree7">
  848. <div class="formTitle divformTitle" style="width:75px"><input id="cFree7box" type="checkbox" onclick="OncheckBoxcFree7(this)"><label id="LablecFree7"></label></div>
  849. <div class="input-group divformValue">
  850. <input id="txtcFree7" type="text" disabled="disabled" onclick="GetcFree7()" autocomplete="off" />
  851. </div>
  852. </div>
  853. <div style="width:260px" class="divbox" id="cFree8">
  854. <div class="formTitle divformTitle" style="width:75px"><input id="cFree8box" type="checkbox" onclick="OncheckBoxcFree8(this)"><label id="LablecFree8"></label></div>
  855. <div class="input-group divformValue">
  856. <input id="txtcFree8" type="text" disabled="disabled" onclick="GetcFree8()" autocomplete="off" />
  857. </div>
  858. </div>
  859. <div style="width:260px" class="divbox" id="cFree9">
  860. <div class="formTitle divformTitle" style="width:75px"><input id="cFree9box" type="checkbox" onclick="OncheckBoxcFree9(this)"> <label id="LablecFree9"></label></div>
  861. <div class="input-group divformValue">
  862. <input id="txtcFree9" type="text" disabled="disabled" onclick="GetcFree9()" autocomplete="off" />
  863. </div>
  864. </div>
  865. <div style="width:260px" class="divbox" id="cFree10">
  866. <div class="formTitle divformTitle" style="width:75px"><input id="cFree10box" type="checkbox" onclick="OncheckBoxcFree10(this)"> <label id="LablecFree10"></label></div>
  867. <div class="input-group divformValue">
  868. <input id="txtcFree10" type="text" disabled="disabled" onclick="GetcFree10()" autocomplete="off" />
  869. </div>
  870. </div>
  871. <div style="width:260px" class="divbox" id="Quantity">
  872. <div class="formTitle divformTitle" style="width:75px">
  873. <input id="Quantitybox" type="checkbox" onclick="Quantity(this)">
  874. <label>数量</label>
  875. </div>
  876. <div class="input-group divformValue">
  877. <input id="txtQuantity" type="text" disabled="disabled" autocomplete="off" />
  878. </div>
  879. </div>
  880. <!--<div class="divbox">-->
  881. @*<table>
  882. <tr>
  883. <th class="formTitle">生产日期</th>
  884. <td class="formValue">
  885. <input type="text" name="ProductDate" id="ProductDate" class="form-control " onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="生产日期" style="height:20px" />
  886. </td>
  887. </tr>
  888. </table>*@
  889. <!--<table class="form">
  890. <tr style="width:200px">
  891. <th class="formTitle">转换原因:</th>
  892. <td class="formValue">
  893. <input id="txtMemo" type="text" class="form-control" />
  894. </td>
  895. </tr>
  896. </table>
  897. </div>-->
  898. </div>
  899. <div class="gridPanel" id="gridPanel" style="margin-top:10px">
  900. <table id="gridList"></table>
  901. <div id="gridPager"></div>
  902. </div>