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.

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