3
This commit is contained in:
1 parent
e9f154bd06
commit
fa7b5814ba
22 files changed
+989
-168
No files matched your search
@@ -0,0 +1,117 @@
|
||||
@model HHWMS.Web.ShipmentDetail2VM
|
||||
|
||||
<el-row id="Out">
|
||||
<el-table :data="tableData"
|
||||
height="450" stripe border
|
||||
style="width: 100%"
|
||||
ref="tableData"
|
||||
v-loading="loading">
|
||||
<el-table-column type="index"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column label="地点" width="150" align="center" prop="STOFCY_0"></el-table-column>
|
||||
<el-table-column label="物料编码" width="150" align="center" prop="ITMREF_0"></el-table-column>
|
||||
<el-table-column label="批次" width="150" align="center" prop="LOT_0"></el-table-column>
|
||||
<el-table-column label="库位" width="200" align="center" prop="LOC_0"></el-table-column>
|
||||
<el-table-column label="数量" width="150" align="center" prop="QTYSTU_0" ></el-table-column>
|
||||
<el-table-column label="WMS数量" width="150" align="center" prop="WmsQty"></el-table-column>
|
||||
<el-table-column label="单位" width="200" align="center" prop="PCU_0"></el-table-column>
|
||||
<el-table-column label="状态" width="180" align="center" prop="STA_0"></el-table-column>
|
||||
|
||||
</el-table>
|
||||
<el-button type="primary" @@click="check">确定</el-button>
|
||||
</el-row>
|
||||
|
||||
<script>
|
||||
var str = "";
|
||||
@{
|
||||
<text>str = @Model.Entity.ID; </text>
|
||||
}
|
||||
var app = new Vue({
|
||||
el: "#Out",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
tableData: [],
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
this.search();
|
||||
// var t = localStorage.getItem("WareHouseId");
|
||||
// console.log(t);
|
||||
// 获取所有单据编码
|
||||
// $.ajax({
|
||||
// type: "post",
|
||||
// dataType: "json",
|
||||
// data: {},
|
||||
// url: "/xwms/XWMSPOH/Search",
|
||||
// success: function (json) {
|
||||
// app.tableData = json.Data;
|
||||
// },
|
||||
// error: function (json) {
|
||||
// alert("加载失败");
|
||||
// }
|
||||
// });
|
||||
},
|
||||
methods: {
|
||||
search() {
|
||||
var _this = this;
|
||||
_this.loading = true;
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
str:str
|
||||
},
|
||||
url: "/xwms/ShipmentHeader2/CheckInvData",
|
||||
success: function (json) {
|
||||
_this.tableData = json.Data;
|
||||
_this.loading = false;
|
||||
},
|
||||
error: function (json) {
|
||||
_this.$message.error("加载失败");
|
||||
_this.loading = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
check() {
|
||||
var _this = this;
|
||||
var sumQty = 0;
|
||||
var wmsQty = 0;
|
||||
_this.tableData.forEach(function (item) {
|
||||
wmsQty = Number.parseFloat(item.WmsQty);
|
||||
sumQty = sumQty + Number.parseFloat(item.QTYSTU_0);
|
||||
});
|
||||
console.log(sumQty, wmsQty)
|
||||
if (sumQty > wmsQty) {
|
||||
layer.alert("数量不满足,无法出库!!", { icon: 5, shadeClose: true, title: "错误信息" });
|
||||
}
|
||||
else {
|
||||
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
str: str,
|
||||
data: _this.tableData
|
||||
},
|
||||
url: "/xwms/ShipmentHeader2/Check",
|
||||
success: function (json) {
|
||||
if (json.Code == 200) {
|
||||
layer.closeAll();
|
||||
layer.msg("创建成功", { icon: 6, shade: 0.4, time: 1500 });
|
||||
}
|
||||
else {
|
||||
layer.alert("创建失败!!" + json.Msg, { icon: 5, shadeClose: true, title: "错误信息" });
|
||||
}
|
||||
},
|
||||
error: function (json) {
|
||||
layer.alert("创建失败!!", { icon: 5, shadeClose: true, title: "错误信息" });
|
||||
}
|
||||
});
|
||||
// layer.closeAll();
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
Reference in new issue
Block a user