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

1262 lines
58 KiB

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