@{
|
ViewBag.Title = "Edit";
|
Layout = "~/Views/Shared/_LayoutVue.cshtml";
|
}
|
|
<div id="list" v-cloak>
|
<el-row>
|
<el-form label-width="90px" v-bind:model="formData" class="demo-ruleForm" v-bind:inline="true" ref="form" label-width="80px">
|
<el-form-item label="业务编号:">
|
<el-input v-model="formData.CN_S_OPERATION_CODE" required v-bind:disabled="mode=='update'" size="mini" placeholder="业务编号"></el-input>
|
</el-form-item>
|
<el-form-item label="业务名称:">
|
<el-input v-model="formData.CN_S_OPERATION_NAME" required size="mini" placeholder="业务名称"></el-input>
|
</el-form-item>
|
<el-form-item label="业务类型:">
|
<hh-select-url v-model="formData.CN_S_OP_TYPE" url="/Basic/Common/GetDictionary?dictName=业务类别"
|
required
|
valuefield="NAME"
|
textfield="NAME"
|
v-bind:usedefault="false"></hh-select-url>
|
</el-form-item>
|
</el-form>
|
</el-row>
|
<el-footer style="text-align:center;padding:20px 20px 20px">
|
<el-row>
|
<el-button v-on:click="close" size="mini">取消</el-button>
|
<el-button type="primary" v-on:click="save" size="mini">保存</el-button>
|
</el-row>
|
</el-footer>
|
</div>
|
@section scripts{
|
<script>
|
var outList = new Vue({
|
data: {
|
formData: {
|
CN_S_OPERATION_CODE: "",
|
CN_S_OPERATION_NAME: "",
|
CN_S_OP_TYPE: "",
|
CN_C_STOCK_QTY_CHG_TYPE: "无",
|
CN_C_INEXISTENCE_STOCK: "+",
|
CN_C_PLANNED_STOCK: "空",
|
CN_C_ALLOCATION_STOCK:"-"
|
},
|
mode:"@ViewData["Mode"]"
|
},
|
methods: {
|
save: function () {
|
$this = this;
|
if ($this.formData.CN_S_OPERATION_NAME == "")
|
{
|
wms.error("请维护业务名称!");
|
return false;
|
}
|
if ($this.formData.CN_S_OP_TYPE == "") {
|
wms.error("请选择业务类型!");
|
return false;
|
}
|
|
var url = "";
|
if ($this.mode == "add")
|
url = "@Url.Action("Add")";
|
else if($this.mode == "update")
|
url = "@Url.Action("Update")";
|
ajaxManage({
|
url: url,
|
data: $this.formData,
|
success: function (data)
|
{
|
if (data.Success) {
|
wms.success("保存成功!");
|
wms.dialogFrame.cb();
|
}
|
else {
|
wms.error(data.Msg);
|
}
|
}
|
});
|
},
|
getEntity:function()
|
{
|
var $this = this;
|
if ($this.mode == "update") {
|
$this = this;
|
ajaxManage({
|
url: "@Url.Action("GetModel")?opCode=" + $this.formData.CN_S_OPERATION_CODE,
|
type: "GET",
|
success: function (data) {
|
$this.formData = data.Data;
|
}
|
});
|
}
|
},
|
close: function ()
|
{
|
wms.dialogFrame.show = false;
|
}
|
},
|
mounted: function () {
|
var $this = this;
|
$this.getEntity();
|
},
|
el: '#list'
|
});
|
</script>
|
}
|