abp(net core)+easyui+efcore实现仓储管理系统目录

abp(net core)+easyui+efcore实现仓储管理系统——EasyUI前端页面框架 (十八)

在上一篇文章中我们已经通过easyui构建了一个简单的前端页面,在今天我们来实现前端页面的中的各功能代码。

十、添加出库单的增删改脚本

1. 在Visual Studio 2017的“解决方案资源管理器”中,找到领域层“ABP.TPLMS.Web.Mvc”项目中的wwwroot目录下的view-resources\outstock目录中的找到Index.js文件。

2. 在Index.js文件中,我们编写出库单的相应脚本代码。代码如下:

  1. //-----------------------系统管理-->出库单管理------------------------------//
  2.  
  3. var editIndex = undefined;
  4.  
  5. var mainIndex = undefined;
  6.  
  7. //刷新数据
  8.  
  9. function initable() {
  10.  
  11. $("#dgOutSO").datagrid({
  12.  
  13. url: "/OutStock/List",
  14.  
  15. //url:"api/services/app/instock/GetAllInStockOrders",
  16.  
  17. title: "出库单管理",
  18. pagination: true,
  19.  
  20. pageSize: 10,
  21. pageList: [10, 20, 30],
  22.  
  23. fit: true,
  24. fitColumns: false,
  25.  
  26. loadMsg: "正在加载出库单信息...",
  27. nowarp: false,
  28.  
  29. border: false,
  30. idField: "Id",
  31.  
  32. sortName: "Id",
  33. sortOrder: "asc",
  34.  
  35. frozenColumns: [[//冻结列
  36. { field: "ck", checkbox: true, align: "left", width: 50 }
  37.  
  38. ]],
  39.  
  40. columns: [[
  41.  
  42. { title: "编号", field: "Id", width: 50, sortable: true },
  43.  
  44. { title: "出库单号", field: "No", width: 100, sortable: true },
  45. {title: "状态", field: "Status", width: 50 },
  46. { title: '出库日期', field: 'ReceiveTime', width: 100, align: 'center' },
  47. { title: "车牌号", field: "VehicleNo", width: 100, sortable: false },
  48. { title: '客户', field: 'CustomerName', width: 120, align: 'center' },
  49. { title: '收货人', field: 'Consignee', width: 120, align: 'center' },
  50.  
  51. { title: "净重", field: "Nwt", width: 100, sortable: true },
  52. { title: "毛重", field: "Gwt", width: 100, sortable: true },
  53.  
  54. { title: '审核人',field: 'Checker', width: 120, align: 'center' },
  55. { title: '件数', field: 'PackageQty', width: 100, align: 'center' },
  56.  
  57. { title: '创建时间', field: 'CreationTime', width: 100, align: 'center' }
  58. ]]
  59.  
  60. });
  61.  
  62. }
  63.  
  64. //显示入库单明细数据
  65. function ShowCargo() {
  66. abp.log.warn('入库货物信息列表日志...');
  67.  
  68. $("#dgCargo").datagrid({
  69.  
  70. url: "/InStock/LoadInodLocs",
  71.  
  72. title: "入库货物管理管理",
  73.  
  74. pagination: true,
  75. pageSize: 10,
  76. pageList: [10, 20, 30],
  77. fit: true,
  78. fitColumns: false,
  79.  
  80. loadMsg: "正在加载入库货物信息...",
  81.  
  82. nowarp: false,
  83.  
  84. border: false,
  85. idField: "Id",
  86. sortName: "Id",
  87. sortOrder: "asc",
  88. frozenColumns: [[//冻结列
  89.  
  90. { field: "ck", checkbox: true, align: "left", width: 50 }
  91.  
  92. ]],
  93.  
  94. columns: [[
  95.  
  96. { title: "编号", field: "Id", width: 50, sortable: true },
  97.  
  98. { title: "供应商", field: "SupplierId", width: 80, sortable: true },
  99. { title: "HSCode", field: "HSCode", width: 100, sortable: true },
  100.  
  101. { title: "货物代码", field: "CargoCode", width: 100, sortable: true },
  102. { title: "货物名称", field: "CargoName", width: 80, sortable: false },
  103.  
  104. { title: "规格型号", field: "Spcf", width: 100, sortable: false },
  105. { title: "库位", field: "Loc", width: 80, sortable: false },
  106.  
  107. { title: "产销国", field: "Country", width: 80, sortable: false },
  108. { title: "计量单位", field: "Unit", width: 100, sortable: false },
  109.  
  110. { title: "包装", field: "Package", width: 100, sortable: false },
  111. { title: "单价", field: "Price", width: 100, sortable: false },
  112.  
  113. { title: "币制", field: "Curr", width: 80, sortable: false },
  114. {
  115. title: "长宽高", field: "Length", width: 100, sortable: false,
    formatter: function (value, row, index) {
  116. return row.Length + '*' + row.Width + '*' + row.Height;
  117. }
  118.  
  119. },
  120.  
  121. { title: "体积", field: "Vol", width: 80, sortable: false },
  122. { title: "备注", field: "Remark", width: 80, sortable: false },
  123. { title: '创建时间', field: 'CreationTime', width: 100, align: 'center' }
  124.  
  125. ]]
  126.  
  127. });
  128.  
  129. abp.log.warn('3货物信息列表日志...');
  130.  
  131. }
  132.  
  133. function ShowCargoInfo() {
  134.  
  135. $("#divImportCargo").dialog({
  136.  
  137. closed: false,
  138. title: "选择入库货物信息",
  139. modal: true,
  140. width: 820,
  141. height: 550,
  142.  
  143. collapsible: true,
  144. minimizable: true,
  145. maximizable: true,
  146. resizable: true
  147.  
  148. });
  149.  
  150. ShowCargo();
  151. $("#dgCargo").datagrid("clearChecked");
  152. $("#dgCargo").datagrid("clearSelections");
  153. }
  154.  
  155. function reloaded() { //reload
  156. $("#reload").click(function () {
  157. //
  158. $('#dgOutSO').datagrid('reload');
  159.  
  160. });}
  161.  
  162. //修改点击按钮事件
  163. function updOutSOInfo() {
  164.  
  165. $("#edit").click(function () {
  166.  
  167. //判断选择的中
  168. var row = $("#dgOutSO").datagrid('getSelected');
  169. if (row) {
  170.  
  171. $.messager.confirm('编辑', '您想要编辑吗?', function (r) {
  172. if (r) {
  173.  
  174. //打开对话框编辑
  175. $("#divAddUpdINO").dialog({
  176. closed: false,
  177. title: "修改出库单",
  178. modal: true,
  179. width: 820,
  180. height: 550,
  181. collapsible: true,
  182. minimizable: true,
  183. maximizable: true,
  184. resizable: true,
  185.  
  186. });
  187.  
  188. //先绑定
  189.  
  190. showOutO(row);
  191. defaultTab();
  192. ShowDetail(row.No);
  193. }
  194.  
  195. });
  196.  
  197. SetEnabled(row.Status);
  198. } else {
  199.  
  200. $.messager.alert('提示', ' 请选择要编辑的行!', 'warning');
  201. }
  202.  
  203. });
  204.  
  205. }
  206.  
  207. //删除模块
  208. function deleteOutSO() {
  209.  
  210. $("#del").click(function () {
  211. var rows = $("#dgOutSO").datagrid("getSelections");
  212. if (rows.length > 0) {
  213. $.messager.confirm("提示", "确定要删除吗?", function (res) {
  214. if (res) {
  215. var codes = []; //重要不是{}
  216. for (var i = 0; i < rows.length; i++) {
  217. codes.push(rows[i].Id);
  218. }
  219. $.post("/OutStock/Delete", { "ids": codes.join(',') }, function (data) {
  220.  
  221. if (data == "OK") {
  222. $.messager.alert("提示", "删除成功!");
  223. $("#dgOutSO").datagrid("clearChecked");
  224. $("#dgOutSO").datagrid("clearSelections");
  225. $("#dgOutSO").datagrid("load", {});
  226. }
  227.  
  228. else if (data == "NO") {
  229. $.messager.alert("提示", "删除失败!");
  230. return;
  231. }
  232.  
  233. });
  234.  
  235. }
  236. });
  237. }
  238. })
  239.  
  240. }
  241. //清空文本框
  242.  
  243. function clearAll() {
  244.  
  245. $("#divAddUpdINO input").each(function () {
  246. $(this).val("");
  247. });
  248. $("#PreDeliveryTimeUpdate").val(getNowFormatDate());
  249. $("#StatusUpdate").val("0");
  250. $("#NwtUpdate").val("0");
  251.  
  252. $("#GwtUpdate").val("0");
  253. $("#PackageQtyUpdate").val("0");
  254.  
  255. }
  256. function GetNo() {
  257. // url: abp.appPath + "api/services/app/org/GetAllOrgs",
  258. $.get(abp.appPath + "api/services/app/OutStockOrder/GetNo", function (data) {
  259.  
  260. // alert(data);
  261. // var obj = JSON.parse(data);
  262. $("#UpdNO").val(data);
  263. //$("#IDUpdate").val(obj.Id);
  264.  
  265. });
  266. }
  267. //获取当前时间,格式YYYY-MM-DD
  268. function getNowFormatDate() {
  269. var date = new Date();
  270. var seperator1 = "-";
  271.  
  272. var year = date.getFullYear();
  273.  
  274. var month = date.getMonth() + 1;
  275.  
  276. var strDate = date.getDate();
  277.  
  278. if (month >= 1 && month <= 9) {
  279. month = "0" + month;
  280. }
  281. if (strDate >= 0 && strDate <= 9) {
  282. strDate = "0" + strDate;
  283. }
  284.  
  285. var currentdate = year + seperator1 + month + seperator1 + strDate;
  286. return currentdate;
  287.  
  288. }
  289.  
  290. //将表单数据转为json
  291.  
  292. function form2Json(id) {
  293.  
  294. var arr = $("#" + id).serializeArray()
  295. var jsonStr = "";
  296.  
  297. jsonStr += '{';
  298. for (var i = 0; i < arr.length; i++) {
  299.  
  300. jsonStr += '"' + arr[i].name + '":"' + arr[i].value + '",'
  301. }
  302. jsonStr = jsonStr.substring(0, (jsonStr.length - 1));
  303. jsonStr += '}'
  304.  
  305. var json = JSON.parse(jsonStr)
  306.  
  307. return json
  308. }
  309.  
  310. function searchFunc() {
  311. // var obj = $("#searchform").serializeArray();
  312.  
  313. // $("#dgPOD").datagrid({ queryParams: form2Json("searchform") });
  314. var jsonStr = '{"cargoName":"' + $("#cargoName").val() + '"}';
  315.  
  316. var queryParams = JSON.parse(jsonStr);
  317. $("#dgPOD").datagrid({ queryParams: queryParams });
  318. // $("#dgPOD").datagrid('reload');
  319. } //扩展方法
  320.  
  321. //点击清空按钮出发事件
  322.  
  323. function clearSearch() {
  324. $("#dgPOD").datagrid("load", {}); //重新加载数据,无填写数据,向后台传递值则为空
  325.  
  326. $("#searchForm").find("input").val(""); //找到form表单下的所有input标签并清空
  327. }
  328.  
  329. function SetEnabled(status) {
  330. //var status = $("#StatusUpdate").val()
  331.  
  332. if (status == "提交") {
  333. $("#btnSave").prop('disabled', true);
  334. }
  335. else {
  336. $("#btnSave").removeAttr("disabled");
  337. }
  338. }
  339.  
  340. function defaultTab() {
  341. //默认显示第一个tab
  342. $('#box').tabs('select', "出库单");
  343.  
  344. }
  345.  
  346. //弹出 创建出库单的的对话框
  347.  
  348. function showOutOdDialog() {
  349.  
  350. $("#add").click(function () {
  351.  
  352. $.messager.confirm('编辑', '您想要创建出库单吗?', function (r) {
  353.  
  354. if (r) {
  355.  
  356. //打开对话框编辑
  357.  
  358. $("#divAddUpdINO").dialog({
  359.  
  360. closed: false,
  361.  
  362. title: "新增出库单",
  363. modal: true,
  364. width: 820,
  365.  
  366. height: 550,
  367. collapsible: true,
  368. minimizable: true,
  369. maximizable: true,
  370. resizable: true,
  371. });
  372.  
  373. }
  374.  
  375. defaultTab();
  376. GetNo();
  377. clearAll();
  378. ShowDetail("");
  379. });
  380.  
  381. // SetEnabled("新建");
  382.  
  383. });
  384.  
  385. $("#btnSave").click(function () {
  386.  
  387. //保存
  388.  
  389. var id = $("#IDUpdate").val();
  390. if (id == "" || id == undefined) {
  391.  
  392. //验证
  393.  
  394. $.messager.confirm('确认', '您确认要保存吗?', function (r) {
  395.  
  396. if (r) {
  397.  
  398. var postData = GetOutO();
  399.  
  400. if (postData.No == "" || postData.Shipper == "" || postData.ShipperCode==""
    || postData.Consignee=="") {
  401. $.messager.alert('提示', ' 请填写相关必填项!', 'warning');
  402. return;
  403.  
  404. }
  405.  
  406. $.post("/OutStock/Add", postData, function (data) {
  407.  
  408. if (data == "OK") {
  409.  
  410. // $("#divAddUpdDO").dialog("close");
  411.  
  412. $.messager.alert("提示", "保存成功!");
  413. initable();
  414.  
  415. collapseRows();
  416. }
  417.  
  418. else if (data == "NO") {
  419.  
  420. $.messager.alert("提示", "保存失败!");
  421.  
  422. return;
  423.  
  424. }
  425.  
  426. });
  427. }
  428. })
  429.  
  430. }
  431.  
  432. else {
  433.  
  434. saveDetail();
  435. initable();
  436. collapseRows();
  437.  
  438. }
  439. });
  440.  
  441. }
  442.  
  443. //添加明细
  444.  
  445. function ShowDetail(no) {
  446. var lastIndex;
  447.  
  448. $("#dgOutOD").datagrid({
  449. url: "/OutStock/GetDetail?no=" + no,
  450.  
  451. title: "出库单明细",
  452.  
  453. pagination: false,
  454.  
  455. fit: true,
  456.  
  457. fitColumns: false,
  458.  
  459. loadMsg: "正在加载出库单明细信息...",
  460.  
  461. toolbar: [
  462.  
  463. { text: '添加明细', iconCls: 'icon-add', handler: function () { ShowCargoInfo(); } },
  464. { text: '删除', iconCls: 'icon-remove', handler: function ()
    { deviceInfoDeleteClick(); } },
  465. '-' ],
  466.  
  467. nowarp: false,
  468.  
  469. border: false,
  470.  
  471. idField: "Id",
  472. sortName: "Id",
  473. sortOrder: "asc",
  474. singleSelect: true,
  475. iconCls: 'icon-edit',
  476.  
  477. columns: [[
  478.  
  479. { title: "编号", field: "SeqNo", width: 50, sortable: true },
  480.  
  481. { title: "入库单号", field: "OutStockNo", width: 100, sortable: true },
  482. { title: "HSCode", field: "HSCode", width: 80, sortable: false },
  483. { title: "货物代码", field: "CargoCode", width: 100, sortable: true },
  484. { title: "货物名称", field: "CargoName", width: 160, sortable: false },
  485. { title: "规格型号", field: "Spcf", width: 80, sortable: false },
  486. {
  487. title: "数量", field: "Qty", width: 100, align: 'center', editor: {
  488. type: 'numberbox', options: {
  489.  
  490. required: true, min: 0, precision: 4
  491. }
  492. }
  493.  
  494. },
  495. {
  496. title: "长", field: "Length", width: 70, align: 'center', editor: {
  497. type: 'numberbox', options: {
  498. required: true, min: 0, precision: 2
  499. }
  500. }
  501. },
  502.  
  503. {
  504.  
  505. title: "宽", field: "Width", width: 70, align: 'center', editor: {
  506.  
  507. type: 'numberbox', options: {
  508.  
  509. required: true, min: 0, precision: 2
  510.  
  511. }
  512.  
  513. }
  514.  
  515. },
  516.  
  517. {
  518.  
  519. title: "高", field: "Height", width: 70, align: 'center', editor: {
  520.  
  521. type: 'numberbox', options: {
  522.  
  523. required: true, min: 0, precision: 2
  524. }
  525. }
  526. },
  527.  
  528. { title: "产销国", field: "Country", width: 70, align: 'center' },
  529. {
  530.  
  531. title: "单价", field: "Price", width: 100, align: 'center', editor: {
  532. type: 'numberbox', options: {
  533. required: true, min: 0, precision: 2
  534. }
  535.  
  536. }
  537.  
  538. },
  539.  
  540. {
  541. title: "总价", field: "TotalAmt", width: 100, align: 'center', editor: {
  542. type: 'numberbox', options: {
  543.  
  544. required: true, min: 0, precision: 2
  545. }
  546. }
  547.  
  548. },
  549. { title: "包装", field: "Package", width: 70, align: 'center' },
  550. { title: "计量单位", field: "Unit", width: 70, align: 'center' },
  551. {
  552. title: "总体积", field: "Vol", width: 70, align: 'center', editor: {
  553. type: 'numberbox', options: {
  554. required: true, min: 0, precision: 4
  555. }
  556.  
  557. }
  558.  
  559. },
  560.  
  561. { title: "品牌", field: "Brand", width: 70, align: 'center' }
  562. ]],
  563. onClickRow: function (index, rowData) {
  564.  
  565. if (lastIndex != index) {
  566. $('#dgOutOD').datagrid('endEdit', lastIndex);
  567. editrow(index);
  568.  
  569. }
  570. lastIndex = index;
  571. mainIndex = index;
  572. },
  573.  
  574. onBeginEdit: function (rowIndex, rowData) {
  575. setEditing(rowIndex);
  576.  
  577. }
  578.  
  579. });
  580.  
  581. }
  582.  
  583. //计算报价小计
  584. function setEditing(rowIndex) {
  585.  
  586. var editors = $('#dgOutOD').datagrid('getEditors', rowIndex);
  587.  
  588. var priceEditor = editors[4];
  589.  
  590. var qtyEditor = editors[0];
  591. var lengthEditor = editors[1];
  592. var widthEditor = editors[2];
  593.  
  594. var heightEditor = editors[3];
  595. var totalVolEditor = editors[6];
  596. var totalAmtEditor = editors[5];
  597.  
  598. priceEditor.target.numberbox({
  599.  
  600. onChange: function () { calculate();}
  601.  
  602. });
  603.  
  604. qtyEditor.target.numberbox({
  605. onChange: function () {
  606. calculate();
  607. calculateVol();
  608.  
  609. }
  610.  
  611. });
  612.  
  613. lengthEditor.target.numberbox({
  614. onChange: function () { calculateVol(); }
  615.  
  616. });
  617.  
  618. widthEditor.target.numberbox({
  619.  
  620. onChange: function () { calculateVol(); }
  621.  
  622. });
  623.  
  624. heightEditor.target.numberbox({
  625. onChange: function () { calculateVol(); }
  626.  
  627. });
  628.  
  629. function calculate() {
  630. var cost = (priceEditor.target.val()) * (qtyEditor.target.val());
  631.  
  632. console.log(cost);
  633.  
  634. totalAmtEditor.target.numberbox("setValue", cost);
  635.  
  636. }
  637.  
  638. function calculateVol() {
  639. var vol = (lengthEditor.target.val() / 100.0) * (widthEditor.target.val() / 100.0)
    * (heightEditor.target.val() / 100.0)* (qtyEditor.target.val());
  640. console.log(vol);
  641.  
  642. totalVolEditor.target.numberbox("setValue", vol);
  643.  
  644. }
  645.  
  646. }
  647.  
  648. function editrow(index) {
  649.  
  650. $('#dgOutOD').datagrid('selectRow', index)
  651.  
  652. .datagrid('beginEdit', index);
  653.  
  654. }
  655.  
  656. function endEdit() {
  657. var rows = $('#dgOutOD').datagrid('getRows');
  658.  
  659. if (rows==undefined) {
  660. return;
  661.  
  662. }
  663.  
  664. for (var i = 0; i < rows.length; i++) {
  665. $('#dgOutOD').datagrid('endEdit', i);
  666.  
  667. }
  668.  
  669. }
  670.  
  671. //设置出库单明细数据
  672.  
  673. function setGridDetail(effectRow) {
  674.  
  675. if ($('#dgOutOD').datagrid('getChanges').length) {
  676. var inserted = $('#dgOutOD').datagrid('getChanges', "inserted");
  677. var deleted = $('#dgOutOD').datagrid('getChanges', "deleted");
  678. var updated = $('#dgOutOD').datagrid('getChanges', "updated");
  679.  
  680. if (inserted.length) {
  681. effectRow["inserted"] = JSON.stringify(inserted);
  682. }
  683.  
  684. if (deleted.length) {
  685. effectRow["deleted"] = JSON.stringify(deleted);
  686. }
  687. if (updated.length) {
  688. effectRow["updated"] = JSON.stringify(updated);
  689.  
  690. }
  691.  
  692. }
  693.  
  694. return effectRow;
  695.  
  696. }
  697.  
  698. function endEditSub(ddv) {
  699. if (mainIndex != undefined) {
  700. var rows = ddv.datagrid('getRows');
  701. if (rows!=undefined) {
  702. for (var i = 0; i < rows.length; i++) {
  703. ddv.datagrid('endEdit', i);
  704.  
  705. }
  706. }
  707. }
  708.  
  709. }
  710.  
  711. function saveDetail() {
  712. endEdit();
  713.  
  714. $.messager.confirm('确认', '您确认要修改吗?', function (r) {
  715.  
  716. var effectRow = new Object();
  717.  
  718. var postData = GetOutO();
  719.  
  720. if (postData.Id) {
  721. effectRow["postdata"] = JSON.stringify(postData);
  722. }
  723. effectRow = setGridDetail(effectRow);
  724.  
  725. $.post("/OutStock/Update", effectRow, function (data) {
  726.  
  727. // alert(data);
  728.  
  729. if (data.success) {
  730.  
  731. $.messager.alert("提示", data.result);
  732.  
  733. $('#dgOutOD').datagrid('acceptChanges');
  734.  
  735. // $("#divAddUpdPO").dialog("close"); // initable();
  736. }
  737. else {
  738. $.messager.alert("提示", data.result);
  739. return;
  740. }
  741. }, "JSON")
  742. ;
  743. })
  744.  
  745. }
  746.  
  747. function init() {
  748. $("#PreDeliveryTimeUpdate").val(getNowFormatDate());
  749. $("#CreationTimeUpdate").val(getNowFormatDate());
  750. $("#btnCancle").click(function () {
  751.  
  752. $("#divAddUpdINO").dialog("close");
  753.  
  754. $('#dgOutSO').datagrid('reload');
  755.  
  756. });
  757.  
  758. $("#btnCancleDO").click(function () {
  759. $("#divImportDO").dialog("close");
  760. $('#dgOutSO').datagrid('reload');
  761.  
  762. });
  763.  
  764. $("#btnImportDO").click(function () {
  765.  
  766. //保存
  767.  
  768. var rows = $('#dgCargo').datagrid('getSelections');
  769. if (rows.length > 0) {
  770.  
  771. //验证
  772.  
  773. $.messager.confirm('确认', '您确认要保存所选择的货物信息吗?', function (r) {
  774.  
  775. if (r) {
  776. var obj_No = $("#UpdNO").val();
  777. var ids = [];//重要不是{}
  778. for (var i = 0; i < rows.length; i++) {
  779. ids.push(rows[i].Id);
  780. }
  781.  
  782. var postData = {
  783. "Ids": ids.join(','),
  784. "No": obj_No
  785.  
  786. };
  787.  
  788. $.post("/OutStock/ImportInStockOrder", postData, function (data) {
  789. if (data == "OK") {
  790. $.messager.alert("提示", "保存货物信息成功!");
  791. ShowDetail(obj_No);
  792. }
  793. else if (data == "NO") {
  794. $.messager.alert("提示", "保存货物信息失败!");
  795. return;
  796. }
  797.  
  798. });
  799. }
  800. })
  801. }
  802. });
  803.  
  804. $("#btnSubmit").click(function () {
  805.  
  806. //保存
  807. var id = $("#IDUpdate").val();
  808. if (id == "" || id == undefined) {
  809. $.messager.alert("提示", "出库单没有保存,请先保存!");
  810. return;
  811. }
  812.  
  813. //验证
  814.  
  815. $.messager.confirm('确认', '您确认要提交出库单吗?', function (r) {
  816.  
  817. if (r) {
  818.  
  819. var postData = {
  820. "Id": id
  821.  
  822. };
  823.  
  824. $.post("/OutStock/Submit", postData, function (data) {
  825.  
  826. if (data == "OK") {
  827. $.messager.alert("提示", "出库单已经提交成功!");
  828.  
  829. $("#StatusUpdate").val("提交");
  830.  
  831. SetEnabled("提交");
  832. }
  833. else if (data == "NO") {
  834. $.messager.alert("提示", "出库单提交失败!");
  835. return;
  836. }
  837. });
  838.  
  839. }
  840.  
  841. })
  842.  
  843. });
  844.  
  845. }
  846.  
  847. function endEditing(ddv) {
  848.  
  849. var changes = ddv.datagrid('getChanges');
  850.  
  851. if (editIndex == undefined) { return true }
  852. if (ddv.datagrid('validateRow', editIndex)) {
  853.  
  854. //验证前一行
  855. //返回编辑器,结束编辑
  856. ddv.datagrid('endEdit', editIndex);
  857. editIndex = undefined;
  858. return true;
  859.  
  860. } else { return false; }
  861.  
  862. }
  863.  
  864. function collapseRows() {
  865.  
  866. var rows = $('#dgOutOD').datagrid('getRows');
  867.  
  868. $.each(rows, function (i, k) {
  869. //获取当前所有展开的子网格
  870.  
  871. var expander = $('#dgOutOD').datagrid('getExpander', i);
  872.  
  873. if (expander.length && expander.hasClass('datagrid-row-collapse')) {
  874.  
  875. if (k.id != row.id) {
  876.  
  877. //折叠上一次展开的子网格
  878. $('#dgOutOD').datagrid('collapseRow', i);
  879.  
  880. }
  881.  
  882. }
  883.  
  884. });
  885.  
  886. }
  887.  
  888. function GetOutO() {
  889.  
  890. var postData = {
  891.  
  892. //"Id": $("#IDUpdate").val(),
  893.  
  894. "No": $("#UpdNO").val(),
  895. "CustomerName": $("#CustomerNameUpdate").val(),
  896. "DeliveryNo": "",
  897. "TallyTime": $("#TallyTimeUpdate").val(),
  898. "CustomerCode": $("#CustomerCodeUpdate").val(),
  899. "Consignee": $("#ConsigneeUpdate").val(),
  900. "VehicleNo": $("#VehicleNoUpdate").val(),
  901. "ConsigneeCode": $("#ConsigneeCodeUpdate").val(),
  902.  
  903. "CreationTime": $("#CreationTimeUpdate").val(),
  904. "ConsigneeSCCD": $("#ConsigneeSccdUpdate").val(),
  905.  
  906. "Shipper": $("#ShipperUpdate").val(),
  907. "ShipperCode": $("#ShipperCodeUpdate").val(),
  908. "Oper": $("#OperUpdate").val(),
  909.  
  910. "ShipperSCCD": $("#ShipperSCCDUpdate").val(),
  911.  
  912. "Nwt": $("#NwtUpdate").val(),
  913. "Remark": $("#RemarkUpdate").val(),
  914. "Notify": $("#NotifyUpdate").val(),
  915.  
  916. "Status": $("#StatusUpdate").val(),
  917. "Gwt": $("#GwtUpdate").val(),
  918.  
  919. "NotifyCode": $("#NotifyCodeUpdate").val(),
  920. "PackageQty": $("#PackageQtyUpdate").val(),
  921.  
  922. "NotifySCCD": "",
  923. "WarehouseNo": $("#WarehouseNoUpdate").val(),
  924.  
  925. "PreOutStockTime": $("#PreOutStockTimeUpd").val(),
  926. "Checker": "",
  927. "CheckTime": "",
  928.  
  929. "LastUpdateTime": "",
  930. "LastOper": "",
  931. "TallyClerk": $("#TallyClerkUpdate").val()
  932.  
  933. };
  934. var id = $("#IDUpdate").val();
  935.  
  936. if (!(id=="" || id==undefined)) {
  937. postData.Id = id;
  938.  
  939. }
  940. return postData;
  941. }
  942.  
  943. function showOutO(row) {
  944.  
  945. $("#IDUpdate").val(row.Id);
  946. $("#UpdNO").val(row.No);
  947.  
  948. $("#PreOutStockTimeUpd").val(row.PreOutStockTime);
  949. $("#ShipperCodeUpdate").val(row.ShipperCode);
  950.  
  951. $("#PackageQtyUpdate").val(row.PackageQty);
  952. $("#ShipperUpdate").val(row.Shipper);
  953.  
  954. $("#ConsigneeSccdUpdate").val(row.ConsigneeSCCD);
  955. $("#ConsigneeUpdate").val(row.Consignee);
  956.  
  957. $("#ConsigneeCodeUpdate").val(row.ConsigneeCode);
  958. $("#NotifyCodeUpdate").val(row.NotifyCode);
  959.  
  960. $("#NotifyUpdate").val(row.Notify);
  961. $("#NotifySCCDUpdate").val(row.NotifySCCD);
  962.  
  963. $("#CreationTimeUpdate").val(row.CreationTime);
  964. $("#CheckTimeUpdate").val(row.CheckTime);
  965.  
  966. $("#TallyTimeUpdate").val(row.TallyTime);
  967. $("#WarehouseNoUpdate").val(row.WarehouseNo);
  968.  
  969. $("#OperUpdate").val(row.Oper);
  970.  
  971. $("#NwtUpdate").val(row.Nwt);
  972. $("#RemarkUpdate").val(row.Remark);
  973. $("#TallyClerkUpdate").val(row.TallyClerk);
  974.  
  975. $("#StatusUpdate").val(row.Status);
  976. $("#GwtUpdate").val(row.Gwt);
  977. $("#CheckerUpdate").val(row.Checker);
  978.  
  979. }
  980.  
  981. //------------------------系统管理-->出库单管理结束--------------------------//

abp(net core)+easyui+efcore实现仓储管理系统——出库管理之六(五十五)的更多相关文章

  1. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之一(四十九)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...

  2. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之二(五十)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  3. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之三(五十一)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  4. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之三(五十二)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  5. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之四(五十三)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  6. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之五(五十四)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  7. Abp(net core)+easyui+efcore实现仓储管理系统——出库管理之七(五十六)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  8. Abp(net core)+easyui+efcore实现仓储管理系统——出库管理之八(五十七)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  9. abp(net core)+easyui+efcore实现仓储管理系统——使用 WEBAPI实现CURD (十五)

    core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+easyui+e ...

随机推荐

  1. PyTorch 中 weight decay 的设置

    先介绍一下 Caffe 和 TensorFlow 中 weight decay 的设置: 在 Caffe 中, SolverParameter.weight_decay 可以作用于所有的可训练参数, ...

  2. javaweb学习笔记整理补课

    javaweb学习笔记整理补课 * JavaWeb: * 使用Java语言开发基于互联网的项目 * 软件架构: 1. C/S: Client/Server 客户端/服务器端 * 在用户本地有一个客户端 ...

  3. springboot添加拦截器

    一,编写拦截器 public class TokenInterceptor implements HandlerInterceptor { @Override public boolean preHa ...

  4. Mybatis---03Mybatis配置文件浅析(一)

    一.写入mybatis配置文件的约束 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE co ...

  5. jdk1.8特性2

    public class User { private Long id; private String userName; private String roleName; private Strin ...

  6. JDK1.8特性(更新中..)

    "15,5,9,17,99,107,47"转List<Long> List<Long> linkCompanyIds = Arrays.asList(&qu ...

  7. 深入了解Redis(8)-高可用方案

    生产环境中的redis基本都是多节点部署,本文只讨论redis高可用的三种方案,不涉及实际操作. 一.主从复制(一主一从,一主多从,级联结构) (图来源于网络) 一个Master,两个Slave,Sl ...

  8. SpringBoot原理发现(一)

    说明: 本系列基于SpringBoot 2.2.9.RELEASE 版本,对SpringBoot的原理进行分析,一共分为四节: SpringBoot原理发现(一):创建Hello World,对pom ...

  9. 简单粗暴套娃模式组json发送https请求

    各位童鞋大家好,向来简单粗暴的铁柱兄给大家来玩一手套娃模式来组Json数据,不说别的,无脑套. 当然,这一手比较适合临场用一下,若长期用的话建议搞一套适用的框架,只管set就好了.话不多说开始上课. ...

  10. php socket通信的简单实现

    socket通信的原理在这里就不说了,它的用途还是比较广泛的,我们可以使用socket来做一个API接口出来,也可以使用socket来实现两个程序之间的通信,我们来研究一下在php里面如何实现sock ...