修改问题。

feature_0521
kevin jiang 5 years ago
parent fed30b92d5
commit 1407638c6e

@ -25,16 +25,14 @@
type="primary"
size="small"
style="border: 0px;color:#2074E2"
@click="open(1,row)"
>修改
@click="open(1,row)">修改
</Button>
<Button
ghost
type="error"
size="small"
style="border: 0px"
@click="remove(row)"
>删除</Button>
@click="remove(row)">删除</Button>
</template>
</Table>
@ -288,7 +286,8 @@
name: val.name,
code: val.code,
detailName: val.detailName,
parentId: val.parentId
parentId: val.parentId,
level: 2
};
that.btnLoading = true;
service.postOrganizationCompanyAdd(request, function (res) {
@ -299,7 +298,7 @@
that.hide();
that.getData();
}else{
that.$Message.error("添加失败");
that.$Message.error(data.msg);
}
}, function () {
that.btnLoading = false;
@ -315,7 +314,8 @@
name: val.name,
code: val.code,
detailName: val.detailName,
parentId: val.parentId
parentId: val.parentId,
level: 2
};
service.postOrganizationRegionModify(request, function (res) {
that.btnLoading = false;
@ -325,7 +325,7 @@
that.hide();
that.getData();
}else{
that.$Message.error("修改失败");
that.$Message.error(data.msg);
}
}, function () {
that.btnLoading = false;

@ -286,7 +286,8 @@
let request = {
name: val.name,
code: val.code,
parentId: val.parentId
parentId: val.parentId,
level: 3
};
that.btnLoading = true;
service.postOrganizationCustomerAdd(request, function (res) {
@ -312,9 +313,10 @@
id: val.id,
name: val.name,
code: val.code,
parentId: val.parentId
parentId: val.parentId,
level: 3
};
service.postOrganizationRegionModify(request, function (res) {
service.postOrganizationCustomerModify(request, function (res) {
that.btnLoading = false;
let data = res.data;
if(data.code === "0000"){
@ -322,7 +324,7 @@
that.hide();
that.getData();
}else{
that.$Message.error("修改失败");
that.$Message.error(data.msg);
}
}, function () {
that.btnLoading = false;

@ -220,7 +220,8 @@
addRegion: function (name) {
let that = this;
let request = {
name: name
name: name,
level: 1
};
that.btnLoading = true;
service.postOrganizationRegionAdd(request, function (res) {
@ -231,7 +232,7 @@
that.hide();
that.getData();
}else{
that.$Message.error("添加失败");
that.$Message.error(data.msg);
}
}, function () {
that.btnLoading = false;
@ -242,7 +243,8 @@
let that = this;
let request = {
id: val.id,
name: val.name
name: val.name,
level: 1
};
service.postOrganizationRegionModify(request, function (res) {
that.btnLoading = false;
@ -252,7 +254,7 @@
that.hide();
that.getData();
}else{
that.$Message.error("修改失败");
that.$Message.error(data.msg);
}
}, function () {
that.btnLoading = false;

@ -149,6 +149,17 @@ export function postOrganizationStoreRemoveId(params, call, errorCallback) {
return http.post('/organization/store/remove/id', params).then(call).catch(errorCallback)
}
/**
* 修改组织 客户
* @param params 参数
* @param call 成功回调
* @param errorCallback 错误回调
* @returns {Promise<any>}
*/
export function postOrganizationCustomerModify(params, call, errorCallback) {
return http.post('/organization/customer/modify', params).then(call).catch(errorCallback)
}
export default {
getOrganizationRegionList,
postOrganizationRegionModify,
@ -162,5 +173,6 @@ export default {
postOrganizationStoreList,
postOrganizationStoreAdd,
postOrganizationStoreModify,
postOrganizationStoreRemoveId
postOrganizationStoreRemoveId,
postOrganizationCustomerModify
}

Loading…
Cancel
Save