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.

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