新增货架出入库 和打印操作
This commit is contained in:
1 parent
c27a357771
commit
6a1329d74e
17 files changed
+620
-9
No files matched your search
@@ -1,4 +1,4 @@
|
||||
@model HHWMS.Web.ShipmentDetailListVM
|
||||
@model HHWMS.Web.ShipmentDetailListVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:searchpanel vm="@Model" reset-btn="true">
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
@model HHWMS.Web.ShipmentHeaderVM
|
||||
|
||||
|
||||
<el-row id="shelfinv" :gutter="20">
|
||||
<el-card class="box-card">
|
||||
<el-table :data="tableData" max-height="600" border
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column label="唯一码" width="220" align="center" prop="UniqueCode"></el-table-column>
|
||||
<el-table-column label="编码" align="center" prop="MaterialCode"></el-table-column>
|
||||
<el-table-column label="批次" align="center" prop="Batch"></el-table-column>
|
||||
<el-table-column label="数量" align="center" prop="Qty"></el-table-column>
|
||||
</el-table>
|
||||
<el-row style="float:right">
|
||||
<el-button type="primary" @@click="print">打印</el-button>
|
||||
<el-button type="success" @@click="pick">全部拣货</el-button>
|
||||
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
</el-row>
|
||||
|
||||
<script>
|
||||
var str = "";
|
||||
@{
|
||||
<text>str = @Model.Entity.ID; </text>
|
||||
}
|
||||
|
||||
var app = new Vue({
|
||||
el: "#shelfinv",
|
||||
data() {
|
||||
return {
|
||||
tableData: []
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
// 获取所有单据明细
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: { id: str },
|
||||
url: "/shipment/ShipmentHeader/ShelfInvData",
|
||||
success: function (json) {
|
||||
app.tableData = json.Data;
|
||||
},
|
||||
error: function (json) {
|
||||
console.log("加载失败");
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
pick() {
|
||||
var _this = this;
|
||||
console.log(_this.tableData)
|
||||
layer.confirm('确定执行一键拣货操作?', { icon: 3, title: '提示' },
|
||||
function (index) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: { data: _this.tableData, shipId: str },
|
||||
url: "/shipment/ShipmentHeader/Pick",
|
||||
success: function (json) {
|
||||
if (json.Code == 200) {
|
||||
_this.$message({
|
||||
message: "拣货成功!"
|
||||
});
|
||||
layer.closeAll();
|
||||
}
|
||||
else {
|
||||
_this.$message({
|
||||
message: "回库任务创建失败!" + json.Msg,
|
||||
type: "warning",
|
||||
duration: "10000",
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function (json) {
|
||||
_this.$message({
|
||||
type: 'info',
|
||||
message: '拣货失败'
|
||||
});
|
||||
}
|
||||
});
|
||||
layer.close(index);
|
||||
}, function (index) {
|
||||
_this.$message({
|
||||
type: 'info',
|
||||
message: '已取消'
|
||||
});
|
||||
});
|
||||
},
|
||||
print() {
|
||||
var _this = this;
|
||||
let printdata = {
|
||||
table : _this.tableData
|
||||
}
|
||||
hiprint.init();
|
||||
var hiprintTemplate = new hiprint.PrintTemplate();
|
||||
|
||||
var panel = hiprintTemplate.addPrintPanel({ width: 210, height: 297, paperHeader: 45, paperFooter: 780, paperType: 'A4' });
|
||||
|
||||
panel.addPrintTable({
|
||||
options: {
|
||||
"left": 16.5,
|
||||
"top": 57,
|
||||
"height": 38,
|
||||
"width": 562.5,
|
||||
"textAlign": "center",
|
||||
"field": "table",
|
||||
"columns": [[{
|
||||
"title": "唯一码",
|
||||
"field": "UniqueCode",
|
||||
"width": 180,
|
||||
"colspan": 1,
|
||||
"rowspan": 1
|
||||
}, {
|
||||
"title": "物料码",
|
||||
"field": "MaterialCode",
|
||||
"width": 80,
|
||||
"colspan": 1,
|
||||
"rowspan": 1
|
||||
},
|
||||
{
|
||||
"title": "名称",
|
||||
"field": "MaterialName",
|
||||
"width": 110,
|
||||
"colspan": 1,
|
||||
"rowspan": 1
|
||||
}, {
|
||||
"title": "批次",
|
||||
"field": "Batch",
|
||||
"width": 80,
|
||||
"colspan": 1,
|
||||
"rowspan": 1
|
||||
}]]
|
||||
}
|
||||
});
|
||||
hiprintTemplate.print([printdata]);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in new issue
Block a user