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.

882 lines
32 KiB

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