@{
|
ViewBag.Title = "Index";
|
Layout = "~/Views/Shared/_LayoutVue.cshtml";
|
}
|
|
<div id="list" 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="业务类型:">
|
<hh-select-url v-model="formData.opType"
|
v-bind:url="'/Basic/Common/GetDictionary?dictName=业务类别'"
|
valuefield="NAME"
|
textfield="NAME">
|
</hh-select-url>
|
</el-form-item>
|
<el-button style="margin-top:2px;" size="mini" type="primary" v-on:click="search">查 询</el-button>
|
</el-form>
|
<el-row style="padding-left: 10px; margin-top: 7px;">
|
<el-button size="mini" type="primary" v-on:click="add" v-has="'Add'">新 增</el-button>
|
</el-row>
|
</el-card>
|
<hh-table v-bind:coloptions="outCols"
|
v-bind:paging="true"
|
v-bind:single="true"
|
v-bind:check="true"
|
v-bind:where="where"
|
dh="110"
|
v-on:clickrow="clickRow"
|
url="@Url.Action("GetList")"
|
ref="busslist"
|
v-bind:dh="tableHeight"></hh-table>
|
<el-tabs type="border-card" tab-position="left" v-bind:style="'height:'+tabHeight+'px'">
|
<el-tab-pane label="可用库区">
|
<el-card class="box-card">
|
<el-row style="padding-left: 10px; margin-top: 7px;" v-bind:inline="true">
|
<el-col>
|
<span>仓库名称:</span>
|
<hh-select-url v-model="formData.stockCode"
|
url="/Basic/Common/StockList"
|
valuefield="CN_S_STOCK_CODE"
|
textfield="CN_S_STOCK_NAME"
|
datafield="Data">
|
</hh-select-url>
|
<el-button size="mini" type="primary" v-on:click="addRel">维 护</el-button>
|
</el-col>
|
</el-row>
|
</el-card>
|
<hh-table v-bind:coloptions="ableAreaCols"
|
v-bind:single="true"
|
v-bind:paging="false"
|
v-bind:check="true"
|
v-bind:url="relAreaUrl"
|
ref="waveList"
|
v-bind:dh="tabTableHeight"></hh-table>
|
</el-tab-pane>
|
</el-tabs>
|
</div>
|
@section scripts{
|
<script>
|
var outList = new Vue({
|
mixins: [useAutoHeight],
|
computed: {
|
tableHeight: function () {
|
return (this.autoHeight + 100) / 2;
|
},
|
tabHeight: function () {
|
return (this.autoHeight - 60) / 2;
|
},
|
tabTableHeight: function () {
|
return (this.autoHeight + 80) / 2;
|
}
|
},
|
data: {
|
relAreaUrl: "",
|
op:{
|
opCode:"",
|
opName:""
|
},
|
formData: {
|
stockCode: "",
|
opType: ""
|
},
|
where: {},
|
outCols: [
|
{ f: "CN_S_OPERATION_CODE", n: "业务编码" },
|
{ f: "CN_S_OPERATION_NAME", n: "业务名称" },
|
{ f: "CN_S_OP_TYPE", n: "业务类型" },
|
{ f: "CN_C_STOCK_QTY_CHG_TYPE", n: "库存数量变化" },
|
{ f: "CN_C_INEXISTENCE_STOCK", n: "现有量" },
|
{ f: "CN_C_PKANNED_STOCK", n: "在单量" },
|
{ f: "CN_C_ALLOCATION_STOCK", n: "分配量" },
|
{ f: "CN_C_IN_NEEDINVOICE", n: "是否匹配发票" }
|
],
|
ableAreaCols: [
|
{ f: "CN_S_AREA_CODE", n: "库区名称" },
|
//{ f: "CN_S_AREA_TYPE", n: "库区类型" },
|
{ f: "CN_C_IS_USE", n: "是否启用" },
|
{ f: "CN_S_MODIFY_BY", n: "修改人" },
|
{ f: "CN_T_MODIFY", n: "修改时间" }
|
]
|
},
|
methods: {
|
search: function () {
|
this.$refs.busslist.loadData(this.formData);
|
},
|
add: function () {
|
wms.showDialogFrame({
|
title: '新增',
|
dh: 380,
|
width: "400px",
|
btn: false,
|
callBack: function (frame) {
|
$this.$refs.busslist.loadData();
|
},
|
url: "@Url.Action("Edit")?mode=add"
|
});
|
},
|
edit: function () {
|
wms.showDialogFrame({
|
title: '新增',
|
dh: 580,
|
width: "400px",
|
btn: false,
|
callBack: function (frame) {
|
$this.$refs.busslist.loadData();
|
},
|
url: "@Url.Action("Edit")?mode=update"
|
});
|
},
|
del: function () {
|
this.$refs.busslist.loadData(this.formData);
|
},
|
clickRow: function (row, event, column) {
|
$this = this;
|
$this.relAreaUrl = "@Url.Action("AbleAreas")?stockCode=" + $this.formData.stockCode + "&opCode=" + row.CN_S_OPERATION_CODE;
|
$this.op =
|
{
|
opCode: row.CN_S_OPERATION_CODE,
|
opName:row.CN_S_OPERATION_NAME
|
}
|
},
|
addRel: function () {
|
$this = this;
|
|
if ($this.formData.stockCode == "") {
|
wms.error("请选择仓库名称!");
|
return false;
|
}
|
else if ($this.formData.opCode == "") {
|
wms.error("请选择业务类型!");
|
return false;
|
}
|
|
wms.showDialogFrame({
|
title: '关联可用库区',
|
dh: 280,
|
width: "490px",
|
btn: false,
|
callBack: function (frame) {
|
$this.relAreaUrl = "@Url.Action("AbleAreas")?stockCode=" + $this.formData.stockCode + "&opCode=" + $this.op.opCode;
|
},
|
url: "@Url.Action("StoreRel")?stockCode=" + $this.formData.stockCode +"&stockName=" + $this.formData.stockCode + "&opCode=" + $this.op.opCode + "&opName=" + $this.op.opName
|
});
|
}
|
},
|
el: '#list'
|
});
|
</script>
|
}
|