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.

2475 lines
82 KiB

3 weeks ago
  1. using NFine.Application.WMS;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Data;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Web;
  8. using System.Web.Mvc;
  9. using NFine.Code;
  10. using System.Data.SqlClient;
  11. using NFine.Data.Extensions;
  12. using System.Data.OleDb;
  13. using System.Configuration;
  14. using ICS.Application.Entity;
  15. using System.Xml;
  16. namespace NFine.Web.Areas.WMS.Controllers
  17. {
  18. public class WMSCreateItemLotController : ControllerBase
  19. {
  20. // GET: WMS/WMSCreateItemLot
  21. private WMSCreateItemLotApp App = new WMSCreateItemLotApp();
  22. public ActionResult CreateItemLot()
  23. {
  24. return View();
  25. }
  26. public ActionResult From()
  27. {
  28. return View();
  29. }
  30. public ActionResult FromNew()
  31. {
  32. return View();
  33. }
  34. public ActionResult FromPN()
  35. {
  36. return View();
  37. }
  38. public ActionResult FromHG()
  39. {
  40. return View();
  41. }
  42. public ActionResult FormMoPick()
  43. {
  44. return View();
  45. }
  46. public ActionResult ImportLot()
  47. {
  48. return View();
  49. }
  50. public ActionResult YLCreateItemLot()
  51. {
  52. return View();
  53. }
  54. public ActionResult ICSLotRebind()
  55. {
  56. return View();
  57. }
  58. public ActionResult PNCreateItemLot()
  59. {
  60. return View();
  61. }
  62. [HttpGet]
  63. public ActionResult SelectICSExtensionEnable()
  64. {
  65. var data = App.SelectICSExtensionEnable();
  66. return Content(data.ToJson());
  67. }
  68. [HttpGet]
  69. public ActionResult GetComplete()
  70. {
  71. var data = App.GetComplete();
  72. return Content(data.ToJson());
  73. }
  74. [HttpGet]
  75. public ActionResult GetWWComplete()
  76. {
  77. var data = App.GetWWComplete();
  78. return Content(data.ToJson());
  79. }
  80. [HttpGet]
  81. [HandlerAjaxOnly]
  82. public ActionResult GetGridJson(Pagination pagination, string queryJson)
  83. {
  84. DataTable ListData = App.GetGridJson(queryJson, ref pagination);
  85. var JsonData = new
  86. {
  87. total = pagination.total,
  88. page = pagination.page,
  89. records = pagination.records,
  90. rows = ListData,
  91. };
  92. return Content(JsonData.ToJson());
  93. }
  94. [HttpGet]
  95. [HandlerAjaxOnly]
  96. public ActionResult GetICSMOPick(Pagination pagination, string MODetailID, string workpoint)
  97. {
  98. DataTable ListData = App.GetICSMOPick(MODetailID, workpoint, ref pagination);
  99. var JsonData = new
  100. {
  101. total = pagination.total,
  102. page = pagination.page,
  103. records = pagination.records,
  104. rows = ListData,
  105. };
  106. return Content(JsonData.ToJson());
  107. }
  108. [HttpGet]
  109. [HandlerAjaxOnly]
  110. public ActionResult GetSubGridJson(string ApplyNegCode, string Sequence, string Type, string isPrint, Pagination pagination)
  111. {
  112. DataTable ListData = App.GetSubGridJson(ApplyNegCode, Sequence, Type, isPrint, ref pagination);
  113. var JsonData = new
  114. {
  115. total = pagination.total,
  116. page = pagination.page,
  117. records = pagination.records,
  118. rows = ListData,
  119. };
  120. return Content(JsonData.ToJson());
  121. }
  122. /// <summary>
  123. /// 点击生成条码查询
  124. /// </summary>
  125. [HttpGet]
  126. [HandlerAjaxOnly]
  127. public ActionResult GetSubGridJsonByCreate(string ApplyNegCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  128. {
  129. DataTable ListData = App.GetSubGridJsonByCreate(ApplyNegCode, Sequence, WorkPoint, Quantity, InvCode);
  130. var JsonData = new
  131. {
  132. rows = ListData,
  133. };
  134. return Content(JsonData.ToJson());
  135. }
  136. [HttpGet]
  137. [HandlerAjaxOnly]
  138. public ActionResult GetVendorLotNo(string VenCode, string WorkPoint)
  139. {
  140. DataTable ListData = App.GetVendorLotNo(VenCode, WorkPoint);
  141. var JsonData = new
  142. {
  143. VendorLotNo = ListData.Rows[0][0].ToString(),
  144. };
  145. return Content(JsonData.ToJson());
  146. }
  147. [HttpPost]
  148. [HandlerAjaxOnly]
  149. [ValidateAntiForgeryToken]
  150. public ActionResult SubmitForm(string ApplyNegCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
  151. {
  152. int i = App.CreateItemLotNo(ApplyNegCode, Sequence, keyValue, WorkPoint, AMEnable);
  153. if (i > 0)
  154. {
  155. return Success("生成成功!");
  156. }
  157. else
  158. {
  159. return Error("生成失败!");
  160. }
  161. }
  162. [HttpPost]
  163. [HandlerAjaxOnly]
  164. [ValidateAntiForgeryToken]
  165. public ActionResult DeleteItemLot(string keyValue)
  166. {
  167. keyValue = keyValue.Substring(1, keyValue.Length - 2);
  168. //WorkPoint = WorkPoint.Substring(1, WorkPoint.Length - 2);
  169. string msg = App.DeleteItemLot(keyValue);
  170. if (string.IsNullOrWhiteSpace(msg))
  171. {
  172. return Success("删除成功!");
  173. }
  174. else
  175. {
  176. return Error(msg);
  177. }
  178. }
  179. /// <summary>
  180. /// 成品工单批量删除条码
  181. /// </summary>
  182. /// <param name="keyValue"></param>
  183. /// <returns></returns>
  184. [HttpPost]
  185. [HandlerAjaxOnly]
  186. [ValidateAntiForgeryToken]
  187. public ActionResult BatchDeleteItemLot(string MOCodes)
  188. {
  189. MOCodes = MOCodes.Substring(1, MOCodes.Length - 2);
  190. string msg = App.BatchDeleteItemLot(MOCodes);
  191. if (string.IsNullOrWhiteSpace(msg))
  192. {
  193. return Success("删除成功!");
  194. }
  195. else
  196. {
  197. return Error(msg);
  198. }
  199. }
  200. [HttpPost]
  201. [HandlerAjaxOnly]
  202. [ValidateAntiForgeryToken]
  203. public ActionResult SubmitFormWeiWai(string OApplyNegCode, string Sequence, string keyValue, string WorkPoint)
  204. {
  205. int i = App.SubmitFormWeiWai(OApplyNegCode, Sequence, keyValue, WorkPoint);
  206. if (i > 0)
  207. {
  208. return Success("生成成功!");
  209. }
  210. else
  211. {
  212. return Error("生成失败!");
  213. }
  214. }
  215. [HttpPost]
  216. [HandlerAjaxOnly]
  217. [ValidateAntiForgeryToken]
  218. public ActionResult SubmitFormWeiWaiNew(string OApplyNegCode, string Sequence, string keyValue, string WorkPoint)
  219. {
  220. int i = App.SubmitFormWeiWaiNew(OApplyNegCode, Sequence, keyValue, WorkPoint);
  221. if (i > 0)
  222. {
  223. return Success("生成成功!");
  224. }
  225. else
  226. {
  227. return Error("生成失败!");
  228. }
  229. }
  230. //成品
  231. [HttpPost]
  232. [HandlerAjaxOnly]
  233. [ValidateAntiForgeryToken]
  234. public ActionResult SubmitFormChengPing(string MOCode, string Sequence, string keyValue, string WorkPoint, float Quantity)
  235. {
  236. int i = App.SubmitFormChengPing(MOCode, Sequence, keyValue, WorkPoint, Quantity);
  237. if (i > 0)
  238. {
  239. return Success("生成成功!");
  240. }
  241. else
  242. {
  243. return Error("生成失败!");
  244. }
  245. }
  246. //成品
  247. [HttpPost]
  248. [HandlerAjaxOnly]
  249. [ValidateAntiForgeryToken]
  250. public ActionResult SubmitFormChengPingNew(string MOCode, string Sequence, string keyValue, string WorkPoint, float Quantity)
  251. {
  252. int i = App.SubmitFormChengPingNew(MOCode, Sequence, keyValue, WorkPoint, Quantity);
  253. if (i > 0)
  254. {
  255. return Success("生成成功!");
  256. }
  257. else
  258. {
  259. return Error("生成失败!");
  260. }
  261. }
  262. //成品
  263. [HttpPost]
  264. [HandlerAjaxOnly]
  265. [ValidateAntiForgeryToken]
  266. public ActionResult SubmitFormChengPingHG(string MOCode, string Sequence, string keyValue, string WorkPoint, float Quantity)
  267. {
  268. int i = App.SubmitFormChengPingHG(MOCode, Sequence, keyValue, WorkPoint, Quantity);
  269. if (i > 0)
  270. {
  271. return Success("生成成功!");
  272. }
  273. else
  274. {
  275. return Error("生成失败!");
  276. }
  277. }
  278. //销售退货
  279. [HttpPost]
  280. [HandlerAjaxOnly]
  281. [ValidateAntiForgeryToken]
  282. public ActionResult SubmitFormXiaoShou(string SDNCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
  283. {
  284. int i = App.SubmitFormXiaoShou(SDNCode, Sequence, keyValue, WorkPoint, AMEnable);
  285. if (i > 0)
  286. {
  287. return Success("生成成功!");
  288. }
  289. else
  290. {
  291. return Error("生成失败!");
  292. }
  293. }
  294. //销售退货
  295. [HttpPost]
  296. [HandlerAjaxOnly]
  297. [ValidateAntiForgeryToken]
  298. public ActionResult SubmitFormXiaoShouNew(string SDNCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
  299. {
  300. int i = App.SubmitFormXiaoShouNew(SDNCode, Sequence, keyValue, WorkPoint, AMEnable);
  301. if (i > 0)
  302. {
  303. return Success("生成成功!");
  304. }
  305. else
  306. {
  307. return Error("生成失败!");
  308. }
  309. }
  310. //其他
  311. [HttpPost]
  312. [HandlerAjaxOnly]
  313. [ValidateAntiForgeryToken]
  314. public ActionResult SubmitFormQiTa(string InCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
  315. {
  316. int i = App.SubmitFormQiTa(InCode, Sequence, keyValue, WorkPoint, AMEnable);
  317. if (i > 0)
  318. {
  319. return Success("生成成功!");
  320. }
  321. else
  322. {
  323. return Error("生成失败!");
  324. }
  325. }
  326. //其他
  327. [HttpPost]
  328. [HandlerAjaxOnly]
  329. [ValidateAntiForgeryToken]
  330. public ActionResult SubmitFormQiTaNew(string InCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
  331. {
  332. int i = App.SubmitFormQiTaNew(InCode, Sequence, keyValue, WorkPoint, AMEnable);
  333. if (i > 0)
  334. {
  335. return Success("生成成功!");
  336. }
  337. else
  338. {
  339. return Error("生成失败!");
  340. }
  341. }
  342. /// <summary>
  343. /// 打印数据参数:服务器的URL+打印的文件名,转化为Base64编码
  344. /// </summary>
  345. protected string strPrintData;
  346. /// <summary>
  347. /// 标识是否安装了控件
  348. /// </summary>
  349. protected bool bIsInstallPrintControl = true;
  350. /// <summary>
  351. /// 打印控件的Cookie值
  352. /// </summary>
  353. protected string strPrintControlCookie = "";
  354. /// <summary>
  355. /// 获取Url中去掉文件名的路径
  356. /// </summary>
  357. /// <returns></returns>
  358. private string GetUrlPath()
  359. {
  360. string strUrl = Request.Url.ToString();
  361. int iEnd = strUrl.LastIndexOf("/");
  362. strUrl = strUrl.Substring(0, iEnd + 1);
  363. return strUrl;
  364. }
  365. //打印
  366. [HttpPost]
  367. [HandlerAjaxOnly]
  368. public ActionResult PrintItemLot(string keyValue, string WorkPoint, string Type)
  369. {
  370. // string WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location;
  371. keyValue = keyValue.Substring(1, keyValue.Length - 2);
  372. WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location;
  373. string strPrintFileName = Server.MapPath("/ReportFile/") + "纷纷无法b_成品条码.fr3";
  374. PrintJson pJson = new PrintJson(Server.MapPath("./PrintTemp"), strPrintFileName);
  375. pJson.CheckRegister("苏州智合诚信息科技有限公司", "56DD3B4C172D0D140841CAC98A58A819F4E28EDA5D6E45711DDD64F6A439F68B6A7870CD7DAFD69A919CB870207FE4BB206F92BE3D53C221B019E0797E739EBA4"); //注册信息
  376. //pJson.CheckRegister("注册姓名", "8ECCCD6A1302DFEE1A6456A5D"); //注册信息
  377. //pJson.AddPrintParam("ShopName", "测试酒楼");
  378. //pJson.AddPrintParam("PrintDepositAdd", "说明:本单据为贵客押金收取凭证,盖章有效。退房时请出示,遗失者自负,请妥善保存。退房时间为12:00时,延时退房18:00时以前按半天房费收取,18:00时以后算全天房价。押金单有效期为一个月,过期作废。 贵重物品请交前台寄存,未寄存丢失自负。 谢谢!");
  379. SetCookieAndURL(pJson);// 设置控件调用的Cookie值,判断是否安装了打印控件
  380. string strSql = "";
  381. if (Type == "1")
  382. {
  383. strSql = @"select a.LotNo, c.ApplyNegCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
  384. FROM dbo.ICSInventoryLot a
  385. left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
  386. left join ICSMOApplyNegDetail c on b.TransCode=c.ApplyNegCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
  387. left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
  388. where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
  389. }
  390. if (Type == "2")
  391. {
  392. strSql = @"select a.LotNo, c.OApplyNegCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
  393. FROM dbo.ICSInventoryLot a
  394. left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
  395. left join ICSOApplyNegDetail c on b.TransCode=c.OApplyNegCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
  396. left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
  397. where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
  398. }
  399. if (Type == "3")
  400. {
  401. strSql = @"select a.LotNo, c.MOCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
  402. FROM dbo.ICSInventoryLot a
  403. left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
  404. left join ICSMO c on b.TransCode=c.MOCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
  405. left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
  406. where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
  407. }
  408. if (Type == "5")
  409. {
  410. strSql = @"select a.LotNo, c.InCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
  411. FROM dbo.ICSInventoryLot a
  412. left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
  413. left join ICSOtherIn c on b.TransCode=c.InCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
  414. left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
  415. where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
  416. }
  417. if (Type == "6")
  418. {
  419. strSql = @"select a.LotNo, c.ReturnCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
  420. FROM dbo.ICSInventoryLot a
  421. left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
  422. left join ICSReturn c on b.TransCode=c.ReturnCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
  423. left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
  424. where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
  425. }
  426. if (Type == "7")
  427. {
  428. strSql = @"select a.LotNo, c.DNCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
  429. FROM dbo.ICSInventoryLot a
  430. left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
  431. left join ICSDeliveryNotice c on b.TransCode=c.DNCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
  432. left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
  433. where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
  434. }
  435. if (Type == "8")
  436. {
  437. strSql = @"select a.LotNo, c.ODNCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
  438. FROM dbo.ICSInventoryLot a
  439. left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
  440. left join ICSODeliveryNotice c on b.TransCode=c.ODNCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
  441. left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
  442. where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
  443. }
  444. if (Type == "9")
  445. {
  446. strSql = @" select a.LotNo, c.RCVCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
  447. FROM dbo.ICSInventoryLot a
  448. left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
  449. left join ICSManufactureReceive c on b.TransCode=c.RCVCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
  450. left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
  451. where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
  452. }
  453. if (Type == "10")
  454. {
  455. strSql = @"select a.LotNo, c.DNCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
  456. FROM dbo.ICSInventoryLot a
  457. left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
  458. left join ICSDeliveryNotice c on b.TransCode=c.DNCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
  459. left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
  460. where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
  461. }
  462. if (Type == "11")
  463. {
  464. strSql = @"select a.LotNo, c.ODNCode,a.InvCode,d.InvName,d.InvStd,C.Quantity,D.InvUnit
  465. FROM dbo.ICSInventoryLot a
  466. left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint
  467. left join ICSODeliveryNotice c on b.TransCode=c.ODNCode and b.TransSequence=c.Sequence and b.WorkPoint=c.WorkPoint
  468. left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
  469. where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoint.Trim(',') + "')";
  470. }
  471. //string strSql = @"Select * From CashLog";
  472. DataTable dtCashLog = DbHelper.ExecuteTable(DbHelper.ConnectionString, CommandType.Text, strSql, true, null);
  473. // string strPrintTempFile = pJson.ShowReport(dtCashLog); //产生JSON文件内容
  474. string strPrintTempFile = pJson.ShowReport(dtCashLog); //导出PDF文件
  475. //把服务器的URL + 此文件名 传递给控件,由控件下载还原数据进行打印
  476. string strServerURL = GetUrlPath() + "PrintTemp/";
  477. string strData = strServerURL + strPrintTempFile;
  478. strPrintData = PrintFunction.EnBase64(strData);
  479. var JsonData = new
  480. {
  481. strPrintData_1 = strPrintData,
  482. bIsInstallPrintControl_1 = bIsInstallPrintControl,
  483. strPrintControlCookie_1 = strPrintControlCookie
  484. };
  485. //多站点
  486. string sql = @"UPDATE dbo.ICSInventoryLot
  487. SET PrintTimes=ISNULL(PrintTimes,0)+1,
  488. LastPrintUser='',
  489. LastPrintTime=GETDATE()
  490. WHERE ID IN (" + keyValue.TrimEnd(',') + ") and WorkPoint in ('" + WorkPoint.TrimEnd(',') + "')";
  491. SqlHelper.ExecuteNonQuery(sql);
  492. return Content(JsonData.ToJson());
  493. }
  494. /// <summary>
  495. /// 设置控件调用的Cookie值,判断是否安装了打印控件
  496. /// </summary>
  497. /// <param name="pJson"></param>
  498. private void SetCookieAndURL(PrintJson pJson)
  499. {
  500. bIsInstallPrintControl = false;
  501. strPrintControlCookie = "";
  502. HttpCookie pCookieInstall = Request.Cookies["InstallPrintControl"];
  503. if (pCookieInstall != null)
  504. { //Cookie存在
  505. strPrintControlCookie = pCookieInstall.Value.ToString();
  506. //以Cookie值查找在数据表中是否存在
  507. string strSql = @"Select * From sys_SRM_CheckInstall Where Cookie = @Cookie";
  508. SqlParameter[] pmcCookie = { new SqlParameter("Cookie", strPrintControlCookie) };
  509. using (SqlDataReader drCookie = DbHelper.ExecuteReader(DbHelper.ConnectionString, CommandType.Text, strSql, pmcCookie))
  510. {
  511. if (drCookie.Read())
  512. { //标识为已经安装
  513. bIsInstallPrintControl = true;
  514. }
  515. drCookie.Close();
  516. }
  517. //更新Cookie的保存时间
  518. pCookieInstall.Expires = DateTime.Now.AddYears(10);
  519. Response.SetCookie(pCookieInstall);
  520. }
  521. else
  522. {//Cookie不存在,则新建Cookie
  523. strPrintControlCookie = System.Guid.NewGuid().ToString();
  524. pCookieInstall = new HttpCookie("InstallPrintControl", strPrintControlCookie);
  525. pCookieInstall.Expires = DateTime.Now.AddYears(10);
  526. Response.Cookies.Add(pCookieInstall);
  527. }
  528. string strUrl = Server.MapPath("/PrintTemp/") + "IsCheckInstall";
  529. pJson.SetCookieAndURL(strPrintControlCookie, strUrl);
  530. }
  531. [HttpGet]
  532. [HandlerAjaxOnly]
  533. public ActionResult GetGridJsonWeiWai(Pagination pagination, string queryJson)
  534. {
  535. DataTable ListData = App.GetGridJsonWeiWai(queryJson, ref pagination);
  536. var JsonData = new
  537. {
  538. total = pagination.total,
  539. page = pagination.page,
  540. records = pagination.records,
  541. rows = ListData,
  542. };
  543. return Content(JsonData.ToJson());
  544. }
  545. [HttpGet]
  546. [HandlerAjaxOnly]
  547. public ActionResult GetSubGridJsonWeiWai(string OApplyNegCode, string Sequence, Pagination pagination)
  548. {
  549. DataTable ListData = App.GetSubGridJsonWeiWai(OApplyNegCode, Sequence, ref pagination);
  550. var JsonData = new
  551. {
  552. total = pagination.total,
  553. page = pagination.page,
  554. records = pagination.records,
  555. rows = ListData,
  556. };
  557. return Content(JsonData.ToJson());
  558. }
  559. /// <summary>
  560. /// 点击生成条码查询
  561. /// </summary>
  562. [HttpGet]
  563. [HandlerAjaxOnly]
  564. public ActionResult GetSubGridJsonWeiWaiByCreate(string OApplyNegCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  565. {
  566. DataTable ListData = App.GetSubGridJsonWeiWaiByCreate(OApplyNegCode, Sequence, WorkPoint, Quantity, InvCode);
  567. var JsonData = new
  568. {
  569. rows = ListData,
  570. };
  571. return Content(JsonData.ToJson());
  572. }
  573. [HttpGet]
  574. [HandlerAjaxOnly]
  575. public ActionResult GetGridJsonChengPing(Pagination pagination, string queryJson)
  576. {
  577. DataTable ListData = App.GetGridJsonChengPing(queryJson, ref pagination);
  578. var JsonData = new
  579. {
  580. total = pagination.total,
  581. page = pagination.page,
  582. records = pagination.records,
  583. rows = ListData,
  584. };
  585. return Content(JsonData.ToJson());
  586. }
  587. /// <summary>
  588. /// 点击生成条码查询(成品)
  589. /// </summary>
  590. [HttpGet]
  591. [HandlerAjaxOnly]
  592. public ActionResult GetSubGridJsonChengPingByCreate(string MOCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  593. {
  594. DataTable ListData = App.GetSubGridJsonChengPingByCreate(MOCode, Sequence, WorkPoint, Quantity, InvCode);
  595. var JsonData = new
  596. {
  597. rows = ListData,
  598. };
  599. return Content(JsonData.ToJson());
  600. }
  601. [HttpGet]
  602. [HandlerAjaxOnly]
  603. public ActionResult GetGridJsonXiaoShou(Pagination pagination, string queryJson)
  604. {
  605. DataTable ListData = App.GetGridJsonXiaoShou(queryJson, ref pagination);
  606. var JsonData = new
  607. {
  608. total = pagination.total,
  609. page = pagination.page,
  610. records = pagination.records,
  611. rows = ListData,
  612. };
  613. return Content(JsonData.ToJson());
  614. }
  615. [HttpGet]
  616. [HandlerAjaxOnly]
  617. public ActionResult GetGridJsonQiTa(Pagination pagination, string queryJson)
  618. {
  619. DataTable ListData = App.GetGridJsonQiTa(queryJson, ref pagination);
  620. var JsonData = new
  621. {
  622. total = pagination.total,
  623. page = pagination.page,
  624. records = pagination.records,
  625. rows = ListData,
  626. };
  627. return Content(JsonData.ToJson());
  628. }
  629. /// <summary>
  630. /// 点击生成条码查询(销售退货)
  631. /// </summary>
  632. [HttpGet]
  633. [HandlerAjaxOnly]
  634. public ActionResult GetSubGridJsonXiaoShouByCreate(string SDNCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  635. {
  636. DataTable ListData = App.GetSubGridJsonXiaoShouByCreate(SDNCode, Sequence, WorkPoint, Quantity, InvCode);
  637. var JsonData = new
  638. {
  639. rows = ListData,
  640. };
  641. return Content(JsonData.ToJson());
  642. }
  643. /// <summary>
  644. /// 点击生成条码查询(其他入库)
  645. /// </summary>
  646. [HttpGet]
  647. [HandlerAjaxOnly]
  648. public ActionResult GetSubGridJsonQiTaByCreate(string InCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  649. {
  650. DataTable ListData = App.GetSubGridJsonQiTaByCreate(InCode, Sequence, WorkPoint, Quantity, InvCode);
  651. var JsonData = new
  652. {
  653. rows = ListData,
  654. };
  655. return Content(JsonData.ToJson());
  656. }
  657. //归还
  658. [HttpGet]
  659. [HandlerAjaxOnly]
  660. public ActionResult GetGridJsonGuiHuan(Pagination pagination, string queryJson)
  661. {
  662. DataTable ListData = App.GetGridJsonGuiHuan(queryJson, ref pagination);
  663. var JsonData = new
  664. {
  665. total = pagination.total,
  666. page = pagination.page,
  667. records = pagination.records,
  668. rows = ListData,
  669. };
  670. return Content(JsonData.ToJson());
  671. }
  672. //审核到货单
  673. [HttpGet]
  674. [HandlerAjaxOnly]
  675. public ActionResult GetGridJsonSHDH(Pagination pagination, string queryJson)
  676. {
  677. DataTable ListData = App.GetGridJsonSHDH(queryJson, ref pagination);
  678. var JsonData = new
  679. {
  680. total = pagination.total,
  681. page = pagination.page,
  682. records = pagination.records,
  683. rows = ListData,
  684. };
  685. return Content(JsonData.ToJson());
  686. }
  687. //审核到货单
  688. [HttpGet]
  689. [HandlerAjaxOnly]
  690. public ActionResult GetGridJsonWWSHDH(Pagination pagination, string queryJson)
  691. {
  692. DataTable ListData = App.GetGridJsonWWSHDH(queryJson, ref pagination);
  693. var JsonData = new
  694. {
  695. total = pagination.total,
  696. page = pagination.page,
  697. records = pagination.records,
  698. rows = ListData,
  699. };
  700. return Content(JsonData.ToJson());
  701. }
  702. //审核到货单
  703. [HttpGet]
  704. [HandlerAjaxOnly]
  705. public ActionResult GetGridJsonKLCPRK(Pagination pagination, string queryJson)
  706. {
  707. DataTable ListData = App.GetGridJsonKLCPRK(queryJson, ref pagination);
  708. var JsonData = new
  709. {
  710. total = pagination.total,
  711. page = pagination.page,
  712. records = pagination.records,
  713. rows = ListData,
  714. };
  715. return Content(JsonData.ToJson());
  716. }
  717. /// <summary>
  718. /// 点击生成条码查询(审核到货单)
  719. /// </summary>
  720. [HttpGet]
  721. [HandlerAjaxOnly]
  722. public ActionResult GetSubGridJsonSHDHByCreate(string DNCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  723. {
  724. DataTable ListData = App.GetSubGridJsonSHDHByCreate(DNCode, Sequence, WorkPoint, Quantity, InvCode);
  725. var JsonData = new
  726. {
  727. rows = ListData,
  728. };
  729. return Content(JsonData.ToJson());
  730. }
  731. /// <summary>
  732. /// 点击生成条码查询(审核委外到货单)
  733. /// </summary>
  734. [HttpGet]
  735. [HandlerAjaxOnly]
  736. public ActionResult GetSubGridJsonWWSHDHByCreate(string ODNCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  737. {
  738. DataTable ListData = App.GetSubGridJsonWWSHDHByCreate(ODNCode, Sequence, WorkPoint, Quantity, InvCode);
  739. var JsonData = new
  740. {
  741. rows = ListData,
  742. };
  743. return Content(JsonData.ToJson());
  744. }
  745. /// <summary>
  746. /// 点击生成条码查询(审核委外到货单)
  747. /// </summary>
  748. [HttpGet]
  749. [HandlerAjaxOnly]
  750. public ActionResult GetSubGridJsonKLCPRKByCreate(string RCVCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  751. {
  752. DataTable ListData = App.GetSubGridJsonKLCPRKByCreate(RCVCode, Sequence, WorkPoint, Quantity, InvCode);
  753. var JsonData = new
  754. {
  755. rows = ListData,
  756. };
  757. return Content(JsonData.ToJson());
  758. }
  759. /// <summary>
  760. /// 点击生成条码查询(归还)
  761. /// </summary>
  762. [HttpGet]
  763. [HandlerAjaxOnly]
  764. public ActionResult GetSubGridJsonGuiHuanByCreate(string ReturnCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  765. {
  766. DataTable ListData = App.GetSubGridJsonGuiHuanByCreate(ReturnCode, Sequence, WorkPoint, Quantity, InvCode);
  767. var JsonData = new
  768. {
  769. rows = ListData,
  770. };
  771. return Content(JsonData.ToJson());
  772. }
  773. //归还
  774. [HttpPost]
  775. [HandlerAjaxOnly]
  776. [ValidateAntiForgeryToken]
  777. public ActionResult SubmitFormGuiHuan(string ReturnCode, string Sequence, string keyValue, string WorkPoint)
  778. {
  779. int i = App.SubmitFormGuiHuan(ReturnCode, Sequence, keyValue, WorkPoint);
  780. if (i > 0)
  781. {
  782. return Success("生成成功!");
  783. }
  784. else
  785. {
  786. return Error("生成失败!");
  787. }
  788. }
  789. //审核到货单
  790. [HttpPost]
  791. [HandlerAjaxOnly]
  792. [ValidateAntiForgeryToken]
  793. public ActionResult SubmitFormSHDH(string DNCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
  794. {
  795. int i = App.SubmitFormSHDH(DNCode, Sequence, keyValue, WorkPoint, AMEnable);
  796. if (i > 0)
  797. {
  798. return Success("生成成功!");
  799. }
  800. else
  801. {
  802. return Error("生成失败!");
  803. }
  804. }
  805. //审核委外到货单
  806. [HttpPost]
  807. [HandlerAjaxOnly]
  808. [ValidateAntiForgeryToken]
  809. public ActionResult SubmitFormWWSHDH(string ODNCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
  810. {
  811. int i = App.SubmitFormWWSHDH(ODNCode, Sequence, keyValue, WorkPoint, AMEnable);
  812. if (i > 0)
  813. {
  814. return Success("生成成功!");
  815. }
  816. else
  817. {
  818. return Error("生成失败!");
  819. }
  820. }
  821. //开立成品入库
  822. [HttpPost]
  823. [HandlerAjaxOnly]
  824. [ValidateAntiForgeryToken]
  825. public ActionResult SubmitFormKLCPRK(string RCVCode, string Sequence, string keyValue, string WorkPoint)
  826. {
  827. int i = App.SubmitFormKLCPRK(RCVCode, Sequence, keyValue, WorkPoint);
  828. if (i > 0)
  829. {
  830. return Success("生成成功!");
  831. }
  832. else
  833. {
  834. return Error("生成失败!");
  835. }
  836. }
  837. //委外拒收单
  838. [HttpGet]
  839. [HandlerAjaxOnly]
  840. public ActionResult GetGridJsonWWJSD(Pagination pagination, string queryJson)
  841. {
  842. DataTable ListData = App.GetGridJsonWWJSD(queryJson, ref pagination);
  843. var JsonData = new
  844. {
  845. total = pagination.total,
  846. page = pagination.page,
  847. records = pagination.records,
  848. rows = ListData,
  849. };
  850. return Content(JsonData.ToJson());
  851. }
  852. //拒收单
  853. [HttpGet]
  854. [HandlerAjaxOnly]
  855. public ActionResult GetGridJsonJSD(Pagination pagination, string queryJson)
  856. {
  857. DataTable ListData = App.GetGridJsonJSD(queryJson, ref pagination);
  858. var JsonData = new
  859. {
  860. total = pagination.total,
  861. page = pagination.page,
  862. records = pagination.records,
  863. rows = ListData,
  864. };
  865. return Content(JsonData.ToJson());
  866. }
  867. //审核到货单
  868. [HttpPost]
  869. [HandlerAjaxOnly]
  870. [ValidateAntiForgeryToken]
  871. public ActionResult SubmitFormJSD(string DNCode, string Sequence, string keyValue, string WorkPoint)
  872. {
  873. int i = App.SubmitFormJSD(DNCode, Sequence, keyValue, WorkPoint);
  874. if (i > 0)
  875. {
  876. return Success("生成成功!");
  877. }
  878. else
  879. {
  880. return Error("生成失败!");
  881. }
  882. }
  883. //审核委外到货单
  884. [HttpPost]
  885. [HandlerAjaxOnly]
  886. [ValidateAntiForgeryToken]
  887. public ActionResult SubmitFormWWJSD(string ODNCode, string Sequence, string keyValue, string WorkPoint)
  888. {
  889. int i = App.SubmitFormWWJSD(ODNCode, Sequence, keyValue, WorkPoint);
  890. if (i > 0)
  891. {
  892. return Success("生成成功!");
  893. }
  894. else
  895. {
  896. return Error("生成失败!");
  897. }
  898. }
  899. //领料申请退料
  900. [HttpGet]
  901. [HandlerAjaxOnly]
  902. public ActionResult GetGridJsonLLSQTL(Pagination pagination, string queryJson)
  903. {
  904. DataTable ListData = App.GetGridJsonLLSQTL(queryJson, ref pagination);
  905. var JsonData = new
  906. {
  907. total = pagination.total,
  908. page = pagination.page,
  909. records = pagination.records,
  910. rows = ListData,
  911. };
  912. return Content(JsonData.ToJson());
  913. }
  914. /// <summary>
  915. /// 点击生成条码查询(领料申请退料)
  916. /// </summary>
  917. [HttpGet]
  918. [HandlerAjaxOnly]
  919. public ActionResult GetSubGridJsonJSDByCreate(string DNCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  920. {
  921. DataTable ListData = App.GetSubGridJsonJSDByCreate(DNCode, Sequence, WorkPoint, Quantity, InvCode);
  922. var JsonData = new
  923. {
  924. rows = ListData,
  925. };
  926. return Content(JsonData.ToJson());
  927. }
  928. /// <summary>
  929. /// 点击生成条码查询(领料申请退料)
  930. /// </summary>
  931. [HttpGet]
  932. [HandlerAjaxOnly]
  933. public ActionResult GetSubGridJsonWWJSDByCreate(string ODNCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  934. {
  935. DataTable ListData = App.GetSubGridJsonWWJSDByCreate(ODNCode, Sequence, WorkPoint, Quantity, InvCode);
  936. var JsonData = new
  937. {
  938. rows = ListData,
  939. };
  940. return Content(JsonData.ToJson());
  941. }
  942. //获取委外退料源头条码
  943. [HttpGet]
  944. [HandlerAjaxOnly]
  945. public ActionResult GetWeiWaiTLSrcLot(string OApplyNegCode, string Sequence, string WorkPoint)
  946. {
  947. DataTable ListData = App.GetWeiWaiTLSrcLot(OApplyNegCode, Sequence, WorkPoint);
  948. return Content(ListData.ToJson());
  949. }
  950. //获取领料申请源头条码
  951. [HttpGet]
  952. [HandlerAjaxOnly]
  953. public ActionResult GetLLSQSrcLot(string ApplyNegCode, string Sequence, string WorkPoint)
  954. {
  955. DataTable ListData = App.GetLLSQSrcLot(ApplyNegCode, Sequence, WorkPoint);
  956. return Content(ListData.ToJson());
  957. }
  958. //获取条码备用字段568(派纳特殊需求---销售退货直接取单据备用字段信息)
  959. [HttpGet]
  960. [HandlerAjaxOnly]
  961. public ActionResult GetSSDDocEATTRIBUTEInfo(string SSDCode, string Sequence, string WorkPoint)
  962. {
  963. DataTable ListData = App.GetSSDDocEATTRIBUTEInfo(SSDCode, Sequence, WorkPoint);
  964. return Content(ListData.ToJson());
  965. }
  966. //获取业务源头条码备用字段568(派纳特殊需求)
  967. [HttpGet]
  968. [HandlerAjaxOnly]
  969. public ActionResult GetSrcLotNoInfoPN(string LotNo, string WorkPoint)
  970. {
  971. DataTable ListData = App.GetSrcLotNoInfoPN(LotNo, WorkPoint);
  972. return Content(ListData.ToJson());
  973. }
  974. [HttpGet]
  975. [HandlerAjaxOnly]
  976. public ActionResult GetSubGridJsonLLSQDByCreate(string ApplyNegCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  977. {
  978. DataTable ListData = App.GetSubGridJsonLLSQDByCreate(ApplyNegCode, Sequence, WorkPoint, Quantity, InvCode);
  979. var JsonData = new
  980. {
  981. rows = ListData,
  982. };
  983. return Content(JsonData.ToJson());
  984. }
  985. //领料申请退料生成条码
  986. [HttpPost]
  987. [HandlerAjaxOnly]
  988. [ValidateAntiForgeryToken]
  989. public ActionResult SubmitFormLLSQTL(string ApplyNegCode, string Sequence, string keyValue, string WorkPoint)
  990. {
  991. int i = App.SubmitFormLLSQTL(ApplyNegCode, Sequence, keyValue, WorkPoint);
  992. if (i > 0)
  993. {
  994. return Success("生成成功!");
  995. }
  996. else
  997. {
  998. return Error("生成失败!");
  999. }
  1000. }
  1001. //领料申请退料生成条码
  1002. [HttpPost]
  1003. [HandlerAjaxOnly]
  1004. [ValidateAntiForgeryToken]
  1005. public ActionResult SubmitFormLLSQTLNew(string ApplyNegCode, string Sequence, string keyValue, string WorkPoint)
  1006. {
  1007. int i = App.SubmitFormLLSQTLNew(ApplyNegCode, Sequence, keyValue, WorkPoint);
  1008. if (i > 0)
  1009. {
  1010. return Success("生成成功!");
  1011. }
  1012. else
  1013. {
  1014. return Error("生成失败!");
  1015. }
  1016. }
  1017. //材料出库退料
  1018. [HttpGet]
  1019. [HandlerAjaxOnly]
  1020. public ActionResult GetGridJsonCLCK(Pagination pagination, string queryJson)
  1021. {
  1022. DataTable ListData = App.GetGridJsonCLCK(queryJson, ref pagination);
  1023. var JsonData = new
  1024. {
  1025. total = pagination.total,
  1026. page = pagination.page,
  1027. records = pagination.records,
  1028. rows = ListData,
  1029. };
  1030. return Content(JsonData.ToJson());
  1031. }
  1032. //材料出库退料
  1033. [HttpGet]
  1034. [HandlerAjaxOnly]
  1035. public ActionResult GetSubGridJsonCLCKByCreate(string ApplyNegCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  1036. {
  1037. DataTable ListData = App.GetSubGridJsonCLCKByCreate(ApplyNegCode, Sequence, WorkPoint, Quantity, InvCode);
  1038. var JsonData = new
  1039. {
  1040. rows = ListData,
  1041. };
  1042. return Content(JsonData.ToJson());
  1043. }
  1044. //材料出库退料生成条码
  1045. [HttpPost]
  1046. [HandlerAjaxOnly]
  1047. [ValidateAntiForgeryToken]
  1048. public ActionResult SubmitFormCLCKT(string ApplyNegCode, string Sequence, string keyValue, string WorkPoint)
  1049. {
  1050. int i = App.SubmitFormCLCKT(ApplyNegCode, Sequence, keyValue, WorkPoint);
  1051. if (i > 0)
  1052. {
  1053. return Success("生成成功!");
  1054. }
  1055. else
  1056. {
  1057. return Error("生成失败!请确认单据状态是否为已审核。");
  1058. }
  1059. }
  1060. //委外领料
  1061. [HttpGet]
  1062. [HandlerAjaxOnly]
  1063. public ActionResult GetGridJsonWWLLTL(Pagination pagination, string queryJson)
  1064. {
  1065. DataTable ListData = App.GetGridJsonWWLLTL(queryJson, ref pagination);
  1066. var JsonData = new
  1067. {
  1068. total = pagination.total,
  1069. page = pagination.page,
  1070. records = pagination.records,
  1071. rows = ListData,
  1072. };
  1073. return Content(JsonData.ToJson());
  1074. }
  1075. //委外领料
  1076. [HttpGet]
  1077. [HandlerAjaxOnly]
  1078. public ActionResult GetSubGridJsonWWLLByCreate(string OApplyNegCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  1079. {
  1080. DataTable ListData = App.GetSubGridJsonWWLLByCreate(OApplyNegCode, Sequence, WorkPoint, Quantity, InvCode);
  1081. var JsonData = new
  1082. {
  1083. rows = ListData,
  1084. };
  1085. return Content(JsonData.ToJson());
  1086. }
  1087. //委外领料申请退料
  1088. [HttpPost]
  1089. [HandlerAjaxOnly]
  1090. [ValidateAntiForgeryToken]
  1091. public ActionResult SubmitFormWWLL(string OApplyNegCode, string Sequence, string keyValue, string WorkPoint)
  1092. {
  1093. int i = App.SubmitFormWWLL(OApplyNegCode, Sequence, keyValue, WorkPoint);
  1094. if (i > 0)
  1095. {
  1096. return Success("生成成功!");
  1097. }
  1098. else
  1099. {
  1100. return Error("生成失败!");
  1101. }
  1102. }
  1103. //委外材料出库
  1104. [HttpGet]
  1105. [HandlerAjaxOnly]
  1106. public ActionResult GetGridJsonWWCLCK(Pagination pagination, string queryJson)
  1107. {
  1108. DataTable ListData = App.GetGridJsonWWCLCK(queryJson, ref pagination);
  1109. var JsonData = new
  1110. {
  1111. total = pagination.total,
  1112. page = pagination.page,
  1113. records = pagination.records,
  1114. rows = ListData,
  1115. };
  1116. return Content(JsonData.ToJson());
  1117. }
  1118. //委外材料出库
  1119. [HttpGet]
  1120. [HandlerAjaxOnly]
  1121. public ActionResult GetSubGridJsonWWCLByCreate(string OApplyNegCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  1122. {
  1123. DataTable ListData = App.GetSubGridJsonWWCLByCreate(OApplyNegCode, Sequence, WorkPoint, Quantity, InvCode);
  1124. var JsonData = new
  1125. {
  1126. rows = ListData,
  1127. };
  1128. return Content(JsonData.ToJson());
  1129. }
  1130. [HttpPost]
  1131. [HandlerAjaxOnly]
  1132. [ValidateAntiForgeryToken]
  1133. public ActionResult SubmitFormWWCL(string OApplyNegCode, string Sequence, string keyValue, string WorkPoint)
  1134. {
  1135. int i = App.SubmitFormWWCL(OApplyNegCode, Sequence, keyValue, WorkPoint);
  1136. if (i > 0)
  1137. {
  1138. return Success("生成成功!");
  1139. }
  1140. else
  1141. {
  1142. return Error("生成失败!");
  1143. }
  1144. }
  1145. //返工工单
  1146. [HttpGet]
  1147. [HandlerAjaxOnly]
  1148. public ActionResult GetGridJsonFGGD(Pagination pagination, string queryJson)
  1149. {
  1150. DataTable ListData = App.GetGridJsonFGGD(queryJson, ref pagination);
  1151. var JsonData = new
  1152. {
  1153. total = pagination.total,
  1154. page = pagination.page,
  1155. records = pagination.records,
  1156. rows = ListData,
  1157. };
  1158. return Content(JsonData.ToJson());
  1159. }
  1160. [HttpGet]
  1161. [HandlerAjaxOnly]
  1162. public ActionResult GetSubGridJsonFGGDCreate(string FGGDMOCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  1163. {
  1164. DataTable ListData = App.GetSubGridJsonFGGDCreate(FGGDMOCode, Sequence, WorkPoint, Quantity, InvCode);
  1165. var JsonData = new
  1166. {
  1167. rows = ListData,
  1168. };
  1169. return Content(JsonData.ToJson());
  1170. }
  1171. [HttpPost]
  1172. [HandlerAjaxOnly]
  1173. [ValidateAntiForgeryToken]
  1174. public ActionResult SubmitFormFGGD(string FGGDMOCode, string Sequence, string keyValue, string WorkPoint)
  1175. {
  1176. int i = App.SubmitFormFGGD(FGGDMOCode, Sequence, keyValue, WorkPoint);
  1177. if (i > 0)
  1178. {
  1179. return Success("生成成功!");
  1180. }
  1181. else
  1182. {
  1183. return Error("生成失败!");
  1184. }
  1185. }
  1186. /// <summary>
  1187. /// 锐腾两步调入单获去单据信息
  1188. /// </summary>
  1189. /// <param name="TransferNO"></param>
  1190. /// <param name="Sequence"></param>
  1191. /// <param name="WorkPoint"></param>
  1192. /// <returns></returns>
  1193. [HttpGet]
  1194. [HandlerAjaxOnly]
  1195. public ActionResult GetSubGridJsonTransferByCreate(string TransferNO, string Sequence, string WorkPoint, string Quantity, string InvCode)
  1196. {
  1197. DataTable ListData = App.GetSubGridJsonTransferByCreate(TransferNO, Sequence, WorkPoint, Quantity, InvCode);
  1198. var JsonData = new
  1199. {
  1200. rows = ListData,
  1201. };
  1202. return Content(JsonData.ToJson());
  1203. }
  1204. /// <summary>
  1205. /// 锐腾两部调入单生成条码
  1206. /// </summary>
  1207. /// <param name="TransferNO"></param>
  1208. /// <param name="Sequence"></param>
  1209. /// <param name="keyValue"></param>
  1210. /// <param name="WorkPoint"></param>
  1211. /// <returns></returns>
  1212. [HttpPost]
  1213. [HandlerAjaxOnly]
  1214. [ValidateAntiForgeryToken]
  1215. public ActionResult SubmitFormTransfer(string TransferNO, string Sequence, string keyValue, string WorkPoint)
  1216. {
  1217. int i = App.SubmitFormTransfer(TransferNO, Sequence, keyValue, WorkPoint);
  1218. if (i > 0)
  1219. {
  1220. return Success("生成成功!");
  1221. }
  1222. else
  1223. {
  1224. return Error("生成失败!");
  1225. }
  1226. }
  1227. [HttpGet]
  1228. [HandlerAjaxOnly]
  1229. public ActionResult GetQiSetNum(string keyValue)
  1230. {
  1231. var rows = App.GetQiSetNum(keyValue);
  1232. return Content(rows.ToJson());
  1233. }
  1234. [HttpGet]
  1235. [HandlerAjaxOnly]
  1236. public ActionResult GetLoadShow()
  1237. {
  1238. DataTable ListData = App.GetLoadShow();
  1239. var JsonData = new
  1240. {
  1241. rows = ListData,
  1242. };
  1243. return Content(JsonData.ToJson());
  1244. }
  1245. [HttpGet]
  1246. [HandlerAjaxOnly]
  1247. public ActionResult GetFreeEnble()
  1248. {
  1249. DataTable ListData = App.GetFreeEnble();
  1250. var JsonData = new
  1251. {
  1252. rows = ListData,
  1253. };
  1254. return Content(JsonData.ToJson());
  1255. }
  1256. [HttpPost]
  1257. public void StatementExportAll(string Type, string ID)
  1258. {
  1259. //ID = ID.Substring(0, ID.Length - 2);
  1260. DataTable dt = App.StatementExportAll(Type, ID);
  1261. AsposeCell.Export(dt);
  1262. }
  1263. [HttpGet]
  1264. [HandlerAjaxOnly]
  1265. public ActionResult GetGridJsonBHGTM(Pagination pagination, string queryJson)
  1266. {
  1267. DataTable ListData = App.GetGridJsonBHGTM(queryJson, ref pagination);
  1268. var JsonData = new
  1269. {
  1270. total = pagination.total,
  1271. page = pagination.page,
  1272. records = pagination.records,
  1273. rows = ListData,
  1274. };
  1275. return Content(JsonData.ToJson());
  1276. }
  1277. //[HttpGet]
  1278. //[HandlerAjaxOnly]
  1279. public ActionResult GetSubGridJsonBHGTM(string LotNo, string Type, Pagination pagination)
  1280. {
  1281. DataTable ListData = App.GetSubGridJsonBHGTM(LotNo, Type, ref pagination);
  1282. var JsonData = new
  1283. {
  1284. total = pagination.total,
  1285. page = pagination.page,
  1286. records = pagination.records,
  1287. rows = ListData,
  1288. };
  1289. return Content(JsonData.ToJson());
  1290. }
  1291. //审核到货单
  1292. [HttpPost]
  1293. [HandlerAjaxOnly]
  1294. [ValidateAntiForgeryToken]
  1295. public ActionResult SubmitFormBHGTM(string LotNo, string keyValue, string WorkPoint)
  1296. {
  1297. int i = App.SubmitFormBHGTM(LotNo, keyValue, WorkPoint);
  1298. if (i > 0)
  1299. {
  1300. return Success("生成成功!");
  1301. }
  1302. else
  1303. {
  1304. return Error("生成失败!");
  1305. }
  1306. }
  1307. [HttpGet]
  1308. public ActionResult SelGDLX()
  1309. {
  1310. var data = App.SelGDLX();
  1311. return Content(data.ToJson());
  1312. }
  1313. [HttpGet]
  1314. public ActionResult CheckParentMO()
  1315. {
  1316. try
  1317. {
  1318. var data = App.CheckParentMO();
  1319. return Content(data.ToJson());
  1320. }
  1321. catch (Exception ex)
  1322. {
  1323. return Error(ex.Message);
  1324. }
  1325. }
  1326. [HttpGet]
  1327. public ActionResult GetInvBatchEnable(string InvCode)
  1328. {
  1329. var data = App.GetInvBatchEnable(InvCode);
  1330. return Content(data.ToJson());
  1331. }
  1332. //副产品
  1333. [HttpGet]
  1334. [HandlerAjaxOnly]
  1335. public ActionResult GetGridJsonFCP(Pagination pagination, string queryJson)
  1336. {
  1337. DataTable ListData = App.GetGridJsonFCP(queryJson, ref pagination);
  1338. var JsonData = new
  1339. {
  1340. total = pagination.total,
  1341. page = pagination.page,
  1342. records = pagination.records,
  1343. rows = ListData,
  1344. };
  1345. return Content(JsonData.ToJson());
  1346. }
  1347. /// <summary>
  1348. /// 锐腾调入单
  1349. /// </summary>
  1350. /// <param name="pagination"></param>
  1351. /// <param name="queryJson"></param>
  1352. /// <returns></returns>
  1353. [HttpGet]
  1354. [HandlerAjaxOnly]
  1355. public ActionResult GetGridJsonTransfer(Pagination pagination, string queryJson)
  1356. {
  1357. DataTable ListData = App.GetGridJsonTransfer(queryJson, ref pagination);
  1358. var JsonData = new
  1359. {
  1360. total = pagination.total,
  1361. page = pagination.page,
  1362. records = pagination.records,
  1363. rows = ListData,
  1364. };
  1365. return Content(JsonData.ToJson());
  1366. }
  1367. /// <summary>
  1368. /// 采购入库生成条码
  1369. /// </summary>
  1370. /// <param name="pagination"></param>
  1371. /// <param name="queryJson"></param>
  1372. /// <returns></returns>
  1373. [HttpGet]
  1374. [HandlerAjaxOnly]
  1375. public ActionResult GetGridJsonPurchaseReceive(Pagination pagination, string queryJson)
  1376. {
  1377. DataTable ListData = App.GetGridJsonPurchaseReceive(queryJson, ref pagination);
  1378. var JsonData = new
  1379. {
  1380. total = pagination.total,
  1381. page = pagination.page,
  1382. records = pagination.records,
  1383. rows = ListData,
  1384. };
  1385. return Content(JsonData.ToJson());
  1386. }
  1387. /// <summary>
  1388. /// 采购入库单生成条码
  1389. /// </summary>
  1390. /// <param name="TransferNO"></param>
  1391. /// <param name="Sequence"></param>
  1392. /// <param name="keyValue"></param>
  1393. /// <param name="WorkPoint"></param>
  1394. /// <returns></returns>
  1395. [HttpPost]
  1396. [HandlerAjaxOnly]
  1397. [ValidateAntiForgeryToken]
  1398. public ActionResult SubmitFormCGRKDSC(string RCVCode, string Sequence, string keyValue, string WorkPoint)
  1399. {
  1400. int i = App.SubmitFormCGRKDSC(RCVCode, Sequence, keyValue, WorkPoint);
  1401. if (i > 0)
  1402. {
  1403. return Success("生成成功!");
  1404. }
  1405. else
  1406. {
  1407. return Error("生成失败!");
  1408. }
  1409. }
  1410. [HttpPost]
  1411. [HandlerAjaxOnly]
  1412. [ValidateAntiForgeryToken]
  1413. public ActionResult SubmitFormCGRKDSCNew(string RCVCode, string Sequence, string keyValue, string WorkPoint)
  1414. {
  1415. int i = App.SubmitFormCGRKDSCNew(RCVCode, Sequence, keyValue, WorkPoint);
  1416. if (i > 0)
  1417. {
  1418. return Success("生成成功!");
  1419. }
  1420. else
  1421. {
  1422. return Error("生成失败!");
  1423. }
  1424. }
  1425. /// <summary>
  1426. /// 采购入库获去单据信息
  1427. /// </summary>
  1428. /// <param name="TransferNO"></param>
  1429. /// <param name="Sequence"></param>
  1430. /// <param name="WorkPoint"></param>
  1431. /// <returns></returns>
  1432. [HttpGet]
  1433. [HandlerAjaxOnly]
  1434. public ActionResult GetSubGridJsonPurchaseReceiveByCreate(string RCVCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  1435. {
  1436. DataTable ListData = App.GetSubGridJsonPurchaseReceiveByCreate(RCVCode, Sequence, WorkPoint, Quantity, InvCode);
  1437. var JsonData = new
  1438. {
  1439. rows = ListData,
  1440. };
  1441. return Content(JsonData.ToJson());
  1442. }
  1443. /// <summary>
  1444. /// 委外采购入库生成条码
  1445. /// </summary>
  1446. /// <param name="pagination"></param>
  1447. /// <param name="queryJson"></param>
  1448. /// <returns></returns>
  1449. [HttpGet]
  1450. [HandlerAjaxOnly]
  1451. public ActionResult GetGridJsonOutPurchaseReceive(Pagination pagination, string queryJson)
  1452. {
  1453. DataTable ListData = App.GetGridJsonOutPurchaseReceive(queryJson, ref pagination);
  1454. var JsonData = new
  1455. {
  1456. total = pagination.total,
  1457. page = pagination.page,
  1458. records = pagination.records,
  1459. rows = ListData,
  1460. };
  1461. return Content(JsonData.ToJson());
  1462. }
  1463. /// <summary>
  1464. /// 委外采购入库单生成条码
  1465. /// </summary>
  1466. /// <param name="TransferNO"></param>
  1467. /// <param name="Sequence"></param>
  1468. /// <param name="keyValue"></param>
  1469. /// <param name="WorkPoint"></param>
  1470. /// <returns></returns>
  1471. [HttpPost]
  1472. [HandlerAjaxOnly]
  1473. [ValidateAntiForgeryToken]
  1474. public ActionResult SubmitFormWWCGRKDSC(string RCVCode, string Sequence, string keyValue, string WorkPoint)
  1475. {
  1476. int i = App.SubmitFormWWCGRKDSC(RCVCode, Sequence, keyValue, WorkPoint);
  1477. if (i > 0)
  1478. {
  1479. return Success("生成成功!");
  1480. }
  1481. else
  1482. {
  1483. return Error("生成失败!");
  1484. }
  1485. }
  1486. /// <summary>
  1487. /// 委外采购入库单生成条码(新)
  1488. /// </summary>
  1489. /// <param name="TransferNO"></param>
  1490. /// <param name="Sequence"></param>
  1491. /// <param name="keyValue"></param>
  1492. /// <param name="WorkPoint"></param>
  1493. /// <returns></returns>
  1494. [HttpPost]
  1495. [HandlerAjaxOnly]
  1496. [ValidateAntiForgeryToken]
  1497. public ActionResult SubmitFormWWCGRKDSCNew(string RCVCode, string Sequence, string keyValue, string WorkPoint)
  1498. {
  1499. int i = App.SubmitFormWWCGRKDSCNew(RCVCode, Sequence, keyValue, WorkPoint);
  1500. if (i > 0)
  1501. {
  1502. return Success("生成成功!");
  1503. }
  1504. else
  1505. {
  1506. return Error("生成失败!");
  1507. }
  1508. }
  1509. /// <summary>
  1510. /// 委外采购入库获去单据信息
  1511. /// </summary>
  1512. /// <param name="TransferNO"></param>
  1513. /// <param name="Sequence"></param>
  1514. /// <param name="WorkPoint"></param>
  1515. /// <returns></returns>
  1516. [HttpGet]
  1517. [HandlerAjaxOnly]
  1518. public ActionResult GetSubGridJsonOutPurchaseReceiveByCreate(string RCVCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  1519. {
  1520. DataTable ListData = App.GetSubGridJsonOutPurchaseReceiveByCreate(RCVCode, Sequence, WorkPoint, Quantity, InvCode);
  1521. var JsonData = new
  1522. {
  1523. rows = ListData,
  1524. };
  1525. return Content(JsonData.ToJson());
  1526. }
  1527. /// <summary>
  1528. /// 派纳 线边仓调拨申请单生成条码
  1529. /// </summary>
  1530. /// <param name="pagination"></param>
  1531. /// <param name="queryJson"></param>
  1532. /// <returns></returns>
  1533. [HttpGet]
  1534. [HandlerAjaxOnly]
  1535. public ActionResult GetGridJsonTransferApplicationPN(Pagination pagination, string queryJson)
  1536. {
  1537. DataTable ListData = App.GetGridJsonTransferApplicationPN(queryJson, ref pagination);
  1538. var JsonData = new
  1539. {
  1540. total = pagination.total,
  1541. page = pagination.page,
  1542. records = pagination.records,
  1543. rows = ListData,
  1544. };
  1545. return Content(JsonData.ToJson());
  1546. }
  1547. /// <summary>
  1548. /// 派纳 线边仓一步调入单生成条码
  1549. /// </summary>
  1550. /// <param name="pagination"></param>
  1551. /// <param name="queryJson"></param>
  1552. /// <returns></returns>
  1553. [HttpGet]
  1554. [HandlerAjaxOnly]
  1555. public ActionResult GetGridJsonOneSetpTransPN(Pagination pagination, string queryJson)
  1556. {
  1557. DataTable ListData = App.GetGridJsonOneSetpTransPN(queryJson, ref pagination);
  1558. var JsonData = new
  1559. {
  1560. total = pagination.total,
  1561. page = pagination.page,
  1562. records = pagination.records,
  1563. rows = ListData,
  1564. };
  1565. return Content(JsonData.ToJson());
  1566. }
  1567. /// <summary>
  1568. /// 铭锋 退货调拨申请单生成条码
  1569. /// </summary>
  1570. /// <param name="pagination"></param>
  1571. /// <param name="queryJson"></param>
  1572. /// <returns></returns>
  1573. [HttpGet]
  1574. [HandlerAjaxOnly]
  1575. public ActionResult GetGridJsonTransferApplication(Pagination pagination, string queryJson)
  1576. {
  1577. DataTable ListData = App.GetGridJsonTransferApplication(queryJson, ref pagination);
  1578. var JsonData = new
  1579. {
  1580. total = pagination.total,
  1581. page = pagination.page,
  1582. records = pagination.records,
  1583. rows = ListData,
  1584. };
  1585. return Content(JsonData.ToJson());
  1586. }
  1587. /// <summary>
  1588. /// 派纳 线边仓调拨申请单生成条码 保存
  1589. /// </summary>
  1590. /// <param name="TransferNO"></param>
  1591. /// <param name="Sequence"></param>
  1592. /// <param name="keyValue"></param>
  1593. /// <param name="WorkPoint"></param>
  1594. /// <returns></returns>
  1595. [HttpPost]
  1596. [HandlerAjaxOnly]
  1597. [ValidateAntiForgeryToken]
  1598. public ActionResult SubmitFormTransferApplicatioPNSave(string TransferNO, string Sequence, string keyValue, string WorkPoint)
  1599. {
  1600. int i = App.SubmitFormTransferApplicatioPNSave(TransferNO, Sequence, keyValue, WorkPoint);
  1601. if (i > 0)
  1602. {
  1603. return Success("生成成功!");
  1604. }
  1605. else
  1606. {
  1607. return Error("生成失败!");
  1608. }
  1609. }
  1610. /// <summary>
  1611. /// 派纳 线边仓一步调入单生成条码 保存
  1612. /// </summary>
  1613. /// <param name="TransferNO"></param>
  1614. /// <param name="Sequence"></param>
  1615. /// <param name="keyValue"></param>
  1616. /// <param name="WorkPoint"></param>
  1617. /// <returns></returns>
  1618. [HttpPost]
  1619. [HandlerAjaxOnly]
  1620. [ValidateAntiForgeryToken]
  1621. public ActionResult SubmitFormOneStepTransPNSave(string TransferNO, string Sequence, string keyValue, string WorkPoint)
  1622. {
  1623. int i = App.SubmitFormOneStepTransPNSave(TransferNO, Sequence, keyValue, WorkPoint);
  1624. if (i > 0)
  1625. {
  1626. return Success("生成成功!");
  1627. }
  1628. else
  1629. {
  1630. return Error("生成失败!");
  1631. }
  1632. }
  1633. /// <summary>
  1634. /// 派纳 线边仓调拨申请单生成条码 保存(非规则生成条码)
  1635. /// </summary>
  1636. /// <param name="TransferNO"></param>
  1637. /// <param name="Sequence"></param>
  1638. /// <param name="keyValue"></param>
  1639. /// <param name="WorkPoint"></param>
  1640. /// <returns></returns>
  1641. [HttpPost]
  1642. [HandlerAjaxOnly]
  1643. [ValidateAntiForgeryToken]
  1644. public ActionResult SubmitFormTransferApplicatioPNSaveNew(string TransferNO, string Sequence, string keyValue, string WorkPoint)
  1645. {
  1646. int i = App.SubmitFormTransferApplicatioPNSaveNew(TransferNO, Sequence, keyValue, WorkPoint);
  1647. if (i > 0)
  1648. {
  1649. return Success("生成成功!");
  1650. }
  1651. else
  1652. {
  1653. return Error("生成失败!");
  1654. }
  1655. }
  1656. /// <summary>
  1657. /// 派纳 线边仓一步调入单生成条码 保存(非规则生成条码)
  1658. /// </summary>
  1659. /// <param name="TransferNO"></param>
  1660. /// <param name="Sequence"></param>
  1661. /// <param name="keyValue"></param>
  1662. /// <param name="WorkPoint"></param>
  1663. /// <returns></returns>
  1664. [HttpPost]
  1665. [HandlerAjaxOnly]
  1666. [ValidateAntiForgeryToken]
  1667. public ActionResult SubmitFormOneStepTransPNSaveNew(string TransferNO, string Sequence, string keyValue, string WorkPoint)
  1668. {
  1669. int i = App.SubmitFormOneStepTransferPNSaveNew(TransferNO, Sequence, keyValue, WorkPoint);
  1670. if (i > 0)
  1671. {
  1672. return Success("生成成功!");
  1673. }
  1674. else
  1675. {
  1676. return Error("生成失败!");
  1677. }
  1678. }
  1679. /// <summary>
  1680. /// 铭锋 退货调拨申请单生成条码 保存
  1681. /// </summary>
  1682. /// <param name="TransferNO"></param>
  1683. /// <param name="Sequence"></param>
  1684. /// <param name="keyValue"></param>
  1685. /// <param name="WorkPoint"></param>
  1686. /// <returns></returns>
  1687. [HttpPost]
  1688. [HandlerAjaxOnly]
  1689. [ValidateAntiForgeryToken]
  1690. public ActionResult SubmitFormTransferApplicatioSave(string TransferNO, string Sequence, string keyValue, string WorkPoint)
  1691. {
  1692. int i = App.SubmitFormTransferApplicatioSave(TransferNO, Sequence, keyValue, WorkPoint);
  1693. if (i > 0)
  1694. {
  1695. return Success("生成成功!");
  1696. }
  1697. else
  1698. {
  1699. return Error("生成失败!");
  1700. }
  1701. }
  1702. /// <summary>
  1703. /// 铭锋 退货调拨申请单生成条码 保存
  1704. /// </summary>
  1705. /// <param name="TransferNO"></param>
  1706. /// <param name="Sequence"></param>
  1707. /// <param name="keyValue"></param>
  1708. /// <param name="WorkPoint"></param>
  1709. /// <returns></returns>
  1710. [HttpPost]
  1711. [HandlerAjaxOnly]
  1712. [ValidateAntiForgeryToken]
  1713. public ActionResult SubmitFormTransferApplicatioSaveNew(string TransferNO, string Sequence, string keyValue, string WorkPoint)
  1714. {
  1715. int i = App.SubmitFormTransferApplicatioSaveNew(TransferNO, Sequence, keyValue, WorkPoint);
  1716. if (i > 0)
  1717. {
  1718. return Success("生成成功!");
  1719. }
  1720. else
  1721. {
  1722. return Error("生成失败!");
  1723. }
  1724. }
  1725. /// <summary>
  1726. /// 派纳 线边仓调拨申请单获取单据信息
  1727. /// </summary>
  1728. /// <param name="TransferNO"></param>
  1729. /// <param name="Sequence"></param>
  1730. /// <param name="WorkPoint"></param>
  1731. /// <returns></returns>
  1732. [HttpGet]
  1733. [HandlerAjaxOnly]
  1734. public ActionResult GetSubGridJsonTransferApplicationByCreatePN(string TransferNO, string Sequence, string WorkPoint)
  1735. {
  1736. DataTable ListData = App.GetSubGridJsonTransferApplicationByCreatePN(TransferNO, Sequence, WorkPoint);
  1737. var JsonData = new
  1738. {
  1739. rows = ListData,
  1740. };
  1741. return Content(JsonData.ToJson());
  1742. }
  1743. /// <summary>
  1744. /// 派纳 线边仓一步调入单获取单据信息
  1745. /// </summary>
  1746. /// <param name="TransferNO"></param>
  1747. /// <param name="Sequence"></param>
  1748. /// <param name="WorkPoint"></param>
  1749. /// <returns></returns>
  1750. [HttpGet]
  1751. [HandlerAjaxOnly]
  1752. public ActionResult GetSubGridJsonOneSetpTransByCreatePN(string TransferNO, string Sequence, string WorkPoint)
  1753. {
  1754. DataTable ListData = App.GetSubGridJsonOneSetpTransByCreatePN(TransferNO, Sequence, WorkPoint);
  1755. var JsonData = new
  1756. {
  1757. rows = ListData,
  1758. };
  1759. return Content(JsonData.ToJson());
  1760. }
  1761. /// <summary>
  1762. /// 铭锋 退货调拨申请单获取单据信息
  1763. /// </summary>
  1764. /// <param name="TransferNO"></param>
  1765. /// <param name="Sequence"></param>
  1766. /// <param name="WorkPoint"></param>
  1767. /// <returns></returns>
  1768. [HttpGet]
  1769. [HandlerAjaxOnly]
  1770. public ActionResult GetSubGridJsonTransferApplicationByCreate(string TransferNO, string Sequence, string WorkPoint)
  1771. {
  1772. DataTable ListData = App.GetSubGridJsonTransferApplicationByCreate(TransferNO, Sequence, WorkPoint);
  1773. var JsonData = new
  1774. {
  1775. rows = ListData,
  1776. };
  1777. return Content(JsonData.ToJson());
  1778. }
  1779. [HttpGet]
  1780. [HandlerAjaxOnly]
  1781. public ActionResult GetSubGridJsonFCPCreate(string FCPMOCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  1782. {
  1783. DataTable ListData = App.GetSubGridJsonFCPCreate(FCPMOCode, Sequence, WorkPoint, Quantity, InvCode);
  1784. var JsonData = new
  1785. {
  1786. rows = ListData,
  1787. };
  1788. return Content(JsonData.ToJson());
  1789. }
  1790. [HttpPost]
  1791. [HandlerAjaxOnly]
  1792. [ValidateAntiForgeryToken]
  1793. public ActionResult SubmitFormFCP(string FCPMOCode, string Sequence, string keyValue, string WorkPoint)
  1794. {
  1795. try
  1796. {
  1797. int i = App.SubmitFormFCP(FCPMOCode, Sequence, keyValue, WorkPoint);
  1798. if (i > 0)
  1799. {
  1800. return Success("生成成功!");
  1801. }
  1802. else
  1803. {
  1804. return Error("生成失败!");
  1805. }
  1806. }
  1807. catch (Exception ex)
  1808. {
  1809. return Error(ex.Message);
  1810. }
  1811. }
  1812. [HttpGet]
  1813. [HandlerAjaxOnly]
  1814. public ActionResult GetGeneratedNum(string Code, string Sequence, string Type, string thisCreateQty, string InvCode, string Quantitys)
  1815. {
  1816. bool Flag = App.GetGeneratedNum(Code, Sequence, Type, thisCreateQty, InvCode, Quantitys);
  1817. var JsonData = new
  1818. {
  1819. Flag = Flag,
  1820. };
  1821. return Content(JsonData.ToJson());
  1822. }
  1823. //到货单一键生成条码
  1824. [HttpPost]
  1825. [HandlerAjaxOnly]
  1826. [ValidateAntiForgeryToken]
  1827. public ActionResult SubmitFormSHDHALL(string keyValue)
  1828. {
  1829. int i = App.SubmitFormSHDHALL(keyValue);
  1830. if (i > 0)
  1831. {
  1832. return Success("生成成功!");
  1833. }
  1834. else
  1835. {
  1836. return Error("生成失败!");
  1837. }
  1838. }
  1839. //委外到货单一键生成条码
  1840. [HttpPost]
  1841. [HandlerAjaxOnly]
  1842. [ValidateAntiForgeryToken]
  1843. public ActionResult SubmitFormWWSHDHALL(string keyValue)
  1844. {
  1845. int i = App.SubmitFormWWSHDHALL(keyValue);
  1846. if (i > 0)
  1847. {
  1848. return Success("生成成功!");
  1849. }
  1850. else
  1851. {
  1852. return Error("生成失败!");
  1853. }
  1854. }
  1855. //开立成品入库(一键生成)
  1856. [HttpPost]
  1857. [HandlerAjaxOnly]
  1858. [ValidateAntiForgeryToken]
  1859. public ActionResult SubmitFormKLCPRKALL(string keyValue)
  1860. {
  1861. int i = App.SubmitFormKLCPRKALL(keyValue);
  1862. if (i > 0)
  1863. {
  1864. return Success("生成成功!");
  1865. }
  1866. else
  1867. {
  1868. return Error("生成失败!");
  1869. }
  1870. }
  1871. [HttpGet]
  1872. public ActionResult SelectICSColumnEnableForLotEnable()
  1873. {
  1874. var data = App.SelectICSColumnEnableForLotEnable();
  1875. return Content(data.ToJson());
  1876. }
  1877. [HttpGet]
  1878. [HandlerAjaxOnly]
  1879. public ActionResult GetLoadShowForColumn()
  1880. {
  1881. DataTable ListData = App.GetLoadShowForColumn();
  1882. var JsonData = new
  1883. {
  1884. rows = ListData,
  1885. };
  1886. return Content(JsonData.ToJson());
  1887. }
  1888. [HttpGet]
  1889. [HandlerAjaxOnly]
  1890. public ActionResult GetAMEnable()
  1891. {
  1892. string ListData = App.GetAMEnable();
  1893. var data = new
  1894. {
  1895. rows = ListData,
  1896. };
  1897. return Content(data.ToJson());
  1898. }
  1899. //查询配置-计量
  1900. [HttpGet]
  1901. [HandlerAjaxOnly]
  1902. public ActionResult SeachMeasure()
  1903. {
  1904. DataTable ListData = App.SeachMeasure();
  1905. var JsonData = new
  1906. {
  1907. rows = ListData,
  1908. };
  1909. return Content(JsonData.ToJson());
  1910. }
  1911. //查询配置-开启栏位
  1912. [HttpGet]
  1913. [HandlerAjaxOnly]
  1914. public ActionResult SeachLableofDisable()
  1915. {
  1916. DataTable ListData = App.SeachLableofDisable();
  1917. var JsonData = new
  1918. {
  1919. rows = ListData,
  1920. };
  1921. return Content(JsonData.ToJson());
  1922. }
  1923. [HttpGet]
  1924. [HandlerAjaxOnly]
  1925. public ActionResult SeachAmountEnablebyInvCode(string InvCode)
  1926. {
  1927. DataTable ListData = App.SeachAmountEnablebyInvCode(InvCode);
  1928. var JsonData = new
  1929. {
  1930. rows = ListData,
  1931. };
  1932. return Content(JsonData.ToJson());
  1933. }
  1934. [HttpGet]
  1935. [HandlerAjaxOnly]
  1936. public ActionResult SeachDatabyInvCode(string InvCode)
  1937. {
  1938. DataTable ListData = App.SeachDatabyInvCode(InvCode);
  1939. var JsonData = new
  1940. {
  1941. rows = ListData,
  1942. };
  1943. return Content(JsonData.ToJson());
  1944. }
  1945. [HttpPost]
  1946. /// <summary>
  1947. /// 文件上传到本地
  1948. /// </summary>
  1949. public string UploadFile(string Code, string Sequence)
  1950. {
  1951. try
  1952. {
  1953. //string str_Year = Request.Form["txt_Year"];
  1954. //String UPLoadType = Request.Form["UPLoadType"];
  1955. HttpFileCollection hpFiles = System.Web.HttpContext.Current.Request.Files;
  1956. if (hpFiles != null && hpFiles.Count > 0)
  1957. {
  1958. string IsXls = System.IO.Path.GetExtension(hpFiles[0].FileName).ToString().ToLower();//System.IO.Path.GetExtension获得文件的扩展名
  1959. if (IsXls != ".xls" && IsXls != ".xlsx")
  1960. {
  1961. return "只可以选择Excel(.xls .xlsx)文件";//当选择的不是Excel文件时,返回
  1962. }
  1963. string filename = DateTime.Now.ToString("yyyyMMddhhmmss") + IsXls; //获取Execle文件名 DateTime日期函数
  1964. string savePath = System.Web.HttpContext.Current.Server.MapPath("~\\File\\UPLoadFile\\" + filename);//Server.MapPath 获得虚拟服务器相对路径
  1965. int iLen = hpFiles[0].ContentLength;
  1966. if (Directory.Exists(savePath)) return "文件已存在";
  1967. byte[] bData = new byte[iLen];
  1968. hpFiles[0].InputStream.Read(bData, 0, iLen);
  1969. FileStream newFile = new FileStream(savePath, FileMode.OpenOrCreate);
  1970. newFile.Write(bData, 0, bData.Length);
  1971. newFile.Flush();
  1972. int _FileSizeTemp = hpFiles[0].ContentLength;
  1973. newFile.Close();
  1974. newFile.Dispose();
  1975. //bool del = false;
  1976. string mess = "";
  1977. mess = App.LotBindCode(savePath, Code, Sequence);
  1978. if (System.IO.File.Exists(savePath))//删除文件
  1979. {
  1980. System.IO.File.Delete(savePath);
  1981. }
  1982. return mess;
  1983. }
  1984. else
  1985. {
  1986. return "获取文件失败";
  1987. }
  1988. }
  1989. catch (Exception ex)
  1990. {
  1991. return ex.ToString();
  1992. }
  1993. }
  1994. //生产退料(一键生成)
  1995. [HttpPost]
  1996. [HandlerAjaxOnly]
  1997. [ValidateAntiForgeryToken]
  1998. public ActionResult SubmitFormGDTLALL(string keyValue)
  1999. {
  2000. int i = App.SubmitFormGDTLALL(keyValue);
  2001. if (i > 0)
  2002. {
  2003. return Success("生成成功!");
  2004. }
  2005. else
  2006. {
  2007. return Error("生成失败!");
  2008. }
  2009. }
  2010. //工单成品生成条码(一键生成)
  2011. [HttpPost]
  2012. [HandlerAjaxOnly]
  2013. [ValidateAntiForgeryToken]
  2014. public ActionResult SubmitFormChengPingALL(string keyValue)
  2015. {
  2016. try
  2017. {
  2018. int i = App.SubmitFormChengPingALL(keyValue);
  2019. if (i > 0)
  2020. {
  2021. return Success("生成成功!");
  2022. }
  2023. else
  2024. {
  2025. return Error("生成失败!");
  2026. }
  2027. }
  2028. catch (Exception ex)
  2029. {
  2030. return Error(ex.Message);
  2031. }
  2032. }
  2033. [HttpGet]
  2034. [HandlerAjaxOnly]
  2035. public ActionResult GetVendorBatch()
  2036. {
  2037. DataTable ListData = App.GetVendorBatch();
  2038. var JsonData = new
  2039. {
  2040. VendorLotNo = ListData.Rows[0][0].ToString(),
  2041. };
  2042. return Content(JsonData.ToJson());
  2043. }
  2044. [HttpGet]
  2045. [HandlerAjaxOnly]
  2046. public ActionResult GetVendorBatchBYInvCode(string InvCode, string WorkPoint)
  2047. {
  2048. DataTable ListData = App.GetVendorBatchBYInvCode(InvCode, WorkPoint);
  2049. var JsonData = new
  2050. {
  2051. VendorLotNo = ListData.Rows[0][0].ToString(),
  2052. };
  2053. return Content(JsonData.ToJson());
  2054. }
  2055. //查询返工工单数据源
  2056. [HttpGet]
  2057. public ActionResult GetReworkMo(string invcode, string Code, string SourceCode, Pagination pagination)
  2058. {
  2059. DataTable ListData = App.GetReworkMo(invcode, Code, SourceCode, ref pagination);
  2060. var JsonData = new
  2061. {
  2062. total = pagination.total,
  2063. page = pagination.page,
  2064. records = pagination.records,
  2065. rows = ListData,
  2066. };
  2067. return Content(JsonData.ToJson());
  2068. }
  2069. //条码重新绑定返工工单
  2070. [HttpPost]
  2071. [HandlerAjaxOnly]
  2072. public ActionResult LotReworkBind(string LotNo, string Code, string Sequence, string ExtensionID)
  2073. {
  2074. string msg = App.LotReworkBind(LotNo, Code, Sequence, ExtensionID);
  2075. if (!string.IsNullOrEmpty(msg))
  2076. {
  2077. return Error(msg);
  2078. }
  2079. else
  2080. {
  2081. return Success("条码重新绑定成功!");
  2082. }
  2083. }
  2084. /// <summary>
  2085. /// 一键退库(咖博士新增需求:根据生产退料单,B2、C类物料可以实现一键退库操作)
  2086. /// </summary>
  2087. /// <param name="LotNo"></param>
  2088. /// <param name="Code"></param>
  2089. /// <param name="Sequence"></param>
  2090. /// <param name="ExtensionID"></param>
  2091. /// <returns></returns>
  2092. [HttpPost]
  2093. [HandlerAjaxOnly]
  2094. public ActionResult PostInWareHouse(string IDs)
  2095. {
  2096. try
  2097. {
  2098. string msg = App.PostInWareHouse(IDs);
  2099. if (!string.IsNullOrEmpty(msg))
  2100. {
  2101. return Error(msg);
  2102. }
  2103. else
  2104. {
  2105. return Success("操作成功!");
  2106. }
  2107. }
  2108. catch (Exception ex)
  2109. {
  2110. return Error(ex.Message);
  2111. }
  2112. }
  2113. //红字销售出库单打生成条码列表
  2114. [HttpGet]
  2115. [HandlerAjaxOnly]
  2116. public ActionResult GetGridJsonWMSSSD(Pagination pagination, string queryJson)
  2117. {
  2118. DataTable ListData = App.GetGridJsonWMSSSD(queryJson, ref pagination);
  2119. var JsonData = new
  2120. {
  2121. total = pagination.total,
  2122. page = pagination.page,
  2123. records = pagination.records,
  2124. rows = ListData,
  2125. };
  2126. return Content(JsonData.ToJson());
  2127. }
  2128. /// <summary>
  2129. /// 红字销售出库单打生成条码查询
  2130. /// </summary>
  2131. /// <param name="SDNCode"></param>
  2132. /// <param name="Sequence"></param>
  2133. /// <param name="WorkPoint"></param>
  2134. /// <returns></returns>
  2135. [HttpGet]
  2136. [HandlerAjaxOnly]
  2137. public ActionResult GetSubGridJsonSSDByCreate(string SSDCode, string Sequence, string WorkPoint, string Quantity, string InvCode)
  2138. {
  2139. DataTable ListData = App.GetSubGridJsonSSDByCreate(SSDCode, Sequence, WorkPoint, Quantity, InvCode);
  2140. var JsonData = new
  2141. {
  2142. rows = ListData,
  2143. };
  2144. return Content(JsonData.ToJson());
  2145. }
  2146. //红字销售出库单生成条码
  2147. [HttpPost]
  2148. [HandlerAjaxOnly]
  2149. [ValidateAntiForgeryToken]
  2150. public ActionResult SubmitFormSSD(string SSDCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
  2151. {
  2152. int i = App.SubmitFormSSD(SSDCode, Sequence, keyValue, WorkPoint, AMEnable);
  2153. if (i > 0)
  2154. {
  2155. return Success("生成成功!");
  2156. }
  2157. else
  2158. {
  2159. return Error("生成失败!");
  2160. }
  2161. }
  2162. //红字销售出库单生成条码
  2163. [HttpPost]
  2164. [HandlerAjaxOnly]
  2165. [ValidateAntiForgeryToken]
  2166. public ActionResult SubmitFormSSDNew(string SSDCode, string Sequence, string keyValue, string WorkPoint, string AMEnable)
  2167. {
  2168. int i = App.SubmitFormSSDNew(SSDCode, Sequence, keyValue, WorkPoint, AMEnable);
  2169. if (i > 0)
  2170. {
  2171. return Success("生成成功!");
  2172. }
  2173. else
  2174. {
  2175. return Error("生成失败!");
  2176. }
  2177. }
  2178. //采购入库生成(一键)
  2179. [HttpPost]
  2180. [HandlerAjaxOnly]
  2181. [ValidateAntiForgeryToken]
  2182. public ActionResult SubmitFormCGRKALL(string keyValue)
  2183. {
  2184. int i = App.SubmitFormCGRKALL(keyValue);
  2185. if (i > 0)
  2186. {
  2187. return Success("生成成功!");
  2188. }
  2189. else
  2190. {
  2191. return Error("生成失败!");
  2192. }
  2193. }
  2194. //销售退货(一键)
  2195. [HttpPost]
  2196. [HandlerAjaxOnly]
  2197. [ValidateAntiForgeryToken]
  2198. public ActionResult SubmitFormXSTHALL(string keyValue)
  2199. {
  2200. int i = App.SubmitFormXSTHALL(keyValue);
  2201. if (i > 0)
  2202. {
  2203. return Success("生成成功!");
  2204. }
  2205. else
  2206. {
  2207. return Error("生成失败!");
  2208. }
  2209. }
  2210. //其他入库(一键)
  2211. [HttpPost]
  2212. [HandlerAjaxOnly]
  2213. [ValidateAntiForgeryToken]
  2214. public ActionResult SubmitFormQiTaALL(string keyValue)
  2215. {
  2216. int i = App.SubmitFormQiTaALL(keyValue);
  2217. if (i > 0)
  2218. {
  2219. return Success("生成成功!");
  2220. }
  2221. else
  2222. {
  2223. return Error("生成失败!");
  2224. }
  2225. }
  2226. //材料出库退料(一键生成)
  2227. [HttpPost]
  2228. [HandlerAjaxOnly]
  2229. [ValidateAntiForgeryToken]
  2230. public ActionResult SubmitFormCLCKTLALL(string keyValue)
  2231. {
  2232. int i = App.SubmitFormCLCKTLALL(keyValue);
  2233. if (i > 0)
  2234. {
  2235. return Success("生成成功!");
  2236. }
  2237. else
  2238. {
  2239. return Error("生成失败!");
  2240. }
  2241. }
  2242. }
  2243. }