|
|
@@ -1,5 +1,4 @@
|
|
|
-using System.Net.Mime
|
|
|
-@using System.Web.UI.HtmlControls
|
|
|
+@using System.Web.UI.HtmlControls
|
|
|
@using Abp.Authorization
|
|
|
@using IwbZero.Session
|
|
|
@using ShwasherSys
|
|
|
@@ -138,6 +137,28 @@ new SearchItem("saleMan", "业务员",showField:"saleManName").SetSearchIcon("qu
|
|
|
.down-direction2 {
|
|
|
transform: rotate(180deg);
|
|
|
}
|
|
|
+ .lock_box {
|
|
|
+ width: 100%;
|
|
|
+ height: auto;
|
|
|
+ border-radius: 5px;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ margin-bottom: 2px;
|
|
|
+ }
|
|
|
+ .lock_box_header {
|
|
|
+ width: 100%;
|
|
|
+ background: #cccccc;
|
|
|
+ color: #000080;
|
|
|
+ border-radius: 4px 4px 0 0 ;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: bolder;
|
|
|
+ padding: 2px;
|
|
|
+ display: flex;
|
|
|
+ flex-flow: row nowrap;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
</style>
|
|
|
|
|
|
<div class="table-box mr-4 iwb-bootstrap-table">
|
|
|
@@ -239,7 +260,7 @@ new SearchItem("saleMan", "业务员",showField:"saleManName").SetSearchIcon("qu
|
|
|
<th data-align="center" data-field="moldFee">模具费</th>
|
|
|
}
|
|
|
<th data-align="center" data-field="quantity" data-formatter="QuantityFormatter">总数</th>
|
|
|
- <th data-align="center" data-field="isSendQuantity">已发数</th>
|
|
|
+ <th data-align="center" data-field="isSendQuantity" data-formatter="SendItemFormatter">已发数</th>
|
|
|
<th data-align="center" data-field="remainingQuantity">剩余数</th>
|
|
|
@if (isCanViewPrice)
|
|
|
{
|
|
|
@@ -257,26 +278,7 @@ new SearchItem("saleMan", "业务员",showField:"saleManName").SetSearchIcon("qu
|
|
|
@section modal{
|
|
|
|
|
|
<section>
|
|
|
- <!--审核之后冻结库存modal-->
|
|
|
- <div class="modal fade" id="modalShowLockStore" role="dialog" tabindex="-1" aria-labelledby="ModalLabel">
|
|
|
- <div class="modal-dialog modal-dialog-centered" role="document" style="width: 850px;">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-header">
|
|
|
- <div class="box-title" style="line-height: 25px; color: #f9f9f9; display: block;">
|
|
|
- <label class="iwb-label col-md-2 control-label iwb-label-required" for="productId_lockstore" style="padding: 3px 3px; color: red;">订单明细已经锁定库存</label>
|
|
|
- <input type="hidden" id="orderItemId_lock_send_key" />
|
|
|
- </div>
|
|
|
- <div style="position: absolute; right: 5px; top: 8px">
|
|
|
- <button class="btn btn-info" onclick="lockStoreSendAction()">锁定库存发货</button>
|
|
|
- <button class="btn btn-default" onclick="$('#modalShowLockStore').modal('hide');">取消</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="modal-body" id="modalShowLockStore_body">
|
|
|
-
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+
|
|
|
<div class="modal fade" id="modalLockStore" role="dialog" tabindex="-1" aria-labelledby="ModalLabel">
|
|
|
<div class="modal-dialog modal-dialog-centered" role="document" style="width: 850px;">
|
|
|
<div class="modal-content">
|
|
|
@@ -299,26 +301,51 @@ new SearchItem("saleMan", "业务员",showField:"saleManName").SetSearchIcon("qu
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="position: absolute; right: 5px; top: 8px">
|
|
|
- <button class="btn btn-info" onclick="lockStoreAction()">锁定库存</button>
|
|
|
+ @*<button class="btn btn-info" onclick="lockStoreAction()">锁定库存</button>*@
|
|
|
<button class="btn btn-default" onclick="$('#modalLockStore').modal('hide');$('#productId_lockstore').val('')">取消</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="modal-body">
|
|
|
- <form id="formStore">
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="lock_box">
|
|
|
+ <div class="lock_box_header">已锁定冻结的库存记录</div>
|
|
|
+ <div id="locked_box_content" class="table-box mr-4 iwb-bootstrap-table">
|
|
|
+ <table id="LockedStoreTable" data-striped="true" data-click-to-select="false" data-height="100"
|
|
|
+ data-single-select="false">
|
|
|
+ <thead>
|
|
|
+ <tr class="row">
|
|
|
+ <th data-align="center" data-field="productBatchNum">批次号 </th>
|
|
|
+ <th data-align="center" data-field="productNo">产品编号</th>
|
|
|
+ <th data-align="center" data-field="storeLocationNo">库位</th>
|
|
|
+ <th data-align="center" data-field="quantity">冻结数量(千件)</th>
|
|
|
+ <th data-align="center" data-field="quantityPerPack">千件/每包</th>
|
|
|
+ <th data-align="center" data-field="status" data-formatter="LockedStatusFormatter">状态</th>
|
|
|
+ <th data-align="center" data-formatter="LockedStoreActionFormatter">操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="lock_box">
|
|
|
+ <div class="lock_box_header">锁定冻结的库存记录<span><button class="btn btn-info" onclick="lockStoreAction()">锁定库存</button></span></div>
|
|
|
+ <div id="locking_box_content" class="table-box mr-4 iwb-bootstrap-table">
|
|
|
+ <form id="formStore">
|
|
|
+ <table class="table table-striped lockstore">
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <th style="width: 150px">批次号</th>
|
|
|
+ <th style="width: 150px">库位</th>
|
|
|
+ <th style="width: 150px">可用数量(千件)</th>
|
|
|
+ <th style="width: 200px">冻结数量</th>
|
|
|
+ <th style="width: 200px">千件/每包</th>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <table class="table table-striped lockstore">
|
|
|
- <tbody>
|
|
|
- <tr>
|
|
|
- <th style="width: 150px">批次号</th>
|
|
|
- <th style="width: 150px">库位</th>
|
|
|
- <th style="width: 150px">可用数量(千件)</th>
|
|
|
- <th style="width: 200px">发货数量</th>
|
|
|
- <th style="width: 200px">千件/每包</th>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -517,21 +544,55 @@ new SearchItem("saleMan", "业务员",showField:"saleManName").SetSearchIcon("qu
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
- <div class="modal fade" id="showProductProcess" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
|
|
|
- <div class="modal-dialog modal-dialog-centered" role="document" style="width: 600px">
|
|
|
+ <div class="modal fade" id="showProductProcess" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
|
|
|
+ <div class="modal-dialog modal-dialog-centered" role="document" style="width: 600px">
|
|
|
+ <div class="modal-content">
|
|
|
+ @Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("生产进度", ""))
|
|
|
+ <div class="timeline-small">
|
|
|
+ <div class="timeline-small-body">
|
|
|
+ <ul>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ @Html.Partial("Modals/_ModalFooter", "1")
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <!--显示订单明细已发货记录-->
|
|
|
+
|
|
|
+ <div class="modal fade" id="orderSendItemModal" role="dialog" tabindex="-1" >
|
|
|
+ <div class="modal-dialog modal-dialog-centered" role="document" style="width: 980px">
|
|
|
<div class="modal-content">
|
|
|
- @Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("生产进度", ""))
|
|
|
- <div class="timeline-small">
|
|
|
- <div class="timeline-small-body">
|
|
|
- <ul>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
+ @Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("订单明细发货记录", ""))
|
|
|
+ <div class="table-box mr-4 iwb-bootstrap-table">
|
|
|
+ <table id="sendItemTable" data-striped="true" data-click-to-select="false" data-height="300"
|
|
|
+ data-single-select="false">
|
|
|
+ <thead>
|
|
|
+ <tr class="row">
|
|
|
+ @*<th data-field="state" data-checkbox="true"></th>*@
|
|
|
+ <th data-align="center" data-field="stockNo">客户订单号 </th>
|
|
|
+ <th data-align="center" data-field="sendQuantity">数量</th>
|
|
|
+ <th data-align="center" data-field="orderUnitName">单位</th>
|
|
|
+ @*<th data-align="center" data-field="customerId">客户编号</th>*@
|
|
|
+ <th data-align="center" data-field="productNo">产品编号</th>
|
|
|
+ <th data-align="center" data-field="productName">产品名称</th>
|
|
|
+ <th data-align="center" data-field="model">规格</th>
|
|
|
+ @*<th data-align="center" data-field="surfaceColor">表色</th>
|
|
|
+ <th data-align="center" data-field="rigidity">硬度</th>*@
|
|
|
+ <th data-align="center" data-field="orderDate">订单日期</th>
|
|
|
+ <th data-align="center" data-field="sendDate" data-formatter="DateFormatter">送货日期</th>
|
|
|
+ <th data-align="center" data-field="linkName">联系人</th>
|
|
|
+
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ @Html.Partial("Modals/_ModalFooter", "1")
|
|
|
</div>
|
|
|
- @Html.Partial("Modals/_ModalFooter", "1")
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</section>
|
|
|
<section>
|
|
|
@Html.Partial("Modals/Query/_Customer", "KeyWords-4")
|
|
|
@@ -884,9 +945,10 @@ new SearchItem("saleMan", "业务员",showField:"saleManName").SetSearchIcon("qu
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- function f_SendOrderItem(id, quantity, isSendQuantity, productNo) {
|
|
|
+ function f_SendOrderItem(id, quantity, isSendQuantity, productNo, customerId) {
|
|
|
+ console.log("customerId", customerId)
|
|
|
var showSendModal = function () {
|
|
|
- $("#productId_lockstore").val('') //清空锁定库存模态框Id
|
|
|
+
|
|
|
$("#productId").val(productNo);
|
|
|
$("#orderItemNo_ForSend").val(id);
|
|
|
if (!isSendQuantity || !(isSendQuantity > 0)) {
|
|
|
@@ -906,16 +968,22 @@ new SearchItem("saleMan", "业务员",showField:"saleManName").SetSearchIcon("qu
|
|
|
}
|
|
|
SaveAjax({
|
|
|
url: window.appUrl +
|
|
|
- "OrderBookStore/CheckExistLockStore?id=" +id,
|
|
|
+ "OrderBookStore/CheckExistLockingStore?id=" +id,
|
|
|
isAlert: false,
|
|
|
isValidate: false,
|
|
|
success: function (res) {
|
|
|
//先检查是否存在锁定库存的记录,存在需要先发锁定的库存
|
|
|
if (res) {
|
|
|
abp.message.warn("订单存在锁定的库存记录,需要先发锁定的库存!");
|
|
|
- renderLockedStoreTable("modalShowLockStore_body", id)
|
|
|
- $("#modalShowLockStore").modal("show");
|
|
|
+ $("#productId_lockstore").val(productNo);
|
|
|
+ $("#quantity_lockstore_key").val(quantity);
|
|
|
+ $("#orderItemId_lockstore_key").val(id);
|
|
|
+ $("#customerId_lockstore_key").val(customerId);
|
|
|
+ renderLockedStoreTable(id)
|
|
|
+ reloadLockStoreTable(productNo, quantity, customerId)
|
|
|
+ $("#modalLockStore").modal("show")
|
|
|
} else {
|
|
|
+ $("#productId_lockstore").val('') //清空锁定库存模态框Id
|
|
|
showSendModal()
|
|
|
}
|
|
|
}
|
|
|
@@ -1229,6 +1297,7 @@ new SearchItem("saleMan", "业务员",showField:"saleManName").SetSearchIcon("qu
|
|
|
|
|
|
function ActionsItemFormatter(v, r) {
|
|
|
var str = "";
|
|
|
+ console.log(r)
|
|
|
if (r.orderItemStatusId === 15) {
|
|
|
str = '<span class="table-action" onclick="f_SendOrderItem(\'' +
|
|
|
r.id +
|
|
|
@@ -1238,6 +1307,8 @@ new SearchItem("saleMan", "业务员",showField:"saleManName").SetSearchIcon("qu
|
|
|
r.isSendQuantity +
|
|
|
'\',\'' +
|
|
|
r.productNo +
|
|
|
+ '\',\'' +
|
|
|
+ r.customerId +
|
|
|
'\')"><i class="iconfont icon-right"></i>发货</span>';
|
|
|
} else if (r.orderItemStatusId === 9) {
|
|
|
str = '<span class="table-action" onclick="f_CloseOrderItem(\'' +
|
|
|
@@ -1600,7 +1671,11 @@ new SearchItem("saleMan", "业务员",showField:"saleManName").SetSearchIcon("qu
|
|
|
'</span>';
|
|
|
return str;
|
|
|
}
|
|
|
-
|
|
|
+ function SendItemFormatter(v,r){
|
|
|
+ var str = `<span style="text-decoration:underline;" onclick="f_showSendItem(${r.id})">${v?v:0}</span>`;//orderSendItemModal
|
|
|
+ return str;
|
|
|
+ }
|
|
|
+
|
|
|
function f_showChangeQuantity(id, quantity, s) {
|
|
|
if (s != @OrderItemStatusEnum.NewCreate.ToInt() && s != @OrderItemStatusEnum.Audited.ToInt()) {
|
|
|
abp.message.warn("已发货(或已结束),不能操作!");
|
|
|
@@ -1700,226 +1775,7 @@ new SearchItem("saleMan", "业务员",showField:"saleManName").SetSearchIcon("qu
|
|
|
// return '<span class="label label-primary">' + name + '</span>';
|
|
|
// }
|
|
|
</script>
|
|
|
- <!--2024 -->
|
|
|
- <script>
|
|
|
- function f_lockStore() {
|
|
|
- var items = $tableOrderItem.bootstrapTable("getSelections");
|
|
|
- if (items.length !== 1) {
|
|
|
- abp.message.warn("请选中一条记录操作!");
|
|
|
- return
|
|
|
- }
|
|
|
- data = items[0]
|
|
|
- if (data.orderItemStatusId != @OrderItemStatusEnum.Audited.ToInt()) {
|
|
|
- abp.message.warn("订单明细状态为已审核才能锁定库存!");
|
|
|
- return;
|
|
|
- }
|
|
|
- SaveAjax({
|
|
|
- url: window.appUrl + "OrderBookStore/CheckExistLockStore?id=" + orderItemId,
|
|
|
- isAlert: false,
|
|
|
- isValidate: false,
|
|
|
- success: function (res) {
|
|
|
- if (!res) {
|
|
|
- $("#quantity_lockstore_key").val(data.quantity);
|
|
|
- $("#orderItemId_lockstore_key").val(data.id);
|
|
|
- $("#customerId_lockstore_key").val(data.customerId);
|
|
|
- $("#productId_lockstore").val(data.productNo);
|
|
|
- reloadLockStoreTable(data.productNo, data.quantity, data.customerId)
|
|
|
- $("#modalLockStore").modal("show");//modalShowLockStore_body
|
|
|
- } else {
|
|
|
- renderLockedStoreTable("modalShowLockStore_body", orderItemId)
|
|
|
- $("#modalShowLockStore").modal("show");
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
- //没有锁定库存记录的,输入锁定库存
|
|
|
- function reloadLockStoreTable(productNo, quantity, customerId) {
|
|
|
- var $tbody = $(".table.table-striped.lockstore > tbody");
|
|
|
- $tbody.find("tr:not(:first)").remove();
|
|
|
- SaveAjax({
|
|
|
- url: window.appUrl + "Query/QueryStoreFilter?productNo=" + productNo + '&customerId=' + customerId,
|
|
|
- isAlert: false,
|
|
|
- isValidate: false,
|
|
|
- success: function (res) {
|
|
|
- if (res && res.length > 0) {
|
|
|
- res.forEach(function (r) {
|
|
|
- var sTr = '<tr>';
|
|
|
- sTr += '<td class="currentProductStoreHouseNo" style="display:none;">' +
|
|
|
- r.currentProductStoreHouseNo +
|
|
|
- '</td>';
|
|
|
- sTr += '<td class="productionOrderNo">' + r.productionOrderNo + '</td>';
|
|
|
- sTr += '<td class="storeLocationNo">' + r.storeLocationNo + '</td>';
|
|
|
- var isCanUser = formatNum(Number(r.quantity), Number(r.freezeQuantity), 3);
|
|
|
- sTr += '<td>' + isCanUser + '</td>';
|
|
|
- sTr +=
|
|
|
- '<td style="position:relative"><input type="text" name="SendQuantity" class="form-control number sendQuantity form-input-send" min="0" max="' +
|
|
|
- isCanUser +
|
|
|
- '"/></td>';
|
|
|
- sTr +=
|
|
|
- '<td style="position:relative"><input type="text" name="AvgSendQuantity" class="form-control number avgQuantity form-input-send" min="0"/></td>';
|
|
|
- sTr += '</tr>';
|
|
|
- $tbody.append(sTr);
|
|
|
-
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- //展示订单明细已经锁定的库存信息
|
|
|
- function renderLockedStoreTable(domId, orderItemId) {
|
|
|
- let $parent = $("#" + domId)
|
|
|
- $parent.empty()
|
|
|
- $("#orderItemId_lock_send_key").val(orderItemId)
|
|
|
- let table = `<table class="table table-striped showLock">
|
|
|
- <tbody>
|
|
|
- <tr>
|
|
|
- <th style="width: 150px">批次号</th>
|
|
|
- <th style="width: 150px">产品编号</th>
|
|
|
- <th style="width: 150px">库位</th>
|
|
|
- <th style="width: 200px">冻结数量(千件)</th>
|
|
|
- <th style="width: 200px">千件/每包</th>
|
|
|
- </tr>
|
|
|
-
|
|
|
- </tbody>
|
|
|
- </table>`
|
|
|
- $table = $(table)
|
|
|
- $tbody = $table.children("tbody")
|
|
|
-
|
|
|
- SaveAjax({
|
|
|
- url: window.appUrl + "OrderBookStore/GetDataByOrderItemId?id=" + orderItemId,
|
|
|
- isAlert: false,
|
|
|
- isValidate: false,
|
|
|
- success: function (res) {
|
|
|
- res.forEach(function (r) {
|
|
|
- var sTr = '<tr>';
|
|
|
- sTr += '<td class="productionOrderNo">' + r.productBatchNum + '</td>';
|
|
|
- sTr += '<td class="productNo">' + r.productNo + '</td>';
|
|
|
- sTr += '<td class="storeLocationNo">' + r.storeLocationNo + '</td>';
|
|
|
- sTr += '<td class="quantity">' + r.quantity + '</td>';
|
|
|
- sTr += '<td class="quantityPerPack">' + r.quantityPerPack + '</td>';
|
|
|
- sTr += '</tr>';
|
|
|
- $tbody.append(sTr);
|
|
|
- })
|
|
|
- $parent.prepend($table)
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- //锁定库存
|
|
|
- function lockStoreAction() {
|
|
|
- var customerId = $("#customerId_lockstore_key").val();
|
|
|
- var productNo = $("#productId_lockstore").val();
|
|
|
- var quantity = $("#quantity_lockstore").val();//订单明细数量
|
|
|
- var orderItemId = $("#orderItemId_lockstore_key").val();
|
|
|
- var $tbody = $(".table.table-striped.lockstore > tbody");
|
|
|
- var trDatas = $tbody.find("tr:not(:first)");
|
|
|
- var sendAll = 0;
|
|
|
- var dataParam = {
|
|
|
- AddItems: [],
|
|
|
- OrderItemId: orderItemId,
|
|
|
- };
|
|
|
- if (trDatas) {
|
|
|
- for (var i = 0; i < trDatas.length; i++) {
|
|
|
- var sendItem = {};
|
|
|
- var sendQuantity = $(trDatas[i]).find(".sendQuantity").val();
|
|
|
- if (!sendQuantity || Number(sendQuantity) <= 0) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- sendItem.Quantity = Number(sendQuantity);
|
|
|
-
|
|
|
- var quantityPerPack = $(trDatas[i]).find(".avgQuantity").val();
|
|
|
- if (!quantityPerPack || Number(quantityPerPack) <= 0) {
|
|
|
- quantityPerPack = sendQuantity;
|
|
|
- }
|
|
|
- sendItem.QuantityPerPack = Number(avgQuantity);
|
|
|
|
|
|
- var currentProductStoreHouseNo = $(trDatas[i]).find(".currentProductStoreHouseNo").text();
|
|
|
- if (currentProductStoreHouseNo) {
|
|
|
- sendItem.CurrentProductStoreHouseNo = currentProductStoreHouseNo;;
|
|
|
- }
|
|
|
-
|
|
|
- var productionOrderNo = $(trDatas[i]).find(".productionOrderNo").text();
|
|
|
- if (productionOrderNo) {
|
|
|
- sendItem.ProductBatchNum = productionOrderNo;
|
|
|
- } else {
|
|
|
- sendItem.ProductBatchNum = "00000000000";
|
|
|
- }
|
|
|
-
|
|
|
- var storeLocationNo = $(trDatas[i]).find(".storeLocationNo").text();
|
|
|
- if (storeLocationNo) {
|
|
|
- sendItem.StoreLocationNo = storeLocationNo;
|
|
|
- }
|
|
|
- sendItem.ProductNo = productNo;
|
|
|
- sendItem.CustomerId = customerId;
|
|
|
- dataParam.AddItems.push(sendItem);
|
|
|
- sendAll += sendItem.Quantity
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- if (sendAll <= 0) {
|
|
|
- abp.message.warn("锁定发货总量需要大于0千件!");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- var save = function () {
|
|
|
- SaveAjax({
|
|
|
- url: window.appUrl + "OrderBookStore/LockStore",
|
|
|
- //contentType: 'application/json',
|
|
|
- dataType: "json",
|
|
|
- form: $("#formStore"),
|
|
|
- data: dataParam,
|
|
|
- isAlert: false,
|
|
|
- isValidate: true,
|
|
|
- success: function (res) {
|
|
|
- if (res) {
|
|
|
- $("#modalLockStore").modal("hide");
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- if (sendAll > Number(quantity)) {
|
|
|
- var temp = formatNum(Number(sendAll),
|
|
|
- Number(quantity) + Number(quantity * 0.05),
|
|
|
- 3);
|
|
|
- if (temp > 0) {
|
|
|
- abp.message.warn("锁定库存总量已超出订单发货量5%,不能继续操作!");
|
|
|
- return;
|
|
|
- }
|
|
|
- abp.message.confirm("锁定库存总量已超出订单发货量,是否要继续锁定?",
|
|
|
- "确认锁定库存",
|
|
|
- function (isConfirmed) {
|
|
|
- if (isConfirmed) {
|
|
|
- save();
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- save();
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- //锁定库存发货
|
|
|
- function lockStoreSendAction() {
|
|
|
- var orderItemId = $("#orderItemId_lock_send_key").val()
|
|
|
- SaveAjax({
|
|
|
- url: window.appUrl + "OrderItems/SendBookStore?orderItemId=" + orderItemId,
|
|
|
- isAlert: false,
|
|
|
- isValidate: false,
|
|
|
- success: function (res) {
|
|
|
- RefreshOrderItemTable(res.orderNo);
|
|
|
- $("#modalShowLockStore").modal("hide");
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- </script>
|
|
|
- <script>
|
|
|
-
|
|
|
- </script>
|
|
|
<script>
|
|
|
|
|
|
//将数字转换成金额显示 n是小数点后位数
|