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.

903 lines
33 KiB

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