爱思开
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.

1281 lines
60 KiB

2 years ago
  1. 
  2. @{
  3. ViewBag.Title = "Index";
  4. Layout = "~/Views/Shared/_Form.cshtml";
  5. }
  6. <script>
  7. var Type = $.request("Type");
  8. var ApplyNegCode = $.request("ApplyNegCode");
  9. var OApplyNegCode = $.request("OApplyNegCode");
  10. var SDNCode = $.request("SDNCode");
  11. var InCode = $.request("InCode");
  12. var Sequence = $.request("Sequence");
  13. var MOCode = $.request("MOCode");
  14. var ReturnCode = $.request("ReturnCode");
  15. var DNCode = $.request("DNCode");
  16. var ODNCode = $.request("ODNCode");
  17. var RCVCode = $.request("RCVCode");
  18. var LLApplyNegCode = $.request("LLApplyNegCode");
  19. var CLApplyNegCode = $.request("CLApplyNegCode");
  20. var WWLLOApplyNegCode = $.request("WWLLOApplyNegCode");
  21. var WWCLOApplyNegCode = $.request("WWCLOApplyNegCode");
  22. var FGGDMOCode = $.request("FGGDMOCode");
  23. debugger;
  24. var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  25. $(function () {
  26. $("#minPackQty").keyup(function () {
  27. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  28. }).bind("paste", function () { //CTR+V事件处理
  29. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  30. }).css("ime-mode", "disabled"); //CSS设置输入法不可用
  31. $("#thisCreateQty").keyup(function () {
  32. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  33. }).bind("paste", function () { //CTR+V事件处理
  34. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  35. }).css("ime-mode", "disabled"); //CSS设置输入法不可用
  36. $("#cretePageCount").keyup(function () {
  37. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  38. }).bind("paste", function () { //CTR+V事件处理
  39. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  40. }).css("ime-mode", "disabled"); //CSS设置输入法不可用
  41. var VenCode = "";
  42. var WorkPoint = "";
  43. debugger;
  44. //initControl();
  45. if (Type=='1') {
  46. if (!!ApplyNegCode && !!Sequence) {
  47. $.ajax({
  48. url: "/WMS/WMSCreateItemLot/GetSubGridJsonByCreate?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  49. //data: { keyValue: keyValue },
  50. dataType: "json",
  51. async: false,
  52. success: function (data) {
  53. debugger;
  54. $("#InvCode").val(data.rows[0].InvCode);
  55. $("#INVNAME").val(data.rows[0].InvName);
  56. $("#INVSTD").val(data.rows[0].InvStd);
  57. $("#Quantity").val(data.rows[0].Quantity);
  58. $("#CreatedQty").val(data.rows[0].CreatedQty);
  59. $("#thisCreateQty").val(data.rows[0].thisCreateQty);
  60. $("#YAmount").val(data.rows[0].Amount);
  61. $("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
  62. $("#EffectiveDays").val(data.rows[0].EffectiveDays);
  63. $("#INVUOM").val(data.rows[0].InvUnit);
  64. VenCode = data.rows[0].VenCode;
  65. WorkPoint = data.rows[0].WorkPoint;
  66. if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
  67. $("#thisCreateQty").attr("disabled", "disabled");
  68. $("#minPackQty").attr("disabled", "disabled");
  69. $("#VendorLotNo").attr("disabled", "disabled");
  70. }
  71. }
  72. });
  73. $.ajax({
  74. url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
  75. //data: { keyValue: keyValue },
  76. dataType: "json",
  77. async: false,
  78. success: function (data) {
  79. $("#VendorLotNo").val(data.VendorLotNo);
  80. }
  81. });
  82. }
  83. }
  84. if (Type=='2') {
  85. if (!!OApplyNegCode && !!Sequence) {
  86. $.ajax({
  87. url: "/WMS/WMSCreateItemLot/GetSubGridJsonWeiWaiByCreate?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  88. dataType: "json",
  89. async: false,
  90. success: function (data) {
  91. debugger;
  92. $("#InvCode").val(data.rows[0].InvCode);
  93. $("#INVNAME").val(data.rows[0].InvName);
  94. $("#INVSTD").val(data.rows[0].InvStd);
  95. $("#Quantity").val(data.rows[0].Quantity);
  96. $("#CreatedQty").val(data.rows[0].CreatedQty);
  97. $("#thisCreateQty").val(data.rows[0].thisCreateQty);
  98. $("#YAmount").val(data.rows[0].Amount);
  99. $("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
  100. $("#EffectiveDays").val(data.rows[0].EffectiveDays);
  101. $("#INVUOM").val(data.rows[0].InvUnit);
  102. VenCode = data.rows[0].VenCode;
  103. WorkPoint = data.rows[0].WorkPoint;
  104. if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
  105. $("#thisCreateQty").attr("disabled", "disabled");
  106. $("#minPackQty").attr("disabled", "disabled");
  107. $("#VendorLotNo").attr("disabled", "disabled");
  108. }
  109. }
  110. });
  111. $.ajax({
  112. url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
  113. dataType: "json",
  114. async: false,
  115. success: function (data) {
  116. $("#VendorLotNo").val(data.VendorLotNo);
  117. }
  118. });
  119. }
  120. }
  121. if (Type == '3') {
  122. if (!!MOCode && !!Sequence) {
  123. $.ajax({
  124. url: "/WMS/WMSCreateItemLot/GetSubGridJsonChengPingByCreate?MOCode=" + MOCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  125. dataType: "json",
  126. async: false,
  127. success: function (data) {
  128. debugger;
  129. $("#InvCode").val(data.rows[0].InvCode);
  130. $("#INVNAME").val(data.rows[0].InvName);
  131. $("#INVSTD").val(data.rows[0].InvStd);
  132. $("#Quantity").val(data.rows[0].Quantity);
  133. $("#CreatedQty").val(data.rows[0].CreatedQty);
  134. $("#thisCreateQty").val(data.rows[0].thisCreateQty);
  135. $("#YAmount").val(data.rows[0].Amount);
  136. $("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
  137. $("#EffectiveDays").val(data.rows[0].EffectiveDays);
  138. $("#INVUOM").val(data.rows[0].InvUnit);
  139. $("#ProjectCode").val(data.rows[0].ProjectCode);
  140. $("#BatchCode").val(data.rows[0].BatchCode);
  141. $("#Version").val(data.rows[0].Version);
  142. $("#Brand").val(data.rows[0].Brand);
  143. $("#cFree1").val(data.rows[0].cFree1);
  144. $("#cFree2").val(data.rows[0].cFree2);
  145. $("#cFree3").val(data.rows[0].cFree3);
  146. $("#cFree4").val(data.rows[0].cFree4);
  147. $("#cFree5").val(data.rows[0].cFree5);
  148. $("#cFree6").val(data.rows[0].cFree6);
  149. $("#cFree7").val(data.rows[0].cFree7);
  150. $("#cFree8").val(data.rows[0].cFree8);
  151. $("#cFree9").val(data.rows[0].cFree9);
  152. $("#cFree10").val(data.rows[0].cFree10);
  153. $("#ProjectCode").attr("disabled", "disabled");
  154. VenCode = data.rows[0].VenCode;
  155. WorkPoint = data.rows[0].WorkPoint;
  156. if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
  157. $("#thisCreateQty").attr("disabled", "disabled");
  158. $("#minPackQty").attr("disabled", "disabled");
  159. $("#VendorLotNo").attr("disabled", "disabled");
  160. }
  161. }
  162. });
  163. $.ajax({
  164. url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
  165. dataType: "json",
  166. async: false,
  167. success: function (data) {
  168. $("#VendorLotNo").val(data.VendorLotNo);
  169. }
  170. });
  171. }
  172. }
  173. if (Type == '4') {
  174. if (!!SDNCode && !!Sequence) {
  175. $.ajax({
  176. url: "/WMS/WMSCreateItemLot/GetSubGridJsonXiaoShouByCreate?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  177. dataType: "json",
  178. async: false,
  179. success: function (data) {
  180. debugger;
  181. $("#InvCode").val(data.rows[0].InvCode);
  182. $("#INVNAME").val(data.rows[0].InvName);
  183. $("#INVSTD").val(data.rows[0].InvStd);
  184. $("#Quantity").val(data.rows[0].Quantity);
  185. $("#CreatedQty").val(data.rows[0].CreatedQty);
  186. $("#thisCreateQty").val(data.rows[0].thisCreateQty);
  187. $("#YAmount").val(data.rows[0].Amount);
  188. $("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
  189. $("#EffectiveDays").val(data.rows[0].EffectiveDays);
  190. $("#INVUOM").val(data.rows[0].InvUnit);
  191. $("#ProjectCode").val(data.rows[0].ProjectCode);
  192. $("#BatchCode").val(data.rows[0].BatchCode);
  193. $("#Version").val(data.rows[0].Version);
  194. $("#Brand").val(data.rows[0].Brand);
  195. $("#cFree1").val(data.rows[0].cFree1);
  196. $("#cFree2").val(data.rows[0].cFree2);
  197. $("#cFree3").val(data.rows[0].cFree3);
  198. $("#cFree4").val(data.rows[0].cFree4);
  199. $("#cFree5").val(data.rows[0].cFree5);
  200. $("#cFree6").val(data.rows[0].cFree6);
  201. $("#cFree7").val(data.rows[0].cFree7);
  202. $("#cFree8").val(data.rows[0].cFree8);
  203. $("#cFree9").val(data.rows[0].cFree9);
  204. $("#cFree10").val(data.rows[0].cFree10);
  205. $("#ProjectCode").attr("disabled", "disabled");
  206. VenCode = data.rows[0].VenCode;
  207. WorkPoint = data.rows[0].WorkPoint;
  208. if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
  209. $("#thisCreateQty").attr("disabled", "disabled");
  210. $("#minPackQty").attr("disabled", "disabled");
  211. $("#VendorLotNo").attr("disabled", "disabled");
  212. }
  213. }
  214. });
  215. $.ajax({
  216. url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
  217. dataType: "json",
  218. async: false,
  219. success: function (data) {
  220. $("#VendorLotNo").val(data.VendorLotNo);
  221. }
  222. });
  223. }
  224. }
  225. if (Type == '5') {
  226. if (!!InCode && !!Sequence) {
  227. $.ajax({
  228. url: "/WMS/WMSCreateItemLot/GetSubGridJsonQiTaByCreate?InCode=" + InCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  229. dataType: "json",
  230. async: false,
  231. success: function (data) {
  232. debugger;
  233. $("#InvCode").val(data.rows[0].InvCode);
  234. $("#INVNAME").val(data.rows[0].InvName);
  235. $("#INVSTD").val(data.rows[0].InvStd);
  236. $("#Quantity").val(data.rows[0].Quantity);
  237. $("#CreatedQty").val(data.rows[0].CreatedQty);
  238. $("#thisCreateQty").val(data.rows[0].thisCreateQty);
  239. $("#INVUOM").val(data.rows[0].InvUnit);
  240. $("#YAmount").val(data.rows[0].Amount);
  241. $("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
  242. $("#EffectiveDays").val(data.rows[0].EffectiveDays);
  243. $("#ProjectCode").val(data.rows[0].ProjectCode);
  244. $("#BatchCode").val(data.rows[0].BatchCode);
  245. $("#Version").val(data.rows[0].Version);
  246. $("#Brand").val(data.rows[0].Brand);
  247. $("#cFree1").val(data.rows[0].cFree1);
  248. $("#cFree2").val(data.rows[0].cFree2);
  249. $("#cFree3").val(data.rows[0].cFree3);
  250. $("#cFree4").val(data.rows[0].cFree4);
  251. $("#cFree5").val(data.rows[0].cFree5);
  252. $("#cFree6").val(data.rows[0].cFree6);
  253. $("#cFree7").val(data.rows[0].cFree7);
  254. $("#cFree8").val(data.rows[0].cFree8);
  255. $("#cFree9").val(data.rows[0].cFree9);
  256. $("#cFree10").val(data.rows[0].cFree10);
  257. $("#BatchCode").attr("disabled", "disabled");
  258. $("#ProjectCode").attr("disabled", "disabled");
  259. VenCode = data.rows[0].VenCode;
  260. WorkPoint = data.rows[0].WorkPoint;
  261. if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
  262. $("#thisCreateQty").attr("disabled", "disabled");
  263. $("#minPackQty").attr("disabled", "disabled");
  264. $("#VendorLotNo").attr("disabled", "disabled");
  265. }
  266. }
  267. });
  268. $.ajax({
  269. url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
  270. //data: { keyValue: keyValue },
  271. dataType: "json",
  272. async: false,
  273. success: function (data) {
  274. $("#VendorLotNo").val(data.VendorLotNo);
  275. }
  276. });
  277. }
  278. }
  279. if (Type == '6') {
  280. if (!!ReturnCode && !!Sequence) {
  281. $.ajax({
  282. url: "/WMS/WMSCreateItemLot/GetSubGridJsonGuiHuanByCreate?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  283. dataType: "json",
  284. async: false,
  285. success: function (data) {
  286. debugger;
  287. $("#InvCode").val(data.rows[0].InvCode);
  288. $("#INVNAME").val(data.rows[0].InvName);
  289. $("#INVSTD").val(data.rows[0].InvStd);
  290. $("#Quantity").val(data.rows[0].Quantity);
  291. $("#CreatedQty").val(data.rows[0].CreatedQty);
  292. $("#thisCreateQty").val(data.rows[0].thisCreateQty);
  293. $("#INVUOM").val(data.rows[0].InvUnit);
  294. $("#YAmount").val(data.rows[0].Amount);
  295. $("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
  296. $("#EffectiveDays").val(data.rows[0].EffectiveDays);
  297. VenCode = data.rows[0].VenCode;
  298. WorkPoint = data.rows[0].WorkPoint;
  299. if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
  300. $("#thisCreateQty").attr("disabled", "disabled");
  301. $("#minPackQty").attr("disabled", "disabled");
  302. $("#VendorLotNo").attr("disabled", "disabled");
  303. }
  304. }
  305. });
  306. $.ajax({
  307. url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
  308. //data: { keyValue: keyValue },
  309. dataType: "json",
  310. async: false,
  311. success: function (data) {
  312. $("#VendorLotNo").val(data.VendorLotNo);
  313. }
  314. });
  315. }
  316. }
  317. if (Type == '7') {
  318. if (!!DNCode && !!Sequence) {
  319. $.ajax({
  320. url: "/WMS/WMSCreateItemLot/GetSubGridJsonSHDHByCreate?DNCode=" + DNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  321. dataType: "json",
  322. async: false,
  323. success: function (data) {
  324. debugger;
  325. $("#InvCode").val(data.rows[0].InvCode);
  326. $("#INVNAME").val(data.rows[0].InvName);
  327. $("#INVSTD").val(data.rows[0].InvStd);
  328. $("#Quantity").val(data.rows[0].Quantity);
  329. $("#CreatedQty").val(data.rows[0].CreatedQty);
  330. $("#thisCreateQty").val(data.rows[0].thisCreateQty);
  331. $("#YAmount").val(data.rows[0].Amount);
  332. $("#INVUOM").val(data.rows[0].InvUnit);
  333. $("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
  334. $("#EffectiveDays").val(data.rows[0].EffectiveDays);
  335. $("#ProjectCode").val(data.rows[0].ProjectCode);
  336. $("#BatchCode").val(data.rows[0].BatchCode);
  337. $("#Version").val(data.rows[0].Version);
  338. $("#Brand").val(data.rows[0].Brand);
  339. $("#cFree1").val(data.rows[0].cFree1);
  340. $("#cFree2").val(data.rows[0].cFree2);
  341. $("#cFree3").val(data.rows[0].cFree3);
  342. $("#cFree4").val(data.rows[0].cFree4);
  343. $("#cFree5").val(data.rows[0].cFree5);
  344. $("#cFree6").val(data.rows[0].cFree6);
  345. $("#cFree7").val(data.rows[0].cFree7);
  346. $("#cFree8").val(data.rows[0].cFree8);
  347. $("#cFree9").val(data.rows[0].cFree9);
  348. $("#cFree10").val(data.rows[0].cFree10);
  349. $("#ProjectCode").attr("disabled", "disabled");
  350. VenCode = data.rows[0].VenCode;
  351. WorkPoint = data.rows[0].WorkPoint;
  352. if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
  353. $("#thisCreateQty").attr("disabled", "disabled");
  354. $("#minPackQty").attr("disabled", "disabled");
  355. $("#VendorLotNo").attr("disabled", "disabled");
  356. }
  357. }
  358. });
  359. $.ajax({
  360. url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
  361. //data: { keyValue: keyValue },
  362. dataType: "json",
  363. async: false,
  364. success: function (data) {
  365. $("#VendorLotNo").val(data.VendorLotNo);
  366. }
  367. });
  368. }
  369. }
  370. if (Type == '8') {
  371. debugger;
  372. if (!!ODNCode && !!Sequence) {
  373. $.ajax({
  374. url: "/WMS/WMSCreateItemLot/GetSubGridJsonWWSHDHByCreate?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  375. dataType: "json",
  376. async: false,
  377. success: function (data) {
  378. debugger;
  379. $("#InvCode").val(data.rows[0].InvCode);
  380. $("#INVNAME").val(data.rows[0].InvName);
  381. $("#INVSTD").val(data.rows[0].InvStd);
  382. $("#Quantity").val(data.rows[0].Quantity);
  383. $("#CreatedQty").val(data.rows[0].CreatedQty);
  384. $("#thisCreateQty").val(data.rows[0].thisCreateQty);
  385. $("#YAmount").val(data.rows[0].Amount);
  386. $("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
  387. $("#EffectiveDays").val(data.rows[0].EffectiveDays);
  388. $("#INVUOM").val(data.rows[0].InvUnit);
  389. VenCode = data.rows[0].VenCode;
  390. WorkPoint = data.rows[0].WorkPoint;
  391. if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
  392. $("#thisCreateQty").attr("disabled", "disabled");
  393. $("#minPackQty").attr("disabled", "disabled");
  394. $("#VendorLotNo").attr("disabled", "disabled");
  395. }
  396. }
  397. });
  398. $.ajax({
  399. url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
  400. //data: { keyValue: keyValue },
  401. dataType: "json",
  402. async: false,
  403. success: function (data) {
  404. $("#VendorLotNo").val(data.VendorLotNo);
  405. }
  406. });
  407. }
  408. }
  409. if (Type == '9') {
  410. debugger;
  411. if (!!RCVCode && !!Sequence) {
  412. $.ajax({
  413. url: "/WMS/WMSCreateItemLot/GetSubGridJsonKLCPRKByCreate?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  414. dataType: "json",
  415. async: false,
  416. success: function (data) {
  417. debugger;
  418. $("#InvCode").val(data.rows[0].InvCode);
  419. $("#INVNAME").val(data.rows[0].InvName);
  420. $("#INVSTD").val(data.rows[0].InvStd);
  421. $("#Quantity").val(data.rows[0].Quantity);
  422. $("#CreatedQty").val(data.rows[0].CreatedQty);
  423. $("#thisCreateQty").val(data.rows[0].thisCreateQty);
  424. $("#YAmount").val(data.rows[0].Amount);
  425. $("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
  426. $("#EffectiveDays").val(data.rows[0].EffectiveDays);
  427. $("#INVUOM").val(data.rows[0].InvUnit);
  428. VenCode = data.rows[0].VenCode;
  429. WorkPoint = data.rows[0].WorkPoint;
  430. if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
  431. $("#thisCreateQty").attr("disabled", "disabled");
  432. $("#minPackQty").attr("disabled", "disabled");
  433. $("#VendorLotNo").attr("disabled", "disabled");
  434. }
  435. }
  436. });
  437. $.ajax({
  438. url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
  439. //data: { keyValue: keyValue },
  440. dataType: "json",
  441. async: false,
  442. success: function (data) {
  443. $("#VendorLotNo").val(data.VendorLotNo);
  444. }
  445. });
  446. }
  447. }
  448. if (Type == '10') {
  449. if (!!DNCode && !!Sequence) {
  450. $.ajax({
  451. url: "/WMS/WMSCreateItemLot/GetSubGridJsonJSDByCreate?DNCode=" + DNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  452. dataType: "json",
  453. async: false,
  454. success: function (data) {
  455. debugger;
  456. $("#InvCode").val(data.rows[0].InvCode);
  457. $("#INVNAME").val(data.rows[0].InvName);
  458. $("#INVSTD").val(data.rows[0].InvStd);
  459. $("#Quantity").val(data.rows[0].Quantity);
  460. $("#CreatedQty").val(data.rows[0].CreatedQty);
  461. $("#thisCreateQty").val(data.rows[0].thisCreateQty);
  462. $("#YAmount").val(data.rows[0].Amount);
  463. $("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
  464. $("#EffectiveDays").val(data.rows[0].EffectiveDays);
  465. $("#INVUOM").val(data.rows[0].InvUnit);
  466. VenCode = data.rows[0].VenCode;
  467. WorkPoint = data.rows[0].WorkPoint;
  468. if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
  469. $("#thisCreateQty").attr("disabled", "disabled");
  470. $("#minPackQty").attr("disabled", "disabled");
  471. $("#VendorLotNo").attr("disabled", "disabled");
  472. }
  473. }
  474. });
  475. $.ajax({
  476. url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
  477. //data: { keyValue: keyValue },
  478. dataType: "json",
  479. async: false,
  480. success: function (data) {
  481. $("#VendorLotNo").val(data.VendorLotNo);
  482. }
  483. });
  484. }
  485. }
  486. if (Type == '11') {
  487. debugger;
  488. if (!!ODNCode && !!Sequence) {
  489. $.ajax({
  490. url: "/WMS/WMSCreateItemLot/GetSubGridJsonWWJSDByCreate?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  491. dataType: "json",
  492. async: false,
  493. success: function (data) {
  494. debugger;
  495. $("#InvCode").val(data.rows[0].InvCode);
  496. $("#INVNAME").val(data.rows[0].InvName);
  497. $("#INVSTD").val(data.rows[0].InvStd);
  498. $("#Quantity").val(data.rows[0].Quantity);
  499. $("#CreatedQty").val(data.rows[0].CreatedQty);
  500. $("#thisCreateQty").val(data.rows[0].thisCreateQty);
  501. $("#YAmount").val(data.rows[0].Amount);
  502. $("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
  503. $("#EffectiveDays").val(data.rows[0].EffectiveDays);
  504. $("#INVUOM").val(data.rows[0].InvUnit);
  505. VenCode = data.rows[0].VenCode;
  506. WorkPoint = data.rows[0].WorkPoint;
  507. if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
  508. $("#thisCreateQty").attr("disabled", "disabled");
  509. $("#minPackQty").attr("disabled", "disabled");
  510. $("#VendorLotNo").attr("disabled", "disabled");
  511. }
  512. }
  513. });
  514. $.ajax({
  515. url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
  516. //data: { keyValue: keyValue },
  517. dataType: "json",
  518. async: false,
  519. success: function (data) {
  520. $("#VendorLotNo").val(data.VendorLotNo);
  521. }
  522. });
  523. }
  524. }
  525. if (Type == '12') {
  526. if (!!LLApplyNegCode && !!Sequence) {
  527. $.ajax({
  528. url: "/WMS/WMSCreateItemLot/GetSubGridJsonLLSQDByCreate?ApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  529. //data: { keyValue: keyValue },
  530. dataType: "json",
  531. async: false,
  532. success: function (data) {
  533. debugger;
  534. $("#InvCode").val(data.rows[0].InvCode);
  535. $("#INVNAME").val(data.rows[0].InvName);
  536. $("#INVSTD").val(data.rows[0].InvStd);
  537. $("#Quantity").val(data.rows[0].Quantity);
  538. $("#CreatedQty").val(data.rows[0].CreatedQty);
  539. $("#thisCreateQty").val(data.rows[0].thisCreateQty);
  540. $("#YAmount").val(data.rows[0].Amount);
  541. $("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
  542. $("#EffectiveDays").val(data.rows[0].EffectiveDays);
  543. $("#INVUOM").val(data.rows[0].InvUnit);
  544. VenCode = data.rows[0].VenCode;
  545. WorkPoint = data.rows[0].WorkPoint;
  546. if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
  547. $("#thisCreateQty").attr("disabled", "disabled");
  548. $("#minPackQty").attr("disabled", "disabled");
  549. $("#VendorLotNo").attr("disabled", "disabled");
  550. }
  551. }
  552. });
  553. $.ajax({
  554. url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
  555. //data: { keyValue: keyValue },
  556. dataType: "json",
  557. async: false,
  558. success: function (data) {
  559. $("#VendorLotNo").val(data.VendorLotNo);
  560. }
  561. });
  562. }
  563. }
  564. if (Type == '13') {
  565. if (!!CLApplyNegCode && !!Sequence) {
  566. $.ajax({
  567. url: "/WMS/WMSCreateItemLot/GetSubGridJsonCLCKByCreate?ApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  568. //data: { keyValue: keyValue },
  569. dataType: "json",
  570. async: false,
  571. success: function (data) {
  572. debugger;
  573. $("#InvCode").val(data.rows[0].InvCode);
  574. $("#INVNAME").val(data.rows[0].InvName);
  575. $("#INVSTD").val(data.rows[0].InvStd);
  576. $("#Quantity").val(data.rows[0].Quantity);
  577. $("#CreatedQty").val(data.rows[0].CreatedQty);
  578. $("#thisCreateQty").val(data.rows[0].thisCreateQty);
  579. $("#YAmount").val(data.rows[0].Amount);
  580. $("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
  581. $("#EffectiveDays").val(data.rows[0].EffectiveDays);
  582. $("#INVUOM").val(data.rows[0].InvUnit);
  583. VenCode = data.rows[0].VenCode;
  584. WorkPoint = data.rows[0].WorkPoint;
  585. if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
  586. $("#thisCreateQty").attr("disabled", "disabled");
  587. $("#minPackQty").attr("disabled", "disabled");
  588. $("#VendorLotNo").attr("disabled", "disabled");
  589. }
  590. }
  591. });
  592. $.ajax({
  593. url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
  594. //data: { keyValue: keyValue },
  595. dataType: "json",
  596. async: false,
  597. success: function (data) {
  598. $("#VendorLotNo").val(data.VendorLotNo);
  599. }
  600. });
  601. }
  602. }
  603. if (Type == '14') {
  604. if (!!WWLLOApplyNegCode && !!Sequence) {
  605. $.ajax({
  606. url: "/WMS/WMSCreateItemLot/GetSubGridJsonWWLLByCreate?OApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  607. dataType: "json",
  608. async: false,
  609. success: function (data) {
  610. debugger;
  611. $("#InvCode").val(data.rows[0].InvCode);
  612. $("#INVNAME").val(data.rows[0].InvName);
  613. $("#INVSTD").val(data.rows[0].InvStd);
  614. $("#Quantity").val(data.rows[0].Quantity);
  615. $("#CreatedQty").val(data.rows[0].CreatedQty);
  616. $("#thisCreateQty").val(data.rows[0].thisCreateQty);
  617. $("#YAmount").val(data.rows[0].Amount);
  618. $("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
  619. $("#EffectiveDays").val(data.rows[0].EffectiveDays);
  620. $("#INVUOM").val(data.rows[0].InvUnit);
  621. VenCode = data.rows[0].VenCode;
  622. WorkPoint = data.rows[0].WorkPoint;
  623. if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
  624. $("#thisCreateQty").attr("disabled", "disabled");
  625. $("#minPackQty").attr("disabled", "disabled");
  626. $("#VendorLotNo").attr("disabled", "disabled");
  627. }
  628. }
  629. });
  630. $.ajax({
  631. url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
  632. dataType: "json",
  633. async: false,
  634. success: function (data) {
  635. $("#VendorLotNo").val(data.VendorLotNo);
  636. }
  637. });
  638. }
  639. }
  640. if (Type == '15') {
  641. if (!!WWCLOApplyNegCode && !!Sequence) {
  642. $.ajax({
  643. url: "/WMS/WMSCreateItemLot/GetSubGridJsonWWCLByCreate?OApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  644. dataType: "json",
  645. async: false,
  646. success: function (data) {
  647. debugger;
  648. $("#InvCode").val(data.rows[0].InvCode);
  649. $("#INVNAME").val(data.rows[0].InvName);
  650. $("#INVSTD").val(data.rows[0].InvStd);
  651. $("#Quantity").val(data.rows[0].Quantity);
  652. $("#CreatedQty").val(data.rows[0].CreatedQty);
  653. $("#thisCreateQty").val(data.rows[0].thisCreateQty);
  654. $("#YAmount").val(data.rows[0].Amount);
  655. $("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
  656. $("#EffectiveDays").val(data.rows[0].EffectiveDays);
  657. $("#INVUOM").val(data.rows[0].InvUnit);
  658. VenCode = data.rows[0].VenCode;
  659. WorkPoint = data.rows[0].WorkPoint;
  660. if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
  661. $("#thisCreateQty").attr("disabled", "disabled");
  662. $("#minPackQty").attr("disabled", "disabled");
  663. $("#VendorLotNo").attr("disabled", "disabled");
  664. }
  665. }
  666. });
  667. $.ajax({
  668. url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
  669. dataType: "json",
  670. async: false,
  671. success: function (data) {
  672. $("#VendorLotNo").val(data.VendorLotNo);
  673. }
  674. });
  675. }
  676. }
  677. if (Type == '16') {
  678. if (!!FGGDMOCode && !!Sequence) {
  679. $.ajax({
  680. url: "/WMS/WMSCreateItemLot/GetSubGridJsonFGGDCreate?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  681. dataType: "json",
  682. async: false,
  683. success: function (data) {
  684. debugger;
  685. $("#InvCode").val(data.rows[0].InvCode);
  686. $("#INVNAME").val(data.rows[0].InvName);
  687. $("#INVSTD").val(data.rows[0].InvStd);
  688. $("#Quantity").val(data.rows[0].Quantity);
  689. $("#CreatedQty").val(data.rows[0].CreatedQty);
  690. $("#thisCreateQty").val(data.rows[0].thisCreateQty);
  691. $("#YAmount").val(data.rows[0].Amount);
  692. $("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
  693. $("#EffectiveDays").val(data.rows[0].EffectiveDays);
  694. $("#INVUOM").val(data.rows[0].InvUnit);
  695. VenCode = data.rows[0].VenCode;
  696. WorkPoint = data.rows[0].WorkPoint;
  697. if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
  698. $("#thisCreateQty").attr("disabled", "disabled");
  699. $("#minPackQty").attr("disabled", "disabled");
  700. $("#VendorLotNo").attr("disabled", "disabled");
  701. }
  702. }
  703. });
  704. $.ajax({
  705. url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
  706. dataType: "json",
  707. async: false,
  708. success: function (data) {
  709. $("#VendorLotNo").val(data.VendorLotNo);
  710. }
  711. });
  712. }
  713. }
  714. //查询后台自由项表(控制前台显示)
  715. $.ajax({
  716. url: "/WMS/WMSCreateItemLot/SelectICSExtensionEnable" + "?" + Math.random(),
  717. dataType: "json",
  718. async: false,
  719. success: function (data) {
  720. debugger;
  721. if (data != null && data.length > 0) {
  722. for (var i = 0; i < data.length; i++) {
  723. if (data[i].ColCode == 'ProjectCode') { $("#trProjectCode").css('display', 'none'); }
  724. if (data[i].ColCode == 'BatchCode') { $("#trBatchCode").css('display', 'none'); }
  725. if (data[i].ColCode == 'Version') { $("#trVersion").css('display', 'none'); }
  726. if (data[i].ColCode == 'Brand') { $("#trBrand").css('display', 'none'); }
  727. if (data[i].ColCode == 'cFree1') { $("#trcFree1").css('display', 'none'); }
  728. if (data[i].ColCode == 'cFree2') { $("#trcFree2").css('display', 'none'); }
  729. if (data[i].ColCode == 'cFree3') { $("#trcFree3").css('display', 'none'); }
  730. if (data[i].ColCode == 'cFree4') { $("#trcFree4").css('display', 'none'); }
  731. if (data[i].ColCode == 'cFree5') { $("#trcFree5").css('display', 'none'); }
  732. if (data[i].ColCode == 'cFree6') { $("#trcFree6").css('display', 'none'); }
  733. if (data[i].ColCode == 'cFree7') { $("#trcFree7").css('display', 'none'); }
  734. if (data[i].ColCode == 'cFree8') { $("#trcFree8").css('display', 'none'); }
  735. if (data[i].ColCode == 'cFree9') { $("#trcFree9").css('display', 'none'); }
  736. if (data[i].ColCode == 'cFree10') { $("#trcFree10").css('display', 'none'); }
  737. //if (i >= 4) {
  738. // if (data[i].ColName == 'cFree' + (i - 3)) {$("#trcFree'" + (i - 3) + "'").css('display', 'none');}
  739. //}
  740. }
  741. }
  742. }
  743. });
  744. $("#minPackQty").change(minPackQty_Change);
  745. $("#thisCreateQty").change(thisCreateQty_Change);
  746. $("#cretePageCount").change(function () {
  747. var createPageCount = $("#cretePageCount").val() * 1;//本次生成张数
  748. createPageCount = createPageCount.toFixed(0);
  749. if (createPageCount <= 0) {
  750. $.modalAlertNew("WMS00102");
  751. return false;
  752. }
  753. });
  754. });
  755. //最小包装量值改变事件
  756. function minPackQty_Change() {
  757. var thisCreateQty = $("#thisCreateQty").val() * 1;//本次生成数量
  758. thisCreateQty = thisCreateQty.toFixed(2);
  759. var minPackQty = $("#minPackQty").val() * 1;//最小包装量
  760. minPackQty = minPackQty.toFixed(2);
  761. var createPageCount = $("#cretePageCount").val() * 1;//本次生成张数
  762. var Quantity = $("#Quantity").val() * 1;//数量
  763. var YAmount = $("#YAmount").val() * 1;//辅计量数量
  764. createPageCount = createPageCount.toFixed(0);
  765. if (minPackQty <= 0) {
  766. $.modalAlertNew("WMS00102");
  767. return false;
  768. }
  769. //不可以整除,生成张数+1;
  770. if (thisCreateQty % minPackQty != 0) {
  771. createPageCount = parseInt(thisCreateQty / minPackQty) + 1;
  772. $("#cretePageCount").val(createPageCount);
  773. }
  774. else {
  775. createPageCount = parseInt(thisCreateQty / minPackQty);
  776. $("#cretePageCount").val(createPageCount);
  777. }
  778. var Ratio = YAmount / Quantity * minPackQty;
  779. $("#Amount").val(Ratio);//自动计算出的条码辅计量数量
  780. }
  781. //本次生成数量值改变事件
  782. function thisCreateQty_Change() {
  783. debugger;
  784. var Quantity_str = $("#Quantity").val() * 1;//采购订单总数
  785. var CreatedQty_str = $("#CreatedQty").val() * 1;//已生成数量
  786. var thisCreateQty_str = $("#thisCreateQty").val() * 1;//本次生成数量
  787. var Quantity = Number(Quantity_str);
  788. var CreatedQty = Number(CreatedQty_str);
  789. var thisCreateQty = Number(thisCreateQty_str);
  790. if (thisCreateQty <= 0) {
  791. $.modalAlertNew("WMS00102");
  792. return false;
  793. }
  794. if (thisCreateQty <= 0 || thisCreateQty > (Quantity - CreatedQty)) {
  795. var maxQty = Quantity - CreatedQty;
  796. $.modalAlertNew("WMS00103",maxQty);
  797. //$.modalAlert("请输入0到" + maxQty + "范围内的数!");
  798. $("#thisCreateQty").val("");
  799. return false;
  800. } else {
  801. minPackQty_Change();
  802. return true;
  803. }
  804. var minPackQty = $("#minPackQty").val() * 1;//最小包装量
  805. minPackQty_Change();
  806. }
  807. function submitForm() {
  808. debugger;
  809. if (!$('#form1').formValid()) {
  810. return false;
  811. }
  812. var thisCreateQty = $("#thisCreateQty").val() * 1;//本次生成数量
  813. thisCreateQty = thisCreateQty.toFixed(2);
  814. var minPackQty = $("#minPackQty").val() * 1;//最小包装量
  815. minPackQty = minPackQty.toFixed(2);
  816. var createPageCount = $("#cretePageCount").val() * 1;//本次生成张数
  817. createPageCount = createPageCount.toFixed(0);
  818. //校验
  819. var flag1 = thisCreateQty_Change();
  820. //var flag2 = CheckNum();
  821. var VendorLot = $("#VendorLotNo").val();
  822. if (flag1) { }
  823. else {
  824. return false;
  825. }
  826. var Quantity = $("#Quantity").val() * 1;//采购订单总数
  827. Quantity = Quantity.toFixed(2);
  828. var CreatedQty = $("#CreatedQty").val() * 1;//已生成数量
  829. CreatedQty = CreatedQty.toFixed(2);
  830. if (Quantity == CreatedQty ) {
  831. return false;
  832. }
  833. var ExpirationDate = '';//条码失效日期
  834. var EffectiveEnable = $("#EffectiveEnable").val();//料品是否启用有效天数
  835. var EffectiveDays = $("#EffectiveDays").val();//料品有效期天数
  836. var PRODUCTDATE = $("#PRODUCTDATE").val();//条码生产日期
  837. if (EffectiveEnable=='1') {
  838. var ExpirationDate= dateChange(EffectiveDays, PRODUCTDATE);
  839. } else {
  840. var ExpirationDate = '2999-12-31 00:00:00.000';
  841. }
  842. var InvCode = $("#InvCode").val();
  843. var Enable;
  844. $.ajax({
  845. url: "/WMS/WMSCreateItemLot/GetBatchEnable?InvCode=" + InvCode ,
  846. dataType: "json",
  847. async: false,
  848. success: function (data) {
  849. Enable = data;
  850. }
  851. });
  852. if (Enable == true) {
  853. if ($("#BatchCode").val() == '') {
  854. $.modalAlertNew("WMS00109");
  855. return false;
  856. }
  857. }
  858. var obj = {
  859. thisCreateQty: thisCreateQty,
  860. minPackQty: minPackQty,
  861. createPageCount: createPageCount,
  862. VendorLot: VendorLot,
  863. PRODUCTDATE: PRODUCTDATE,
  864. ExpirationDate:ExpirationDate,
  865. Amount: $("#Amount").val(),
  866. //自由项
  867. ProjectCode: $("#ProjectCode").val(),
  868. BatchCode: $("#BatchCode").val(),
  869. Version: $("#Version").val(),
  870. Brand: $("#Brand").val(),
  871. cFree1: $("#cFree1").val(),
  872. cFree2: $("#cFree2").val(),
  873. cFree3: $("#cFree3").val(),
  874. cFree4: $("#cFree4").val(),
  875. cFree5: $("#cFree5").val(),
  876. cFree6: $("#cFree6").val(),
  877. cFree7: $("#cFree7").val(),
  878. cFree8: $("#cFree8").val(),
  879. cFree9: $("#cFree9").val(),
  880. cFree10: $("#cFree10").val(),
  881. }
  882. if (Type=='1') {
  883. $.submitForm({
  884. url: "/WMS/WMSCreateItemLot/SubmitForm?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  885. param: {
  886. keyValue: JSON.stringify(obj)
  887. },
  888. success: function () {
  889. $.currentWindow().$("#gridList").trigger("reloadGrid");
  890. }
  891. })
  892. }
  893. if (Type=='2') {
  894. $.submitForm({
  895. url: "/WMS/WMSCreateItemLot/SubmitFormWeiWai?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  896. param: {
  897. keyValue: JSON.stringify(obj)
  898. },
  899. success: function () {
  900. $.currentWindow().$("#gridList").trigger("reloadGrid");
  901. }
  902. })
  903. }
  904. if (Type == '3') {
  905. $.submitForm({
  906. url: "/WMS/WMSCreateItemLot/SubmitFormChengPing?MOCode=" + MOCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  907. param: {
  908. keyValue: JSON.stringify(obj)
  909. },
  910. success: function () {
  911. $.currentWindow().$("#gridList").trigger("reloadGrid");
  912. }
  913. })
  914. }
  915. if (Type == '4') {
  916. $.submitForm({
  917. url: "/WMS/WMSCreateItemLot/SubmitFormXiaoShou?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  918. param: {
  919. keyValue: JSON.stringify(obj)
  920. },
  921. success: function () {
  922. $.currentWindow().$("#gridList").trigger("reloadGrid");
  923. }
  924. })
  925. }
  926. if (Type == '5') {
  927. $.submitForm({
  928. url: "/WMS/WMSCreateItemLot/SubmitFormQiTa?InCode=" + InCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  929. param: {
  930. keyValue: JSON.stringify(obj)
  931. },
  932. success: function () {
  933. $.currentWindow().$("#gridList").trigger("reloadGrid");
  934. }
  935. })
  936. }
  937. if (Type == '6') {
  938. $.submitForm({
  939. url: "/WMS/WMSCreateItemLot/SubmitFormGuiHuan?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  940. param: {
  941. keyValue: JSON.stringify(obj)
  942. },
  943. success: function () {
  944. $.currentWindow().$("#gridList").trigger("reloadGrid");
  945. }
  946. })
  947. }
  948. if (Type == '7') {
  949. $.submitForm({
  950. url: "/WMS/WMSCreateItemLot/SubmitFormSHDH?DNCode=" + DNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  951. param: {
  952. keyValue: JSON.stringify(obj)
  953. },
  954. success: function () {
  955. $.currentWindow().$("#gridList").trigger("reloadGrid");
  956. }
  957. })
  958. }
  959. if (Type == '8') {
  960. $.submitForm({
  961. url: "/WMS/WMSCreateItemLot/SubmitFormWWSHDH?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  962. param: {
  963. keyValue: JSON.stringify(obj)
  964. },
  965. success: function () {
  966. $.currentWindow().$("#gridList").trigger("reloadGrid");
  967. }
  968. })
  969. }
  970. if (Type == '9') {
  971. $.submitForm({
  972. url: "/WMS/WMSCreateItemLot/SubmitFormKLCPRK?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  973. param: {
  974. keyValue: JSON.stringify(obj)
  975. },
  976. success: function () {
  977. $.currentWindow().$("#gridList").trigger("reloadGrid");
  978. }
  979. })
  980. }
  981. if (Type == '10') {
  982. $.submitForm({
  983. url: "/WMS/WMSCreateItemLot/SubmitFormJSD?DNCode=" + DNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  984. param: {
  985. keyValue: JSON.stringify(obj)
  986. },
  987. success: function () {
  988. $.currentWindow().$("#gridList").trigger("reloadGrid");
  989. }
  990. })
  991. }
  992. if (Type == '11') {
  993. $.submitForm({
  994. url: "/WMS/WMSCreateItemLot/SubmitFormWWJSD?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  995. param: {
  996. keyValue: JSON.stringify(obj)
  997. },
  998. success: function () {
  999. $.currentWindow().$("#gridList").trigger("reloadGrid");
  1000. }
  1001. })
  1002. }
  1003. if (Type == '12') {
  1004. $.submitForm({
  1005. url: "/WMS/WMSCreateItemLot/SubmitFormLLSQTL?ApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  1006. param: {
  1007. keyValue: JSON.stringify(obj)
  1008. },
  1009. success: function () {
  1010. $.currentWindow().$("#gridList").trigger("reloadGrid");
  1011. }
  1012. })
  1013. }
  1014. if (Type == '13') {
  1015. $.submitForm({
  1016. url: "/WMS/WMSCreateItemLot/SubmitFormCLCKT?ApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  1017. param: {
  1018. keyValue: JSON.stringify(obj)
  1019. },
  1020. success: function () {
  1021. $.currentWindow().$("#gridList").trigger("reloadGrid");
  1022. }
  1023. })
  1024. }
  1025. if (Type == '14') {
  1026. $.submitForm({
  1027. url: "/WMS/WMSCreateItemLot/SubmitFormWWLL?OApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  1028. param: {
  1029. keyValue: JSON.stringify(obj)
  1030. },
  1031. success: function () {
  1032. $.currentWindow().$("#gridList").trigger("reloadGrid");
  1033. }
  1034. })
  1035. }
  1036. if (Type == '15') {
  1037. $.submitForm({
  1038. url: "/WMS/WMSCreateItemLot/SubmitFormWWCL?OApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  1039. param: {
  1040. keyValue: JSON.stringify(obj)
  1041. },
  1042. success: function () {
  1043. $.currentWindow().$("#gridList").trigger("reloadGrid");
  1044. }
  1045. })
  1046. }
  1047. if (Type == '16') {
  1048. $.submitForm({
  1049. url: "/WMS/WMSCreateItemLot/SubmitFormFGGD?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
  1050. param: {
  1051. keyValue: JSON.stringify(obj)
  1052. },
  1053. success: function () {
  1054. $.currentWindow().$("#gridList").trigger("reloadGrid");
  1055. }
  1056. })
  1057. }
  1058. }
  1059. function dateChange(num ,date ) {
  1060. if (!date) {
  1061. date = new Date();//没有传入值时,默认是当前日期
  1062. date = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
  1063. }
  1064. date += " 00:00:00";//设置为当天凌晨12点
  1065. date = Date.parse(new Date(date))/1000;//转换为时间戳
  1066. date += (86400) * num;//修改后的时间戳
  1067. var newDate = new Date(parseInt(date) * 1000);//转换为时间
  1068. return newDate.getFullYear() + '-' + (newDate.getMonth() + 1) + '-' + newDate.getDate();
  1069. }
  1070. </script>
  1071. <form id="form1">
  1072. <div style="padding-top: 20px; margin-right: 20px;">
  1073. <table class="form">
  1074. <tr>
  1075. <th class="formTitle">料品编码</th>
  1076. <td class="formValue">
  1077. <input id="InvCode" name="InvCode" type="text" class="form-control " disabled="disabled" />
  1078. </td>
  1079. </tr>
  1080. <tr>
  1081. <th class="formTitle">料品名称</th>
  1082. <td class="formValue">
  1083. <input id="INVNAME" name="INVNAME" type="text" class="form-control " disabled="disabled" />
  1084. </td>
  1085. </tr>
  1086. <tr>
  1087. <th class="formTitle">规格型号</th>
  1088. <td class="formValue">
  1089. <input id="INVSTD" name="INVSTD" type="text" class="form-control " disabled="disabled" />
  1090. </td>
  1091. </tr>
  1092. <tr>
  1093. <th class="formTitle">计量单位</th>
  1094. <td class="formValue">
  1095. <input id="INVUOM" name="INVUOM" type="text" class="form-control " disabled="disabled" />
  1096. </td>
  1097. </tr>
  1098. <tr>
  1099. <th class="formTitle">数量</th>
  1100. <td class="formValue">
  1101. <input id="Quantity" name="Quantity" type="text" class="form-control " />
  1102. <input id="YAmount" name="YAmount" type="text" style="display:none" />
  1103. </td>
  1104. </tr>
  1105. <tr>
  1106. <th class="formTitle">已生成条码数量</th>
  1107. <td class="formValue">
  1108. <input id="CreatedQty" name="CreatedQty" type="text" class="form-control " />
  1109. </td>
  1110. </tr>
  1111. <tr>
  1112. <th class="formTitle"><span style="color: red;">*</span>本次生成数量</th>
  1113. <td class="formValue">
  1114. <input id="thisCreateQty" name="thisCreateQty" type="text" class="form-control required" placeholder="请输入本次生成数量" />
  1115. </td>
  1116. </tr>
  1117. <tr>
  1118. <th class="formTitle"><span style="color: red;">*</span>最小包装量</th>
  1119. <td class="formValue">
  1120. <input id="minPackQty" name="minPackQty" type="text" class="form-control required" placeholder="请输入最小包装量" />
  1121. </td>
  1122. </tr>
  1123. <tr>
  1124. <th class="formTitle"><span style="color: red;">*</span>生产日期</th>
  1125. <td class="formValue">
  1126. <input type="text" name="PRODUCTDATE" id="PRODUCTDATE" class="form-control required" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="生产日期" />
  1127. <input id="EffectiveEnable" name="EffectiveEnable" type="text" style="display:none" />
  1128. <input id="EffectiveDays" name="EffectiveDays" type="text" style="display:none" />
  1129. </td>
  1130. </tr>
  1131. <tr>
  1132. <th class="formTitle"><span style="color: red;">*</span>生成张数</th>
  1133. <td class="formValue">
  1134. <input id="cretePageCount" name="cretePageCount" class="form-control required" disabled="disabled" type="text" placeholder="请输入生成张数" />
  1135. </td>
  1136. </tr>
  1137. <tr style="display:none">
  1138. <th class="formTitle">辅计量数量</th>
  1139. <td class="formValue">
  1140. <input id="Amount" name="Amount" class="form-control" type="text" placeholder="请输入辅计量数量" />
  1141. </td>
  1142. </tr>
  1143. @*sssss*@
  1144. <tr id="trProjectCode">
  1145. <th class="formTitle">项目号</th>
  1146. <td class="formValue">
  1147. <input id="ProjectCode" name="ProjectCode" class="form-control " type="text" placeholder="请输入项目号" />
  1148. </td>
  1149. </tr>
  1150. <tr id="trBatchCode">
  1151. <th class="formTitle">批次</th>
  1152. <td class="formValue">
  1153. <input id="BatchCode" name="BatchCode" class="form-control " type="text" placeholder="请输入批次" />
  1154. </td>
  1155. </tr>
  1156. <tr id="trVersion">
  1157. <th class="formTitle">版本</th>
  1158. <td class="formValue">
  1159. <input id="Version" name="Version" class="form-control " type="text" placeholder="请输入版本" />
  1160. </td>
  1161. </tr>
  1162. <tr id="trBrand">
  1163. <th class="formTitle">厂牌</th>
  1164. <td class="formValue">
  1165. <input id="Brand" name="Brand" type="text" class="form-control " placeholder="请输入厂牌" />
  1166. </td>
  1167. </tr>
  1168. <tr id="trcFree1">
  1169. <th class="formTitle">自由项1</th>
  1170. <td class="formValue">
  1171. <input id="cFree1" name="cFree1" type="text" class="form-control " placeholder="请输入自由项1" />
  1172. </td>
  1173. </tr>
  1174. <tr id="trcFree2">
  1175. <th class="formTitle">自由项2</th>
  1176. <td class="formValue">
  1177. <input id="cFree2" name="cFree2" type="text" class="form-control " placeholder="请输入自由项2" />
  1178. </td>
  1179. </tr>
  1180. <tr id="trcFree3">
  1181. <th class="formTitle">自由项3</th>
  1182. <td class="formValue">
  1183. <input id="cFree3" name="cFree3" type="text" class="form-control " placeholder="请输入自由项3" />
  1184. </td>
  1185. </tr>
  1186. <tr id="trcFree4">
  1187. <th class="formTitle">自由项4</th>
  1188. <td class="formValue">
  1189. <input id="cFree4" name="cFree4" type="text" class="form-control " placeholder="请输入自由项4" />
  1190. </td>
  1191. </tr>
  1192. <tr id="trcFree5">
  1193. <th class="formTitle">自由项5</th>
  1194. <td class="formValue">
  1195. <input id="cFree5" name="cFree5" type="text" class="form-control " placeholder="请输入自由项5" />
  1196. </td>
  1197. </tr>
  1198. <tr id="trcFree6">
  1199. <th class="formTitle">自由项6</th>
  1200. <td class="formValue">
  1201. <input id="cFree6" name="cFree6" type="text" class="form-control " placeholder="请输入自由项6" />
  1202. </td>
  1203. </tr>
  1204. <tr id="trcFree7">
  1205. <th class="formTitle">自由项7</th>
  1206. <td class="formValue">
  1207. <input id="cFree7" name="cFree7" type="text" class="form-control " placeholder="请输入自由项7" />
  1208. </td>
  1209. </tr>
  1210. <tr id="trcFree8">
  1211. <th class="formTitle">自由项8</th>
  1212. <td class="formValue">
  1213. <input id="cFree8" name="cFree8" type="text" class="form-control " placeholder="请输入自由项8" />
  1214. </td>
  1215. </tr>
  1216. <tr id="trcFree9">
  1217. <th class="formTitle">自由项9</th>
  1218. <td class="formValue">
  1219. <input id="cFree9" name="cFree9" type="text" class="form-control " placeholder="请输入自由项9" />
  1220. </td>
  1221. </tr>
  1222. <tr id="trcFree10">
  1223. <th class="formTitle">自由项10</th>
  1224. <td class="formValue">
  1225. <input id="cFree10" name="cFree10" type="text" class="form-control " placeholder="请输入自由项10" />
  1226. </td>
  1227. </tr>
  1228. </table>
  1229. </div>
  1230. </form>