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.

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