46 lines
1.4 KiB
JavaScript
46 lines
1.4 KiB
JavaScript
var vue = new Vue({
|
|
el: "#rateEditModal",
|
|
data: {
|
|
account: {
|
|
id: 0,
|
|
TraderId: null,
|
|
AccountName: null,
|
|
Account: null,
|
|
Remark: null,
|
|
ClientIds: clientIds
|
|
},
|
|
IsDma: false
|
|
},
|
|
mounted: function () {
|
|
$("#ClientId").val(clientIds);
|
|
this.account.id = model.id;
|
|
this.account.Account = model.account;
|
|
this.account.AccountName = model.account_name;
|
|
this.account.TraderId = model.trader_id;
|
|
this.account.Remark = model.remark;
|
|
},
|
|
methods: {
|
|
save() {
|
|
var thisObj = this;
|
|
thisObj.account.ClientIds = $("#ClientId").val();
|
|
if (thisObj.account.TraderId == null || thisObj.account.TraderId.length == 0) {
|
|
return main.alert("请填写trader id");
|
|
}
|
|
if (thisObj.account.Account == null || thisObj.account.Account.length == 0) {
|
|
return main.alert("请填写账户");
|
|
}
|
|
|
|
main.post("/TrsAccountManage/SaveAccountManage", thisObj.account).done(function (resp) {
|
|
if (resp.success) {
|
|
thisObj.close();
|
|
} else {
|
|
main.alert(resp.msg);
|
|
}
|
|
})
|
|
},
|
|
close() {
|
|
window.parent.reloadData();
|
|
layer.closeMe();
|
|
}
|
|
},
|
|
}); |