|
@@ -155,7 +155,7 @@
|
|
|
{
|
|
|
width: 300,
|
|
|
title: '财务系统类型',
|
|
|
- field: 'financeType',
|
|
|
+ field: 'financeType2',
|
|
|
},
|
|
|
{
|
|
|
width: 80,
|
|
@@ -262,11 +262,11 @@
|
|
|
clearable: true,
|
|
|
data: [
|
|
|
{
|
|
|
- value: '金蝶K3',
|
|
|
+ value: 'kingdee',
|
|
|
label: '金蝶K3'
|
|
|
},
|
|
|
// {
|
|
|
- // value: '用友U8',
|
|
|
+ // value: 'yonbip',
|
|
|
// label: '用友U8'
|
|
|
// },
|
|
|
]
|
|
@@ -339,8 +339,8 @@
|
|
|
};
|
|
|
(this.$refs.moduleView as any).setPage(page);
|
|
|
loading.close();
|
|
|
- }
|
|
|
- })
|
|
|
+ } else loading.close();
|
|
|
+ }).catch(() => loading.close());
|
|
|
}
|
|
|
// 内页工具栏方法
|
|
|
insideTools(e : any) {
|
|
@@ -365,24 +365,24 @@
|
|
|
let loading = this.$loading({ target: '.main-container' });
|
|
|
if (this.popTitle === '新增') {
|
|
|
api.saveList(query, 'maindataMaterialSupplier').then((res : any) => {
|
|
|
+ loading.close();
|
|
|
if (res.code === 200) {
|
|
|
- loading.close();
|
|
|
this.$message.success('保存成功');
|
|
|
(this as any).$refs.sideTree.request();
|
|
|
this.isShow = 'home'; // 展示类型
|
|
|
this.getDataList();
|
|
|
} else this.$message.error(res.msg);
|
|
|
- })
|
|
|
+ }).catch(() => loading.close());
|
|
|
} else if (this.popTitle === '编辑') {
|
|
|
api.updateList(query, 'maindataMaterialSupplier').then((res : any) => {
|
|
|
+ loading.close();
|
|
|
if (res.code === 200) {
|
|
|
- loading.close();
|
|
|
this.$message.success('编辑成功');
|
|
|
(this as any).$refs.sideTree.request();
|
|
|
this.isShow = 'home'; // 展示类型
|
|
|
this.getDataList();
|
|
|
} else this.$message.error(res.msg);
|
|
|
- })
|
|
|
+ }).catch(() => loading.close());
|
|
|
}
|
|
|
|
|
|
})
|
|
@@ -405,7 +405,12 @@
|
|
|
getPageList(query : any) {
|
|
|
let loading = this.$loading({ target: '.main-container' });
|
|
|
api.pageList(query, 'maindataMaterialSupplier').then((res : any) => {
|
|
|
+ loading.close();
|
|
|
if (res.code === 200) {
|
|
|
+ res.data.records.map((v : any) => {
|
|
|
+ if(v.financeType==='kingdee')v.financeType2 = '金蝶K3';
|
|
|
+ if(v.financeType==='yonbip')v.financeType2 = '用友U8';
|
|
|
+ });
|
|
|
(this.$refs.moduleView as any).setTableValue(res.data.records);
|
|
|
let page = {
|
|
|
pageNo: res.data.current, //当前页
|
|
@@ -413,9 +418,8 @@
|
|
|
total: res.data.total //总条数
|
|
|
};
|
|
|
(this.$refs.moduleView as any).setPage(page);
|
|
|
- loading.close();
|
|
|
} else this.$message.error(res.msg);
|
|
|
- })
|
|
|
+ }).catch(() => loading.close());
|
|
|
}
|
|
|
// 工具栏方法
|
|
|
clickHandle(e : any) {
|
|
@@ -436,14 +440,14 @@
|
|
|
this.popTitle = '编辑'
|
|
|
let loading = this.$loading({ target: '.main-container' });
|
|
|
api.single({ id: e.id }, 'maindataMaterialSupplier').then((res : any) => {
|
|
|
+ loading.close();
|
|
|
if (res.code === 200) {
|
|
|
let data = res.data;
|
|
|
this.radio = data.status;
|
|
|
- loading.close();
|
|
|
this.dialogFormVisible = true;
|
|
|
this.$nextTick(() => (this as any).$refs.addFormId.setValue(data));
|
|
|
}
|
|
|
- })
|
|
|
+ }).catch(() => loading.close());
|
|
|
}
|
|
|
// 操作删除
|
|
|
doDelete(item : any) {
|
|
@@ -453,13 +457,15 @@
|
|
|
type: 'warning',
|
|
|
center: true
|
|
|
}).then(() => {
|
|
|
+ let loading = this.$loading({ target: '.main-container' });
|
|
|
api.deleteList({ ids: item.id }, 'maindataMaterialSupplier').then((res : any) => {
|
|
|
+ loading.close();
|
|
|
if (res.code === 200) {
|
|
|
(this as any).$refs.sideTree.request();
|
|
|
this.getDataList();
|
|
|
this.$message.success('删除成功');
|
|
|
} else this.$message.error(res.msg);
|
|
|
- })
|
|
|
+ }).catch(() => loading.close());
|
|
|
}).catch(() => this.$message.info('已取消删除'));
|
|
|
}
|
|
|
// 刷新/重置
|