Commit b423cf00 authored by 谢希宇's avatar 谢希宇

Submit by Strive

Date 2021/04/12
Project End
parent b1f9b7e3
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
<div class="box-footer"> <div class="box-footer">
#if($shiro.hasPermission("qy:order:edit")) #if($shiro.hasPermission("qy:order:edit"))
#if($!{pageType} != 'true') #if($!{pageType} != 'true')
<button class="btn btn-primary" onclick="save()">订单出库</button> <button class="btn btn-primary" onclick="save(this)">订单出库</button>
#end #end
#end #end
<a href="#springUrl('/a/order/listout')" class="btn btn-default">取消</a> <a href="#springUrl('/a/order/listout')" class="btn btn-default">取消</a>
...@@ -487,7 +487,7 @@ ...@@ -487,7 +487,7 @@
if (pageType == 'true') { if (pageType == 'true') {
HtmlAmount = `<input name="sendNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value="${count}"></input>`; HtmlAmount = `<input name="sendNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value="${count}"></input>`;
} else { } else {
HtmlAmount = `<input name="sendNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value="${count}"></input>`; HtmlAmount = `<input name="sendNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value="0"></input>`;
} }
//var HtmlBatchNo = `<input name="batchNo" class="form-control" type="text" style="width: 300px; margin-right: 50px;"></input>`; //var HtmlBatchNo = `<input name="batchNo" class="form-control" type="text" style="width: 300px; margin-right: 50px;"></input>`;
...@@ -517,7 +517,7 @@ ...@@ -517,7 +517,7 @@
/** /**
* 保存事件 * 保存事件
*/ */
function save() { function save(ele) {
//是否扫码 //是否扫码
let flag = false; let flag = false;
$("#group").find('.list-group-item').each(function(i) { $("#group").find('.list-group-item').each(function(i) {
...@@ -533,6 +533,12 @@ ...@@ -533,6 +533,12 @@
return; return;
} }
if ($("#splitTable").find('.split-translate').length == 0) {
$("#labels").text("请拆分订单且选择批次号!");
$('#exampleModal').modal('show');
return;
}
//增加产品批次号 //增加产品批次号
let drugArr = []; let drugArr = [];
$("#splitTable").find('.split-translate').each(function(i, item) { $("#splitTable").find('.split-translate').each(function(i, item) {
...@@ -564,8 +570,7 @@ ...@@ -564,8 +570,7 @@
$('#exampleModal').modal('show'); $('#exampleModal').modal('show');
return; return;
} }
$(ele).attr("disabled", true);
$("#save").attr("disabled", true);
var url = "#springUrl('/a/waybill/orderSendOutForWaybill')"; var url = "#springUrl('/a/waybill/orderSendOutForWaybill')";
$.ajax({ $.ajax({
url: url, url: url,
...@@ -577,7 +582,7 @@ ...@@ -577,7 +582,7 @@
orderId: $("#id").val(), orderId: $("#id").val(),
datas: JSON.stringify(drugArr)}, datas: JSON.stringify(drugArr)},
success :function (rsp) { success :function (rsp) {
$("#save").attr("disabled", false); $(ele).attr("disabled", false);
if(rsp.errorNo == "0"){ if(rsp.errorNo == "0"){
Cfapp.alert({ Cfapp.alert({
message: "出库成功", message: "出库成功",
......
...@@ -286,7 +286,7 @@ ...@@ -286,7 +286,7 @@
<div class="box-footer"> <div class="box-footer">
#if ($!{isView} != 'true') #if ($!{isView} != 'true')
#if($shiro.hasPermission("qy:order:edit")) #if($shiro.hasPermission("qy:order:edit"))
<button class="btn btn-primary" onclick="save()">确认</button> <button class="btn btn-primary" onclick="save(this)">确认</button>
#end #end
#end #end
<a href="#springUrl('/a/order/list')" class="btn btn-default">取消</a> <a href="#springUrl('/a/order/list')" class="btn btn-default">取消</a>
...@@ -519,7 +519,7 @@ ...@@ -519,7 +519,7 @@
/** /**
* 需求清单确认提交 * 需求清单确认提交
*/ */
function save() { function save(ele) {
var arr = [] var arr = []
var obj = {} var obj = {}
...@@ -584,8 +584,8 @@ ...@@ -584,8 +584,8 @@
return; return;
} }
$(ele).attr("disabled", true);
var url = "#springUrl('/a/order/formData')"; var url = "#springUrl('/a/order/formData')";
$("#save").attr("disabled", true);
console.log(JSON.stringify(datas)); console.log(JSON.stringify(datas));
$.ajax({ $.ajax({
url: url, url: url,
...@@ -601,7 +601,7 @@ ...@@ -601,7 +601,7 @@
orderAmount: $('input[name="orderAmount"]').val() orderAmount: $('input[name="orderAmount"]').val()
}, },
success: function (rsp) { success: function (rsp) {
$("#save").attr("disabled", false); $(ele).attr("disabled", false);
console.log(rsp); console.log(rsp);
if (rsp.errorNo == "0") { if (rsp.errorNo == "0") {
Cfapp.alert({ Cfapp.alert({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment