纽威
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.

1238 lines
56 KiB

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