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

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