lacy 3 weeks ago
parent
commit
adae7fc2f6
  1. 16
      .gitignore
  2. 2
      NFine.Application/PNSRM/CreateItemLotApp.cs
  3. 125
      NFine.Web/Areas/PNSRM/Views/CreateItemLot/Index.cshtml

16
.gitignore

@ -1,4 +1,3 @@
<<<<<<< HEAD
## Ignore Visual Studio temporary files, build results, and ## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons. ## files generated by popular Visual Studio add-ons.
@ -304,18 +303,3 @@ WMS-BS/NFine.Web/File/UPLoadFile/20241215040452NCR数量.xlsx
WMS-BS/NFine.Web/File/UPLoadFile/20241215040545NCR数量.xlsx WMS-BS/NFine.Web/File/UPLoadFile/20241215040545NCR数量.xlsx
WMS-BS/NFine.Web/File/UPLoadFile/20241215040546NCR数量.xlsx WMS-BS/NFine.Web/File/UPLoadFile/20241215040546NCR数量.xlsx
WMS-BS/NFine.Web/File/UPLoadFile/20241215040610NCR数量.xlsx WMS-BS/NFine.Web/File/UPLoadFile/20241215040610NCR数量.xlsx
=======
NFine.Data/obj/Debug/NFine.Data.csprojAssemblyReference.cache
NFine.Domain/obj/Debug/NFine.Domain.csprojAssemblyReference.cache
.vs/NFine.Framework/v15/Server/sqlite3/storage.ide-wal
NFine.Application/obj/Debug/NFine.Application.csprojAssemblyReference.cache
NFine.Mapping/obj/Debug/NFine.Mapping.csprojAssemblyReference.cache
.vs/NFine.Framework/v15/Server/sqlite3/storage.ide-shm
.vs/NFine.Framework/v15/Server/sqlite3/storage.ide
NFine.Code/obj/Debug/NFine.Code.csprojAssemblyReference.cache
NFine.Repository/obj/Debug/NFine.Repository.csprojAssemblyReference.cache
NFine.Web/obj/Debug/NFine.Web.csprojAssemblyReference.cache
.vs/config/applicationhost.config
.vs/NFine.Framework/v15/.suo
.vs/NFine.Framework/v15/Server/sqlite3/db.lock
>>>>>>> d4d5a9317fa5dc110c454a366369c535214b2288

2
NFine.Application/PNSRM/CreateItemLotApp.cs

@ -81,7 +81,7 @@ namespace NFine.Application.PNSRM
string sql = @"SELECT distinct a.ID,asn.ASNCode,asn.Sequence as AsnSequence, a.POCode,a.Sequence,CONVERT(NVARCHAR(15),a.CreateDateTime,23) AS PODate, string sql = @"SELECT distinct a.ID,asn.ASNCode,asn.Sequence as AsnSequence, a.POCode,a.Sequence,CONVERT(NVARCHAR(15),a.CreateDateTime,23) AS PODate,
a.ExtensionID,a.VenCode,ee.VenName,a.InvCode, a.ExtensionID,a.VenCode,ee.VenName,a.InvCode,
b.InvName,b.InvStd,b.InvUnit,asn.Quantity,ISNULL(bb.LotQty,0) AS LotQty ,b.InvDesc,b.ClassCode, b.InvName,b.InvStd,b.InvUnit,asn.Quantity,ISNULL(bb.LotQty,0) AS LotQty ,b.InvDesc,b.ClassCode,
isnull(asn.DNQuantity,0) as InQuantity,a.WorkPoint as WorkPointCode
isnull(asn.DNQuantity,0) as InQuantity,a.WorkPoint as WorkPointCode,b.EffectiveEnable,b.EffectiveDays
,CreatePerson,e.ProjectCode,a.SignBackStatus as SignBackStatus ," + EATTRIBUTE + ""; ,CreatePerson,e.ProjectCode,a.SignBackStatus as SignBackStatus ," + EATTRIBUTE + "";
sql += @",a.MTIME,isnull(b.EATTRIBUTE2,0) as MINQty sql += @",a.MTIME,isnull(b.EATTRIBUTE2,0) as MINQty
,b.EffectiveDays,b.EffectiveEnable ,b.EffectiveDays,b.EffectiveEnable

125
NFine.Web/Areas/PNSRM/Views/CreateItemLot/Index.cshtml

@ -975,6 +975,131 @@
} }
} }
function btnAllCreate() {
debugger;
var PoStatus;
var jsonData = '';
var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
//if (ids.length != 1) {
// $.modalAlertNew("WMS00100");
// return;
//}
var POCode = "";
var PORow = "";
var VenCode = "";
var WorkPoint = "";
var VendorLot = "";
//采购
if (Type == '1') {
var BatchCode = "";
$.ajax({
url: "/PNSRM/CreateItemLot/GetVendorLotNo?InvCode=" + InvCode + "&WorkPoint=" + WorkPoints,
//data: { keyValue: keyValue },
dataType: "json",
async: false,
success: function (data) {
BatchCode=data.VendorLotNo;
}
});
debugger;
var ARR = [];
for (var i in ids) {
ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
Code = $("#gridList").jqGrid('getRowData', ids[i]).POCode;
Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
// console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LotQty * 1;//本次生成数量
if (thisCreateQty == 0) {
$.modalAlert("该单据条码已全部生成完毕!");
return;
}
thisCreateQty = thisCreateQty.toFixed(4);
var minPackQty = thisCreateQty;//最小包装量
//minPackQty = minPackQty.toFixed(4);
var createPageCount = 1;//本次生成张数
createPageCount = createPageCount.toFixed(0);
console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
Quantity = Quantity.toFixed(2);
var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LotQty * 1;//已生成数量
CreatedQty = CreatedQty.toFixed(2);
// console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
if (Quantity == CreatedQty) {
return false;
}
var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
if (EffectiveEnable == 'true') {
var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
} else {
var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
}
// console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
var obj = {
ID: ID,
Code: Code,
Sequence: Sequence,
thisCreateQty: thisCreateQty,
minPackQty: minPackQty,
createPageCount: createPageCount,
//VendorLot: VendorLot,
PRODUCTDATE: PRODUCTDATE,
ExpirationDate: ExpirationDate,
Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
//自由项
ProjectCode: '',
BatchCode: BatchCode,
Version: '',
Brand: '',
cFree1: '',
cFree2: '',
cFree3: '',
cFree4: '',
cFree5: '',
cFree6: '',
cFree7: '',
cFree8: '',
cFree9: '',
cFree10: '',
}
ARR.push(obj);
}
$.submitForm({
url: "/PNSRM/CreateItemLot/SubmitFormCGALL" + "?" + Math.random(),
param: {
keyValue: JSON.stringify(ARR)
},
success: function () {
$.currentWindow().$("#gridList").trigger("reloadGrid");
}
})
}
}
</script> </script>
<div class="topPanel" style="height:150px"> <div class="topPanel" style="height:150px">

Loading…
Cancel
Save