@{
|
Layout = "~/Views/Shared/_LayoutVue.cshtml";
|
ViewBag.Title = "SortingList";
|
}
|
<div id="sortingList" v-cloak>
|
<el-card class="box-card">
|
<el-form label-width="90px" v-bind:model="formData" class="demo-ruleForm" v-bind:inline="true">
|
<el-form-item label="分拣单:">
|
<el-input v-model="formData.sortingNo" size="mini"></el-input>
|
</el-form-item>
|
<el-button style="margin-top:2px;" size="mini" type="primary" v-on:click="search">查 询</el-button>
|
<el-button size="mini" type="primary" v-on:click="print">打印</el-button>
|
</el-form>
|
@*<el-row style="padding-left: 10px; margin-top: 7px;">
|
</el-row>*@
|
</el-card>
|
<hh-table v-bind:coloptions="sortingCols"
|
v-bind:paging="true"
|
v-bind:single="true"
|
v-bind:check="true"
|
v-bind:where="where"
|
v-on:clickrow="clickRow"
|
url="@Url.Action("GetSortingList")"
|
ref="sortinglist"
|
v-bind:dh="tableHeight"></hh-table>
|
<el-tabs type="border-card" tab-position="left" v-bind:style="'height:'+tabHeight+'px'">
|
<el-tab-pane label="分拣数据">
|
<hh-table v-bind:coloptions="sortingsCols"
|
v-bind:single="true"
|
v-bind:url="dtlUrl"
|
ref="sortingDtlList"
|
v-bind:dh="tabTableHeight"
|
v-bind:rowno="true"></hh-table>
|
</el-tab-pane>
|
<el-tab-pane label="分拣明细">
|
<hh-table v-bind:coloptions="locationCols"
|
v-bind:single="true"
|
v-bind:url="locationUrl"
|
ref="sortingLocationList"
|
v-bind:dh="tabTableHeight"
|
v-bind:rowno="true"></hh-table>
|
</el-tab-pane>
|
<el-tab-pane label="分拣结果">
|
<hh-table v-bind:coloptions="sortingsCols"
|
v-bind:single="true"
|
v-bind:url="resultUrl"
|
ref="sortingResultList"
|
v-bind:dh="tabTableHeight"
|
v-bind:rowno="true"></hh-table>
|
</el-tab-pane>
|
</el-tabs>
|
</div>
|
@section scripts{
|
<script>
|
new Vue({
|
mixins: [useAutoHeight, wmsApps],
|
data: {
|
sortingNo: "",
|
dtlUrl: "",
|
locationUrl: "",
|
resultUrl: "",
|
formData: {
|
sortingNo: "",
|
},
|
where: {},
|
},
|
computed: {
|
tableHeight: function () {
|
return (this.autoHeight + 100) / 2;
|
},
|
tabHeight: function () {
|
return (this.autoHeight - 60) / 2;
|
},
|
tabTableHeight: function () {
|
return (this.autoHeight + 80) / 2;
|
},
|
locationCols: function () {
|
var $this = this;
|
return [
|
{ f: "CN_S_ITEM_CODE", n: "物料编码" },
|
{ f: "CN_S_ITEM_NAME", n: "物料名称" },
|
{ f: "CN_S_MODEL", n: "规格型号", hidden: $this.wmsApp.ss },
|
{ f: "CN_S_FIGURE_NO", n: "图号", hidden: $this.wmsApp.ss },
|
{ f: "CN_F_QUANTITY", n: "数量" },
|
{ f: "CN_S_MEASURE_UNIT", n: "计量单位" },
|
{ f: "CN_S_LOCATION_CODE", n: "货位" },
|
{ f: "CN_S_TRAY_CODE", n: "容器" },
|
];
|
},
|
sortingsCols: function () {
|
var $this = this;
|
return [
|
{ f: "CN_S_ITEM_CODE", n: "物料编码" },
|
{ f: "CN_S_ITEM_NAME", n: "物料名称" },
|
{ f: "CN_S_MODEL", n: "规格型号", hidden: $this.wmsApp.ss },
|
{ f: "CN_S_FIGURE_NO", n: "图号", hidden: $this.wmsApp.ss },
|
{ f: "CN_F_QUANTITY", n: "数量" },
|
{ f: "CN_S_MEASURE_UNIT", n: "计量单位" },
|
];
|
},
|
sortingCols: function () {
|
return [
|
{ f: "CN_S_SORTING_NO", n: "分拣单号", w: 130 },
|
//{ f: "CN_S_SEEDING_MODE", n: "分拣模式", w: 130 },
|
{ f: "CN_S_FROM_NO", n: "来源单号", w: 150 },
|
{ f: "CN_S_STOCK_CODE", n: "所属仓库", },
|
{ f: "CN_S_STOCK_AREA", n: "所属库区" },
|
//{ f: "CN_S_SEEDING_MODE", n: "分拣模式" },
|
{ f: "CN_S_STATE", n: "状态", w: 85 },
|
{ f: "CN_S_MODIFY_BY", n: "修改人", w: 85 },
|
{ f: "CN_T_MODIFY", n: "修改时间" }
|
];
|
}
|
},
|
methods: {
|
selectRowEvent: function (isSingle, callBack) {
|
var selectRow = this.$refs.sortinglist.selections;
|
var row = null;
|
if (isSingle) {
|
if (selectRow.length != 1) {
|
wms.warning("请选择一条记录操作");
|
return;
|
}
|
row = selectRow[0];
|
} else {
|
if (selectRow.length <= 0) {
|
wms.warning("请至少选择一条记录操作");
|
return;
|
}
|
row = selectRow;
|
}
|
if (callBack)
|
callBack(row);
|
},
|
search: function () {
|
this.$refs.sortinglist.loadData(this.formData);
|
},
|
clickRow: function (row, event, column) {
|
var sortingNo = row.CN_S_SORTING_NO;
|
this.sortingNo = sortingNo;
|
this.dtlUrl = "@Url.Action("GetSortingDtl")?sortingNo=" + sortingNo;
|
this.locationUrl = "@Url.Action("GetSortingLocation")?sortingNo=" + sortingNo;
|
this.resultUrl = "@Url.Action("GetSortingResult")?sortingNo=" + sortingNo;
|
},
|
print: function () {
|
this.selectRowEvent(true, function (row) {
|
var title = '分拣单-打印';
|
parent.tab.tabAdd({
|
title: title,
|
href: '/Basic/Common/PrintReport?no=' + row.CN_S_SORTING_NO + '&rdlx=SortingReport.rdlx&asmx=SortingService'
|
});
|
})
|
}
|
},
|
el: '#sortingList'
|
}
|
);
|
</script>
|
}
|