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.

2454 lines
81 KiB

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