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

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